http://linux.bkbits.net/linux-2.5 torvalds@ppc970.osdl.org|ChangeSet|20041111002817|28673 torvalds # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/11/10 16:28:17-08:00 torvalds@ppc970.osdl.org # Fix the fix. # # Silly #endif placement problem. # # arch/i386/kernel/io_apic.c # 2004/11/10 16:28:10-08:00 torvalds@ppc970.osdl.org +1 -1 # Fix the fix. # # Silly #endif placement problem. # # ChangeSet # 2004/11/10 16:25:01-08:00 acme@conectiva.com.br # [PATCH] fix platform_rename_gsi related ia32 build breakage # # "platform_rename_gsi" does not exist unless CONFIG_ACPI_BOOT is defined. # # arch/i386/kernel/io_apic.c # 2004/11/10 15:58:57-08:00 acme@conectiva.com.br +2 -0 # fix platform_rename_gsi related ia32 build breakage # # ChangeSet # 2004/11/10 11:23:40-08:00 davem@nuts.davemloft.net # Merge nuts.davemloft.net:/disk1/BK/network-2.6 # into nuts.davemloft.net:/disk1/BK/net-2.6 # # drivers/bluetooth/bt3c_cs.c # 2004/11/10 11:23:29-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2004/11/10 10:33:00-08:00 chrisw@osdl.org # [PATCH] binfmt_elf: handle partial reads gracefully # # Make sure kernel reads full size of elf data. Error out if mmap fails # when mapping any sections of the executable. Make sure interpreter # string is NULL terminated. # # Signed-off-by: Chris Wright # Signed-off-by: Linus Torvalds # # fs/binfmt_elf.c # 2004/11/10 09:45:38-08:00 chrisw@osdl.org +24 -7 # binfmt_elf: handle partial reads gracefully # # ChangeSet # 2004/11/10 10:18:18-08:00 tytso@mit.edu # [PATCH] Licencing of drivers/char/rocket.c # # On Tue, Nov 09, 2004 at 01:38:11PM -0600, Jason.Jorgensen@comtrol.com wrote: # On Tuesday, November 09, 2004 10:58 AM, Theodore Ts'o wrote: # > I developed the Rocketport device driver under contract of Comtrol, # > with the understanding that the resulting device driver would be # > released under the GPL. So I believe the correct way of resolving the # > conflicting copyright statements is to delete the following lines. # > # > It would be good to get positive confirmation from Comtrol as well # > that this is their understanding as well. # # You are absolutely correct. That notice slipped by us and should not be in # there. # # If someone with access to the mainline source could remove that for us we # would appreciate it. # # Cc: Keith.Hammerbeck@comtrol.com, Steve.Erler@comtrol.com # Acked-by: Jason.Jorgensen@comtrol.com # Signed-off-by: "Theodore Ts'o" # Signed-off-by: Linus Torvalds # # drivers/char/rocket.c # 2004/11/10 09:49:44-08:00 tytso@mit.edu +0 -24 # Licencing of drivers/char/rocket.c # # ChangeSet # 2004/11/10 09:06:41-08:00 dino@in.ibm.com # [PATCH] Fix do_wait race # # Only set the flag in the cases when the exit state is not either # TASK_DEAD or TASK_ZOMBIE. # # (TASK_DEAD or TASK_ZOMBIE will either race or we'll return the # information, so no need to note them). # # I confirmed that this fixes the problem and I also ran some LTP tests # # Signed-off-by: Dinakar Guniguntala # Signed-off-by: Sripathi Kodi # Signed-off-by: Linus Torvalds # # kernel/exit.c # 2004/11/10 03:48:21-08:00 dino@in.ibm.com +3 -1 # Fix do_wait race # # ChangeSet # 2004/11/10 14:52:03+00:00 nico@org.rmk.(none) # [ARM PATCH] 2160/1: allow modules to work with XIP kernel # # Patch from Nicolas Pitre # # This should be applied on top of patch #2154/1. # # This maps the XIP kernel in the same virtual area as used for kernel # modules instead of the previous arbitrary location. Doing so has the # advantage of having a well defined kernel address not conflicting # with the different definitions for VMALLOC_END, as well as making # modules loadable without any indirect long branch calls. The work # on XIPable MTD also requires this with code marked __xipram for the # same reason. # # This of course reduces the space available for kernel modules from # 16MB to either 14MB or 12MB depending on the size of the resulting # kernel but that shouldn't be a real issue at all, given that the # whole purpose behind XIP is to execute as much stuff from flash, # which is better achieved by compiling drivers in the kernel directly. # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # arch/arm/mm/mm-armv.c # 2004/10/26 15:40:31+01:00 nico@org.rmk.(none) +9 -9 # [PATCH] 2160/1: allow modules to work with XIP kernel # # arch/arm/kernel/module.c # 2004/10/24 16:05:26+01:00 nico@org.rmk.(none) +13 -0 # [PATCH] 2160/1: allow modules to work with XIP kernel # # arch/arm/Makefile # 2004/10/23 23:50:16+01:00 nico@org.rmk.(none) +2 -1 # [PATCH] 2160/1: allow modules to work with XIP kernel # # ChangeSet # 2004/11/10 14:37:18+00:00 nico@org.rmk.(none) # [ARM PATCH] 2154/2: XIP kernel for ARM # # Patch from Nicolas Pitre # # This patch allows for the kernel to be configured for XIP. # A lot of people are using semi hacked up XIP patches already so # it is a good idea to have a generic and clean implementation # supporting all ARM targets. The patch isn't too intrusive. # # It involves: # # - modifying the kernel entry code to map separate .text and .data # sections in the initial page table, as well as relocating # .data to ram when needed # # - modifying the linker script to account for the different VMA and # LMA for .data, as well as making sure that .init.data gets # relocated to ram # # - adding the final kernel mapping with a new MT_ROM mem type # # - distinguishing between XIP and non-XIP for bootmem and memory # resource declaration # # - and adding proper target handling to Makefiles. # # While at it, this also cleans up the kernel boot code a bit # so the kernel can now be compiled for any address in ram, # removing the need for a relation between kernel address and # start of ram. Also throws in some more comments. # # And finally the _text, _etext, _end and similar variables are now # declared extern void instead of extern char, or even extern int. # That allows for operations on their address directly without any # cast, and trying to reference them by mistake would yield an # error which is a good thing. # # Tested both configurations: XIP and non XIP, the later # producing a kernel for execution from ram just as before. # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # include/asm-arm/mach/map.h # 2004/10/20 20:21:43+01:00 nico@org.rmk.(none) +1 -0 # [PATCH] 2154/2: XIP kernel for ARM # # arch/arm/mm/mm-armv.c # 2004/10/21 01:57:09+01:00 nico@org.rmk.(none) +18 -1 # [PATCH] 2154/2: XIP kernel for ARM # # arch/arm/mm/init.c # 2004/10/20 18:26:19+01:00 nico@org.rmk.(none) +6 -2 # [PATCH] 2154/2: XIP kernel for ARM # # arch/arm/kernel/vmlinux.lds.S # 2004/11/09 16:27:55+00:00 nico@org.rmk.(none) +25 -6 # [PATCH] 2154/2: XIP kernel for ARM # # arch/arm/kernel/setup.c # 2004/10/21 04:13:24+01:00 nico@org.rmk.(none) +6 -6 # [PATCH] 2154/2: XIP kernel for ARM # # arch/arm/kernel/head.S # 2004/11/09 17:43:14+00:00 nico@org.rmk.(none) +76 -31 # [PATCH] 2154/2: XIP kernel for ARM # # arch/arm/kernel/asm-offsets.c # 2004/10/20 14:56:34+01:00 nico@org.rmk.(none) +2 -0 # [PATCH] 2154/2: XIP kernel for ARM # # arch/arm/kernel/Makefile # 2004/10/21 21:38:57+01:00 nico@org.rmk.(none) +1 -1 # [PATCH] 2154/2: XIP kernel for ARM # # arch/arm/boot/Makefile # 2004/10/21 04:13:23+01:00 nico@org.rmk.(none) +20 -1 # [PATCH] 2154/2: XIP kernel for ARM # # arch/arm/Makefile # 2004/10/21 21:43:47+01:00 nico@org.rmk.(none) +16 -4 # [PATCH] 2154/2: XIP kernel for ARM # # arch/arm/Kconfig # 2004/10/21 04:34:24+01:00 nico@org.rmk.(none) +44 -0 # [PATCH] 2154/2: XIP kernel for ARM # # ChangeSet # 2004/11/10 12:08:25+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2225/1: S3C2410 - export symbol from s3c2440-dsc.c # # Patch from Ben Dooks # # Added symbol export to the file, and cleaned up the # un-necessary include files # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/s3c2440-dsc.c # 2004/11/10 00:23:25+00:00 ben-linux@org.rmk.(none) +4 -3 # [PATCH] 2225/1: S3C2410 - export symbol from s3c2440-dsc.c # # ChangeSet # 2004/11/10 10:57:42+00:00 aia21@cantab.net # NTFS: 2.1.22 - Many bug and race fixes and error handling improvements. # # - Cleanup fs/ntfs/aops.c::ntfs_{read,write}page() since we know that a # resident attribute will be smaller than a page which makes the code # simpler. Also make the code more tolerant to concurrent ->truncate. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/aops.c # 2004/11/10 10:57:30+00:00 aia21@cantab.net +60 -74 # Cleanup ntfs_{read,write}page() since we know that a resident # attribute will be smaller than a page which makes the code # simpler. Also make the code more tolerant to concurrent ->truncate. # # fs/ntfs/Makefile # 2004/11/10 10:57:30+00:00 aia21@cantab.net +1 -1 # Update version number. # # fs/ntfs/ChangeLog # 2004/11/10 10:57:30+00:00 aia21@cantab.net +4 -1 # Update # # Documentation/filesystems/ntfs.txt # 2004/11/10 10:57:30+00:00 aia21@cantab.net +3 -0 # Update # # ChangeSet # 2004/11/09 23:23:15-08:00 davem@nuts.davemloft.net # Cset exclude: herbert@gondor.apana.org.au|ChangeSet|20041110052404|08839 # # net/ipv6/addrconf.c # 2004/11/09 23:22:59-08:00 davem@nuts.davemloft.net +0 -0 # Exclude # # ChangeSet # 2004/11/09 22:01:33-08:00 kaber@trash.net # [PKT_SCHED]: Unline inner qdiscs immediately in qdisc_destroy() # # Before the RCU change distruction of the qdisc and all inner # qdiscs happend immediately and under the rtnl semaphore. This # made sure nothing holding the rtnl semaphore could end up with # invalid memory. This is not true anymore, inner qdiscs found on # dev->qdisc_list can be suddenly destroyed by the RCU callback. # nothing can find them until they get destroyed. # # This also makes semantics sane again, an inner qdiscs should not # be user-visible once the containing qdisc has been destroyed. The # second part (locking in qdisc_lookup) is not really required, but # currently the only purpose of qdisc_tree_lock seems to be to protect # dev->qdisc_list, which is also protected by the rtnl. The rtnl is # especially relied on for making sure nobody frees a qdisc while it # is used in user-context, so qdisc_tree_lock looks unnecessary. I'm # currently reviewing all qdisc locking, if this turns out to be right # I will remove qdisc_tree_lock entirely in a follow-up patch, but for # now I left it in for consistency. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/sch_generic.c # 2004/11/09 22:01:13-08:00 kaber@trash.net +23 -1 # [PKT_SCHED]: Unline inner qdiscs immediately in qdisc_destroy() # # Before the RCU change distruction of the qdisc and all inner # qdiscs happend immediately and under the rtnl semaphore. This # made sure nothing holding the rtnl semaphore could end up with # invalid memory. This is not true anymore, inner qdiscs found on # dev->qdisc_list can be suddenly destroyed by the RCU callback. # nothing can find them until they get destroyed. # # This also makes semantics sane again, an inner qdiscs should not # be user-visible once the containing qdisc has been destroyed. The # second part (locking in qdisc_lookup) is not really required, but # currently the only purpose of qdisc_tree_lock seems to be to protect # dev->qdisc_list, which is also protected by the rtnl. The rtnl is # especially relied on for making sure nobody frees a qdisc while it # is used in user-context, so qdisc_tree_lock looks unnecessary. I'm # currently reviewing all qdisc locking, if this turns out to be right # I will remove qdisc_tree_lock entirely in a follow-up patch, but for # now I left it in for consistency. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/sch_api.c # 2004/11/09 22:01:13-08:00 kaber@trash.net +5 -1 # [PKT_SCHED]: Unline inner qdiscs immediately in qdisc_destroy() # # Before the RCU change distruction of the qdisc and all inner # qdiscs happend immediately and under the rtnl semaphore. This # made sure nothing holding the rtnl semaphore could end up with # invalid memory. This is not true anymore, inner qdiscs found on # dev->qdisc_list can be suddenly destroyed by the RCU callback. # nothing can find them until they get destroyed. # # This also makes semantics sane again, an inner qdiscs should not # be user-visible once the containing qdisc has been destroyed. The # second part (locking in qdisc_lookup) is not really required, but # currently the only purpose of qdisc_tree_lock seems to be to protect # dev->qdisc_list, which is also protected by the rtnl. The rtnl is # especially relied on for making sure nobody frees a qdisc while it # is used in user-context, so qdisc_tree_lock looks unnecessary. I'm # currently reviewing all qdisc locking, if this turns out to be right # I will remove qdisc_tree_lock entirely in a follow-up patch, but for # now I left it in for consistency. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/09 21:57:43-08:00 rusty@rustcorp.com.au # [NETFILTER]: Fix find_appropriate_src() to actually work. # # We try to bind to the same source port when sending packets from the # same source IP/source port to the outside world. Normally, this is # simple, since we always try to keep the same source port anyway, but # there are cases where that is not available. # # This is a requirement for the Kegel Peer-to-Peer NAT paper: # # http://alumnus.caltech.edu/~dank/peer-nat.html # # Unfortunately, our current implementation is useless. It looks up a # hash to see if this srcip/srcpt has been used, but instead of # returning the mapping to use, it simply returns that same srcip/srcpt. # This is clearly wrong. As pointed out by Krisztian Kovacs. # # Also, we are no longer using the netfilter-special list iterators, so # we can split src_cmp, in_range and the actual result manipulation for # much clearer code. # # Signed-off-by: Rusty Russell # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_nat_core.c # 2004/11/09 21:57:22-08:00 rusty@rustcorp.com.au +25 -25 # [NETFILTER]: Fix find_appropriate_src() to actually work. # # We try to bind to the same source port when sending packets from the # same source IP/source port to the outside world. Normally, this is # simple, since we always try to keep the same source port anyway, but # there are cases where that is not available. # # This is a requirement for the Kegel Peer-to-Peer NAT paper: # # http://alumnus.caltech.edu/~dank/peer-nat.html # # Unfortunately, our current implementation is useless. It looks up a # hash to see if this srcip/srcpt has been used, but instead of # returning the mapping to use, it simply returns that same srcip/srcpt. # This is clearly wrong. As pointed out by Krisztian Kovacs. # # Also, we are no longer using the netfilter-special list iterators, so # we can split src_cmp, in_range and the actual result manipulation for # much clearer code. # # Signed-off-by: Rusty Russell # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/09 21:54:43-08:00 ralf@linux-mips.org # [AX25]: Fix cb lookup # # Ax AX.25 connection is identified only by it's source and destination, # not by the device it's routed through, so fix the connection block # lookup to ignore the device of a connection. This fixes dying connections # in case of an AX.25 routing flap. # # Signed-off-by: David S. Miller # # net/ax25/af_ax25.c # 2004/11/09 21:54:23-08:00 ralf@linux-mips.org +2 -10 # [AX25]: Fix cb lookup # # Ax AX.25 connection is identified only by it's source and destination, # not by the device it's routed through, so fix the connection block # lookup to ignore the device of a connection. This fixes dying connections # in case of an AX.25 routing flap. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/09 21:52:55-08:00 arjan@infradead.org # [NET]: Mark __{lock,release}_sock() static. # # Signed-off-by: Arjan van de Ven # Signed-off-by: David S. Miller # # net/core/sock.c # 2004/11/09 21:52:35-08:00 arjan@infradead.org +2 -4 # [NET]: Mark __{lock,release}_sock() static. # # Signed-off-by: Arjan van de Ven # Signed-off-by: David S. Miller # # include/net/sock.h # 2004/11/09 21:52:35-08:00 arjan@infradead.org +0 -2 # [NET]: Mark __{lock,release}_sock() static. # # Signed-off-by: Arjan van de Ven # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/09 21:34:45-08:00 kaber@trash.net # [PKT_SCHED]: Fix scheduler/classifier module unload race. # # This patch fixes an scheduler/classifier module unload race. # struct Qdisc_ops which includes the owner field is also part # of the module's memory, so ops might already be freed when # try_module_get(ops->owner) is called outside of the locked # section. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/sch_api.c # 2004/11/09 21:34:25-08:00 kaber@trash.net +4 -4 # [PKT_SCHED]: Fix scheduler/classifier module unload race. # # This patch fixes an scheduler/classifier module unload race. # struct Qdisc_ops which includes the owner field is also part # of the module's memory, so ops might already be freed when # try_module_get(ops->owner) is called outside of the locked # section. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/cls_api.c # 2004/11/09 21:34:25-08:00 kaber@trash.net +4 -6 # [PKT_SCHED]: Fix scheduler/classifier module unload race. # # This patch fixes an scheduler/classifier module unload race. # struct Qdisc_ops which includes the owner field is also part # of the module's memory, so ops might already be freed when # try_module_get(ops->owner) is called outside of the locked # section. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/09 21:28:24-08:00 kaber@trash.net # [PKT_SCHED]: Mark some functions static in tc actions/act_api # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/pedit.c # 2004/11/09 21:28:04-08:00 kaber@trash.net +4 -4 # [PKT_SCHED]: Mark some functions static in tc actions/act_api # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/mirred.c # 2004/11/09 21:28:04-08:00 kaber@trash.net +4 -4 # [PKT_SCHED]: Mark some functions static in tc actions/act_api # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/ipt.c # 2004/11/09 21:28:04-08:00 kaber@trash.net +6 -6 # [PKT_SCHED]: Mark some functions static in tc actions/act_api # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/gact.c # 2004/11/09 21:28:04-08:00 kaber@trash.net +7 -7 # [PKT_SCHED]: Mark some functions static in tc actions/act_api # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/act_api.c # 2004/11/09 21:28:04-08:00 kaber@trash.net +14 -12 # [PKT_SCHED]: Mark some functions static in tc actions/act_api # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/09 21:25:42-08:00 herbert@gondor.apana.org.au # [IPV6]: Close small race in ip6_del_rt # # There is a small SMP race in ip6_del_rt where we maybe dereferencing a dst # that has been freed. This patch fixes it. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/route.c # 2004/11/09 21:25:22-08:00 herbert@gondor.apana.org.au +1 -1 # [IPV6]: Close small race in ip6_del_rt # # There is a small SMP race in ip6_del_rt where we maybe dereferencing a dst # that has been freed. This patch fixes it. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/09 21:22:29-08:00 ysato@users.sourceforge.jp # [PATCH] fix "extern inline" # # Signed-off-by: Yoshinori Sato # Signed-off-by: Linus Torvalds # # include/linux/bitops.h # 2004/11/07 22:36:48-08:00 ysato@users.sourceforge.jp +2 -2 # fix "extern inline" # # ChangeSet # 2004/11/09 21:22:16-08:00 ysato@users.sourceforge.jp # [PATCH] H8/300 vmlinux.lds update # # Signed-off-by: Yoshinori Sato # Signed-off-by: Linus Torvalds # # arch/h8300/platform/h8s/edosk2674/crt0_rom.S # 2004/11/09 20:42:15-08:00 ysato@users.sourceforge.jp +1 -1 # H8/300 vmlinux.lds update # # arch/h8300/kernel/vmlinux.lds.S # 2004/11/09 20:42:15-08:00 ysato@users.sourceforge.jp +57 -86 # H8/300 vmlinux.lds update # # BitKeeper/deleted/.del-rom.ld~a3dd1f26462bba20 # 2004/11/09 21:22:09-08:00 ysato@users.sourceforge.jp +0 -0 # Delete: arch/h8300/platform/h8s/generic/rom.ld # # BitKeeper/deleted/.del-rom.ld~666e996e7bf0348f # 2004/11/09 21:22:09-08:00 ysato@users.sourceforge.jp +0 -0 # Delete: arch/h8300/platform/h8300h/generic/rom.ld # # BitKeeper/deleted/.del-rom.ld~63351a68c593156c # 2004/11/09 21:22:09-08:00 ysato@users.sourceforge.jp +0 -0 # Delete: arch/h8300/platform/h8s/edosk2674/rom.ld # # BitKeeper/deleted/.del-ram.ld~a58609b1f1d21235 # 2004/11/09 21:22:09-08:00 ysato@users.sourceforge.jp +0 -0 # Delete: arch/h8300/platform/h8s/generic/ram.ld # # BitKeeper/deleted/.del-ram.ld~a2df4607ce752c36 # 2004/11/09 21:22:09-08:00 ysato@users.sourceforge.jp +0 -0 # Delete: arch/h8300/platform/h8300h/aki3068net/ram.ld # # BitKeeper/deleted/.del-ram.ld~9ca79188b3fc7d7a # 2004/11/09 21:22:09-08:00 ysato@users.sourceforge.jp +0 -0 # Delete: arch/h8300/platform/h8300h/h8max/ram.ld # # BitKeeper/deleted/.del-ram.ld~40b243c66149a8ef # 2004/11/09 21:22:09-08:00 ysato@users.sourceforge.jp +0 -0 # Delete: arch/h8300/platform/h8300h/generic/ram.ld # # BitKeeper/deleted/.del-ram.ld~3dd2b5aedbb5198 # 2004/11/09 21:22:09-08:00 ysato@users.sourceforge.jp +0 -0 # Delete: arch/h8300/platform/h8s/edosk2674/ram.ld # # ChangeSet # 2004/11/09 21:22:03-08:00 ysato@users.sourceforge.jp # [PATCH] H8/300 build error fix # # Because reference of fls becomes error. # # Signed-off-by: Yoshinori Sato # Signed-off-by: Linus Torvalds # # include/asm-h8300/bitops.h # 2004/11/09 08:06:35-08:00 ysato@users.sourceforge.jp +4 -4 # H8/300 build error fix # # ChangeSet # 2004/11/09 21:21:46-08:00 ysato@users.sourceforge.jp # [PATCH] H8/300 inline cleanup # # Eliminate useless clobber. # # Signed-off-by: Yoshinori Sato # Signed-off-by: Linus Torvalds # # include/asm-h8300/system.h # 2004/11/09 08:06:35-08:00 ysato@users.sourceforge.jp +1 -2 # H8/300 inline cleanup # # include/asm-h8300/delay.h # 2004/11/09 08:06:35-08:00 ysato@users.sourceforge.jp +3 -4 # H8/300 inline cleanup # # ChangeSet # 2004/11/09 20:11:42-08:00 gerg@snapgear.com # [PATCH] m68knommu: add kernel startup code for the ColdFire 5272 Feith CANcam board # # Kernel startup code specific to the Coldfire 5272 based CANcam board. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5272/CANCam/crt0_ram.S # 2004/10/27 18:11:42-07:00 gerg@snapgear.com +154 -0 # m68knommu: add kernel startup code for the ColdFire 5272 Feith CANcam board # # arch/m68knommu/platform/5272/CANCam/crt0_ram.S # 2004/10/27 18:11:42-07:00 gerg@snapgear.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68knommu/platform/5272/CANCam/crt0_ram.S # # ChangeSet # 2004/11/09 20:11:29-08:00 gerg@snapgear.com # [PATCH] m68knommu: move ColdFire 5282 definitions to common 528x include # # Move the ColdFire 5282 specific register definitions into a common # 528x definition include. They can be used for all members of the # 528x CPU family. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/m528xsim.h # 2004/10/27 18:14:34-07:00 gerg@snapgear.com +6 -5 # m68knommu: move ColdFire 5282 definitions to common 528x include # # ChangeSet # 2004/11/09 20:10:52-08:00 gerg@snapgear.com # [PATCH] m68knommu: use correct register offsets for ColdFire 527x FEC ethernet # # The ColdFire 527x and 528x use the same FEC ethernet register offsets. # Conditionally use the correct structure. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # drivers/net/fec.h # 2004/10/27 18:12:51-07:00 gerg@snapgear.com +3 -3 # m68knommu: use correct register offsets for ColdFire 527x FEC ethernet # # ChangeSet # 2004/11/09 20:10:39-08:00 gerg@snapgear.com # [PATCH] m68knommu: remove unused include of delay.h in ColdFire 5407 configuration code # # Remove unused include of asm/delay.h from ColdFire 5407 configuration # code. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5407/config.c # 2004/10/27 18:11:46-07:00 gerg@snapgear.com +0 -1 # m68knommu: remove unused include of delay.h in ColdFire 5407 configuration code # # ChangeSet # 2004/11/09 20:10:27-08:00 gerg@snapgear.com # [PATCH] m68knommu: move ColdFire M5282EVB kernel startup code to common 528x platform directory # # Move the M5282EVB kernel startup code from the 5282 specific platform # directory to a common 528x platform directory. All ColdFire 582x # CPU cores are the same, just minor peripheral differences. Renaming # the sub-directory to match the proper board name (M5282EVB), not # use the generic MOTOROLA. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/528x/M5282EVB/crt0_ram.S # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +2 -2 # m68knommu: move ColdFire M5282EVB kernel startup code to common 528x platform directory # # ChangeSet # 2004/11/09 20:10:08-08:00 gerg@snapgear.com # [PATCH] m68knommu: move ColdFire 5282 Makefile to common 528x Makefile # # Move the ColdFire 5282 specific platform Makefile into the common # 528x CPU platform directory. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/528x/Makefile # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +1 -1 # m68knommu: move ColdFire 5282 Makefile to common 528x Makefile # # ChangeSet # 2004/11/09 20:09:43-08:00 gerg@snapgear.com # [PATCH] m68knommu: move ColdFire 5282 config code to common 528x config code # # Move the ColdFire 5282 specific CPU configuration code into the common # 528x CPU platform directory. It can be used for all members of the # 528x CPU family. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/528x/config.c # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +2 -2 # m68knommu: move ColdFire 5282 config code to common 528x config code # # ChangeSet # 2004/11/09 20:09:22-08:00 gerg@snapgear.com # [PATCH] m68knommu: add kernel startup code for the Freescale M5275EVB board # # Add kernel startup code for the Freescale 5275EVB board. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/527x/M5275EVB/crt0_ram.S # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +166 -0 # m68knommu: add kernel startup code for the Freescale M5275EVB board # # arch/m68knommu/platform/527x/M5275EVB/crt0_ram.S # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68knommu/platform/527x/M5275EVB/crt0_ram.S # # ChangeSet # 2004/11/09 17:29:42-08:00 gerg@snapgear.com # [PATCH] m68knommu: hardware configuration for Freescale 527x family of CPUs # # Create basic hardware configuration and setup code for the newly # added Freescale 527x family of CPU's (5270/5271/5274/5275). # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/527x/config.c # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +82 -0 # m68knommu: hardware configuration for Freescale 527x family of CPUs # # arch/m68knommu/platform/527x/config.c # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68knommu/platform/527x/config.c # # ChangeSet # 2004/11/09 17:29:28-08:00 gerg@snapgear.com # [PATCH] m68knommu: dynamic RAM sizing for Motorola 5206e platform # # Determine the DRAM size dynamically for the MOTOROLA 5206e platform. # We can just read back the SDRAM register configuration bits to # determine what the RAM size really is. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S # 2004/10/27 18:11:42-07:00 gerg@snapgear.com +28 -2 # m68knommu: dynamic RAM sizing for Motorola 5206e platform # # ChangeSet # 2004/11/09 17:29:14-08:00 gerg@snapgear.com # [PATCH] m68knommu: get flash based boot args for SCALES and CAMcam boards # # Removed unused include of asm/delay.h. # Add support for getting boot args from dedicated flash segment # on the SCALES and CANcam boards. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5272/config.c # 2004/10/27 18:11:44-07:00 gerg@snapgear.com +5 -2 # m68knommu: get flash based boot args for SCALES and CAMcam boards # # ChangeSet # 2004/11/09 17:28:59-08:00 gerg@snapgear.com # [PATCH] m68knommu: use linux/delay.h instead of asm/delay.h # # Include linux/delay.h instead of asm/delay.h in ColdFire vector # handling code. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5307/vectors.c # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +1 -1 # m68knommu: use linux/delay.h instead of asm/delay.h # # ChangeSet # 2004/11/09 17:28:46-08:00 gerg@snapgear.com # [PATCH] m68knommu: build PIT timer for 527x and 528x CPUs # # Build the PIT timer code in for 528x and 527x CPU targets. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5307/Makefile # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +2 -0 # m68knommu: build PIT timer for 527x and 528x CPUs # # ChangeSet # 2004/11/09 17:28:32-08:00 gerg@snapgear.com # [PATCH] m68knommu: 527x platform support Makefile # # Makefile to support building the Freescale 527x platform support. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/527x/Makefile # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +21 -0 # m68knommu: 527x platform support Makefile # # arch/m68knommu/platform/527x/Makefile # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68knommu/platform/527x/Makefile # # ChangeSet # 2004/11/09 17:28:18-08:00 gerg@snapgear.com # [PATCH] m68knommu: update defconfig # # Updated default configuration for the m68knommu architectures. # Adds newly created CPU and clock configurations. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/defconfig # 2004/10/27 18:11:41-07:00 gerg@snapgear.com +5 -1 # m68knommu: update defconfig # # ChangeSet # 2004/11/09 17:28:03-08:00 gerg@snapgear.com # [PATCH] m68knommu: kernel startup code for Freescale M5271EVB board # # Kernel startup code specific to the Freescale M5271EVB board. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/527x/M5271EVB/crt0_ram.S # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +166 -0 # m68knommu: kernel startup code for Freescale M5271EVB board # # arch/m68knommu/platform/527x/M5271EVB/crt0_ram.S # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68knommu/platform/527x/M5271EVB/crt0_ram.S # # ChangeSet # 2004/11/09 17:27:50-08:00 gerg@snapgear.com # [PATCH] m68knommu: new device support for ColdFire FEC ethernet driver # # A big update to the ColdFire FEC ethernet driver. # This has been in the works for a while (and thus tested for # a while too). Fundamentally through there is 3 important # changes: # # . support 528x and 527x device families # . allow for multiple FEC devices to be present (for example 2 on the 5274/5) # . support the Kendein 8721 PHY # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # drivers/net/fec.c # 2004/10/27 18:12:51-07:00 gerg@snapgear.com +391 -106 # m68knommu: new device support for ColdFire FEC ethernet driver # # ChangeSet # 2004/11/09 17:27:34-08:00 gerg@snapgear.com # [PATCH] m68knommu: move ColdFire PIT timer to common code directory # # Move the PIT timer code from the 5282 specific platform directory # to the common ColdFire platform code directory (5307). Freescale # are using the PIT timer on other devices now (at least the 523x and # 527x families), so put it near the other common timer code so they # can all use it easily. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5307/pit.c # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +10 -9 # m68knommu: move ColdFire PIT timer to common code directory # # ChangeSet # 2004/11/09 17:18:30-08:00 Andries.Brouwer@cwi.nl # [PATCH] remove explicit k_name use in atmel_cs.c, bt3c_cs.c # # drivers/net/wireless/atmel_cs.c # 2004/11/09 16:20:55-08:00 Andries.Brouwer@cwi.nl +1 -4 # remove explicit k_name use in atmel_cs.c, bt3c_cs.c # # drivers/bluetooth/bt3c_cs.c # 2004/11/09 16:23:01-08:00 Andries.Brouwer@cwi.nl +1 -4 # remove explicit k_name use in atmel_cs.c, bt3c_cs.c # # ChangeSet # 2004/11/09 17:18:17-08:00 Andries.Brouwer@cwi.nl # [PATCH] new Solaris partition ID # # Sun tells me: # # For many years both Solaris x86 and Linux have used the same fdisk # partition id of 0x82. Solaris uses that identifier to allocate disk # space which is then further subdivided by the Solaris VTOC (Volume # Table of Contents) and Linux uses that id as the identifier for its # swap partition. # # The new release of Solaris should be out early next year. Solaris # will begin using a partition id of 0xbf. We will continue to support # the older partition id value of 0x82 for compatibility reasons. # # Solaris's fdisk program has been enhanced to allow system administrators # to switch back and forth between the new and old identifier without any # loss of data. # # So, this may be useful to some people a few months from now. # # include/linux/genhd.h # 2004/11/09 12:44:58-08:00 Andries.Brouwer@cwi.nl +1 -0 # new Solaris partition ID # # fs/partitions/msdos.c # 2004/11/09 12:43:17-08:00 Andries.Brouwer@cwi.nl +1 -0 # new Solaris partition ID # # ChangeSet # 2004/11/09 17:18:05-08:00 Andries.Brouwer@cwi.nl # [PATCH] don't divide by 0 when trying to mount ext3 # # Not surprisingly, the ext3 code crashes in the same way # the ext2 code does when dividing by zero. # # fs/ext3/super.c # 2004/11/08 11:55:30-08:00 Andries.Brouwer@cwi.nl +18 -12 # don't divide by 0 when trying to mount ext3 # # ChangeSet # 2004/11/09 17:17:52-08:00 Andries.Brouwer@cwi.nl # [PATCH] recieve typos # # net/sctp/ulpevent.c # 2004/11/08 04:54:59-08:00 Andries.Brouwer@cwi.nl +2 -2 # recieve typos # # net/sctp/socket.c # 2004/11/08 04:55:12-08:00 Andries.Brouwer@cwi.nl +1 -1 # recieve typos # # include/net/sctp/user.h # 2004/11/08 04:54:19-08:00 Andries.Brouwer@cwi.nl +2 -2 # recieve typos # # drivers/usb/gadget/rndis.c # 2004/11/08 04:57:30-08:00 Andries.Brouwer@cwi.nl +1 -1 # recieve typos # # drivers/scsi/qla2xxx/qla_os.c # 2004/11/08 04:57:15-08:00 Andries.Brouwer@cwi.nl +1 -1 # recieve typos # # drivers/scsi/qla2xxx/qla_isr.c # 2004/11/08 04:56:58-08:00 Andries.Brouwer@cwi.nl +1 -1 # recieve typos # # drivers/scsi/aic7xxx/aic79xx.reg # 2004/11/08 04:56:20-08:00 Andries.Brouwer@cwi.nl +1 -1 # recieve typos # # drivers/net/wan/farsync.c # 2004/11/08 04:55:37-08:00 Andries.Brouwer@cwi.nl +1 -1 # recieve typos # # drivers/isdn/hisax/amd7930_fn.c # 2004/11/08 04:56:06-08:00 Andries.Brouwer@cwi.nl +2 -2 # recieve typos # # drivers/i2c/algos/i2c-algo-pca.c # 2004/11/08 04:59:13-08:00 Andries.Brouwer@cwi.nl +2 -2 # recieve typos # # ChangeSet # 2004/11/09 17:17:38-08:00 Andries.Brouwer@cwi.nl # [PATCH] propogate typos # # net/8021q/vlan.c # 2004/11/08 06:14:36-08:00 Andries.Brouwer@cwi.nl +2 -2 # propogate typos # # include/linux/ipmi_msgdefs.h # 2004/11/08 06:14:36-08:00 Andries.Brouwer@cwi.nl +1 -1 # propogate typos # # arch/sh64/kernel/pci_sh5.c # 2004/11/08 06:14:36-08:00 Andries.Brouwer@cwi.nl +1 -1 # propogate typos # # ChangeSet # 2004/11/09 17:17:25-08:00 Andries.Brouwer@cwi.nl # [PATCH] wierd typos # # I have directories full of typo corrections - don't know # whether you want them. Below some wierds. # # include/linux/ipmi.h # 2004/11/08 04:52:00-08:00 Andries.Brouwer@cwi.nl +1 -1 # wierd typos # # include/asm-ppc/pmac_feature.h # 2004/11/08 05:01:10-08:00 Andries.Brouwer@cwi.nl +1 -1 # wierd typos # # drivers/net/wireless/atmel.c # 2004/11/08 04:52:00-08:00 Andries.Brouwer@cwi.nl +2 -2 # wierd typos # # drivers/media/video/cx88/cx88-tvaudio.c # 2004/11/08 04:52:00-08:00 Andries.Brouwer@cwi.nl +1 -1 # wierd typos # # drivers/char/viotape.c # 2004/11/08 04:52:00-08:00 Andries.Brouwer@cwi.nl +1 -1 # wierd typos # # drivers/char/viocons.c # 2004/11/08 04:52:00-08:00 Andries.Brouwer@cwi.nl +1 -1 # wierd typos # # arch/sh/boards/overdrive/pcidma.c # 2004/11/08 04:52:00-08:00 Andries.Brouwer@cwi.nl +1 -1 # wierd typos # # ChangeSet # 2004/11/09 17:17:13-08:00 Andries.Brouwer@cwi.nl # [PATCH] ufs docs update # # Added the hp and 5xbsd flavors of ufstype. # # Documentation/filesystems/ufs.txt # 2004/11/08 04:39:43-08:00 Andries.Brouwer@cwi.nl +10 -5 # ufs docs update # # ChangeSet # 2004/11/09 17:17:00-08:00 Andries.Brouwer@cwi.nl # [PATCH] ext2 docs update # # Removed barrier - it is not an ext2 option. # # Corrected the distinction between kernel-selected defaults and values # read from the filesystem. # # Fixed some typos. Shortened line length to 80. # # Documentation/filesystems/ext2.txt # 2004/11/08 05:41:22-08:00 Andries.Brouwer@cwi.nl +28 -32 # ext2 docs update # # ChangeSet # 2004/11/09 17:16:47-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Add HW CPU timebase sync # # This implements support for doing a HW synchronization of the CPU # timebases on SMP G5 machines. # # When the proper clock chips are found on i2c, they are used to stop the # timebase clock source during the synchronization process. This replaces # the software sync algorithm we used so far and provides slightly more # precise results. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pmac_smp.c # 2004/11/08 23:54:47-08:00 benh@kernel.crashing.org +145 -11 # ppc64: Add HW CPU timebase sync # # ChangeSet # 2004/11/09 17:16:35-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix G5 low level i2c code # # The code in pmac_low_i2c.c is a low level synchronous version of the i2c keywest # driver for use by platform code early during boot or during sleep/wakeup cycles # to communicate with some motherboard chips, typically clock chips. # It wasn't used on g5 until now, which is good because it wasn't 64 bits clean :) # # This patch fixes it, and also remove the use of udelay() since it can be used for # synchronizing the HW timebase, and so must operate when it's frozen (and our # implementation of udelay uses that timebase). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pmac_low_i2c.c # 2004/11/08 21:26:21-08:00 benh@kernel.crashing.org +28 -18 # ppc64: Fix G5 low level i2c code # # ChangeSet # 2004/11/09 17:08:05-08:00 greg@kroah.com # [PATCH] timer: fix up problem where two sysdev_class devices had the same name. # # Thanks to Kay Sievers for reporting this. # # Was caused by a change from Venkatesh Pallipadi as seen at: # http://linux.bkbits.net:8080/linux-2.5/cset@41810e4aGZ0E5bn_hMb4JgIY5u90zA # # Signed-off-by: Greg Kroah-Hartman # Signed-off-by: Linus Torvalds # # arch/i386/kernel/timers/timer_pit.c # 2004/11/09 15:25:54-08:00 greg@kroah.com +1 -1 # timer: fix up problem where two sysdev_class devices had the same name. # # ChangeSet # 2004/11/09 17:07:52-08:00 Matt_Domsch@dell.com # [PATCH] EFI GPT: reduce alternate header probing # # EFI partitioning scheme was reading the last reported sector of the # block device to look for the alternate GPT header, before it had # confirmed that it should. This causes problems for devices with the # following problems: a) those who misreport their size (typically # off-by-one), and b) those who fail when asked to read a block # outside their range. # # This patch moves the test for the Protective Master Boot Record (PMBR) # ahead of the tests for the Primary and Alternate GPT headers. If the # PMBR is not valid, the disk is assumed to not be a GPT disk. This can # be overridden with the 'gpt' kernel command line option. If the # Primary GPT header is not valid, the Alternate GPT header is not # probed automatically unless the 'gpt' kernel command line option is # passed. If the both the PMBR and Primary GPT header are valid, then # the Alternate GPT header at the end of the disk is probed. # # Also re-enables CONFIG_EFI_PARTITION for all architectures. # # Signed-off-by: Matt Domsch # Signed-off-by: Linus Torvalds # # fs/partitions/efi.c # 2004/11/09 12:43:34-08:00 Matt_Domsch@dell.com +129 -129 # EFI GPT: reduce alternate header probing # # fs/partitions/Kconfig # 2004/11/08 07:52:30-08:00 Matt_Domsch@dell.com +1 -1 # EFI GPT: reduce alternate header probing # # ChangeSet # 2004/11/10 00:47:09+00:00 dave.jiang@com.rmk.(none) # [ARM PATCH] 2223/1: convert serial UART to platform device on iop3xx # # Patch from Dave Jiang # # Converting IOP321 UART to platform device # Remove asm/arch/serial.h dependency # # Signed-off-by: Dave Jiang # Signed-off-by: Russell King # # ChangeSet # 2004/11/09 16:44:47-08:00 akpm@osdl.org # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/xfrm/xfrm_state.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/sctp/protocol.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +5 -5 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/sctp/endpointola.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/sctp/associola.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/netrom/nr_route.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv6/reassembly.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv6/netfilter/ip6_tables.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv6/mcast.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +3 -3 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv6/anycast.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv6/addrconf.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/tcp_minisocks.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +2 -2 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/tcp.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +3 -3 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/route.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_recent.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_hashlimit.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_tables.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/netfilter/arp_tables.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/ipvs/ip_vs_lblcr.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +2 -2 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/ipvs/ip_vs_lblc.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/ipvs/ip_vs_ctl.c # 2004/11/09 16:44:26-08:00 akpm@osdl.org +5 -5 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/ipvs/ip_vs_conn.c # 2004/11/09 16:44:25-08:00 akpm@osdl.org +2 -2 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/ip_fragment.c # 2004/11/09 16:44:25-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/igmp.c # 2004/11/09 16:44:25-08:00 akpm@osdl.org +2 -2 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/decnet/dn_route.c # 2004/11/09 16:44:25-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/core/sock.c # 2004/11/09 16:44:25-08:00 akpm@osdl.org +2 -2 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/core/neighbour.c # 2004/11/09 16:44:25-08:00 akpm@osdl.org +3 -3 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/bridge/netfilter/ebtables.c # 2004/11/09 16:44:25-08:00 akpm@osdl.org +1 -1 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/bridge/br_if.c # 2004/11/09 16:44:25-08:00 akpm@osdl.org +2 -2 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/atm/mpc.c # 2004/11/09 16:44:25-08:00 akpm@osdl.org +2 -2 # [NET]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # arch/arm/mach-iop3xx/iop321-setup.c # 2004/11/09 21:11:47+00:00 dave.jiang@com.rmk.(none) +58 -9 # [PATCH] 2223/1: convert serial UART to platform device on iop3xx # # arch/arm/mach-iop3xx/Makefile # 2004/11/09 20:52:09+00:00 dave.jiang@com.rmk.(none) +1 -1 # [PATCH] 2223/1: convert serial UART to platform device on iop3xx # # BitKeeper/deleted/.del-serial.h~722f68a36f582680 # 2004/11/10 00:43:58+00:00 dave.jiang@com.rmk.(none) +0 -0 # Delete: include/asm-arm/arch-iop3xx/serial.h # # BitKeeper/deleted/.del-iop321-mm.c~e4d3390b434d4364 # 2004/11/10 00:43:57+00:00 dave.jiang@com.rmk.(none) +0 -0 # Delete: arch/arm/mach-iop3xx/iop321-mm.c # # ChangeSet # 2004/11/10 00:42:02+00:00 dave.jiang@com.rmk.(none) # [ARM PATCH] 2222/1: iop3xx timer routine cleanup # # Patch from Dave Jiang # # Clean up iop3xx timer routines and move to xtime_lock/timer_tick schemes # dependent on patch 2216/1 # # Signed-off-by: Dave Jiang # Signed-off-by: Russell King # # ChangeSet # 2004/11/09 16:40:29-08:00 akpm@osdl.org # [BLUETOOTH]: Lock initializer unifying # # From: # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/bluetooth/l2cap.c # 2004/11/09 16:40:09-08:00 akpm@osdl.org +1 -1 # [BLUETOOTH]: Lock initializer unifying # # drivers/bluetooth/hci_usb.c # 2004/11/09 16:40:09-08:00 akpm@osdl.org +1 -1 # [BLUETOOTH]: Lock initializer unifying # # drivers/bluetooth/bfusb.c # 2004/11/09 16:40:09-08:00 akpm@osdl.org +1 -1 # [BLUETOOTH]: Lock initializer unifying # # arch/arm/mach-iop3xx/iop331-time.c # 2004/11/09 20:40:32+00:00 dave.jiang@com.rmk.(none) +9 -46 # [PATCH] 2222/1: iop3xx timer routine cleanup # # arch/arm/mach-iop3xx/iop321-time.c # 2004/11/09 21:12:31+00:00 dave.jiang@com.rmk.(none) +9 -44 # [PATCH] 2222/1: iop3xx timer routine cleanup # # ChangeSet # 2004/11/10 00:36:45+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2224/1: S3C2410 - s3c2440 power management device # # Patch from Ben Dooks # # Add a system device for the s3c2440 called s3c2440-core # to allow power management hooks for s3c2440 specific # registers to be added. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/s3c2440.c # 2004/11/09 23:52:58+00:00 ben-linux@org.rmk.(none) +55 -4 # [PATCH] 2224/1: S3C2410 - s3c2440 power management device # # ChangeSet # 2004/11/10 00:27:04+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2217/2: S3C2410 - pm updates # # Patch from Ben Dooks # # This patch does the following: # # - Save S3C2410_DCLKCON over sleep # - Save all non-SDRAM memory bank config # - Fix bug in setting PLL before clock divisor # - Save all IRQ level controlls # - Restore IRQ masks _after_ configuration restored # - No debug until core registers restored # # This patch also moves the pm save/restore list code # into the header, for other parts of arch/arm/mach-s3c2410 # to use. Note, this is not a general invite for external # code to use these functions. # # Also applied patch from Dimitry Andric to fix up the # spelling/typos in Documentation/arm/Samsung-S3C24XX/Suspend.txt # # Signed-off-by: Ben Dooks # # Signed-off-by: Dimitry Andric # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/pm.h # 2004/11/09 23:17:24+00:00 ben-linux@org.rmk.(none) +13 -0 # [PATCH] 2217/2: S3C2410 - pm updates # # arch/arm/mach-s3c2410/pm.c # 2004/11/09 23:33:22+00:00 ben-linux@org.rmk.(none) +36 -18 # [PATCH] 2217/2: S3C2410 - pm updates # # Documentation/arm/Samsung-S3C24XX/Suspend.txt # 2004/11/09 23:23:02+00:00 ben-linux@org.rmk.(none) +7 -7 # [PATCH] 2217/2: S3C2410 - pm updates # # ChangeSet # 2004/11/10 00:13:49+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2220/1: S3C2410 - regs-dsc.h fixes # # Patch from Ben Dooks # # The following fixes are included: # # - fix the addresses of S3C2440_DSCx (off by 4) # - SCK0/SCK1 definitions the wrong way around # - renable ENABLE to DISABLE # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # ChangeSet # 2004/11/09 16:12:20-08:00 hch@lst.de # [NET]: Remove dead exports from net/core/dev.c # # Signed-off-by: Christoph Hellwig # Signed-off-by: David S. Miller # # net/core/dev.c # 2004/11/09 16:12:00-08:00 hch@lst.de +13 -75 # [NET]: Remove dead exports from net/core/dev.c # # Signed-off-by: Christoph Hellwig # Signed-off-by: David S. Miller # # include/linux/netdevice.h # 2004/11/09 16:12:00-08:00 hch@lst.de +1 -9 # [NET]: Remove dead exports from net/core/dev.c # # Signed-off-by: Christoph Hellwig # Signed-off-by: David S. Miller # # include/asm-arm/arch-s3c2410/regs-dsc.h # 2004/11/09 17:50:43+00:00 ben-linux@org.rmk.(none) +16 -16 # [PATCH] 2220/1: S3C2410 - regs-dsc.h fixes # # ChangeSet # 2004/11/09 16:08:51-08:00 chas@cmf.nrl.navy.mil # [ATM]: [atmtcp] fix refcounting and vcc search # # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # drivers/atm/atmtcp.c # 2004/11/09 16:08:31-08:00 chas@cmf.nrl.navy.mil +25 -17 # [ATM]: [atmtcp] fix refcounting and vcc search # # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/10 00:04:37+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add Assabet flash device partitioning and location data. # # arch/arm/mach-sa1100/assabet.c # 2004/11/10 00:01:34+00:00 rmk@flint.arm.linux.org.uk +71 -4 # Add assabet flash device information for flash platform device. # # ChangeSet # 2004/11/09 23:48:56+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add SA1100 generic flash infrastructure. # # arch/arm/mach-sa1100/generic.h # 2004/11/09 23:45:04+00:00 rmk@flint.arm.linux.org.uk +6 -0 # Add sa11x0_set_flash_data prototype. # # arch/arm/mach-sa1100/generic.c # 2004/11/09 23:45:04+00:00 rmk@flint.arm.linux.org.uk +14 -0 # Add SA11x0 MTD device and function to set platform data, and # resource information. # # ChangeSet # 2004/11/09 23:33:40+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add static partitioning information to flash_platform_data. # # include/asm-arm/mach/flash.h # 2004/11/09 23:30:49+00:00 rmk@flint.arm.linux.org.uk +17 -2 # Add static partitioning information to flash_platform_data. # # ChangeSet # 2004/11/09 15:22:30-08:00 ajgrothe@yahoo.com # [CRYPTO]: Add Anubis support. # # Signed-off-by: Aaron Grothe # Signed-off-by: James Morris # Signed-off-by: David S. Miller # # crypto/tcrypt.h # 2004/11/09 15:21:35-08:00 ajgrothe@yahoo.com +205 -0 # [CRYPTO]: Add Anubis support. # # crypto/tcrypt.c # 2004/11/09 15:21:35-08:00 ajgrothe@yahoo.com +13 -0 # [CRYPTO]: Add Anubis support. # # crypto/Makefile # 2004/11/09 15:21:35-08:00 ajgrothe@yahoo.com +1 -0 # [CRYPTO]: Add Anubis support. # # crypto/Kconfig # 2004/11/09 15:21:35-08:00 ajgrothe@yahoo.com +15 -0 # [CRYPTO]: Add Anubis support. # # Documentation/crypto/api-intro.txt # 2004/11/09 15:21:35-08:00 ajgrothe@yahoo.com +3 -0 # [CRYPTO]: Add Anubis support. # # crypto/anubis.c # 2004/11/09 15:21:29-08:00 ajgrothe@yahoo.com +719 -0 # [CRYPTO]: Add Anubis support. # # crypto/anubis.c # 2004/11/09 15:21:29-08:00 ajgrothe@yahoo.com +0 -0 # BitKeeper file /disk1/BK/net-2.6/crypto/anubis.c # # ChangeSet # 2004/11/09 11:09:01-08:00 greg@kroah.com # [PATCH] kobject: fix double kobject_put() in error path of kobject_add() # # This fixes a problem introduced in the previous set of driver model # changes that has been seen by a lot of people (most notibly the greater # than 256 pty users, but others might also be hitting this without # realizing it.) # # Also add a comment so we don't try to "fix" this again. # # Signed-off-by: Greg Kroah-Hartman # Signed-off-by: Linus Torvalds # # lib/kobject.c # 2004/11/08 23:58:02-08:00 greg@kroah.com +1 -1 # kobject: fix double kobject_put() in error path of kobject_add() # # ChangeSet # 2004/11/09 18:08:38+00:00 rmk@flint.arm.linux.org.uk # [ARM] rtctime tweaks # # - if alarm operations are NULL, don't allow alarm ioctls to succeed. # - if ops->ioctl is NULL, don't try to call NULL function. # - only display the alarm times in /proc/rtc if we successfully read # the alarm time. # # arch/arm/common/rtctime.c # 2004/11/09 18:05:41+00:00 rmk@flint.arm.linux.org.uk +66 -47 # If alarm operations are NULL, return -EINVAL. # If ops->ioctl is NULL, don't try to call NULL function. # Only display the alarm times in /proc/rtc if we successfully read # the alarm time. # # ChangeSet # 2004/11/09 17:51:56+00:00 icampbell@com.rmk.(none) # [ARM PATCH] 2219/2: Ignore IRQ_NONE for edge triggered interrupts # # Patch from Ian Campbell # # As discussed on the ARM Linux kernel mailing list. With edge triggered interrupts it is impossible to avoid spurious interrupts and so it makes sense to just ignore IRQ_NONE return values in this case. # # Signed-off-by: Ian Campbell # Signed-off-by: Russell King # # arch/arm/kernel/irq.c # 2004/11/09 17:36:14+00:00 icampbell@com.rmk.(none) +1 -4 # [PATCH] 2219/2: Ignore IRQ_NONE for edge triggered interrupts # # ChangeSet # 2004/11/09 17:35:11+00:00 aia21@cantab.net # NTFS: Disable the file size changing code from # fs/ntfs/aops.c::ntfs_prepare_write() for now as it is not safe. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/aops.c # 2004/11/09 17:35:02+00:00 aia21@cantab.net +6 -0 # Disable the file size changing code from ntfs_prepare_write() for now as # it is not safe. # # fs/ntfs/ChangeLog # 2004/11/09 17:35:02+00:00 aia21@cantab.net +0 -5 # Update # # ChangeSet # 2004/11/09 17:10:24+00:00 aia21@cantab.net # NTFS: - Fix creation of buffers in fs/ntfs/mft.c::ntfs_sync_mft_mirror(). # Cannot just call fs/ntfs/aops.c::mark_ntfs_record_dirty() since # this also marks the page dirty so we create the buffers by hand # and set them uptodate. # - Revert the removal of the page uptodate check from # fs/ntfs/aops.c::mark_ntfs_record_dirty() as it is no longer called # from fs/ntfs/mft.c::ntfs_sync_mft_mirror(). # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/mft.c # 2004/11/09 17:10:16+00:00 aia21@cantab.net +14 -6 # Fix creation of buffers in ntfs_sync_mft_mirror(). Cannot just call # mark_ntfs_record_dirty() since this also marks the page dirty so we # create the buffers by hand and set them uptodate. # # fs/ntfs/aops.c # 2004/11/09 17:10:16+00:00 aia21@cantab.net +7 -0 # - Add note to ntfs_write_mst_block(). # - Add back the check for page uptodate in mark_ntfs_record_dirty() since # it is no longer called from ntfs_sync_mft_mirror(). # # fs/ntfs/ChangeLog # 2004/11/09 17:10:15+00:00 aia21@cantab.net +0 -3 # Update # # ChangeSet # 2004/11/09 10:42:14+00:00 aia21@cantab.net # NTFS: - Add mapping of unmapped buffers to all remaining code paths, i.e. # fs/ntfs/aops.c::ntfs_write_mst_block(), mft.c::ntfs_sync_mft_mirror(), # and write_mft_record_nolock(). From now on we require that the # complete runlist for the mft mirror is always mapped into memory. # - Add creation of buffers to fs/ntfs/mft.c::ntfs_sync_mft_mirror(). # - Do not check for the page being uptodate in mark_ntfs_record_dirty() # as we now call this after marking the page not uptodate during mft # mirror synchronisation (fs/ntfs/mft.c::ntfs_sync_mft_mirror()). # - Improve error handling in fs/ntfs/aops.c::ntfs_{read,write}_block(). # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/super.c # 2004/11/09 10:42:05+00:00 aia21@cantab.net +4 -0 # Update comment for check_mft_mirror(). # # fs/ntfs/mft.c # 2004/11/09 10:42:05+00:00 aia21@cantab.net +114 -30 # - Add mapping of unmapped buffers to ntfs_sync_mft_mirror() and # write_mft_record_nolock(). From now on we require that the complete # runlist for the mft mirror is always mapped into memory. # - Add creation of buffers to ntfs_sync_mft_mirror(). # # fs/ntfs/inode.c # 2004/11/09 10:42:05+00:00 aia21@cantab.net +2 -1 # Set NVolErrors() in error code path of ntfs_write_inode(). # # fs/ntfs/aops.c # 2004/11/09 10:42:05+00:00 aia21@cantab.net +180 -72 # - Add mapping of unmapped buffers to ntfs_write_mst_block(). # - Improve error handling in ntfs_{read,write}_block(). # - Do not check for the page being uptodate in mark_ntfs_record_dirty() # as we now call this after marking the page not uptodate during mft # mirror synchronisation. # # fs/ntfs/ChangeLog # 2004/11/09 10:42:04+00:00 aia21@cantab.net +9 -0 # Update # # ChangeSet # 2004/11/09 10:06:20+00:00 dave.jiang@com.rmk.(none) # [ARM PATCH] 2216/1: Update iop3xx timers to new update process times scheme # # Patch from Dave Jiang # # Updates the timer irqs to call the new update process time scheme # # Signed-off-by: Dave Jiang # Signed-off-by: Russell King # # arch/arm/mach-iop3xx/iop331-time.c # 2004/11/08 22:51:33+00:00 dave.jiang@com.rmk.(none) +3 -0 # [PATCH] 2216/1: Update iop3xx timers to new update process times scheme # # arch/arm/mach-iop3xx/iop321-time.c # 2004/11/08 22:51:46+00:00 dave.jiang@com.rmk.(none) +3 -0 # [PATCH] 2216/1: Update iop3xx timers to new update process times scheme # # arch/arm/mach-iop3xx/iop321-setup.c # 2004/11/08 22:52:12+00:00 dave.jiang@com.rmk.(none) +2 -2 # [PATCH] 2216/1: Update iop3xx timers to new update process times scheme # # ChangeSet # 2004/11/09 10:01:11+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2215/1: S3C2410 - i2c registers for s3c2440a # # Patch from Ben Dooks # # Added S3C2440_IICLC register definitions # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-iic.h # 2004/11/08 09:52:02+00:00 ben-linux@org.rmk.(none) +10 -0 # [PATCH] 2215/1: S3C2410 - i2c registers for s3c2440a # # ChangeSet # 2004/11/09 09:55:47+00:00 davis_g@com.rmk.(none) # [ARM PATCH] 2182/1: apcs-32 and alignment-traps command line options are deprecated in gcc-4.0 # # Patch from George G. Davis # # Recent gcc-4.0 and gcc-csl-arm-branch tool chains no longer include support # for apcs-32 and alignment-traps command line options. This patch tests # for presence of these deprecated c/l options and uses new gcc-4.0 c/l # options instead if they are not supported by the current toolchain. # # Signed-off-by: George G. Davis # Signed-off-by: Russell King # # arch/arm/Makefile # 2004/11/09 00:00:00+00:00 davis_g@com.rmk.(none) +3 -2 # [PATCH] 2182/1: apcs-32 and alignment-traps command line options are deprecated in gcc-4.0 # # ChangeSet # 2004/11/09 01:26:16-05:00 len.brown@intel.com # [ACPI] ibm ACPI 0.8 by Chris Wright and Borislav Deianov # # Signed-off-by: Len Brown # # drivers/acpi/ibm_acpi.c # 2004/11/08 20:11:27-05:00 len.brown@intel.com +29 -35 # Import patch ibm-acpi-0.8.patch # # Documentation/ibm-acpi.txt # 2004/11/08 20:11:50-05:00 len.brown@intel.com +2 -2 # Import patch ibm-acpi-0.8.patch # # ChangeSet # 2004/11/09 00:04:39-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-ref # into intel.com:/home/lenb/src/26-latest-dev # # arch/i386/kernel/process.c # 2004/11/09 00:04:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/08 19:52:15-08:00 ncunningham@linuxmail.org # [PATCH] Fix dm_io.c oops in low memory conditions. # # If you call drivers/md/dm-io.c:resize_pool on an empty pool and # mempool_create is unable to make the pool, the condition is not handled # correctly, resulting in an oops in mempool_destroy. # # Trivial fix. # # drivers/md/dm-io.c # 2004/11/08 18:34:36-08:00 ncunningham@linuxmail.org +1 -1 # Fix dm_io.c oops in low memory conditions. # # ChangeSet # 2004/11/08 19:09:28-08:00 prasanna@in.ibm.com # [PATCH] kprobes: Minor changes for sparc64 # # Minor changes required to port kprobes for sparc64. # # - arch_prepare_kprobe() returns an integer. # # - added arch_remove_kprobe(). # # - changes to access copy of original instruction, since kprobe_opcode_t # insn[MAX_INSN_SIZE] is moved from struct kprobe to a struct # arch_specific_insn. # # Signed-off-by: Prasanna S Panchamukhi # Cc: "David S. Miller" # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-sparc64/kprobes.h # 2004/11/08 08:31:11-08:00 prasanna@in.ibm.com +6 -0 # kprobes: Minor changes for sparc64 # # arch/sparc64/kernel/kprobes.c # 2004/11/08 08:31:11-08:00 prasanna@in.ibm.com +17 -12 # kprobes: Minor changes for sparc64 # # ChangeSet # 2004/11/08 17:12:54-08:00 torvalds@ppc970.osdl.org # wait_task_stopped() must not just return 0 when it has # released the tasklist_lock. # # Since it released the lock, the process lists may not # be valid any more, and we must repeat the loop rather than # continue with the next parent. # # Use -EAGAIN to show this condition (separate from the # normal -EFAULT that may happen if rusage information could # not be copied to user space). # # kernel/exit.c # 2004/11/08 17:12:47-08:00 torvalds@ppc970.osdl.org +11 -2 # wait_task_stopped() must not just return 0 when it has # released the tasklist_lock. # # Since it released the lock, the process lists may not # be valid any more, and we must repeat the loop rather than # continue with the next parent. # # Use -EAGAIN to show this condition (separate from the # normal -EFAULT that may happen if rusage information could # not be copied to user space). # # ChangeSet # 2004/11/08 16:49:57-08:00 greg@kroah.com # Merge kroah.com:/home/greg/linux/BK/bleed-2.6 # into kroah.com:/home/greg/linux/BK/i2c-2.6 # # drivers/i2c/busses/Kconfig # 2004/11/08 16:49:49-08:00 greg@kroah.com +0 -0 # Auto merged # # ChangeSet # 2004/11/08 16:46:18-08:00 khali@linux-fr.org # [PATCH] I2C: add Tyan S4882 driver # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/i2c-amd756-s4882.c # 2004/11/06 11:42:55-08:00 khali@linux-fr.org +261 -0 # I2C: add Tyan S4882 driver # # drivers/i2c/busses/i2c-amd756.c # 2004/11/04 10:58:25-08:00 khali@linux-fr.org +7 -5 # I2C: add Tyan S4882 driver # # drivers/i2c/busses/i2c-amd756-s4882.c # 2004/11/06 11:42:55-08:00 khali@linux-fr.org +0 -0 # BitKeeper file /home/greg/linux/BK/i2c-2.6/drivers/i2c/busses/i2c-amd756-s4882.c # # drivers/i2c/busses/Makefile # 2004/11/04 10:57:31-08:00 khali@linux-fr.org +1 -0 # I2C: add Tyan S4882 driver # # drivers/i2c/busses/Kconfig # 2004/11/04 11:47:38-08:00 khali@linux-fr.org +13 -0 # I2C: add Tyan S4882 driver # # ChangeSet # 2004/11/08 16:45:59-08:00 ben-linux@fluff.org # [PATCH] S3C2410 i2c updates # # This patch integrates several fixes to the s3c2410 i2c # driver # # Shannon Holland: # # - write IICCON in configuration code # - add handling for s3c2410 i2c errata # - fix clock rate divisor calculation # # Ben Dooks: # # - s3c2440 detection # - s3c2440 IICLC register setup # - add __exit to the module exit # - remove return from exit code # # Signed-off-by: Ben Dooks # Signed-off-by: Shannon Holland # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/i2c-s3c2410.c # 2004/11/08 02:33:46-08:00 ben-linux@fluff.org +59 -9 # S3C2410 i2c updates # # ChangeSet # 2004/11/08 16:45:39-08:00 bunk@stusta.de # [PATCH] i2c/busses/ : make some code static # # The patch below makes some needlessly global code under i2c/busses/ # static. # # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/scx200_i2c.c # 2004/11/06 17:50:30-08:00 bunk@stusta.de +2 -2 # i2c/busses/ : make some code static # # drivers/i2c/busses/scx200_acb.c # 2004/11/06 17:49:53-08:00 bunk@stusta.de +2 -2 # i2c/busses/ : make some code static # # drivers/i2c/busses/i2c-amd8111.c # 2004/11/06 17:48:34-08:00 bunk@stusta.de +6 -6 # i2c/busses/ : make some code static # # drivers/i2c/busses/i2c-ali1535.c # 2004/11/06 17:47:15-08:00 bunk@stusta.de +2 -2 # i2c/busses/ : make some code static # # ChangeSet # 2004/11/08 16:45:21-08:00 khali@linux-fr.org # [PATCH] I2C: Check for unregistered adapter in i2c_del_adapter # # The patch adds a check at the beginning of i2c_del_adapter in case # someone attempts to remove an adapter that was never added in the first # place. This sounds like a good safety, as doing so will lead to an oops # at the moment. Also, I have a need for it in the latest version of my # i2c-amd756-s4882 patch. I need to remove the original adapter and # install the virtual ones instead, but I have no way to know if the # original adapter was succesfully added beforehand or not. # # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/i2c-core.c # 2004/11/05 11:49:20-08:00 khali@linux-fr.org +13 -0 # I2C: Check for unregistered adapter in i2c_del_adapter # # ChangeSet # 2004/11/08 16:45:03-08:00 jthiessen@penguincomputing.com # [PATCH] I2C: fix lm85.c build warnings # # Signed-off-by: Justin Thiessen # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm85.c # 2004/11/04 20:25:25-08:00 jthiessen@penguincomputing.com +0 -32 # I2C: fix lm85.c build warnings # # ChangeSet # 2004/11/08 16:38:32-08:00 greg@kroah.com # I2C: delete normal_i2c_range logic from sensors as there are no more users. # # include/linux/i2c-sensor.h # 2004/11/08 16:38:18-08:00 greg@kroah.com +0 -6 # I2C: delete normal_i2c_range logic from sensors as there are no more users. # # drivers/i2c/i2c-sensor-detect.c # 2004/11/08 16:38:18-08:00 greg@kroah.com +1 -11 # I2C: delete normal_i2c_range logic from sensors as there are no more users. # # ChangeSet # 2004/11/08 16:37:43-08:00 greg@kroah.com # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83l785ts.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +0 -1 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83781d.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +3 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83627hf.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +0 -1 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/via686a.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +0 -1 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/smsc47m1.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +0 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/rtc8564.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +0 -3 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/pcf8591.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +2 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/pcf8574.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +3 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/pc87360.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +0 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/max1619.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +4 -3 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm90.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +0 -1 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm87.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +1 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm85.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +0 -1 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm83.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +4 -3 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm80.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +2 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm78.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +4 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm77.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +1 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm75.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +2 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm63.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +0 -1 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/it87.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +4 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/gl518sm.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +0 -1 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/fscher.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +0 -1 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/eeprom.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +2 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/ds1621.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +2 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/asb100.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +2 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/adm1031.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +1 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/adm1025.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +1 -2 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/adm1021.c # 2004/11/08 16:37:27-08:00 greg@kroah.com +4 -4 # I2C: moved from all sensor drivers from normal_i2c_range to normal_i2c # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/08 16:36:33-08:00 greg@kroah.com # I2C: fix i2c_detect to allow NULL fields in adapter address structure. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/i2c-sensor-detect.c # 2004/11/08 16:36:17-08:00 greg@kroah.com +36 -16 # I2C: fix i2c_detect to allow NULL fields in adapter address structure. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/08 16:35:21-08:00 greg@kroah.com # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c-sensor.h # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -8 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/i2c-sensor-detect.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -8 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83l785ts.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83781d.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83627hf.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/via686a.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/smsc47m1.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -2 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/pcf8591.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/pcf8574.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/pc87360.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -2 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/max1619.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm90.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm87.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm85.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm83.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm80.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm78.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm77.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm75.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm63.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/it87.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/gl518sm.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/fscher.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/eeprom.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/ds1621.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/asb100.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/adm1031.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/adm1025.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/adm1021.c # 2004/11/08 16:35:04-08:00 greg@kroah.com +0 -1 # I2C: remove normal_isa_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/08 16:34:36-08:00 greg@kroah.com # I2C: remove ignore_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c-sensor.h # 2004/11/08 16:34:22-08:00 greg@kroah.com +0 -11 # I2C: remove ignore_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/i2c-sensor-detect.c # 2004/11/08 16:34:22-08:00 greg@kroah.com +0 -10 # I2C: remove ignore_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/smsc47m1.c # 2004/11/08 16:34:22-08:00 greg@kroah.com +0 -2 # I2C: remove ignore_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/pc87360.c # 2004/11/08 16:34:22-08:00 greg@kroah.com +0 -2 # I2C: remove ignore_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/08 16:33:52-08:00 greg@kroah.com # I2C: remove probe_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c-sensor.h # 2004/11/08 16:33:32-08:00 greg@kroah.com +0 -11 # I2C: remove probe_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/i2c-sensor-detect.c # 2004/11/08 16:33:32-08:00 greg@kroah.com +0 -9 # I2C: remove probe_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/smsc47m1.c # 2004/11/08 16:33:32-08:00 greg@kroah.com +0 -2 # I2C: remove probe_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/pc87360.c # 2004/11/08 16:33:32-08:00 greg@kroah.com +0 -2 # I2C: remove probe_range from I2C sensor drivers, as it's not used. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/08 14:45:49-08:00 torvalds@ppc970.osdl.org # Merge bk://linux-sam.bkbits.net/kbuild # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # arch/i386/kernel/traps.c # 2004/11/08 14:45:45-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # arch/arm/Makefile # 2004/11/08 14:45:45-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/11/08 14:22:09-08:00 adaplas@hotpop.com # [PATCH] rivafb: big-endian IO access fixes # # In big endian machines, the read*/write* accessors do a byteswap for an # inherently little endian PCI bus. However, rivafb puts the hardwire in big # endian register access, thus the byteswap is not needed. So for 16- and # 32-bit access, instead of read*/write*, use __raw_read*/__raw_write* for all # archs. # # Signed-off-by: Antonino Daplas # Signed-off-by: Linus Torvalds # # drivers/video/riva/riva_hw.h # 2004/11/08 14:00:09-08:00 adaplas@hotpop.com +8 -11 # rivafb: big-endian IO access fixes # # ChangeSet # 2004/11/08 15:19:37-05:00 len.brown@intel.com # Merge # # include/asm-x86_64/processor.h # 2004/11/08 15:19:35-05:00 len.brown@intel.com +0 -0 # SCCS merged # # Documentation/kernel-parameters.txt # 2004/11/08 12:25:03-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/08 15:30:20+01:00 marcel@holtmann.org # [Bluetooth] Some trivial s/int/unsigned int/ # # In http://janitor.kernelnewbies.org/TODO, Jeff Garzik states: # # "unsigned int" is preferred to "int", it generates better asm code # on all platforms except sh5. # # Signed-off-by: Carlo Perassi # Signed-off-by: Marcel Holtmann # # net/bluetooth/hci_sysfs.c # 2004/11/08 15:28:26+01:00 marcel@holtmann.org +2 -1 # Some trivial s/int/unsigned int/ # # net/bluetooth/lib.c # 2004/11/08 15:28:03+01:00 marcel@holtmann.org +3 -3 # Some trivial s/int/unsigned int/ # # ChangeSet # 2004/11/07 20:36:41-08:00 torvalds@ppc970.osdl.org # fbdev: fix compile of rivafb on __BIG_ENDIAN # # Typo introduced by latest cleanups by Antonino # # drivers/video/riva/riva_hw.c # 2004/11/07 20:35:45-08:00 torvalds@ppc970.osdl.org +1 -1 # fbdev: fix compile of rivafb on __BIG_ENDIAN # # Typo introduced by latest cleanups by Antonino # # ChangeSet # 2004/11/07 20:12:12-08:00 dtor_core@ameritech.net # [PATCH] panic_blink and i8042 unloading # # At unload i8042 sets panic_blink to 0. This will cause problems if kernel # panics later as it will just use it assuming that the pointer is correct. # # Signed-off-by: Dmitry Torokhov # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/panic.c # 2004/11/07 18:16:06-08:00 dtor_core@ameritech.net +5 -2 # panic_blink and i8042 unloading # # ChangeSet # 2004/11/07 20:11:59-08:00 Andries.Brouwer@cwi.nl # [PATCH] minix_clear_inode fix # # The patch below fixes two flaws in minix_clear_inode. # # The first is that it tests bh which is never initialized. (&bh is a # parameter of minix_V1_raw_inode, but that routine can fail and return # before it has set bh) # # The second is that generic_delete_inode() goes BUG() in case inode->i_state # != I_CLEAR. Clearly, it is expected that inode->i_sb->s_op->delete_inode # does a clear_inode() at some point. But minix_delete_inode() calls # minix_free_inode() and that routine can print an error and return early, # before calling clear_inode(). # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/minix/bitmap.c # 2004/11/07 18:16:06-08:00 Andries.Brouwer@cwi.nl +13 -10 # minix_clear_inode fix # # ChangeSet # 2004/11/07 20:11:47-08:00 petero2@telia.com # [PATCH] fix bttv oops in btcx_riscmem_free # # Signed-off-by: Peter Osterlund # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/video-buf.c # 2004/11/07 18:16:06-08:00 petero2@telia.com +1 -1 # fix bttv oops in btcx_riscmem_free # # ChangeSet # 2004/11/07 20:11:34-08:00 vandrove@vc.cvut.cz # [PATCH] Add argument-less ppdev ioctls to compat_ioctl.h # # ppdev's ioctls are not available for 32bit apps on 64bit systems. There # are four ioctls which take no argument at all (so they are compatible # between 32bit and 64bit), these numbers do not clash with any other ioctl # code, and so I see no reason why not applying patch below. # # It solves problem VMware users are faced on 64bit systems if they want to # use direct access to the parallel port. # # Signed-off-by: Petr Vandrovec # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/compat_ioctl.h # 2004/11/07 18:16:06-08:00 vandrove@vc.cvut.cz +5 -0 # Add argument-less ppdev ioctls to compat_ioctl.h # # fs/compat_ioctl.c # 2004/11/07 18:16:06-08:00 vandrove@vc.cvut.cz +1 -0 # Add argument-less ppdev ioctls to compat_ioctl.h # # ChangeSet # 2004/11/07 20:11:22-08:00 paulus@samba.org # [PATCH] Check character flags in ppp_async ldisc # # Although it was checking the per-character error flags supplied by the # driver for ordinary characters, the ppp_async line discipline code wasn't # checking the flags for special characters, such as the flag and escape # characters (~ and }). This patch adds that check. # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/ppp_async.c # 2004/11/07 18:16:06-08:00 paulus@samba.org +3 -1 # Check character flags in ppp_async ldisc # # ChangeSet # 2004/11/07 20:11:09-08:00 olh@suse.de # [PATCH] fix initcall_debug on ppc64/ia64 # # ia64 and ppc64 have function descriptors. Booting with initcall_debug will # print the descriptor address, not the address and name of the actual # function. Another indirection is required. # # Tested on ppc, ppc64 and ia64. # # Signed-off-by: Olaf Hering # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/main.c # 2004/11/07 18:16:06-08:00 olh@suse.de +1 -1 # fix initcall_debug on ppc64/ia64 # # include/linux/kallsyms.h # 2004/11/07 18:16:06-08:00 olh@suse.de +10 -0 # fix initcall_debug on ppc64/ia64 # # ChangeSet # 2004/11/07 20:10:57-08:00 apw@shadowen.org # [PATCH] fix pnpbios fault message # # When your plug-n-play BIOS is truly broken and generates a fault during # use, we report this and suggest disabling it. The message produced # suggests using "nobiospnp" to achive this, the correct option is # "pnpbios=off". This patch upates the message. # # Signed-off-by: Andy Whitcroft # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/pnp/pnpbios/bioscalls.c # 2004/11/07 18:16:06-08:00 apw@shadowen.org +1 -1 # fix pnpbios fault message # # ChangeSet # 2004/11/07 20:10:44-08:00 trini@kernel.crashing.org # [PATCH] Add __KERNEL__ to # # The following adds a __KERNEL__ check to . The problem # is that the ppp package includes via , # which in turn gets . # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/crc-ccitt.h # 2004/11/07 18:16:05-08:00 trini@kernel.crashing.org +2 -0 # Add __KERNEL__ to # # ChangeSet # 2004/11/07 20:10:32-08:00 marcel@holtmann.org # [PATCH] Use add_hotplug_env_var() in firmware loader # # The add_hotplug_env_var() function is available and so use it in the # firmware class code. # # Signed-off-by: Marcel Holtmann # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/base/firmware_class.c # 2004/11/07 18:16:05-08:00 marcel@holtmann.org +5 -7 # Use add_hotplug_env_var() in firmware loader # # ChangeSet # 2004/11/07 20:10:19-08:00 trini@kernel.crashing.org # [PATCH] Fix building of samba userland # # After 2.6.8.1, samba userland would no longer build with current # kernel headers, as it needs some of the samba kernel headers to work, # yet they included outside of __KERNEL__. # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/smb_fs.h # 2004/11/07 18:16:05-08:00 trini@kernel.crashing.org +1 -1 # Fix building of samba userland # # ChangeSet # 2004/11/07 20:10:07-08:00 james4765@gmail.com # [PATCH] ramdisk: Correction to Documentation/kernel-parameters.txt # # Remove deleted module option in Documentation/kernel-parameters.txt # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/kernel-parameters.txt # 2004/11/07 18:16:05-08:00 james4765@gmail.com +0 -4 # ramdisk: Correction to Documentation/kernel-parameters.txt # # ChangeSet # 2004/11/07 20:09:54-08:00 james4765@gmail.com # [PATCH] tipar: Documentation/tipar.txt cleanup # # Minor cleanup of Documentation/tipar.txt. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/tipar.txt # 2004/11/07 18:16:05-08:00 james4765@gmail.com +13 -13 # tipar: Documentation/tipar.txt cleanup # # ChangeSet # 2004/11/07 20:09:41-08:00 james4765@verizon.net # [PATCH] documentation: Remove drivers/char/README.scc # # Remove unneeded file in drivers/char. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-README.scc~1914ecfad1e32fff # 2004/11/07 20:09:35-08:00 james4765@verizon.net +0 -0 # Delete: drivers/char/README.scc # # ChangeSet # 2004/11/07 20:09:29-08:00 james4765@verizon.net # [PATCH] documentation: Remove drivers/char/README.ecpa # # Remove unneeded file from drivers/char. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-README.epca~3c34b0c372f7b277 # 2004/11/07 20:09:22-08:00 james4765@verizon.net +0 -0 # Delete: drivers/char/README.epca # # ChangeSet # 2004/11/07 20:09:17-08:00 james4765@verizon.net # [PATCH] documentation: Remove drivers/char/README.cyclomY # # Remove obsolete file from drivers/char. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-README.cyclomY~9afe22eedca1c15 # 2004/11/07 20:09:10-08:00 james4765@verizon.net +0 -0 # Delete: drivers/char/README.cyclomY # # ChangeSet # 2004/11/07 20:09:04-08:00 james4765@verizon.net # [PATCH] documentation: Remove drivers/char/README.computone # # Remove deprecated file in drivers/char. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-README.computone~f42427fda860482b # 2004/11/07 20:08:57-08:00 james4765@verizon.net +0 -0 # Delete: drivers/char/README.computone # # ChangeSet # 2004/11/07 20:08:52-08:00 kas@fi.muni.cz # [PATCH] Minor fix of RCU documentation # # The attached patch fixes an incorrect example in Documentation/RCU/listRCU.txt # - the "original" lock-based code should not call RCU functions, of course. # # Signed-Off-By: Jan "Yenya" Kasprzak # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/RCU/listRCU.txt # 2004/11/07 18:16:04-08:00 kas@fi.muni.cz +1 -1 # Minor fix of RCU documentation # # ChangeSet # 2004/11/07 20:08:39-08:00 hch@lst.de # [PATCH] unexport do_settimeofday # # Signed-off-by: Christoph Hellwig # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/time.c # 2004/11/07 18:16:04-08:00 hch@lst.de +0 -2 # unexport do_settimeofday # # ChangeSet # 2004/11/07 20:08:26-08:00 hch@lst.de # [PATCH] remove dead exports from random.c # # Signed-off-by: Christoph Hellwig # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/random.h # 2004/11/07 18:16:04-08:00 hch@lst.de +0 -2 # remove dead exports from random.c # # drivers/char/random.c # 2004/11/07 18:16:04-08:00 hch@lst.de +1 -7 # remove dead exports from random.c # # ChangeSet # 2004/11/07 20:08:14-08:00 hch@lst.de # [PATCH] remove dead kernel_map_pages export # # Signed-off-by: Christoph Hellwig # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/mm/pageattr.c # 2004/11/07 18:16:03-08:00 hch@lst.de +0 -1 # remove dead kernel_map_pages export # # ChangeSet # 2004/11/07 20:08:01-08:00 akpm@osdl.org # [PATCH] Fix ext3_dx_readdir # # When there are more than one entry in fname linked list, the current # implementation of ext3_dx_readdir() can not traverse all entries correctly # in the case that call_filldir() fails. # # If we use system call readdir() to read entries in a directory which # happens that "." and ".." in the same fname linked list. Each time we call # readdir(), it will return the "." entry and never returns 0 which indicates # that all entries are read. # # Although chances that more than one entry are in one fname linked list are # very slim, it does exist. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/ext3/dir.c # 2004/11/07 18:16:03-08:00 akpm@osdl.org +8 -5 # Fix ext3_dx_readdir # # ChangeSet # 2004/11/07 20:07:49-08:00 janitor@sternwelten.at # [PATCH] VFS maintainer email address updates # # viro has moved. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/sysv/ChangeLog # 2004/11/07 18:16:03-08:00 janitor@sternwelten.at +6 -6 # VFS maintainer email address updates # # fs/sysv/CHANGES # 2004/11/07 18:16:03-08:00 janitor@sternwelten.at +1 -1 # VFS maintainer email address updates # # fs/ext2/namei.c # 2004/11/07 18:16:03-08:00 janitor@sternwelten.at +2 -1 # VFS maintainer email address updates # # MAINTAINERS # 2004/11/07 18:16:04-08:00 janitor@sternwelten.at +1 -1 # VFS maintainer email address updates # # Documentation/filesystems/devfs/ChangeLog # 2004/11/07 18:16:04-08:00 janitor@sternwelten.at +1 -1 # VFS maintainer email address updates # # Documentation/DocBook/procfs-guide.tmpl # 2004/11/07 18:16:04-08:00 janitor@sternwelten.at +2 -2 # VFS maintainer email address updates # # ChangeSet # 2004/11/07 20:07:36-08:00 prasanna@in.ibm.com # [PATCH] kprobes: kprobes ported to x86_64 # # Adopted from i386 architecture. # # Kprobes: # # Helps developers to trap at almost any kernel code address, specifying a # handler routine to be invoked when the breakpoint is hit. Useful for # analysing the Linux kernel by collecting debugging information # non-disruptively. Employs single-stepping out-of-line to avoid probe # misses on SMP and may be especially useful in aiding debugging elusive # races and problems on live systems. More elaborate dynamic tracing tools # can be built over the kprobes interface. # # Sample usage: # To place a probe on __blockdev_direct_IO: # static int probe_handler(struct kprobe *p, struct pt_regs *) # { # ... whatever ... # } # struct kprobe kp = { # .addr = __blockdev_direct_IO, # .pre_handler = probe_handler # }; # register_kprobe(&kp); # # Jprobes: # # A special kprobe type which can be placed on function entry points, and # employs a simple mirroring principle to allow seamless access to the # arguments of a function being probed. The probe handler routine should # have the same prototype as the function being probed. # # The way it works is that when the probe is hit, the breakpoint handler # simply irets to the probe handler's rip while retaining register and stack # state corresponding to the function entry. After it is done, the probe # handler calls jprobe_return() which traps again to restore processor state # and switch back to the probed function. Linus noted correctly at KS that # we need to be careful as gcc assumes that the callee owns arguments. We # save and restore enough stack bytes to cover argument space. # # Sample Usage: # static int jip_queue_xmit(struct sk_buff *skb, int ipfragok) # { # ... whatever ... # jprobe_return(); # return 0; # } # # struct jprobe jp = { # {.addr = (kprobe_opcode_t *) ip_queue_xmit}, # .entry = (kprobe_opcode_t *) jip_queue_xmit # }; # register_jprobe(&jp); # # Signed-off-by: Prasanna S Panchamukhi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/kprobes.h # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +61 -0 # kprobes: kprobes ported to x86_64 # # arch/x86_64/kernel/kprobes.c # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +481 -0 # kprobes: kprobes ported to x86_64 # # include/asm-x86_64/kprobes.h # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-x86_64/kprobes.h # # include/asm-x86_64/kdebug.h # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +2 -1 # kprobes: kprobes ported to x86_64 # # arch/x86_64/mm/fault.c # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +5 -0 # kprobes: kprobes ported to x86_64 # # arch/x86_64/kernel/x8664_ksyms.c # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +2 -0 # kprobes: kprobes ported to x86_64 # # arch/x86_64/kernel/traps.c # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +27 -3 # kprobes: kprobes ported to x86_64 # # arch/x86_64/kernel/kprobes.c # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/x86_64/kernel/kprobes.c # # arch/x86_64/kernel/Makefile # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +1 -0 # kprobes: kprobes ported to x86_64 # # arch/x86_64/Kconfig.debug # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +10 -0 # kprobes: kprobes ported to x86_64 # # ChangeSet # 2004/11/07 20:07:23-08:00 prasanna@in.ibm.com # [PATCH] kprobes: Minor i386 changes required for porting kprobes to x86_64 # # - Kprobes structure has been modified to support copying of original # instruction as required by the architecture. On x86_64 normal pages we # get from kmalloc or vmalloc are not executable. Single-stepping an # instruction on such a page yields an oops. So instead of storing the # instruction copies in their respective kprobe objects, we allocate a # page, map it executable, and store all the instruction copies there and # store the pointer of the copied instruction in the specific kprobes # object. # # - jprobe_return_end is moved into inline assembly to avoid compiler # optimization. # # - arch_prepare_kprobe() now returns an integer,since # arch_prepare_kprobe() might fail on other architectures. # # - added arch_remove_kprobe() routine, since other architectures requires # it. # # Signed-off-by: Prasanna S Panchamukhi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/kprobes.c # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +5 -1 # kprobes: Minor i386 changes required for porting kprobes to x86_64 # # include/linux/kprobes.h # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +3 -2 # kprobes: Minor i386 changes required for porting kprobes to x86_64 # # include/asm-i386/kprobes.h # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +7 -0 # kprobes: Minor i386 changes required for porting kprobes to x86_64 # # arch/i386/kernel/kprobes.c # 2004/11/07 18:14:44-08:00 prasanna@in.ibm.com +19 -13 # kprobes: Minor i386 changes required for porting kprobes to x86_64 # # ChangeSet # 2004/11/07 20:07:11-08:00 arjan@infradead.org # [PATCH] remove unused lookup_mnt export # # lookup_mnt() is entirely unused outside of deep vfs internals, remove the # export since it's quite a low level interface anyway # # Signed-off-by: Arjan van de Ven # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/namespace.c # 2004/11/07 18:14:44-08:00 arjan@infradead.org +0 -2 # remove unused lookup_mnt export # # ChangeSet # 2004/11/07 20:06:58-08:00 Markus.Lidel@shadowconnect.com # [PATCH] fix bug in i2o_iop_systab_set where address is used instead of length # # - Fixed bug in i2o_iop_systab_set where address is used instead of length # # Signed-off-by: Markus Lidel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/message/i2o/iop.c # 2004/11/07 18:14:01-08:00 Markus.Lidel@shadowconnect.com +1 -1 # fix bug in i2o_iop_systab_set where address is used instead of length # # ChangeSet # 2004/11/07 20:06:45-08:00 mru@inprovide.com # [PATCH] SysRq-n changes RT tasks to normal # # Teach sysrq-N to switch all rt-policy tasks to SCHED_OTHER. For recovering # from (and diagnosing) userspace bugs. # # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/11/07 18:13:54-08:00 mru@inprovide.com +32 -0 # SysRq-n changes RT tasks to normal # # include/linux/sched.h # 2004/11/07 18:13:55-08:00 mru@inprovide.com +6 -0 # SysRq-n changes RT tasks to normal # # drivers/char/sysrq.c # 2004/11/07 18:13:54-08:00 mru@inprovide.com +11 -1 # SysRq-n changes RT tasks to normal # # ChangeSet # 2004/11/07 20:06:32-08:00 jbaron@redhat.com # [PATCH] fix alt-sysrq deadlock # # The sysrq code is taking a spinlock from both interrupt and process context # in an unsafe and deadlocky manner. # # Move all those inlined functions out of sysrq.h, into sysrq.c then withdraw # all those exported-to-modules helper functions then remove # __sysrq_trylock_table() altogether and then use spin_lock_irqsave() in the # appropriate places. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/sysrq.h # 2004/11/07 18:13:49-08:00 jbaron@redhat.com +2 -43 # fix alt-sysrq deadlock # # drivers/char/sysrq.c # 2004/11/07 19:10:07-08:00 jbaron@redhat.com +33 -14 # fix alt-sysrq deadlock # # ChangeSet # 2004/11/07 20:06:20-08:00 sonic_amiga@rambler.ru # [PATCH] VIA8231 support for parallel port driver # # This patch allows the kernel to configure port's mode without help of BIOS. # It is needed on my machine because its firmware simply ignores the # parallel port leaving in unidirectional SPP mode. # # Notes on usage: # # To configure the port you need to: # # - if parport_pc driver is compiled as a module: specify parport_pc # init_mode=[spp|ps2|epp|ecp|ecpepp] in /etc/modules file (for Debian # Linux). # # - if the driver is linked statically with the kernel: specify # parport_init_mode=[spp|ps2|epp|ecp|ecpepp] in kernel's arguments. # # This patch is intended for use primarily on Pegasos machines but it will # work on any computer with VIA8231 south bridge. In this case it will # override BIOS setting if you tell the driver to configure the port. BIOS # setting will be honored if you omit init_mode parameter. Technical # details: # # 1. On Pegasos standard port settings (set by OpenFirmware) are: IRQ=7, # DMA=3, base address=0x3BC, mode is unidirectional SPP. # # 2. The patch changes only port mode, all other settings are preserved. # So if you have a PC with VIA8231 and use driver to configure the port # you'll still be able to change IRQ, DMA and base address in BIOS and # these settings will be kept. # # 3. One exclusion: if you tell the driver to turn on EPP mode (specify # epp or ecpepp value) and if default base address is 0x3BC (this is the # case on Pegasos) the port will be moved to 0x378. EPP port can't have # 0x3BC as the base. # # Known problems: # # 1. ECP+EPP mode is strange, it doesn't work even on several PC's i # tested with Linux. ECP mode is detected and EPP is not. So if you get # the same thing, it's not my fault. I just have no time to deal with # it, current result is enough for me. # # 2. Not all devices work on Pegasos, i tried my Genuis-HR6 parallel # port scanner and parallel ZIP drive and both of them don't work. ZIP # drive is detected properly but then suddenly gets offline. Scanner # does not answer any command at all. Without the patch the same thing # happens. Obviously Pegasos has some more problems which are not # discovered and not fixed yet. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/via.h # 2004/11/07 18:13:27-08:00 sonic_amiga@rambler.ru +22 -0 # VIA8231 support for parallel port driver # # include/linux/parport_pc.h # 2004/11/07 18:13:27-08:00 sonic_amiga@rambler.ru +17 -0 # VIA8231 support for parallel port driver # # drivers/parport/parport_pc.c # 2004/11/07 18:13:35-08:00 sonic_amiga@rambler.ru +180 -66 # VIA8231 support for parallel port driver # # Documentation/kernel-parameters.txt # 2004/11/07 19:10:05-08:00 sonic_amiga@rambler.ru +10 -0 # VIA8231 support for parallel port driver # # include/linux/via.h # 2004/11/07 18:13:27-08:00 sonic_amiga@rambler.ru +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/linux/via.h # # ChangeSet # 2004/11/07 20:06:07-08:00 pluto@pld-linux.org # [PATCH] /proc/kcore - enable/disable. # # The presence of /proc/kcore is supposed to be configurable. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/proc_fs.h # 2004/11/07 18:13:27-08:00 pluto@pld-linux.org +1 -1 # /proc/kcore - enable/disable. # # fs/Kconfig # 2004/11/07 18:13:27-08:00 pluto@pld-linux.org +2 -2 # /proc/kcore - enable/disable. # # ChangeSet # 2004/11/07 20:05:54-08:00 rusty@rustcorp.com.au # [PATCH] Don't ignore try_stop_module return # # Since 2.6.4 we've been ignoring the failure of try_stop_module: it will # normally fail if the module reference count is non-zero. This would have # been mainly unnoticed, since "modprobe -r" checks the usage count before # calling sys_delete_module(), however there is a race which would cause a # hang in this case. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/module.c # 2004/11/07 18:13:26-08:00 rusty@rustcorp.com.au +2 -0 # Don't ignore try_stop_module return # # ChangeSet # 2004/11/07 20:05:42-08:00 adaplas@hotpop.com # [PATCH] fbcon: Another fix for fbcon generic blanking code # # If the driver has no fb_blank hook, then the generic method is to clear the # screen and then disallow writes to the framebuffer. However, if the # console is leaving graphics mode (KD_GRAPHICS), it would update the screen # first, then unblank. However, since writes to the framebuffers are # disallowed, the update failes, and upon unblank, the screen is left empty # except for the flashing cursor. (This happens, for example when switching # from X to console). # # The fix is to allow writes to the framebuffer even if the console is # blanked. To imitate a blank screen, the get_color() function will return # the attributes of the erase character (black on black) if the console is # blanked and if the driver has no fb_blank hook. # # I think this fixes the rest of the major bugs in the blanking code. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/console/fbcon.c # 2004/11/07 18:13:27-08:00 adaplas@hotpop.com +15 -8 # fbcon: Another fix for fbcon generic blanking code # # ChangeSet # 2004/11/07 20:05:29-08:00 sylvain.meyer@worldonline.fr # [PATCH] fbdev: intelfb code cleanup # # - fix problems in the __iomem annotation # - remove builtinmodes.c # - remove INTEL_*_PARAM and use module_param instead # - remove intelfb_find_mode() and associated functions and use generic # fb_find_mode() instead # - trivial documentation fix # # Signed-off-by: Sylvain Meyer # Acked-by: "Antonino A. Daplas" # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/intelfb/intelfbhw.c # 2004/11/07 18:13:26-08:00 sylvain.meyer@worldonline.fr +5 -5 # fbdev: intelfb code cleanup # # drivers/video/intelfb/intelfbdrv.h # 2004/11/07 18:13:26-08:00 sylvain.meyer@worldonline.fr +3 -11 # fbdev: intelfb code cleanup # # drivers/video/intelfb/intelfbdrv.c # 2004/11/07 18:13:26-08:00 sylvain.meyer@worldonline.fr +97 -222 # fbdev: intelfb code cleanup # # drivers/video/intelfb/intelfb.h # 2004/11/07 18:13:26-08:00 sylvain.meyer@worldonline.fr +7 -26 # fbdev: intelfb code cleanup # # BitKeeper/deleted/.del-builtinmodes.c~6e2999e99cf27e35 # 2004/11/07 20:05:22-08:00 sylvain.meyer@worldonline.fr +0 -0 # Delete: drivers/video/intelfb/builtinmodes.c # # ChangeSet # 2004/11/07 20:05:16-08:00 hch@lst.de # [PATCH] remove two leftover files # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-linux_logo.h~6d1a060fc9dcc73 # 2004/11/07 20:05:10-08:00 hch@lst.de +0 -0 # Delete: include/asm-h8300/linux_logo.h # # BitKeeper/deleted/.del-linux_logo.h~1343359c793adc18 # 2004/11/07 20:05:09-08:00 hch@lst.de +0 -0 # Delete: include/asm-arm26/linux_logo.h # # ChangeSet # 2004/11/07 20:05:04-08:00 adaplas@hotpop.com # [PATCH] fbcon: "Do not touch hardware if vc_mode != KD_TEXT: fix # # Sigh, this patch uncovered a can of worms. I tested different combinations, # those with/without xxxfb_blank implementation, framebuffers in directcolor # or truecolor, etc. I find that there is a problem unblanking if the hardware # has no xxxfb_blank() implementation, and also that the generic fb_blank() in # fbmem.c is problematic with drivers in directcolor or pseudocolor mode when # called by an fb application such as X. # # Display blanking is implemented in three ways: # # 1. using the drivers blanking implementation - info->fbops->fb_blank() # 2. clearing the screen with the console erase character - fbcon_blank() # 3. setting the color map to all black - fb_blank() # # The third method is problematic for these reasons: # # - Setting the colormap to all black will not work in truecolor mode # - In directcolor or pseudocolor, it will overwrite the fb application's # color map, producing wrong colors. # # So, remove the generic implementation in fb_blank() and just return -EINVAL # if there is no hardware implementation. This will be only used by apps doing # an FBIO_BLANK ioctl, and is a more robust approach. # # Other changes: # # - Consolidated all tests and created an inlined helper function to check if # the framebuffer console is inactive or not. # - fix unblanking if driver has no xxxfb_blank() hook. # # I'm probably missing a few more things, but this patch should be generally # correct. Please apply after the entire patch series to avoid rejects. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/fbmem.c # 2004/11/07 18:13:26-08:00 adaplas@hotpop.com +3 -22 # fbcon: "Do not touch hardware if vc_mode != KD_TEXT: fix # # drivers/video/console/fbcon.c # 2004/11/07 19:10:09-08:00 adaplas@hotpop.com +25 -36 # fbcon: "Do not touch hardware if vc_mode != KD_TEXT: fix # # ChangeSet # 2004/11/07 20:04:51-08:00 adaplas@hotpop.com # [PATCH] fbdev: Check for intialized flag before registration in matroxfb # # In matroxfb_set_par, a flag is set to nonzero which is checked after # register_framebuffer(). If this flag is zero, the driver will initialize # the hardware. # # This is necessary because info->currcon (previously checked by matroxfb) # has been removed from struct fb_info. # # Signed-off-by: Antonino Daplas # Acked-by: Petr Vandrovec # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/matrox/matroxfb_crtc2.h # 2004/11/07 18:13:26-08:00 adaplas@hotpop.com +1 -0 # fbdev: Check for intialized flag before registration in matroxfb # # drivers/video/matrox/matroxfb_crtc2.c # 2004/11/07 18:13:26-08:00 adaplas@hotpop.com +3 -1 # fbdev: Check for intialized flag before registration in matroxfb # # drivers/video/matrox/matroxfb_base.h # 2004/11/07 18:13:26-08:00 adaplas@hotpop.com +1 -0 # fbdev: Check for intialized flag before registration in matroxfb # # drivers/video/matrox/matroxfb_base.c # 2004/11/07 18:13:26-08:00 adaplas@hotpop.com +9 -11 # fbdev: Check for intialized flag before registration in matroxfb # # ChangeSet # 2004/11/07 20:04:38-08:00 adaplas@hotpop.com # [PATCH] fbdev: Set correct mclk/xclk values for aty in ibook # # The first iBook needs special mclk/xclk values, or the screen will show only # garbage. A patch like this went into 2.4.23. It stopped working after # 2.6.10-rc1. # # http://linux.bkbits.net:8080/linux-2.4/cset@3f966ca7mqKxZorh7Uw2SBAuVbv3mA # # It was discussed here: # http://marc.theaimsgroup.com/?t=106345749200001&r=1&w=4 # # Signed-off-by: Olaf Hering # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/aty/atyfb_base.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +8 -0 # fbdev: Set correct mclk/xclk values for aty in ibook # # ChangeSet # 2004/11/07 20:04:26-08:00 syrjala@sci.fi # [PATCH] fbdev: Fix atyfb cursor problems # # Fix atyfb cursor problems: # - oops with noaccel option # - CONFIG_FB_ATY_CT dependency problem # # Signed-off-by: Ville Syrjala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/aty/atyfb_base.c # 2004/11/07 19:10:10-08:00 syrjala@sci.fi +1 -1 # fbdev: Fix atyfb cursor problems # # ChangeSet # 2004/11/07 20:04:14-08:00 adaplas@hotpop.com # [PATCH] fbdev: atyfb_base.c requires atyfb_cursor() # # atyfb_base.c requires atyfb_cursor, but it is only available for linking if # CONFIG_FB_ATY_CT=y. This patch moves the .o file to the CONFIG_FB_ATY rule. # # Signed-off-by: Olaf Hering # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/aty/Makefile # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +2 -2 # fbdev: atyfb_base.c requires atyfb_cursor() # # ChangeSet # 2004/11/07 20:04:01-08:00 adaplas@hotpop.com # [PATCH] fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # The following fields in struct fb_info is specific only to fbcon: # - struct timer_ cursor_timer # - int currcon # # Remove them from struct fb_info and place them in fbcon_par so they become # invisible from the drivers. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/fb.h # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -2 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/vga16fb.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/tgafb.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/tcx.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/stifb.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/sstfb.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/sis/sis_main.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +4 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/sa1100fb.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/radeonfb.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/pxafb.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/p9100.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/matrox/matroxfb_crtc2.c # 2004/11/07 19:10:10-08:00 adaplas@hotpop.com +1 -4 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/matrox/matroxfb_base.c # 2004/11/07 19:10:10-08:00 adaplas@hotpop.com +15 -11 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/leo.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/intelfb/intelfbdrv.c # 2004/11/07 19:10:09-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/gbefb.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/ffb.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/console/fbcon.h # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +2 -0 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/console/fbcon.c # 2004/11/07 19:10:09-08:00 adaplas@hotpop.com +51 -31 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/cirrusfb.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/cg6.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/cg3.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/cg14.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/bw2.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/aty/radeon_base.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # drivers/video/acornfb.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +0 -1 # fbcon/fbdev: Remove fbcon-specific fields from struct fb_info # # ChangeSet # 2004/11/07 20:03:47-08:00 adaplas@hotpop.com # [PATCH] fbdev: Fix source copy bug in neofb # # Fix copy system-io copy bug. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/neofb.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +1 -1 # fbdev: Fix source copy bug in neofb # # ChangeSet # 2004/11/07 20:03:35-08:00 adaplas@hotpop.com # [PATCH] fbcon: Add box drawing glyphs to 6x11 font # # From: David Lazar # # I've tried to use the 6x11 (mac console) font on the framebuffer console (on # the x86 architecture), and I've noticed that the font didn't have the correct # box drawing glyphs. As a result I've used as a model the 8x16 font and edited # the glyphs for all 256 US ASCII characters, so that they display correctly. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/console/font_6x11.c # 2004/11/07 18:13:25-08:00 adaplas@hotpop.com +1093 -1093 # fbcon: Add box drawing glyphs to 6x11 font # # ChangeSet # 2004/11/07 20:03:22-08:00 adaplas@hotpop.com # [PATCH] fbdev: Fix IO access in rivafb # # Fix IO access in rivafb: # - change NV_RD*/WR* macros to use read*/write* family # - use NV_RD*/WR* to access IO memory # - add __iomem annotations # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/riva/rivafb.h # 2004/11/07 18:13:24-08:00 adaplas@hotpop.com +1 -1 # fbdev: Fix IO access in rivafb # # drivers/video/riva/riva_hw.h # 2004/11/07 18:13:24-08:00 adaplas@hotpop.com +34 -34 # fbdev: Fix IO access in rivafb # # drivers/video/riva/riva_hw.c # 2004/11/07 18:13:24-08:00 adaplas@hotpop.com +302 -258 # fbdev: Fix IO access in rivafb # # drivers/video/riva/fbdev.c # 2004/11/07 18:13:24-08:00 adaplas@hotpop.com +54 -43 # fbdev: Fix IO access in rivafb # # ChangeSet # 2004/11/07 20:03:09-08:00 adaplas@hotpop.com # [PATCH] fbdev: Fix access to ROM in aty128fb # # Fix access to ROM in aty128fb. Found by sparse. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/aty/aty128fb.c # 2004/11/07 18:13:24-08:00 adaplas@hotpop.com +1 -1 # fbdev: Fix access to ROM in aty128fb # # ChangeSet # 2004/11/07 20:02:57-08:00 adaplas@hotpop.com # [PATCH] fbcon: Do not touch hardware if vc_mode != KD_TEXT # # The frambuffer console is still writing to the graphics hardware even if the # hardware is not owned anymore by the console. This can lead to crashes with # some hardware. # # A trace of the source indicates that it comes from almost anywhere, anytime. # # The fix is to return immediately if vc_mode != KD_TEXT. The test is placed in # the following functions if not already present. # # fbcon_cursor() # fbcon_putcs() # fbcon_clear() # fbcon_bmove() # fbcon_blank() # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/console/fbcon.c # 2004/11/07 19:10:11-08:00 adaplas@hotpop.com +19 -10 # fbcon: Do not touch hardware if vc_mode != KD_TEXT # # ChangeSet # 2004/11/07 20:02:44-08:00 arjan@infradead.org # [PATCH] remove journal callback code from jbd # # With the demise of intermezzo, the journal callback stuff in jbd is # entirely unused (neither ext3 nor ocfs2 use it), and thus will only bitrot # and bloat the kernel with code and datastructure growth. If intermezzo # ever gets resurrected this will be the least of the problems they have to # face (both with generic kernel as jbd). # # Signed-off-by: Arjan van de Ven # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/jbd.h # 2004/11/07 18:13:24-08:00 arjan@infradead.org +0 -44 # remove journal callback code from jbd # # fs/jbd/transaction.c # 2004/11/07 18:13:24-08:00 arjan@infradead.org +0 -38 # remove journal callback code from jbd # # fs/jbd/journal.c # 2004/11/07 18:13:24-08:00 arjan@infradead.org +0 -2 # remove journal callback code from jbd # # fs/jbd/commit.c # 2004/11/07 18:13:24-08:00 arjan@infradead.org +0 -24 # remove journal callback code from jbd # # fs/jbd/checkpoint.c # 2004/11/07 18:13:24-08:00 arjan@infradead.org +0 -1 # remove journal callback code from jbd # # ChangeSet # 2004/11/07 20:02:32-08:00 stelian@popies.net # [PATCH] videodev2.h patchlet # # The following patchlet to videodev2.h brings in the "__user" definition from # linux/compiler.h, making it suitable for inclusion in both kernel or user # code. # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/videodev2.h # 2004/11/07 18:11:30-08:00 stelian@popies.net +1 -0 # videodev2.h patchlet # # ChangeSet # 2004/11/07 20:02:19-08:00 stelian@popies.net # [PATCH] sonypi: documentation fixes # # In the latest round of updates for the sonypi driver, I fergot to send the # attached patch which fixes the driver documentation. # # The patch contains mostly whitespace fixes and some additional information # regarding the input layer usage. # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/sonypi.txt # 2004/11/07 18:11:30-08:00 stelian@popies.net +27 -24 # sonypi: documentation fixes # # ChangeSet # 2004/11/07 20:02:06-08:00 stelian@popies.net # [PATCH] meye: cache the camera settings in the driver # # Retrieving the current settings from the camera does not work very well, we # need to cache the values in the driver. # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/meye.c # 2004/11/07 18:11:30-08:00 stelian@popies.net +15 -16 # meye: cache the camera settings in the driver # # ChangeSet # 2004/11/07 20:01:53-08:00 stelian@popies.net # [PATCH] meye: bump up the version number # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/meye.h # 2004/11/07 18:11:30-08:00 stelian@popies.net +1 -1 # meye: bump up the version number # # ChangeSet # 2004/11/07 20:01:40-08:00 stelian@popies.net # [PATCH] meye: whitespace and coding style cleanups # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/meye.h # 2004/11/07 18:11:29-08:00 stelian@popies.net +5 -5 # meye: whitespace and coding style cleanups # # drivers/media/video/meye.h # 2004/11/07 19:10:14-08:00 stelian@popies.net +9 -17 # meye: whitespace and coding style cleanups # # drivers/media/video/meye.c # 2004/11/07 19:10:13-08:00 stelian@popies.net +312 -310 # meye: whitespace and coding style cleanups # # Documentation/video4linux/meye.txt # 2004/11/07 18:11:29-08:00 stelian@popies.net +5 -5 # meye: whitespace and coding style cleanups # # ChangeSet # 2004/11/07 20:01:28-08:00 stelian@popies.net # [PATCH] meye: add v4l2 support # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/meye.h # 2004/11/07 19:10:14-08:00 stelian@popies.net +7 -0 # meye: add v4l2 support # # drivers/media/video/meye.h # 2004/11/07 19:10:14-08:00 stelian@popies.net +3 -0 # meye: add v4l2 support # # drivers/media/video/meye.c # 2004/11/07 19:10:14-08:00 stelian@popies.net +557 -5 # meye: add v4l2 support # # Documentation/video4linux/meye.txt # 2004/11/07 19:10:14-08:00 stelian@popies.net +9 -12 # meye: add v4l2 support # # ChangeSet # 2004/11/07 20:01:15-08:00 stelian@popies.net # [PATCH] meye: module parameters documentation fixes # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/video4linux/meye.txt # 2004/11/07 19:10:14-08:00 stelian@popies.net +4 -7 # meye: module parameters documentation fixes # # Documentation/kernel-parameters.txt # 2004/11/07 19:10:08-08:00 stelian@popies.net +1 -1 # meye: module parameters documentation fixes # # ChangeSet # 2004/11/07 20:01:03-08:00 stelian@popies.net # [PATCH] meye: the driver is no longer experimental and depends on PCI # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/Kconfig # 2004/11/07 18:11:28-08:00 stelian@popies.net +2 -2 # meye: the driver is no longer experimental and depends on PCI # # ChangeSet # 2004/11/07 20:00:49-08:00 stelian@popies.net # [PATCH] meye: cleanup init/exit paths # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/meye.c # 2004/11/07 19:10:14-08:00 stelian@popies.net +47 -57 # meye: cleanup init/exit paths # # ChangeSet # 2004/11/07 20:00:37-08:00 stelian@popies.net # [PATCH] meye: implement non blocking access using poll() # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/meye.c # 2004/11/07 19:10:15-08:00 stelian@popies.net +21 -0 # meye: implement non blocking access using poll() # # ChangeSet # 2004/11/07 20:00:24-08:00 stelian@popies.net # [PATCH] meye: do lock properly when waiting for buffers # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/meye.c # 2004/11/07 19:10:15-08:00 stelian@popies.net +13 -2 # meye: do lock properly when waiting for buffers # # ChangeSet # 2004/11/07 20:00:12-08:00 stelian@popies.net # [PATCH] meye: picture depth is in bits not in bytes # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/meye.c # 2004/11/07 19:10:15-08:00 stelian@popies.net +2 -2 # meye: picture depth is in bits not in bytes # # ChangeSet # 2004/11/07 19:59:59-08:00 stelian@popies.net # [PATCH] meye: replace homebrew queue with kfifo # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/meye.h # 2004/11/07 19:10:14-08:00 stelian@popies.net +8 -10 # meye: replace homebrew queue with kfifo # # drivers/media/video/meye.c # 2004/11/07 19:10:15-08:00 stelian@popies.net +91 -110 # meye: replace homebrew queue with kfifo # # ChangeSet # 2004/11/07 19:59:46-08:00 stelian@popies.net # [PATCH] meye: module related fixes # # - use module_param() instead of MODULE_PARM() and __setup() # # - use MODULE_VERSION() # # Signed-off-by: Stelian Pop # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/meye.h # 2004/11/07 19:10:15-08:00 stelian@popies.net +3 -0 # meye: module related fixes # # drivers/media/video/meye.c # 2004/11/07 19:10:15-08:00 stelian@popies.net +22 -39 # meye: module related fixes # # ChangeSet # 2004/11/07 19:59:34-08:00 hunold@linuxtv.org # [PATCH] v4l: keep tvaudio driver away from saa7146 # # The attached patch keeps the tvaudio i2c helper module away from any # saa7146 based framegrabber. All saa7146 drivers have their dedicated i2c # helper modules and don't work together with tvaudio, so keep it away # alltogether. This will make mixed-card configurations work. # # The patch was discussed and ack'ed by Gerd Knorr. # # - don't attach tvaudio module on saa7146 i2c busses # # Signed-off-by: Michael Hunold # Acked-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/tvaudio.c # 2004/11/07 18:11:27-08:00 hunold@linuxtv.org +4 -0 # v4l: keep tvaudio driver away from saa7146 # # ChangeSet # 2004/11/07 19:59:21-08:00 hunold@linuxtv.org # [PATCH] v4l: mxb driver and i2c helper cleanup # # The attached patch cleans up my Video4Linux "MXB" driver and the i2c helper # chipset drivers used by that cards. # # I ran Lindent on the files and fixed some other coding style violations, # which makes the patch rather big. # # But besides the MODULE_PARM => module_param there have been no crucial # changes. # # - [V4L] mxb: replace MODULE_PARM with module_param # # - [V4L] saa7111: replace MODULE_PARM with module_param # # - [V4L] tda9840: replace MODULE_PARM with module_param, re-indent code # with Lindent, remove unnecessary header includes, code simplification # # - [V4L] tea6415c: replace MODULE_PARM with module_param, re-indent code # with Lindent, remove unnecessary header includes, code simplification # # - [V4L] tea6420: replace MODULE_PARM with module_param, re-indent code # with Lindent, remove unnecessary header includes, code simplification # # Signed-off-by: Michael Hunold # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/tea6420.c # 2004/11/07 18:11:27-08:00 hunold@linuxtv.org +82 -93 # v4l: mxb driver and i2c helper cleanup # # drivers/media/video/tea6415c.c # 2004/11/07 18:11:27-08:00 hunold@linuxtv.org +109 -118 # v4l: mxb driver and i2c helper cleanup # # drivers/media/video/tda9840.c # 2004/11/07 18:11:27-08:00 hunold@linuxtv.org +142 -173 # v4l: mxb driver and i2c helper cleanup # # drivers/media/video/saa7111.c # 2004/11/07 18:11:28-08:00 hunold@linuxtv.org +1 -1 # v4l: mxb driver and i2c helper cleanup # # drivers/media/video/mxb.c # 2004/11/07 18:11:28-08:00 hunold@linuxtv.org +4 -4 # v4l: mxb driver and i2c helper cleanup # # ChangeSet # 2004/11/07 19:59:08-08:00 jdike@addtoit.com # [PATCH] uml: set DTRACE correctly # # From: Bodo Stroesser - Set PTRACE_DTRACE and singlestep_syscall correctly. # Pass out TRACESYSGOOD and make sure the parent gets notified in # ptrace_syscall. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/tt/syscall_kern.c # 2004/11/07 18:11:27-08:00 jdike@addtoit.com +0 -5 # uml: set DTRACE correctly # # arch/um/kernel/skas/syscall_kern.c # 2004/11/07 18:11:27-08:00 jdike@addtoit.com +0 -5 # uml: set DTRACE correctly # # arch/um/kernel/signal_kern.c # 2004/11/07 18:11:27-08:00 jdike@addtoit.com +3 -3 # uml: set DTRACE correctly # # arch/um/kernel/ptrace.c # 2004/11/07 18:11:27-08:00 jdike@addtoit.com +19 -5 # uml: set DTRACE correctly # # arch/um/kernel/process_kern.c # 2004/11/07 18:11:27-08:00 jdike@addtoit.com +0 -2 # uml: set DTRACE correctly # # ChangeSet # 2004/11/07 19:58:55-08:00 jdike@addtoit.com # [PATCH] uml: dont check NR_syscalls # # Remove an unnecessary and even dangerous check in is_syscall() # The bug was inserted by my patch syscall-security-1. # # Signed-off-by: Bodo Stroesser # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/sys-i386/ptrace.c # 2004/11/07 18:11:27-08:00 jdike@addtoit.com +2 -2 # uml: dont check NR_syscalls # # ChangeSet # 2004/11/07 19:58:43-08:00 jdike@addtoit.com # [PATCH] uml: clear singlestep # # The patch syscall-security-3 is wrong (provided by me, sorry). I missed, # that singlestepping_skas() used to reset PT_DTRACE. This was handled # differently in tt and skas. With syscall-security-3 applied, a process in # SKAS that singlestepped once continues to singlestep until the next # systemcall occurs, even if it is resumed with PTRACE_CONT or # PTRACE_SYSCALL. # # This fix unifies the usage of PT_DTRACE in TT and SKAS. PT_DTRACE now is # set by ptrace(PTRACE_SINGLESTEP,...) and reset by singlestepping() and it # is evaluated in kern_do_signal(). # # Signed-off-by: Bodo Stroesser # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/tt/tracer.c # 2004/11/07 18:11:27-08:00 jdike@addtoit.com +0 -1 # uml: clear singlestep # # arch/um/kernel/tt/syscall_kern.c # 2004/11/07 19:10:16-08:00 jdike@addtoit.com +0 -1 # uml: clear singlestep # # arch/um/kernel/tt/process_kern.c # 2004/11/07 18:11:27-08:00 jdike@addtoit.com +0 -7 # uml: clear singlestep # # arch/um/kernel/tt/include/tt.h # 2004/11/07 18:11:27-08:00 jdike@addtoit.com +0 -1 # uml: clear singlestep # # arch/um/kernel/skas/syscall_kern.c # 2004/11/07 19:10:16-08:00 jdike@addtoit.com +0 -1 # uml: clear singlestep # # arch/um/kernel/process_kern.c # 2004/11/07 19:10:16-08:00 jdike@addtoit.com +7 -1 # uml: clear singlestep # # ChangeSet # 2004/11/07 19:58:30-08:00 jdike@addtoit.com # [PATCH] uml: generic singlestepping # # From: Bodo Stroesser - Make singlestepping() generic. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/tt/tracer.c # 2004/11/07 19:10:16-08:00 jdike@addtoit.com +1 -1 # uml: generic singlestepping # # arch/um/kernel/tt/process_kern.c # 2004/11/07 19:10:16-08:00 jdike@addtoit.com +0 -9 # uml: generic singlestepping # # arch/um/kernel/tt/include/tt.h # 2004/11/07 19:10:16-08:00 jdike@addtoit.com +0 -1 # uml: generic singlestepping # # arch/um/kernel/skas/syscall_kern.c # 2004/11/07 19:10:16-08:00 jdike@addtoit.com +7 -0 # uml: generic singlestepping # # arch/um/kernel/skas/process_kern.c # 2004/11/07 18:11:27-08:00 jdike@addtoit.com +0 -8 # uml: generic singlestepping # # arch/um/kernel/skas/process.c # 2004/11/07 18:11:27-08:00 jdike@addtoit.com +1 -1 # uml: generic singlestepping # # arch/um/kernel/skas/include/skas.h # 2004/11/07 18:11:27-08:00 jdike@addtoit.com +0 -1 # uml: generic singlestepping # # arch/um/kernel/process_kern.c # 2004/11/07 19:10:16-08:00 jdike@addtoit.com +10 -0 # uml: generic singlestepping # # ChangeSet # 2004/11/07 19:58:17-08:00 jdike@addtoit.com # [PATCH] uml: generic singlestep syscall # # From: Bodo Stroesser - Make singlestep_syscall generic rather than being # restricted to tt mode. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/processor-generic.h # 2004/11/07 18:11:26-08:00 jdike@addtoit.com +1 -1 # uml: generic singlestep syscall # # arch/um/kernel/tt/syscall_kern.c # 2004/11/07 19:10:16-08:00 jdike@addtoit.com +2 -2 # uml: generic singlestep syscall # # arch/um/kernel/tt/process_kern.c # 2004/11/07 19:10:17-08:00 jdike@addtoit.com +1 -1 # uml: generic singlestep syscall # # arch/um/kernel/signal_kern.c # 2004/11/07 19:10:16-08:00 jdike@addtoit.com +1 -1 # uml: generic singlestep syscall # # ChangeSet # 2004/11/07 19:58:05-08:00 jdike@addtoit.com # [PATCH] uml: sysenter is syscall # # From: Bodo Stroesser - Change is_syscall to check for sysenter and also that # we are actually executing a system call. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/sys-i386/ptrace.c # 2004/11/07 19:10:16-08:00 jdike@addtoit.com +4 -2 # uml: sysenter is syscall # # ChangeSet # 2004/11/07 19:57:53-08:00 jdike@addtoit.com # [PATCH] uml: handle signal api # # This first patch lays some groundwork needed by the others. # # From: Bodo Stroesser - Change the interface to handle_signal so that it # doesn't take the system call return value as an argument and eliminate # its return value. # # kern_do_signal also now doesn't return immediately after determining that # there is no signal to deliver. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/signal_kern.c # 2004/11/07 19:10:17-08:00 jdike@addtoit.com +18 -21 # uml: handle signal api # # ChangeSet # 2004/11/07 19:57:39-08:00 jdike@addtoit.com # [PATCH] uml: update atomic.h so UML builds cleanly # # The comment should be self-explanatory. This works around a pile of # nasty-looking build output. # # Signed-off-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/atomic.h # 2004/11/07 18:11:26-08:00 jdike@addtoit.com +5 -0 # uml: update atomic.h so UML builds cleanly # # ChangeSet # 2004/11/07 19:57:27-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: add missing newline in help string # # Add missing newline in help string for "nosysemu" param. Run ./vmlinux --help # before and after to see the difference. Trivial - must go in. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/process.c # 2004/11/07 18:11:26-08:00 blaisorblade_spam@yahoo.it +1 -1 # uml: add missing newline in help string # # ChangeSet # 2004/11/07 19:57:14-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: re-add linux Makefile target - fixes to the old version. # # We have re-added the "linux" target which just creates a hardlink to vmlinux. # It was noted (sorry for forgetting who said this) that "make ARCH=um" will # leave an old "linux" file, since the target is not listed in .PHONY. # # Using a symlink, instead of an hard link, was suggested because the hard link # does not get updated with make vmlinux. But mv linux $destpath (the most # meaningful installation command) is broken, so I instead added linux to # .PHONY. Obviously, linux will not be rebuilt on "make vmlinux ARCH=um", but # this makes sense (if people use the new way, don't use old tricks). Anyway, # we remove "linux" in any case. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Acked-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/Makefile # 2004/11/07 18:11:26-08:00 blaisorblade_spam@yahoo.it +8 -5 # uml: re-add linux Makefile target - fixes to the old version. # # ChangeSet # 2004/11/07 19:57:02-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: clear errno in CATCH_EINTR # # To avoid silly messages coming out during debugging or when things break, # after that we've read in CATCH_EINTR that errno == EINTR, clear it, so that # it's 0 in next iteration. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/include/user_util.h # 2004/11/07 18:11:26-08:00 blaisorblade_spam@yahoo.it +1 -1 # uml: clear errno in CATCH_EINTR # # ChangeSet # 2004/11/07 19:56:50-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Lots of little fixes by Jeff Dike. # # From: Jeff Dike # # This is a large set of small fixes and other changes: # # Fixed a file descriptor leak in the network driver when changing an IP # address. # # The port channel now sets SO_REUSEADDR. # # Added some initcall and exitcall definitions to arch/um/include/init.h # so that they can be used from userspace code. # # Fixed the error handling in run_helper. # # Added the log() facility to mem_user.c. # # Fixed a problem with recursive segfaults not being handled correctly. # # tty_log_fd and umid aren't added to the command line any more. # # Fixed some prints. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/os-Linux/file.c # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +2 -1 # uml: Lots of little fixes by Jeff Dike. # # arch/um/kernel/umid.c # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +1 -0 # uml: Lots of little fixes by Jeff Dike. # # arch/um/kernel/tty_log.c # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +2 -0 # uml: Lots of little fixes by Jeff Dike. # # arch/um/kernel/tt/trap_user.c # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +7 -0 # uml: Lots of little fixes by Jeff Dike. # # arch/um/kernel/skas/include/mode-skas.h # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +2 -0 # uml: Lots of little fixes by Jeff Dike. # # arch/um/kernel/sigio_kern.c # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +1 -1 # uml: Lots of little fixes by Jeff Dike. # # arch/um/kernel/mem_user.c # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +33 -0 # uml: Lots of little fixes by Jeff Dike. # # arch/um/drivers/port_user.c # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +7 -1 # uml: Lots of little fixes by Jeff Dike. # # ChangeSet # 2004/11/07 19:56:37-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: use PTRACE_SYSEMU also for TT mode # # From: Jeff Dike # Paolo 'Blaisorblade' Giarrusso # # As Jeff Dike noted, even if SYSEMU was originally written for use in SKAS # mode, there is nothing SKAS specific in SYSEMU, so use it for TT mode, too. # # SYSEMU simply allows one to ptrace(PTRACE_SYSEMU) a process, that will stop # on the syscall entry path like with PTRACE_SYSCALL, but with the difference # that it makes sure that the syscall execution is totally skipped and that # the child will see the return value set by the ptracer when the child was # stopped. # # We even hope that the SYSEMU patch can be merged in mainline sooner than # SKAS. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Roland McGrath # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/tt/tracer.c # 2004/11/07 19:10:17-08:00 blaisorblade_spam@yahoo.it +7 -2 # uml: use PTRACE_SYSEMU also for TT mode # # arch/um/kernel/tt/syscall_user.c # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +4 -1 # uml: use PTRACE_SYSEMU also for TT mode # # arch/um/kernel/tt/include/tt.h # 2004/11/07 19:10:17-08:00 blaisorblade_spam@yahoo.it +1 -1 # uml: use PTRACE_SYSEMU also for TT mode # # arch/um/kernel/skas/process_kern.c # 2004/11/07 19:10:17-08:00 blaisorblade_spam@yahoo.it +0 -55 # uml: use PTRACE_SYSEMU also for TT mode # # arch/um/kernel/skas/process.c # 2004/11/07 19:10:17-08:00 blaisorblade_spam@yahoo.it +7 -11 # uml: use PTRACE_SYSEMU also for TT mode # # arch/um/kernel/skas/include/ptrace-skas.h # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +0 -10 # uml: use PTRACE_SYSEMU also for TT mode # # arch/um/kernel/process_kern.c # 2004/11/07 19:10:17-08:00 blaisorblade_spam@yahoo.it +56 -0 # uml: use PTRACE_SYSEMU also for TT mode # # arch/um/kernel/process.c # 2004/11/07 19:10:17-08:00 blaisorblade_spam@yahoo.it +0 -3 # uml: use PTRACE_SYSEMU also for TT mode # # arch/um/include/ptrace_user.h # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +11 -0 # uml: use PTRACE_SYSEMU also for TT mode # # ChangeSet # 2004/11/07 19:56:24-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: more careful test startup # # From: Paolo 'Blaisorblade' Giarrusso # Bodo Stroesser # # While testing the host ptrace(2) features, we modify the stack frame of a test # child which is doing a syscall (namely getpid). Either we override the # syscall number or the return value, which become the parent's pid, or we # don't, and the return value is the child's pid. # # Actually, we only compared the return value with the child's pid, so we did # not notice a bug where the return value happened to be different from both. # So I added a stricter test here. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/skas/process_kern.c # 2004/11/07 19:10:18-08:00 blaisorblade_spam@yahoo.it +1 -1 # uml: more careful test startup # # arch/um/kernel/process.c # 2004/11/07 19:10:18-08:00 blaisorblade_spam@yahoo.it +68 -30 # uml: more careful test startup # # ChangeSet # 2004/11/07 19:56:12-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: fix sysemu test at startup # # From: Paolo 'Blaisorblade' Giarrusso # Bodo Stroesser # Jeff Dike # # Currently, the test for the SYSEMU support on the host is completely wrong, as # Bodo noticed. We should change the syscall result (inserting the host pid) # and check if it is received correctly by the guest. What we actually do, # without this patch, is to overwrite the syscall number. # # This went unnoticed because we only check that the getpid() syscall from the # child does not return its pid. We don't check that it returns the correct # value. # # Also, override the result portably, using the PT_SYSCALL_RET_OFFSET macro # which abstract away the host stack frame layout (took from Jeff Dike code). # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/process.c # 2004/11/07 19:10:19-08:00 blaisorblade_spam@yahoo.it +6 -10 # uml: fix sysemu test at startup # # ChangeSet # 2004/11/07 19:56:00-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: revert compile-only changes for other ones # # I'm reverting the compile-time fixes to replace them with a bigger change, # which also happens to fix the compilation problem. The change is in next # patches. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/process.c # 2004/11/07 19:10:19-08:00 blaisorblade_spam@yahoo.it +0 -13 # uml: revert compile-only changes for other ones # # ChangeSet # 2004/11/07 19:55:47-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: use kallsyms when dumping stack # # This patch makes UML use print_symbol() when dumping the stack. It is not yet # complete (the i386 version uses the frame pointers to walk the stack, for # instance), but should be at least enough. # # Also, it uses bust_spinlock() when dumping errors to help them reach the # console. This appears not to be enough - however I analyzed the UML console # code, and it seems that UML console don't get flushed *at all* when exiting. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/um_arch.c # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +3 -3 # uml: use kallsyms when dumping stack # # arch/um/kernel/sysrq.c # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +6 -7 # uml: use kallsyms when dumping stack # # ChangeSet # 2004/11/07 19:55:35-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: remove SIGPROF from change_signals # # From: Paolo 'Blaisorblade' Giarrusso # Jeff Dike # # Since local_irq_save() and local_irq_disable() should match (apart from saving # the flags), get/set_signals must match [un]block_signals, i.e. # change_signals; since get/set_signals don't enable/disable SIGPROF (and this # behaviour is safe as explained in the comment the patch adds, since the # profiling code does not interact with the kernel code), not even # change_signals must toggle it. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/signal_user.c # 2004/11/07 18:11:25-08:00 blaisorblade_spam@yahoo.it +4 -1 # uml: remove SIGPROF from change_signals # # ChangeSet # 2004/11/07 19:55:22-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: catch EINTR in generic_console_write # # Make generic_console_write() catch the EINTR error code and retry doing the # calls accordingly. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/drivers/chan_user.c # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +15 -3 # uml: catch EINTR in generic_console_write # # ChangeSet # 2004/11/07 19:55:09-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: mconsole_proc simplify and partial fix # # From: Gerd Knorr , and me, Paolo Giarrusso # # This is a rewrite of the mconsole_proc function. # # The old code had the problem that the kernel crashed after calling # "uml_mconsole proc " a few times. I havn't tracked what exactly # causes the problem, I guess trying to access the procfs without actually # mounting it somewhere causes some corruption of kernel data structures. # # The new code simply openes /proc/ via sys_open(). That simplifies the # function alot. It also doesn't crash any more ;) # # Also, from Paolo Giarrusso: When printing the content of a file through the # "proc" command, make it begin on his own line. # # PROBLEMS: # # Drawback is that it only works when procfs is actually mounted below /proc. # And within UML, often this is false, because when building honeypots we mount # HPPFS under /proc to avoid the hacker recognizing he's attacking a UML # instance. # # One suggestion I've received to fix the later issue was to mount the procfs # within a kernel thread with a private namespace, but I havn't tried that so # far. # # Instead, we'd like to fix the actual code of the mconsole_proc function. From # "Anthony Brock" Anthony_Brock (at) ous (dot) edu comes a comment, suggesting # where the bug lays (as noted in the source): removing part of the code (it # seems the symlink lookup) there are no more crashes. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/drivers/mconsole_kern.c # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +93 -1 # uml: mconsole_proc simplify and partial fix # # ChangeSet # 2004/11/07 19:54:57-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: no duplicate current_thread definition # # From: Paolo 'Blaisorblade' Giarrusso # Jeff Dike # # Currently there are two distinct definitions of current_thread_info (which has # its usual meaning) and current_thread (which is the same thing); so define the # second to be the first (for UML compatibility). If needed, a search & replace # \ to current_thread_info and removing current_thread can be # done (that would be a separate, low-priority patch, however). # # Also, since the involved headers include each other very deeply, we must fix # somehow this recursive inclusion or things won't compile. # # Jeff Dike noted that this can be done easily, since the nasty chain of # includes can be broken by eliminating an include of current.h, and implemented # this. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/thread_info.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +1 -0 # uml: no duplicate current_thread definition # # include/asm-um/ptrace-generic.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +0 -2 # uml: no duplicate current_thread definition # # include/asm-um/current.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +4 -9 # uml: no duplicate current_thread definition # # ChangeSet # 2004/11/07 19:54:44-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: remove useless inclusion # # Avoid including some unused headers. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/skas/include/mmu-skas.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +0 -3 # uml: remove useless inclusion # # arch/um/kernel/main.c # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +2 -0 # uml: remove useless inclusion # # ChangeSet # 2004/11/07 19:54:31-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: cleanup header names # # Rename headers with the same name to avoid specifying the complete path for # including them. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/tt/include/uaccess-tt.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +2 -2 # uml: cleanup header names # # arch/um/kernel/tt/include/mode_kern-tt.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +5 -5 # uml: cleanup header names # # arch/um/kernel/tt/include/mode-tt.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +2 -2 # uml: cleanup header names # # arch/um/kernel/tt/include/mmu-tt.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +1 -1 # uml: cleanup header names # # arch/um/kernel/skas/include/uaccess-skas.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +2 -2 # uml: cleanup header names # # arch/um/kernel/skas/include/mode_kern-skas.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +6 -6 # uml: cleanup header names # # arch/um/kernel/skas/include/mode-skas.h # 2004/11/07 19:10:18-08:00 blaisorblade_spam@yahoo.it +2 -2 # uml: cleanup header names # # arch/um/kernel/skas/include/mmu-skas.h # 2004/11/07 19:10:20-08:00 blaisorblade_spam@yahoo.it +1 -1 # uml: cleanup header names # # arch/um/kernel/skas/exec_kern.c # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +1 -1 # uml: cleanup header names # # arch/um/include/um_uaccess.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +2 -2 # uml: cleanup header names # # arch/um/include/um_mmu.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +2 -2 # uml: cleanup header names # # arch/um/include/mode_kern.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +2 -2 # uml: cleanup header names # # arch/um/include/mode.h # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +2 -2 # uml: cleanup header names # # ChangeSet # 2004/11/07 19:45:33-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: fix symbol conflict in linking # # Since arch/um/kernel/tt/unmap_fin.o is linked statically, it could contain # some symbols also contained in the rest of vmlinux; on some systems, this # actually happens (due to some glibc differences). # # Since that file *must* be linked statically and then relinked (its code must # remap the whole .text area except the section it is contained in during UML # startup), we cannot change this. So, we use objcopy to turn all symbols into # local ones except for switcheroo(), which is the only function actually # defined in the source (the other ones are brought in during linking). # # This shouldn't hurt other systems, while improving the behaviour on affected # ones (there is still another issue I'm trying to fix). And it is logically # always needed (i.e., without this UML has just happened to work until now). # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/tt/Makefile # 2004/11/07 18:11:24-08:00 blaisorblade_spam@yahoo.it +4 -4 # uml: fix symbol conflict in linking # # ChangeSet # 2004/11/07 19:45:21-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: fix syscall auditing # # Correct the entry_exit parameter for syscall_trace when tracing syscalls. It # was the reverse of the needed value. (i.e. it was 1 on entry and 0 on exit). # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/tt/syscall_user.c # 2004/11/07 19:10:18-08:00 blaisorblade_spam@yahoo.it +2 -2 # uml: fix syscall auditing # # arch/um/kernel/skas/syscall_user.c # 2004/11/07 18:11:23-08:00 blaisorblade_spam@yahoo.it +2 -2 # uml: fix syscall auditing # # ChangeSet # 2004/11/07 19:45:08-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: add startup check for mmap(...PROT_EXEC...) from /tmp. # # This adds a check that /tmp is not mounted noexec. UML needs to be able to do # PROT_EXEC mmaps of temp files. Previously, a noexec /tmp would cause an early # mysterious UML crash. (Actually, not /tmp but $TMP, which often is the same). # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/um_arch.c # 2004/11/07 19:10:19-08:00 blaisorblade_spam@yahoo.it +5 -0 # uml: add startup check for mmap(...PROT_EXEC...) from /tmp. # # arch/um/kernel/mem_user.c # 2004/11/07 19:10:18-08:00 blaisorblade_spam@yahoo.it +21 -1 # uml: add startup check for mmap(...PROT_EXEC...) from /tmp. # # arch/um/include/mem_user.h # 2004/11/07 18:11:23-08:00 blaisorblade_spam@yahoo.it +1 -0 # uml: add startup check for mmap(...PROT_EXEC...) from /tmp. # # ChangeSet # 2004/11/07 19:44:55-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml - some comments about forcing /bin/bash # # Changes a comment about forcing /bin/bash as shell for the UML Makefile. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/Makefile # 2004/11/07 19:10:18-08:00 blaisorblade_spam@yahoo.it +2 -1 # uml - some comments about forcing /bin/bash # # ChangeSet # 2004/11/07 19:44:42-08:00 blaisorblade_spam@yahoo.it # [PATCH] uml: fix ptrace() hang on 2.6.9 host due to host changes # # From: Gerd Knorr , # Paolo 'Blaisorblade' Giarrusso # # Uml was using kill(pid, SIGKILL) instead of ptrace(PTRACE_KILL, pid), which # used to work, while being probably undocumented. Due to the changes in # 2.6.9 to the ptrace(2) semantics, with the introduction of TASK_TRACED by # Roland McGrath, this does not more work, so this patch should fix it. # # With help of Gerd Knorr report and analysis, and its early fix of this # problem. He fixed the problem by sending SIGCONT to the child processes # after SIGKILL. Which IMHO should not be needed (I think this is a # regression, which he already reported). # # I improved his one, by replacing the SIGCONT hack with using PTRACE_KILL # instead. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/os-Linux/process.c # 2004/11/07 18:11:23-08:00 blaisorblade_spam@yahoo.it +8 -0 # uml: fix ptrace() hang on 2.6.9 host due to host changes # # arch/um/kernel/tt/process_kern.c # 2004/11/07 19:10:17-08:00 blaisorblade_spam@yahoo.it +1 -1 # uml: fix ptrace() hang on 2.6.9 host due to host changes # # arch/um/kernel/skas/process.c # 2004/11/07 19:10:18-08:00 blaisorblade_spam@yahoo.it +1 -1 # uml: fix ptrace() hang on 2.6.9 host due to host changes # # arch/um/include/os.h # 2004/11/07 18:11:23-08:00 blaisorblade_spam@yahoo.it +1 -0 # uml: fix ptrace() hang on 2.6.9 host due to host changes # # ChangeSet # 2004/11/07 19:44:29-08:00 takata@linux-m32r.org # [PATCH] m32r: fix for use of Mappi PCC # # Here is a patch to fix compile errors for an Mappi evaluation board. - # Just change from CONFIG_M32RPCC to CONFIG_M32R_PCC. # # Thanks to Naoto Sugai for reporting. # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/kernel/setup_mappi.c # 2004/11/07 18:11:23-08:00 takata@linux-m32r.org +1 -1 # m32r: fix for use of Mappi PCC # # arch/m32r/kernel/io_mappi.c # 2004/11/07 18:11:23-08:00 takata@linux-m32r.org +16 -16 # m32r: fix for use of Mappi PCC # # ChangeSet # 2004/11/07 19:44:17-08:00 takata@linux-m32r.org # [PATCH] m32r: fix arch/m32r/lib/memset.S # # This patch fixes arch/m32r/lib/memset.S. # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/lib/memset.S # 2004/11/07 18:11:23-08:00 takata@linux-m32r.org +10 -7 # m32r: fix arch/m32r/lib/memset.S # # ChangeSet # 2004/11/07 19:44:04-08:00 clameter@sgi.com # [PATCH] mmtimer driver update: add SHub interrupt support # # - mmtimer: add support for the use of hardware timers on SGI SHubs (sn # subarch) via the posix timer interface. # # - Allows the scheduling of up to 3 hardware interrupts per node to # deliver signals to processes running on those nodes. # # - Periodic timers in user space capable of supporting intervals down to # 10us (<10us supported but will usually result in excessive overruns). # # - Scheduling accuracy of 40ns. (However, typically it takes at least a # few usecs for an interrupt to be forwarded to a signal in user space.) # # - Add missing SHub information to include/asm-ia64/sn/shub_mmr.h # # - Reserve timer interrupt used in include/asm-ia64/sn/intr.h # # Signed-off-by: Christoph Lameter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ia64/sn/shub_mmr.h # 2004/11/07 18:11:23-08:00 clameter@sgi.com +205 -0 # mmtimer driver update: add SHub interrupt support # # include/asm-ia64/sn/intr.h # 2004/11/07 18:11:23-08:00 clameter@sgi.com +1 -0 # mmtimer driver update: add SHub interrupt support # # drivers/char/mmtimer.c # 2004/11/07 18:11:23-08:00 clameter@sgi.com +482 -10 # mmtimer driver update: add SHub interrupt support # # ChangeSet # 2004/11/07 19:43:51-08:00 ak@suse.de # [PATCH] x86-64: Fix broken NMI change # # Fix an obviously broken change someone did to the x86-64 NMI handler. # reason would get used uninitialized, causing random misbehaviour in the NMI # handler and gcc rightly complained about it. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/traps.c # 2004/11/07 19:10:07-08:00 ak@suse.de +1 -1 # x86-64: Fix broken NMI change # # ChangeSet # 2004/11/07 19:43:39-08:00 ak@suse.de # [PATCH] x86_64: Add p4 clockmod # # Add links for p4-clockmod driver in x86-64 cpufreq. # # AK: Made it dependent on EMBEDDED because the driver is only # useful in some special situations and should be normally not used. # # Signed-off-by: "Venkatesh Pallipadi" # Signed-off-by: Andi Kleen # Cc: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/cpufreq/Makefile # 2004/11/07 18:11:16-08:00 ak@suse.de +4 -0 # x86_64: Add p4 clockmod # # arch/x86_64/kernel/cpufreq/Kconfig # 2004/11/07 18:10:44-08:00 ak@suse.de +24 -0 # x86_64: Add p4 clockmod # # ChangeSet # 2004/11/07 19:43:26-08:00 blaisorblade_spam@yahoo.it # [PATCH] ptrace POKEUSR: add comment about the DR7 check. # # The DR7 register on i386/x86_64 has a special meaning, so there is a # special check to do. Since the code is rather difficult, I added an # explaination about it. Also, while studying the i386 Intel Manual, I saw # that x86_64, even on 32bit emulation, allows using values which are # disallowed on i386. It's almost obvious that what it allows is setting a # 8-byte wide data watchpoint (in fact I double checked the AMD manuals, just # in case, and this is true; I couldn't find a mention of this in my Intel # manuals). # # But since the original ia32 emulation code has this comment: # # /* You are not expected to understand this ... I don't neither. */ # # I am dubious that the code in ptrace32.c is wrong: does x86_64 supports # 8byte-wide watchpoints in 32-bit emulation? I've checked the AMD manual # Vol. 2 (no. 24593), which says that to set the length to 8 bits "long # mode must be enabled". This means, actually, that the current code is # safe, notwithstanding the comment (which I removed). # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Roland McGrath , Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/ptrace.c # 2004/11/07 18:10:34-08:00 blaisorblade_spam@yahoo.it +2 -0 # ptrace POKEUSR: add comment about the DR7 check. # # arch/x86_64/ia32/ptrace32.c # 2004/11/07 18:10:34-08:00 blaisorblade_spam@yahoo.it +2 -1 # ptrace POKEUSR: add comment about the DR7 check. # # arch/i386/kernel/ptrace.c # 2004/11/07 18:10:34-08:00 blaisorblade_spam@yahoo.it +30 -0 # ptrace POKEUSR: add comment about the DR7 check. # # ChangeSet # 2004/11/07 19:43:13-08:00 macro@linux-mips.org # [PATCH] x86, x86_64: Only handle system NMIs on the BSP # # While discussing races in the NMI handler's trailer fiddling with RTC # registers, I've discovered we incorrectly attempt to handle NMIs coming # from the system (memory errors, IOCHK# assertions, etc.) with all # processors even though the interrupts are only routed to the bootstrap # processor. If one of these events coincides with a NMI watchdog tick it # may even be handled multiple times in parallel. # # Here is a fix that makes application processors ignore these events. They # no longer access the NMI status bits at I/O port 0x61 which has also the # advantage of removing the contention on the port when the I/O APIC NMI # watchdog makes all processors arrive at the handler at the same time. # # Signed-off-by: Maciej W. Rozycki # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/traps.c # 2004/11/07 19:10:22-08:00 macro@linux-mips.org +6 -2 # x86, x86_64: Only handle system NMIs on the BSP # # arch/i386/kernel/traps.c # 2004/11/07 18:10:34-08:00 macro@linux-mips.org +5 -1 # x86, x86_64: Only handle system NMIs on the BSP # # ChangeSet # 2004/11/07 19:43:00-08:00 macro@linux-mips.org # [PATCH] UP local APIC bootstrap cleanup # # Here is a patch to do some cleanup to code affected by the recent change to # the bootstrap code responsible for enabling the local APIC. It adds a # message about how to get the APIC enabled if previously disabled by the # BIOS to aid people expecting the former behavior. It removes some # P4-specific code that's become dead as a result of the change. Finally it # improves a couple of inaccurate comments. # # This has been agreed to be reasonable. # # Signed-off-by: "Maciej W. Rozycki" # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/apic.c # 2004/11/07 18:09:04-08:00 macro@linux-mips.org +12 -8 # UP local APIC bootstrap cleanup # # ChangeSet # 2004/11/07 19:42:47-08:00 paulus@samba.org # [PATCH] ppc64: u3_iommu.c use for_each_pci_dev() # # This patch is from Hanna Linder. # # As pci_find_device is going away I've replaced it with pci_get_device # and pci_dev_put. # # Signed-off-by: Hanna Linder # Signed-off-by: Maximilian Attems # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/u3_iommu.c # 2004/11/07 18:08:32-08:00 paulus@samba.org +1 -1 # ppc64: u3_iommu.c use for_each_pci_dev() # # ChangeSet # 2004/11/07 19:42:35-08:00 paulus@samba.org # [PATCH] ppc64: pSeries_iommu.c use for_each_pci_dev # # This patch is from Hanna Linder. # # As pci_find_device is going away using the new for_each_pci_dev macro. # # Signed-off-by: Hanna Linder # Signed-off-by: Maximilian Attems # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_iommu.c # 2004/11/07 18:08:32-08:00 paulus@samba.org +1 -1 # ppc64: pSeries_iommu.c use for_each_pci_dev # # ChangeSet # 2004/11/07 19:42:22-08:00 paulus@samba.org # [PATCH] ppc64: pSeries_pci.c use for_each_pci_dev() # # This patch is from Hanna Linder. # # As pci_find_device is going away using the new for_each_pci_dev macro. # # Signed-off-by: Hanna Linder # Signed-off-by: Maximilian Attems # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_pci.c # 2004/11/07 18:08:32-08:00 paulus@samba.org +1 -1 # ppc64: pSeries_pci.c use for_each_pci_dev() # # ChangeSet # 2004/11/07 19:42:09-08:00 paulus@samba.org # [PATCH] ppc64: pmac_pci.c replace pci_find_device with pci_get_device # # This patch is from Hanna Linder. # # As pci_find_device is going away using the new for_each_pci_dev macro. # # Signed-off-by: Hanna Linder # Signed-off-by: Maximilian Attems # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pmac_pci.c # 2004/11/07 18:08:32-08:00 paulus@samba.org +1 -1 # ppc64: pmac_pci.c replace pci_find_device with pci_get_device # # ChangeSet # 2004/11/07 19:41:57-08:00 paulus@samba.org # [PATCH] ppc64: iSeries_pci.c use for_each_pci_dev() # # This patch is from Hanna Linder. # # As pci_find_device is going away using the new for_each_pci_dev macro. If # someone with a PPC64 system could test it I would appreciate it. # # Signed-off-by: Hanna Linder # Signed-off-by: Maximilian Attems # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/iSeries_pci.c # 2004/11/07 18:08:32-08:00 paulus@samba.org +1 -2 # ppc64: iSeries_pci.c use for_each_pci_dev() # # ChangeSet # 2004/11/07 19:41:44-08:00 paulus@samba.org # [PATCH] ppc64: iommu fixes, round 3 # # This patch is from John Rose . # # This patch changes the following iommu-related things: # # - Renames the [i,p]series versions of iommu_devnode_init(), to keep # things logically separate where possible. # # - Moves iommu_free_table() to generic iommu.c # # - Creates of_cleanup_node(), which will directly precede the dynamic # removal of any device node # # Signed-off-by: John Rose # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/iommu.h # 2004/11/07 18:08:32-08:00 paulus@samba.org +8 -12 # ppc64: iommu fixes, round 3 # # arch/ppc64/kernel/prom.c # 2004/11/07 18:08:32-08:00 paulus@samba.org +11 -8 # ppc64: iommu fixes, round 3 # # arch/ppc64/kernel/pSeries_iommu.c # 2004/11/07 19:10:23-08:00 paulus@samba.org +3 -37 # ppc64: iommu fixes, round 3 # # arch/ppc64/kernel/iommu.c # 2004/11/07 18:08:32-08:00 paulus@samba.org +33 -0 # ppc64: iommu fixes, round 3 # # arch/ppc64/kernel/iSeries_pci.c # 2004/11/07 19:10:24-08:00 paulus@samba.org +1 -1 # ppc64: iommu fixes, round 3 # # arch/ppc64/kernel/iSeries_iommu.c # 2004/11/07 18:08:32-08:00 paulus@samba.org +1 -1 # ppc64: iommu fixes, round 3 # # ChangeSet # 2004/11/07 19:41:31-08:00 anton@samba.org # [PATCH] ppc64: Add option for oprofile to backtrace through spinlocks # # Now that spinlocks are always out of line, oprofile needs to backtrace # through them. The following patch adds this but also adds the ability to # turn it off (via the backtrace_spinlocks option in oprofilefs). # # The backout option is included because the backtracing here is best effort. # On ppc64 the performance monitor exception is not an NMI, we get them only # when interrupts are enabled. This means we can receive a profile hit that # is inside a spinlock when our PC is somewhere completely # # In this patch we check to make sure the PC of the performance monitor # exception as well as the current PC is inside the spinlock region. If so # then we find the callers PC. If this is not true we play it safe and leave # the tick inside the lock region. # # Also, now that we execute the SLB handler in real mode we have to adjust # the address range that we consider as valid real mode addresses. Otherwise # the SLB miss handler will end up as unknown kernel profile hits. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/oprofile/op_model_power4.c # 2004/11/07 18:08:31-08:00 anton@samba.org +36 -8 # ppc64: Add option for oprofile to backtrace through spinlocks # # arch/ppc64/oprofile/op_impl.h # 2004/11/07 18:08:31-08:00 anton@samba.org +1 -0 # ppc64: Add option for oprofile to backtrace through spinlocks # # arch/ppc64/oprofile/common.c # 2004/11/07 18:08:31-08:00 anton@samba.org +5 -0 # ppc64: Add option for oprofile to backtrace through spinlocks # # ChangeSet # 2004/11/07 19:41:18-08:00 olof@austin.ibm.com # [PATCH] ppc64: VIO iommu table property parsing wrong # # With current firmware, the ibm,my-dma-window property now contains two # panes for VSCSI server nodes. This breaks the current tests in the setup # code. # # There's a bunch of references to pre-GA firmware bugs. That's a while ago, # so we can remove the workarounds without breaking anyone. # # Signed-off-by: Olof Johansson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/vio.c # 2004/11/07 18:08:31-08:00 olof@austin.ibm.com +1 -18 # ppc64: VIO iommu table property parsing wrong # # ChangeSet # 2004/11/07 19:41:05-08:00 sfr@canb.auug.org.au # [PATCH] ppc64: iSeries iommu cleanups # # This patch just does some cleanups of iSeries_iommu.c # remove lots of unneeded includes # use list_for_each_entry # white space # formatting # No semantic changes. # # Signed-off-by: Stephen Rothwell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/iSeries_iommu.c # 2004/11/07 19:10:24-08:00 sfr@canb.auug.org.au +30 -59 # ppc64: iSeries iommu cleanups # # ChangeSet # 2004/11/07 19:40:52-08:00 mporter@kernel.crashing.org # [PATCH] ppc32: add PPC440GX L2C error handler # # This patch adds an L2-Cache error handler. In addition, it reenables setup # of the L2 cache based on erratum L2C0_1 now that we have been reassured # that there are no more faulty parts being shipped. If there is a problem, # the error handler will report it. # # Signed-off-by: Eugene Surovegin # Signed-off-by: Matt Porter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/ibm440gx_common.c # 2004/11/07 18:08:31-08:00 mporter@kernel.crashing.org +52 -7 # ppc32: add PPC440GX L2C error handler # # arch/ppc/platforms/4xx/ocotea.c # 2004/11/07 18:08:31-08:00 mporter@kernel.crashing.org +13 -8 # ppc32: add PPC440GX L2C error handler # # ChangeSet # 2004/11/07 19:40:40-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Fixup includes # # include/asm-ppc/time.h has a slightly odd include list which means that # some files include and also hope to get others that they # really shouldn't be. This makes use (time_t) # and (struct rtc_time) instead of , and # fixes up the fallout from the change. # # Compile-tested on lite5200, walnut and defconfig, along with by-hand'ing # everything else that included . # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/time.h # 2004/11/07 18:08:31-08:00 trini@kernel.crashing.org +2 -1 # ppc32: Fixup includes # # arch/ppc/syslib/todc_time.c # 2004/11/07 18:08:31-08:00 trini@kernel.crashing.org +1 -2 # ppc32: Fixup includes # # arch/ppc/syslib/mpc52xx_setup.c # 2004/11/07 18:08:31-08:00 trini@kernel.crashing.org +1 -0 # ppc32: Fixup includes # # arch/ppc/boot/simple/mpc52xx_tty.c # 2004/11/07 18:08:31-08:00 trini@kernel.crashing.org +1 -0 # ppc32: Fixup includes # # ChangeSet # 2004/11/07 19:40:27-08:00 benh@kernel.crashing.org # [PATCH] Fix pmac_zilog as console # # pmac_zilog wasn't properly updating port->timeout, thus broke with serial # console. I'm not sure if that timeout thing was added recently or not, # since the driver used to work fine. This patch fixes that, and adds some # proper SYSRQ support. By default, BREAK is used for sysrq, though some # Apple zilog's seem to have non-working BREAK detection logic, thus the # driver has a #define option you can manually enable when debugging to do # SYSRQ with ctrl-O instead (like pSeries virtual consoles). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/pmac_zilog.h # 2004/11/07 18:08:31-08:00 benh@kernel.crashing.org +1 -0 # Fix pmac_zilog as console # # drivers/serial/pmac_zilog.c # 2004/11/07 18:08:31-08:00 benh@kernel.crashing.org +39 -11 # Fix pmac_zilog as console # # ChangeSet # 2004/11/07 19:40:14-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Add support for Sandpoint X2 # # Adrian Cox has modified the Sandpoint code to once again work on the older # X2 version of the board. The older version has a number of are on the # older version. # # Signed-off-by: Adrian Cox # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/open_pic.h # 2004/11/07 18:08:30-08:00 trini@kernel.crashing.org +1 -0 # ppc32: Add support for Sandpoint X2 # # arch/ppc/syslib/open_pic.c # 2004/11/07 18:08:30-08:00 trini@kernel.crashing.org +7 -2 # ppc32: Add support for Sandpoint X2 # # arch/ppc/syslib/mpc10x_common.c # 2004/11/07 18:08:30-08:00 trini@kernel.crashing.org +6 -7 # ppc32: Add support for Sandpoint X2 # # arch/ppc/platforms/sandpoint.c # 2004/11/07 18:08:30-08:00 trini@kernel.crashing.org +86 -10 # ppc32: Add support for Sandpoint X2 # # ChangeSet # 2004/11/07 19:40:01-08:00 trini@kernel.crashing.org # [PATCH] ppc32: CPM2 bug # # Rune has determined that: # res6 should be 94 bytes long. # # However... It does work @ 92 bytes because the compiler alligns the next # struct (pci_cpm2_t) on a int boundary anyways (no packing specified fo # the structs) # # I tested it with a module that pronted out the address of the PCI struct # that follows the sit_cpm2_t struct. # # Imap = 0xF0000000 # With res6[92] # im-pci is @ 0xf0010430 # # With res6[94] # im-pci is @ 0xf0010430 # # So we're saved by the compiler. # # Here's the patch # # Signed-off-by: Rune Torgersen # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/immap_cpm2.h # 2004/11/07 18:08:30-08:00 trini@kernel.crashing.org +1 -1 # ppc32: CPM2 bug # # ChangeSet # 2004/11/07 19:39:48-08:00 hch@lst.de # [PATCH] more hardirq.h consolidation # # PREEMPT_BITS, SOFTIRQ_BITS, PREEMPT_SHIFT, SOFTIRQ_SHIFT and HARDIRQ_SHIFT # are the same for all architectures (and chaning them in future ports # doesn't make a lot of sense), so move them to . # # Make the HARDIRQ_BITS definition guarded by #ifndef HARDIRQ_BITS instead of # CONFIG_GENERIC_HARDIRQS so we have a saner way to override it once ports # with lots of irq sources are changed to use the generic hardirq framework. # # Ingo, maybe we should change the default for it back to 8 as that's what # most ports use? # # Signed-off-by: Christoph Hellwig # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +12 -12 # more hardirq.h consolidation # # include/asm-v850/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # include/asm-sparc64/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # include/asm-sparc/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # include/asm-sh/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # include/asm-s390/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # include/asm-parisc/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # include/asm-mips/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # include/asm-m68knommu/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # include/asm-m68k/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # include/asm-m32r/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -22 # more hardirq.h consolidation # # include/asm-ia64/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # include/asm-h8300/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # include/asm-cris/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # include/asm-arm26/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -15 # more hardirq.h consolidation # # include/asm-arm/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -19 # more hardirq.h consolidation # # include/asm-alpha/hardirq.h # 2004/11/07 18:08:14-08:00 hch@lst.de +0 -21 # more hardirq.h consolidation # # ChangeSet # 2004/11/07 19:39:35-08:00 hugh@veritas.com # [PATCH] tmpfs: CONFIG_TMPFS=n mount fix # # My tmpfs superblock changes in 2.6.9 messed up mount -t tmpfs when # CONFIG_TMPFS is not enabled: it wrongly claimed to succeed, and left the # directory unusable, giving "Not a directory" errors thereafter. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/shmem.c # 2004/11/07 18:08:04-08:00 hugh@veritas.com +2 -0 # tmpfs: CONFIG_TMPFS=n mount fix # # ChangeSet # 2004/11/07 19:39:22-08:00 jbarnes@engr.sgi.com # [PATCH] fix find_next_best_node() # # If NUMA is enabled, find_next_best_node is responsible for helping build # the zonelist for each pgdat in the system. However, if one sets # PENALTY_FOR_NODE_WITH_CPUS to a large value in an attempt to prefer nodes # w/o CPUs, the local node is erroneously placed after all nodes w/o CPUs in # the pgdat's zonelist. This small patch fixes that by just checking if the # local node is part of the zonelist yet, and if not, returns it first. # # Signed-off-by: Jesse Barnes # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/page_alloc.c # 2004/11/07 18:08:04-08:00 jbarnes@engr.sgi.com +6 -0 # fix find_next_best_node() # # ChangeSet # 2004/11/07 19:39:09-08:00 vrajesh@umich.edu # [PATCH] prio_tree: add Documentation/prio_tree.txt # # Add prio_tree.c documentation. # # Signed-off-by: Rajesh Venkatasubramanian # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/prio_tree.txt # 2004/11/07 18:08:04-08:00 vrajesh@umich.edu +107 -0 # prio_tree: add Documentation/prio_tree.txt # # Documentation/prio_tree.txt # 2004/11/07 18:08:04-08:00 vrajesh@umich.edu +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/Documentation/prio_tree.txt # # ChangeSet # 2004/11/07 19:38:56-08:00 vrajesh@umich.edu # [PATCH] prio_tree: fix prio_tree_expand corner case # # Currently we use prio_tree_root->index_bits to optimize the height of both # the initial heap-and-radix indexed levels of a prio_tree as well as the # heap-and-size indexed overflow-sub-trees. Please see the accompanying # prio_tree documentation patch for further details. # # When index_bits is increased in prio_tree_expand we shuffle the initial # heap-and-radix indexed levels to make sure that vmas are placed in the tree # at appropriate places. Similarly, since the overflow-sub-trees' heights # also depend on prio_tree_root->index_bits we should shuffle all the # overflow-sub-trees when index_bits changes. However, I missed to take care # of this in my implementation. # # Recently Stefan Hornburg (Racke) reported the problem and patiently tested # the trace patches. Hugh Dickins produced the trace patches that helped to # detect the bug. Moreover, Hugh reduced the crash test case to few lines of # code. Thanks to both of them. # # The easy fix is to disable prio_tree_expand code completely. That may lead # to skewed trees in some common cases. Hence, this patch takes a different # approach. # # This patch fixes the problem by not optimizing the height of the # overflow-sub-trees using prio_tree_root->index_bits. Now all # overflow-sub-trees use full BITS_PER_LONG bits of size_index to place the # vmas (that have the same start_vm_pgoff) in an overflow-sub-tree. # # This may result in skewed overflow-sub-trees because all bits in vm_pgoff # above prio_tree_root->index_bits will be 0 (zero). However, processes # rarely map many vmas with the same start_vm_pgoff and different # end_vm_pgoff. Therefore, such skewed sub-trees should be very rare. # # Signed-off-by: Rajesh Venkatasubramanian # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/prio_tree.c # 2004/11/07 18:08:04-08:00 vrajesh@umich.edu +3 -3 # prio_tree: fix prio_tree_expand corner case # # ChangeSet # 2004/11/07 19:38:43-08:00 apw@shadowen.org # [PATCH] bootmem use NODE_DATA # # Whilst looking at simplifying the implmentation of i386 initialisation code # I noticed the following. This change allows these routines to be used in # both node based and flat memory models which allows more of the init code # to be common in these models. # # Convert the default non-node based bootmem routines to use NODE_DATA(0). # This is semantically and functionally identical in any non-node # configuration as NODE_DATA(x) is defined as below. # # #define NODE_DATA(nid) (&contig_page_data) # # For the node cases (CONFIG_NUMA and CONFIG_DISCONTIG_MEM) we can use these # non-node forms where all boot memory is defined on node 0. # # Signed-off-by: Andy Whitcroft # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/bootmem.c # 2004/11/07 18:08:04-08:00 apw@shadowen.org +4 -6 # bootmem use NODE_DATA # # ChangeSet # 2004/11/07 19:38:30-08:00 drizzd@aon.at # [PATCH] sparc32: revert sys_setaltroot # # Description: revert sys_setaltroot # # Signed-off-by: Clemens Buchacher # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/sparc/kernel/systbls.S # 2004/11/07 18:08:03-08:00 drizzd@aon.at +1 -1 # sparc32: revert sys_setaltroot # # ChangeSet # 2004/11/07 19:38:17-08:00 akpm@osdl.org # [PATCH] unexport lock_page() # # It's static inline. Weird. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/filemap.c # 2004/11/07 18:08:03-08:00 akpm@osdl.org +0 -3 # unexport lock_page() # # ChangeSet # 2004/11/07 19:38:05-08:00 wenxiong@us.ibm.com # [PATCH] "PORT_ICOM" defination for icom adapter # # "PORT_ICOM" is not defined. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/serial_core.h # 2004/11/07 18:08:04-08:00 wenxiong@us.ibm.com +3 -0 # "PORT_ICOM" defination for icom adapter # # ChangeSet # 2004/11/07 19:37:52-08:00 wenxiong@us.ibm.com # [PATCH] icom makefile fix # # The new icom.o isn't in drivers/serial/Makefile. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/Makefile # 2004/11/07 18:08:03-08:00 wenxiong@us.ibm.com +1 -0 # icom makefile fix # # ChangeSet # 2004/11/07 19:37:39-08:00 bjorn.helgaas@hp.com # [PATCH] fix HPET time_interpolator registration # # Fixup after mid-air collision between Christoph adding # time_interpolator.mask, and me removing a static time_interpolator struct # from hpet. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/hpet.c # 2004/11/07 18:07:19-08:00 bjorn.helgaas@hp.com +1 -0 # fix HPET time_interpolator registration # # ChangeSet # 2004/11/07 23:52:10+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2214/1: S3C2410 - add missing RTCCON defs # # Patch from Ben Dooks # # Add missing RTCCON definitions # # Signed-off-by: Ben Dooks # # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-rtc.h # 2004/08/25 23:21:14+01:00 ben-linux@org.rmk.(none) +2 -0 # [PATCH] 2214/1: S3C2410 - add missing RTCCON defs # # ChangeSet # 2004/11/07 23:41:22+00:00 elf@com.rmk.(none) # [ARM PATCH] 2213/1: lh7a40x serial.h cleanup # # Patch from Marc Singer # # As requested, this patch removes the # include/asm-arm/arch-lh7a40x/serial.h header. # # # # drivers/serial/serial_lh7a40x.c # 2004/11/07 21:37:53+00:00 elf@com.rmk.(none) +9 -2 # [PATCH] 2213/1: lh7a40x serial.h cleanup # # BitKeeper/deleted/.del-serial.h~4d7e3e13339397ab # 2004/11/07 23:38:16+00:00 elf@com.rmk.(none) +0 -0 # Delete: include/asm-arm/arch-lh7a40x/serial.h # # ChangeSet # 2004/11/07 14:43:49-08:00 torvalds@ppc970.osdl.org # pc110 touchpad driver: be more polite # # The PC110 touchpad driver used to just assume that the hardware # exists, even though in fact the hw is extremely rare indeed, and # just requesting all the resources might stomp on some _other_ # hardware. # # Try to minimize the damage by realizing that the touchpad hw only # exists on old ISA-only hardware, and if we have found a PCI device, # we should not try to load the touchpad driver. # # Verified to fix things for Andries Brouwer. # # drivers/input/mouse/pc110pad.c # 2004/11/07 14:43:42-08:00 torvalds@ppc970.osdl.org +15 -0 # pc110 touchpad driver: be more polite # # The PC110 touchpad driver used to just assume that the hardware # exists, even though in fact the hw is extremely rare indeed, and # just requesting all the resources might stomp on some _other_ # hardware. # # Try to minimize the damage by realizing that the touchpad hw only # exists on old ISA-only hardware, and if we have found a PCI device, # we should not try to load the touchpad driver. # # Verified to fix things for Andries Brouwer. # # ChangeSet # 2004/11/07 10:22:27-08:00 torvalds@ppc970.osdl.org # aio: remove incorrect initialization of "nr_pages" # # We should not claim to have filled in the ring_pages[] array # until we actually _do_ fill it in. It will confuse the code # that frees the structure if we claim there are pages there # that don't exist. # # Noted by Darrick Wong. # # fs/aio.c # 2004/11/07 10:22:21-08:00 torvalds@ppc970.osdl.org +0 -2 # aio: remove incorrect initialization of "nr_pages" # # We should not claim to have filled in the ring_pages[] array # until we actually _do_ fill it in. It will confuse the code # that frees the structure if we claim there are pages there # that don't exist. # # Noted by Darrick Wong. # # ChangeSet # 2004/11/07 10:15:54-08:00 torvalds@ppc970.osdl.org # Do EFI partitions only on ia64. # # Yes, they might be useful somewhere else too, but the EFI # discovery code is so fragile that it's not worth the bother. # # EFI people informed. # # fs/partitions/Kconfig # 2004/11/07 10:15:48-08:00 torvalds@ppc970.osdl.org +1 -1 # Do EFI partitions only on ia64. # # Yes, they might be useful somewhere else too, but the EFI # discovery code is so fragile that it's not worth the bother. # # EFI people informed. # # ChangeSet # 2004/11/07 09:45:43-08:00 linux@rainbow-software.org # [PATCH] make cdu31a work on at least one system # # I've got a Sony CDU33A drive with COR334 controller. The Linux cdu31a # driver was not updated for 2.6 kernel so it does not work. # # Here are patches that try to make the driver working with 2.6 # kernel: # - fix the timeout values in header file # - Make the driver work in 2.6.X # - Added workaround to fix hard lockups on eject # - Fixed door locking problem after mounting empty drive # - Set double-speed drives to double speed by default # - Removed all readahead things - not needed anymore # # It does work on my system. I also know that it's still broken - it uses # cli(), MODULE_PARM and it's also not very fast (I _never_ reached full # 300KB/s with it, but I know that it's possible in Windows) and probably # many other things (I'm new to Linux kernel) - so I'm waiting for comments. # # drivers/cdrom/cdu31a.h # 2004/10/20 07:07:15-07:00 linux@rainbow-software.org +2 -2 # make cdu31a work on at least one system # # drivers/cdrom/cdu31a.c # 2004/10/22 04:34:13-07:00 linux@rainbow-software.org +120 -276 # make cdu31a work on at least one system # # ChangeSet # 2004/11/07 13:30:57+00:00 rmk@flint.arm.linux.org.uk # [ARM] Update mach-types. # # arch/arm/tools/mach-types # 2004/11/07 13:27:52+00:00 rmk@flint.arm.linux.org.uk +22 -3 # Update mach-types. # # ChangeSet # 2004/11/07 12:58:14+00:00 sascha@de.rmk.(none) # [ARM PATCH] 1956/2: Re: Motorola i.MX serial driver # # Patch from Sascha Hauer # # Here is an updated version of the patch: # # - updated the patch according to Russell's comments # - added proper sysrq handling # - update rx counter # # Sascha Hauer # # drivers/serial/Makefile # 2004/07/08 08:19:56+01:00 sascha@de.rmk.(none) +1 -0 # [PATCH] 1956/2: Re: Motorola i.MX serial driver # # drivers/serial/Kconfig # 2004/07/08 08:19:56+01:00 sascha@de.rmk.(none) +23 -0 # [PATCH] 1956/2: Re: Motorola i.MX serial driver # # drivers/serial/imx.c # 2004/07/08 08:20:41+01:00 sascha@de.rmk.(none) +905 -0 # [PATCH] 1956/2: Re: Motorola i.MX serial driver # # drivers/serial/imx.c # 2004/07/08 08:20:41+01:00 sascha@de.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-serial/drivers/serial/imx.c # # ChangeSet # 2004/11/07 10:51:27+00:00 sascha@de.rmk.(none) # [ARM] Update h720x for timer changes. # # Patch from Sascha Hauser # # Update H720x for system timer changes. # # arch/arm/mach-h720x/common.h # 2004/11/07 10:47:49+00:00 sascha@de.rmk.(none) +29 -0 # # arch/arm/mach-h720x/h7202-eval.c # 2004/11/07 10:47:49+00:00 sascha@de.rmk.(none) +2 -6 # [PATCH] Update H720x for timer changes. # # arch/arm/mach-h720x/h7201-eval.c # 2004/11/07 10:47:49+00:00 sascha@de.rmk.(none) +2 -5 # [PATCH] Update H720x for timer changes. # # arch/arm/mach-h720x/cpu-h7202.c # 2004/11/07 10:47:49+00:00 sascha@de.rmk.(none) +6 -5 # [PATCH] Update H720x for timer changes. # # arch/arm/mach-h720x/cpu-h7201.c # 2004/11/07 10:47:49+00:00 sascha@de.rmk.(none) +6 -6 # [PATCH] Update H720x for timer changes. # # arch/arm/mach-h720x/common.h # 2004/11/07 10:47:49+00:00 sascha@de.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-h720x/common.h # # ChangeSet # 2004/11/07 10:23:14+00:00 rmk@flint.arm.linux.org.uk # [ARM] Eliminate include/asm-arm/arch-*/serial.h # # Convert all platform serial tables to use a serial8250 platform device # rather than declaring a static table in # include/asm-arm/arch-*/serial.h. This change integrates patches from # Sascha Hauser to update H720x serial support, and Tony Lindgren to # update OMAP serial support. # # arch/arm/mach-footbridge/isa.c # 2004/11/07 10:20:34+00:00 rmk@flint.arm.linux.org.uk +48 -0 # # arch/arm/mach-footbridge/isa.c # 2004/11/07 10:20:34+00:00 rmk@flint.arm.linux.org.uk +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-footbridge/isa.c # # include/asm-arm/serial.h # 2004/11/07 10:20:33+00:00 rmk@flint.arm.linux.org.uk +1 -5 # asm/arch/serial.h is no longer used; platforms should provide # serial platform devices instead. # # include/asm-arm/arch-omap/uncompress.h # 2004/11/07 10:20:33+00:00 rmk@flint.arm.linux.org.uk +1 -1 # Include serial definitions from asm/arch/hardware.h rather than # asm/arch/serial.h. # # Patch from Tony Lindgren. # # include/asm-arm/arch-omap/hardware.h # 2004/11/07 10:20:33+00:00 rmk@flint.arm.linux.org.uk +20 -0 # Move OMAP definitions from arch-omap/serial.h # # Patch from Tony Lindgren # # arch/arm/mach-shark/core.c # 2004/11/07 10:20:33+00:00 rmk@flint.arm.linux.org.uk +41 -0 # Add serial platform devices. # # arch/arm/mach-sa1100/trizeps.c # 2004/11/07 10:20:32+00:00 rmk@flint.arm.linux.org.uk +31 -3 # Add serial platform devices. # # arch/arm/mach-rpc/riscpc.c # 2004/11/07 10:20:32+00:00 rmk@flint.arm.linux.org.uk +22 -0 # Add serial platform devices. # # arch/arm/mach-omap/common.c # 2004/11/07 10:20:32+00:00 rmk@flint.arm.linux.org.uk +45 -33 # Add serial platform devices. # # Patch from Tony Lindgren # # arch/arm/mach-h720x/cpu-h7202.c # 2004/11/07 10:20:32+00:00 rmk@flint.arm.linux.org.uk +46 -0 # Add serial platform devices. # # Patch from Sascha Hauer # # arch/arm/mach-footbridge/Makefile # 2004/11/07 10:20:32+00:00 rmk@flint.arm.linux.org.uk +2 -0 # Add isa.o object for ISA devices. # # arch/arm/mach-epxa10db/arch.c # 2004/11/07 10:20:32+00:00 rmk@flint.arm.linux.org.uk +31 -0 # Add serial platform devices. Unfortunately, UARTCLK appears to be zero, # which is invalid, so add #error statements to ensure that this gets # fixed up. # # arch/arm/mach-ebsa110/core.c # 2004/11/07 10:20:32+00:00 rmk@flint.arm.linux.org.uk +36 -0 # Add serial platform devices. # # arch/arm/mach-clps7500/core.c # 2004/11/07 10:20:31+00:00 rmk@flint.arm.linux.org.uk +50 -0 # Add serial platform devices. # # BitKeeper/deleted/.del-serial.h~dc20c028d70e1af7 # 2004/11/07 10:11:24+00:00 rmk@flint.arm.linux.org.uk +0 -28 # Delete: include/asm-arm/arch-omap/serial.h # # BitKeeper/deleted/.del-serial.h~74b1df2b9b3e7939 # 2004/11/07 10:02:30+00:00 rmk@flint.arm.linux.org.uk +2 -0 # Delete: include/asm-arm/arch-h720x/serial.h # # BitKeeper/deleted/.del-serial.h~81f7e76f8b16ce61 # 2004/11/07 09:55:53+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-versatile/serial.h # # BitKeeper/deleted/.del-serial.h~d3d6ad8e9fd491a6 # 2004/11/07 09:55:52+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-shark/serial.h # # BitKeeper/deleted/.del-serial.h~5b5c999cf68b721d # 2004/11/07 09:55:50+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-sa1100/serial.h # # BitKeeper/deleted/.del-serial.h~d0b12f61fb1d292d # 2004/11/07 09:55:49+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-s3c2410/serial.h # # BitKeeper/deleted/.del-serial.h~67f23e2a7e136fcf # 2004/11/07 09:55:48+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-rpc/serial.h # # BitKeeper/deleted/.del-serial.h~65fa826540d10a74 # 2004/11/07 09:55:47+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-pxa/serial.h # # BitKeeper/deleted/.del-serial.h~f5b863ff3028750e # 2004/11/07 09:55:45+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-ixp4xx/serial.h # # BitKeeper/deleted/.del-serial.h~1b41e6379594682 # 2004/11/07 09:55:43+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-ixp2000/serial.h # # BitKeeper/deleted/.del-serial.h~b2a1d466ed76e2aa # 2004/11/07 09:55:42+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-integrator/serial.h # # BitKeeper/deleted/.del-serial.h~2590e516bb0aa106 # 2004/11/07 09:55:40+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-imx/serial.h # # BitKeeper/deleted/.del-serial.h~dbca8d9aebcdfcbd # 2004/11/07 09:55:39+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-epxa10db/serial.h # # BitKeeper/deleted/.del-serial.h~ab14efb89ca9ed61 # 2004/11/07 09:55:37+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-ebsa285/serial.h # # BitKeeper/deleted/.del-serial.h~7818305789f50755 # 2004/11/07 09:55:36+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-ebsa110/serial.h # # BitKeeper/deleted/.del-serial.h~b584090f83da9438 # 2004/11/07 09:55:35+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-cl7500/serial.h # # ChangeSet # 2004/11/06 21:50:06-08:00 torvalds@ppc970.osdl.org # Remove stale 0-byte files # # They happen with "bk cset -x" - it only undoes the data # changes, not the metadata updates. # # BitKeeper/deleted/.del-mmap.c~dc4c51e9aef852f1 # 2004/11/06 21:49:02-08:00 torvalds@ppc970.osdl.org +0 -0 # Delete: arch/x86_64/mm/mmap.c # # BitKeeper/deleted/.del-arch.c~85891c00688ce0dc # 2004/11/06 21:49:02-08:00 torvalds@ppc970.osdl.org +0 -0 # Delete: arch/arm/mach-iop3xx/arch.c # # ChangeSet # 2004/11/06 19:46:11-08:00 torvalds@ppc970.osdl.org # Revert x86-64 flexmap code for now # # For some as-yet unclear reason, it seems to break legacy # 32-bit apps on x86-64. # # Cset exclude: ak@suse.de[torvalds]|ChangeSet|20041102230307|11901 # # include/asm-x86_64/processor.h # 2004/11/06 19:46:09-08:00 torvalds@ppc970.osdl.org +0 -0 # Revert x86-64 flexmap code for now # # arch/x86_64/mm/mmap.c # 2004/11/06 19:46:09-08:00 torvalds@ppc970.osdl.org +0 -0 # Revert x86-64 flexmap code for now # # arch/x86_64/mm/Makefile # 2004/11/06 19:46:09-08:00 torvalds@ppc970.osdl.org +0 -0 # Revert x86-64 flexmap code for now # # ChangeSet # 2004/11/06 21:42:26+01:00 marcel@holtmann.org # [Bluetooth] Make some functions static # # This patch makes some needlessly global functions static. # # Signed-off-by: Adrian Bunk # Signed-off-by: Marcel Holtmann # # drivers/bluetooth/btuart_cs.c # 2004/11/06 21:41:09+01:00 marcel@holtmann.org +12 -12 # Make some functions static # # drivers/bluetooth/bt3c_cs.c # 2004/11/06 21:41:08+01:00 marcel@holtmann.org +17 -17 # Make some functions static # # drivers/bluetooth/bluecard_cs.c # 2004/11/06 21:41:07+01:00 marcel@holtmann.org +13 -13 # Make some functions static # # drivers/bluetooth/dtl1_cs.c # 2004/11/06 21:41:06+01:00 marcel@holtmann.org +12 -12 # Make some functions static # # drivers/bluetooth/hci_usb.c # 2004/11/06 21:41:05+01:00 marcel@holtmann.org +3 -3 # Make some functions static # # drivers/bluetooth/hci_usb.h # 2004/11/06 21:41:04+01:00 marcel@holtmann.org +0 -4 # Make some functions static # # drivers/bluetooth/hci_vhci.c # 2004/11/06 21:40:45+01:00 marcel@holtmann.org +2 -2 # Make some functions static # # ChangeSet # 2004/11/06 21:35:44+01:00 marcel@holtmann.org # [Bluetooth] Support responses with zero SCID # # According to the Bluetooth specification there is no need to fill in # the SCID on a failing response. Without a SCID the L2CAP core can't # find the corresponding request for it. In the case of the zero SCID # the signal identifier should be used to match the response to its # request. # # Signed-off-by: Marcel Holtmann # # net/bluetooth/l2cap.c # 2004/11/06 21:30:18+01:00 marcel@holtmann.org +96 -69 # Support responses with zero SCID # # ChangeSet # 2004/11/06 21:18:02+01:00 sam@mars.ravnborg.org # kconfig: fix xconfig and gconfig # # Patch that disabled use of loadable modules broke qconf and gconf. # Fixed by disabling this also for these targets. # # Signed-off-by: Sam Ravnborg # # scripts/kconfig/Makefile # 2004/11/06 21:17:26+01:00 sam@mars.ravnborg.org +5 -4 # Enable build of qconf anf gconf without loadable module support # # ChangeSet # 2004/11/06 20:51:02+01:00 marcel@holtmann.org # [Bluetooth] Add function for triggering a link key change # # This patch adds the hci_conn_change_link_key() function that allows # to trigger a link key change for an existing connection. # # Signed-off-by: Marcel Holtmann # # net/bluetooth/hci_event.c # 2004/11/06 20:49:24+01:00 marcel@holtmann.org +9 -0 # Add function for triggering a link key change # # net/bluetooth/hci_conn.c # 2004/11/06 20:49:18+01:00 marcel@holtmann.org +14 -0 # Add function for triggering a link key change # # include/net/bluetooth/hci_core.h # 2004/11/06 20:49:14+01:00 marcel@holtmann.org +1 -0 # Add function for triggering a link key change # # include/net/bluetooth/hci.h # 2004/11/06 20:48:36+01:00 marcel@holtmann.org +19 -0 # Add function for triggering a link key change # # ChangeSet # 2004/11/06 20:36:37+01:00 marcel@holtmann.org # [Bluetooth] Use usb_kill_urb() for synchronous unlink # # The usb_unlink_urb() for synchronous unlink is deprecated and should # be replaced by usb_kill_urb(). # # Signed-off-by: Marcel Holtmann # # drivers/bluetooth/bcm203x.c # 2004/11/06 20:34:38+01:00 marcel@holtmann.org +1 -1 # Use usb_kill_urb() for synchronous unlink # # drivers/bluetooth/bfusb.c # 2004/11/06 20:33:46+01:00 marcel@holtmann.org +1 -1 # Use usb_kill_urb() for synchronous unlink # # ChangeSet # 2004/11/06 13:44:22-05:00 jgarzik@pobox.com # Remove silly comment from linux/ata.h. # # XFER_xxx is not necessarily "legacy IDE 'stuff'" # # include/linux/ata.h # 2004/11/06 13:44:16-05:00 jgarzik@pobox.com +0 -2 # Remove silly comment from linux/ata.h. # # XFER_xxx is not necessarily "legacy IDE 'stuff'" # # ChangeSet # 2004/11/06 13:39:18-05:00 mroos@linux.ee # [PATCH] ata.h undefined types in USB # # This is todays BK on a x86: # # CC [M] drivers/usb/storage/freecom.o # In file included from include/linux/hdreg.h:4, # from drivers/usb/storage/freecom.c:32: # include/linux/ata.h:197: error: parse error before "u32" # ... # and so on for tens of lines. # # Signed-off-by: Jeff Garzik # # include/linux/ata.h # 2004/11/06 09:47:08-05:00 mroos@linux.ee +2 -0 # ata.h undefined types in USB # # ChangeSet # 2004/11/06 12:50:11-05:00 miltonm@realtime.net # [PATCH] hamradio/hdlcdrv: undo duplicat patch application # # Signed-off-by: Jeff Garzik # # drivers/net/hamradio/hdlcdrv.c # 2004/11/05 05:38:45-05:00 miltonm@realtime.net +0 -2 # undo duplicat patch application # # ChangeSet # 2004/11/06 12:49:59-05:00 miltonm@realtime.net # [PATCH] net/Kconfig: undo duplicate patch application # # Signed-off-by: Jeff Garzik # # drivers/net/Kconfig # 2004/11/05 05:37:26-05:00 miltonm@realtime.net +1 -1 # undo duplicate patch application # # ChangeSet # 2004/11/05 23:50:14-08:00 herbert@gondor.apana.org.au # [NETLINK]: Fix pid rover code. # # I'm not setting the rover pointer at all. Here's a patch to # fix that. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/netlink/af_netlink.c # 2004/11/05 23:49:54-08:00 herbert@gondor.apana.org.au +3 -4 # [NETLINK]: Fix pid rover code. # # I'm not setting the rover pointer at all. Here's a patch to # fix that. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 23:45:52-08:00 kaber@trash.net # [PKT_SCHED]: Fix device leaks in mirred action # # When a mirred action is created it takes two references to the # device (dev_get_by_index + dev_hold), but only drops one when # it gets destroyed. It also leaks a reference when a mirred action # is replaced. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/mirred.c # 2004/11/05 23:45:32-08:00 kaber@trash.net +2 -1 # [PKT_SCHED]: Fix device leaks in mirred action # # When a mirred action is created it takes two references to the # device (dev_get_by_index + dev_hold), but only drops one when # it gets destroyed. It also leaks a reference when a mirred action # is replaced. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 23:44:40-08:00 herbert@gondor.apana.org.au # [NET]: Get rid of unused global counter in neighbour # # This patch gets rid of an unused global counter in neighbour.c. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/core/neighbour.c # 2004/11/05 23:44:20-08:00 herbert@gondor.apana.org.au +0 -3 # [NET]: Get rid of unused global counter in neighbour # # This patch gets rid of an unused global counter in neighbour.c. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 23:43:50-08:00 patrick@tykepenguin.com # [DECNET]: Fix return codes # # This patch fixes the return codes from sendmsg/recvmsg when a signal happens. # Instead of always returning ERESTARTSYS (which confuses X11 rather badly) it # should return EINTR for non-blocking operations. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # net/decnet/dn_nsp_out.c # 2004/11/05 23:43:31-08:00 patrick@tykepenguin.com +2 -2 # [DECNET]: Fix return codes # # This patch fixes the return codes from sendmsg/recvmsg when a signal happens. # Instead of always returning ERESTARTSYS (which confuses X11 rather badly) it # should return EINTR for non-blocking operations. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # net/decnet/af_decnet.c # 2004/11/05 23:43:31-08:00 patrick@tykepenguin.com +3 -3 # [DECNET]: Fix return codes # # This patch fixes the return codes from sendmsg/recvmsg when a signal happens. # Instead of always returning ERESTARTSYS (which confuses X11 rather badly) it # should return EINTR for non-blocking operations. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # include/net/dn_nsp.h # 2004/11/05 23:43:30-08:00 patrick@tykepenguin.com +1 -1 # [DECNET]: Fix return codes # # This patch fixes the return codes from sendmsg/recvmsg when a signal happens. # Instead of always returning ERESTARTSYS (which confuses X11 rather badly) it # should return EINTR for non-blocking operations. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 23:42:48-08:00 patrick@tykepenguin.com # [DECNET]: Route RCU fix # # This patch fixes a missing _bh in the 23 August locking update. # Without this any attempt to read from /proc/net/decnet_cache causes a # 'scheduling while atomic' crash. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # net/decnet/dn_route.c # 2004/11/05 23:42:29-08:00 patrick@tykepenguin.com +1 -1 # [DECNET]: Route RCU fix # # This patch fixes a missing _bh in the 23 August locking update. # Without this any attempt to read from /proc/net/decnet_cache causes a # 'scheduling while atomic' crash. # # Signed-off-by: Patrick Caulfield # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 23:41:43-08:00 kaber@trash.net # [NETFILTER]: Don't use skb_header_pointer in amanda conntrack helper # # Fixes broken packets, noticed by Matthias Andree # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_conntrack_amanda.c # 2004/11/05 23:41:23-08:00 kaber@trash.net +5 -7 # [NETFILTER]: Don't use skb_header_pointer in amanda conntrack helper # # Fixes broken packets, noticed by Matthias Andree # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 23:40:43-08:00 kaber@trash.net # [PKT_SCHED]: ipt: Convert jiffies values to USER_HZ when dumping # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/ipt.c # 2004/11/05 23:40:24-08:00 kaber@trash.net +3 -3 # [PKT_SCHED]: ipt: Convert jiffies values to USER_HZ when dumping # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 23:40:08-08:00 kaber@trash.net # [PKT_SCHED]: gact: Convert jiffies values to USER_HZ when dumping # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/gact.c # 2004/11/05 23:39:49-08:00 kaber@trash.net +3 -3 # [PKT_SCHED]: gact: Convert jiffies values to USER_HZ when dumping # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 23:39:09-08:00 kaber@trash.net # [PKT_SCHED]: mirred: Convert jiffies values to USER_HZ when dumping # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/mirred.c # 2004/11/05 23:38:49-08:00 kaber@trash.net +3 -3 # [PKT_SCHED]: mirred: Convert jiffies values to USER_HZ when dumping # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 23:38:15-08:00 kaber@trash.net # [PKT_SCHED]: pedit: Convert jiffies values to USER_HZ when dumping # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/sched/pedit.c # 2004/11/05 23:37:56-08:00 kaber@trash.net +3 -3 # [PKT_SCHED]: pedit: Convert jiffies values to USER_HZ when dumping # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/06 00:57:08-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # drivers/acpi/tables/tbconvrt.c # 2004/11/06 00:57:05-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/06 00:44:15-05:00 len.brown@intel.com # [ACPI] ACPICA 20041105 from Bob Moore # # Implemented support for FADT revision 2. This was an # interim table (between ACPI 1.0 and ACPI 2.0) that adds # support for the FADT reset register. # # Implemented optional support to allow uninitialized LocalX # and ArgX variables in a control method. The variables # are initialized to an Integer object with a value # of zero. This support is enabled by setting the # acpi_gbl_enable_interpreter_slack flag to TRUE, # which is default unless booted with "acpi=strict". # # Implemented support for Integer objects for the SizeOf # operator. Either 4 or 8 is returned, depending on the # current integer size (32-bit or 64-bit, depending on the # parent table revision). # # Fixed a problem in the implementation of the SizeOf and # ObjectType operators where the operand was resolved to # a value too early, causing incorrect return values for # some objects. # # Fixed some possible memory leaks during exceptional conditions. # # include/acpi/actbl2.h # 2004/11/06 00:44:08-05:00 len.brown@intel.com +54 -36 # ACPICA 20041105 # # include/acpi/acmacros.h # 2004/11/06 00:44:08-05:00 len.brown@intel.com +1 -1 # ACPICA 20041105 # # include/acpi/acinterp.h # 2004/11/06 00:44:08-05:00 len.brown@intel.com +3 -2 # ACPICA 20041105 # # include/acpi/acglobal.h # 2004/11/06 00:44:08-05:00 len.brown@intel.com +4 -1 # ACPICA 20041105 # # include/acpi/acconfig.h # 2004/11/06 00:44:08-05:00 len.brown@intel.com +1 -1 # ACPICA 20041105 # # drivers/acpi/utilities/utcopy.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +17 -10 # ACPICA 20041105 # # drivers/acpi/tables/tbinstal.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +2 -1 # ACPICA 20041105 # # drivers/acpi/tables/tbconvrt.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +29 -15 # ACPICA 20041105 # # drivers/acpi/parser/psparse.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +97 -92 # ACPICA 20041105 # # drivers/acpi/parser/psopcode.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +2 -2 # ACPICA 20041105 # # drivers/acpi/namespace/nswalk.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +2 -2 # ACPICA 20041105 # # drivers/acpi/namespace/nsalloc.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +4 -4 # ACPICA 20041105 # # drivers/acpi/namespace/nsaccess.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +2 -0 # ACPICA 20041105 # # drivers/acpi/executer/exresolv.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +60 -0 # ACPICA 20041105 # # drivers/acpi/executer/exprep.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +1 -0 # ACPICA 20041105 # # drivers/acpi/executer/exoparg1.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +24 -5 # ACPICA 20041105 # # drivers/acpi/executer/exdump.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +21 -27 # ACPICA 20041105 # # drivers/acpi/dispatcher/dswstate.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +1 -0 # ACPICA 20041105 # # drivers/acpi/dispatcher/dswload.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +12 -10 # ACPICA 20041105 # # drivers/acpi/dispatcher/dswexec.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +3 -1 # ACPICA 20041105 # # drivers/acpi/dispatcher/dsmthdat.c # 2004/11/06 00:44:08-05:00 len.brown@intel.com +16 -1 # ACPICA 20041105 # # ChangeSet # 2004/11/05 19:07:05-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] moxa - dead code removal # # Moxa is short the final cleanup from the tty changes so has extra wakeup # calls that can go # # drivers/char/moxa.c # 2004/10/16 14:36:39-07:00 alan@lxorguk.ukuu.org.uk +0 -3 # moxa - dead code removal # # ChangeSet # 2004/11/05 22:03:54-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # drivers/acpi/processor.c # 2004/11/05 22:03:51-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/osl.c # 2004/11/05 22:03:51-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/05 21:44:18-05:00 len.brown@intel.com # merge # # drivers/acpi/osl.c # 2004/11/05 21:44:06-05:00 len.brown@intel.com +0 -1 # merge # # include/linux/acpi.h # 2004/11/05 21:42:25-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/11/05 21:42:24-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/05 16:40:50-08:00 acme@conectiva.com.br # [IPV6]: Fix mca_sfcount[] refcounting in error path. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/ipv6/mcast.c # 2004/11/05 16:40:30-08:00 acme@conectiva.com.br +2 -1 # [IPV6]: Fix mca_sfcount[] refcounting in error path. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 16:35:05-08:00 kaber@trash.net # [PKT_SCHED]: Fix rcu_assign_pointer fallout, use it in the right place # # The patch 'RCU: use rcu_assign_pointer()' # http://linux.bkbits.net:8080/linux-2.6/diffs/net/sched/sch_api.c@1.39?nav=index.html|src/net/|src/net|src/net/sched|related/net/sched/sch_api.c|cset@1.2287 # changed a list_add_tail to list_add_tail_rcu in qdisc_create. It's # dev->qdisc not dev->qdisc_list that is protected by RCU, this patch # reverts that change. It also removes a misleading comment and replaces # the smp_wmb in qdisc_create_dflt by rcu_assign_pointer in dev_activate # to document more clearly what is protected. # # Signed-off-by: David S. Miller # # net/sched/sch_generic.c # 2004/11/05 16:34:45-08:00 kaber@trash.net +2 -4 # [PKT_SCHED]: Fix rcu_assign_pointer fallout, use it in the right place # # The patch 'RCU: use rcu_assign_pointer()' # http://linux.bkbits.net:8080/linux-2.6/diffs/net/sched/sch_api.c@1.39?nav=index.html|src/net/|src/net|src/net/sched|related/net/sched/sch_api.c|cset@1.2287 # changed a list_add_tail to list_add_tail_rcu in qdisc_create. It's # dev->qdisc not dev->qdisc_list that is protected by RCU, this patch # reverts that change. It also removes a misleading comment and replaces # the smp_wmb in qdisc_create_dflt by rcu_assign_pointer in dev_activate # to document more clearly what is protected. # # Signed-off-by: David S. Miller # # net/sched/sch_api.c # 2004/11/05 16:34:45-08:00 kaber@trash.net +1 -3 # [PKT_SCHED]: Fix rcu_assign_pointer fallout, use it in the right place # # The patch 'RCU: use rcu_assign_pointer()' # http://linux.bkbits.net:8080/linux-2.6/diffs/net/sched/sch_api.c@1.39?nav=index.html|src/net/|src/net|src/net/sched|related/net/sched/sch_api.c|cset@1.2287 # changed a list_add_tail to list_add_tail_rcu in qdisc_create. It's # dev->qdisc not dev->qdisc_list that is protected by RCU, this patch # reverts that change. It also removes a misleading comment and replaces # the smp_wmb in qdisc_create_dflt by rcu_assign_pointer in dev_activate # to document more clearly what is protected. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 16:33:32-08:00 tgraf@suug.ch # [PKT_SCHED]: Remove old estimator code, no longer used. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/sch_api.c # 2004/11/05 16:33:12-08:00 tgraf@suug.ch +0 -14 # [PKT_SCHED]: Remove old estimator code, no longer used. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/Makefile # 2004/11/05 16:33:12-08:00 tgraf@suug.ch +0 -1 # [PKT_SCHED]: Remove old estimator code, no longer used. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_sched.h # 2004/11/05 16:33:12-08:00 tgraf@suug.ch +0 -3 # [PKT_SCHED]: Remove old estimator code, no longer used. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/act_api.h # 2004/11/05 16:33:12-08:00 tgraf@suug.ch +0 -1 # [PKT_SCHED]: Remove old estimator code, no longer used. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 16:30:34-08:00 tgraf@suug.ch # [PKT_SCHED]: Builtin qdiscs should avoid all qdisc_destroy() processing. # # None of the code in __qdisc_destroy should be applied to a builtin qdisc # or am I missing something? # # The patch below prevents builtin qdiscs from being destroyed and # fixes a refcnt underflow whould lead to a bogus list unlinking # and dev_put. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/sch_generic.c # 2004/11/05 16:30:14-08:00 tgraf@suug.ch +3 -3 # [PKT_SCHED]: Builtin qdiscs should avoid all qdisc_destroy() processing. # # None of the code in __qdisc_destroy should be applied to a builtin qdisc # or am I missing something? # # The patch below prevents builtin qdiscs from being destroyed and # fixes a refcnt underflow whould lead to a bogus list unlinking # and dev_put. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 16:27:22-08:00 tgraf@suug.ch # [PKT_SCHED]: Initialize lists of builtin qdiscs. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/sch_generic.c # 2004/11/05 16:27:02-08:00 tgraf@suug.ch +2 -0 # [PKT_SCHED]: Initialize lists of builtin qdiscs. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/05 15:57:06-08:00 davem@nuts.davemloft.net # [SUNGEM]: Use CONFIG_PPC_PMAC throughout. # # Fixes some build failures ala bugme bugzilla #3706 # # Signed-off-by: David S. Miller # # drivers/net/sungem.c # 2004/11/05 15:56:15-08:00 davem@nuts.davemloft.net +1 -1 # [SUNGEM]: Use CONFIG_PPC_PMAC throughout. # # ChangeSet # 2004/11/06 00:32:42+01:00 bzolnier@trik.(none) # [ide] siimage: fix the various SI3112 hangs # # From: Alan Cox # (some changes by me - bart) # # The current driver looks at fields before it is safe to, we move the # mod15rm bug handler to be a fixup and this ensures the probe has been # completed before we use the ident data. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/11/06 00:14:41+01:00 bzolnier@trik.(none) +1 -0 # [ide] siimage: fix the various SI3112 hangs # # drivers/ide/setup-pci.c # 2004/11/06 00:14:41+01:00 bzolnier@trik.(none) +2 -2 # [ide] siimage: fix the various SI3112 hangs # # drivers/ide/pci/siimage.c # 2004/11/06 00:14:41+01:00 bzolnier@trik.(none) +19 -3 # [ide] siimage: fix the various SI3112 hangs # # ChangeSet # 2004/11/06 00:31:02+01:00 bzolnier@trik.(none) # [ide] apply undecoded slave fixup only for ide-cs # # From: Alan Cox # (some changes by me - bart) # # We add probe_hwif_init_with_fixup (seperate naming as requested by # Bartlomiej). This runs a fixup on present interfaces before attaching # the drives. In order to be useful we need also an _with_fixup version # of ide_register_hw function. # # The sometimes troublesome undecoded slave detector is moved to its own # function and exported so that ide-cs and the upcoming delkin_cb can both # use it (along with any arch specific cf/pcmcia drivers I don't know # about). The non-relevant checks for this scenario are removed. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/11/06 00:30:38+01:00 bzolnier@trik.(none) +4 -0 # [ide] apply undecoded slave fixup only for ide-cs # # drivers/ide/legacy/ide-cs.c # 2004/11/06 00:30:38+01:00 bzolnier@trik.(none) +1 -1 # [ide] apply undecoded slave fixup only for ide-cs # # drivers/ide/ide.c # 2004/11/06 00:30:38+01:00 bzolnier@trik.(none) +11 -3 # [ide] apply undecoded slave fixup only for ide-cs # # drivers/ide/ide-probe.c # 2004/11/06 00:30:38+01:00 bzolnier@trik.(none) +48 -15 # [ide] apply undecoded slave fixup only for ide-cs # # ChangeSet # 2004/11/06 00:14:15+01:00 adobriyan@mail.ru # kernel-doc: Print preprocessor directives correctly. # # Print preprocessor directives (usually "#ifdef CONFIG_SOMETHING" and "#endif") # in structs definitions correctly (-text, -html, sgmldocs, htmldocs, pdfdocs, # mandocs). # # Correctly means: # - on the separate line # - starting from column 0 # - not glued to the type of the next member # - not breeding if members are separated by comma # - not imitating pointers to functions ("#if defined(CONFIG_X)...") # - not giving bogus warnings because of this imitation # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Sam Ravnborg # # scripts/kernel-doc # 2004/11/03 02:00:39+01:00 adobriyan@mail.ru +37 -3 # kernel-doc: Print preprocessor directives correctly. # # ChangeSet # 2004/11/06 00:07:44+01:00 blaisorblade_spam@yahoo.it # Kbuild: avoid backup localversion files # # Avoid including as localversion-files the *~ files, i.e. backup files. If I # have localversion-a and localversion-a~, I don't want both to be used. Nor I # want to use localversion*~ anyway. # # Don't code that as $(wildcard localversion*[^~]) as that would exclude # "localversion" from the wildcard expansion result, because it requires at # least one character after localversion to exist in the name file. I.e., # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # # Makefile # 2004/11/03 00:16:51+01:00 blaisorblade_spam@yahoo.it +1 -1 # Kbuild: avoid backup localversion files # # ChangeSet # 2004/11/06 00:05:44+01:00 akpm@osdl.org # bk-kbuild utsname fix # # sound/core/info.c:31: sound/utsname.h: No such file or directory # sound/core/info.c: In function `snd_info_version_read': # sound/core/info.c:965: parse error before `CONFIG_SND_VERSION' # sound/core/info.c:962: warning: unused variable `kernel_version' # # # Signed-off-by: Andrew Morton # Signed-off-by Sam Ravnborg # # sound/core/info.c # 2004/11/02 08:44:46+01:00 akpm@osdl.org +4 -1 # bk-kbuild utsname fix # # ChangeSet # 2004/11/05 17:39:51-05:00 len.brown@intel.com # [ACPI] Allow limiting idle C-States. # # Useful to workaround C3 ipw2100 packet loss, # reducing noise or boot issues on some models. # http://bugme.osdl.org/show_bug.cgi?id=3549 # # For static processor driver, boot cmdline: # processor.acpi_cstate_limit=2 # # For processor module, /etc/modprobe.conf: # options processor acpi_cstate_limit=2 # # For manual processor module load: # # modprobe processor acpi_cstate_limit=2 # # From kernel or kernel module: # #include # acpi_set_cstate_limit(2); # # Inspired by patches from Jos Delbar and Andi Kleen # Signed-off-by: Len Brown # # include/linux/acpi.h # 2004/11/05 17:39:45-05:00 len.brown@intel.com +26 -0 # define API to set and get acpi_cstate_limit # # drivers/acpi/processor.c # 2004/11/05 17:39:45-05:00 len.brown@intel.com +10 -1 # set and obey acpi_cstate_limit # # drivers/acpi/osl.c # 2004/11/05 17:39:45-05:00 len.brown@intel.com +9 -0 # define acpi_cstate_limit # # ChangeSet # 2004/11/05 13:49:29-08:00 greg@kroah.com # W1: fix build warnings due to msleep changes. # # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1_int.c # 2004/11/05 13:48:54-08:00 greg@kroah.com +1 -0 # W1: fix build warnings due to msleep changes. # # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1_family.c # 2004/11/05 13:48:54-08:00 greg@kroah.com +1 -0 # W1: fix build warnings due to msleep changes. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/05 13:47:25-08:00 greg@kroah.com # I2C: fix MODULE_PARAM warning in pc87360.c driver # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/pc87360.c # 2004/11/05 13:46:44-08:00 greg@kroah.com +1 -1 # I2C: fix MODULE_PARAM warning in pc87360.c driver # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/05 13:45:00-08:00 khali@linux-fr.org # [PATCH] I2C: New PC8736x chip driver # # This is my port of the pc87360 driver. It supports the hardware # monitoring functions of the National Semiconductor PC8736x Super-I/O # family. The PC87360, PC87363 and PC87364 only do fan monitoring and # control. The PC87365 and PC87366 additionally have voltage and # temperature monitoring. # # The driver was ported upon request from Wincor-Nixdorf, and tested by # Rolf Müller there. I wish to thank Rolf for his very efficient # cooperation. # # Please apply, # thanks. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/pc87360.c # 2004/10/29 13:34:48-07:00 khali@linux-fr.org +1306 -0 # I2C: New PC8736x chip driver # # drivers/i2c/chips/Makefile # 2004/10/29 13:34:48-07:00 khali@linux-fr.org +1 -0 # I2C: New PC8736x chip driver # # drivers/i2c/chips/Kconfig # 2004/10/29 13:36:03-07:00 khali@linux-fr.org +15 -0 # I2C: New PC8736x chip driver # # drivers/i2c/chips/pc87360.c # 2004/10/29 13:34:48-07:00 khali@linux-fr.org +0 -0 # BitKeeper file /home/greg/linux/BK/i2c-2.6/drivers/i2c/chips/pc87360.c # # ChangeSet # 2004/11/05 13:43:41-08:00 bunk@stusta.de # [PATCH] i2c it87.c: remove an unused function # # The patch below removes an unused function from drivers/i2c/chips/it87.c # # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/it87.c # 2004/10/28 14:00:37-07:00 bunk@stusta.de +0 -7 # i2c it87.c: remove an unused function # # ChangeSet # 2004/11/05 13:42:51-08:00 khali@linux-fr.org # [PATCH] I2C: New LM63 chip driver # # This is a new I2C chip driver named lm63, which supports National # Semiconductor's LM63 hardware monitoring chip. The LM63 is similar to # the LM86 (which we do support through our lm90 driver) with additional # monitoring and control of a single fan. It is obviously aimed at the CPU # and high-end graphics adapters markets. This new driver is very similar # in nature to the lm83 and lm90 driver so I don't have much to add. # # I developed the driver on a request from Hard Data Ltd. which are using # Tyan S4882 boards where four LM63 chips are used (one for each CPU). # Tyan provided remote access to a test system so that I could test my # driver on real LM63 chips. # # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/Makefile # 2004/10/23 03:28:51-07:00 khali@linux-fr.org +1 -0 # I2C: New LM63 chip driver # # drivers/i2c/chips/Kconfig # 2004/10/26 11:56:00-07:00 khali@linux-fr.org +13 -0 # I2C: New LM63 chip driver # # drivers/i2c/chips/lm63.c # 2004/10/26 11:57:45-07:00 khali@linux-fr.org +569 -0 # I2C: New LM63 chip driver # # drivers/i2c/chips/lm63.c # 2004/10/26 11:57:45-07:00 khali@linux-fr.org +0 -0 # BitKeeper file /home/greg/linux/BK/i2c-2.6/drivers/i2c/chips/lm63.c # # ChangeSet # 2004/11/05 13:42:18-08:00 arjan@infradead.org # [PATCH] I2C: remove dead code from i2c # # i2c-core.c has a few never used functions, patch below removes these dead # functions. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/i2c-core.c # 2004/10/26 04:01:34-07:00 arjan@infradead.org +0 -60 # I2C: remove dead code from i2c # # ChangeSet # 2004/11/05 13:41:46-08:00 jthiessen@penguincomputing.com # [PATCH] I2C: lm85.c driver update # # Signed off by: Justin Thiessen # # ChangeSet # 2004/11/05 13:41:39-08:00 torvalds@ppc970.osdl.org # usb: remove totally bogus OHCI iomem casts # # The __iomem attribute was correctly set, and trying to # remove it just causes more problems. # # drivers/usb/host/ohci.h # 2004/11/05 13:41:32-08:00 torvalds@ppc970.osdl.org +2 -2 # usb: remove totally bogus OHCI iomem casts # # The __iomem attribute was correctly set, and trying to # remove it just causes more problems. # # drivers/i2c/chips/lm85.c # 2004/10/24 21:05:04-07:00 jthiessen@penguincomputing.com +388 -29 # I2C: lm85.c driver update # # ChangeSet # 2004/11/05 13:41:16-08:00 johnpol@2ka.mipt.ru # [PATCH] w1/w1_int: replace schedule_timeout() with msleep_interruptible() # # Description: Use msleep_interruptible() instead of schedule_timeout() to # guarantee the task delays as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1_int.c # 2004/10/22 16:07:31-07:00 johnpol@2ka.mipt.ru +1 -3 # w1/w1_int: replace schedule_timeout() with msleep_interruptible() # # ChangeSet # 2004/11/05 13:40:43-08:00 johnpol@2ka.mipt.ru # [PATCH] w1/dscore: replace schedule_timeout() with msleep_interruptible() # # Description: Uses msleep_interruptible() instead of schedule_timeout() # to guarantee the task delays as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/dscore.c # 2004/10/22 16:00:46-07:00 johnpol@2ka.mipt.ru +1 -3 # w1/dscore: replace schedule_timeout() with msleep_interruptible() # # ChangeSet # 2004/11/05 13:40:14-08:00 johnpol@2ka.mipt.ru # [PATCH] w1/w1: replace schedule_timeout() with msleep_interruptible() # # Description: Use msleep_interruptible() instead of schedule_timeout() to # guarantee the task delays as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1.c # 2004/10/22 16:06:51-07:00 johnpol@2ka.mipt.ru +1 -3 # w1/w1: replace schedule_timeout() with msleep_interruptible() # # ChangeSet # 2004/11/05 13:39:29-08:00 johnpol@2ka.mipt.ru # [PATCH] w1/w1_family: replace schedule_timeout() with msleep_interruptible() # # Description: Use msleep_interruptible() instead of schedule_timeout() to # guarantee the task delays as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1_family.c # 2004/10/22 16:07:20-07:00 johnpol@2ka.mipt.ru +1 -3 # w1/w1_family: replace schedule_timeout() with msleep_interruptible() # # ChangeSet # 2004/11/05 22:29:21+01:00 bzolnier@trik.(none) # [ide] remove debugging delay from CS5520 driver # # From: Alan Cox # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/cs5520.c # 2004/11/05 17:07:46+01:00 bzolnier@trik.(none) +0 -2 # [ide] remove debugging delay from CS5520 driver # # ChangeSet # 2004/11/05 22:14:55+01:00 bzolnier@trik.(none) # [ide] (partially) unify hdreg.h & ata.h # # Signed-off-by: Chris Wedgwood # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/hdreg.h # 2004/11/02 20:32:44+01:00 bzolnier@trik.(none) +2 -21 # [ide] (partially) unify hdreg.h & ata.h # # include/linux/ata.h # 2004/11/02 20:32:44+01:00 bzolnier@trik.(none) +6 -2 # [ide] (partially) unify hdreg.h & ata.h # # ChangeSet # 2004/11/05 22:07:36+01:00 bzolnier@trik.(none) # [ide] remove some cruft from ide.h # # From: Chris Wedgwood # (minor changes by me - bart) # # Remove some accumulated (unused) cruft from ide.h # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/11/05 22:07:16+01:00 bzolnier@trik.(none) +0 -23 # [ide] remove some cruft from ide.h # # ChangeSet # 2004/11/05 20:44:27+00:00 tony@com.rmk.(none) # [ARM PATCH] 2195/1: Updates to OMAP clock framework # # Patch from Tony Lindgren # # This patch by Tuukka Tikkanen updates the OMAP clock framework. # It also contains a patch by Juha Yrjölä to enable 216MHz rate # on 16xx. # # Signed-off-by: Tony Lindgren # Signed-off-by: Russell King # # arch/arm/mach-omap/clock.h # 2004/11/03 17:57:56+00:00 tony@com.rmk.(none) +2 -2 # [PATCH] 2195/1: Updates to OMAP clock framework # # arch/arm/mach-omap/clock.c # 2004/11/03 17:57:59+00:00 tony@com.rmk.(none) +70 -62 # [PATCH] 2195/1: Updates to OMAP clock framework # # ChangeSet # 2004/11/05 20:33:28+00:00 tony@com.rmk.(none) # [ARM PATCH] 2194/1: Change OMAP serial port init to use autodetection # # Patch from Tony Lindgren # # This patch changes OMAP serial ports to use the standard 8250 # autodetection. # # Signed-off-by: Tony Lindgren # Signed-off-by: Russell King # # include/asm-arm/arch-omap/serial.h # 2004/11/04 01:01:26+00:00 tony@com.rmk.(none) +18 -24 # [PATCH] 2194/1: Change OMAP serial port init to use autodetection # # arch/arm/mach-omap/common.c # 2004/11/04 01:01:00+00:00 tony@com.rmk.(none) +38 -20 # [PATCH] 2194/1: Change OMAP serial port init to use autodetection # # ChangeSet # 2004/11/05 21:23:16+01:00 bzolnier@trik.(none) # [ide] ns87415: small cleanup # # ide_hwif_setup_dma() calls pci_set_master() if necessary. # pci_set_master() (indirectly via pcibios_set_master()) sets # PCI_LATENCY_TIMER to a "reasonable" value. # # Signed-off-by: Grant Grundler # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/ns87415.c # 2004/09/28 19:07:01+02:00 bzolnier@trik.(none) +0 -4 # [ide] ns87415: small cleanup # # ChangeSet # 2004/11/05 21:17:42+01:00 bzolnier@trik.(none) # [ide] ns87415: PA-RISC update # # From: Grant Grundler # (minor changes by me - bart) # # Move Superio (NatSem 87560) IDE hacks into the ns87415 driver # instead of exporting IDE data structures. # # To date, only PA-RISC port is known to use the 87560 chip. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/ns87415.c # 2004/11/05 21:17:20+01:00 bzolnier@trik.(none) +79 -0 # [ide] ns87415: PA-RISC update # # ChangeSet # 2004/11/05 20:13:07+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2209/1: OMAP - only offer OMAP systems if CONFIG_ARCH_OMAP # # Patch from Ben Dooks # # Ensure that TI OMAP systems are only offered if # the system is configured for TI OMAP. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-omap/Kconfig # 2004/11/05 16:00:11+00:00 ben-linux@org.rmk.(none) +3 -0 # [PATCH] 2209/1: OMAP - only offer OMAP systems if CONFIG_ARCH_OMAP # # ChangeSet # 2004/11/05 21:00:43+01:00 bzolnier@trik.(none) # [ide] shrink hw_regs_t # # sata_[misc,scr] and priv are write-only # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/11/02 19:39:55+01:00 bzolnier@trik.(none) +0 -3 # [ide] shrink hw_regs_t # # drivers/ide/pci/siimage.c # 2004/11/02 19:39:55+01:00 bzolnier@trik.(none) +13 -19 # [ide] shrink hw_regs_t # # ChangeSet # 2004/11/05 19:57:50+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2211/1: S3C2410 - fix idcode of S3C2410A # # Patch from Ben Dooks # # Fix IDCODE for S3C2410A to add missing zero in hex number # # Thanks to Russell King for pointing this out # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/cpu.c # 2004/11/05 17:01:54+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2211/1: S3C2410 - fix idcode of S3C2410A # # ChangeSet # 2004/11/05 19:46:32+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2210/1: S3C2410 - export symbols from arch/arm/mach-s3c2410/gpio.c # # Patch from Ben Dooks # # Added missing exports of the functions in gpio.c # # Thanks to Dimitry Andric for pointing this out # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/gpio.c # 2004/11/05 16:36:26+00:00 ben-linux@org.rmk.(none) +17 -0 # [PATCH] 2210/1: S3C2410 - export symbols from arch/arm/mach-s3c2410/gpio.c # # ChangeSet # 2004/11/05 19:36:18+00:00 rmk@flint.arm.linux.org.uk # [ARM] Versatile: Remove CONFIG_MMC ifdef blocks # # These are no longer necessary since MMC support is now merged. # # arch/arm/mach-versatile/core.c # 2004/11/05 19:33:03+00:00 rmk@flint.arm.linux.org.uk +0 -8 # Remove CONFIG_MMC. # # ChangeSet # 2004/11/05 19:26:29+00:00 catalin.marinas@com.rmk.(none) # [ARM] Versatile: patch-2.6.9-ab / patch-2.6.9-pb # # Patch from Catalin Marinas # # Versatile/AB code after splitting core.c # Versatile/PB code after splitting core.c # # ChangeSet # 2004/11/05 11:22:57-08:00 torvalds@ppc970.osdl.org # Fix USB debugging build. # # Too much cut-and-paste, hidden by the fact that without debugging, # "dev_dbg()" doesn't even look at its arguments. # # drivers/usb/core/hub.c # 2004/11/05 11:22:50-08:00 torvalds@ppc970.osdl.org +1 -1 # Fix USB debugging build. # # Too much cut-and-paste, hidden by the fact that without debugging, # "dev_dbg()" doesn't even look at its arguments. # # arch/arm/mach-versatile/versatile_pb.c # 2004/11/05 19:22:48+00:00 catalin.marinas@com.rmk.(none) +109 -0 # # arch/arm/mach-versatile/versatile_pb.c # 2004/11/05 19:22:48+00:00 catalin.marinas@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-versatile/versatile_pb.c # # arch/arm/mach-versatile/versatile_ab.c # 2004/11/05 19:22:40+00:00 catalin.marinas@com.rmk.(none) +45 -0 # # arch/arm/mach-versatile/versatile_ab.c # 2004/11/05 19:22:40+00:00 catalin.marinas@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-versatile/versatile_ab.c # # ChangeSet # 2004/11/05 10:54:13-08:00 torvalds@ppc970.osdl.org # usb: don't "unsuspend" ports that aren't suspended # # It apparently really confuses some things (Apple keyboard # internal hub for one, but possibly others). # # drivers/usb/core/hub.c # 2004/11/05 10:54:06-08:00 torvalds@ppc970.osdl.org +9 -4 # usb: don't "unsuspend" ports that aren't suspended # # It apparently really confuses some things (Apple keyboard # internal hub for one, but possibly others). # # ChangeSet # 2004/11/05 18:19:54+00:00 catalin.marinas@com.rmk.(none) # [ARM] Versatile: patch-2.6.9-common # # Patch from Catalin Marinas # # Common changes for Versatile PB and AB # # arch/arm/mach-versatile/core.h # 2004/11/05 18:16:52+00:00 catalin.marinas@com.rmk.(none) +50 -0 # # arch/arm/mach-versatile/core.h # 2004/11/05 18:16:52+00:00 catalin.marinas@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-versatile/core.h # # arch/arm/mach-versatile/Kconfig # 2004/11/05 18:16:45+00:00 catalin.marinas@com.rmk.(none) +16 -0 # # include/asm-arm/hardware/amba_clcd.h # 2004/11/05 18:16:45+00:00 catalin.marinas@com.rmk.(none) +1 -1 # [PATCH] patch-2.6.9-common # # include/asm-arm/arch-versatile/timex.h # 2004/11/05 18:16:45+00:00 catalin.marinas@com.rmk.(none) +1 -1 # [PATCH] patch-2.6.9-common # # arch/arm/mach-versatile/Kconfig # 2004/11/05 18:16:45+00:00 catalin.marinas@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-versatile/Kconfig # # include/asm-arm/arch-versatile/platform.h # 2004/11/05 18:16:44+00:00 catalin.marinas@com.rmk.(none) +25 -3 # [PATCH] patch-2.6.9-common # # include/asm-arm/arch-versatile/hardware.h # 2004/11/05 18:16:44+00:00 catalin.marinas@com.rmk.(none) +1 -1 # [PATCH] patch-2.6.9-common # # arch/arm/mm/Kconfig # 2004/11/05 18:16:44+00:00 catalin.marinas@com.rmk.(none) +2 -2 # [PATCH] patch-2.6.9-common # # arch/arm/mach-versatile/core.c # 2004/11/05 18:16:44+00:00 catalin.marinas@com.rmk.(none) +117 -79 # [PATCH] patch-2.6.9-common # # arch/arm/mach-versatile/Makefile # 2004/11/05 18:16:44+00:00 catalin.marinas@com.rmk.(none) +2 -0 # [PATCH] patch-2.6.9-common # # arch/arm/kernel/entry-armv.S # 2004/11/05 18:16:43+00:00 catalin.marinas@com.rmk.(none) +1 -1 # [PATCH] patch-2.6.9-common # # arch/arm/kernel/debug.S # 2004/11/05 18:16:43+00:00 catalin.marinas@com.rmk.(none) +1 -1 # [PATCH] patch-2.6.9-common # # arch/arm/Makefile # 2004/11/05 18:16:43+00:00 catalin.marinas@com.rmk.(none) +1 -1 # [PATCH] patch-2.6.9-common # # arch/arm/Kconfig # 2004/11/05 18:16:42+00:00 catalin.marinas@com.rmk.(none) +15 -8 # [PATCH] patch-2.6.9-common # # ChangeSet # 2004/11/05 18:07:10+00:00 catalin.marinas@com.rmk.(none) # [ARM] Versatile: patch-2.6.9-icst307 # # Patch from Catalin Marinas # # Add ICS307 clock support # # include/asm-arm/hardware/icst307.h # 2004/11/05 18:04:08+00:00 catalin.marinas@com.rmk.(none) +38 -0 # # include/asm-arm/hardware/icst307.h # 2004/11/05 18:04:08+00:00 catalin.marinas@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/hardware/icst307.h # # arch/arm/common/icst307.c # 2004/11/05 18:03:56+00:00 catalin.marinas@com.rmk.(none) +161 -0 # # arch/arm/mach-versatile/clock.h # 2004/11/05 18:03:56+00:00 catalin.marinas@com.rmk.(none) +3 -3 # [PATCH] patch-2.6.9-icst307 # # arch/arm/mach-versatile/clock.c # 2004/11/05 18:03:56+00:00 catalin.marinas@com.rmk.(none) +5 -6 # [PATCH] patch-2.6.9-icst307 # # arch/arm/common/icst307.c # 2004/11/05 18:03:56+00:00 catalin.marinas@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/common/icst307.c # # arch/arm/common/Makefile # 2004/11/05 18:03:56+00:00 catalin.marinas@com.rmk.(none) +1 -0 # [PATCH] patch-2.6.9-icst307 # # ChangeSet # 2004/11/05 16:37:39+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix double compare with zero instructions. # # Accessing register index -1 causes vfp_get_double() to enter an # infinite loop. Use VFP_REG_ZERO (value 16) and provide code to # emulate a sixteenth register which always returns 0.0 # # arch/arm/vfp/vfphw.S # 2004/11/05 16:34:33+00:00 rmk@flint.arm.linux.org.uk +5 -0 # Add code to return double 0.0 for VFP_REG_ZERO. # # arch/arm/vfp/vfpdouble.c # 2004/11/05 16:34:33+00:00 rmk@flint.arm.linux.org.uk +2 -2 # Use VFP_REG_ZERO rather than the innocuous -1 value for zero. # # arch/arm/vfp/vfp.h # 2004/11/05 16:34:33+00:00 rmk@flint.arm.linux.org.uk +6 -0 # Add VFP_REG_ZERO for a virtual "zero" register # # ChangeSet # 2004/11/05 15:16:41+00:00 nico@org.rmk.(none) # [ARM PATCH] 2192/1: small optimization to {read|write}sl routines # # Patch from Nicolas Pitre # # Fold two tests in one. # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # arch/arm/lib/io-writesl.S # 2004/11/03 19:32:30+00:00 nico@org.rmk.(none) +4 -5 # [PATCH] 2192/1: small optimization to {read|write}sl routines # # arch/arm/lib/io-readsl.S # 2004/11/03 18:16:02+00:00 nico@org.rmk.(none) +4 -5 # [PATCH] 2192/1: small optimization to {read|write}sl routines # # ChangeSet # 2004/11/05 15:06:59+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2208/1: S3C2410 - pm updates and fixes # # Patch from Ben Dooks # # This fixes the following with s3c24xx power management: # # - debugging needs UARTs enabled, to re-enabled UART clocks, # save their state over suspend, and add this to the current # documentation # # - update the documentation on pm initialisation # # - fix bug reported by Dimitry Andric where __raw_writel() # has arguments the wrong way around # # - fix typo (lower-case letter in S3C2410_GATSTUs2_OFFRESET) # from Dimitry Andric # # - apply Arnaud Patard's patch for pm call types # # - move bits of resume code to use printk(KERN_DEBUG) as they # are potentially before the UART resume, and are not critical # if the system fails to re-start. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-gpio.h # 2004/11/05 12:34:37+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2208/1: S3C2410 - pm updates and fixes # # arch/arm/mach-s3c2410/sleep.S # 2004/11/05 12:34:37+00:00 ben-linux@org.rmk.(none) +13 -1 # [PATCH] 2208/1: S3C2410 - pm updates and fixes # # arch/arm/mach-s3c2410/pm.c # 2004/11/05 12:36:04+00:00 ben-linux@org.rmk.(none) +78 -14 # [PATCH] 2208/1: S3C2410 - pm updates and fixes # # Documentation/arm/Samsung-S3C24XX/Suspend.txt # 2004/11/05 12:34:37+00:00 ben-linux@org.rmk.(none) +21 -3 # [PATCH] 2208/1: S3C2410 - pm updates and fixes # # ChangeSet # 2004/11/05 14:54:12+00:00 jelenz@edu.rmk.(none) # [ARM PATCH] 2206/1: convert locomo to use platform_get_resource\platform_get_irq # # Patch from John Lenz # # Similar to sa1111.c, convert the locomo_probe function to use # the platform_get_resource\platform_get_irq instead of accessing # the pdev->resources array directly. # # arch/arm/common/locomo.c # 2004/11/05 00:00:00+00:00 jelenz@edu.rmk.(none) +8 -10 # [PATCH] 2206/1: convert locomo to use platform_get_resource\platform_get_irq # # ChangeSet # 2004/11/05 14:42:03+00:00 peterc@au.rmk.(none) # [ARM PATCH] 2205/1: Fix compilation for IXDP425: typo in mach-ixp4xx/common.c # # Patch from Peter Chubb # # Fix a simple typo. # # arch/arm/mach-ixp4xx/common.c # 2004/11/03 03:50:59+00:00 peterc@au.rmk.(none) +1 -1 # [PATCH] 2205/1: Fix compilation for IXDP425: typo in mach-ixp4xx/common.c # # ChangeSet # 2004/11/05 14:29:47+00:00 nico@org.rmk.(none) # [ARM PATCH] 2203/1: trivial asm optimization for csum code # # Patch from Nicolas Pitre # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # arch/arm/lib/csumpartialcopygeneric.S # 2004/11/04 01:25:50+00:00 nico@org.rmk.(none) +1 -2 # [PATCH] 2203/1: trivial asm optimization for csum code # # arch/arm/lib/csumpartial.S # 2004/11/03 22:23:59+00:00 nico@org.rmk.(none) +1 -2 # [PATCH] 2203/1: trivial asm optimization for csum code # # ChangeSet # 2004/11/05 14:18:12+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2199/1: S3C2410 - fix warning in include/asm-arm/arch-s3c2410/dma.h # # Patch from Ben Dooks # # Make addr_reg an `void __iomem *` instead of an unsigned long. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # ChangeSet # 2004/11/05 14:16:15+00:00 aia21@cantab.net # NTFS: Minor cleanup of fs/ntfs/debug.c. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/debug.c # 2004/11/05 14:16:06+00:00 aia21@cantab.net +9 -10 # Minor cleanup. # # include/asm-arm/arch-s3c2410/dma.h # 2004/11/04 17:18:27+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2199/1: S3C2410 - fix warning in include/asm-arm/arch-s3c2410/dma.h # # ChangeSet # 2004/11/05 14:13:07+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2193/1: S3C2410 - fix wake mask for IRQEINT[0..3], and IRQ_RTC # # Patch from Ben Dooks # # Fix incorrect bit masking of the wake maskes for # IRQs EINT0 through EINT3 and IRQ_RTC # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/irq.c # 2004/11/04 00:41:25+00:00 ben-linux@org.rmk.(none) +4 -1 # [PATCH] 2193/1: S3C2410 - fix wake mask for IRQEINT[0..3], and IRQ_RTC # # ChangeSet # 2004/11/05 14:08:04+00:00 matthias@net.rmk.(none) # [ARM PATCH] 2191/1: bugfix for PXA SSP # # Patch from Matthias Burghardt # # In ssp_init dev->port is not yet initialized. Thus it cannot be used as an argument for request_mem_region. This patch fixes that. # # arch/arm/mach-pxa/ssp.c # 2004/11/03 19:15:43+00:00 matthias@net.rmk.(none) +1 -1 # [PATCH] 2191/1: bugfix for PXA SSP # # ChangeSet # 2004/11/05 14:03:11+00:00 matthias@net.rmk.(none) # [ARM PATCH] 2185/1: Bit definitions for PXA PWER # # Patch from Matthias Burghardt # # Adds bit definitions for PXA Power Manager Wake-Up Enable Register (PWER) to pxa-regs.h # # Signed-off-by: Matthias Burghardt # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # include/asm-arm/arch-pxa/pxa-regs.h # 2004/11/01 16:19:33+00:00 matthias@net.rmk.(none) +19 -0 # [PATCH] 2185/1: Bit definitions for PXA PWER # # ChangeSet # 2004/11/05 13:00:05+00:00 aia21@cantab.net # NTFS: Fix bug in handling of bad inodes in fs/ntfs/namei.c::ntfs_lookup(). # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/namei.c # 2004/11/05 12:59:56+00:00 aia21@cantab.net +18 -4 # Fix bug in handling of bad inodes in ntfs_lookup(). # # fs/ntfs/ChangeLog # 2004/11/05 12:59:56+00:00 aia21@cantab.net +1 -0 # Update # # ChangeSet # 2004/11/05 12:56:31+00:00 aia21@cantab.net # NTFS: Fix error handling in fs/ntfs/quota.c::ntfs_mark_quotas_out_of_date() # where we failed to release i_sem on the $Quota/$Q attribute inode. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/quota.c # 2004/11/05 12:56:22+00:00 aia21@cantab.net +3 -2 # Fix error handling in ntfs_mark_quotas_out_of_date() where we # failed to release i_sem on the $Quota/$Q attribute inode. # # fs/ntfs/ChangeLog # 2004/11/05 12:56:22+00:00 aia21@cantab.net +2 -0 # Update # # ChangeSet # 2004/11/05 12:48:44+00:00 aia21@cantab.net # NTFS: Rewrite handling of multi sector transfer errors. We now do not set # PageError() when such errors are detected in the async i/o handler fs/ntfs/aops.c::ntfs_end_buffer_async_read(). All users of mst protected attributes now check the magic of each ntfs record as they use it and act appropriately. This has the effect of making errors # granular per ntfs record rather than per page which solves the case # where we cannot access any of the ntfs records in a page when a # single one of them had an mst error. (Thanks to Ken MacFerrin for # the bug report.) # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/mft.c # 2004/11/05 12:48:35+00:00 aia21@cantab.net +15 -4 # Update all users of mst protected attributes to check the magic # of each ntfs record as they use it and act appropriately. # # fs/ntfs/index.c # 2004/11/05 12:48:35+00:00 aia21@cantab.net +10 -12 # Update all users of mst protected attributes to check the magic # of each ntfs record as they use it and act appropriately. # # fs/ntfs/dir.c # 2004/11/05 12:48:35+00:00 aia21@cantab.net +27 -21 # Update all users of mst protected attributes to check the magic # of each ntfs record as they use it and act appropriately. # # fs/ntfs/aops.h # 2004/11/05 12:48:35+00:00 aia21@cantab.net +7 -0 # Update comment. # # fs/ntfs/aops.c # 2004/11/05 12:48:35+00:00 aia21@cantab.net +14 -27 # Do not set PageError() on multi sector transfer errors in the async i/o # handler ntfs_end_buffer_async_read(). # # fs/ntfs/ChangeLog # 2004/11/05 12:48:35+00:00 aia21@cantab.net +9 -0 # Update # # ChangeSet # 2004/11/05 10:58:58+00:00 rmk@flint.arm.linux.org.uk # [ARM] Optimise cache_is_xxx() macros. # # Add CONFIG_CPU_CACHE_VIVT and CONFIG_CPU_CACHE_VIPT and use # these to conditionalise cache_is_xxx(). This allows unnecessary # cache handling code to be removed by the compiler. # # include/asm-arm/system.h # 2004/11/05 10:53:58+00:00 rmk@flint.arm.linux.org.uk +0 -32 # Remove cache_is_xxx() macros. # # include/asm-arm/cacheflush.h # 2004/11/05 10:53:14+00:00 rmk@flint.arm.linux.org.uk +59 -0 # Add cache_is_xxx() macros. Conditionalise them on the # CONFIG_CPU_CACHE_VI[VP]T settings. # # arch/arm/mm/Kconfig # 2004/11/05 10:52:43+00:00 rmk@flint.arm.linux.org.uk +21 -0 # Add CONFIG_CPU_CACHE_VIVT and CONFIG_CPU_CACHE_VIPT # # ChangeSet # 2004/11/05 10:16:35+00:00 rmk@flint.arm.linux.org.uk # [ARM] sa11x0: use ID of -1 for single devices. # # arch/arm/mach-sa1100/generic.c # 2004/11/05 10:12:07+00:00 rmk@flint.arm.linux.org.uk +5 -5 # Use ID of -1 for single devices. # # ChangeSet # 2004/11/05 02:39:37-05:00 jt@bougret.hpl.hp.com # [PATCH] Wireless Extension dropped patchlet # # This tiny bit of the last WE-17 patch was lost between me and # you. I initially decided to wait to resubmit, but Chris Wedgwood # reported that the MadWifi driver needs it. Sorry for not having pushed # harder. # I recreated this patch, and tested with 2.6.10-rc1, and Chris # tested it with MadWifi. Would you mind pushing that up to Linus ? # # Changelog : # o remove unneeded const # o spelling + comments # # Signed-off-by: Jean Tourrilhes # Signed-off-by: Jeff Garzik # # net/core/wireless.c # 2004/11/01 06:24:32-05:00 jt@bougret.hpl.hp.com +7 -2 # Wireless Extension dropped patchlet # # include/net/iw_handler.h # 2004/11/01 06:14:50-05:00 jt@bougret.hpl.hp.com +4 -4 # Wireless Extension dropped patchlet # # ChangeSet # 2004/11/04 21:30:00-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-ref # into intel.com:/home/lenb/src/26-latest-dev # # drivers/pci/quirks.c # 2004/11/04 21:29:56-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/04 21:23:03-05:00 len.brown@intel.com # [ACPI] delete duplicated code resulting from auto-merge # # drivers/pnp/pnpbios/core.c # 2004/11/04 21:22:55-05:00 len.brown@intel.com +0 -9 # delete duplicated code resulting from auto merge # # ChangeSet # 2004/11/04 21:19:35-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # drivers/pnp/pnpbios/core.c # 2004/11/04 21:19:28-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/11/04 21:19:28-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/04 21:15:54-05:00 len.brown@intel.com # [ACPI] disable PNPBIOS if ACPI, even without PNPACPI # # Signed-off-by: Len Brown # # drivers/pnp/pnpbios/core.c # 2004/11/02 15:09:48-05:00 len.brown@intel.com +3 -3 # disable pnpbios if ACPI # # ChangeSet # 2004/11/04 17:10:07-08:00 Andries.Brouwer@cwi.nl # [PATCH] don't divide by zero on bad ext2 fs # # Experimented a bit more with mounting a bad ext2 filesystem. # # An immediate crash was caused by zero EXT2_BLOCKS_PER_GROUP(sb). # The patch below (relative to 2.6.9) adds a few checks to make sure # that things we divide by are not zero. # # fs/ext2/super.c # 2004/11/04 16:48:32-08:00 Andries.Brouwer@cwi.nl +32 -24 # don't divide by zero on bad ext2 fs # # ChangeSet # 2004/11/04 17:07:16-08:00 torvalds@ppc970.osdl.org # Merge bk://kernel.bkbits.net/gregkh/linux/driver-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # MAINTAINERS # 2004/11/04 17:07:12-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/11/04 14:44:35-08:00 maneesh@in.ibm.com # [PATCH] fix kernel BUG at fs/sysfs/dir.c:20! # # On Thu, Nov 04, 2004 at 12:52:38PM -0800, Greg KH wrote: # > Hi, # > # > I get the following BUG in the sysfs code when I do: # > - plug in a usb-serial device. # > - open the port with 'cat /dev/ttyUSB0' # > - unplug the device. # > - stop the 'cat' process with control-C # > # > This used to work just fine before your big sysfs changes. # # There is a similar problem reported by s390 people where we see parent # kobject (directory) going away before child kobject (sub-directory). It # seems kobject code is able to handle this, but not the sysfs. What could # be happening that in sysfs_remove_dir() of parent directory, we try to # remove its contents. It works well with the regular files as it is the # final removal for sysfs_dirent corresponding to the files. But in case # of sub-directory we are doing an extra sysfs_put(). Once while removing # parent and the other one being the one from when sysfs_remove_dir() is # called for the child. # # The following patch worked for the s390 people, I hope same will work in # this case also. # # # o Do not remove sysfs_dirents corresponding to the sub-directory in # sysfs_remove_dir(). They will be removed in the sysfs_remove_dir() call # for the specific sub-directory. # # Signed-off-by: Maneesh Soni # Signed-off-by: Greg Kroah-Hartman # # fs/sysfs/dir.c # 2004/11/04 13:37:32-08:00 maneesh@in.ibm.com +1 -1 # fix kernel BUG at fs/sysfs/dir.c:20! # # ChangeSet # 2004/11/04 14:25:08-08:00 akpm@osdl.org # [PATCH] PG_writeback: fix waitqueue_active memory barrier # # The spin_unlock() in rotate_reclaimable_page() is not a sufficient memory # barrier. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/filemap.c # 2004/11/04 06:23:07-08:00 akpm@osdl.org +1 -1 # PG_writeback: fix waitqueue_active memory barrier # # ChangeSet # 2004/11/04 13:38:29-08:00 torvalds@ppc970.osdl.org # Make "unlock_buffer()" use the optimized "smp_mb__after_clear_bit()". # # "clear_buffer_locked()" is just a nicer name for a clear-bit, and # on x86 (and others) we don't need any expensive memory barriers # after that. # # fs/buffer.c # 2004/11/04 13:38:22-08:00 torvalds@ppc970.osdl.org +1 -1 # Make "unlock_buffer()" use the optimized "smp_mb__after_clear_bit()". # # "clear_buffer_locked()" is just a nicer name for a clear-bit, and # on x86 (and others) we don't need any expensive memory barriers # after that. # # ChangeSet # 2004/11/04 16:38:01-05:00 len.brown@intel.com # [ACPI] keep processor driver loaded even if acpi_disabled # # for benefit of powernow-k8 driver which depends on it # but runs even if acpi is disabled. # # Signed-off-by: Andi Kleen # Signed-off-by: Len Brown # # drivers/acpi/processor.c # 2004/08/05 08:02:25-04:00 len.brown@intel.com +6 -2 # Stay loaded # # ChangeSet # 2004/11/04 16:28:24-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # arch/i386/kernel/dmi_scan.c # 2004/11/04 16:28:20-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/04 13:03:26-08:00 greg@kroah.com # Merge kroah.com:/home/greg/linux/BK/bleed-2.6 # into kroah.com:/home/greg/linux/BK/usb-2.6 # # MAINTAINERS # 2004/11/04 13:03:21-08:00 greg@kroah.com +0 -0 # Auto merged # # ChangeSet # 2004/11/04 15:32:09-05:00 len.brown@intel.com # [ACPI] enable VIA quirk to fix audio interrupt on VIA_8233_5 # http://bugzilla.kernel.org/show_bug.cgi?id=3175 # # Signed-off-by: David Shaohua Li # Signed-off-by: Len Brown # # drivers/pci/quirks.c # 2004/11/04 15:31:50-05:00 len.brown@intel.com +1 -0 # add via quirk for PCI_DEVICE_ID_VIA_8233_5 # # ChangeSet # 2004/11/04 15:27:13-05:00 len.brown@intel.com # manual merge # # include/asm-x86_64/processor.h # 2004/11/04 15:27:06-05:00 len.brown@intel.com +0 -0 # manual merge # # drivers/serial/8250_pnp.c # 2004/11/04 15:27:06-05:00 len.brown@intel.com +0 -1 # manual merge # # ChangeSet # 2004/11/04 12:08:40-08:00 tali@admingilde.org # [PATCH] fix wrong kfifo_init buffer size argument # # kfifo_alloc tries to round up the buffer size to the next power of two. # # But it accidently uses the original size when calling kfifo_init, # which will BUG. # # Acked-by: Stelian Pop # # Signed-off-by: Martin Waitz # Signed-off-by: Linus Torvalds # # kernel/kfifo.c # 2004/11/04 09:00:34-08:00 tali@admingilde.org +2 -4 # fix wrong kfifo_init buffer size argument # # ChangeSet # 2004/11/04 12:02:00-08:00 zaitcev@redhat.com # [PATCH] USB: Patch for ub # # This is a relatively small changeset, to address small nagging problems. # Andrew pointed me at the double registration specifically, so I had to do # something about it. At least now Fabio's box won't collapse if he configures # UB by mistake. Also, a few people complained that the help text was # misleading. # # I have not done anything about the oops on disconnect which happens to # Martin Schlemmer. It's next. After that I can get to Peter Jones' CD # burning patch and doing resets. # # - Fix double kobject registration and eventual oops on unplug if a device # is not cooperating. # - Add a reference to usb-storage into the configuration help. # - Just upping timeouts fixes my ZIP drive. # - Max out the diag (trace) file size. # - Set capacity to zero in case the media is absent. It works in 2.4.10-rc1. # Either Al fixed the block layer, or the whole thing was a bug in ub.c # (and sd.c) and a big misunderstanding. # # Signed-off-by: Pete Zaitcev # Signed-off-by: Greg Kroah-Hartman # # drivers/block/ub.c # 2004/11/02 23:59:07-08:00 zaitcev@redhat.com +37 -25 # USB: Patch for ub # # drivers/block/Kconfig # 2004/11/01 16:09:13-08:00 zaitcev@redhat.com +2 -0 # USB: Patch for ub # # ChangeSet # 2004/11/04 12:00:36-08:00 rml@novell.com # [PATCH] kobject_uevent: add MAINTAINER entry # # Attached patch adds a MAINTAINER entry for the kernel event layer. # # # Signed-Off-By: Robert Love # Signed-off-by: Greg Kroah-Hartman # # MAINTAINERS # 2004/11/04 11:29:41-08:00 rml@novell.com +6 -0 # kobject_uevent: add MAINTAINER entry # # ChangeSet # 2004/11/04 12:00:12-08:00 rml@novell.com # [PATCH] kobject_uevent: fix init ordering # # Looks like kobject_uevent_init is executed before netlink_proto_init and # consequently always fails. Not cool. # # Attached patch switches the initialization over from core_initcall (init # level 1) to postcore_initcall (init level 2). Netlink's initialization # is done in core_initcall, so this should fix the problem. We should be # fine waiting until postcore_initcall. # # Also a couple white space changes mixed in, because I am anal. # # Signed-Off-By: Robert Love # Signed-off-by: Greg Kroah-Hartman # # lib/kobject_uevent.c # 2004/11/04 11:26:54-08:00 rml@novell.com +2 -4 # kobject_uevent: fix init ordering # # ChangeSet # 2004/11/04 11:59:39-08:00 greg@kroah.com # kevent: fix build error if CONFIG_KOBJECT_UEVENT is not selected. # # Thanks to Serge Hallyn for pointing this out. # # Signed-off-by: Greg Kroah-Hartman # # lib/kobject_uevent.c # 2004/11/04 11:59:15-08:00 greg@kroah.com +1 -1 # kevent: fix build error if CONFIG_KOBJECT_UEVENT is not selected. # # Thanks to Serge Hallyn for pointing this out. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/04 11:13:32-08:00 torvalds@evo.osdl.org # x86: regparm calling convention for exceptions and interrupts. # # This clarifies more of the x86 caller/callee stack ownership # issues by making the exception and interrupt handler assembler # interfaces use register calling conventions. # # System calls still use the stack. # # Tested with "crashme" on UP/SMP. # # kernel/irq/handle.c # 2004/11/04 11:13:19-08:00 torvalds@evo.osdl.org +2 -2 # x86: regparm calling convention for exceptions and interrupts. # # This clarifies more of the x86 caller/callee stack ownership # issues by making the exception and interrupt handler assembler # interfaces use register calling conventions. # # System calls still use the stack. # # Tested with "crashme" on UP/SMP. # # kernel/exit.c # 2004/11/04 11:13:19-08:00 torvalds@evo.osdl.org +1 -1 # x86: regparm calling convention for exceptions and interrupts. # # This clarifies more of the x86 caller/callee stack ownership # issues by making the exception and interrupt handler assembler # interfaces use register calling conventions. # # System calls still use the stack. # # Tested with "crashme" on UP/SMP. # # include/linux/kernel.h # 2004/11/04 11:13:19-08:00 torvalds@evo.osdl.org +1 -1 # x86: regparm calling convention for exceptions and interrupts. # # This clarifies more of the x86 caller/callee stack ownership # issues by making the exception and interrupt handler assembler # interfaces use register calling conventions. # # System calls still use the stack. # # Tested with "crashme" on UP/SMP. # # include/linux/irq.h # 2004/11/04 11:13:19-08:00 torvalds@evo.osdl.org +2 -2 # x86: regparm calling convention for exceptions and interrupts. # # This clarifies more of the x86 caller/callee stack ownership # issues by making the exception and interrupt handler assembler # interfaces use register calling conventions. # # System calls still use the stack. # # Tested with "crashme" on UP/SMP. # # include/asm-i386/hw_irq.h # 2004/11/04 11:13:19-08:00 torvalds@evo.osdl.org +7 -7 # x86: regparm calling convention for exceptions and interrupts. # # This clarifies more of the x86 caller/callee stack ownership # issues by making the exception and interrupt handler assembler # interfaces use register calling conventions. # # System calls still use the stack. # # Tested with "crashme" on UP/SMP. # # arch/i386/mm/fault.c # 2004/11/04 11:13:19-08:00 torvalds@evo.osdl.org +2 -2 # x86: regparm calling convention for exceptions and interrupts. # # This clarifies more of the x86 caller/callee stack ownership # issues by making the exception and interrupt handler assembler # interfaces use register calling conventions. # # System calls still use the stack. # # Tested with "crashme" on UP/SMP. # # arch/i386/kernel/traps.c # 2004/11/04 11:13:19-08:00 torvalds@evo.osdl.org +11 -11 # x86: regparm calling convention for exceptions and interrupts. # # This clarifies more of the x86 caller/callee stack ownership # issues by making the exception and interrupt handler assembler # interfaces use register calling conventions. # # System calls still use the stack. # # Tested with "crashme" on UP/SMP. # # arch/i386/kernel/irq.c # 2004/11/04 11:13:19-08:00 torvalds@evo.osdl.org +9 -9 # x86: regparm calling convention for exceptions and interrupts. # # This clarifies more of the x86 caller/callee stack ownership # issues by making the exception and interrupt handler assembler # interfaces use register calling conventions. # # System calls still use the stack. # # Tested with "crashme" on UP/SMP. # # arch/i386/kernel/entry.S # 2004/11/04 11:13:19-08:00 torvalds@evo.osdl.org +17 -24 # x86: regparm calling convention for exceptions and interrupts. # # This clarifies more of the x86 caller/callee stack ownership # issues by making the exception and interrupt handler assembler # interfaces use register calling conventions. # # System calls still use the stack. # # Tested with "crashme" on UP/SMP. # # arch/i386/kernel/cpu/mcheck/p4.c # 2004/11/04 11:13:19-08:00 torvalds@evo.osdl.org +2 -2 # x86: regparm calling convention for exceptions and interrupts. # # This clarifies more of the x86 caller/callee stack ownership # issues by making the exception and interrupt handler assembler # interfaces use register calling conventions. # # System calls still use the stack. # # Tested with "crashme" on UP/SMP. # # ChangeSet # 2004/11/04 10:57:45-08:00 tj@home-tj.org # [PATCH] driver-model: device_add() error path reference counting fix # # df_05_device_add_ref_fix.patch # # In device_add(), @dev wan't put'd properly when it has zero length # bus_id (error path). Fixed. # # # Signed-off-by: Tejun Heo # Signed-off-by: Greg Kroah-Hartman # # drivers/base/core.c # 2004/11/04 10:56:19-08:00 tj@home-tj.org +3 -3 # driver-model: device_add() error path reference counting fix # # ChangeSet # 2004/11/04 10:55:28-08:00 tj@home-tj.org # [PATCH] driver-model: kobject_add() error path reference counting fix # # df_04_kobject_add_ref_fix.patch # # In kobject_add(), @kobj wasn't put'd properly on error path. This # patch fixes it. # # # Signed-off-by: Tejun Heo # Signed-off-by: Greg Kroah-Hartman # # lib/kobject.c # 2004/11/03 18:04:14-08:00 tj@home-tj.org +1 -0 # driver-model: kobject_add() error path reference counting fix # # ChangeSet # 2004/11/04 10:54:31-08:00 tj@home-tj.org # [PATCH] driver-model: sysfs_release() dangling pointer reference fix # # df_03_sysfs_release_fix.patch # # Some attributes are allocated dynamically (e.g. module and device # parameters) and are usually deallocated when the assoicated kobject is # released. So, it's not safe to access attr after putting the kobject. # # # Signed-off-by: Tejun Heo # Signed-off-by: Greg Kroah-Hartman # # fs/sysfs/file.c # 2004/11/03 18:04:14-08:00 tj@home-tj.org +3 -1 # driver-model: sysfs_release() dangling pointer reference fix # # ChangeSet # 2004/11/04 10:48:20-08:00 tj@home-tj.org # [PATCH] driver-model: bus_recan_devices() locking fix # # df_02_bus_rescan_devcies_fix.patch # # bus_rescan_devices() eventually calls device_attach() and thus # requires write locking the corresponding bus. The original code just # called bus_for_each_dev() which only read locks the bus. This patch # separates __bus_for_each_dev() and __bus_for_each_drv(), which don't # do locking themselves, out from the original functions and call them # with read lock in the original functions and with write lock in # bus_rescan_devices(). # # # Signed-off-by: Tejun Heo # Signed-off-by: Greg Kroah-Hartman # # drivers/base/bus.c # 2004/11/04 10:38:31-08:00 tj@home-tj.org +56 -37 # driver-model: bus_recan_devices() locking fix # # ChangeSet # 2004/11/04 10:28:20-08:00 tj@home-tj.org # [PATCH] driver-model: comment fix in bus.c # # df_01_driver_attach_comment_fix.patch # # bus_match() was renamed to driver_probe_device() but the comment for # device_attach() wasn't updated. This patch updates it. # # # Signed-off-by: Tejun Heo # Signed-off-by: Greg Kroah-Hartman # # drivers/base/bus.c # 2004/11/03 18:04:13-08:00 tj@home-tj.org +4 -4 # driver-model: comment fix in bus.c # # ChangeSet # 2004/11/04 10:12:44-08:00 kay.sievers@vrfy.org # [PATCH] add the physical device and the bus to the hotplug environment # # Add the sysfs path of the physical device to the hotplug event of class # and block devices. This should solve the userspace issue not to know if # the device is a virtual one and the "device" symlink will never be created, # but we sit there and wait for it to show up not knowing when we should # give up. # # Also the bus name is added to the hotplug event, so we don't need to # reverse lookup in the /sys/bus/* directory which bus our physical # device belongs to. This is e.g. the value matched against the BUS= key, # that may be used in an udev rule. # # This is a PCI network card: # ACTION=add # SUBSYSTEM=net # DEVPATH=/class/net/eth0 # PHYSDEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:02:01.0 # PHYSDEVBUS=pci # INTERFACE=eth0 # SEQNUM=827 # PATH=/sbin:/bin:/usr/sbin:/usr/bin # HOME=/ # # This is a IDE CDROM: # ACTION=add # SUBSYSTEM=block # DEVPATH=/block/hdc # PHYSDEVPATH=/devices/pci0000:00/0000:00:1f.1/ide1/1.0 # PHYSDEVBUS=ide # SEQNUM=1017 # PATH=/sbin:/bin:/usr/sbin:/usr/bin # HOME=/ # # This is an USB-stick partition: # ACTION=add # SUBSYSTEM=block # DEVPATH=/block/sda/sda1 # PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host1/target1:0:0/1:0:0:0 # PHYSDEVBUS=scsi # SEQNUM=1032 # PATH=/sbin:/bin:/usr/sbin:/usr/bin # HOME=/ # # # Signed-off-by: Kay Sievers # Signed-off-by: Greg Kroah-Hartman # # drivers/block/genhd.c # 2004/11/03 17:53:28-08:00 kay.sievers@vrfy.org +39 -1 # add the physical device and the bus to the hotplug environment # # drivers/base/class.c # 2004/11/03 16:57:19-08:00 kay.sievers@vrfy.org +26 -0 # add the physical device and the bus to the hotplug environment # # ChangeSet # 2004/11/04 11:07:44-07:00 trini@kernel.crashing.org # ppc32: Update MPC8xx code to quasi functional # # From: Dan Malek # Signed-off-by: Robert P. J. Day # Signed-off-by: Tom Rini # # include/asm-ppc/mpc8xx.h # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +1 -5 # request_8xxirq() is dead. # # include/asm-ppc/irq.h # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +17 -5 # Updates for MPC8xx. # # include/asm-ppc/commproc.h # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +37 -32 # General updates. # # include/asm-ppc/8xx_immap.h # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +166 -68 # General updates. # # drivers/serial/cpm_uart/cpm_uart_cpm1.c # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +18 -3 # - Allow for SMC1 to be relocated (microcode updates) # - Add support for an alternate wiring of SMC2. # # drivers/serial/cpm_uart/cpm_uart_core.c # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +15 -0 # - Allow for SMC1 to be relocated (microcode updates) # - Add support for an alternate wiring of SMC2. # # drivers/serial/cpm_uart/cpm_uart.h # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +2 -0 # Add support for an alternate wiring of SMC2. # # arch/ppc/syslib/ppc8xx_pic.c # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +25 -96 # IRQ updates. # # arch/ppc/syslib/m8xx_setup.c # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +47 -18 # IRQ updates. # General updates. # # arch/ppc/platforms/tqm8xx.h # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +0 -2 # request_8xxirq() is dead. # # arch/ppc/platforms/rpxlite.h # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +0 -1 # request_8xxirq() is dead. # # arch/ppc/platforms/rpxclassic.h # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +0 -1 # request_8xxirq() is dead. # # arch/ppc/kernel/softemu8xx.c # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +1 -1 # Fix a warning. # # arch/ppc/kernel/ppc_ksyms.c # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +0 -3 # request_8xxirq() is dead. # # arch/ppc/kernel/head_8xx.S # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +244 -299 # - General updates # - CPU6 cleanup # - Cruft removal. # # arch/ppc/kernel/Makefile # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +1 -1 # We want to include softemu8xx.o only if we don't have the # real deal. # # arch/ppc/configs/rpxlite_defconfig # 2004/11/04 11:07:30-07:00 trini@kernel.crashing.org +177 -114 # Update fully. # # arch/ppc/configs/rpxcllf_defconfig # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +178 -117 # Update fully. # # arch/ppc/configs/mbx_defconfig # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +11 -13 # Update UART driver options. # # arch/ppc/configs/bseip_defconfig # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +10 -13 # Update UART driver options. # # arch/ppc/configs/TQM860L_defconfig # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +10 -13 # Update UART driver options. # # arch/ppc/configs/TQM850L_defconfig # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +11 -13 # Update UART driver options. # # arch/ppc/configs/TQM823L_defconfig # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +11 -13 # Update UART driver options. # # arch/ppc/configs/SPD823TS_defconfig # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +11 -13 # Update UART driver options. # # arch/ppc/configs/SM850_defconfig # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +13 -14 # Update UART driver options. # # arch/ppc/configs/IVMS8_defconfig # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +10 -11 # Update UART driver options. # # arch/ppc/configs/FADS_defconfig # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +11 -13 # Update UART driver options. # # arch/ppc/Kconfig # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +1 -5 # - Make 8xx depend on BROKEN. # - Remove 'SERIAL_CONSOLE' finally. # # arch/ppc/8xx_io/micropatch.c # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +56 -89 # Update and cleanup the Microcode code. # # arch/ppc/8xx_io/fec.c # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +2 -2 # Use request_irq(). # # arch/ppc/8xx_io/enet.c # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +6 -4 # Use request_irq(). # # arch/ppc/8xx_io/commproc.c # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +166 -101 # - Update to use the normal IRQ code. # - Be a bit saner about early memory now. # # arch/ppc/8xx_io/Makefile # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +1 -1 # Remove the old UART driver # # arch/ppc/8xx_io/Kconfig # 2004/11/04 11:07:29-07:00 trini@kernel.crashing.org +29 -37 # - Remove the old UART driver. # - Update Microcode options. # # ChangeSet # 2004/11/04 07:47:37-08:00 axboe@suse.de # [PATCH] queue congestion threshold hysteresis # # We need to open the gap between congestion on/off a little bit, or we # risk burning many cycles continually putting processes on a wait queue # only to wake them up again immediately. This was observed with CFQ at # least, which showed way excessive sys time. # # Patch is from Arjan. # # Signed-off-by: Jens Axboe # Signed-off-by: Linus Torvalds # # drivers/block/ll_rw_blk.c # 2004/11/04 02:16:17-08:00 axboe@suse.de +1 -1 # queue congestion threshold hysteresis # # ChangeSet # 2004/11/04 07:47:25-08:00 axboe@suse.de # [PATCH] add READ_BUFFER_CAPACITY as read-ok command # # Patch is from Daniel Drake # # Signed-off-by: Jens Axboe # Signed-off-by: Daniel Drake # Signed-off-by: Linus Torvalds # # include/linux/cdrom.h # 2004/11/03 14:01:16-08:00 axboe@suse.de +1 -0 # add READ_BUFFER_CAPACITY as read-ok command # # drivers/block/scsi_ioctl.c # 2004/11/03 14:05:08-08:00 axboe@suse.de +1 -0 # add READ_BUFFER_CAPACITY as read-ok command # # ChangeSet # 2004/11/04 13:37:37+00:00 aia21@cantab.net # NTFS: Drop the runlist lock after the vcn has been read in # fs/ntfs/lcnalloc.c::__ntfs_cluster_free(). # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/lcnalloc.c # 2004/11/04 13:37:28+00:00 aia21@cantab.net +1 -1 # Drop the lock after the vcn has been read. # # fs/ntfs/ChangeLog # 2004/11/04 13:37:28+00:00 aia21@cantab.net +2 -0 # Update # # ChangeSet # 2004/11/04 09:05:44+00:00 aia21@cantab.net # NTFS: Fix stupid bug in fs/ntfs/attrib.c::ntfs_external_attr_find() in the # error handling code path that resulted in a BUG() due to trying to # unmap an extent mft record when the mapping of it had failed and it # thus was not mapped. (Thanks to Ken MacFerrin for the bug report.) # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/attrib.c # 2004/11/04 09:05:35+00:00 aia21@cantab.net +5 -2 # Fix stupid bug in fs/ntfs/attrib.c::ntfs_external_attr_find() in the # error handling code path that resulted in a BUG() due to trying to # unmap an extent mft record when the mapping of it had failed and it # thus was not mapped. (Thanks to Ken MacFerrin for the bug report.) # # fs/ntfs/ChangeLog # 2004/11/04 09:05:35+00:00 aia21@cantab.net +4 -0 # Update # # ChangeSet # 2004/11/04 03:35:51-05:00 len.brown@intel.com # [ACPI] remove obsolete blacklist entries (Andi Kleen) # http://bugzilla.kernel.org/show_bug.cgi?id=3164 # # Signed-off-by: Len Brown # # arch/i386/kernel/dmi_scan.c # 2004/11/04 03:32:19-05:00 len.brown@intel.com +0 -15 # remove obsolete blacklist entries # # ChangeSet # 2004/11/03 22:40:11-08:00 davem@nuts.davemloft.net # [TCP]: Fix tcp_diag build with ipv6 completely disabled. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_diag.c # 2004/11/03 22:39:29-08:00 davem@nuts.davemloft.net +14 -0 # [TCP]: Fix tcp_diag build with ipv6 completely disabled. # # ChangeSet # 2004/11/03 20:13:58-08:00 paulus@samba.org # [PATCH] PPC64 mmu_context_init needs to run earlier # # Using idr_get_new_above in init_new_context lets us get rid of an # awkward init function which wasn't running early enough in boot # anyway. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/init.c # 2004/11/02 15:49:08-08:00 paulus@samba.org +1 -14 # PPC64 mmu_context_init needs to run earlier # # ChangeSet # 2004/11/03 16:04:55-08:00 Andries.Brouwer@cwi.nl # [PATCH] avoid semi-infinite loop when mounting bad ext2 # # The routine ext2_readdir() will, when reading a directory page # returns an error, try the next page, without reporting the # error to user space. That is bad, and the patch below changes that. # # In my case the filesystem was damaged, and ext2_readdir wanted # to read 60000+ pages and wrote as many error messages to syslog # ("attempt to access beyond end"), not what one wants. # # [no doubt a similar patch is appropriate for ext3] # # fs/ext2/dir.c # 2004/11/03 15:14:14-08:00 Andries.Brouwer@cwi.nl +2 -1 # avoid semi-infinite loop when mounting bad ext2 # # ChangeSet # 2004/11/03 15:55:22-08:00 Matt_Domsch@dell.com # [NET]: Zero out SIOCGIFHWADDR buffer if dev->addr_len is zero. # # This preserves 2.4.x behavior. # # Signed-off-by: David S. Miller # # net/core/dev.c # 2004/11/03 15:55:02-08:00 Matt_Domsch@dell.com +5 -2 # [NET]: Zero out SIOCGIFHWADDR buffer if dev->addr_len is zero. # # This preserves 2.4.x behavior. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 15:46:58-08:00 greg@kroah.com # USB: fix sparse warnings in cypress_m8 driver # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/cypress_m8.c # 2004/11/03 15:46:50-08:00 greg@kroah.com +4 -4 # USB: fix sparse warnings in cypress_m8 driver # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/03 15:46:31-08:00 lmendez19@austin.rr.com # [PATCH] cypress_m8: add usb-serial driver 'cypress_m8' to kernel tree # # This patch adds the cypress_m8 usb-serial driver for the Delorme Earthmate usb gps and the Cypress hid->com rs232 adapter to the kernel tree. # # Signed-off-by: Lonnie Mendez # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/cypress_m8.h # 2004/10/23 01:49:29-07:00 lmendez19@austin.rr.com +55 -0 # cypress_m8: add usb-serial driver 'cypress_m8' to kernel tree # # drivers/usb/serial/cypress_m8.c # 2004/10/23 01:54:02-07:00 lmendez19@austin.rr.com +1222 -0 # cypress_m8: add usb-serial driver 'cypress_m8' to kernel tree # # drivers/usb/serial/Makefile # 2004/10/23 01:49:29-07:00 lmendez19@austin.rr.com +1 -0 # cypress_m8: add usb-serial driver 'cypress_m8' to kernel tree # # drivers/usb/serial/Kconfig # 2004/10/23 01:49:29-07:00 lmendez19@austin.rr.com +15 -0 # cypress_m8: add usb-serial driver 'cypress_m8' to kernel tree # # MAINTAINERS # 2004/10/23 01:49:29-07:00 lmendez19@austin.rr.com +9 -0 # cypress_m8: add usb-serial driver 'cypress_m8' to kernel tree # # drivers/usb/serial/cypress_m8.h # 2004/10/23 01:49:29-07:00 lmendez19@austin.rr.com +0 -0 # BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/serial/cypress_m8.h # # drivers/usb/serial/cypress_m8.c # 2004/10/23 01:54:02-07:00 lmendez19@austin.rr.com +0 -0 # BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/serial/cypress_m8.c # # Documentation/usb/usb-serial.txt # 2004/10/23 01:49:29-07:00 lmendez19@austin.rr.com +56 -0 # cypress_m8: add usb-serial driver 'cypress_m8' to kernel tree # # ChangeSet # 2004/11/03 15:46:17-08:00 noodles@earth.li # [PATCH] USB: add KC2190 support for usbnet. # # The patch below adds support for the KC2190 usb-to-usb networking # device; the version I have reports itself as: # # Bus 001 Device 003: ID 050f:0190 KC Technology, Inc. # # I was under the impression that support for this had been added a long # time ago, but searching through old kernel versions all I could find was # a comment about the chip, with no support. Patch is against 2.6.9 but is # pretty minimal. # # I don't have a Windows box around to test interoperability with that # driver, but the patch appears to make it work perfectly between 2 Linux # boxes. # # # Signed-off-by: Jonathan McDowell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/usbnet.c # 2004/11/03 03:42:25-08:00 noodles@earth.li +17 -1 # USB: add KC2190 support for usbnet. # # drivers/usb/net/Kconfig # 2004/11/03 03:06:06-08:00 noodles@earth.li +8 -0 # USB: add KC2190 support for usbnet. # # ChangeSet # 2004/11/03 15:42:09-08:00 herbert@gondor.apana.org.au # [NET]: Neighbour table entries counter needs to be atomic_t # # It is updated outside of locks, so... # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/core/neighbour.c # 2004/11/03 15:41:49-08:00 herbert@gondor.apana.org.au +15 -10 # [NET]: Neighbour table entries counter needs to be atomic_t # # It is updated outside of locks, so... # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/neighbour.h # 2004/11/03 15:41:49-08:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Neighbour table entries counter needs to be atomic_t # # It is updated outside of locks, so... # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 15:36:59-08:00 david-b@pacbell.net # [PATCH] USB: ohci-omap, updates for omap1510/5910 and innovator # # On OMAP-1510 the 48MHz DPLL used by USB is now set up earlier in # the boot process. On Innovator, both host ports work by default. # (Although USB2 conflicts with ttyS2, which you might prefer.) # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci-omap.c # 2004/10/21 09:19:33-07:00 david-b@pacbell.net +5 -17 # USB: ohci-omap, updates for omap1510/5910 and innovator # # ChangeSet # 2004/11/03 15:36:45-08:00 david-b@pacbell.net # [PATCH] USB: usb gadget serial driver v2.0 # # This patch updates the serial gadget driver: # # - The bulk is Al Borcher's version 2.0 updates: # # * Use the new utilities to build config descriptors from tables. # # * Add CDC ACM support, which brings lots of goodness including # interop with Windows. # # * Work better given PXA 25x hardware automagic. # # - I have a few minor tweaks. # # * Match the recent tty API change: from_user is gone!! # # * Define new product ID for the CDC ACM version, so Windows # registry won't get confused by the non-ACM version. # # * Add OTG descriptor # # * Allocates packet buffers more efficiently on platforms like # OMAP: use kmalloc not the dma-coherent allocator. # # Al has some docs on how to talk to Windows this, including an INF file. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/serial.c # 2004/11/01 20:06:19-08:00 david-b@pacbell.net +657 -218 # USB: usb gadget serial driver v2.0 # # drivers/usb/gadget/Makefile # 2004/11/01 20:06:43-08:00 david-b@pacbell.net +1 -1 # USB: usb gadget serial driver v2.0 # # ChangeSet # 2004/11/03 15:36:32-08:00 david-b@pacbell.net # [PATCH] USB: usb gadget drivers, minor tweaks # # This has minor patches to the ethernet, file_storage, and zero # gadget drivers. # # - Use longer "manufacturer" strings; CONFIG_LOCALVERSION would overflow. # # - Remove compile warning on file_storage with non-net2280 # # - Oops fix in ethernet gadget, on boards that don't report VBUS # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/zero.c # 2004/10/23 09:00:51-07:00 david-b@pacbell.net +1 -1 # USB: usb gadget drivers, minor tweaks # # drivers/usb/gadget/file_storage.c # 2004/10/23 09:00:51-07:00 david-b@pacbell.net +3 -1 # USB: usb gadget drivers, minor tweaks # # drivers/usb/gadget/ether.c # 2004/10/23 09:00:51-07:00 david-b@pacbell.net +2 -2 # USB: usb gadget drivers, minor tweaks # # ChangeSet # 2004/11/03 15:36:19-08:00 david-b@pacbell.net # [PATCH] USB: ohci, hooks for big-endian registers # # This is the second of the patches from Dale Farnsworth to # support OHCI implementations that use big-endian byte sex # for registers ... all register accesses changed, that's why # it's so large. (It also includes part of an update from # his third patch, so that it compiles/runs by itself.) # # This patch adds support to the OHCI code for big-endian controllers, # maintaining the existing little-endian support. This is done using # the following transforms: # # ohci_readl(p) --> ohci_readl(ohci, p) # writel(v, p) --> ohci_writel(ohci, v, p) # # cpu_to_le16(v) --> cpu_to_hc16(ohci, v) # cpu_to_le16p(v) --> cpu_to_hc16p(ohci, v) # cpu_to_le32(v) --> cpu_to_hc32(ohci, v) # cpu_to_le32p(v) --> cpu_to_hc32p(ohci, v) # # le16_to_cpu(v) --> hc16_to_cpu(ohci, v) # le16_to_cpup(v) --> hc16_to_cpup(ohci, v) # le32_to_cpu(v) --> hc32_to_cpu(ohci, v) # le32_to_cpup(v) --> hc32_to_cpup(ohci, v) # # OHCI_FRAME_NO(ohci->hcca) --> ohci_frame_no(ohci) # # There's no runtime penalty except for systems configured to handle # both byteorders at the same time. # # Signed-off-by: Dale Farnsworth # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci.h # 2004/10/31 12:15:44-08:00 david-b@pacbell.net +173 -64 # USB: ohci, hooks for big-endian registers # # drivers/usb/host/ohci-q.c # 2004/10/31 12:15:44-08:00 david-b@pacbell.net +81 -68 # USB: ohci, hooks for big-endian registers # # drivers/usb/host/ohci-mem.c # 2004/10/31 12:15:44-08:00 david-b@pacbell.net +2 -2 # USB: ohci, hooks for big-endian registers # # drivers/usb/host/ohci-hub.c # 2004/10/31 12:15:44-08:00 david-b@pacbell.net +59 -51 # USB: ohci, hooks for big-endian registers # # drivers/usb/host/ohci-hcd.c # 2004/10/31 12:15:44-08:00 david-b@pacbell.net +54 -52 # USB: ohci, hooks for big-endian registers # # drivers/usb/host/ohci-dbg.c # 2004/10/31 12:15:44-08:00 david-b@pacbell.net +46 -38 # USB: ohci, hooks for big-endian registers # # ChangeSet # 2004/11/03 15:36:05-08:00 david-b@pacbell.net # [PATCH] USB: ohci, remove pre-byteswapped constants # # This is the first of several patches from Dale Farnsworth, # laying groundwork for a patch that supports OHCI on more # chips (IBM STB04xxx and FreeScale MPC52xx). # # # Replace pre-byteswapped constants for in-memory data structures in ohci.h # with cpu-native constants, to help support "big-endian OHCI" hardware. # # Signed-off-by: Dale Farnsworth # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci.h # 2004/10/30 14:11:39-07:00 david-b@pacbell.net +8 -8 # USB: ohci, remove pre-byteswapped constants # # drivers/usb/host/ohci-q.c # 2004/10/30 14:14:23-07:00 david-b@pacbell.net +20 -20 # USB: ohci, remove pre-byteswapped constants # # drivers/usb/host/ohci-mem.c # 2004/10/29 15:37:20-07:00 david-b@pacbell.net +1 -1 # USB: ohci, remove pre-byteswapped constants # # drivers/usb/host/ohci-hcd.c # 2004/10/29 15:37:20-07:00 david-b@pacbell.net +1 -1 # USB: ohci, remove pre-byteswapped constants # # drivers/usb/host/ohci-dbg.c # 2004/10/29 15:37:20-07:00 david-b@pacbell.net +27 -26 # USB: ohci, remove pre-byteswapped constants # # ChangeSet # 2004/11/03 15:34:53-08:00 herbert@gondor.apana.org.au # [NETLINK]: Hash sockets by pid if not multicast. # # Collaborative work between David S. Miller and # Herbert Xu. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/netlink/af_netlink.c # 2004/11/03 15:33:45-08:00 herbert@gondor.apana.org.au +374 -109 # [NETLINK]: Hash sockets by pid if not multicast. # # ChangeSet # 2004/11/03 15:32:42-08:00 stern@rowland.harvard.edu # [PATCH] usbcore: add comment to updated hcd.h # # On Fri, 29 Oct 2004, David Brownell wrote: # # > Could you add a comment there that the HCD is # > now _required_ to return a pointer that usbcore # > can pass to kfree? Since that's a layering # > violation (in anticipation of later changes to # > make it not be one!), it's surprising ... and # > in any case, the memory lifecycle is no longer # > described just by the calls in this header! # # That's a reasonable request, and here's an extra patch to add the comment. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hcd.h # 2004/10/28 08:26:59-07:00 stern@rowland.harvard.edu +6 -0 # usbcore: add comment to updated hcd.h # # ChangeSet # 2004/11/03 15:32:29-08:00 stern@rowland.harvard.edu # [PATCH] dummy-hcd: removal hcd release # # This patch removes the hcd release code from the final host controller # driver, dummy-hcd. Please apply. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/dummy_hcd.c # 2004/10/29 08:38:24-07:00 stern@rowland.harvard.edu +4 -15 # dummy-hcd: removal hcd release # # ChangeSet # 2004/11/03 15:32:15-08:00 stern@rowland.harvard.edu # [PATCH] Non-PCI OHCI drivers: remove hcd release # # This patch changes the non-PCI-based OHCI-related host controller drivers, # removing the code that frees the driver-specific hcd structures. # Unfortunately I am not able to test it, because I don't have the necessary # hardware. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci-sa1111.c # 2004/10/28 08:31:46-07:00 stern@rowland.harvard.edu +2 -8 # Non-PCI OHCI drivers: remove hcd release # # drivers/usb/host/ohci-pxa27x.c # 2004/10/28 08:30:58-07:00 stern@rowland.harvard.edu +2 -8 # Non-PCI OHCI drivers: remove hcd release # # drivers/usb/host/ohci-omap.c # 2004/10/28 12:48:50-07:00 stern@rowland.harvard.edu +3 -9 # Non-PCI OHCI drivers: remove hcd release # # drivers/usb/host/ohci-lh7a404.c # 2004/10/28 08:31:11-07:00 stern@rowland.harvard.edu +2 -8 # Non-PCI OHCI drivers: remove hcd release # # ChangeSet # 2004/11/03 15:32:02-08:00 stern@rowland.harvard.edu # [PATCH] USB PCI drivers: hcd release changes # # This patch removes the code for deallocating the usb_hcd structure from # the three PCI-based host controller drivers. It also moves the embedded # struct usb_hcd member to the front of the larger driver-specific # structures, as required for the core to do its work. Please apply. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-hcd.h # 2004/10/28 08:05:50-07:00 stern@rowland.harvard.edu +1 -1 # USB PCI drivers: hcd release changes # # drivers/usb/host/uhci-hcd.c # 2004/10/28 08:21:24-07:00 stern@rowland.harvard.edu +0 -6 # USB PCI drivers: hcd release changes # # drivers/usb/host/ohci.h # 2004/10/28 08:05:13-07:00 stern@rowland.harvard.edu +5 -4 # USB PCI drivers: hcd release changes # # drivers/usb/host/ohci-pci.c # 2004/10/28 08:17:03-07:00 stern@rowland.harvard.edu +0 -1 # USB PCI drivers: hcd release changes # # drivers/usb/host/ohci-mem.c # 2004/10/28 08:16:55-07:00 stern@rowland.harvard.edu +0 -5 # USB PCI drivers: hcd release changes # # drivers/usb/host/ehci.h # 2004/10/28 08:04:06-07:00 stern@rowland.harvard.edu +7 -6 # USB PCI drivers: hcd release changes # # drivers/usb/host/ehci-mem.c # 2004/10/28 08:17:12-07:00 stern@rowland.harvard.edu +0 -5 # USB PCI drivers: hcd release changes # # drivers/usb/host/ehci-hcd.c # 2004/10/28 08:17:19-07:00 stern@rowland.harvard.edu +0 -1 # USB PCI drivers: hcd release changes # # ChangeSet # 2004/11/03 15:31:47-08:00 stern@rowland.harvard.edu # [PATCH] usbcore: Make the core release hcd structures # # This patch contains changes to usbcore making the core responsible for # deallocating memory for usb_hcd structures, rather than calling back into # the host controller drivers. This solves a long-standing oops, since the # drivers may have been unloaded from memory by the time the release routine # is called. (There probably are some Bugzilla entries caused by this, but # I don't know which ones.) # # To really fix this up properly will require merging the HCD "glue" layer # into the higher core structures. As things stand now, a usb_hcd contains # a usb_bus member, and the usb_bus is associated with a class_device: when # the class_device is released the usb_hcd gets deallocated. It's awkward # in that neither the usb_hcd nor the usb_bus has its own reference count, # and the class_device is created when the bus is registered (not when it is # initialized). # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hcd.h # 2004/10/28 08:26:59-07:00 stern@rowland.harvard.edu +2 -1 # usbcore: Make the core release hcd structures # # drivers/usb/core/hcd.c # 2004/10/28 08:28:41-07:00 stern@rowland.harvard.edu +10 -0 # usbcore: Make the core release hcd structures # # drivers/usb/core/hcd-pci.c # 2004/10/28 08:33:42-07:00 stern@rowland.harvard.edu +2 -10 # usbcore: Make the core release hcd structures # # ChangeSet # 2004/11/03 15:24:57-08:00 david-b@pacbell.net # [PATCH] USB: clean up error messages # # Neither requests to suspended devices nor control request stalls should # ever log fault messages, they happen routinely; this stops such logging. # There's also a better message for control/bulk timeout -- but after the # HCD finishes unlinking the URB, not from 'swapper' in the timer callback! # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/message.c # 2004/10/31 18:01:55-08:00 david-b@pacbell.net +12 -10 # USB: clean up error messages # # drivers/usb/core/hcd.c # 2004/10/31 18:01:51-08:00 david-b@pacbell.net +7 -2 # USB: clean up error messages # # drivers/usb/core/devio.c # 2004/10/31 18:01:57-08:00 david-b@pacbell.net +6 -2 # USB: clean up error messages # # ChangeSet # 2004/11/03 15:24:43-08:00 david-b@pacbell.net # [PATCH] USB: fix bug # # Delete the second pci_set_master(), not the first one. # # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hcd-pci.c # 2004/10/30 15:42:12-07:00 david-b@pacbell.net +1 -1 # USB: fix bug # # ChangeSet # 2004/11/03 15:24:30-08:00 lmendez19@austin.rr.com # [PATCH] usb-serial: add interrupt out support and improved debug messages # # This patch adds equal support for interrupt out transfers to the usb serial # core to match the current interrupt in support. It also improves a few # debug messages, nothing major. # # Signed-off-by: Lonnie Mendez # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/usb-serial.h # 2004/11/01 17:40:39-08:00 lmendez19@austin.rr.com +16 -0 # usb-serial: add interrupt out support and improved debug messages # # drivers/usb/serial/usb-serial.c # 2004/11/01 17:46:42-08:00 lmendez19@austin.rr.com +79 -23 # usb-serial: add interrupt out support and improved debug messages # # ChangeSet # 2004/11/03 15:24:18-08:00 stern@rowland.harvard.edu # [PATCH] dummy-hcd: Refactor startup and shutdown # # This patch reorganizes the startup and shutdown code in the dummy-hcd # driver to make it consistent with all the other host controller drivers. # For example, the platform device representing the HC hardware is # allocated separately and given as an argument to the probe() and remove() # routines, as it would be for a real device. # # This paves the way to making widespread and uniform changes in all the # HCDs at once. Please apply. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/dummy_hcd.c # 2004/10/29 08:38:24-07:00 stern@rowland.harvard.edu +135 -115 # dummy-hcd: Refactor startup and shutdown # # ChangeSet # 2004/11/03 15:24:05-08:00 stern@rowland.harvard.edu # [PATCH] dummy_hcd: minor fixups # # Although this is the first patch in a series of six, it's not closely # related to the others. This includes a whole bunch of simple cleanups # for the dummy-hcd driver, all of which fall into the following categories: # # Convert explicit container_of() to type-safe inline functions, # # Minimize reliance on global variables. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/dummy_hcd.c # 2004/10/29 08:38:24-07:00 stern@rowland.harvard.edu +108 -75 # dummy_hcd: minor fixups # # ChangeSet # 2004/11/03 14:46:01-08:00 nigel.croxon@hp.com # [IA64-HP] Fix for bits_wanted in sba_iommu.c # # bits_wanted is expanded to bytes using the wrong shift value # (when iovp_shift != PAGE_SHIFT), resulting in an explosion of # used iommu resources. # # This potentially results in mistakenly running out of DMA mapping # resources when the system is under *heavy* i/o load. # # Signed-off-by: Nigel Croxon # Signed-off by: Alex Williamson # Signed-off-by: Tony Luck # # arch/ia64/hp/common/sba_iommu.c # 2004/11/03 14:43:08-08:00 nigel.croxon@hp.com +2 -2 # Fix for bits_wanted in sba_iommu.c # # ChangeSet # 2004/11/03 14:42:14-08:00 davem@nuts.davemloft.net # [GNET_STATS]: Export gnet_stats_start_copy_compat to modules. # # Signed-off-by: David S. Miller # # net/core/gen_stats.c # 2004/11/03 14:41:42-08:00 davem@nuts.davemloft.net +1 -0 # [GNET_STATS]: Export gnet_stats_start_copy_compat to modules. # # ChangeSet # 2004/11/03 23:40:52+01:00 sam@mars.ravnborg.org # Merge mars.ravnborg.org:/home/sam/bk/linux-2.6 # into mars.ravnborg.org:/home/sam/bk/to-akpm # # scripts/Makefile.build # 2004/11/03 23:40:43+01:00 sam@mars.ravnborg.org +0 -0 # Auto merged # # ChangeSet # 2004/11/03 14:39:41-08:00 greg@kroah.com # USB: fix up pl2303 device ids that ended up getting duplicated. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/pl2303.h # 2004/11/03 14:39:33-08:00 greg@kroah.com +4 -7 # USB: fix up pl2303 device ids that ended up getting duplicated. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/pl2303.c # 2004/11/03 14:39:33-08:00 greg@kroah.com +1 -1 # USB: fix up pl2303 device ids that ended up getting duplicated. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/03 14:05:33-08:00 tgraf@suug.ch # [PKT_SCHED]: cls_*: use tcf_police_dump_stats to dump via new gnet_stats API # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_u32.c # 2004/11/03 14:05:14-08:00 tgraf@suug.ch +2 -4 # [PKT_SCHED]: cls_*: use tcf_police_dump_stats to dump via new gnet_stats API # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_rsvp.h # 2004/11/03 14:05:14-08:00 tgraf@suug.ch +2 -4 # [PKT_SCHED]: cls_*: use tcf_police_dump_stats to dump via new gnet_stats API # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_route.c # 2004/11/03 14:05:14-08:00 tgraf@suug.ch +2 -4 # [PKT_SCHED]: cls_*: use tcf_police_dump_stats to dump via new gnet_stats API # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_fw.c # 2004/11/03 14:05:14-08:00 tgraf@suug.ch +2 -4 # [PKT_SCHED]: cls_*: use tcf_police_dump_stats to dump via new gnet_stats API # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 14:04:42-08:00 tgraf@suug.ch # [PKT_SCHED]: police: use gnet_stats for old policer stats # # Transforms old policer to use generic statistic via TCA_STATS2 # and maintain backward compatibility via TCA_STATS. Adds a new # API for classifiers to invoke the dumping process. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/police.c # 2004/11/03 14:04:23-08:00 tgraf@suug.ch +32 -7 # [PKT_SCHED]: police: use gnet_stats for old policer stats # # Transforms old policer to use generic statistic via TCA_STATS2 # and maintain backward compatibility via TCA_STATS. Adds a new # API for classifiers to invoke the dumping process. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/act_api.h # 2004/11/03 14:04:22-08:00 tgraf@suug.ch +4 -1 # [PKT_SCHED]: police: use gnet_stats for old policer stats # # Transforms old policer to use generic statistic via TCA_STATS2 # and maintain backward compatibility via TCA_STATS. Adds a new # API for classifiers to invoke the dumping process. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 14:03:58-08:00 tgraf@suug.ch # [PKT_SCHED]: police: use gnet_stats for action policer stats # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/police.c # 2004/11/03 14:03:39-08:00 tgraf@suug.ch +6 -17 # [PKT_SCHED]: police: use gnet_stats for action policer stats # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 14:03:22-08:00 tgraf@suug.ch # [PKT_SCHED]: pedit: use gnet_stats for action stats # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/pedit.c # 2004/11/03 14:03:02-08:00 tgraf@suug.ch +3 -15 # [PKT_SCHED]: pedit: use gnet_stats for action stats # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 14:02:45-08:00 tgraf@suug.ch # [PKT_SCHED]: mirred: use gnet_stats for action stats # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/mirred.c # 2004/11/03 14:02:25-08:00 tgraf@suug.ch +5 -18 # [PKT_SCHED]: mirred: use gnet_stats for action stats # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 14:02:10-08:00 tgraf@suug.ch # [PKT_SCHED]: ipt: use gnet_stats for action stats # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/ipt.c # 2004/11/03 14:01:50-08:00 tgraf@suug.ch +5 -18 # [PKT_SCHED]: ipt: use gnet_stats for action stats # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 14:01:32-08:00 tgraf@suug.ch # [PKT_SCHED]: gact: use gnet_stats for action stats # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/gact.c # 2004/11/03 14:01:13-08:00 tgraf@suug.ch +4 -16 # [PKT_SCHED]: gact: use gnet_stats for action stats # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 14:00:45-08:00 tgraf@suug.ch # [PKT_SCHED]: tcf_action: copy generic stats via TCA_ACT_STATS # # Dumps the statistic common to all action modules via the newly # introduced TLV type TCA_ACT_STATS in tcf_action_copy_stats but # allows the corresponding module to dump its own statistic by # implementing the get_stats callback. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/act_api.c # 2004/11/03 14:00:25-08:00 tgraf@suug.ch +26 -3 # [PKT_SCHED]: tcf_action: copy generic stats via TCA_ACT_STATS # # Dumps the statistic common to all action modules via the newly # introduced TLV type TCA_ACT_STATS in tcf_action_copy_stats but # allows the corresponding module to dump its own statistic by # implementing the get_stats callback. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_act.h # 2004/11/03 14:00:25-08:00 tgraf@suug.ch +3 -4 # [PKT_SCHED]: tcf_action: copy generic stats via TCA_ACT_STATS # # Dumps the statistic common to all action modules via the newly # introduced TLV type TCA_ACT_STATS in tcf_action_copy_stats but # allows the corresponding module to dump its own statistic by # implementing the get_stats callback. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/act_api.h # 2004/11/03 14:00:25-08:00 tgraf@suug.ch +7 -1 # [PKT_SCHED]: tcf_action: copy generic stats via TCA_ACT_STATS # # Dumps the statistic common to all action modules via the newly # introduced TLV type TCA_ACT_STATS in tcf_action_copy_stats but # allows the corresponding module to dump its own statistic by # implementing the get_stats callback. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/linux/rtnetlink.h # 2004/11/03 14:00:25-08:00 tgraf@suug.ch +1 -0 # [PKT_SCHED]: tcf_action: copy generic stats via TCA_ACT_STATS # # Dumps the statistic common to all action modules via the newly # introduced TLV type TCA_ACT_STATS in tcf_action_copy_stats but # allows the corresponding module to dump its own statistic by # implementing the get_stats callback. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 13:50:47-08:00 bunk@stusta.de # [PATCH] small sysfs cleanups # # The patch below does the following cleanups for the sysfs code: # - remove the unused global function sysfs_mknod # - make some structs and functions static # # Please check whether this patch is correct, or whether some of the # things I made static should be used globally in the forseeable future. # # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # fs/sysfs/sysfs.h # 2004/10/30 06:15:11-07:00 bunk@stusta.de +0 -2 # small sysfs cleanups # # fs/sysfs/symlink.c # 2004/10/30 06:14:13-07:00 bunk@stusta.de +9 -8 # small sysfs cleanups # # fs/sysfs/mount.c # 2004/10/30 06:10:49-07:00 bunk@stusta.de +1 -1 # small sysfs cleanups # # fs/sysfs/inode.c # 2004/10/30 06:10:25-07:00 bunk@stusta.de +0 -5 # small sysfs cleanups # # fs/sysfs/dir.c # 2004/10/30 06:06:01-07:00 bunk@stusta.de +1 -1 # small sysfs cleanups # # ChangeSet # 2004/11/03 13:50:35-08:00 maneesh@in.ibm.com # [PATCH] sysfs: fix sysfs backing store error path confusion # # o sysfs_new_dirent to retrun 0 if kmalloc fails. Thanks to Milton Miller # for spotting this. # # Signed-off-by: Maneesh Soni # Signed-off-by: Greg Kroah-Hartman # # fs/sysfs/dir.c # 2004/11/02 07:17:18-08:00 maneesh@in.ibm.com +1 -1 # sysfs: fix sysfs backing store error path confusion # # ChangeSet # 2004/11/03 13:42:30-08:00 tony.luck@intel.com # [IA64-SGI] Do not disable interrupts in ia64_sn_plat_specific_err_print # # ia64_sn_plat_specific_err_print() ends up calling vfree() which # requires IPI which can deadlock if interrupts are disabled. Do not # disable interrupts in ia64_sn_plat_specific_err_print(). # # Signed-off-by: Keith Owens # Signed-off-by: Tony Luck # # include/asm-ia64/sn/sn_sal.h # 2004/11/03 13:41:17-08:00 kaos@sgi.com +1 -1 # Do not disable interrupts in ia64_sn_plat_specific_err_print # # ChangeSet # 2004/11/03 13:38:37-08:00 tony.luck@intel.com # [IA64] implement pcibios_resource_to_bus and pcibios_bus_to_resource # # Patch from Matthew Wilcox: # Since some ia64 platforms have non-identity-mapped PCI busses, we need # to implement pcibios_resource_to_bus and pcibios_bus_to_resource. # Also clean up some >80 column comments and delete an unnecessary parameter # to pcibios_fixup_device_resources(). # # Signed-off-by: Tony Luck # # include/asm-ia64/pci.h # 2004/11/03 13:36:55-08:00 tony.luck@intel.com +7 -2 # implement pcibios_resource_to_bus and pcibios_bus_to_resource # # arch/ia64/pci/pci.c # 2004/11/03 13:36:36-08:00 tony.luck@intel.com +61 -29 # implement pcibios_resource_to_bus and pcibios_bus_to_resource # # ChangeSet # 2004/11/03 21:52:01+01:00 azarah@nosferatu.za.org # kbuild: check timestamps on files for initramfs # # Add a comment to gen_initramfs_list.sh output that contains the # numeric mtime of the last modified file in the source directory, # or the mtime of the source list. This should cause the initramfs # image to be rebuild if a file in the source directory changed, or # the source list (if that was used rather than a directory as source). # # # Signed-off-by: Martin Schlemmer # Signed-off-by: Sam Ravnborg # # scripts/gen_initramfs_list.sh # 2004/11/03 21:51:27+01:00 azarah@nosferatu.za.org +19 -4 # kbuild: check timestamps on files for initramfs # # Add a comment to gen_initramfs_list.sh output that contains the # numeric mtime of the last modified file in the source directory, # or the mtime of the source list. This should cause the initramfs # image to be rebuild if a file in the source directory changed, or # the source list (if that was used rather than a directory as source). # # # Signed-off-by: Martin Schlemmer # Signed-off-by: Sam Ravnborg # # ChangeSet # 2004/11/03 21:51:06+01:00 adobriyan@mail.ru # kernel-doc: don't print ... twice in variadic functions # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Sam Ravnborg # # scripts/kernel-doc # 2004/11/03 21:50:28+01:00 adobriyan@mail.ru +1 -1 # kernel-doc: don't print ... twice in variadic functions # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Sam Ravnborg # # ChangeSet # 2004/11/03 21:50:05+01:00 adobriyan@mail.ru # kernel-doc: print arrays in declarations correctly # # Do not convert arrays into pointers while generating documentation for them. # # I.e, print # # struct sk_buff { # char cb[40]; # }; # # as "char cb[40]", not "char * cb". # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Sam Ravnborg # # scripts/kernel-doc # 2004/11/03 21:49:44+01:00 adobriyan@mail.ru +73 -27 # kernel-doc: print arrays in declarations correctly # # Do not convert arrays into pointers while generating documentation for them. # # I.e, print # # struct sk_buff { # char cb[40]; # }; # # as "char cb[40]", not "char * cb". # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Sam Ravnborg # # ChangeSet # 2004/11/03 21:49:24+01:00 adobriyan@mail.ru # kernel-doc: support for comma-separated members in structs and unions # # Fix the following warnings # # $ make sgmldocs # ... # Warning(include/linux/skbuff.h:283): No description found for parameter 'len,data_len,mac_len,csum' # Warning(include/linux/skbuff.h:283): No description found for parameter 'local_df,cloned,pkt_type,ip_summed' # Warning(include/linux/skbuff.h:283): No description found for parameter 'protocol,security' # ... # Warning(include/linux/skbuff.h:283): No description found for # parameter 'head,*data,*tail,*end' # ... # # by adding support for comma-separated members in structs and unions. # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Sam Ravnborg # # scripts/kernel-doc # 2004/11/03 21:49:05+01:00 adobriyan@mail.ru +30 -16 # kernel-doc: support for comma-separated members in structs and unions # # Fix the following warnings # # $ make sgmldocs # ... # Warning(include/linux/skbuff.h:283): No description found for parameter 'len,data_len,mac_len,csum' # Warning(include/linux/skbuff.h:283): No description found for parameter 'local_df,cloned,pkt_type,ip_summed' # Warning(include/linux/skbuff.h:283): No description found for parameter 'protocol,security' # ... # Warning(include/linux/skbuff.h:283): No description found for # parameter 'head,*data,*tail,*end' # ... # # by adding support for comma-separated members in structs and unions. # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Sam Ravnborg # # ChangeSet # 2004/11/03 21:48:44+01:00 sam@mars.ravnborg.org # ppc: fix building arch/ppc/boot/lib/ with make O= # # arch/ppc/boot/lib/ reuses zlib_inflate from lib/zlib_inflate but kbuild # does not support two different places utilising the same .o file. It results # in recompile for each build because options to compiler changes etc. # So the trick used here is to make a copy of the required .c files. # # Acked-by: Tom Rini # Signed-off-by: Sam Ravnborg # # arch/ppc/boot/lib/Makefile # 2004/11/03 21:48:25+01:00 sam@mars.ravnborg.org +17 -4 # ppc: fix building arch/ppc/boot/lib/ with make O= # # arch/ppc/boot/lib/ reuses zlib_inflate from lib/zlib_inflate but kbuild # does not support two different places utilising the same .o file. It results # in recompile for each build because options to compiler changes etc. # So the trick used here is to make a copy of the required .c files. # # Acked-by: Tom Rini # Signed-off-by: Sam Ravnborg # # ChangeSet # 2004/11/03 21:47:44+01:00 sam@mars.ravnborg.org # kconfig: drop usage of shared libraries # # Drop usage of shared libraries. # It breaks on several non-i386 build environemnts - especially the ones popular for embedded development. # This is a minimal version. # Based on idea from Bertrand Marquis and patch from Dan Kegel. # # Signed-off-by: Sam Ravnborg # # scripts/kconfig/Makefile # 2004/11/03 21:47:25+01:00 sam@mars.ravnborg.org +3 -5 # kconfig: drop usage of shared libraries # # Drop usage of shared libraries. # It breaks on several non-i386 build environemnts - especially the ones popular for embedded development. # This is a minimal version. # Based on idea from Bertrand Marquis and patch from Dan Kegel. # # Signed-off-by: Sam Ravnborg # # ChangeSet # 2004/11/03 21:40:43+01:00 sam@mars.ravnborg.org # kbuild: Prefer Kbuild as name of the kbuild files # # The kbuild syntax is unique and does only have very few things in common with # usual Makefile syntax. So to avoid confusion make the filename 'Kbuild' be # the preferred name as replacement for 'Makefile'. # No global renaming planned to take place for now, but new stuff expected to use # the new 'Kbuild' filename. # # Signed-off-by: Sam Ravnborg # # scripts/Makefile.clean # 2004/11/03 21:40:00+01:00 sam@mars.ravnborg.org +1 -1 # kbuild: Prefer Kbuild as name of the kbuild files # # The kbuild syntax is unique and does only have very few things in common with # usual Makefile syntax. So to avoid confusion make the filename 'Kbuild' be # the preferred name as replacement for 'Makefile'. # No global renaming planned to take place for now, but new stuff expected to use # the new 'Kbuild' filename. # # Signed-off-by: Sam Ravnborg # # scripts/Makefile.build # 2004/11/03 21:40:00+01:00 sam@mars.ravnborg.org +1 -1 # kbuild: Prefer Kbuild as name of the kbuild files # # The kbuild syntax is unique and does only have very few things in common with # usual Makefile syntax. So to avoid confusion make the filename 'Kbuild' be # the preferred name as replacement for 'Makefile'. # No global renaming planned to take place for now, but new stuff expected to use # the new 'Kbuild' filename. # # Signed-off-by: Sam Ravnborg # # Documentation/kbuild/makefiles.txt # 2004/11/03 21:40:00+01:00 sam@mars.ravnborg.org +5 -2 # kbuild: Prefer Kbuild as name of the kbuild files # # The kbuild syntax is unique and does only have very few things in common with # usual Makefile syntax. So to avoid confusion make the filename 'Kbuild' be # the preferred name as replacement for 'Makefile'. # No global renaming planned to take place for now, but new stuff expected to use # the new 'Kbuild' filename. # # Signed-off-by: Sam Ravnborg # # ChangeSet # 2004/11/03 12:38:16-08:00 tommy.christensen@tpack.net # [NET]: Move local_bh_enable back in dev_queue_xmit # # Based upon a patch from Herbert Xu: # # > Hi Ingo: # > # > Your recent fix to dev_queue_xmit moved the local_bh_disable to # > include stuff like skb_linearize and skb_checksum_help. These # > are potentially expensive operations. Since they don't need to # > run with preempt off, we could simply move the local_bh_enable # > up instead. # # No, this breaks the normal return path. # # How about this instead? # # Signed-off-by: Tommy S. Christensen # Signed-off-by: David S. Miller # # net/core/dev.c # 2004/11/03 12:37:56-08:00 tommy.christensen@tpack.net +9 -7 # [NET]: Move local_bh_enable back in dev_queue_xmit # # Based upon a patch from Herbert Xu: # # > Hi Ingo: # > # > Your recent fix to dev_queue_xmit moved the local_bh_disable to # > include stuff like skb_linearize and skb_checksum_help. These # > are potentially expensive operations. Since they don't need to # > run with preempt off, we could simply move the local_bh_enable # > up instead. # # No, this breaks the normal return path. # # How about this instead? # # Signed-off-by: Tommy S. Christensen # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 12:20:22-08:00 herbert@gondor.apana.org.au # [TCP]: Modular ipv6 support in tcpdiag # # This patch allows tcpdiag to support ipv6 work as a module when itself # is also a module. # # I was planning for a more extensible method but now I think the effort # would be better directed at a new generic socket netlink interface than # the TCP-specific tcpdiag. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_diag.c # 2004/11/03 12:20:03-08:00 herbert@gondor.apana.org.au +10 -16 # [TCP]: Modular ipv6 support in tcpdiag # # This patch allows tcpdiag to support ipv6 work as a module when itself # is also a module. # # I was planning for a more extensible method but now I think the effort # would be better directed at a new generic socket netlink interface than # the TCP-specific tcpdiag. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/Kconfig # 2004/11/03 12:20:02-08:00 herbert@gondor.apana.org.au +4 -0 # [TCP]: Modular ipv6 support in tcpdiag # # This patch allows tcpdiag to support ipv6 work as a module when itself # is also a module. # # I was planning for a more extensible method but now I think the effort # would be better directed at a new generic socket netlink interface than # the TCP-specific tcpdiag. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 11:56:25-08:00 yoshfuji@linux-ipv6.org # [IPV6]: Do not purge default routes by RA. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/ipv6/ndisc.c # 2004/11/03 11:56:07-08:00 yoshfuji@linux-ipv6.org +0 -7 # [IPV6]: Do not purge default routes by RA. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/03 09:11:59+00:00 aia21@cantab.net # NTFS: Modify fs/ntfs/aops.c::mark_ntfs_record_dirty() so it allocates # buffers for the page if they are not present and then marks the # buffers belonging to the ntfs record dirty. This causes the buffers # to become busy and hence they are safe from removal until the page # has been written out. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/aops.c # 2004/11/03 09:11:50+00:00 aia21@cantab.net +39 -18 # Modify mark_ntfs_record_dirty() so it allocates buffers for the page if # they are not present and then marks the buffers belonging to the ntfs # record dirty. This causes the buffers to become busy and hence they are # safe from removal until the page has been written out. # # fs/ntfs/ChangeLog # 2004/11/03 09:11:50+00:00 aia21@cantab.net +5 -0 # Update # # ChangeSet # 2004/11/02 21:19:32-08:00 benh@kernel.crashing.org # [PATCH] atyfb: Fix power management # # The new atyfb has the return value for the Power Management routine # wrong. This prevents sleep from working on PowerBooks with mach64 # video chips. This fixes it. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # drivers/video/aty/atyfb_base.c # 2004/11/02 19:13:45-08:00 benh@kernel.crashing.org +1 -1 # atyfb: Fix power management # # ChangeSet # 2004/11/02 19:28:23-08:00 benh@kernel.crashing.org # [PATCH] fbdev: workaround for broken X servers # # XFree (and X.org) has both always been broken in their conversion of the DPMS # blanking mode when passing to the kernel ioctl FBIOBLANK (in fbdev mode). # # This patch makes sure that at least the value passed by userland stays in the # legal range, which has the side effect that an X DPMS POWERDOWN request will # result as an fbdev VESA_POWERDOWN request at the fbdev level now, instead of # an out-of-range value. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # drivers/video/fbmem.c # 2004/11/02 18:10:41-08:00 benh@kernel.crashing.org +4 -0 # fbdev: workaround for broken X servers # # ChangeSet # 2004/11/02 17:36:57-08:00 matthew@wil.cx # [PATCH] parisc: checksum improvements # # Small tweaks to the checksumming routines # Fix a corner case in csum_partial # # Committed-by: Randolph Chung # # arch/parisc/lib/checksum.c # 2004/11/02 00:14:08-08:00 matthew@wil.cx +26 -14 # parisc: checksum improvements # # ChangeSet # 2004/11/02 17:36:41-08:00 matthew@wil.cx # [PATCH] parisc: superio cleanup # # Superio cleanup # # Committed-by: Grant Grundler # # include/asm-parisc/superio.h # 2004/11/02 00:14:37-08:00 matthew@wil.cx +0 -1 # parisc: superio cleanup # # drivers/parisc/superio.c # 2004/11/02 00:14:24-08:00 matthew@wil.cx +13 -66 # parisc: superio cleanup # # ChangeSet # 2004/11/02 17:36:24-08:00 matthew@wil.cx # [PATCH] parisc: fix security hole # # The default interruption handler "handle_interruption" does not properly # check to see if the faulting space is the same as the users space. # The problem lies in the fact that if a fault happens on the gateway we # will not deliver signals to the process, the process will not die, and we # may continue handling the same fault in a loop forever. Any malicious # user code can crash the kernel by jumping into the gateway page at an # inopportune address. # # The solution is to check if the user has the right privilege and if the # spaces match, both faulting and currently active. The best action is to # force the process back to it's own space of execution at address zero, and # let it take a SIGSEGV. The process can never recover from this because it # happens immediately after the return from the interrupt via rfi or rfir. # # Committed-by: Carlos O'Donell # # arch/parisc/kernel/traps.c # 2004/11/02 00:14:08-08:00 matthew@wil.cx +59 -15 # parisc: fix security hole # # ChangeSet # 2004/11/02 17:36:08-08:00 matthew@wil.cx # [PATCH] parisc: new syscalls # # Add new syscalls: # tkill, waitid, fadvise64_64, set_tid_address, tgkill, mbind, # [sg]et_mempolicy, {,l,f}{set,get,list,remove}xattr, # timer_{create,settime,gettime,getoverrun,delete}, # clock_{settime,gettime,getres,nanosleep} # # Committed-by: Matthew Wilcox # # include/asm-parisc/unistd.h # 2004/11/02 00:14:37-08:00 matthew@wil.cx +30 -2 # parisc: new syscalls # # arch/parisc/kernel/syscall_table.S # 2004/11/02 00:14:08-08:00 matthew@wil.cx +45 -18 # parisc: new syscalls # # arch/parisc/kernel/sys_parisc.c # 2004/11/02 00:14:08-08:00 matthew@wil.cx +8 -0 # parisc: new syscalls # # ChangeSet # 2004/11/02 17:35:56-08:00 matthew@wil.cx # [PATCH] parisc: fix PTRACE_GETEVENTMSG # # PTRACE_GETEVENTMSG was not 64-bit clean, fix it # # Committed-by: Randolph Chung # # arch/parisc/kernel/ptrace.c # 2004/11/02 00:14:07-08:00 matthew@wil.cx +4 -0 # parisc: fix PTRACE_GETEVENTMSG # # ChangeSet # 2004/11/02 17:35:42-08:00 matthew@wil.cx # [PATCH] parisc: remove lcopy_*_user # # remove the now unused lcopy_*_user routines # # Committed-by: Randolph Chung # # arch/parisc/lib/lusercopy.S # 2004/11/02 00:14:08-08:00 matthew@wil.cx +5 -118 # parisc: remove lcopy_*_user # # ChangeSet # 2004/11/02 17:35:23-08:00 matthew@wil.cx # [PATCH] parisc: Stop exporting the old memcpy symbols # # Stop exporting the old memcpy symbols # # Committed-by: Randolph Chung # # arch/parisc/kernel/parisc_ksyms.c # 2004/11/02 00:14:07-08:00 matthew@wil.cx +0 -4 # parisc: Stop exporting the old memcpy symbols # # ChangeSet # 2004/11/02 17:35:08-08:00 matthew@wil.cx # [PATCH] parisc: dump the stack on a BUG() # # dump the stack on a BUG() # # Committed-by: Randolph Chung # # include/asm-parisc/bug.h # 2004/11/02 00:14:36-08:00 matthew@wil.cx +8 -0 # parisc: dump the stack on a BUG() # # ChangeSet # 2004/11/02 17:34:57-08:00 matthew@wil.cx # [PATCH] parisc: register cpus with sysfs # # register cpus with sysfs # # Committed-by: Randolph Chung # # arch/parisc/kernel/topology.c # 2004/11/02 00:06:39-08:00 matthew@wil.cx +37 -0 # parisc: register cpus with sysfs # # arch/parisc/kernel/Makefile # 2004/11/02 00:14:06-08:00 matthew@wil.cx +2 -1 # parisc: register cpus with sysfs # # arch/parisc/kernel/topology.c # 2004/11/02 00:06:39-08:00 matthew@wil.cx +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/parisc/kernel/topology.c # # ChangeSet # 2004/11/02 17:34:40-08:00 matthew@wil.cx # [PATCH] parisc: new memcpy routines # # - new memcpy routine, replaces memcpy, bcopy, copy_{from,to,in}_user # implementations # - workaround gcc-3.0 limitations for asm() # - Pip and Rufus pointed out the flaw in the current misaligned memcopy # routines. Randolph now owes lots of Milk bones. # - updates to work with testsuite # - sparse annotations # - Improve copy performance for small and unaligned copies # - Enable merge optimization for non-PA20 builds too # # Committed-by: Randolph Chung # Committed-by: James Bottomley # # arch/parisc/lib/memcpy.c # 2004/11/02 00:06:39-08:00 matthew@wil.cx +530 -0 # parisc: new memcpy routines # # include/asm-parisc/uaccess.h # 2004/11/02 00:14:37-08:00 matthew@wil.cx +6 -6 # parisc: new memcpy routines # # include/asm-parisc/string.h # 2004/11/02 00:14:37-08:00 matthew@wil.cx +10 -0 # parisc: new memcpy routines # # arch/parisc/lib/memcpy.c # 2004/11/02 00:06:39-08:00 matthew@wil.cx +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/parisc/lib/memcpy.c # # arch/parisc/lib/Makefile # 2004/11/02 00:14:08-08:00 matthew@wil.cx +1 -1 # parisc: new memcpy routines # # arch/parisc/Makefile # 2004/11/02 00:14:06-08:00 matthew@wil.cx +4 -2 # parisc: new memcpy routines # # ChangeSet # 2004/11/02 17:34:21-08:00 matthew@wil.cx # [PATCH] parisc: fix CONFIG_DISCONTIGMEM support # # fix CONFIG_DISCONTIGMEM support # # Committed-by: Randolph Chung # # arch/parisc/mm/init.c # 2004/10/31 22:09:39-08:00 matthew@wil.cx +8 -5 # parisc: fix CONFIG_DISCONTIGMEM support # # ChangeSet # 2004/11/02 17:34:05-08:00 matthew@wil.cx # [PATCH] parisc: Fix LBA/SBA bugs # # - Fix Astro/Elroy LMMIO space reporting in /proc/iomem. # - Output in /proc/iomem include PCI bus number and "Extra LMMIO" range. # - LBA now reports proper addresses routed down from SBA. # - add mercury_cfg_ops. This fixes the tg3 init delay problem. # PDC took ~20ms per PCI cfg write. tg3 performs ~1600 writes (~30 seconds # per NIC) during init. Alternative is the relocate PDC to host ram. # But that would burn ~4MB of RAM. This is cheaper. # - add PCI_F_EXTEND to asm/pci.h - replaces private definitions # # Committed-by: Grant Grundler # # include/asm-parisc/pci.h # 2004/11/02 00:14:37-08:00 matthew@wil.cx +34 -2 # parisc: Fix LBA/SBA bugs # # drivers/parisc/sba_iommu.c # 2004/11/02 00:14:24-08:00 matthew@wil.cx +142 -8 # parisc: Fix LBA/SBA bugs # # drivers/parisc/lba_pci.c # 2004/11/02 00:14:24-08:00 matthew@wil.cx +288 -74 # parisc: Fix LBA/SBA bugs # # ChangeSet # 2004/11/02 17:33:53-08:00 matthew@wil.cx # [PATCH] parisc: Add memory clobber to userspace syscall wrapper # # Add memory clobber to userspace syscall wrapper provided by kernel, # this matches glibc definition. # # Committed-by: Carlos O'Donell # # include/asm-parisc/unistd.h # 2004/11/02 00:14:37-08:00 matthew@wil.cx +1 -1 # parisc: Add memory clobber to userspace syscall wrapper # # ChangeSet # 2004/11/02 17:33:36-08:00 matthew@wil.cx # [PATCH] parisc: export global fixup routines # # export global fixup routines # # Committed-by: Randolph Chung # # arch/parisc/kernel/parisc_ksyms.c # 2004/10/31 22:09:35-08:00 matthew@wil.cx +10 -0 # parisc: export global fixup routines # # ChangeSet # 2004/11/02 17:33:20-08:00 matthew@wil.cx # [PATCH] parisc: use fixups for exception support # # Revamp exceptions support to use fixup sections # # Committed-by: Randolph Chung # # arch/parisc/lib/fixup.S # 2004/10/31 22:02:15-08:00 matthew@wil.cx +89 -0 # parisc: use fixups for exception support # # include/asm-parisc/uaccess.h # 2004/10/31 22:10:11-08:00 matthew@wil.cx +78 -85 # parisc: use fixups for exception support # # arch/parisc/mm/fault.c # 2004/10/31 22:09:37-08:00 matthew@wil.cx +9 -6 # parisc: use fixups for exception support # # arch/parisc/lib/lusercopy.S # 2004/10/31 22:09:37-08:00 matthew@wil.cx +22 -16 # parisc: use fixups for exception support # # arch/parisc/lib/fixup.S # 2004/10/31 22:02:15-08:00 matthew@wil.cx +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/parisc/lib/fixup.S # # arch/parisc/kernel/unaligned.c # 2004/10/31 22:09:36-08:00 matthew@wil.cx +109 -71 # parisc: use fixups for exception support # # arch/parisc/kernel/syscall.S # 2004/10/31 22:09:36-08:00 matthew@wil.cx +13 -0 # parisc: use fixups for exception support # # arch/parisc/kernel/asm-offsets.c # 2004/10/31 22:09:34-08:00 matthew@wil.cx +4 -0 # parisc: use fixups for exception support # # ChangeSet # 2004/11/02 15:14:15-08:00 colin@colino.net # [PATCH] therm_adt746x: gradually change fan speed and start both fans on Albooks # # Here's the patch that supercedes the one I asked you to drop. It changes # the fan speed logic so that the fans will go incrementally fast instead of # using just two steps. Also, it starts and stops both fans instead of just # one on Powerbooks 15" and 17" (functionality asked by most of the Albooks # users on Debian's ML, and justified by the fact that fan 1 and fan 2 do not # correspond to CPU and GPU, as we previously thought). # # Signed-off-by: Colin Leroy # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/macintosh/therm_adt746x.c # 2004/11/02 06:40:44-08:00 colin@colino.net +38 -33 # therm_adt746x: gradually change fan speed and start both fans on Albooks # # ChangeSet # 2004/11/02 15:13:59-08:00 rmk+lkml@arm.linux.org.uk # [PATCH] saa7111.c: fix VIDEO_MODE_SECAM # # VIDEO_MODE_SECAM was incorrectly writing the contents of cached register 14 # back to hardware register 8, rather than using cached register 8. # # Signed-off-by: Russell King # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/saa7111.c # 2004/11/02 06:40:44-08:00 rmk+lkml@arm.linux.org.uk +1 -1 # saa7111.c: fix VIDEO_MODE_SECAM # # ChangeSet # 2004/11/02 15:13:42-08:00 jbarnes@engr.sgi.com # [PATCH] document mmiowb and readX_relaxed a bit more in deviceiobook.tmpl # # This is a small patch to deviceiobook.tmpl to describe the new mmiowb # routine a bit more completely. I've also updated it to provide pointers to # drivers that do write flushing, use mmiowb, and use the readX_relaxed # routines. # # Acked-by: Grant Grundler # Signed-off-by: Jesse Barnes # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/DocBook/deviceiobook.tmpl # 2004/11/02 06:40:44-08:00 jbarnes@engr.sgi.com +48 -18 # document mmiowb and readX_relaxed a bit more in deviceiobook.tmpl # # ChangeSet # 2004/11/02 15:13:26-08:00 james4765@gmail.com # [PATCH] floppy: Updates to Documentation/floppy.txt # # Cleanup and update to Documentation/floppy.txt. Fix one incorrect option # in listing. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/floppy.txt # 2004/11/02 06:40:43-08:00 james4765@gmail.com +36 -12 # floppy: Updates to Documentation/floppy.txt # # ChangeSet # 2004/11/02 15:13:14-08:00 james4765@gmail.com # [PATCH] computone: MAINTAINERS update # # Update status of Computone Intelliport driver in MAINTAINERS. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/11/02 06:40:43-08:00 james4765@gmail.com +1 -2 # computone: MAINTAINERS update # # ChangeSet # 2004/11/02 15:12:58-08:00 james4765@gmail.com # [PATCH] computone: Documentation/computone.txt update # # Minor cleanup and status update to Documentation/computone.txt. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/computone.txt # 2004/11/02 06:40:43-08:00 james4765@gmail.com +13 -2 # computone: Documentation/computone.txt update # # ChangeSet # 2004/11/02 15:12:40-08:00 james4765@gmail.com # [PATCH] digiecpa MAINTAINERS update # # Update status of digiecpa driver in MAINTAINERS. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/11/02 06:41:07-08:00 james4765@gmail.com +1 -1 # digiecpa MAINTAINERS update # # ChangeSet # 2004/11/02 15:12:24-08:00 james4765@gmail.com # [PATCH] Documentation/digiecpa.txt update # # Update status of digiecpa driver & fix broken links in # Documentation/digiecpa.txt. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/digiepca.txt # 2004/11/02 06:40:42-08:00 james4765@gmail.com +16 -10 # Documentation/digiecpa.txt update # # ChangeSet # 2004/11/02 15:12:12-08:00 james4765@gmail.com # [PATCH] MAINTAINERS update # # Fix reference to digiboard maintenance status - the digiecpa driver # obsoleted the original driver. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/11/02 06:41:07-08:00 james4765@gmail.com +1 -1 # MAINTAINERS update # # ChangeSet # 2004/11/02 15:11:56-08:00 james4765@gmail.com # [PATCH] Documentation/00-INDEX.txt update # # Remove reference to to-be-deleted file in Documentation/00-INDEX. # # Signed-off-by: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/00-INDEX # 2004/11/02 06:40:42-08:00 james4765@gmail.com +0 -2 # Documentation/00-INDEX.txt update # # ChangeSet # 2004/11/02 15:11:39-08:00 james4765@gmail.com # [PATCH] Documentation/digiboard.txt update # # Remove obsolete Documentation/digiboard.txt file - driver was obsoleted by # the digiecpa driver. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-digiboard.txt~a0d929bc57b5c817 # 2004/11/02 15:11:32-08:00 james4765@gmail.com +0 -0 # Delete: Documentation/digiboard.txt # # ChangeSet # 2004/11/02 15:11:23-08:00 bjorn.helgaas@hp.com # [PATCH] HPET init/add fixes # # Cleanup/bugfix HPET driver: # # - hpet_init() could return failure with driver still registered with ACPI # - driver add() functions were marked __init, but can be called any time # until driver is unregistered (not a real problem until HPETs can be # hotplugged) # - time interpolator registration now done in driver add() path, so we can # support removal of HPETs someday # - physical MMIO address should be printed, not ioremapped address # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/hpet.h # 2004/11/02 06:40:42-08:00 bjorn.helgaas@hp.com +1 -0 # HPET init/add fixes # # drivers/char/hpet.c # 2004/11/02 06:40:42-08:00 bjorn.helgaas@hp.com +50 -39 # HPET init/add fixes # # arch/x86_64/kernel/time.c # 2004/11/02 06:40:42-08:00 bjorn.helgaas@hp.com +1 -0 # HPET init/add fixes # # arch/i386/kernel/time_hpet.c # 2004/11/02 06:40:42-08:00 bjorn.helgaas@hp.com +1 -0 # HPET init/add fixes # # ChangeSet # 2004/11/02 15:11:12-08:00 miles@gnu.org # [PATCH] v850: signal handling race fix # # Signed-off-by: Miles Bader # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/v850/kernel/signal.c # 2004/11/02 06:40:41-08:00 miles@gnu.org +5 -9 # v850: signal handling race fix # # ChangeSet # 2004/11/02 15:10:56-08:00 miles@gnu.org # [PATCH] v850: Fix misnamed variable in ptrace.c # # Signed-off-by: Miles Bader # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/v850/kernel/ptrace.c # 2004/11/02 06:40:41-08:00 miles@gnu.org +4 -4 # v850: Fix misnamed variable in ptrace.c # # ChangeSet # 2004/11/02 15:10:44-08:00 miles@gnu.org # [PATCH] v850: Add __param linker section # # Signed-off-by: Miles Bader # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/v850/kernel/vmlinux.lds.S # 2004/11/02 06:40:41-08:00 miles@gnu.org +5 -0 # v850: Add __param linker section # # ChangeSet # 2004/11/02 15:10:28-08:00 miles@gnu.org # [PATCH] v850: Add definitions for memcpy_fromio and memcpy_toio # # Signed-off-by: Miles Bader # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-v850/io.h # 2004/11/02 06:40:41-08:00 miles@gnu.org +5 -2 # v850: Add definitions for memcpy_fromio and memcpy_toio # # ChangeSet # 2004/11/02 15:10:10-08:00 miles@gnu.org # [PATCH] v850: Work around include-definition-loop problem in # # Signed-off-by: Miles Bader # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-v850/posix_types.h # 2004/11/02 06:40:41-08:00 miles@gnu.org +3 -1 # v850: Work around include-definition-loop problem in # # ChangeSet # 2004/11/02 15:09:54-08:00 penberg@cs.helsinki.fi # [PATCH] radeonfb: more initializer fixes # # Use 8-bit palette entries for radeonfb and avoid zero-initialization as # suggested by Geert Uytterhoeven. # # Signed-off-by: Pekka Enberg # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/aty/radeon_monitor.c # 2004/11/02 06:40:41-08:00 penberg@cs.helsinki.fi +3 -3 # radeonfb: more initializer fixes # # ChangeSet # 2004/11/02 15:09:42-08:00 dhowells@redhat.com # [PATCH] key management: fix locking problem and move __key_check() out of line # # The attached patch fixes a locking problem in key_lookup() and moves # __key_check() out of line. # # Signed-Off-By: David Howells # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/keys/key.c # 2004/11/02 06:40:40-08:00 dhowells@redhat.com +10 -3 # key management: fix locking problem and move __key_check() out of line # # security/keys/internal.h # 2004/11/02 06:40:40-08:00 dhowells@redhat.com +1 -7 # key management: fix locking problem and move __key_check() out of line # # ChangeSet # 2004/11/02 15:09:24-08:00 akpm@osdl.org # [PATCH] ext3_bread() cleanup # # - remove unused local # # - whitespace # # - put_bh() is faster than brelse() # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/ext3/inode.c # 2004/11/02 06:40:40-08:00 akpm@osdl.org +4 -7 # ext3_bread() cleanup # # ChangeSet # 2004/11/02 15:09:08-08:00 aia21@cam.ac.uk # [PATCH] fs/buffer.c exports for NTFS # # I renamed the functions to more descriptive names: # # create_buffers -> alloc_page_buffers # __set_page_buffers -> attach_page_buffers # # And I added a EXPORT_SYMBOL_GPL for alloc_page_buffers and made # attach_page_buffers static inline and moved it to . # # Signed-off-by: Anton Altaparmakov # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/buffer_head.h # 2004/11/02 06:40:40-08:00 aia21@cam.ac.uk +11 -0 # fs/buffer.c exports for NTFS # # fs/buffer.c # 2004/11/02 06:40:40-08:00 aia21@cam.ac.uk +7 -14 # fs/buffer.c exports for NTFS # # ChangeSet # 2004/11/02 15:08:56-08:00 shemminger@osdl.org # [PATCH] rd: convert to module_param and add module alias # # Convert Ramdisk block device to module_param to get rid of warning. Add # module alias to cause correct autoloading. # # Signed-off-by: Stephen Hemminger # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/rd.c # 2004/11/02 06:40:40-08:00 shemminger@osdl.org +4 -2 # rd: convert to module_param and add module alias # # ChangeSet # 2004/11/02 15:08:40-08:00 shemminger@osdl.org # [PATCH] loop: convert to module_param # # Convert loopback device to new module_param to get rid of warning. # # Signed-off-by: Stephen Hemminger # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/loop.c # 2004/11/02 06:40:40-08:00 shemminger@osdl.org +2 -2 # loop: convert to module_param # # ChangeSet # 2004/11/02 15:08:24-08:00 aherrman@de.ibm.com # [PATCH] s390: make zfcp compile again. # # Make zfcp compile again after the SPI-5 constants and the interface to # suspend I/O to scsi devices got added. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/scsi/zfcp_scsi.c # 2004/11/02 06:40:40-08:00 aherrman@de.ibm.com +6 -14 # s390: make zfcp compile again. # # drivers/s390/scsi/zfcp_def.h # 2004/11/02 06:40:40-08:00 aherrman@de.ibm.com +5 -5 # s390: make zfcp compile again. # # ChangeSet # 2004/11/02 15:08:07-08:00 takata@linux-m32r.org # [PATCH] m32r: remove old ELF relocation types # # Remove old relocation type definitions from include/asm-m32r/elf.h. These # ELF relocations are obsolete and no longer used. # # * include/asm-m32r/elf.h: # - Remove old relocation types. # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m32r/elf.h # 2004/11/02 06:40:39-08:00 takata@linux-m32r.org +0 -39 # m32r: remove old ELF relocation types # # ChangeSet # 2004/11/02 15:07:50-08:00 takata@linux-m32r.org # [PATCH] m32r: remove rep_nop() # # Remove rep_nop() from include/asm-m32r/processor.h, because REP NOP (PAUSE) # is a x86 specific instuction. # # Instead of rep_nop(), barrier() should be used for cpu_relax() # as well as other architecuture. # # * include/asm-m32r/processor.h: # - Change not to include "cachectl.h". # - Remove rep_nop() and redefine cpu_relax() as barrier(). # # * arch/m32r/kernel/smpboot.h: # - Use cpu_relax() instead of rep_nop(). # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m32r/processor.h # 2004/11/02 06:40:39-08:00 takata@linux-m32r.org +7 -23 # m32r: remove rep_nop() # # arch/m32r/kernel/smpboot.c # 2004/11/02 06:40:39-08:00 takata@linux-m32r.org +2 -2 # m32r: remove rep_nop() # # ChangeSet # 2004/11/02 15:07:35-08:00 takata@linux-m32r.org # [PATCH] m32r: Fix ELF_CORE_COPY_REGS macro to generate a correct "core" file # # This patch fixes ELF_CORE_COPY_REGS() macro in order to dump register # information into "core" files correctly, because both parameters pr_reg and # regs are passed as pointers to "elf_gregset_t" and "struct pt_regs", # respectively. # # I've tested it by using a native m32r GNU debugger. # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m32r/elf.h # 2004/11/02 06:41:10-08:00 takata@linux-m32r.org +1 -1 # m32r: Fix ELF_CORE_COPY_REGS macro to generate a correct "core" file # # ChangeSet # 2004/11/02 15:07:18-08:00 ak@suse.de # [PATCH] Add panic blinking to 2.6 # # This patch readds the panic blinking that was in 2.4 to 2.6. This is # useful to see when you're in X that the machine has paniced # # It addresses previously criticism. # It should work now when the keyboard interrupt is off. # It doesn't fully emulate the handler, but has a timeout # for this case. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/panic.c # 2004/11/02 06:40:39-08:00 ak@suse.de +19 -5 # Add panic blinking to 2.6 # # include/linux/kernel.h # 2004/11/02 06:40:39-08:00 ak@suse.de +1 -0 # Add panic blinking to 2.6 # # drivers/input/serio/i8042.c # 2004/11/02 06:40:39-08:00 ak@suse.de +39 -0 # Add panic blinking to 2.6 # # ChangeSet # 2004/11/02 15:07:02-08:00 ak@suse.de # [PATCH] Print real error when initramfs gunzip failed # # Print the real error when initramfs gunzip failed. gunzip already sets up # message correctly. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/initramfs.c # 2004/11/02 06:40:39-08:00 ak@suse.de +1 -2 # Print real error when initramfs gunzip failed # # ChangeSet # 2004/11/02 15:06:44-08:00 ak@suse.de # [PATCH] x86_64: set -fno-strict-aliasing for early boot code # # The boot decompressor is miscompiled by recent gcc 4.0s without this patch. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/boot/compressed/Makefile # 2004/11/02 06:40:38-08:00 ak@suse.de +1 -1 # x86_64: set -fno-strict-aliasing for early boot code # # ChangeSet # 2004/11/02 15:06:28-08:00 suresh.b.siddha@intel.com # [PATCH] x86-64: fix sibling map again # # Recent x86-64 sibling map fix for clustered mode by James # (http://linux.bkbits.net:8080/linux-2.6/cset@414b34a6jkiHQ5AnhA269av76y3ZAw?nav=index.html) # is not the recommended way of fixing it. # # That patch assumes BIOS for non-clustered systems accept the HW assigned # value. Why make this assumption when we can fix it in a better # fashion(which is also used by x86 kernel's today) # # Basically use HW assigned apic_id's(returned by cpuid) for non clustered # systems and for clustered use BIOS provided apic_id's. Appended patch does # this. # # Note: Similar issue was earlier disussed in context of x86 approx an year # back and James then backed out his changes. # http://www.ussg.iu.edu/hypermail/linux/kernel/0312.2/0167.html # # Signed-off-by: Suresh Siddha # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/mach_apic.h # 2004/11/02 06:40:38-08:00 suresh.b.siddha@intel.com +1 -0 # x86-64: fix sibling map again # # include/asm-x86_64/genapic.h # 2004/11/02 06:40:38-08:00 suresh.b.siddha@intel.com +1 -0 # x86-64: fix sibling map again # # arch/x86_64/kernel/setup.c # 2004/11/02 06:40:38-08:00 suresh.b.siddha@intel.com +2 -3 # x86-64: fix sibling map again # # arch/x86_64/kernel/genapic_flat.c # 2004/11/02 06:40:38-08:00 suresh.b.siddha@intel.com +8 -0 # x86-64: fix sibling map again # # arch/x86_64/kernel/genapic_cluster.c # 2004/11/02 06:40:38-08:00 suresh.b.siddha@intel.com +11 -0 # x86-64: fix sibling map again # # ChangeSet # 2004/11/02 15:06:11-08:00 ak@suse.de # [PATCH] x86_64: Remove bogus __initdata in wakeup path # # Found by Randy Dunlap # # Don't mark use_sysenter __initdata, it is used on suspend # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/ia32/syscall32.c # 2004/11/02 06:40:38-08:00 ak@suse.de +1 -1 # x86_64: Remove bogus __initdata in wakeup path # # ChangeSet # 2004/11/02 15:05:55-08:00 long.pu@intel.com # [PATCH] x86_64: Use compat readdir and aio functions # # This patch replaced some sys32 syscall functions of X86_64 with the # corresponding compat version. # # Signed-off-by: Pu Long # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/ia32/sys_ia32.c # 2004/11/02 06:40:37-08:00 long.pu@intel.com +0 -197 # x86_64: Use compat readdir and aio functions # # arch/x86_64/ia32/ia32entry.S # 2004/11/02 06:40:37-08:00 long.pu@intel.com +5 -5 # x86_64: Use compat readdir and aio functions # # ChangeSet # 2004/11/02 15:05:36-08:00 ak@suse.de # [PATCH] x86_64: Fallback to swiotlb for dma_alloc_coherent # # From: Suresh B Siddha # # Coresponding change to IA64 code is in, so this can be merged too. # # - fallback to swiotlb for consistent DMA mappings # - fix a memory leak in dma_alloc_coherent # # Signed-off-by: Suresh Siddha # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/swiotlb.h # 2004/11/02 06:40:37-08:00 ak@suse.de +4 -0 # x86_64: Fallback to swiotlb for dma_alloc_coherent # # arch/x86_64/kernel/pci-gart.c # 2004/11/02 06:40:37-08:00 ak@suse.de +16 -3 # x86_64: Fallback to swiotlb for dma_alloc_coherent # # ChangeSet # 2004/11/02 15:05:20-08:00 ak@suse.de # [PATCH] x86_64: Auto enable HPET on Summit # # From: James Cleverdon # # Switch to HPET timer automatically mode on Summit 2 # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/hpet.h # 2004/11/02 06:40:37-08:00 ak@suse.de +1 -0 # x86_64: Auto enable HPET on Summit # # arch/x86_64/kernel/time.c # 2004/11/02 06:41:08-08:00 ak@suse.de +4 -1 # x86_64: Auto enable HPET on Summit # # arch/x86_64/kernel/apic.c # 2004/11/02 06:40:37-08:00 ak@suse.de +48 -0 # x86_64: Auto enable HPET on Summit # # ChangeSet # 2004/11/02 15:05:08-08:00 ak@suse.de # [PATCH] x86_64: Fix setup asm constraints # # Fix some asm constraints in setup. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/setup64.c # 2004/11/02 06:40:37-08:00 ak@suse.de +2 -2 # x86_64: Fix setup asm constraints # # ChangeSet # 2004/11/02 15:04:51-08:00 ak@suse.de # [PATCH] x86_64: Add 32bit quota support # # [untested, but other 64bit ports seem to get away with it] # # sys_quotactl seems to be 32/64bit clean, enable it for 32bit. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/ia32/sys_ia32.c # 2004/11/02 06:41:12-08:00 ak@suse.de +0 -12 # x86_64: Add 32bit quota support # # arch/x86_64/ia32/ia32entry.S # 2004/11/02 06:41:12-08:00 ak@suse.de +1 -1 # x86_64: Add 32bit quota support # # ChangeSet # 2004/11/02 15:04:35-08:00 ak@suse.de # [PATCH] x86_64: Poison initdata # # Due to popular request # # Unconditionally poison __init code after bootup. # # Poison initdata too. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/mm/init.c # 2004/11/02 06:40:37-08:00 ak@suse.de +3 -2 # x86_64: Poison initdata # # arch/x86_64/kernel/vmlinux.lds.S # 2004/11/02 06:40:37-08:00 ak@suse.de +2 -0 # x86_64: Poison initdata # # ChangeSet # 2004/11/02 15:04:23-08:00 ak@suse.de # [PATCH] x86_64: Don't wait on panic # # Don't wait for a response from other CPUs on panic # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/smp.c # 2004/11/02 06:40:36-08:00 ak@suse.de +6 -5 # x86_64: Don't wait on panic # # ChangeSet # 2004/11/02 15:04:07-08:00 ak@suse.de # [PATCH] x86_64: add nmi button support # # Ported from i386 # # Support a sysctl to raise an oops with an NMI # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sysctl.c # 2004/11/02 06:40:36-08:00 ak@suse.de +2 -2 # x86_64: add nmi button support # # include/asm-x86_64/nmi.h # 2004/11/02 06:40:36-08:00 ak@suse.de +6 -0 # x86_64: add nmi button support # # arch/x86_64/kernel/traps.c # 2004/11/02 06:40:36-08:00 ak@suse.de +21 -1 # x86_64: add nmi button support # # arch/x86_64/kernel/nmi.c # 2004/11/02 06:40:36-08:00 ak@suse.de +46 -18 # x86_64: add nmi button support # # ChangeSet # 2004/11/02 15:03:56-08:00 ak@suse.de # [PATCH] x86_64: Fix CONFIG_X86_MCE # # Fix CONFIG_X86_MCE to really enable/disable the MCE code # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/traps.c # 2004/11/02 06:41:13-08:00 ak@suse.de +2 -0 # x86_64: Fix CONFIG_X86_MCE # # arch/x86_64/kernel/setup.c # 2004/11/02 06:41:11-08:00 ak@suse.de +2 -0 # x86_64: Fix CONFIG_X86_MCE # # arch/x86_64/kernel/entry.S # 2004/11/02 06:40:36-08:00 ak@suse.de +2 -0 # x86_64: Fix CONFIG_X86_MCE # # arch/x86_64/kernel/Makefile # 2004/11/02 06:40:36-08:00 ak@suse.de +1 -1 # x86_64: Fix CONFIG_X86_MCE # # ChangeSet # 2004/11/02 15:03:40-08:00 ak@suse.de # [PATCH] x86_64: Fix make all # # From: Olaf Hering # # make all fails while building a helper app: # # arch/x86_64/boot/tools/build.c:36:22: asm/boot.h: No such file or directory # # This patch fixes it for me. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/boot/Makefile # 2004/11/02 06:40:36-08:00 ak@suse.de +1 -0 # x86_64: Fix make all # # ChangeSet # 2004/11/02 15:03:23-08:00 ak@suse.de # [PATCH] x86_64: Fix some readl/writel warnings # # Fix lots of readl/writel warnings in arch/x86_64 # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/vsyscall.h # 2004/11/02 06:40:36-08:00 ak@suse.de +2 -2 # x86_64: Fix some readl/writel warnings # # arch/x86_64/kernel/vsyscall.c # 2004/11/02 06:40:36-08:00 ak@suse.de +1 -1 # x86_64: Fix some readl/writel warnings # # arch/x86_64/kernel/early_printk.c # 2004/11/02 06:40:36-08:00 ak@suse.de +1 -1 # x86_64: Fix some readl/writel warnings # # ChangeSet # 2004/11/02 15:02:49-08:00 ak@suse.de # [PATCH] x86_64: Add early exception handler # # Add an early exception handler on x86-64 to get better debugging output for # crashes before traps_init. # # Requires earlyconsole. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/proto.h # 2004/11/02 06:40:35-08:00 ak@suse.de +2 -0 # x86_64: Add early exception handler # # include/asm-x86_64/desc.h # 2004/11/02 06:40:35-08:00 ak@suse.de +2 -0 # x86_64: Add early exception handler # # arch/x86_64/kernel/head64.c # 2004/11/02 06:40:35-08:00 ak@suse.de +6 -0 # x86_64: Add early exception handler # # arch/x86_64/kernel/head.S # 2004/11/02 06:40:35-08:00 ak@suse.de +12 -0 # x86_64: Add early exception handler # # ChangeSet # 2004/11/02 15:02:29-08:00 ak@suse.de # [PATCH] x86_64: Fix e820 overflow. # # Originally from Venkatesh Pallipadi for i386 # # An e820 map with more than 18 entries would overflow into the EDID area in the # zero page. Fix this. # # This is a x86-64 port of Venka's i386 version. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/bootsetup.h # 2004/11/02 06:40:35-08:00 ak@suse.de +1 -1 # x86_64: Fix e820 overflow. # # arch/x86_64/boot/video.S # 2004/11/02 06:40:35-08:00 ak@suse.de +2 -2 # x86_64: Fix e820 overflow. # # ChangeSet # 2004/11/02 15:02:12-08:00 ak@suse.de # [PATCH] x86_64: Defconfig update # # Update defconfig # # At the request of willy: add UHCI # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/defconfig # 2004/11/02 06:40:35-08:00 ak@suse.de +42 -15 # x86_64: Defconfig update # # ChangeSet # 2004/11/02 15:01:56-08:00 ak@suse.de # [PATCH] x86_64: Fix compat_timer_t # # Fix type of compat_timer_t # # Pointed out by Matthew Wilcox # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/compat.h # 2004/11/02 06:40:35-08:00 ak@suse.de +1 -1 # x86_64: Fix compat_timer_t # # ChangeSet # 2004/11/02 15:01:43-08:00 ak@suse.de # [PATCH] x86_64: Report SSE3 on AMD CPUs # # From: Mark Langsdorf # # Report SSE3 on AMD CPUs in /proc/cpuinfo # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/setup.c # 2004/11/02 06:41:13-08:00 ak@suse.de +1 -1 # x86_64: Report SSE3 on AMD CPUs # # arch/i386/kernel/cpu/proc.c # 2004/11/02 06:40:34-08:00 ak@suse.de +1 -1 # x86_64: Report SSE3 on AMD CPUs # # ChangeSet # 2004/11/02 15:01:27-08:00 ak@suse.de # [PATCH] x86_64: Update cpuid feature tables. # # Add missing AMD CPUID feature bits. # # Fix wrong definition for AMD HTVALID flag. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/cpufeature.h # 2004/11/02 06:40:34-08:00 ak@suse.de +3 -1 # x86_64: Update cpuid feature tables. # # arch/x86_64/kernel/setup.c # 2004/11/02 06:41:15-08:00 ak@suse.de +7 -1 # x86_64: Update cpuid feature tables. # # ChangeSet # 2004/11/02 15:01:08-08:00 yanmin.zhang@intel.com # [PATCH] x86_64: Fix 32bit aio setup # # Kernel 2.6.9-rc3-mm3 has a bug in function sys32_io_setup in file # arch/x86_64/ia32/sys_ia32.c. Local variable ctx64 is not initiated before # sys32_io_setup calls sys_io_setup. If ctx64 is not zero, and sys_io_setup # will return -EINVAL. Generic function compat_sys_io_setup has not the bug. # # Here is the patch against 2.6.9-rc3-mm3. Just use compat_sys_io_setup to # replace sys32_io_setup. # # Signed-off-by: Zhang Yanmin # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/ia32/sys_ia32.c # 2004/11/02 06:41:12-08:00 yanmin.zhang@intel.com +0 -15 # x86_64: Fix 32bit aio setup # # arch/x86_64/ia32/ia32entry.S # 2004/11/02 06:41:12-08:00 yanmin.zhang@intel.com +1 -1 # x86_64: Fix 32bit aio setup # # ChangeSet # 2004/11/02 15:00:52-08:00 trini@kernel.crashing.org # [PATCH] ppc32: fix early request_irq # # Here's a patch which backs out the fix Randy Vinson came up with, and makes # i8259_init() and openpic_hookup_cascade() use setup_irq (tested on LoPEC). # This also converts the rest of the request_irq callers that were expecting the # old behavior (psurge SMP, chrp xmon, 85xx, some 82xx). This is more untested, # but looks correct. I've left 8xx alone in this as it needs other changes # before it would make sense. # # Signed-off-by: Tom Rini # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/open_pic.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +9 -1 # ppc32: fix early request_irq # # arch/ppc/syslib/i8259.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +8 -16 # ppc32: fix early request_irq # # arch/ppc/platforms/sbc82xx.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +8 -2 # ppc32: fix early request_irq # # arch/ppc/platforms/sandpoint.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +2 -9 # ppc32: fix early request_irq # # arch/ppc/platforms/prep_setup.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +3 -14 # ppc32: fix early request_irq # # arch/ppc/platforms/pplus.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +2 -10 # ppc32: fix early request_irq # # arch/ppc/platforms/pmac_smp.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +8 -1 # ppc32: fix early request_irq # # arch/ppc/platforms/mvme5100.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +3 -12 # ppc32: fix early request_irq # # arch/ppc/platforms/mcpn765.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +2 -9 # ppc32: fix early request_irq # # arch/ppc/platforms/lopec.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +4 -11 # ppc32: fix early request_irq # # arch/ppc/platforms/chrp_setup.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +11 -13 # ppc32: fix early request_irq # # arch/ppc/platforms/85xx/mpc85xx_cds_common.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +8 -1 # ppc32: fix early request_irq # # arch/ppc/platforms/85xx/mpc8560_ads.c # 2004/11/02 06:40:33-08:00 trini@kernel.crashing.org +8 -1 # ppc32: fix early request_irq # # ChangeSet # 2004/11/02 15:00:40-08:00 mporter@kernel.crashing.org # [PATCH] ppc32: 40x and Book E debug: 4xx platform support # # This patch adds support to the 40x and 44x platform code for initializing # debug events and using the in-kernel kgdb stub. # # Signed-off-by: Matt Porter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/ppc4xx_setup.c # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +12 -38 # ppc32: 40x and Book E debug: 4xx platform support # # arch/ppc/syslib/ibm44x_common.c # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +12 -0 # ppc32: 40x and Book E debug: 4xx platform support # # arch/ppc/syslib/Makefile # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +0 -1 # ppc32: 40x and Book E debug: 4xx platform support # # arch/ppc/platforms/4xx/ocotea.c # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +0 -8 # ppc32: 40x and Book E debug: 4xx platform support # # arch/ppc/platforms/4xx/ebony.c # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +0 -8 # ppc32: 40x and Book E debug: 4xx platform support # # arch/ppc/platforms/4xx/Kconfig # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +1 -1 # ppc32: 40x and Book E debug: 4xx platform support # # ChangeSet # 2004/11/02 15:00:23-08:00 mporter@kernel.crashing.org # [PATCH] ppc32: 40x and Book E debug: core support # # This patch updates the 40x and Book E Debug exception handling paths to # handle kernel space debug events. It also fixes up the in-kernel ppc32 # kgdb stub to work properly. # # Signed-off-by: Matt Porter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/reg_booke.h # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +2 -2 # ppc32: 40x and Book E debug: core support # # arch/ppc/kernel/traps.c # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +12 -12 # ppc32: 40x and Book E debug: core support # # arch/ppc/kernel/ptrace.c # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +5 -4 # ppc32: 40x and Book E debug: core support # # arch/ppc/kernel/ppc-stub.c # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +4 -16 # ppc32: 40x and Book E debug: core support # # arch/ppc/kernel/head_e500.S # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +1 -57 # ppc32: 40x and Book E debug: core support # # arch/ppc/kernel/head_booke.h # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +66 -0 # ppc32: 40x and Book E debug: core support # # arch/ppc/kernel/head_4xx.S # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +32 -14 # ppc32: 40x and Book E debug: core support # # arch/ppc/kernel/head_44x.S # 2004/11/02 06:40:33-08:00 mporter@kernel.crashing.org +1 -57 # ppc32: 40x and Book E debug: core support # # ChangeSet # 2004/11/02 15:00:11-08:00 peterc@gelato.unsw.edu.au # [PATCH] standalone sys_ni.c for not-implemented syscalls # # Sticking the not-implemented syscall stuff in sys.c is a pain because the # cond_syscall()s explode when certain prototypes are in scope. And we need # those prototypes' header files for the C code in sys.c. # # Fix all that up by moving all the sys_ni_syscall code into its own .c file. # # Signed-off-by: Peter Chubb # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sys_ni.c # 2004/11/02 06:40:33-08:00 peterc@gelato.unsw.edu.au +84 -0 # standalone sys_ni.c for not-implemented syscalls # # kernel/sys_ni.c # 2004/11/02 06:40:33-08:00 peterc@gelato.unsw.edu.au +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/kernel/sys_ni.c # # kernel/sys.c # 2004/11/02 06:40:33-08:00 peterc@gelato.unsw.edu.au +1 -80 # standalone sys_ni.c for not-implemented syscalls # # kernel/Makefile # 2004/11/02 06:40:33-08:00 peterc@gelato.unsw.edu.au +1 -1 # standalone sys_ni.c for not-implemented syscalls # # ChangeSet # 2004/11/02 22:44:07+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] Fix PPC64 for recent serial changes # # - linux/8250.h is replaced by linux/serial_8250.h # - we now pass serial port information via a platform device. # # include/asm-ppc64/serial.h # 2004/11/02 22:40:55+00:00 rmk@flint.arm.linux.org.uk +0 -7 # Remove unnecessary "get_legacy_serial_ports" and UART_NR # definition. # # arch/ppc64/kernel/setup.c # 2004/11/02 22:40:55+00:00 rmk@flint.arm.linux.org.uk +27 -26 # Update ppc64 setup.c: # - its now called serial_8250.h # - fix serial port registration to use a platform_device. # # ChangeSet # 2004/11/02 22:23:03+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2190/1: S3C2410 - fix compile for S3C2440 CPUs # # Patch from Ben Dooks # # Fixes mis-labelled timer variables, and incldes the # clock header to allow the code to compile. This # was not caught on previous rounds as all the # s3c2440 machine support is pending the finalisation # of the new s3c2440 uart driver (arriving soon) # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/s3c2440.c # 2004/11/01 19:36:53+00:00 ben-linux@org.rmk.(none) +6 -4 # [PATCH] 2190/1: S3C2410 - fix compile for S3C2440 CPUs # # ChangeSet # 2004/11/02 22:13:54+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2189/1: S3C2410 - select pclk as source for timer if none specified for machine # # Patch from Ben Dooks # # Select the PCLK based TIMER4 to provide the system timer tick # if there is no machine specific timer setup specified. This # should make it easier to add new machines, as well as cut down # on the code required in time.c when they are added. # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/time.c # 2004/11/01 19:34:36+00:00 ben-linux@org.rmk.(none) +7 -12 # [PATCH] 2189/1: S3C2410 - select pclk as source for timer if none specified for machine # # ChangeSet # 2004/11/02 22:02:27+00:00 davis_g@com.rmk.(none) # [ARM PATCH] 2188/1: Add missing MODULE_LICENSE declaration in PXA Lubbock PCMCIA driver # # Patch from George G. Davis # # The Lubbock PCMCIA socket driver, drivers/pcmcia/pxa2xx_lubbock.c, # lacks a MODULE_LICENSE declaration. This patch merely adds the missing # MODULE_LICENSE declaration to eliminate tainted kernel warnings when # this driver is built as a module. I have intentionally not used the # Dual MPL/GPL license in this case because 1) current linux-2.6.10-rc1 # PXA PCMCIA drivers use only the GPL license, 2) the original source # files on which the PXA PCMCIA drivers are based, i.e. the SA11xx PCMCIA # drivers, state: "If you wish to allow the use of your version of this # file only under the terms of the GPL and not to allow others to use your # version of this file under the MPL, indicate your decision by deleting # the provisions above and replace them with the notice and other # provisions required by the GPL." # # # Signed-off-by:: George G. Davis # # drivers/pcmcia/pxa2xx_lubbock.c # 2004/11/02 00:00:00+00:00 davis_g@com.rmk.(none) +2 -0 # [PATCH] 2188/1: Add missing MODULE_LICENSE declaration in PXA Lubbock PCMCIA driver # # ChangeSet # 2004/11/02 21:51:28+00:00 nico@org.rmk.(none) # [ARM PATCH] 2187/1: fix lacking capability in pxa_gpio_mode() # # Patch from Nicolas Pitre # # This allows to set the default state of GPIOs before they're enabled # as output, eliminating spurious level transitions. # # Signed-off-by: Nicolas Pitre # # include/asm-arm/arch-pxa/pxa-regs.h # 2004/11/01 16:41:13+00:00 nico@org.rmk.(none) +2 -0 # [PATCH] 2187/1: fix lacking capability in pxa_gpio_mode() # # arch/arm/mach-pxa/generic.c # 2004/11/01 16:51:45+00:00 nico@org.rmk.(none) +4 -0 # [PATCH] 2187/1: fix lacking capability in pxa_gpio_mode() # # ChangeSet # 2004/11/02 13:23:01-08:00 tony.luck@intel.com # [IA64] promote configs/generic_defconfig to defconfig # # arch/ia64/defconfig should be one that is usable by the # largest cross-section of the ia64 community. Replace # old version with an updated version of generic_defconfig. # Change suggested by Jesse Barnes. # # Signed-off-by: Tony Luck # # BitKeeper/deleted/.del-generic_defconfig~30fb2f04204430eb # 2004/11/02 13:19:08-08:00 tony.luck@intel.com +0 -0 # Delete: arch/ia64/configs/generic_defconfig # # arch/ia64/defconfig # 2004/11/02 13:17:17-08:00 tony.luck@intel.com +328 -323 # Replace with (updated) arch/ia64/configs/generic_defconfig # # ChangeSet # 2004/11/02 12:53:10-08:00 tony.luck@intel.com # [IA64] tiger_defconfig update for 2.6.10-rc1 # # Enable MCA_RECOVERY, TMPFS_XATTR, and other # miscellaneous config options. # # Signed-off-by: Tony Luck # # arch/ia64/configs/tiger_defconfig # 2004/11/02 12:47:41-08:00 tony.luck@intel.com +46 -13 # update for 2.6.10-rc1 # # ChangeSet # 2004/11/02 12:43:50-08:00 jbarnes@sgi.com # [IA64-SGI] update sn2_defconfig # # Update sn2_defconfig to reflect some new options: # o enable MCA debugging of more than just TLB errors # o enable tmpfs xattr support # o enable kernel userspace events # o defaults for other new options # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # arch/ia64/configs/sn2_defconfig # 2004/11/02 12:42:19-08:00 jbarnes@sgi.com +46 -12 # update sn2_defconfig # # ChangeSet # 2004/11/02 12:39:58-08:00 t-kochi@bq.jp.nec.com # [IA64] cleanup CPU drift print # # This patch skips printing drift information of a cpu where # ITC drift information is not supported by SAL. Without this, # bogus value (-1ppm) is printed on boot. # # CPU 1: base freq=200.007MHz, ITC ratio=10/2, ITC freq=1000.035MHz+/--1ppm # # is now # # CPU 1: base freq=200.007MHz, ITC ratio=10/2, ITC freq=1000.035MHz # # Signed-off-by: Takayoshi Kochi # Signed-off-by: Tony Luck # # arch/ia64/kernel/time.c # 2004/11/02 12:38:15-08:00 t-kochi@bq.jp.nec.com +10 -7 # cleanup CPU drift print # # ChangeSet # 2004/11/02 12:33:20-08:00 steiner@sgi.com # [IA64-SGI] Delete unused variable (master_node_bedrock_address) # # Delete master_node_bedrock_address. It is no longer needed. # # Signed-off-by: Jack Steiner # Signed-off-by: Tony Luck # # arch/ia64/sn/kernel/setup.c # 2004/11/02 12:32:14-08:00 steiner@sgi.com +0 -25 # Delete unused variable (master_node_bedrock_address) # # ChangeSet # 2004/11/02 12:29:59-08:00 jbarnes@sgi.com # [IA64-SGI] move nic_t to asm/sn/types.h # # Somehow nic_t crept into arch.h. Move it to types.h where it belongs (it # depends on u64, so pull in linux/types.h too). # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # include/asm-ia64/sn/types.h # 2004/11/02 12:29:08-08:00 jbarnes@sgi.com +3 -1 # move nic_t to asm/sn/types.h # # include/asm-ia64/sn/arch.h # 2004/11/02 12:29:01-08:00 jbarnes@sgi.com +0 -2 # move nic_t to asm/sn/types.h # # ChangeSet # 2004/11/02 12:27:31-08:00 jbarnes@sgi.com # [IA64-SGI] remove redundant macros # # This patch removes some redundant nasid conversion macros from arch.h and # updates callers to use the version they were defined to instead. # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # include/asm-ia64/sn/arch.h # 2004/11/02 12:26:38-08:00 jbarnes@sgi.com +0 -3 # remove redundant macros # # arch/ia64/sn/pci/pcibr/pcibr_provider.c # 2004/11/02 12:26:37-08:00 jbarnes@sgi.com +1 -1 # remove redundant macros # # arch/ia64/sn/pci/pcibr/pcibr_dma.c # 2004/11/02 12:26:35-08:00 jbarnes@sgi.com +2 -2 # remove redundant macros # # arch/ia64/sn/kernel/io_init.c # 2004/11/02 12:26:24-08:00 jbarnes@sgi.com +2 -2 # remove redundant macros # # ChangeSet # 2004/11/02 12:23:19-08:00 jbarnes@sgi.com # [IA64-SGI] remove duplicate INVALID_* defines from arch.h # # When I did the sparse stuff, I noticed some duplicate INVALID_* defines. This # patch removes one set of them and adds the proper include file to sn_sal.h. # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # include/asm-ia64/sn/sn_sal.h # 2004/11/02 12:21:55-08:00 jbarnes@sgi.com +1 -0 # adds the proper include file to sn_sal.h # # include/asm-ia64/sn/arch.h # 2004/11/02 12:21:39-08:00 jbarnes@sgi.com +0 -6 # remove duplicate INVALID_* defines from arch.h # # ChangeSet # 2004/11/02 13:31:30-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-ref # into intel.com:/home/lenb/src/26-latest-dev # # drivers/pnp/pnpbios/core.c # 2004/11/02 13:31:24-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/sleep/main.c # 2004/11/02 13:31:24-05:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/02 13:31:20-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/02 07:50:59-05:00 bzolnier@elka.pw.edu.pl # [PATCH] libata PIO bugfix # # Untested but based on working IDE fix. # # We need to kmap()/kunmap() the current page # not the first page of the scatterlist segment. # # Signed-off-by: Bartlomiej Zolnierkiewicz # Signed-off-by: Jeff Garzik # # drivers/scsi/libata-core.c # 2004/10/30 17:51:12-04:00 bzolnier@elka.pw.edu.pl +25 -5 # PIO bugfix # # ChangeSet # 2004/11/02 09:41:48+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: Remove two warnings. # # drivers/serial/8250.c # 2004/11/02 09:31:48+00:00 rmk@flint.arm.linux.org.uk +1 -2 # Remove two warnings. # # ChangeSet # 2004/11/02 09:28:41+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] Add ALPHA_KLUDGE_MCR from include/linux/serialP.h # # drivers/serial/8250.h # 2004/11/02 09:16:50+00:00 rmk@flint.arm.linux.org.uk +11 -0 # Add ALPHA_KLUDGE_MCR from include/linux/serialP.h # # ChangeSet # 2004/11/02 09:14:25+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] Add support for Dell PCI Remote Access Card III. # # drivers/serial/8250_pci.c # 2004/11/02 09:10:58+00:00 rmk@flint.arm.linux.org.uk +14 -0 # Add support for Dell Remote Access Card III. # # addr: 0xec40 irq: 10 # pci config space: # 00: 28 10 08 00 03 01 90 02 00 00 00 ff 10 20 80 00 # 10: 00 20 20 fe 41 ec 00 00 08 00 b0 fe 00 00 00 00 # 20: 00 00 00 00 00 00 00 00 00 00 00 00 28 10 08 00 # 30: 00 00 00 00 48 00 00 00 00 00 00 00 0a 02 00 00 # # Region 0: Memory at fe202000 (32-bit, non-prefetchable) [size=4K] # Region 1: I/O ports at ec40 [size=64] # Region 2: Memory at feb00000 (32-bit, prefetchable) [size=512K] # Interrupt: pin B routed to IRQ 10 # # include/linux/pci_ids.h # 2004/11/02 09:10:40+00:00 rmk@flint.arm.linux.org.uk +2 -1 # Add support for Dell Remote Access Card III. # # ChangeSet # 2004/11/02 02:53:13-05:00 len.brown@intel.com # [ACPI] Remove default PNPACPI driver binding to legacy ACPI devices. # # This conflicted with PNP-aware and ACPI-aware drivers, # and required that its exclude-list carry vendor-specific # driver names, which we can't possibly maintain. # # Signed-off-by: David Shaohua Li # Signed-off-by: Len Brown # # drivers/pnp/pnpacpi/core.c # 2004/11/01 20:39:21-05:00 len.brown@intel.com +16 -30 # Import patch remove-driver.patch # # ChangeSet # 2004/11/02 02:44:23-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # drivers/acpi/thermal.c # 2004/11/02 02:44:19-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/scan.c # 2004/11/02 02:44:19-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/11/02 02:44:19-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/motherboard.c # 2004/11/02 02:44:19-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/02 02:40:16-05:00 len.brown@intel.com # [ACPI] fix return values for ACPI_FUNCTION_TRACE # http://bugzilla.kernel.org/show_bug.cgi?id=3336 # # Signed-off-by: Len Brown # # drivers/acpi/video.c # 2004/11/02 02:40:09-05:00 len.brown@intel.com +1 -1 # fix return values for ACPI_FUNCTION_TRACE # # drivers/acpi/utils.c # 2004/11/02 02:40:09-05:00 len.brown@intel.com +1 -1 # fix return values for ACPI_FUNCTION_TRACE # # drivers/acpi/thermal.c # 2004/11/02 02:40:09-05:00 len.brown@intel.com +7 -7 # fix return values for ACPI_FUNCTION_TRACE # # drivers/acpi/scan.c # 2004/11/02 02:40:09-05:00 len.brown@intel.com +2 -2 # fix return values for ACPI_FUNCTION_TRACE # # drivers/acpi/processor.c # 2004/11/02 02:40:09-05:00 len.brown@intel.com +5 -5 # fix return values for ACPI_FUNCTION_TRACE # # drivers/acpi/power.c # 2004/11/02 02:40:09-05:00 len.brown@intel.com +8 -8 # fix return values for ACPI_FUNCTION_TRACE # # drivers/acpi/pci_link.c # 2004/11/02 02:40:09-05:00 len.brown@intel.com +11 -11 # fix return values for ACPI_FUNCTION_TRACE # # drivers/acpi/motherboard.c # 2004/11/02 02:40:09-05:00 len.brown@intel.com +2 -2 # fix return values for ACPI_FUNCTION_TRACE # # drivers/acpi/button.c # 2004/11/02 02:40:09-05:00 len.brown@intel.com +4 -4 # fix return values for ACPI_FUNCTION_TRACE # # drivers/acpi/bus.c # 2004/11/02 02:40:09-05:00 len.brown@intel.com +5 -5 # fix return values for ACPI_FUNCTION_TRACE # # drivers/acpi/ac.c # 2004/11/02 02:40:09-05:00 len.brown@intel.com +4 -4 # fix return values for ACPI_FUNCTION_TRACE # # ChangeSet # 2004/11/01 23:56:25-05:00 len.brown@intel.com # [ACPI] correct compiled-in acpi_dbg_level default # # Signed-off-by: Len Brown # # drivers/acpi/utilities/utglobal.c # 2004/11/01 23:56:19-05:00 len.brown@intel.com +2 -2 # acpi_dbg_level, acpi_dbg_layer defaults # # ChangeSet # 2004/11/02 01:17:58-02:00 acme@conectiva.com.br # [NET] add missing include to iw_handler.h # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/net/iw_handler.h # 2004/11/02 01:17:50-02:00 acme@conectiva.com.br +3 -0 # [NET] add missing include to iw_handler.h # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/02 01:12:53-02:00 acme@conectiva.com.br # [NET] add missing include to icmp.h # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/icmp.h # 2004/11/02 01:12:44-02:00 acme@conectiva.com.br +2 -0 # [NET] add missing include to icmp.h # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/02 01:08:59-02:00 acme@conectiva.com.br # [NET] add missing include to inetdevice.h # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/inetdevice.h # 2004/11/02 01:08:50-02:00 acme@conectiva.com.br +3 -0 # [NET] add missing include to inetdevice.h # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/02 01:08:21-02:00 acme@conectiva.com.br # [NET] add missing include to inet.h # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/inet.h # 2004/11/02 01:08:13-02:00 acme@conectiva.com.br +2 -0 # [NET] add missing include to inet.h # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 22:00:20-05:00 len.brown@intel.com # [ACPI] fix x86_64 build warnings in video.c (Luming Yu) # # Signed-off-by: Len Brown # # drivers/acpi/video.c # 2004/10/31 22:31:28-05:00 len.brown@intel.com +9 -9 # Import patch video.c.diff # # ChangeSet # 2004/11/01 21:08:22-05:00 len.brown@intel.com # [ACPI] ACPIPNP handle IRQ resource value of 0 (David Shaohua Li) # # Signed-off-by: Len Brown # # drivers/pnp/pnpacpi/rsparser.c # 2004/10/31 20:21:10-05:00 len.brown@intel.com +4 -2 # Import patch rsparser.patch # # ChangeSet # 2004/11/01 17:53:52-08:00 chas@relax.cmf.nrl.navy.mil # [ATM]: [drivers] add missing pci_tbl exports (pointed out by Adam # # drivers/atm/idt77252.c # 2004/11/01 17:53:32-08:00 chas@relax.cmf.nrl.navy.mil +2 -0 # [ATM]: [drivers] add missing pci_tbl exports (pointed out by Adam # # drivers/atm/horizon.c # 2004/11/01 17:53:32-08:00 chas@relax.cmf.nrl.navy.mil +2 -0 # [ATM]: [drivers] add missing pci_tbl exports (pointed out by Adam # # drivers/atm/he.c # 2004/11/01 17:53:32-08:00 chas@relax.cmf.nrl.navy.mil +2 -0 # [ATM]: [drivers] add missing pci_tbl exports (pointed out by Adam # # drivers/atm/ambassador.c # 2004/11/01 17:53:32-08:00 chas@relax.cmf.nrl.navy.mil +2 -0 # [ATM]: [drivers] add missing pci_tbl exports (pointed out by Adam # # ChangeSet # 2004/11/01 17:53:01-08:00 chas@relax.cmf.nrl.navy.mil # [ATM]: [ambassador] fix type and printk warning (from Randy Dunlap ) # # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # drivers/atm/ambassador.c # 2004/11/01 17:52:23-08:00 chas@relax.cmf.nrl.navy.mil +1 -1 # [ATM]: [ambassador] fix type and printk warning (from Randy Dunlap ) # # ChangeSet # 2004/11/01 17:41:19-08:00 mingo@elte.hu # [NET]: Fix unbalanced local_bh_enable() in dev_queue_xmit() # # Signed-off-by: Ingo Molnar # Signed-off-by: David S. Miller # # net/core/dev.c # 2004/11/01 17:40:59-08:00 mingo@elte.hu +5 -6 # [NET]: Fix unbalanced local_bh_enable() in dev_queue_xmit() # # Signed-off-by: Ingo Molnar # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 17:31:20-08:00 shemminger@osdl.org # [NETFILTER]: Fix build without INET. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/core/netfilter.c # 2004/11/01 17:31:01-08:00 shemminger@osdl.org +1 -1 # [NETFILTER]: Fix build without INET. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 17:20:45-08:00 davem@nuts.davemloft.net # [TG3]: Bump driver version and reldate. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/11/01 17:20:20-08:00 davem@nuts.davemloft.net +2 -2 # [TG3]: Bump driver version and reldate. # # ChangeSet # 2004/11/01 17:19:53-08:00 davem@nuts.davemloft.net # [TG3]: Use ioremap_nocache(). # # Noticed by Andi Kleen. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/11/01 17:19:28-08:00 davem@nuts.davemloft.net +1 -1 # [TG3]: Use ioremap_nocache(). # # ChangeSet # 2004/11/01 17:17:25-08:00 Michael.Waychison@Sun.COM # [TG3]: Fix fiber hw autoneg bounces # # We've recently noticed that the autonegotiation cleanup made a while # back (between tg3 3.8 and 3.9) has issues which make the link bounce up # and down. # # I've traced it to be caused by the tg3_timer 1 second work noticing that # MAC_STATUS_LNKSTATE_CHANGED was set, which driver would see as the link # going down. # # Upon further inspection, it appears that we don't wait long enough # between setting SG_DIG_CTRL and reading the SG_DIG_STATUS for the result. # # The following patch (from a quasi recent bk tree) makes this code path # wait up to 200ms for the link to establish. In my testing, I'm seeing # it take around 20ms for the negotiation to complete. # # I haven't had the chance to test how this patch affects the case where # the switch doesn't have autoneg enabled, although I suspect fallback # should work correctly. # # Please consider applying, thanks, # # Signed-off-by: Mike Waychison # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/11/01 17:17:05-08:00 Michael.Waychison@Sun.COM +10 -1 # [TG3]: Fix fiber hw autoneg bounces # # We've recently noticed that the autonegotiation cleanup made a while # back (between tg3 3.8 and 3.9) has issues which make the link bounce up # and down. # # I've traced it to be caused by the tg3_timer 1 second work noticing that # MAC_STATUS_LNKSTATE_CHANGED was set, which driver would see as the link # going down. # # Upon further inspection, it appears that we don't wait long enough # between setting SG_DIG_CTRL and reading the SG_DIG_STATUS for the result. # # The following patch (from a quasi recent bk tree) makes this code path # wait up to 200ms for the link to establish. In my testing, I'm seeing # it take around 20ms for the negotiation to complete. # # I haven't had the chance to test how this patch affects the case where # the switch doesn't have autoneg enabled, although I suspect fallback # should work correctly. # # Please consider applying, thanks, # # Signed-off-by: Mike Waychison # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 17:16:17-08:00 herbert@gondor.apana.org.au # [XFRM]: Fix build failures without CONFIG_INET # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/Kconfig # 2004/11/01 17:15:57-08:00 herbert@gondor.apana.org.au +0 -4 # [XFRM]: Fix build failures without CONFIG_INET # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/Makefile # 2004/11/01 17:15:57-08:00 herbert@gondor.apana.org.au +2 -1 # [XFRM]: Fix build failures without CONFIG_INET # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/Kconfig # 2004/11/01 17:15:57-08:00 herbert@gondor.apana.org.au +4 -0 # [XFRM]: Fix build failures without CONFIG_INET # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 17:13:12-08:00 arjan@infradead.org # [TCP]: Unexport sysctl_tcp_tw_recycle # # Unexport sysctl_tcp_tw_recycle; nothing is using it in modules (it's quite # internal to the ipv4 code after all); as a bonus item it gets rid of an # ifdef... # # Signed-off-by: Arjan van de Ven # Signed-off-by: David S. Miller # # net/ipv4/tcp_minisocks.c # 2004/11/01 17:12:53-08:00 arjan@infradead.org +0 -4 # [TCP]: Unexport sysctl_tcp_tw_recycle # # Unexport sysctl_tcp_tw_recycle; nothing is using it in modules (it's quite # internal to the ipv4 code after all); as a bonus item it gets rid of an # ifdef... # # Signed-off-by: Arjan van de Ven # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 17:03:49-08:00 matthew@wil.cx # [PATCH] parisc: Remove isr verification # # Remove isr verification printf. This is not needed, and was never needed, # we always have access to the page if we made it past the security check # in traps.c # # Committed-by: Carlos O'Donell # # arch/parisc/kernel/unaligned.c # 2004/10/31 22:09:36-08:00 matthew@wil.cx +0 -11 # parisc: Remove isr verification # # ChangeSet # 2004/11/01 17:03:38-08:00 matthew@wil.cx # [PATCH] parisc: remove K_STW_PIC and K_LDW_PIC # # There is no pure assembly inline syscall for userspace to include. Thus # remove the definitions of K_STW_PIC and K_LDW_PIC. # # Committed-by: Carlos O'Donell # # include/asm-parisc/unistd.h # 2004/10/31 22:10:12-08:00 matthew@wil.cx +0 -4 # parisc: remove K_STW_PIC and K_LDW_PIC # # ChangeSet # 2004/11/01 17:03:25-08:00 matthew@wil.cx # [PATCH] parisc: _raw_write_trylock # # Need a _raw_write_trylock() for the out of line spinlock code to compile # # ... nothing in the kernel actually uses this, of course ... # # Committed-by: James Bottomley # # include/asm-parisc/spinlock.h # 2004/10/31 22:10:11-08:00 matthew@wil.cx +20 -0 # parisc: _raw_write_trylock # # arch/parisc/lib/debuglocks.c # 2004/10/31 22:09:36-08:00 matthew@wil.cx +34 -0 # parisc: _raw_write_trylock # # ChangeSet # 2004/11/01 17:03:12-08:00 matthew@wil.cx # [PATCH] parisc: support get/put_unaligned # # We need to include asm-generic/uaccess.h for the new # get/put_unaligned macros # # Committed-by: James Bottomley # # include/asm-parisc/uaccess.h # 2004/10/31 22:10:11-08:00 matthew@wil.cx +1 -0 # parisc: support get/put_unaligned # # ChangeSet # 2004/11/01 17:03:00-08:00 matthew@wil.cx # [PATCH] parisc: signal race fixes # # Signal race fixes # # Committed-by: Carlos O'Donell # Committed-by: James Bottomley # # arch/parisc/kernel/signal.c # 2004/10/31 22:09:35-08:00 matthew@wil.cx +15 -16 # parisc: signal race fixes # # ChangeSet # 2004/11/01 17:02:47-08:00 matthew@wil.cx # [PATCH] parisc: fix ptrace # # Make ptrace work again # # someone (not naming names) forgot that %cr30 is the *thread* register # not the task register. # # Committed-by: James Bottomley # # arch/parisc/kernel/syscall.S # 2004/10/31 22:09:36-08:00 matthew@wil.cx +1 -0 # parisc: fix ptrace # # ChangeSet # 2004/11/01 17:02:35-08:00 matthew@wil.cx # [PATCH] parisc: better stack traces # # In parisc_terminate(), do the stack trace from the faulting location # instead of from the current (i.e. parisc_terminate()) location. # # Committed-by: Randolph Chung # # arch/parisc/kernel/traps.c # 2004/10/31 22:09:36-08:00 matthew@wil.cx +30 -19 # parisc: better stack traces # # ChangeSet # 2004/11/01 17:02:22-08:00 matthew@wil.cx # [PATCH] parisc: add copyright to sba_iommu # # add copyright for knaresh - he did initial work for pa8800 support on 2.4 # # Committed-by: Grant Grundler # # drivers/parisc/sba_iommu.c # 2004/10/31 22:09:54-08:00 matthew@wil.cx +3 -2 # parisc: add copyright to sba_iommu # # ChangeSet # 2004/11/01 16:54:05-08:00 tgraf@suug.ch # [PKT_SCHED]: cls_u32: Use generic routines for class binding and police config/dump # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_u32.c # 2004/11/01 16:53:45-08:00 tgraf@suug.ch +30 -122 # [PKT_SCHED]: cls_u32: Use generic routines for class binding and police config/dump # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:53:32-08:00 tgraf@suug.ch # [PKT_SCHED]: cls_tcindex: Use generic routines for class binding and police config/dump # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_tcindex.c # 2004/11/01 16:53:13-08:00 tgraf@suug.ch +10 -28 # [PKT_SCHED]: cls_tcindex: Use generic routines for class binding and police config/dump # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:52:55-08:00 tgraf@suug.ch # [PKT_SCHED]: cls_rsvp*: Use generic routines for class binding and police config/dump # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_rsvp.h # 2004/11/01 16:52:36-08:00 tgraf@suug.ch +11 -35 # [PKT_SCHED]: cls_rsvp*: Use generic routines for class binding and police config/dump # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:51:55-08:00 tgraf@suug.ch # [PKT_SCHED]: cls_route: Use generic routines for class binding and police config/dump # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_route.c # 2004/11/01 16:51:36-08:00 tgraf@suug.ch +11 -36 # [PKT_SCHED]: cls_route: Use generic routines for class binding and police config/dump # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:50:40-08:00 arjan@infradead.org # [NET]: Unexport call_netdevice_notifiers() # # Signed-off-by: Arjan van de Van # Signed-off-by: David S. Miller # # net/core/dev.c # 2004/11/01 16:50:20-08:00 arjan@infradead.org +0 -1 # [NET]: Unexport call_netdevice_notifiers() # # Signed-off-by: Arjan van de Van # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:48:47-08:00 herbert@gondor.apana.org.au # [TCP]: Modularize tcpdiag # # This is the first step in fixing the tcpdiag/modular ipv6 issue. # We modularise tcpdiag in the obvious way. # # Next we can move out the IPv6-specific stuff. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/tcp_ipv6.c # 2004/11/01 16:48:28-08:00 herbert@gondor.apana.org.au +2 -0 # [TCP]: Modularize tcpdiag # # This is the first step in fixing the tcpdiag/modular ipv6 issue. # We modularise tcpdiag in the obvious way. # # Next we can move out the IPv6-specific stuff. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_ipv4.c # 2004/11/01 16:48:28-08:00 herbert@gondor.apana.org.au +2 -0 # [TCP]: Modularize tcpdiag # # This is the first step in fixing the tcpdiag/modular ipv6 issue. # We modularise tcpdiag in the obvious way. # # Next we can move out the IPv6-specific stuff. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_diag.c # 2004/11/01 16:48:28-08:00 herbert@gondor.apana.org.au +12 -2 # [TCP]: Modularize tcpdiag # # This is the first step in fixing the tcpdiag/modular ipv6 issue. # We modularise tcpdiag in the obvious way. # # Next we can move out the IPv6-specific stuff. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp.c # 2004/11/01 16:48:28-08:00 herbert@gondor.apana.org.au +2 -2 # [TCP]: Modularize tcpdiag # # This is the first step in fixing the tcpdiag/modular ipv6 issue. # We modularise tcpdiag in the obvious way. # # Next we can move out the IPv6-specific stuff. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/Makefile # 2004/11/01 16:48:28-08:00 herbert@gondor.apana.org.au +2 -1 # [TCP]: Modularize tcpdiag # # This is the first step in fixing the tcpdiag/modular ipv6 issue. # We modularise tcpdiag in the obvious way. # # Next we can move out the IPv6-specific stuff. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/Kconfig # 2004/11/01 16:48:28-08:00 herbert@gondor.apana.org.au +9 -0 # [TCP]: Modularize tcpdiag # # This is the first step in fixing the tcpdiag/modular ipv6 issue. # We modularise tcpdiag in the obvious way. # # Next we can move out the IPv6-specific stuff. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:47:25-08:00 herbert@gondor.apana.org.au # [IPSEC]: Make ah4/esp4/ipcomp depend on INET # # As it is someone could disable INET and still enable ah4/esp4/ipcomp. # This patch adds the dependency on INET to prevent this. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/Kconfig # 2004/11/01 16:47:07-08:00 herbert@gondor.apana.org.au +4 -0 # [IPSEC]: Make ah4/esp4/ipcomp depend on INET # # As it is someone could disable INET and still enable ah4/esp4/ipcomp. # This patch adds the dependency on INET to prevent this. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:46:35-08:00 herbert@gondor.apana.org.au # [XFRM]: Move xfrm4_rcv export to its site # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_export.c # 2004/11/01 16:46:16-08:00 herbert@gondor.apana.org.au +0 -1 # [XFRM]: Move xfrm4_rcv export to its site # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_input.c # 2004/11/01 16:46:16-08:00 herbert@gondor.apana.org.au +3 -0 # [XFRM]: Move xfrm4_rcv export to its site # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:44:45-08:00 bunk@stusta.de # [SCTP]: Remove an unused function in outqueue.c # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # net/sctp/outqueue.c # 2004/11/01 16:44:26-08:00 bunk@stusta.de +0 -10 # [SCTP]: Remove an unused function in outqueue.c # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:43:22-08:00 hadi@cyberus.ca # [PKT_SCHED]: Add iptables action. # # Signed-off-by: jamal # Signed-off-by: David S. Miller # # net/sched/Kconfig # 2004/11/01 16:42:34-08:00 hadi@cyberus.ca +8 -1 # [PKT_SCHED]: Add iptables action. # # net/sched/Makefile # 2004/11/01 16:42:15-08:00 hadi@cyberus.ca +1 -0 # [PKT_SCHED]: Add iptables action. # # net/sched/ipt.c # 2004/11/01 16:42:12-08:00 hadi@cyberus.ca +392 -0 # [PKT_SCHED]: Add iptables action. # # include/net/tc_act/tc_ipt.h # 2004/11/01 16:42:12-08:00 hadi@cyberus.ca +16 -0 # [PKT_SCHED]: Add iptables action. # # net/sched/ipt.c # 2004/11/01 16:42:12-08:00 hadi@cyberus.ca +0 -0 # BitKeeper file /disk1/BK/net-2.6/net/sched/ipt.c # # include/net/tc_act/tc_ipt.h # 2004/11/01 16:42:12-08:00 hadi@cyberus.ca +0 -0 # BitKeeper file /disk1/BK/net-2.6/include/net/tc_act/tc_ipt.h # # include/linux/tc_act/tc_ipt.h # 2004/11/01 16:42:11-08:00 hadi@cyberus.ca +21 -0 # [PKT_SCHED]: Add iptables action. # # include/linux/tc_act/tc_ipt.h # 2004/11/01 16:42:11-08:00 hadi@cyberus.ca +0 -0 # BitKeeper file /disk1/BK/net-2.6/include/linux/tc_act/tc_ipt.h # # ChangeSet # 2004/11/01 16:40:25-08:00 hadi@znyx.com # [NETFILTER]: ipt mutex locks access # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_tables.c # 2004/11/01 16:39:53-08:00 hadi@znyx.com +14 -0 # [NETFILTER]: ipt mutex locks access # # include/linux/netfilter_ipv4/ip_tables.h # 2004/11/01 16:39:53-08:00 hadi@znyx.com +4 -0 # [NETFILTER]: ipt mutex locks access # # ChangeSet # 2004/11/01 16:39:14-08:00 stern@rowland.harvard.edu # [PATCH] UHCI: Use a sane timeout for device initialization # # This patch changes the device initialization code for the UHCI driver to # use a more meaningful timeout than simply waiting for 1000 loop # iterations. It also causes the code to fail when a timeout occurs rather # than proceed blindly. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-hcd.c # 2004/10/29 12:40:42-07:00 stern@rowland.harvard.edu +11 -6 # UHCI: Use a sane timeout for device initialization # # ChangeSet # 2004/11/01 16:26:55-08:00 bunk@stusta.de # [PATCH] USB ohci-dbg.c: remove an unused function # # The patch below removes an unused function from # drivers/usb/host/ohci-dbg.c # # # # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci-dbg.c # 2004/10/28 14:29:58-07:00 bunk@stusta.de +0 -7 # USB ohci-dbg.c: remove an unused function # # ChangeSet # 2004/11/01 16:26:32-08:00 bunk@stusta.de # [PATCH] USB stv680.c: remove an unused function # # The patch below removes an unused function from # drivers/usb/media/stv680.c # # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/stv680.c # 2004/10/28 14:32:24-07:00 bunk@stusta.de +0 -6 # USB stv680.c: remove an unused function # # ChangeSet # 2004/11/01 16:26:07-08:00 tgraf@suug.ch # [PKT_SCHED]: cls_fw: CONFIG_NET_CLS_IND is not dependant on CONFIG_NET_CLS_ACT # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:26:06-08:00 acme@conectiva.com.br # [PATCH] USB: add id for Siemens x65 series of mobiles to pl2303 driver # # [PL2303] add id for Siemens x65 series of mobiles # # Tested with CX65 and S65 models # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: Greg Kroah-Hartman # # net/sched/cls_fw.c # 2004/11/01 16:25:48-08:00 tgraf@suug.ch +14 -14 # [PKT_SCHED]: cls_fw: CONFIG_NET_CLS_IND is not dependant on CONFIG_NET_CLS_ACT # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # drivers/usb/serial/pl2303.h # 2004/10/29 13:24:01-07:00 acme@conectiva.com.br +3 -0 # USB: add id for Siemens x65 series of mobiles to pl2303 driver # # drivers/usb/serial/pl2303.c # 2004/10/29 13:24:01-07:00 acme@conectiva.com.br +1 -0 # USB: add id for Siemens x65 series of mobiles to pl2303 driver # # ChangeSet # 2004/11/01 16:24:32-08:00 tgraf@suug.ch # [PKT_SCHED]: cls_fw: Break is not enough to stop walking # # break is not enough to escape from the walking loops, since # multiple encapsulated loops are used to traverse the hash tables. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_rsvp.h # 2004/11/01 16:24:13-08:00 tgraf@suug.ch +1 -1 # [PKT_SCHED]: cls_fw: Break is not enough to stop walking # # break is not enough to escape from the walking loops, since # multiple encapsulated loops are used to traverse the hash tables. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_route.c # 2004/11/01 16:24:13-08:00 tgraf@suug.ch +1 -1 # [PKT_SCHED]: cls_fw: Break is not enough to stop walking # # break is not enough to escape from the walking loops, since # multiple encapsulated loops are used to traverse the hash tables. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_fw.c # 2004/11/01 16:24:13-08:00 tgraf@suug.ch +1 -1 # [PKT_SCHED]: cls_fw: Break is not enough to stop walking # # break is not enough to escape from the walking loops, since # multiple encapsulated loops are used to traverse the hash tables. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:23:43-08:00 tgraf@suug.ch # [PKT_SCHED]: cls_fw: Whitespace/ifdef fixes # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_fw.c # 2004/11/01 16:23:25-08:00 tgraf@suug.ch +30 -31 # [PKT_SCHED]: cls_fw: Whitespace/ifdef fixes # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:22:59-08:00 tgraf@suug.ch # [PKT_SCHED]: cls_fw: Use generic routines to dump action/policer # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_fw.c # 2004/11/01 16:22:40-08:00 tgraf@suug.ch +9 -39 # [PKT_SCHED]: cls_fw: Use generic routines to dump action/policer # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:21:47-08:00 tgraf@suug.ch # [PKT_SCHED]: cls_fw: Use generic routines to configure action/policer # # Adds a new function fw_change_attr using the new generic routines which # can be used to change attribute but also to initially set them to avoid # duplicated code. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_fw.c # 2004/11/01 16:21:28-08:00 tgraf@suug.ch +59 -131 # [PKT_SCHED]: cls_fw: Use generic routines to configure action/policer # # Adds a new function fw_change_attr using the new generic routines which # can be used to change attribute but also to initially set them to avoid # duplicated code. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:20:55-08:00 tgraf@suug.ch # [PKT_SCHED]: cls_fw: Cleanup fw_classify # # Cleans up fw_classify by using the generic routines and # adds a additional but unneeded continue to document that # an action may overrule the filter's match result. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_fw.c # 2004/11/01 16:20:36-08:00 tgraf@suug.ch +24 -32 # [PKT_SCHED]: cls_fw: Cleanup fw_classify # # Cleans up fw_classify by using the generic routines and # adds a additional but unneeded continue to document that # an action may overrule the filter's match result. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:20:09-08:00 tgraf@suug.ch # [PKT_SCHED]: Add generic classifier routines. # # Adds generic routines used by classifier to: # - bind/unbind to classes # - configure action/police/indev # - dump action/police # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_cls.h # 2004/11/01 16:19:51-08:00 tgraf@suug.ch +186 -0 # [PKT_SCHED]: Add generic classifier routines. # # Adds generic routines used by classifier to: # - bind/unbind to classes # - configure action/police/indev # - dump action/police # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:19:49-08:00 tglx@linutronix.de # [PATCH] Lock initializer unifying Batch 2 (USB) # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/catc.c # 2004/11/01 16:19:33-08:00 tglx@linutronix.de +2 -2 # [PATCH] Lock initializer unifying Batch 2 (USB) # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/input/powermate.c # 2004/11/01 16:19:33-08:00 tglx@linutronix.de +1 -1 # [PATCH] Lock initializer unifying Batch 2 (USB) # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/input/hid-core.c # 2004/11/01 16:19:33-08:00 tglx@linutronix.de +2 -2 # [PATCH] Lock initializer unifying Batch 2 (USB) # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # That's the second batch of the unifying patches. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/01 16:18:22-08:00 david-b@pacbell.net # [PATCH] USB: fix ohci_restart warning # # With 2.6.10 getting warning about ohci_restart() defined # and not used if !CONFIG_PM. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/11/01 16:18:10-08:00 bunk@stusta.de # [NETFILTER]: Remove an unused function in ipt_tcpmss.c # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # drivers/usb/host/ohci-hub.c # 2004/11/01 16:18:03-08:00 david-b@pacbell.net +1 -0 # [PATCH] USB: fix ohci_restart warning # # With 2.6.10 getting warning about ohci_restart() defined # and not used if !CONFIG_PM. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci-hcd.c # 2004/11/01 16:18:03-08:00 david-b@pacbell.net +0 -1 # [PATCH] USB: fix ohci_restart warning # # With 2.6.10 getting warning about ohci_restart() defined # and not used if !CONFIG_PM. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # net/ipv4/netfilter/ipt_tcpmss.c # 2004/11/01 16:17:50-08:00 bunk@stusta.de +0 -12 # [NETFILTER]: Remove an unused function in ipt_tcpmss.c # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:17:13-08:00 bunk@stusta.de # [AX25]: Remove an unused function in ax25_route.c # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # net/ax25/ax25_route.c # 2004/11/01 16:16:54-08:00 bunk@stusta.de +0 -16 # [AX25]: Remove an unused function in ax25_route.c # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:16:33-08:00 bunk@stusta.de # [IRDA]: Remove an unused function in net/irda/qos.c # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # net/irda/qos.c # 2004/11/01 16:16:14-08:00 bunk@stusta.de +0 -11 # [IRDA]: Remove an unused function in net/irda/qos.c # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:15:55-08:00 bunk@stusta.de # [APPLETALK]: Remove an unused function # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # net/appletalk/ddp.c # 2004/11/01 16:15:36-08:00 bunk@stusta.de +0 -7 # [APPLETALK]: Remove an unused function # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 16:06:33-08:00 stern@rowland.harvard.edu # [PATCH] USB: Dequeuing of root-hub URBs # # This patch fixes a tiny SMP-type hole in root-hub synchronization. # Although the HCD glue layer properly unlinks root-hub status URBs # synchronously, it doesn't do so for URBs sent to endpoint 0. This patch # copies some code from usb_kill_urb, to make such unlinks wait until the # host controller driver has finished handling the URB. This behavior is # required for hcd_endpoint_disable to work correctly. # # The patch also renames usb_rh_status_dequeue to usb_rh_urb_dequeue (to # better describe its updated function) and declares the routine static. # # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hcd.h # 2004/10/27 09:15:33-07:00 stern@rowland.harvard.edu +0 -1 # USB: Dequeuing of root-hub URBs # # drivers/usb/core/hcd.c # 2004/10/27 09:50:47-07:00 stern@rowland.harvard.edu +26 -10 # USB: Dequeuing of root-hub URBs # # ChangeSet # 2004/11/01 16:06:06-08:00 stern@rowland.harvard.edu # [PATCH] UHCI: Convert remainder to bitwise-and # # This patch, suggested by Karsten Wiese, converts a few remainder ('%') # operations in the UHCI driver to bitwise-and ('&'). It's not a huge # change, but this is a common idiom in C and it will save a few bytes with # some compilers. Also one of the changes is in an inner loop, so it might # help a little bit. # # # # From: Karsten Wiese # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-hcd.c # 2004/10/27 07:16:17-07:00 stern@rowland.harvard.edu +9 -10 # UHCI: Convert remainder to bitwise-and # # ChangeSet # 2004/11/01 16:05:41-08:00 david-b@pacbell.net # [PATCH] usbcore, diagnostic tweaks # # Minor updates for better diagnostics from usbcore: # # - Only print ep0 maxpacket when it's not what we first tried # # - have khubd say when it's looking at a hub # # - When warning about synchronous control or bulk timeouts, # report the program that triggered the message. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/message.c # 2004/10/26 09:58:17-07:00 david-b@pacbell.net +2 -1 # usbcore, diagnostic tweaks # # drivers/usb/core/hub.c # 2004/10/26 09:58:17-07:00 david-b@pacbell.net +9 -1 # usbcore, diagnostic tweaks # # ChangeSet # 2004/11/01 16:05:15-08:00 david-b@pacbell.net # [PATCH] OHCI suspend/resume updates (minor) # # This marks the controller as running at the end of a "resume" path used # when the controller lost power, or was otherwise reset (not a real resume). # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci-hcd.c # 2004/10/26 09:58:17-07:00 david-b@pacbell.net +1 -0 # OHCI suspend/resume updates (minor) # # ChangeSet # 2004/11/01 16:04:49-08:00 david-b@pacbell.net # [PATCH] EHCI suspend/resume updates # # This patch much improves suspend/resume behavior of EHCI, as tested with # "echo suspend > /sys/power/state" and "echo disk > /sys/power/state". # # - Quiescing the controller has to handle a case where the software has # finished shutting down periodic and async schedules, but the hardware # hasn't yet finished its part. # # - When suspending the root hub, be more by-the-book so that resumes # behave better. # # - When resuming after suspend-to-disk, or in general when no port is # suspended, the driver re-uses the initialization logic. That logic # needed to understand that resources don't need re-allocation, and # that a few things need to be reset to the default state. # # - More code paths needed to notice a suspended controller, and stop # right away. # # - To shut down the controller, start with the root hub ports and # work up from there. # # Tested by writing "suspend" or "disk" to /sys/power/state; several # systems resumed OK, at least given the associated usbcore patches. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ehci-sched.c # 2004/10/26 09:58:17-07:00 david-b@pacbell.net +5 -2 # EHCI suspend/resume updates # # drivers/usb/host/ehci-q.c # 2004/10/26 09:58:17-07:00 david-b@pacbell.net +3 -0 # EHCI suspend/resume updates # # drivers/usb/host/ehci-hub.c # 2004/10/26 09:58:18-07:00 david-b@pacbell.net +29 -19 # EHCI suspend/resume updates # # drivers/usb/host/ehci-hcd.c # 2004/10/26 09:58:17-07:00 david-b@pacbell.net +97 -48 # EHCI suspend/resume updates # # ChangeSet # 2004/11/01 15:45:23-08:00 david-b@pacbell.net # [PATCH] PCI: make pci_save_state() only happen when no suspend() # # Recent PCI changes are killing USB Power Management, and maybe more. # # The root cause is a change to the PCI suspend code from back in May, # saving a copy of pci config space after the PCI driver did. That # was OK until a recent change made it overwrite the copy that the # PCI device driver would later restore ... net result for USB is # that DMA would always be disabled after resume. # # This patch restores the long-documented behavior of PCI driver # suspend/resume calls (drivers are responsible for saving and # restoring config space state), and also removes a superfluous line # from the USB suspend logic. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hcd-pci.c # 2004/10/30 10:15:47-07:00 david-b@pacbell.net +0 -1 # PCI: make pci_save_state() only happen when no suspend() # # drivers/pci/pci-driver.c # 2004/10/30 10:15:46-07:00 david-b@pacbell.net +2 -2 # PCI: make pci_save_state() only happen when no suspend() # # ChangeSet # 2004/11/01 15:44:59-08:00 david-b@pacbell.net # [PATCH] usbcore and system sleep states # # This patch makes usbcore behave better with system sleep states, fixing # some PM/PCI integration problems as well as some PM/USB ones. # # - PCI HCDs should behave better, even if they don't support PCI PM; # tested with both ACPI and APM suspend cycles, and swsusp. # # - Systems that advertise ACPI S1 support don't necessarily support the # PCI D1 or D2 states for their USB controllers. (Examples include # Centrino laptops.) This patch makes them suspend into D3hot, which # always works (and won't take much longer to resume, either). # # - Handle the "go into deeper suspend" transition the way PCI drivers # are supposed to. # # - Understand that USB only has one suspend state: if the device is # suspended, it can't do any better. # # - Export some symbols to HCDs, so they can reuse more of the existing # usbcore framework. # # Plus minor related cleanups. # # The PCI D1/D2 state issue is a variant of an earlier problem, with the # same root cause: the PM core thinking there's a one-to-one mapping # between system states (roughly: ACPI S0/S1/S3/S4) and PCI states that # a given device can support (only D0 is required, D3hot is common). # That same issue comes up again with USB. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/usb.c # 2004/10/26 09:58:17-07:00 david-b@pacbell.net +7 -1 # usbcore and system sleep states # # drivers/usb/core/hub.c # 2004/10/26 09:58:17-07:00 david-b@pacbell.net +15 -11 # usbcore and system sleep states # # drivers/usb/core/hcd.c # 2004/10/26 09:58:17-07:00 david-b@pacbell.net +1 -5 # usbcore and system sleep states # # drivers/usb/core/hcd-pci.c # 2004/10/26 09:58:17-07:00 david-b@pacbell.net +71 -14 # usbcore and system sleep states # # ChangeSet # 2004/11/01 15:44:31-08:00 arjan@fenrus.demon.nl # [PATCH] USB: remove dead code in usb video # # Hi, # # Patch below removes somem dead, never used code from the usbvideo driver, # including a function that uses interruptible_sleep_on_timeout() oddly. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/usbvideo.c # 2004/10/23 03:51:53-07:00 arjan@fenrus.demon.nl +3 -76 # USB: remove dead code in usb video # # ChangeSet # 2004/11/01 15:44:09-08:00 stern@rowland.harvard.edu # [PATCH] UHCI: Workaround for broken remote wakeup # # This patch adds a workaround for host controllers that don't properly # support remote wakeup. That includes Intel controllers (on certain badly # designed motherboards) and a recent Genesys Logic controller. Although # the UHCI driver avoids suspending the Intel-based controllers, this # workaround will handle things about as well. # # In the not-too-distant future I will have to revamp most of the root-hub # suspend/resume code in the UHCI driver. For now, please apply the patch. # # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-hub.c # 2004/10/25 14:01:10-07:00 stern@rowland.harvard.edu +2 -0 # UHCI: Workaround for broken remote wakeup # # ChangeSet # 2004/11/01 15:24:33-08:00 lmendez19@austin.rr.com # [PATCH] hid-core: add two devices to device blacklist # # This patch adds the Delorme Earthmate usb gps and the Cypress hid->com # rs232 adapter to hid-core's device blacklist. # # Signed-off-by: Lonnie Mendez # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/input/hid-core.c # 2004/10/20 20:02:50-07:00 lmendez19@austin.rr.com +7 -0 # hid-core: add two devices to device blacklist # # ChangeSet # 2004/11/01 15:24:11-08:00 nacc@us.ibm.com # [PATCH] pci/quirks: replace schedule_timeout() with msleep() # # Description: Use msleep() instead of schedule_timeout() to guarantee the # task delays as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/quirks.c # 2004/10/22 15:17:43-07:00 nacc@us.ibm.com +2 -4 # pci/quirks: replace schedule_timeout() with msleep() # # BitKeeper/deleted/.del-uart.c~50ca73b953269 # 2004/11/01 16:00:46-07:00 trini@kernel.crashing.org +120 -174 # Delete: arch/ppc/8xx_io/uart.c # # ChangeSet # 2004/11/01 14:30:03-08:00 clameter@sgi.com # [PATCH] fix IBM cyclone clock and some cleanup # # - fix broken IBM cyclone time interpolator support # - add support for cyclic timers through an addition of a mask # in the timer interpolator structure # - Allow time_interpolator_update() and time_interpolator_get_offset() # to be invoked without an active time interpolator # (necessary since the cyclone clock is initialized late in ACPI # processing) # - remove obsolete function time_interpolator_resolution() # - add a mask to all struct time_interpolator setups in the # kernel # - Make time interpolators work on 32bit platforms # # Signed-off-by: Christoph Lameter # Signed-off-by: Linus Torvalds # # kernel/timer.c # 2004/11/01 09:47:29-08:00 clameter@sgi.com +29 -17 # fix IBM cyclone clock and some cleanup # # include/linux/timex.h # 2004/11/01 09:47:29-08:00 clameter@sgi.com +9 -12 # fix IBM cyclone clock and some cleanup # # drivers/char/hpet.c # 2004/11/01 09:47:29-08:00 clameter@sgi.com +2 -1 # fix IBM cyclone clock and some cleanup # # arch/sparc64/kernel/time.c # 2004/11/01 09:47:29-08:00 clameter@sgi.com +1 -0 # fix IBM cyclone clock and some cleanup # # arch/ia64/sn/kernel/sn2/timer.c # 2004/11/01 09:47:29-08:00 clameter@sgi.com +7 -5 # fix IBM cyclone clock and some cleanup # # arch/ia64/kernel/time.c # 2004/11/01 09:47:29-08:00 clameter@sgi.com +5 -4 # fix IBM cyclone clock and some cleanup # # arch/ia64/kernel/fsys.S # 2004/11/01 09:47:29-08:00 clameter@sgi.com +5 -3 # fix IBM cyclone clock and some cleanup # # arch/ia64/kernel/cyclone.c # 2004/11/01 09:47:29-08:00 clameter@sgi.com +3 -2 # fix IBM cyclone clock and some cleanup # # arch/ia64/kernel/asm-offsets.c # 2004/11/01 09:47:29-08:00 clameter@sgi.com +1 -0 # fix IBM cyclone clock and some cleanup # # Documentation/time_interpolators.txt # 2004/11/01 09:47:29-08:00 clameter@sgi.com +12 -11 # fix IBM cyclone clock and some cleanup # # ChangeSet # 2004/11/01 22:16:08+00:00 aia21@cantab.net # NTFS: Make several functions and variables static. (Adrian Bunk) # # Signed-off-by: Adrian Bunk # Signed-off-by: Anton Altaparmakov # # fs/ntfs/super.c # 2004/11/01 22:14:09+00:00 aia21@cantab.net +5 -5 # Make several functions and variables static. (Adrian Bunk) # # fs/ntfs/ntfs.h # 2004/11/01 22:14:02+00:00 aia21@cantab.net +0 -3 # Make several functions and variables static. (Adrian Bunk) # # fs/ntfs/inode.c # 2004/11/01 22:13:55+00:00 aia21@cantab.net +2 -2 # Make several functions and variables static. (Adrian Bunk) # # fs/ntfs/aops.c # 2004/11/01 22:13:47+00:00 aia21@cantab.net +1 -3 # Make several functions and variables static. (Adrian Bunk) # # fs/ntfs/ChangeLog # 2004/11/01 22:13:32+00:00 aia21@cantab.net +5 -0 # Update # # ChangeSet # 2004/11/01 13:06:49-08:00 kay.sievers@vrfy.org # [PATCH] take me home, hotplug_path[] # # Move hotplug_path[] out of kmod.[ch] to kobject_uevent.[ch] where # it belongs now. At some time in the future we should fix the remaining bad # hotplug calls (no SEQNUM, no netlink uevent): # # ./drivers/input/input.c (no DEVPATH on some hotplug events!) # ./drivers/pnp/pnpbios/core.c # ./drivers/s390/crypto/z90main.c # # Signed-off-by: Kay Sievers # Signed-off-by: Greg Kroah-Hartman # # lib/kobject_uevent.c # 2004/11/01 12:46:04-08:00 kay.sievers@vrfy.org +1 -0 # take me home, hotplug_path[] # # kernel/sysctl.c # 2004/11/01 12:46:04-08:00 kay.sievers@vrfy.org +1 -1 # take me home, hotplug_path[] # # kernel/kmod.c # 2004/11/01 12:46:04-08:00 kay.sievers@vrfy.org +0 -23 # take me home, hotplug_path[] # # kernel/cpu.c # 2004/11/01 12:46:04-08:00 kay.sievers@vrfy.org +0 -1 # take me home, hotplug_path[] # # include/linux/kobject_uevent.h # 2004/11/01 12:46:04-08:00 kay.sievers@vrfy.org +5 -0 # take me home, hotplug_path[] # # include/linux/kmod.h # 2004/11/01 12:46:04-08:00 kay.sievers@vrfy.org +0 -4 # take me home, hotplug_path[] # # drivers/s390/crypto/z90main.c # 2004/11/01 12:46:04-08:00 kay.sievers@vrfy.org +1 -0 # take me home, hotplug_path[] # # drivers/pnp/pnpbios/core.c # 2004/11/01 12:46:04-08:00 kay.sievers@vrfy.org +1 -1 # take me home, hotplug_path[] # # drivers/input/input.c # 2004/11/01 12:46:04-08:00 kay.sievers@vrfy.org +1 -1 # take me home, hotplug_path[] # # ChangeSet # 2004/11/01 13:06:31-08:00 dtor_core@ameritech.net # [PATCH] Driver core: add driver symlink to device # # Driver core: when binding device to a driver create "driver" # symlink in device's directory. Rename serio's # "driver" attribute to "drvctl" (write-only) # # Signed-off-by: Dmitry Torokhov # Signed-off-by: Greg Kroah-Hartman # # drivers/input/serio/serio.c # 2004/11/01 12:46:09-08:00 dtor_core@ameritech.net +1 -6 # Driver core: add driver symlink to device # # drivers/base/bus.c # 2004/11/01 12:46:09-08:00 dtor_core@ameritech.net +2 -0 # Driver core: add driver symlink to device # # ChangeSet # 2004/11/01 13:06:02-08:00 kay.sievers@vrfy.org # [PATCH] kobject: fix hotplug bug with seqnum # # On Sat, Oct 30, 2004 at 04:54:29AM +0200, Kay Sievers wrote: # > On Sat, Oct 30, 2004 at 02:25:23AM +0200, Kay Sievers wrote: # > > On Sat, Oct 30, 2004 at 02:00:45AM +0200, Kay Sievers wrote: # > > > On Fri, Oct 29, 2004 at 06:13:19PM -0500, Greg KH wrote: # > > > > On Fri, Oct 29, 2004 at 11:28:56PM +0200, Kay Sievers wrote: # > > > > > > But there might still be a problem. With this change, the sequence # > > > > > > number is not sent out the kevent message. Kay, do you think this is an # > > > > > > issue? I don't think we can get netlink messages out of order, right? # > > > > > # > > > > > Right, especially not the events with the same DEVPATH, like "remove" # > > > > > beating an "add". But I'm not sure if the number isn't useful. Whatever # > > > > > we may do with the hotplug over netlink in the future, we will only have # > > > > > /sbin/hotplug for the early boot and it may be nice to know, what events # > > > > > we have already handled... # > > > > > # > > > > > > I'll hold off on applying this patch until we figure this out... # > > > > > # > > > > > How about just reserving 20 bytes for the number (u64 will never be # > > > > > more than that), save the pointer to that field, and fill the number in # > > > > > later? # > > > > # > > > > Ah, something like this instead? I like it, it's even smaller than the # > > > > previous patch. Compile tested only... # > > > # > > > I like that. How about the following. It will keep the buffer clean from # > > > random chars, cause the kevent does not have the vector and relies on # > > > the '\0' to separate the strings from each other. # > > > I've tested it. The netlink-hotplug message looks like this: # > > > # > > > recv(3, "remove@/class/input/mouse2\0ACTION=remove\0DEVPATH=/class/input/mouse2\0SUBSYSTEM=input\0SEQNUM=961 \0", 1024, 0) = 113 # > > # > > Hmm, these trailing spaces are just bad, sorry. I'll better pass the # > > envp array over to send_uevent() and clean up the keys while copying # > > the env values into the skb buffer. This will make the event payload # > > more safe too. So your first version looks better. # > # > How about this? We copy over key by key into the skb buffer and the # > netlink message can get the envp array without depending on a single # > continuous buffer. # > # > The netlink message looks nice like this now: # > # > recv(3, " # > add@/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0\0 # > HOME=/\0 # > PATH=/sbin:/bin:/usr/sbin:/usr/bin\0 # > ACTION=add\0 # > DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0\0 # > SUBSYSTEM=usb\0 # > SEQNUM=991\0 # > DEVICE=/proc/bus/usb/003/008\0 # > PRODUCT=46d/c03e/2000\0 # > TYPE=0/0/0\0 # > INTERFACE=3/1/2\0 # > ", 1024, 0) = 268 # # Here is an improved version that uses skb_put() to fill the skb buffer, # instead of trimming the buffer to the final size after we've copied over # all keys. # # # Signed-off-by: Kay Sievers # Signed-off-by: Greg Kroah-Hartman # # lib/kobject_uevent.c # 2004/11/01 12:46:14-08:00 kay.sievers@vrfy.org +30 -17 # kobject: fix hotplug bug with seqnum # # ChangeSet # 2004/11/01 13:05:43-08:00 dtor_core@ameritech.net # [PATCH] Driver core: add driver_probe_device # # Driver core: rename bus_match into driver_probe_device and export # it so subsystems can bind an individual device to a # specific driver without getting involved with driver # core internals. # # Signed-off-by: Dmitry Torokhov # Signed-off-by: Greg Kroah-Hartman # # include/linux/device.h # 2004/11/01 12:46:20-08:00 dtor_core@ameritech.net +2 -1 # Driver core: add driver_probe_device # # drivers/base/bus.c # 2004/11/01 12:46:20-08:00 dtor_core@ameritech.net +29 -26 # Driver core: add driver_probe_device # # ChangeSet # 2004/11/01 13:05:24-08:00 dtor_core@ameritech.net # [PATCH] Driver core: export device_attach # # Driver core: make device_attach() global and export it and # driver_attach() so subsystems can have finer # control over binding process. # # Signed-off-by: Dmitry Torokhov # Signed-off-by: Greg Kroah-Hartman # # include/linux/device.h # 2004/11/01 12:46:25-08:00 dtor_core@ameritech.net +1 -0 # Driver core: export device_attach # # drivers/base/bus.c # 2004/11/01 12:46:25-08:00 dtor_core@ameritech.net +3 -1 # Driver core: export device_attach # # ChangeSet # 2004/11/01 13:05:06-08:00 akpm@osdl.org # [PATCH] Fix deadlocks on dpm_sem # # From: Paul Mackerras # # Currently the device_pm_foo() functions are rather prone to deadlocks # during suspend/resume. This is because the dpm_sem is held for the # duration of device_suspend() and device_resume() as well as device_pm_add() # and device_pm_remove(). If for any reason you get a device addition or # removal triggered by a device's suspend or resume code, you get a deadlock. # (The classic example is a USB host adaptor resuming and discovering that # the mouse you used to have plugged in has gone away.) # # This patch fixes the problem by using a separate semaphore, called # dpm_list_sem, to cover the places where we need the device pm lists to be # stable, and by being careful about how we traverse the lists on suspend and # resume. I have analysed the various cases that can occur and I am # confident that I have handled them all correctly. I posted this patch # together with a detailed analysis 10 days ago. # # Signed-off-by Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # drivers/base/power/suspend.c # 2004/11/01 12:46:30-08:00 akpm@osdl.org +25 -19 # Fix deadlocks on dpm_sem # # drivers/base/power/resume.c # 2004/11/01 12:46:30-08:00 akpm@osdl.org +13 -3 # Fix deadlocks on dpm_sem # # drivers/base/power/power.h # 2004/11/01 12:46:30-08:00 akpm@osdl.org +5 -0 # Fix deadlocks on dpm_sem # # drivers/base/power/main.c # 2004/11/01 12:46:30-08:00 akpm@osdl.org +6 -5 # Fix deadlocks on dpm_sem # # ChangeSet # 2004/11/01 13:04:46-08:00 akpm@osdl.org # [PATCH] Possible race in sysfs_read_file() and sysfs_write_file() # # From: Simon Derr # # Add a `needs_read_fill' field in sysfs_buffer so that reading after a write in # a sysfs file returns valid data. # # (instead of the data that have been written, that may be invalid or at the # wrong offset) # # Signed-off-by: Simon Derr # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # fs/sysfs/file.c # 2004/11/01 12:46:35-08:00 akpm@osdl.org +5 -1 # Possible race in sysfs_read_file() and sysfs_write_file() # # ChangeSet # 2004/11/01 13:04:30-08:00 akpm@osdl.org # [PATCH] Fix race in sysfs_read_file() and sysfs_write_file() # # From: Simon Derr # # - fixes the race between threads by adding a semaphore in sysfs_buffer # # - allocates the buffer upon call to pread(). We still call again # fill_read_buffer() if the file is "rewinded" to offset zero. # # - fixes the comparison in flush_read_buffer(). # # Signed-off-by: Simon Derr # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # fs/sysfs/file.c # 2004/11/01 12:46:41-08:00 akpm@osdl.org +15 -3 # Fix race in sysfs_read_file() and sysfs_write_file() # # ChangeSet # 2004/11/01 13:04:09-08:00 akpm@osdl.org # [PATCH] sysfs backing store: stop pinning dentries/inodes for leaf entries # # From: Maneesh Soni # # o This patch stops the pinning of non-directory or leaf dentries and inodes. # The leaf dentries and inodes are created during lookup based on the # entries on sysfs_dirent tree. These leaves are removed from the dcache # through the VFS dentry ageing process during shrink dcache operations. Thus # reducing about 80% of sysfs lowmem needs. # # o This implments the ->lookup() for sysfs directory inodes and allocates # dentry and inode if the lookup is successful and avoids the need of # allocating and pinning of dentry and inodes during the creation of # corresponding sysfs leaf entry. As of now the implementation has not # required negative dentry creation on failed lookup. As sysfs is still a # RAM based filesystem, negative dentries are not of any use IMO. # # o The leaf dentry allocated after successful lookup is connected to the # existing corresponding sysfs_dirent through the d_fsdata field. # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # fs/sysfs/sysfs.h # 2004/11/01 12:46:46-08:00 akpm@osdl.org +4 -0 # sysfs backing store: stop pinning dentries/inodes for leaf entries # # fs/sysfs/symlink.c # 2004/11/01 12:46:46-08:00 akpm@osdl.org +5 -21 # sysfs backing store: stop pinning dentries/inodes for leaf entries # # fs/sysfs/mount.c # 2004/11/01 12:46:46-08:00 akpm@osdl.org +1 -1 # sysfs backing store: stop pinning dentries/inodes for leaf entries # # fs/sysfs/file.c # 2004/11/01 12:46:46-08:00 akpm@osdl.org +3 -22 # sysfs backing store: stop pinning dentries/inodes for leaf entries # # fs/sysfs/dir.c # 2004/11/01 12:46:46-08:00 akpm@osdl.org +100 -6 # sysfs backing store: stop pinning dentries/inodes for leaf entries # # fs/sysfs/bin.c # 2004/11/01 12:46:46-08:00 akpm@osdl.org +2 -26 # sysfs backing store: stop pinning dentries/inodes for leaf entries # # ChangeSet # 2004/11/01 13:03:53-08:00 akpm@osdl.org # [PATCH] sysfs backing store: use sysfs_dirent based tree in dir file operations # # From: Maneesh Soni # # o This patch implements the sysfs_dir_operations file_operations strucutre for # sysfs directories. It uses the sysfs_dirent based tree for ->readdir() and # ->lseek() methods instead of simple_dir_operations which use dentry based # tree. # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # fs/sysfs/sysfs.h # 2004/11/01 12:46:51-08:00 akpm@osdl.org +2 -0 # sysfs backing store: use sysfs_dirent based tree in dir file operations # # fs/sysfs/mount.c # 2004/11/01 12:46:51-08:00 akpm@osdl.org +1 -1 # sysfs backing store: use sysfs_dirent based tree in dir file operations # # fs/sysfs/dir.c # 2004/11/01 12:46:51-08:00 akpm@osdl.org +140 -1 # sysfs backing store: use sysfs_dirent based tree in dir file operations # # ChangeSet # 2004/11/01 13:03:33-08:00 akpm@osdl.org # [PATCH] sysfs backing store: use sysfs_dirent based tree in file removal # # From: Maneesh Soni # # o This patch uses the sysfs_dirent based tree while removing sysfs files # and directories. This avoids holding dcache_lock by not using dentry # based vfs tree. Thus simplyfying the removal logic in sysfs. # # o It uses two helper routines sysfs_get_name(), to get the name for # sysfs element and sysfs_drop_dentry() to delete the dentry given a # sysfs_dirent. # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # fs/sysfs/sysfs.h # 2004/11/01 12:46:56-08:00 akpm@osdl.org +18 -0 # sysfs backing store: use sysfs_dirent based tree in file removal # # fs/sysfs/inode.c # 2004/11/01 12:46:56-08:00 akpm@osdl.org +66 -26 # sysfs backing store: use sysfs_dirent based tree in file removal # # fs/sysfs/dir.c # 2004/11/01 12:46:56-08:00 akpm@osdl.org +11 -37 # sysfs backing store: use sysfs_dirent based tree in file removal # # ChangeSet # 2004/11/01 13:03:13-08:00 akpm@osdl.org # [PATCH] sysfs backing store - add sysfs_direct structure # # From: Maneesh Soni # # o This patch introduces the new sysfs_dirent data structure. The sysfs_dirent # is added to the dentry corresponding to each of the element which can be # represented in sysfs like, kobject (directory), text or binary attributes # (files), attribute groups (directory) and symlinks. # # o It uses dentry's d_fsdata field to attach the corresponding sysfs_dirent. # # o The sysfs_dirents are maintained in a tree of all the sysfs entries using the # s_children and s_sibling list pointers. # # o This patch also changes how we access attributes and kobjects in # file_operations from a given dentry, basically introducing one more level of # indirection. # # o The sysfs_dirents are freed and the sysfs_dirent tree is updated accordingly # upon the deletion of corresponding dentry. The sysfs dirents are kept alive # as long as there is corresponding dentry around. The are freed when the # dentry is finally out of dcache using the ->d_iput() method. # # o This also fixes the dentry leaks in case of error paths after sysfs has # got a newly alocated (and hashed) dentry from sysfs_get_dentry() by # d_drop()'ing the dentry. # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # include/linux/sysfs.h # 2004/11/01 12:47:02-08:00 akpm@osdl.org +19 -0 # sysfs backing store - add sysfs_direct structure # # fs/sysfs/sysfs.h # 2004/11/01 12:47:02-08:00 akpm@osdl.org +33 -6 # sysfs backing store - add sysfs_direct structure # # fs/sysfs/symlink.c # 2004/11/01 12:47:02-08:00 akpm@osdl.org +35 -4 # sysfs backing store - add sysfs_direct structure # # fs/sysfs/mount.c # 2004/11/01 12:47:02-08:00 akpm@osdl.org +8 -0 # sysfs backing store - add sysfs_direct structure # # fs/sysfs/inode.c # 2004/11/01 12:47:02-08:00 akpm@osdl.org +8 -2 # sysfs backing store - add sysfs_direct structure # # fs/sysfs/group.c # 2004/11/01 12:47:02-08:00 akpm@osdl.org +3 -1 # sysfs backing store - add sysfs_direct structure # # fs/sysfs/file.c # 2004/11/01 12:47:02-08:00 akpm@osdl.org +15 -10 # sysfs backing store - add sysfs_direct structure # # fs/sysfs/dir.c # 2004/11/01 12:47:02-08:00 akpm@osdl.org +75 -9 # sysfs backing store - add sysfs_direct structure # # fs/sysfs/bin.c # 2004/11/01 12:47:02-08:00 akpm@osdl.org +8 -6 # sysfs backing store - add sysfs_direct structure # # ChangeSet # 2004/11/01 13:02:55-08:00 akpm@osdl.org # [PATCH] fix oops with firmware loading # # From: Maneesh Soni # # My fault, a bad typo in fs/sysfs/bin.c. # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # fs/sysfs/bin.c # 2004/11/01 12:47:07-08:00 akpm@osdl.org +2 -2 # fix oops with firmware loading # # ChangeSet # 2004/11/01 13:02:34-08:00 akpm@osdl.org # [PATCH] sysfs backing store - prepare sysfs_file_operations helpers # # From: Maneesh Soni # # o The following patch provides dumb helpers to access the corresponding # kobject, attribute or binary attribute given a dentry and prepare the # sysfs_file_operation methods for using sysfs_dirents. # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # fs/sysfs/sysfs.h # 2004/11/01 12:47:12-08:00 akpm@osdl.org +17 -1 # sysfs backing store - prepare sysfs_file_operations helpers # # fs/sysfs/file.c # 2004/11/01 12:47:12-08:00 akpm@osdl.org +12 -12 # sysfs backing store - prepare sysfs_file_operations helpers # # fs/sysfs/bin.c # 2004/11/01 12:47:12-08:00 akpm@osdl.org +7 -7 # sysfs backing store - prepare sysfs_file_operations helpers # # ChangeSet # 2004/11/01 10:45:41-08:00 matthew@wil.cx # [PATCH] parisc: Light-weight syscall support # # Add light-weight-syscall support to parisc. The first LWS is atomic CAS. # # Committed-by: Carlos O'Donell # # arch/parisc/kernel/syscall.S # 2004/10/31 22:09:36-08:00 matthew@wil.cx +340 -19 # parisc: Light-weight syscall support # # ChangeSet # 2004/11/01 10:45:29-08:00 matthew@wil.cx # [PATCH] parisc: Add user_space macro # # Add user_space macro, to determine if we are in a user # versus kernel space. # # Committed-by: Carlos O'Donell # # include/asm-parisc/ptrace.h # 2004/10/31 22:10:11-08:00 matthew@wil.cx +2 -1 # parisc: Add user_space macro # # ChangeSet # 2004/11/01 10:45:16-08:00 matthew@wil.cx # [PATCH] parisc: Initialise restart_block # # Calling sys_restart_syscall without having taking a signal # across a syscall leaves the restart_block uninitialized, # allowing malicious user code to crash the kernel. # # FIX: # # Define INIT_THREAD_INFO such that restart_block.fn is set to # the default do_not_restart_syscall. # # Committed-by: Carlos O'Donell # # include/asm-parisc/thread_info.h # 2004/10/31 22:10:11-08:00 matthew@wil.cx +9 -6 # parisc: Initialise restart_block # # ChangeSet # 2004/11/01 10:45:04-08:00 matthew@wil.cx # [PATCH] parisc: update a500_defconfig # # Enable SMP on A500 by default # # Committed-by: Paul Bame # # arch/parisc/configs/a500_defconfig # 2004/10/31 22:09:33-08:00 matthew@wil.cx +32 -6 # parisc: update a500_defconfig # # ChangeSet # 2004/11/01 10:44:51-08:00 matthew@wil.cx # [PATCH] parisc: Fix N-class SMP # # Fix N class SMP # # The main fixes are: # # - memory barriers to our space and control register moves # - fix for the N class merced bus problem which can't have more than # one PxTLB broadcast outstanding at once # - make smp_call_function() wait until the function completes # # This now boots and runs on a 32MB N4000 in Fort Collins with 2 cpus # and discontig mem support. # # Committed-by: James Bottomley # Committed-by: Randolph Chung # # include/asm-parisc/tlbflush.h # 2004/10/31 22:10:11-08:00 matthew@wil.cx +8 -0 # parisc: Fix N-class SMP # # include/asm-parisc/system.h # 2004/10/31 22:10:11-08:00 matthew@wil.cx +18 -0 # parisc: Fix N-class SMP # # arch/parisc/kernel/smp.c # 2004/10/31 22:09:36-08:00 matthew@wil.cx +7 -5 # parisc: Fix N-class SMP # # arch/parisc/kernel/pci-dma.c # 2004/10/31 22:09:35-08:00 matthew@wil.cx +4 -0 # parisc: Fix N-class SMP # # arch/parisc/kernel/pacache.S # 2004/10/31 22:09:35-08:00 matthew@wil.cx +2 -2 # parisc: Fix N-class SMP # # arch/parisc/kernel/cache.c # 2004/10/31 22:09:34-08:00 matthew@wil.cx +21 -0 # parisc: Fix N-class SMP # # ChangeSet # 2004/11/01 10:44:39-08:00 matthew@wil.cx # [PATCH] parisc: make install # # Add a make install target # # Committed-by: Matthew Wilcox # # arch/parisc/install.sh # 2004/10/31 22:02:13-08:00 matthew@wil.cx +38 -0 # parisc: make install # # arch/parisc/Makefile # 2004/10/31 22:09:33-08:00 matthew@wil.cx +10 -0 # parisc: make install # # arch/parisc/install.sh # 2004/10/31 22:02:13-08:00 matthew@wil.cx +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/parisc/install.sh # # ChangeSet # 2004/11/01 10:44:26-08:00 matthew@wil.cx # [PATCH] parisc: Kconfig debugging options # # PA-RISC does have spinlock debugging and doesn't have the frame pointer # option. USERMODE had been added twice to spinlock debugging, so remove that. # # Committed-by: Randolph Chung # Committed-by: Matthew Wilcox # # lib/Kconfig.debug # 2004/10/31 22:31:46-08:00 matthew@wil.cx +2 -2 # parisc: Kconfig debugging options # # ChangeSet # 2004/11/01 10:44:13-08:00 matthew@wil.cx # [PATCH] parisc: Fix 64-bit linking # # add some more BL macros and b,l in appropriate places in entry.S to # expand the range of our jumps and work around the 64 bit binutils problem # where it will allow the jump ranges to go beyond their permitted limits # without complaining. # # Committed-by: James Bottomley # # arch/parisc/kernel/entry.S # 2004/10/31 22:09:34-08:00 matthew@wil.cx +14 -14 # parisc: Fix 64-bit linking # # ChangeSet # 2004/11/01 10:44:01-08:00 matthew@wil.cx # [PATCH] parisc: add HP copyright to perf counters # # add HP copyright # # Committed-by: Grant Grundler # # arch/parisc/kernel/perf_images.h # 2004/10/31 22:09:35-08:00 matthew@wil.cx +1 -0 # parisc: add HP copyright to perf counters # # ChangeSet # 2004/11/01 10:43:48-08:00 matthew@wil.cx # [PATCH] parisc: small debug cleanup in power.c # # small debug cleanup # # Committed-by: Randolph Chung # # drivers/parisc/power.c # 2004/10/31 22:09:54-08:00 matthew@wil.cx +4 -4 # parisc: small debug cleanup in power.c # # ChangeSet # 2004/11/01 10:43:36-08:00 matthew@wil.cx # [PATCH] parisc: Merge head64.S and head.S # # Merge head64.S and head.S # Cleanup 64-bit sp manipulations # # Committed-by: Kyle McMartin # Committed-by: Randolph Chung # # include/asm-parisc/assembly.h # 2004/10/31 22:10:10-08:00 matthew@wil.cx +7 -0 # parisc: Merge head64.S and head.S # # arch/parisc/kernel/head.S # 2004/10/31 22:09:34-08:00 matthew@wil.cx +153 -67 # parisc: Merge head64.S and head.S # # arch/parisc/kernel/Makefile # 2004/10/31 22:09:33-08:00 matthew@wil.cx +1 -3 # parisc: Merge head64.S and head.S # # arch/parisc/Makefile # 2004/10/31 22:09:33-08:00 matthew@wil.cx +0 -1 # parisc: Merge head64.S and head.S # # BitKeeper/deleted/.del-head64.S~718b3ffb63fddd86 # 2004/11/01 10:43:29-08:00 matthew@wil.cx +0 -0 # Delete: arch/parisc/kernel/head64.S # # ChangeSet # 2004/11/01 18:30:59+01:00 bzolnier@trik.(none) # [ide] obsolete "enable DMA by default" config options # # CONFIG_IDEDMA_PCI_AUTO and CONFIG_IDEDMA_ICS_AUTO # # Host drivers should deal with broken hardware themselves. # Warn if DMA support is enabled but "enable DMA by default" is not. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/setup-pci.c # 2004/11/01 18:30:47+01:00 bzolnier@trik.(none) +5 -0 # [ide] obsolete "enable DMA by default" config options # # drivers/ide/arm/icside.c # 2004/11/01 18:30:47+01:00 bzolnier@trik.(none) +5 -0 # [ide] obsolete "enable DMA by default" config options # # ChangeSet # 2004/11/01 18:19:16+01:00 bzolnier@trik.(none) # [ide] obsolete some command line parameters # # "hdx=autotune", "hdx=noautotune": # * should be handled by host drivers needing them # # "idex=autotune", "idex=noautotune": # * should die # # "idex=ata66": # * should be handled by host drivers needing it # # "idex=dma": # * works only for: cs5220.c, generic.c, hpt366.c, triflex.c # * DMA should be used by default # # "idex=reset", "idex=serialize": # * host drivers should set these settings when needed # # "idex=base[,ctl[,irq]]": # * host drivers should auto-detect correct settings # * ordering should be controlled by user-space # # "ide0=four": # * should be handled by ide-generic driver # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide.c # 2004/11/01 18:19:01+01:00 bzolnier@trik.(none) +12 -9 # [ide] obsolete some command line parameters # # ChangeSet # 2004/11/01 18:18:35+01:00 bzolnier@trik.(none) # [ide] obsolete /proc/ide/hd?/settings # # Majority of these settings is also available through ioctls. # We will deal with the rest during deprecation period. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-proc.c # 2004/11/01 18:18:17+01:00 bzolnier@trik.(none) +6 -0 # [ide] obsolete /proc/ide/hd?/settings # # ChangeSet # 2004/11/01 18:07:10+01:00 bzolnier@trik.(none) # [ide] remove more dead ide exports # # From: Christoph Hellwig # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/11/01 18:06:50+01:00 bzolnier@trik.(none) +0 -10 # [ide] remove more dead ide exports # # drivers/ide/ppc/pmac.c # 2004/11/01 18:06:50+01:00 bzolnier@trik.(none) +0 -2 # [ide] remove more dead ide exports # # drivers/ide/ide-taskfile.c # 2004/11/01 18:06:50+01:00 bzolnier@trik.(none) +1 -3 # [ide] remove more dead ide exports # # drivers/ide/ide-lib.c # 2004/11/01 18:06:50+01:00 bzolnier@trik.(none) +0 -2 # [ide] remove more dead ide exports # # drivers/ide/ide-iops.c # 2004/11/01 18:06:50+01:00 bzolnier@trik.(none) +4 -12 # [ide] remove more dead ide exports # # drivers/ide/ide-io.c # 2004/11/01 18:06:49+01:00 bzolnier@trik.(none) +8 -29 # [ide] remove more dead ide exports # # ChangeSet # 2004/11/01 13:37:28-03:00 acme@conectiva.com.br # [NET] add missing include to divert.h # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/divert.h # 2004/11/01 13:37:19-03:00 acme@conectiva.com.br +2 -0 # [NET] add missing include to divert.h # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 17:33:48+01:00 marcel@holtmann.org # [Bluetooth] Fix connection hash bug # # When calling hci_conn_hash_del() the acl_num value is incremented, # but it must be decremented. # # Signed-off-by: Marcel Holtmann # # include/net/bluetooth/hci_core.h # 2004/11/01 17:31:32+01:00 marcel@holtmann.org +1 -1 # Fix connection hash bug # # ChangeSet # 2004/11/01 16:28:43+00:00 aia21@cantab.net # NTFS: Add MODULE_VERSION() to fs/ntfs/super.c. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/super.c # 2004/11/01 16:28:33+00:00 aia21@cantab.net +1 -0 # Add MODULE_VERSION(). # # ChangeSet # 2004/11/01 12:59:25-03:00 acme@conectiva.com.br # [NET] add missing includes and forward decls to filter.h # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/filter.h # 2004/11/01 12:59:17-03:00 acme@conectiva.com.br +6 -0 # [NET] add missing includes and forward decls to filter.h # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2004/11/01 07:41:27-08:00 teanropo@cc.jyu.fi # [PATCH] Don't initialize /dev/pg0 to be always busy # # Without this patch my HP CD-Writer doesn't work. # With this applied everything is fine. # # Signed-off-by: Tero Roponen # Signed-off-by: Linus Torvalds # # drivers/block/paride/pg.c # 2004/10/28 08:50:14-07:00 teanropo@cc.jyu.fi +1 -1 # Don't initialize /dev/pg0 to be always busy # # include/asm-arm/arch-pxa/pxa-regs.h # 2004/11/01 14:13:25+00:00 matthias@net.rmk.(none) +12 -0 # [PATCH] 2183/1: GPIO84:81 for PXA26x defines # # ChangeSet # 2004/11/01 08:00:01-06:00 shaggy@austin.ibm.com # JFS: make some symbols static # # The patch below makes some JFS symbols that are only used inside the # file they are defined in static. # # Signed-off-by: Adrian Bunk # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_txnmgr.c # 2004/11/01 07:59:47-06:00 shaggy@austin.ibm.com +2 -2 # Add static keywords # # fs/jfs/jfs_metapage.c # 2004/11/01 07:59:47-06:00 shaggy@austin.ibm.com +1 -1 # Add static keywords # # fs/jfs/jfs_logmgr.c # 2004/11/01 07:59:47-06:00 shaggy@austin.ibm.com +4 -4 # Add static keywords # # ChangeSet # 2004/11/01 13:59:40+00:00 matthias@net.rmk.(none) # [ARM PATCH] 2183/1: GPIO84:81 for PXA26x defines # # Patch from Matthias Burghardt # # Adds bit definitions for PXA26x\'s GPIO lines 81 to 84 and their alternate functions # # ChangeSet # 2004/11/01 07:55:47-06:00 shaggy@austin.ibm.com # JFS: use alloc_metapage for consistency # # We defind alloc_metapage, but instead of using it, the potential callers # are calling mempool_alloc directly. Since we have and use the function, # free_metapage, we should be consistent and use alloc_metapage. # # This patch also changes the argument to alloc_metapage so that the # caller passes gfp_mask directly, rather than a less descriptive flag. # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_metapage.c # 2004/11/01 07:55:33-06:00 shaggy@austin.ibm.com +4 -4 # use alloc_metapage instead of calling mempool_alloc directly # # ChangeSet # 2004/11/01 13:52:50+00:00 rmk@flint.arm.linux.org.uk # [ARM] mtd: update mapping drivers. # # This updates dc21285.c, integrator-flash.c and sa1100-flash.c map # drivers. # # drivers/mtd/maps/sa1100-flash.c # 2004/11/01 13:48:59+00:00 rmk@flint.arm.linux.org.uk +73 -38 # - No need to keep a separate copy of the ioremap cookie # - Name individual flash mappings separately # - No point having sa1100_probe_map global; make it local # - Fix memory resouce handling. # # drivers/mtd/maps/integrator-flash.c # 2004/11/01 13:48:58+00:00 rmk@flint.arm.linux.org.uk +4 -4 # Fix sparse __iomem annotations. # # drivers/mtd/maps/dc21285.c # 2004/11/01 13:48:58+00:00 rmk@flint.arm.linux.org.uk +32 -22 # - Fix formatting # - dc21285_read* returns map_word # - dc21285_write should be called dc21285_write8 # - dc21285_write* takes const map_word # - use map->virt not map->map_priv_1 # - kill warning about dc21285_parts # - fix incorrectly placed "break" statement # - Remove inappropriate __iomem casts. # - parse_mtd_partitions forth argument is an integer not a pointer # # BitKeeper/deleted/.del-integrator-flash-v24.c~e88f663e8fb18dd9 # 2004/11/01 13:29:05+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: drivers/mtd/maps/integrator-flash-v24.c # # ChangeSet # 2004/11/01 12:43:22+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250_gsc: Convert to use serial8250_{un,}register_port. # # drivers/serial/8250_gsc.c # 2004/11/01 12:40:09+00:00 rmk@flint.arm.linux.org.uk +15 -32 # Remove serial.h includes. # Add 8250.h include. # Convert to use serial8250_{un,}register_port. # # ChangeSet # 2004/11/01 12:32:48+00:00 janitor@at.rmk.(none) # [SERIAL] replace schedule_timeout() with msleep/msleep_interruptible() # # Use msleep()/msleep_interruptible() [as appropriate] # instead of schedule_timeout() to guarantee the task delays # as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Russell King # # drivers/serial/serial_core.c # 2004/11/01 12:29:41+00:00 janitor@at.rmk.(none) +4 -7 # [PATCH] replace schedule_timeout() with msleep()/msleep_interruptible() # # drivers/serial/pmac_zilog.c # 2004/11/01 12:29:40+00:00 janitor@at.rmk.(none) +2 -4 # [PATCH] replace schedule_timeout() with msleep()/msleep_interruptible() # # drivers/serial/mcfserial.c # 2004/11/01 12:29:40+00:00 janitor@at.rmk.(none) +4 -5 # [PATCH] replace schedule_timeout() with msleep()/msleep_interruptible() # # drivers/serial/icom.c # 2004/11/01 12:29:39+00:00 janitor@at.rmk.(none) +0 -6 # [PATCH] replace schedule_timeout() with msleep()/msleep_interruptible() # # drivers/serial/68360serial.c # 2004/11/01 12:29:39+00:00 janitor@at.rmk.(none) +3 -5 # [PATCH] replace schedule_timeout() with msleep()/msleep_interruptible() # # drivers/serial/68328serial.c # 2004/11/01 12:29:39+00:00 janitor@at.rmk.(none) +3 -3 # [PATCH] replace schedule_timeout() with msleep()/msleep_interruptible() # # ChangeSet # 2004/11/01 11:22:33+00:00 aia21@cantab.net # NTFS: Fix stupid bug in fs/ntfs/attrib.c::ntfs_attr_find() that resulted in # a NULL pointer dereference in the error code path when a corrupt # attribute was found. # # Thanks to Domen Puncer for the bug report. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/attrib.c # 2004/11/01 11:22:22+00:00 aia21@cantab.net +4 -13 # Fix stupid bug in fs/ntfs/attrib.c::ntfs_attr_find() that resulted in # a NULL pointer dereference in the error code path when a corrupt # attribute was found. # # ChangeSet # 2004/11/01 11:04:38+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: Return interrupt handler status. # # Thomas Koeller points out that we're always returning IRQ_HANDLED # from our interrupt handler, even if we find no interrupt work to # be done. # # drivers/serial/8250.c # 2004/11/01 10:59:29+00:00 rmk@flint.arm.linux.org.uk +5 -3 # Return interrupt handler status. # # ChangeSet # 2004/10/31 22:13:24-08:00 gerg@snapgear.com # [PATCH] m68knommu: checksum.h needs linux/in6.h # # Need to include linux/in6.h in m68knommu checksum.h to get # a clean compile. All other architectures to this too. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/checksum.h # 2004/10/27 18:14:32-07:00 gerg@snapgear.com +2 -0 # m68knommu: checksum.h needs linux/in6.h # # ChangeSet # 2004/10/31 22:13:12-08:00 gerg@snapgear.com # [PATCH] m68knommu: makefile support for new CPU and board types # # Add build support for new CPU families and boards. Specifically for # the 527x ColdFire family, and the generic 528x CPU family. # Also made the switch to -O1, gives smaller code on m68k and ColdFire # platforms. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/Makefile # 2004/10/27 18:11:40-07:00 gerg@snapgear.com +12 -5 # m68knommu: makefile support for new CPU and board types # # ChangeSet # 2004/10/31 22:12:59-08:00 gerg@snapgear.com # [PATCH] m68knommu: fix do_signal() to properly use get_signal_to_deliver() # # Completely rework m68knommu do_signal() signal handling code. # Changed to use get_signal_to_deliver() properly, and remove # un-neccessary local signal type checks. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/kernel/signal.c # 2004/10/27 18:11:41-07:00 gerg@snapgear.com +23 -126 # m68knommu: fix do_signal() to properly use get_signal_to_deliver() # # ChangeSet # 2004/10/31 22:12:47-08:00 gerg@snapgear.com # [PATCH] m68knommu: clock definitions for 527x ColdFire CPU's # # Add clock rate definitions for newly support ColdFire 527x family # of CPU's. And switch to the generic 528x define for the 5280 and # 5282 CPU's. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/coldfire.h # 2004/10/27 18:14:32-07:00 gerg@snapgear.com +8 -2 # m68knommu: clock definitions for 527x ColdFire CPU's # # ChangeSet # 2004/10/31 22:12:35-08:00 gerg@snapgear.com # [PATCH] m68knommu: fix calculation overflow in udelay() on fast CPU's # # Re-work the udelay() function. On fast ColdFire CPU's we are # overflowing in the calculation and getting totally bogus # results. # # On old 68k and ColdFire CPU's we have no 32*32->64 multiply # instruction. So we resort to a mul/shift calculation similar # to what ARM uses. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/delay.h # 2004/10/27 18:14:32-07:00 gerg@snapgear.com +27 -28 # m68knommu: fix calculation overflow in udelay() on fast CPU's # # ChangeSet # 2004/10/31 22:12:22-08:00 gerg@snapgear.com # [PATCH] m68knommu: update syscall definitions to match new syscall table # # Update the m68knommu system call definitions to match the modified # syscall table. This will bring it into line with other architectures. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/unistd.h # 2004/10/27 18:14:35-07:00 gerg@snapgear.com +69 -4 # m68knommu: update syscall definitions to match new syscall table # # ChangeSet # 2004/10/31 22:12:10-08:00 gerg@snapgear.com # [PATCH] m68knommu: new CPU and board options for configuration # # A few updates to the m68knommu configuration: # # . Made the Morotola 5280 and 5282 support be a common 528x family # . Add support for selecting the 527x ColdFire family (5270/5271/5274/5275) # . Add support for selecting Freescale M5271EVB board # . Add support for selecting Freescale M5275EVB board # . Add support for selecting Sneha CPU16B board # . Add support for selecting Feith SCALES and CANCAM boards # . Fix some gramatical errors in help lines # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/Kconfig # 2004/10/27 18:11:40-07:00 gerg@snapgear.com +92 -26 # m68knommu: new CPU and board options for configuration # # ChangeSet # 2004/10/31 22:11:57-08:00 gerg@snapgear.com # [PATCH] m68knommu: create real lib udelay() function # # Create a real non-inlined function for m68knommu udelay(). # We can save a little code space this way (and on most uClinux # patforms this is a problem). # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/lib/delay.c # 2004/10/27 18:11:40-07:00 gerg@snapgear.com +18 -0 # m68knommu: create real lib udelay() function # # arch/m68knommu/lib/delay.c # 2004/10/27 18:11:40-07:00 gerg@snapgear.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68knommu/lib/delay.c # # ChangeSet # 2004/10/31 22:11:45-08:00 gerg@snapgear.com # [PATCH] m68knommu: new board support nad missing sections for linker script # # Couple of updates for ther m68knommu linker script. # # . Add support for the Freescale M5271EVB and M5275EVB boards # . Add support for the Sneha CPU16B board # . Changes to use the generic 528x define to 5280 and 5282 base boards # . Add the missing param section # . Align the ramfs section on a 4k (pseudo page size) boundary # # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/kernel/vmlinux.lds.S # 2004/10/27 18:11:41-07:00 gerg@snapgear.com +23 -6 # m68knommu: new board support nad missing sections for linker script # # ChangeSet # 2004/10/31 22:11:32-08:00 gerg@snapgear.com # [PATCH] m68knommu: build real lib udelay() function # # Build the new m68knommu lib function udelay(). # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/lib/Makefile # 2004/10/27 18:11:40-07:00 gerg@snapgear.com +1 -1 # m68knommu: build real lib udelay() function # # ChangeSet # 2004/10/31 22:11:20-08:00 gerg@snapgear.com # [PATCH] m68knommu: update syscall table to be inline with other architectures # # Update the m68knommu system call table to be in line with all # other architectures. There is really no reason this needs to # be different from any other architecture. # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/kernel/syscalltable.S # 2004/10/27 18:11:41-07:00 gerg@snapgear.com +49 -21 # m68knommu: update syscall table to be inline with other architectures # # ChangeSet # 2004/10/31 22:11:07-08:00 gerg@snapgear.com # [PATCH] m68knommu: new CPU support strings in setup # # Change 5280 and 5282 CPU support to be generic 528x family. # Also add support for the new 527x ColdFire family. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/kernel/setup.c # 2004/10/27 18:11:41-07:00 gerg@snapgear.com +6 -3 # m68knommu: new CPU support strings in setup # # ChangeSet # 2004/10/31 22:10:54-08:00 gerg@snapgear.com # [PATCH] m68knommu: add hardware defines for the ColdFire 527x CPU family # # Add SIM hardware module definitions for the ColdFire 527x CPU family. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/m527xsim.h # 2004/10/27 18:14:34-07:00 gerg@snapgear.com +38 -0 # m68knommu: add hardware defines for the ColdFire 527x CPU family # # include/asm-m68knommu/m527xsim.h # 2004/10/27 18:14:34-07:00 gerg@snapgear.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-m68knommu/m527xsim.h # # ChangeSet # 2004/10/31 21:50:14-08:00 matthew@wil.cx # [PATCH] Use optimised byteswap again # # Looks like Al's patch to sparsify the byteorder code prevented use of the # assembler-optimised code. Not that I can blame him -- three underscores # are C-coded and two underscores are assembly-optimised. # # include/linux/byteorder/little_endian.h # 2004/10/31 18:59:17-08:00 matthew@wil.cx +6 -6 # Use optimised byteswap again # # include/linux/byteorder/big_endian.h # 2004/10/31 18:59:17-08:00 matthew@wil.cx +6 -6 # Use optimised byteswap again # # ChangeSet # 2004/10/31 18:27:44-08:00 davem@nuts.davemloft.net # [SPARC64]: Add dummy pci_get_legacy_ide_irq() routine. # # Signed-off-by: David S. Miller # # include/asm-sparc64/pci.h # 2004/10/31 18:27:13-08:00 davem@nuts.davemloft.net +5 -0 # [SPARC64]: Add dummy pci_get_legacy_ide_irq() routine. # # ChangeSet # 2004/10/31 16:18:37-08:00 hirofumi@mail.parknet.co.jp # [PATCH] FAT: fix VFAT_IOCTL_READDIR_BOTH ioctl # # If "utf8" option was specified and app uses VFAT_IOCTL_READDIR_BOTH # ioctl, utf8_wcstombs() is used. utf8_wcstombs() doesn't add the nul # terminate. Then fat_ioctl_filldir() uses a wrong length of name by # strlen(). # # This patch passes the correct length to fat_ioctl_filldir(), and # doesn't use nul terminate anymore. # # Many helps by Alex Villacís Lasso. Thanks. # # Signed-off-by: OGAWA Hirofumi # Signed-off-by: Linus Torvalds # # fs/fat/dir.c # 2004/10/30 16:15:03-07:00 hirofumi@mail.parknet.co.jp +78 -60 # FAT: fix VFAT_IOCTL_READDIR_BOTH ioctl # # ChangeSet # 2004/10/31 16:18:23-08:00 hirofumi@mail.parknet.co.jp # [PATCH] FAT: remove incorrect BUG_ON() # # This is valid state if file was accessed by multiple processes at the # same time. # # Signed-off-by: OGAWA Hirofumi # Signed-off-by: Linus Torvalds # # fs/fat/cache.c # 2004/10/30 16:14:49-07:00 hirofumi@mail.parknet.co.jp +0 -1 # FAT: remove incorrect BUG_ON() # # ChangeSet # 2004/10/31 16:13:39-08:00 torvalds@ppc970.osdl.org # Undo totally broken m68k patch. # # Note to self: any m68k patch that touches a SMP file is # likely not worth it. # # Cset exclude: geert@linux-m68k.org[torvalds]|ChangeSet|20041101000206|42067 # # include/linux/smp_lock.h # 2004/10/31 16:13:37-08:00 torvalds@ppc970.osdl.org +0 -0 # Undo totally broken m68k patch. # # ChangeSet # 2004/10/31 16:06:11-08:00 geert@linux-m68k.org # [PATCH] m68k: Remove duplicate includes # # M68k: Remove duplicate includes (from Adrian Bunk) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # drivers/char/amiserial.c # 2004/10/31 01:25:17-08:00 geert@linux-m68k.org +0 -1 # m68k: Remove duplicate includes # # arch/m68k/q40/config.c # 2004/10/30 06:00:26-07:00 geert@linux-m68k.org +0 -1 # m68k: Remove duplicate includes # # ChangeSet # 2004/10/31 16:05:55-08:00 geert@linux-m68k.org # [PATCH] m68k: Sun 3: Fix modular XFS by exporting vmalloc_end # # Sun 3: Fix modular XFS by exporting vmalloc_end # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/sun3/mmu_emu.c # 2004/10/28 12:18:57-07:00 geert@linux-m68k.org +3 -0 # m68k: Sun 3: Fix modular XFS by exporting vmalloc_end # # ChangeSet # 2004/10/31 16:05:41-08:00 geert@linux-m68k.org # [PATCH] m68k: Reiserfs: Add missing #include # # Reiserfs: Add missing #include # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # include/linux/reiserfs_fs.h # 2004/10/24 07:42:45-07:00 geert@linux-m68k.org +1 -0 # m68k: Reiserfs: Add missing #include # # ChangeSet # 2004/10/31 16:05:26-08:00 geert@linux-m68k.org # [PATCH] m68k: Disable SERIO_I8042 # # M68k: Disable SERIO_I8042 # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # drivers/input/serio/Kconfig # 2004/10/27 14:16:43-07:00 geert@linux-m68k.org +1 -1 # m68k: Disable SERIO_I8042 # # ChangeSet # 2004/10/31 16:05:11-08:00 geert@linux-m68k.org # [PATCH] m68k: Add defconfig for Sun 3x # # M68k: Add defconfig for Sun 3x (derived from the Debian config for Sun 3) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/configs/sun3x_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +801 -0 # m68k: Add defconfig for Sun 3x # # arch/m68k/configs/sun3x_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68k/configs/sun3x_defconfig # # ChangeSet # 2004/10/31 16:04:56-08:00 geert@linux-m68k.org # [PATCH] m68k: Add defconfig for Sun 3 # # M68k: Add defconfig for Sun 3 (based on the Debian config) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/configs/sun3_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +791 -0 # m68k: Add defconfig for Sun 3 # # arch/m68k/configs/sun3_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68k/configs/sun3_defconfig # # ChangeSet # 2004/10/31 16:04:41-08:00 geert@linux-m68k.org # [PATCH] m68k: Add defconfig for Q40 and Q60 # # M68k: Add defconfig for Q40 and Q60 (based on the Debian config) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/configs/q40_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +878 -0 # m68k: Add defconfig for Q40 and Q60 # # arch/m68k/configs/q40_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68k/configs/q40_defconfig # # ChangeSet # 2004/10/31 16:04:24-08:00 geert@linux-m68k.org # [PATCH] m68k: Add defconfig for MVME162, MVME166, and MVME167 # # M68k: Add defconfig for MVME162, MVME166, and MVME167 (based on the Debian # config) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/configs/mvme16x_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +803 -0 # m68k: Add defconfig for MVME162, MVME166, and MVME167 # # arch/m68k/configs/mvme16x_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68k/configs/mvme16x_defconfig # # ChangeSet # 2004/10/31 16:04:12-08:00 geert@linux-m68k.org # [PATCH] m68k: Add defconfig for MVME147 # # M68k: Add defconfig for MVME147 (based on the Debian config) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/configs/mvme147_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +804 -0 # m68k: Add defconfig for MVME147 # # arch/m68k/configs/mvme147_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68k/configs/mvme147_defconfig # # ChangeSet # 2004/10/31 16:03:56-08:00 geert@linux-m68k.org # [PATCH] m68k: Add defconfig for Macintosh # # M68k: Add defconfig for Macintosh (based on the Debian config) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/configs/mac_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +865 -0 # m68k: Add defconfig for Macintosh # # arch/m68k/configs/mac_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68k/configs/mac_defconfig # # ChangeSet # 2004/10/31 16:03:40-08:00 geert@linux-m68k.org # [PATCH] m68k: Add defconfig for HP9000/300 and HP9000/400 # # M68k: Add defconfig for HP9000/300 and HP9000/400 (based on the Debian config) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/configs/hp300_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +786 -0 # m68k: Add defconfig for HP9000/300 and HP9000/400 # # arch/m68k/configs/hp300_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68k/configs/hp300_defconfig # # ChangeSet # 2004/10/31 16:03:26-08:00 geert@linux-m68k.org # [PATCH] m68k: Add defconfig for BVME4000 and BVME6000 # # M68k: Add defconfig for BVME4000 and BVME6000 (based on the Debian config) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/configs/bvme6000_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +786 -0 # m68k: Add defconfig for BVME4000 and BVME6000 # # arch/m68k/configs/bvme6000_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68k/configs/bvme6000_defconfig # # ChangeSet # 2004/10/31 16:03:09-08:00 geert@linux-m68k.org # [PATCH] m68k: Add defconfig for Atari # # M68k: Add defconfig for Atari (based on the Debian config) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/configs/atari_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +840 -0 # m68k: Add defconfig for Atari # # arch/m68k/configs/atari_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68k/configs/atari_defconfig # # ChangeSet # 2004/10/31 16:02:54-08:00 geert@linux-m68k.org # [PATCH] m68k: Add defconfig for Apollo # # M68k: Add defconfig for Apollo (derived from the Debian config for HP9000/300) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/configs/apollo_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +787 -0 # m68k: Add defconfig for Apollo # # arch/m68k/configs/apollo_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68k/configs/apollo_defconfig # # ChangeSet # 2004/10/31 16:02:36-08:00 geert@linux-m68k.org # [PATCH] m68k: Add defconfig for Amiga # # M68k: Add defconfig for Amiga (based on the Debian config) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/configs/amiga_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +929 -0 # m68k: Add defconfig for Amiga # # arch/m68k/configs/amiga_defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68k/configs/amiga_defconfig # # ChangeSet # 2004/10/31 16:02:22-08:00 geert@linux-m68k.org # [PATCH] m68k: Update defconfig for 2.6.9 # # M68k: Update defconfig for 2.6.9 # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/defconfig # 2004/09/20 02:03:03-07:00 geert@linux-m68k.org +412 -141 # m68k: Update defconfig for 2.6.9 # # ChangeSet # 2004/10/31 16:01:52-08:00 geert@linux-m68k.org # [PATCH] m68k: Add 43 missing syscalls # # M68k: Add 43 missing syscalls (up to 2.6.9) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # include/asm-m68k/unistd.h # 2004/10/24 07:34:49-07:00 geert@linux-m68k.org +44 -1 # m68k: Add 43 missing syscalls # # arch/m68k/kernel/entry.S # 2004/10/24 07:36:15-07:00 geert@linux-m68k.org +44 -0 # m68k: Add 43 missing syscalls # # ChangeSet # 2004/10/31 16:01:36-08:00 geert@linux-m68k.org # [PATCH] m68k: MVME167 serial: Replace bottom half handler with task queue handler # # MVME167 serial: Fix compilation by replacing the bottom half handler with a # task queue handler, based on the Cyclades driver (from Kars de Jong) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # drivers/char/serial167.c # 2004/10/23 06:42:26-07:00 geert@linux-m68k.org +9 -20 # m68k: MVME167 serial: Replace bottom half handler with task queue handler # # ChangeSet # 2004/10/31 16:01:24-08:00 geert@linux-m68k.org # [PATCH] m68k: Sun-3 Makefile: join short multi-line # # Sun-3 Makefile: join short multi-line # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/sun3/Makefile # 2004/10/17 08:47:16-07:00 geert@linux-m68k.org +1 -2 # m68k: Sun-3 Makefile: join short multi-line # # ChangeSet # 2004/10/31 16:01:09-08:00 geert@linux-m68k.org # [PATCH] m68k: missing/superfluous config.h # # M68k: Add missing and remove superfluous #include # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # include/asm-m68k/tlbflush.h # 2004/10/17 08:46:29-07:00 geert@linux-m68k.org +2 -0 # m68k: missing/superfluous config.h # # include/asm-m68k/mc146818rtc.h # 2004/10/17 08:45:54-07:00 geert@linux-m68k.org +2 -0 # m68k: missing/superfluous config.h # # include/asm-m68k/atomic.h # 2004/10/17 08:45:27-07:00 geert@linux-m68k.org +2 -0 # m68k: missing/superfluous config.h # # arch/m68k/sun3x/config.c # 2004/10/17 08:44:49-07:00 geert@linux-m68k.org +2 -1 # m68k: missing/superfluous config.h # # arch/m68k/sun3/sun3ints.c # 2004/10/17 08:44:05-07:00 geert@linux-m68k.org +1 -0 # m68k: missing/superfluous config.h # # arch/m68k/sun3/sun3dvma.c # 2004/10/17 08:43:51-07:00 geert@linux-m68k.org +1 -0 # m68k: missing/superfluous config.h # # arch/m68k/q40/q40ints.c # 2004/10/17 08:49:54-07:00 geert@linux-m68k.org +0 -1 # m68k: missing/superfluous config.h # # arch/m68k/mm/sun3mmu.c # 2004/10/17 08:49:41-07:00 geert@linux-m68k.org +0 -1 # m68k: missing/superfluous config.h # # arch/m68k/hp300/config.c # 2004/10/17 08:48:31-07:00 geert@linux-m68k.org +1 -0 # m68k: missing/superfluous config.h # # ChangeSet # 2004/10/31 16:00:54-08:00 geert@linux-m68k.org # [PATCH] m68k: fix incorrect config comment in check_bugs() # # M68k: Fix incorrect config comment in check_bugs() # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/kernel/setup.c # 2004/10/10 07:50:33-07:00 geert@linux-m68k.org +1 -3 # m68k: fix incorrect config comment in check_bugs() # # ChangeSet # 2004/10/31 16:00:42-08:00 geert@linux-m68k.org # [PATCH] m68k: HP300: Convert DIO bus and its drivers to the new driver model # # HP300: Convert DIO bus and its drivers to the new driver model (from Jochen # Friedrich). # # Signed-off-by: Jochen Friedrich # Signed-off-by: Kars de Jong # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # drivers/dio/dio-sysfs.c # 2004/10/06 13:44:40-07:00 geert@linux-m68k.org +77 -0 # m68k: HP300: Convert DIO bus and its drivers to the new driver model # # include/linux/dio.h # 2004/10/06 13:44:41-07:00 geert@linux-m68k.org +135 -10 # m68k: HP300: Convert DIO bus and its drivers to the new driver model # # drivers/video/hpfb.c # 2004/10/06 13:47:54-07:00 geert@linux-m68k.org +63 -56 # m68k: HP300: Convert DIO bus and its drivers to the new driver model # # drivers/serial/8250_hp300.c # 2004/10/06 13:44:40-07:00 geert@linux-m68k.org +129 -130 # m68k: HP300: Convert DIO bus and its drivers to the new driver model # # drivers/net/hplance.c # 2004/10/06 13:44:40-07:00 geert@linux-m68k.org +54 -72 # m68k: HP300: Convert DIO bus and its drivers to the new driver model # # drivers/net/Space.c # 2004/10/06 13:44:40-07:00 geert@linux-m68k.org +0 -3 # m68k: HP300: Convert DIO bus and its drivers to the new driver model # # drivers/dio/dio.c # 2004/10/06 13:44:40-07:00 geert@linux-m68k.org +67 -142 # m68k: HP300: Convert DIO bus and its drivers to the new driver model # # drivers/dio/dio-sysfs.c # 2004/10/06 13:44:40-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/dio/dio-sysfs.c # # drivers/dio/dio-driver.c # 2004/10/06 13:44:40-07:00 geert@linux-m68k.org +163 -0 # m68k: HP300: Convert DIO bus and its drivers to the new driver model # # drivers/dio/Makefile # 2004/10/06 13:44:40-07:00 geert@linux-m68k.org +1 -1 # m68k: HP300: Convert DIO bus and its drivers to the new driver model # # drivers/dio/dio-driver.c # 2004/10/06 13:44:40-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/dio/dio-driver.c # # ChangeSet # 2004/10/31 16:00:29-08:00 geert@linux-m68k.org # [PATCH] m68k: hades-pci.c: replace pci_find_device() with pci_get_device() # # As pci_find_device() is going away I have replaced this call with # pci_get_device(). # # Signed-off-by: Hanna Linder # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/atari/hades-pci.c # 2004/10/04 13:30:44-07:00 geert@linux-m68k.org +1 -1 # m68k: hades-pci.c: replace pci_find_device() with pci_get_device() # # ChangeSet # 2004/10/31 16:00:13-08:00 geert@linux-m68k.org # [PATCH] m68k: HP300 SCSI chip is 98265A # # HP300: Fix typos in the DIO output. The SCSI chip is a 98265A, not a 98625A. # NetBSD has this already fixed. # # Signed-off-by: Jochen Friedrich # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # include/linux/dio.h # 2004/09/21 14:03:43-07:00 geert@linux-m68k.org +5 -5 # m68k: HP300 SCSI chip is 98265A # # ChangeSet # 2004/10/31 16:00:01-08:00 geert@linux-m68k.org # [PATCH] m68k: HP300 config # # HP300 configuration updates from Kars de Jong: # - Updated help for CONFIG_HP300 # - DIO support defaults to y # - HP DCA support depends on SERIAL_8250 # - Added HP APCI option # - Removed HP DCA from SERIAL_CONSOLE dependencies # # Signed-off-by: Kars de Jong # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/Kconfig # 2004/07/14 04:17:55-07:00 geert@linux-m68k.org +15 -6 # m68k: HP300 config # # ChangeSet # 2004/10/31 15:59:49-08:00 geert@linux-m68k.org # [PATCH] m68k: HP300 8250 serial for DCA and APCI ports # # Created HP300 8250 driver which supports DCA and APCI ports. Support for APCI # is still experimental and unfinished (no support for interrupts). # Console support should be okay though (from Kars de Jong) # # Signed-off-by: Kars de Jong # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # drivers/serial/Makefile # 2004/07/14 04:19:16-07:00 geert@linux-m68k.org +1 -0 # m68k: HP300 8250 serial for DCA and APCI ports # # drivers/serial/8250_hp300.c # 2004/07/11 09:05:33-07:00 geert@linux-m68k.org +330 -0 # m68k: HP300 8250 serial for DCA and APCI ports # # drivers/serial/8250_hp300.c # 2004/07/11 09:05:33-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/serial/8250_hp300.c # # ChangeSet # 2004/10/31 15:59:36-08:00 geert@linux-m68k.org # [PATCH] m68k: M68k I/O for generic 8250 on HP300 # # M68k I/O updates from Kars de Jong and Jochen Friedrich: # - To be able to use the generic 8250 driver on the HP300, added dummy # implementations of inb(), inb_p(), outb() and outb_p() # - Added implementations of readb(), writeb(), readl(), and writel() for the # 8250 driver # # Signed-off-by: Kars de Jong # Signed-Off-By: Jochen Friedrich # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # include/asm-m68k/io.h # 2004/07/14 04:19:47-07:00 geert@linux-m68k.org +17 -0 # m68k: M68k I/O for generic 8250 on HP300 # # ChangeSet # 2004/10/31 15:59:22-08:00 geert@linux-m68k.org # [PATCH] m68k: HP300 fb # # HP300 frame buffer device updates from Kars de Jong: # - Updated to use the new DIO semantics # - Added support for DIO-II boards # - Added support for 8 bit Catseye boards # - Fixed colour map support # - Added fb_blank() implementation # - Added fb_fillrect() implementation # - Added fb_sync() implementation # # Signed-off-by: Kars de Jong # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # drivers/video/hpfb.c # 2004/07/14 04:19:21-07:00 geert@linux-m68k.org +290 -99 # m68k: HP300 fb # # ChangeSet # 2004/10/31 15:59:06-08:00 geert@linux-m68k.org # [PATCH] m68k: HP300 LANCE # # HP300 LANCE updates from Kars de Jong: # - Updated HP LANCE driver to use the new DIO semantics # - If only HP LANCE or MVME147 LANCE is selected, enable compile-time # choice of LANCE register access. If both are defined, go through the # function pointer # - Added support for CONFIG_NET_POLL_CONTROLLER # - Fixed problem with disabling board interrupts in hplance_close() which # caused the driver to lock up # # Signed-off-by: Kars de Jong # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # drivers/net/mvme147.c # 2004/07/14 04:18:56-07:00 geert@linux-m68k.org +10 -12 # m68k: HP300 LANCE # # drivers/net/hplance.h # 2004/07/14 04:18:56-07:00 geert@linux-m68k.org +5 -10 # m68k: HP300 LANCE # # drivers/net/hplance.c # 2004/07/14 04:18:56-07:00 geert@linux-m68k.org +30 -30 # m68k: HP300 LANCE # # drivers/net/7990.h # 2004/07/14 04:18:54-07:00 geert@linux-m68k.org +6 -6 # m68k: HP300 LANCE # # drivers/net/7990.c # 2004/07/14 04:18:54-07:00 geert@linux-m68k.org +104 -56 # m68k: HP300 LANCE # # ChangeSet # 2004/10/31 15:58:52-08:00 geert@linux-m68k.org # [PATCH] m68k: HP300 DIO # # HP300 DIO bus updates from Kars de Jong: # - Removed kludges for internal HPIB, no need to handle it as a DIO device # - Removed dio_scodetoviraddr() and introduced dio_scodetophysaddr() instead, # to be able to support DIO-II # - Removed trailing white space # - Changed error return code of dio_find() from 0 to -1, since select code 0 # is a valid select code # - Added support for DIO-II # - Fixed problem with DIO_ENCODE_ID() # # Signed-off-by: Kars de Jong # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # include/linux/dio.h # 2004/07/14 04:20:06-07:00 geert@linux-m68k.org +9 -26 # m68k: HP300 DIO # # drivers/dio/dio.c # 2004/07/14 04:18:41-07:00 geert@linux-m68k.org +112 -70 # m68k: HP300 DIO # # ChangeSet # 2004/10/31 15:58:36-08:00 geert@linux-m68k.org # [PATCH] m68k: HP300 core updates # # Update of HP300 core support to use bootinfo etc. (from Kars de Jong) # # Signed-off-by: Kars de Jong # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # include/asm-m68k/hp300hw.h # 2004/07/09 13:52:30-07:00 geert@linux-m68k.org +25 -0 # m68k: HP300 core updates # # include/asm-m68k/bootinfo.h # 2004/07/14 04:19:47-07:00 geert@linux-m68k.org +7 -0 # m68k: HP300 core updates # # include/asm-m68k/blinken.h # 2004/07/14 04:19:47-07:00 geert@linux-m68k.org +10 -5 # m68k: HP300 core updates # # arch/m68k/kernel/setup.c # 2004/07/14 04:17:57-07:00 geert@linux-m68k.org +5 -14 # m68k: HP300 core updates # # arch/m68k/kernel/head.S # 2004/07/14 04:17:57-07:00 geert@linux-m68k.org +94 -100 # m68k: HP300 core updates # # arch/m68k/hp300/time.c # 2004/07/14 04:17:56-07:00 geert@linux-m68k.org +8 -5 # m68k: HP300 core updates # # arch/m68k/hp300/reboot.S # 2004/07/14 04:17:56-07:00 geert@linux-m68k.org +1 -20 # m68k: HP300 core updates # # arch/m68k/hp300/ints.c # 2004/07/14 04:17:56-07:00 geert@linux-m68k.org +8 -1 # m68k: HP300 core updates # # arch/m68k/hp300/config.c # 2004/07/14 04:17:56-07:00 geert@linux-m68k.org +241 -25 # m68k: HP300 core updates # # include/asm-m68k/hp300hw.h # 2004/07/09 13:52:30-07:00 geert@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-m68k/hp300hw.h # # ChangeSet # 2004/10/31 15:43:56-08:00 matthew@wil.cx # [PATCH] parisc: assembly fixes and comments # # Add comments and references for relied-upon translations # Add some extra comment to space_check # Add support for prober and probew in our non-access TLB fault emulation path # Force sr2 to 0 in syscall_restore # # Committed-by: Carlos O'Donell # # arch/parisc/kernel/real2.S # 2004/10/30 02:31:28-07:00 matthew@wil.cx +2 -2 # parisc: assembly fixes and comments # # arch/parisc/kernel/pacache.S # 2004/10/30 02:31:28-07:00 matthew@wil.cx +1 -1 # parisc: assembly fixes and comments # # arch/parisc/kernel/entry.S # 2004/10/30 02:31:27-07:00 matthew@wil.cx +83 -11 # parisc: assembly fixes and comments # # ChangeSet # 2004/10/31 15:43:42-08:00 matthew@wil.cx # [PATCH] parisc: fix HPUX compile problem # # Fix compile error when HPUX support is enabled # # Committed-by: Randolph Chung # # arch/parisc/mm/init.c # 2004/10/30 02:31:30-07:00 matthew@wil.cx +4 -4 # parisc: fix HPUX compile problem # # ChangeSet # 2004/10/31 15:43:27-08:00 matthew@wil.cx # [PATCH] parisc: make __kernel_clock_t long # # fix __kernel_clock_t definition so that e.g. proper process times are returned # to userspace # # Committed-by: Randolph Chung # # include/asm-parisc/posix_types.h # 2004/10/30 02:32:03-07:00 matthew@wil.cx +1 -1 # parisc: make __kernel_clock_t long # # ChangeSet # 2004/10/31 15:43:14-08:00 matthew@wil.cx # [PATCH] parisc: make atomic_t 32-bit # # Make atomic_t an int instead of a long to match the other architectures # # Committed-by: Matthew Wilcox # # include/asm-parisc/atomic.h # 2004/10/30 02:32:02-07:00 matthew@wil.cx +1 -1 # parisc: make atomic_t 32-bit # # ChangeSet # 2004/10/31 15:43:00-08:00 matthew@wil.cx # [PATCH] parisc: remove unused header file # # Remove unused asm/som.h (Olaf Hering) # # Committed-by: Matthew Wilcox # # BitKeeper/deleted/.del-som.h~aaa590e2cd342305 # 2004/10/31 15:42:52-08:00 matthew@wil.cx +0 -0 # Delete: include/asm-parisc/som.h # # ChangeSet # 2004/10/31 15:42:45-08:00 matthew@wil.cx # [PATCH] parisc: register usage documentation update # # Register usage documentation update # # Committed-by: Randolph Chung # # Documentation/parisc/registers # 2004/10/30 02:31:22-07:00 matthew@wil.cx +8 -15 # parisc: register usage documentation update # # ChangeSet # 2004/10/31 15:42:34-08:00 matthew@wil.cx # [PATCH] parisc: fix 64-bit gcc 3.3 compiles # # Remove gcc alias directive to fix gcc-3.3.4 64-bit kernels # # Committed-by: Carlos O'Donell # # arch/parisc/kernel/firmware.c # 2004/10/30 02:31:27-07:00 matthew@wil.cx +1 -1 # parisc: fix 64-bit gcc 3.3 compiles # # ChangeSet # 2004/10/31 15:42:21-08:00 matthew@wil.cx # [PATCH] parisc: debuglock fixes # # - pdc_printf from Randolph Chung # - implement memory barriers in debuglocks # # Committed-by: Thibaut Varene # # include/asm-parisc/pdc.h # 2004/10/30 02:32:03-07:00 matthew@wil.cx +1 -0 # parisc: debuglock fixes # # arch/parisc/lib/debuglocks.c # 2004/10/30 02:31:30-07:00 matthew@wil.cx +28 -11 # parisc: debuglock fixes # # arch/parisc/kernel/pdc_cons.c # 2004/10/30 02:31:28-07:00 matthew@wil.cx +13 -0 # parisc: debuglock fixes # # ChangeSet # 2004/10/31 15:42:07-08:00 matthew@wil.cx # [PATCH] parisc: spinlock fixes # # - Fix SMP f_list corruption problem. # # This was rather subtle. It turns out that gcc was doing a small # amount of reordering around the file_lock because it doesn't see our # spinlock implementation as being a barrier. To fix this I # # - Added the appropriate barriers to all the spinlocks. # - Removed the atomic opencoded spinlock and redid it as a proper one. # # SMP now seems stable on a 2xA500 and has survived a 10 hour 35 loop # make -j 4 kernel compile without showing any problems (previously, it # usually fell over in the first loop). # # - Since we have one or two users who don't want SMP, make the # code base compile for UP again ... # # - missing parenthesis for pointer dereferencing # # Committed-by: James Bottomley # Committed-by: Thibaut Varene # # include/asm-parisc/system.h # 2004/10/30 02:32:03-07:00 matthew@wil.cx +3 -3 # parisc: spinlock fixes # # include/asm-parisc/spinlock.h # 2004/10/30 02:32:03-07:00 matthew@wil.cx +18 -4 # parisc: spinlock fixes # # include/asm-parisc/bitops.h # 2004/10/30 02:32:02-07:00 matthew@wil.cx +12 -12 # parisc: spinlock fixes # # include/asm-parisc/atomic.h # 2004/10/30 02:32:02-07:00 matthew@wil.cx +21 -31 # parisc: spinlock fixes # # arch/parisc/lib/bitops.c # 2004/10/30 02:31:30-07:00 matthew@wil.cx +12 -12 # parisc: spinlock fixes # # ChangeSet # 2004/10/31 15:41:52-08:00 matthew@wil.cx # [PATCH] parisc: unwind fixes # # - fix unwind table search so it works reliably # - add special case handling for ret_from_kernel_thread and _switch_to_ret # - tidy up the code a bit # - Fix sp falling in an unmapped kernel page # - Sparse annotations # # Committed-by: Randolph Chung # # include/asm-parisc/assembly.h # 2004/10/30 02:32:02-07:00 matthew@wil.cx +6 -4 # parisc: unwind fixes # # arch/parisc/kernel/unwind.c # 2004/10/30 02:31:29-07:00 matthew@wil.cx +84 -34 # parisc: unwind fixes # # ChangeSet # 2004/10/31 15:41:37-08:00 matthew@wil.cx # [PATCH] parisc: arch/parisc/kernel/perf_asm.S # # Indentation and comment cleanup # # Committed-by: Grant Grundler # # arch/parisc/kernel/perf_asm.S # 2004/10/30 02:31:28-07:00 matthew@wil.cx +426 -428 # parisc: arch/parisc/kernel/perf_asm.S # # ChangeSet # 2004/10/31 22:23:36+00:00 rmk@flint.arm.linux.org.uk # [ARM] Remove duplicate includes from ARM files. # # This set of changes came from a larger patch by Adrian Bunk. # # arch/arm/mach-lh7a40x/arch-lpd7a40x.c # 2004/10/31 22:21:08+00:00 rmk@flint.arm.linux.org.uk +0 -1 # [PATCH] remove duplicate includes # # arch/arm/mach-lh7a40x/arch-kev7a400.c # 2004/10/31 22:21:08+00:00 rmk@flint.arm.linux.org.uk +0 -1 # [PATCH] remove duplicate includes # # arch/arm/mach-ixp4xx/common-pci.c # 2004/10/31 22:21:08+00:00 rmk@flint.arm.linux.org.uk +0 -1 # [PATCH] remove duplicate includes # # arch/arm/mach-ixp2000/ixdp2x01.c # 2004/10/31 22:21:08+00:00 rmk@flint.arm.linux.org.uk +0 -3 # [PATCH] remove duplicate includes # # arch/arm/mach-ixp2000/ixdp2x00.c # 2004/10/31 22:21:08+00:00 rmk@flint.arm.linux.org.uk +0 -3 # [PATCH] remove duplicate includes # # arch/arm/mach-ixp2000/ixdp2800.c # 2004/10/31 22:21:07+00:00 rmk@flint.arm.linux.org.uk +0 -3 # [PATCH] remove duplicate includes # # arch/arm/mach-ixp2000/ixdp2400.c # 2004/10/31 22:21:07+00:00 rmk@flint.arm.linux.org.uk +0 -3 # [PATCH] remove duplicate includes # # arch/arm/mach-ixp2000/enp2611.c # 2004/10/31 22:21:07+00:00 rmk@flint.arm.linux.org.uk +0 -3 # [PATCH] remove duplicate includes # # arch/arm/mach-ixp2000/core.c # 2004/10/31 22:21:07+00:00 rmk@flint.arm.linux.org.uk +0 -2 # [PATCH] remove duplicate includes # # arch/arm/mach-iop3xx/iop331-setup.c # 2004/10/31 22:21:07+00:00 rmk@flint.arm.linux.org.uk +0 -1 # [PATCH] remove duplicate includes # # arch/arm/mach-iop3xx/common.c # 2004/10/31 22:21:07+00:00 rmk@flint.arm.linux.org.uk +0 -1 # [PATCH] remove duplicate includes # # ChangeSet # 2004/10/31 21:44:45+00:00 Liam.Girdwood@com.rmk.(none) # [ARM PATCH] 2084/1: PXA SSP, I2S and other misc register defs # # Patch from Liam Girdwood # # Adds some PXA register and bit definitions:- # o SSP ports # o I2S # o AC97_SYSCLK (Mainstone) # o I2C Alternate function and direction # o ASSP and NSSP Clock enables # # Signed-off-by: Liam Girdwood # # # include/asm-arm/arch-pxa/pxa-regs.h # 2004/10/31 01:00:00+01:00 Liam.Girdwood@com.rmk.(none) +147 -7 # [PATCH] 2084/1: PXA SSP, I2S and other misc register defs # # ChangeSet # 2004/10/31 21:36:48+00:00 Liam.Girdwood@com.rmk.(none) # [ARM PATCH] 2085/1: PXA SSP driver # # Patch from Liam Girdwood # # This patch adds support the PXA250, 255, 26x and 27x SSP ports. It # provides a generic core for simple IO-based SSP applications and allows # easy port setup for DMA access. # # Depends on register definitions in patch 2084/1 # # Signed-off-by: Liam Girdwood # # # ChangeSet # 2004/10/31 13:34:11-08:00 davem@nuts.davemloft.net # [SPARC64]: Fix IRQ setting in sunsu serial driver. # # up->irq was just duplicating up->port.irq so # delete the former and only use the latter. We # were not initializing up->port.irq so this would # cause port shutdown crashes when synchronize_irq() # was called. # # Based upon a bug report and patch from # RChan # # Signed-off-by: David S. Miller # # include/asm-arm/arch-pxa/ssp.h # 2004/10/31 01:00:00+01:00 Liam.Girdwood@com.rmk.(none) +47 -0 # [PATCH] 2085/1: PXA SSP driver # # include/asm-arm/arch-pxa/ssp.h # 2004/10/31 01:00:00+01:00 Liam.Girdwood@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-pxa/ssp.h # # drivers/serial/sunsu.c # 2004/10/31 13:33:17-08:00 davem@nuts.davemloft.net +8 -9 # [SPARC64]: Fix IRQ setting in sunsu serial driver. # # arch/arm/mach-pxa/ssp.c # 2004/10/31 01:00:00+01:00 Liam.Girdwood@com.rmk.(none) +319 -0 # [PATCH] 2085/1: PXA SSP driver # # arch/arm/mach-pxa/ssp.c # 2004/10/31 01:00:00+01:00 Liam.Girdwood@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-pxa/ssp.c # # ChangeSet # 2004/10/31 13:24:57-08:00 davem@nuts.davemloft.net # [SPARC64]: Add __must_check to user copy routines. # # Signed-off-by: David S. Miller # # include/asm-sparc64/uaccess.h # 2004/10/31 13:24:26-08:00 davem@nuts.davemloft.net +19 -15 # [SPARC64]: Add __must_check to user copy routines. # # ChangeSet # 2004/10/31 13:20:58-08:00 davem@nuts.davemloft.net # [SPARC64]: Update defconfig. # # arch/sparc64/defconfig # 2004/10/31 13:20:37-08:00 davem@nuts.davemloft.net +35 -12 # [SPARC64]: Update defconfig. # # ChangeSet # 2004/10/31 13:20:32-08:00 davem@nuts.davemloft.net # [SPARC64]: Do free_initmem() poisioning. # # Just like on x86 # # Signed-off-by: David S. Miller # # arch/sparc64/mm/init.c # 2004/10/31 13:19:57-08:00 davem@nuts.davemloft.net +1 -0 # [SPARC64]: Do free_initmem() poisioning. # # ChangeSet # 2004/10/31 21:01:40+00:00 davis_g@com.rmk.(none) # [ARM PATCH] 2181/1: Fix gcc-4.0 static declaration of '__clz_tab' # follows non-static declaration build error # # Patch from George G. Davis # # Building kernels with recent gcc-4.0-20041024 snapshot results in # "static declaration of '__clz_tab' follows non-static declaration" # build error. Since the "extern const UQItype __clz_tab[]" definition # is not required, this patch removes it to fix the build. # # Signed-off-by: George G. Davis # # ChangeSet # 2004/10/31 12:58:51-08:00 torvalds@ppc970.osdl.org # Make sparse pick up the gcc internal include directory automatically. # # m68k used to do this by hand, but it really ends up being needed # for any environment that does cross-builds, so just do it # unconditionally. # # This should mean that you never need to cross-build sparse or # have any other hacks for checking a cross-built environment. # # scripts/Makefile.build # 2004/10/31 12:58:44-08:00 torvalds@ppc970.osdl.org +1 -0 # Make sparse pick up the gcc internal include directory automatically. # # m68k used to do this by hand, but it really ends up being needed # for any environment that does cross-builds, so just do it # unconditionally. # # This should mean that you never need to cross-build sparse or # have any other hacks for checking a cross-built environment. # # arch/m68k/Makefile # 2004/10/31 12:58:44-08:00 torvalds@ppc970.osdl.org +1 -1 # Make sparse pick up the gcc internal include directory automatically. # # m68k used to do this by hand, but it really ends up being needed # for any environment that does cross-builds, so just do it # unconditionally. # # This should mean that you never need to cross-build sparse or # have any other hacks for checking a cross-built environment. # # arch/arm/lib/longlong.h # 2004/10/31 01:00:00+01:00 davis_g@com.rmk.(none) +0 -1 # [PATCH] 2181/1: Fix gcc-4.0 static declaration of '__clz_tab' # follows non-static declaration build error # # ChangeSet # 2004/10/31 20:51:49+00:00 davis_g@com.rmk.(none) # [ARM PATCH] 2179/1: gcc-4.0 static declaration of 'meminfo' follows non- # static declaration build error # # Patch from George G. Davis # # Building kernels with recent gcc-4.0-20041024 snapshot results in # "static declaration of 'meminfo' follows non-static declaration" # build error. Since the "extern struct meminfo meminfo" definition # is not required, this patch removes it to fix the build. # # Signed-off-by: George G. Davis # # include/asm-arm/setup.h # 2004/10/31 01:00:00+01:00 davis_g@com.rmk.(none) +0 -2 # [PATCH] 2179/1: gcc-4.0 static declaration of 'meminfo' follows non- # static declaration build error # # ChangeSet # 2004/10/31 20:42:21+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2178/1: mnfd (move negated) emulation is busted on big- # endian # # Patch from Lennert Buytenhek # # When you issue the mnfd opcode to negate a double, nwfpe is supposed # to flip the most significant bit of your double, which is the sign # bit. However, on big endian systems, it ended up flipping the most # significant bit of the least significant sub-u32, which is one of the # mantissa bits. # # On my system this was manifesting itself as sed regression tests # failing, and ntpd/ntpdate consistently adjusting the system clock # into the wrong direction. # # In pretty much all of NWFPE, doubles are stored in u64s and # manipulations on those doubles are done by using u64 bitops. But # for negation and fabs() it was poking into one of the sub-u32s # directly instead of XORing the u64 with 0x8000000000000000 resp. # ANDing with 0x7fffffffffffffff. # # Since on big-endian, 'native u64 order' means that the most # significant byte (containing bits 63-56) is kept at the lowest # byte address, the sign bit is the MSB of the first sub-u32, # instead of the MSB of the second one as is the case on little # endian. # # Signed-off-by: Lennert Buytenhek # # arch/arm/nwfpe/double_cpdo.c # 2004/10/28 22:04:35+01:00 buytenh@org.rmk.(none) +8 -0 # [PATCH] 2178/1: mnfd (move negated) emulation is busted on big- # endian # # ChangeSet # 2004/10/31 20:33:52+00:00 guido.barzini@com.rmk.(none) # [ARM PATCH] 2177/1: Trivial: contents of mach-h720x/Kconfig should be # conditional on ARCH_H720X # # Patch from G N Barzini # # Currently under "System Type" you are always offered "h720x # Implementations" regardless of the system type selected. The fix for # this in the other Kconfig files seems to be enclose their contents # conditional in 'if ARCH_FOO'/'endif'. This patch does that. # # arch/arm/mach-h720x/Kconfig # 2004/10/28 17:04:00+01:00 guido.barzini@com.rmk.(none) +4 -0 # [PATCH] 2177/1: Trivial: contents of mach-h720x/Kconfig should be # conditional on ARCH_H720X # # ChangeSet # 2004/10/31 20:24:01+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2176/1: S3C2410 - fixes for reset and idle # # Patch from Ben Dooks # # This patch fixes the following problems: # # - panic() in reset should be warning print, so that the # system can then be soft-reset if this ever happens # # - arch_idle() can now be over-ridden for purposes of # implementing dyanmic voltage scaling (DVS) or any # other form of idling # # Signed-off-by: Ben Dooks # # include/asm-arm/arch-s3c2410/system.h # 2004/10/28 16:31:15+01:00 ben-linux@org.rmk.(none) +19 -13 # [PATCH] 2176/1: S3C2410 - fixes for reset and idle # # include/asm-arm/arch-s3c2410/idle.h # 2004/10/28 16:35:12+01:00 ben-linux@org.rmk.(none) +28 -0 # [PATCH] 2176/1: S3C2410 - fixes for reset and idle # # include/asm-arm/arch-s3c2410/idle.h # 2004/10/28 16:35:12+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/idle.h # # ChangeSet # 2004/10/31 20:11:22+00:00 nico@org.rmk.(none) # [ARM PATCH] 2175/1: add reference for problem worked around by patch #1824/1 # # Patch from Nicolas Pitre # # Signed-off-by: Nicolas Pitre # # include/asm-arm/system.h # 2004/10/28 16:48:00+01:00 nico@org.rmk.(none) +1 -0 # [PATCH] 2175/1: add reference for problem worked around by patch #1824/1 # # ChangeSet # 2004/10/31 17:28:05+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] Fix deadlock on removal of 8250 module. # # We must unregister all serial ports before driver_unregister() # can complete. This means that we must unregister all ports in # serial8250_remove, including our legacy ISA ports. We flag this # special cleanup operation by setting serial8250_isa_devs to NULL # and not handling our own platform device any differently from # any others. # # drivers/serial/8250.c # 2004/10/31 17:25:04+00:00 rmk@flint.arm.linux.org.uk +23 -22 # Remove all ports associated with the struct device, even if they're # our legacy ports. Doing otherwise deadlocks driver_unregister(). # Don't re-register 8250 ports if serial8250_isa_devs is NULL. # Set serial8250_isa_devs to NULL before unregistering the driver. # # ChangeSet # 2004/10/31 17:17:41+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] Don't detect console availability using port->ops. # # Use !iobase && !membase rather than !ops for console port # availability. # # drivers/serial/8250.c # 2004/10/31 17:14:08+00:00 rmk@flint.arm.linux.org.uk +3 -3 # Always set up per-port operations for all ports. # Use !iobase && !membase to detect when a port should not be used for # serial console. # # ChangeSet # 2004/10/31 09:03:41-08:00 torvalds@evo.osdl.org # Annotate UP spinlock stubs with lock annotations. # # This way you can do a checking run on UP too - even if the # locks don't actually _matter_, they should still be right, # I'd hope. # # include/linux/spinlock.h # 2004/10/31 09:03:30-08:00 torvalds@evo.osdl.org +24 -6 # Annotate UP spinlock stubs with lock annotations. # # This way you can do a checking run on UP too - even if the # locks don't actually _matter_, they should still be right, # I'd hope. # # ChangeSet # 2004/10/31 08:51:14-08:00 torvalds@ppc970.osdl.org # Lock-annotate some kernel functions as an example of how it works. # # In particular, a function that is called with a lock held, and # releases it only to re-acquire it needs to be annotated as such, # since otherwise sparse will complain about an unexpected unlock, # even though "globally" the lock is constant over the call. # # kernel/resource.c # 2004/10/31 08:51:08-08:00 torvalds@ppc970.osdl.org +2 -0 # Lock-annotate kernel/resource.c # # init/main.c # 2004/10/31 08:51:08-08:00 torvalds@ppc970.osdl.org +1 -0 # Lock-annotate init/main.c # # fs/file.c # 2004/10/31 08:51:08-08:00 torvalds@ppc970.osdl.org +4 -0 # Lock-annotate file.c # # ChangeSet # 2004/10/31 08:38:50-08:00 torvalds@ppc970.osdl.org # Annotate scheduler locking behaviour. # # This annotates the scheduler routines for locking, telling # what locks a function releases or acquires, allowing sparse # to check the lock usage (and documenting it at the same time). # # kernel/sched.c # 2004/10/31 08:38:43-08:00 torvalds@ppc970.osdl.org +19 -2 # Annotate scheduler locking behaviour. # # This annotates the scheduler routines for locking, telling # what locks a function releases or acquires, allowing sparse # to check the lock usage (and documenting it at the same time). # # ChangeSet # 2004/10/31 15:57:40+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250_acpi: Convert to use serial8250_{un,}register_port. # # drivers/serial/8250_acpi.c # 2004/10/31 15:54:22+00:00 rmk@flint.arm.linux.org.uk +29 -45 # Remove tty.h and serial.h includes. # Add 8250.h include. # Convert to use serial8250_{un,}register_port. # # ChangeSet # 2004/10/31 15:44:45+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] Don't use UPF_AUTOPROBE, fix two build problems. # # The curse of the missing __devexit_p() returns, and asm-*/ obviously # marks the end of the comment. # # drivers/serial/8250_pci.c # 2004/10/31 15:36:38+00:00 rmk@flint.arm.linux.org.uk +1 -1 # It's UPF_BOOT_AUTOCONF not UPF_AUTOPROBE. # # drivers/serial/8250_acorn.c # 2004/10/31 15:36:37+00:00 rmk@flint.arm.linux.org.uk +1 -1 # It's UPF_BOOT_AUTOCONF not UPF_AUTOPROBE. # # drivers/serial/8250.c # 2004/10/31 15:36:37+00:00 rmk@flint.arm.linux.org.uk +3 -3 # It's UPF_BOOT_AUTOCONF not UPF_AUTOPROBE. # Ensure __devexit functions are referenced using __devexit_p() # Remove asm-*/ comment terminator. # # ChangeSet # 2004/10/31 15:33:58+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250_pnp: Convert to use serial8250_{un,}register_port. # # drivers/serial/8250_pnp.c # 2004/10/31 15:31:19+00:00 rmk@flint.arm.linux.org.uk +15 -16 # Remove tty.h, serial.h and serialP.h includes. # Convert to use serial8250_{un,}register_port. # # ChangeSet # 2004/10/31 14:48:44+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] serial_cs: Convert to use serial8250_{un,}register_port. # # drivers/serial/serial_cs.c # 2004/10/31 14:46:13+00:00 rmk@flint.arm.linux.org.uk +12 -13 # Remove linux/tty.h, linux/serial.h includes. # Convert to use serial8250_unregister_port/serial8250_register_port. # Always set the ports uartclk setting. # # ChangeSet # 2004/10/31 11:50:55+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: Warn when ports with zero base_baud are registered. # # drivers/serial/8250.c # 2004/10/31 11:46:57+00:00 rmk@flint.arm.linux.org.uk +18 -3 # Warn if a port is registered via register_serial with zero # base_baud. # # ChangeSet # 2004/10/31 10:50:57+00:00 rmk@flint.arm.linux.org.uk # [ARM] riscpc: add iomd, keyboard and acornfb platform devices. # # - Add iomd, keyboard and acornfb platform devices. # - Convert rpckbd to use centrally registered platform device. # - Convert acornfb to use a platform device. # # arch/arm/mach-rpc/riscpc.c # 2004/10/31 10:44:24+00:00 rmk@flint.arm.linux.org.uk +59 -0 # Add iomd, keyboard and acornfb platform devices. # # drivers/input/serio/rpckbd.c # 2004/10/31 10:43:48+00:00 rmk@flint.arm.linux.org.uk +30 -28 # Convert rpckbd to use centrally registered platform device. # # drivers/video/acornfb.c # 2004/10/31 10:40:23+00:00 rmk@flint.arm.linux.org.uk +13 -8 # Convert acornfb to use a platform device. # # ChangeSet # 2004/10/31 10:35:03+00:00 rmk@flint.arm.linux.org.uk # [ARM] No need for rpc_map_io to be public. # # arch/arm/mach-rpc/riscpc.c # 2004/10/31 10:31:39+00:00 rmk@flint.arm.linux.org.uk +2 -2 # No need for rpc_map_io to be public. # # ChangeSet # 2004/10/31 10:05:54+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250_acorn: Convert to use serial8250_{un,}register_port. # # drivers/serial/8250_acorn.c # 2004/10/31 10:02:00+00:00 rmk@flint.arm.linux.org.uk +26 -34 # Update 8250_acorn to use serial8250_register_port and # serial8250_unregister_port. # # ChangeSet # 2004/10/30 20:02:00-07:00 torvalds@ppc970.osdl.org # Add sparse checker rules for conditional lock functions: trylock # and atomic_dec_and_lock. # # This means that we now have all of the spinlock context counting # infrastructure in place, and you can check-compile the kernel with # sparse -Wcontext. # # include/linux/spinlock.h # 2004/10/30 20:01:53-07:00 torvalds@ppc970.osdl.org +12 -13 # Add sparse checker rules for conditional lock functions: trylock # and atomic_dec_and_lock. # # This means that we now have all of the spinlock context counting # infrastructure in place, and you can check-compile the kernel with # sparse -Wcontext. # # include/linux/compiler.h # 2004/10/30 20:01:53-07:00 torvalds@ppc970.osdl.org +2 -0 # Add sparse checker rules for conditional lock functions: trylock # and atomic_dec_and_lock. # # This means that we now have all of the spinlock context counting # infrastructure in place, and you can check-compile the kernel with # sparse -Wcontext. # # ChangeSet # 2004/10/30 19:33:45-07:00 torvalds@ppc970.osdl.org # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # lib/dec_and_lock.c # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +2 -2 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # include/linux/spinlock.h # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +4 -2 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # arch/x86_64/lib/dec_and_lock.c # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +1 -1 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # arch/x86_64/kernel/x8664_ksyms.c # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +1 -1 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # arch/sparc64/lib/dec_and_lock.S # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +2 -2 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # arch/sparc64/kernel/sparc64_ksyms.c # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +1 -1 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # arch/ppc64/lib/dec_and_lock.c # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +2 -2 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # arch/ppc/lib/dec_and_lock.c # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +2 -2 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # arch/mips/lib/dec_and_lock.c # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +2 -2 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # arch/ia64/lib/dec_and_lock.c # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +2 -2 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # arch/i386/lib/dec_and_lock.c # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +1 -1 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # arch/i386/kernel/i386_ksyms.c # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +1 -1 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # arch/alpha/lib/dec_and_lock.c # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +4 -4 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # arch/alpha/kernel/alpha_ksyms.c # 2004/10/30 19:33:38-07:00 torvalds@ppc970.osdl.org +1 -1 # Make "atomic_dec_and_lock()" a macro. # # We rename the actual architecture-specific low-level implementation # to have a prepended underscore: "_atomic_dec_and_lock()". # # This extra macro indirection is so that we can make the macro do # the lock context counting. That will be the next patch. # # ChangeSet # 2004/10/31 02:49:03+02:00 james4765@verizon.net # Re: More patches to arch/sparc/Kconfig [2 of 5] # # Fixes typo in help in openpromfs. # # From: Jim Nelson # Acked-by: William Lee Irwin III # Signed-off-by: Sam Ravnborg # # arch/sparc/Kconfig # 2004/10/19 00:38:05+02:00 james4765@verizon.net +4 -1 # Re: More patches to arch/sparc/Kconfig [2 of 5] # # ChangeSet # 2004/10/31 02:46:14+02:00 james4765@verizon.net # More patches to arch/sparc/Kconfig [4 of 5] # # Makes sun4 default to "N" - most SPARC32 systems did not use these. # # From: Jim Nelson # Acked-by: William Lee Irwin III # Signed-off-by: Sam Ravnborg # # arch/sparc/Kconfig # 2004/10/16 16:09:58+02:00 james4765@verizon.net +1 -0 # More patches to arch/sparc/Kconfig [4 of 5] # # ChangeSet # 2004/10/31 02:45:50+02:00 james4765@verizon.net # More patches to arch/sparc/Kconfig [5 of 5] # # Fixes x86-specific bootloader help in printer config. # # From: Jim Nelson # Acked-by: William Lee Irwin III # Signed-off-by: Sam Ravnborg # # arch/sparc/Kconfig # 2004/10/16 16:15:30+02:00 james4765@verizon.net +3 -3 # More patches to arch/sparc/Kconfig [5 of 5] # # ChangeSet # 2004/10/31 02:45:26+02:00 james4765@verizon.net # More patches to arch/sparc/Kconfig [3 of 5] # # Fixes x86-specific bootloader help in serial console. # # From: Jim Nelson # Acked-by: William Lee Irwin III # Signed-off-by: Sam Ravnborg # # arch/sparc/Kconfig # 2004/10/16 16:18:36+02:00 james4765@verizon.net +3 -3 # More patches to arch/sparc/Kconfig [3 of 5] # # ChangeSet # 2004/10/31 02:45:02+02:00 james4765@verizon.net # Patch to arch/sparc/Kconfig [1 of 5] # # Fixes x86-specific help in SPARC32 SMP support help. # # From: Jim Nelson # Acked-by: William Lee Irwin III # Signed-off-by: Sam Ravnborg # # arch/sparc/Kconfig # 2004/10/16 16:02:11+02:00 james4765@verizon.net +2 -8 # Patch to arch/sparc/Kconfig [1 of 5] # # ChangeSet # 2004/10/31 02:23:45+02:00 sam@mars.ravnborg.org # Do not recompile if localversion changes # # Changing localversion causes a few files to be recompiled, namely those who # include . Replace with in a few places. # Long term solution is to split up in two files. # # Signed-off-by: Sam Ravnborg # # sound/core/info.c # 2004/10/31 02:23:26+02:00 sam@mars.ravnborg.org +2 -2 # Do not use UTS_RELEASE direct - use system_utsname.release # # arch/i386/kernel/traps.c # 2004/10/31 02:23:26+02:00 sam@mars.ravnborg.org +2 -2 # Do not use UTS_RELEASE direct - use system_utsname.release # # arch/i386/kernel/process.c # 2004/10/31 02:23:26+02:00 sam@mars.ravnborg.org +3 -2 # Do not use UTS_RELEASE direct - use system_utsname.release # # ChangeSet # 2004/10/30 20:14:40-04:00 jgarzik@pobox.com # [libata ahci] bump version to 1.00 # # drivers/scsi/ahci.c # 2004/10/30 20:14:34-04:00 jgarzik@pobox.com +1 -1 # [libata ahci] bump version to 1.00 # # ChangeSet # 2004/10/30 20:13:57-04:00 mmelchior@xs4all.nl # [libata ahci] fix rather serious (and/or embarassing) bugs # # - Add definition for SActive register # - Add most interrupt sources to default interrupt mask # - Write low 32 bits of FIS address to PxFB, where they belong # - Set command active bit in PxSACT before setting command issue bit in PxCI # - Announce Sub Class Code in driver info message [IDE, SATA or RAID] # # and additionally, from me [jgarzik]: # - ignore ports-implemented bitmap for now; it's a write-only register # that silly BIOSen initialize incorreclty # # Signed-off-by: Matthijs Melchior # Signed-off-by: Jeff Garzik # # drivers/scsi/ahci.c # 2004/10/30 20:13:51-04:00 mmelchior@xs4all.nl +29 -7 # [libata ahci] fix rather serious (and/or embarassing) bugs # # - Add definition for SActive register # - Add most interrupt sources to default interrupt mask # - Write low 32 bits of FIS address to PxFB, where they belong # - Set command active bit in PxSACT before setting command issue bit in PxCI # - Announce Sub Class Code in driver info message [IDE, SATA or RAID] # # and additionally, from me [jgarzik]: # - ignore ports-implemented bitmap for now; it's a write-only register # that silly BIOSen initialize incorreclty # # Signed-off-by: Matthijs Melchior # Signed-off-by: Jeff Garzik # # ChangeSet # 2004/10/31 02:05:58+02:00 sam@mars.ravnborg.org # kbuild: allow architectures to specify defconfig file with KBUILD_DEFCONFIG # # For some architectures is does not make sense to maintain a single default # configuration - arm is a good example here. # KBUILD_DEFCONFIG is introduced allowing relevant architectures to point out # a configuration kept in arch/$(ARCH)/configs as the configuration # to be used when executing 'make defconfig'. # This patch selects versatile_defconfig as the default configuration for arm. # # The reason to keep defconfig is that is has proved valuable in many testing # scenarios when one are doing a cross architecture build of the kernel to # do a simple compile-time check of some changes. # # Signed-off-by: Sam Ravnborg # # scripts/kconfig/Makefile # 2004/10/31 02:05:38+02:00 sam@mars.ravnborg.org +5 -0 # Introduce support for KBUILD_DEFCONFIG # # arch/arm/Makefile # 2004/10/31 02:05:38+02:00 sam@mars.ravnborg.org +4 -0 # Use versatile_defconfig as default configuration for arm. # # Makefile # 2004/10/31 02:05:38+02:00 sam@mars.ravnborg.org +6 -0 # Introduce KBUILD_DEFCONFIG # # BitKeeper/deleted/.del-defconfig~a0790bbb7ef0057d # 2004/10/31 02:00:22+02:00 sam@mars.ravnborg.org +0 -0 # Delete: arch/arm/defconfig # # ChangeSet # 2004/10/31 01:38:28+02:00 trini@kernel.crashing.org # kbuild: additional warning fixes on Solaris 9 # # A coworker of mine give them a look-over and spotted a few # places where I missed changing some casts. # # Signed-off-by: Tom Rini # Signed-off-by: Sam Ravnborg # # scripts/mod/modpost.c # 2004/10/30 02:00:00+02:00 trini@kernel.crashing.org +1 -1 # kbuild: additional warning fixes on Solaris 9 # # scripts/basic/fixdep.c # 2004/10/30 02:00:00+02:00 trini@kernel.crashing.org +4 -4 # kbuild: additional warning fixes on Solaris 9 # # ChangeSet # 2004/10/31 01:28:31+02:00 sam@mars.ravnborg.org # m32r: misc kbuild cleanups # # o Remove unused LDFLAGS_BLOB assignement (from Brian Gerst) # o Use implicit rule for vmlinux.lds (from Al viro) # # Signed-off-by: Sam Ravnborg # # arch/m32r/boot/compressed/Makefile # 2004/10/31 01:28:12+02:00 sam@mars.ravnborg.org +0 -3 # Use implicit rules to generate vmlinux.lds # # arch/m32r/Makefile # 2004/10/31 01:28:12+02:00 sam@mars.ravnborg.org +0 -1 # Delete unused LDFLAGS_BLOB assignment # # # ChangeSet # 2004/10/31 01:14:43+02:00 kaos@sgi.com # kbuild: Include useful absolute symbols in kallsyms # # Some absolute symbols are useful, they can even appear in back traces. # Tweak kallsyms to retain the useful absolute symbols. # # This list is from ia64, add absolute symbols from other architectures # as required. # # Signed-off-by: Keith Owens # Signed-off-by: Sam Ravnborg # # scripts/kallsyms.c # 2004/10/31 01:12:45+02:00 kaos@sgi.com +11 -1 # kbuild: Include useful absolute symbols in kallsyms # # ChangeSet # 2004/10/30 15:29:58-07:00 torvalds@ppc970.osdl.org # amd8111e network driver: fix silly typo # # That's "cpu", not "cpy". # # drivers/net/amd8111e.c # 2004/10/30 15:29:52-07:00 torvalds@ppc970.osdl.org +1 -1 # amd8111e network driver: fix silly typo # # That's "cpu", not "cpy". # # ChangeSet # 2004/10/31 00:18:21+02:00 bunk@stusta.de # kbuild: Documentation/kbuild/makefiles.txt: check_gcc -> cc-option # # It's not good to show the obsolete check_gcc in an example. # # Signed-off-by: Adrian Bunk # Signed-off-by: Sam Ravnborg # # Documentation/kbuild/makefiles.txt # 2004/10/27 20:03:24+02:00 bunk@stusta.de +9 -7 # kbuild: Documentation/kbuild/makefiles.txt: check_gcc -> cc-option # # ChangeSet # 2004/10/31 00:16:03+02:00 trini@kernel.crashing.org # kconfig: Fix menuconfig on Solaris # # The following two bits are needed to get it working (not as colorful as on # Linux, but it functions) for me. First, unless CURS_MACROS is defined, # scroll(x) doesn't get expanded to wscrl(x, 1). I did some quick # grepping on Cygwin and Linux (debian/unstable) and didn't see # CURS_MACROS show up anywhere else, but to be safe I put it inside of # __sun__. Next this uses libcurses instead of libncurses otherwise we # get a bunch of undefined refs to w32attrset, w32addch, acs32map and few # more. # # Signed-off-by: Tom Rini # Signed-off-by: Sam Ravnborg # # scripts/lxdialog/dialog.h # 2004/10/30 02:00:00+02:00 trini@kernel.crashing.org +3 -0 # kconfig: Fix menuconfig on Solaris # # scripts/lxdialog/Makefile # 2004/10/30 02:00:00+02:00 trini@kernel.crashing.org +4 -0 # kconfig: Fix menuconfig on Solaris # # ChangeSet # 2004/10/30 23:13:48+01:00 rmk@flint.arm.linux.org.uk # Merge flint.arm.linux.org.uk:/usr/src/bk/linux-2.6-undo # into flint.arm.linux.org.uk:/usr/src/bk/linux-2.6-serial # # ChangeSet # 2004/10/31 00:12:39+02:00 dwm@austin.ibm.com # ppc64: install outside of source tree # # Rationale: # When building outside source tree, install.sh is looked for in the # obj side. # # Status: tested on ppc64 builds # # Signed-off-by: Doug Maxey # Signed-off-by: Sam Ravnborg # # arch/ppc64/boot/Makefile # 2004/10/11 21:15:58+02:00 dwm@austin.ibm.com +1 -1 # ppc64: install outside of source tree # # drivers/serial/au1x00_uart.c # 2004/10/30 23:12:12+01:00 rmk@flint.arm.linux.org.uk +0 -0 # Auto merged # # drivers/serial/8250.h # 2004/10/30 23:12:12+01:00 rmk@flint.arm.linux.org.uk +0 -0 # Auto merged # # drivers/serial/8250.c # 2004/10/30 23:12:11+01:00 rmk@flint.arm.linux.org.uk +0 -0 # Auto merged # # ChangeSet # 2004/10/30 22:49:55+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] Undo "get_legacy_serial_ports" patch for PPC. # # This patch conflicts with work to properly integrate the device model # into the serial layer, and provide architectures with a *clean* way # to tell 8250.c about their serial ports at run time. # # drivers/serial/serial_cs.c # 2004/10/30 22:47:22+01:00 rmk@flint.arm.linux.org.uk +2 -1 # Undo "get_legacy_serial_ports" patch. # # drivers/serial/au1x00_uart.c # 2004/10/30 22:47:21+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Undo "get_legacy_serial_ports" patch. # # drivers/serial/8250_pnp.c # 2004/10/30 22:47:21+01:00 rmk@flint.arm.linux.org.uk +2 -1 # Undo "get_legacy_serial_ports" patch. # # drivers/serial/8250_pci.c # 2004/10/30 22:47:21+01:00 rmk@flint.arm.linux.org.uk +2 -2 # Undo "get_legacy_serial_ports" patch. # # drivers/serial/8250.c # 2004/10/30 22:47:20+01:00 rmk@flint.arm.linux.org.uk +12 -23 # Undo "get_legacy_serial_ports" patch. # # drivers/serial/8250.h # 2004/10/30 22:44:05+01:00 rmk@flint.arm.linux.org.uk +0 -0 # Rename: include/linux/8250.h -> drivers/serial/8250.h # # ChangeSet # 2004/10/30 14:39:31-07:00 matthew@wil.cx # [PATCH] kernel-parameters update for PA-RISC # # - Add the PARISC tag (Thibaut Varene) # - Mark some existing PA-RISC specific entries with it (Thibaut Varene) # - Document pdcchassis (Thibaut Varene) # # Documentation/kernel-parameters.txt # 2004/10/30 02:31:21-07:00 matthew@wil.cx +8 -2 # kernel-parameters update for PA-RISC # # ChangeSet # 2004/10/30 14:39:19-07:00 matthew@wil.cx # [PATCH] stifb bugfixes # # - Fix "sti= parameter ignored by stifb" bug (Stuart Brady) # - Fix the STI crash with HCRX-24 in 32bpp mode (Helge Deller) # # drivers/video/stifb.c # 2004/10/30 02:31:49-07:00 matthew@wil.cx +22 -1 # stifb bugfixes # # ChangeSet # 2004/10/30 21:38:06+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: prevent ports with zero clocks being registered. # # drivers/serial/8250.c # 2004/10/30 21:34:54+01:00 rmk@flint.arm.linux.org.uk +3 -0 # Prevent ports with zero uartclks being registered. # # ChangeSet # 2004/10/30 21:27:49+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: add probe and remove device driver methods. # # This change allows platform devices named "serial8250" to provide # lists of serial ports to the 8250 driver at runtime, in addition to # the hard coded table in include/asm-*/serial.h. # # The next step is to deprecate the tables in serial.h. # # include/linux/serial_8250.h # 2004/10/30 21:24:41+01:00 rmk@flint.arm.linux.org.uk +28 -0 # # include/linux/serial_core.h # 2004/10/30 21:24:41+01:00 rmk@flint.arm.linux.org.uk +5 -0 # Add #ifndef...#define...#endif wrapper around serial_core.h # Add linux/tty.h include. # # include/linux/serial_8250.h # 2004/10/30 21:24:41+01:00 rmk@flint.arm.linux.org.uk +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-serial/include/linux/serial_8250.h # # drivers/serial/8250.c # 2004/10/30 21:24:41+01:00 rmk@flint.arm.linux.org.uk +53 -2 # Add platform device driver probe and remove methods. # # ChangeSet # 2004/10/30 21:12:33+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: Add platform device for ISA 8250-compatible devices. # # Add a platform device for ISA 8250-compatible serial devices listed # in the table in include/asm-*/serial.h. Arrange for unregistered # serial devices to be owned by this device. # # This enables power management for ISA 8250 devices, and starts to # opens the way for architectures to dynamically provide their own # lists of 8250 devices via platform device(s). # # drivers/serial/8250.c # 2004/10/30 21:09:25+01:00 rmk@flint.arm.linux.org.uk +25 -8 # Add a platform device for ISA 8250-compatible serial devices listed # in the table in include/asm-*/serial.h. Arrange for unregistered # serial devices to be owned by this device. # # ChangeSet # 2004/10/30 20:53:14+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] Re-order 8250 serial driver initialisation/finalisation. # # Only register the 8250 serial driver with the device model after # registering and setting up our internal uart ports. Do the reverse # on module finalisation. # # drivers/serial/8250.c # 2004/10/30 20:50:10+01:00 rmk@flint.arm.linux.org.uk +9 -7 # Only register the 8250 serial driver with the device model after # registering and setting up our internal uart ports. Do the reverse # on module finalisation. # # ChangeSet # 2004/10/30 20:42:48+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: move basic initialisation of 8250 ports. # # This moves the basic initialisation of 8250 ports from # serial8250_register_ports() into serial8250_isa_init_ports() # # drivers/serial/8250.c # 2004/10/30 20:38:29+01:00 rmk@flint.arm.linux.org.uk +16 -15 # Do basic initialisation of 8250 ports in serial8250_isa_init_ports() # # ChangeSet # 2004/10/30 20:30:13+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: Fix resource handling. # # serial8250_request_std_resource() is now responsible for claiming # the standard resources, _and_ calling ioremap if necessary. # serial8250_release_std_resource() performs the complementary function # in its entirety. # serial8250_*_rsa_resource() perform the similar operations for RSA # ports, with the exception that RSA ports can only be mapped into IO # space. # # drivers/serial/8250.c # 2004/10/30 20:26:38+01:00 rmk@flint.arm.linux.org.uk +69 -90 # Fix resource handling. # serial8250_request_std_resource() is now responsible for claiming # the standard resources, _and_ calling ioremap if necessary. # serial8250_release_std_resource() performs the complementary function # in its entirety. # serial8250_*_rsa_resource() perform the similar operations for RSA # ports, with the exception that RSA ports can only be mapped into IO # space. # # ChangeSet # 2004/10/30 20:19:31+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] Clean up serial_core.c write functions. # # Since the tty layer now takes care of user space writes, # __uart_user_write() and associated temporary buffer and temporary # buffer semaphore have all become unnecessary. There's also little # point in having __uart_kern_write() separate from uart_write(), so # combine the two together. # # Adrian Bunk kindly provided the patch to remove __uart_user_write(). # The rest of the work is rmk's. # # Signed-off-by: Adrian Bunk # Signed-off-by: Russell King # # include/linux/serial_core.h # 2004/10/30 20:17:01+01:00 rmk@flint.arm.linux.org.uk +1 -4 # Remove tmpbuf and tmpbuf_sem. # Increase transmit buffer to one page. # # drivers/serial/serial_core.c # 2004/10/30 20:17:00+01:00 rmk@flint.arm.linux.org.uk +15 -68 # Remove __uart_user_write(). # Combine __uart_kern_write into uart_write(). # Remove "tmpbuf" handling. # # ChangeSet # 2004/10/30 11:34:30-04:00 tobias.lorenz@gmx.net # [libata sata_promise] s/sata/ata/ # # 100% cosmetic: rename various symbols with 'sata' in them to 'ata', # in preparation for addition of support for a PATA controller. # # Signed-off-by: Tobias Lorenz # Signed-off-by: Jeff Garzik # # drivers/scsi/sata_promise.c # 2004/10/30 11:34:24-04:00 tobias.lorenz@gmx.net +24 -24 # [libata sata_promise] s/sata/ata/ # # 100% cosmetic: rename various symbols with 'sata' in them to 'ata', # in preparation for addition of support for a PATA controller. # # Signed-off-by: Tobias Lorenz # Signed-off-by: Jeff Garzik # # ChangeSet # 2004/10/30 16:47:12+02:00 marcel@holtmann.org # [Bluetooth] Add security callback to the core # # To give higher layers like RFCOMM the possibility to use the Bluetooth # security mechanisms, they need a way to get feedback from the HCI core # layer when they succeeded or failed. This patch introduces a callback # structure that can be used for this kind of notification. # # Signed-off-by: Marcel Holtmann # # net/bluetooth/af_bluetooth.c # 2004/10/30 16:42:38+02:00 marcel@holtmann.org +1 -1 # Add security callback to the core # # net/bluetooth/hci_event.c # 2004/10/30 16:42:36+02:00 marcel@holtmann.org +3 -3 # Add security callback to the core # # net/bluetooth/hci_core.c # 2004/10/30 16:42:31+02:00 marcel@holtmann.org +28 -0 # Add security callback to the core # # include/net/bluetooth/hci_core.h # 2004/10/30 16:41:32+02:00 marcel@holtmann.org +46 -0 # Add security callback to the core # # ChangeSet # 2004/10/30 16:34:29+02:00 marcel@holtmann.org # [Bluetooth] Send HCI_Reset for new Microsoft dongle # # The new Microsoft Wireless Transceiver for Bluetooth 2.0 is based on # a Broadcom chip with the HID proxy support. To initialize these kind # of devices correctly it is necessary to send HCI_Reset as the first # command. # # Signed-off-by: Marcel Holtmann # # drivers/bluetooth/hci_usb.c # 2004/10/30 16:30:29+02:00 marcel@holtmann.org +4 -0 # Send HCI_Reset for new Microsoft dongle # # ChangeSet # 2004/10/30 16:16:55+02:00 marcel@holtmann.org # [Bluetooth] Fix deprecated MODULE_PARM for PCCARD drivers # # The MODULE_PARM is deprecated now and for the Bluetooth PCCARD drivers # it should be replaced by module_param() and module_param_array(). # # Signed-off-by: Marcel Holtmann # # drivers/bluetooth/btuart_cs.c # 2004/10/30 16:15:26+02:00 marcel@holtmann.org +4 -3 # Fix deprecated MODULE_PARM for PCCARD drivers # # drivers/bluetooth/bt3c_cs.c # 2004/10/30 16:15:20+02:00 marcel@holtmann.org +4 -3 # Fix deprecated MODULE_PARM for PCCARD drivers # # drivers/bluetooth/bluecard_cs.c # 2004/10/30 16:15:15+02:00 marcel@holtmann.org +5 -3 # Fix deprecated MODULE_PARM for PCCARD drivers # # drivers/bluetooth/dtl1_cs.c # 2004/10/30 16:14:52+02:00 marcel@holtmann.org +4 -3 # Fix deprecated MODULE_PARM for PCCARD drivers # # ChangeSet # 2004/10/30 15:12:10+01:00 rmk@flint.arm.linux.org.uk # [ARM] Add __iomem annotations to ARM amba drivers. # # include/asm-arm/hardware/amba_clcd.h # 2004/10/30 15:09:16+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Add __iomem to amba drivers. # # drivers/serial/amba-pl011.c # 2004/10/30 15:09:16+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Add __iomem to amba drivers. # # drivers/mmc/mmci.h # 2004/10/30 15:09:16+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Add __iomem to amba drivers. # # drivers/mmc/mmci.c # 2004/10/30 15:09:16+01:00 rmk@flint.arm.linux.org.uk +6 -6 # Add __iomem to amba drivers. # # arch/arm/common/amba.c # 2004/10/30 15:09:15+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Add __iomem to amba drivers. # # ChangeSet # 2004/10/30 15:06:53+01:00 rmk@flint.arm.linux.org.uk # [ARM] s3c2410: DMA uses __iomem pointers. # # include/asm-arm/arch-s3c2410/dma.h # 2004/10/30 15:03:56+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Mark "regs" as a void __iomem pointer. # # arch/arm/mach-s3c2410/dma.c # 2004/10/30 15:03:56+01:00 rmk@flint.arm.linux.org.uk +3 -3 # Add __iomem annotations. # Don't cast dma_base. # Use '%p' to display iomem pointers. # # ChangeSet # 2004/10/30 14:53:00+01:00 rmk@flint.arm.linux.org.uk # [ARM] Add initial __iomem annotations to ARM io.h headers. # # include/asm-arm/io.h # 2004/10/30 14:49:41+01:00 rmk@flint.arm.linux.org.uk +23 -23 # __raw_{read,write}s[bwl] takes void __iomem * for port address. # Use __force for __raw_{read,write}[bwl] casts. # __ioremap / __iounmap returns/takes void __iomem pointer. # # include/asm-arm/arch-versatile/io.h # 2004/10/30 14:49:41+01:00 rmk@flint.arm.linux.org.uk +3 -3 # Don't cast memory addresses to unsigned long. # Cast IO addresses to void __iomem pointers. # # include/asm-arm/arch-shark/io.h # 2004/10/30 14:49:41+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Add missing parens. # # include/asm-arm/arch-sa1100/io.h # 2004/10/30 14:49:41+01:00 rmk@flint.arm.linux.org.uk +3 -3 # Don't cast memory addresses to unsigned long. # Cast IO addresses to void __iomem pointers. # # include/asm-arm/arch-rpc/io.h # 2004/10/30 14:49:40+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Don't cast memory addresses to unsigned long. # # include/asm-arm/arch-pxa/io.h # 2004/10/30 14:49:40+01:00 rmk@flint.arm.linux.org.uk +3 -3 # Don't cast memory addresses to unsigned long. # Cast IO addresses to void __iomem pointers. # # include/asm-arm/arch-omap/io.h # 2004/10/30 14:49:40+01:00 rmk@flint.arm.linux.org.uk +3 -3 # Don't cast memory addresses to unsigned long. # Cast IO addresses to void __iomem pointers. # # include/asm-arm/arch-lh7a40x/io.h # 2004/10/30 14:49:40+01:00 rmk@flint.arm.linux.org.uk +3 -3 # Don't cast memory addresses to unsigned long. # Cast IO addresses to void __iomem pointers. # # include/asm-arm/arch-l7200/io.h # 2004/10/30 14:49:40+01:00 rmk@flint.arm.linux.org.uk +3 -3 # Don't cast memory addresses to unsigned long. # Cast IO addresses to void __iomem pointers. # # include/asm-arm/arch-ixp4xx/io.h # 2004/10/30 14:49:40+01:00 rmk@flint.arm.linux.org.uk +5 -5 # Don't cast memory addresses to unsigned long. # Add __iomem annotation to __ixp4xx_io{re,un}map() return value. # # include/asm-arm/arch-ixp2000/io.h # 2004/10/30 14:49:40+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Don't cast memory addresses to unsigned long. # # include/asm-arm/arch-iop3xx/io.h # 2004/10/30 14:49:39+01:00 rmk@flint.arm.linux.org.uk +3 -3 # Don't cast memory addresses to unsigned long. # Cast IO addresses to void __iomem pointers. # # include/asm-arm/arch-integrator/io.h # 2004/10/30 14:49:39+01:00 rmk@flint.arm.linux.org.uk +3 -3 # Cast IO addresses to void __iomem pointers. # Don't cast PCI memory addresses. # Add PCI memory base address to ISA memory addresses. # # include/asm-arm/arch-imx/io.h # 2004/10/30 14:49:39+01:00 rmk@flint.arm.linux.org.uk +2 -2 # Cast IO addresses to void __iomem pointers. # # include/asm-arm/arch-h720x/io.h # 2004/10/30 14:49:39+01:00 rmk@flint.arm.linux.org.uk +2 -2 # Cast IO addresses to void __iomem pointers. # # include/asm-arm/arch-epxa10db/io.h # 2004/10/30 14:49:39+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Cast IO addresses to void __iomem pointers. # # include/asm-arm/arch-ebsa285/io.h # 2004/10/30 14:49:39+01:00 rmk@flint.arm.linux.org.uk +11 -9 # Cast IO addresses to void __iomem. # Don't cast PCI mem addresses. # Add PCIMEM_BASE to ISA mem addresses. # # include/asm-arm/arch-ebsa110/io.h # 2004/10/30 14:49:39+01:00 rmk@flint.arm.linux.org.uk +8 -8 # __{read,write}[bwl] take __iomem void pointers. # ioremap returns a void __iomem pointer. # # include/asm-arm/arch-clps711x/io.h # 2004/10/30 14:49:39+01:00 rmk@flint.arm.linux.org.uk +3 -3 # Don't cast memory addresses to unsigned long. # Cast port IO addresses to void __iomem. # # arch/arm/mm/ioremap.c # 2004/10/30 14:49:38+01:00 rmk@flint.arm.linux.org.uk +3 -3 # Add __iomem annotations for ioremap. # # arch/arm/mach-ebsa110/io.c # 2004/10/30 14:49:38+01:00 rmk@flint.arm.linux.org.uk +30 -28 # Add __iomem annotations to ebsa110 IO functions. # # ChangeSet # 2004/10/30 09:00:43-04:00 rddunlap@osdl.org # [PATCH] via-rhine: references __init code during resume # # Fix __init section usage: # rhine_resume calls enable_mmio, so latter cannot be __devinit; # Error: ./drivers/net/via-rhine.o .text refers to 0000000000000925 R_X86_64_PC32 # .init.text+0xfffffffffffffffc # # Signed-off-by: Randy Dunlap # Signed-off-by: Jeff Garzik # # drivers/net/via-rhine.c # 2004/10/22 13:10:59-04:00 rddunlap@osdl.org +1 -1 # via-rhine: references __init code during resume # # ChangeSet # 2004/10/30 08:46:14-04:00 nacc@us.ibm.com # [PATCH] scsi/ahci: replace schedule_timeout() with msleep()/ssleep() # # Description: Uses msleep() / ssleep() [as appropriate] instead of # schedule_timeout() to guarantee the task delays as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Jeff Garzik # # drivers/scsi/ahci.c # 2004/10/22 18:20:02-04:00 nacc@us.ibm.com +3 -6 # scsi/ahci: replace schedule_timeout() with msleep()/ssleep() # # ChangeSet # 2004/10/30 13:41:58+01:00 rmk@flint.arm.linux.org.uk # [ARM] etherh: add __iomem annotations. # # ChangeSet # 2004/10/30 08:40:28-04:00 benh@kernel.crashing.org # [PATCH] amd8111e: Add support for ppc64 eval board # # This patch adds a few memory barriers, cleans up a little bit the # use of the "status" field in the rx & tx routines, and adds probing # for the external PHY to the driver. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Jeff Garzik # # drivers/net/amd8111e.h # 2004/10/22 20:01:07-04:00 benh@kernel.crashing.org +2 -1 # amd8111e 2/2 : Add support for ppc64 eval board # # drivers/net/amd8111e.c # 2004/10/22 20:11:39-04:00 benh@kernel.crashing.org +69 -40 # amd8111e 2/2 : Add support for ppc64 eval board # # ChangeSet # 2004/10/30 08:40:18-04:00 benh@kernel.crashing.org # [PATCH] amd8111e: Fix identation of amd8111e_rx_poll() # # This patch does an indentation fix to amd8111e_rx_poll() which was # incorrectly shifting left in the middle of a while() loop, thus # rendering the function difficult to read. There is no actual code # change. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Jeff Garzik # # drivers/net/amd8111e.c # 2004/10/22 19:59:44-04:00 benh@kernel.crashing.org +75 -76 # amd8111e 1/2 : Fix identation of amd8111e_rx_poll() # # drivers/net/arm/etherh.c # 2004/10/30 13:38:56+01:00 rmk@flint.arm.linux.org.uk +30 -25 # Add __iomem annotations. # # ChangeSet # 2004/10/30 08:30:59-04:00 sfeldma@pobox.com # [PATCH] e100: update maintainer # # My intel.com address will bounce. # # Signed-off-by: Scott Feldman # Signed-off-by: Jeff Garzik # # MAINTAINERS # 2004/10/24 14:50:17-04:00 sfeldma@pobox.com +2 -2 # e100: update maintainer # # ChangeSet # 2004/10/30 08:18:20-04:00 nico@cam.org # [PATCH] fix smc91x compilation error # # It looks like this bit got mismerged (pci.h removed but DMA arguments # convertion missing). # # Signed-off-by: Nicolas Pitre # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.h # 2004/10/23 14:49:44-04:00 nico@cam.org +2 -2 # fix smc91x compilation error # # ChangeSet # 2004/10/30 07:59:58-04:00 rmk+lkml@arm.linux.org.uk # [PATCH] 8390.c: Use mdelay(10) rather than udelay(10*1000) # # ARM udelay can't cope with >2ms delays. # # Signed-off-by: Russell King # Signed-off-by: Jeff Garzik # # drivers/net/8390.c # 2004/10/23 07:36:34-04:00 rmk+lkml@arm.linux.org.uk +1 -1 # 8390.c: Use mdelay(10) rather than udelay(10*1000) # # ChangeSet # 2004/10/30 12:53:44+01:00 rmk@flint.arm.linux.org.uk # [ARM] etherh: report errors when trying to parse MAC address. # # drivers/net/arm/etherh.c # 2004/10/30 12:51:13+01:00 rmk@flint.arm.linux.org.uk +15 -1 # Report errors when trying to parse mac address. # # ChangeSet # 2004/10/30 12:45:34+01:00 rmk@flint.arm.linux.org.uk # [ARM] etherh: add ethtool support. # # drivers/net/arm/etherh.c # 2004/10/30 12:42:58+01:00 rmk@flint.arm.linux.org.uk +81 -15 # Add ethtool support. # Convert card-specific port caps to ethool caps. # # ChangeSet # 2004/10/29 22:20:12-07:00 greg@kroah.com # USB: fix up serial object reference count bug on error path. # # Thanks to Chris Rankin for pointing this out. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/usb-serial.c # 2004/10/29 22:19:43-07:00 greg@kroah.com +4 -5 # USB: fix up serial object reference count bug on error path. # # Thanks to Chris Rankin for pointing this out. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/29 14:53:12-07:00 chrisw@osdl.org # [PATCH] uninline __sigqueue_alloc # # Christoph suggests letting the compiler choose. No real compelling reason # to inline anyhow. I had some vmlinux size numbers suggesting inline was # better, but re-running them on newer kernel is giving different results, # favoring uninline. Best let compiler choose. Un-inline __sigqueue_alloc. # # Signed-off-by: Chris Wright # Signed-off-by: Linus Torvalds # # kernel/signal.c # 2004/10/22 14:00:00-07:00 chrisw@osdl.org +1 -1 # uninline __sigqueue_alloc # # ChangeSet # 2004/10/29 13:50:26-07:00 torvalds@ppc970.osdl.org # Make x86 semaphore routines use register calling convention. # # This avoids a bug where the compiler would overwrite the # stackframe that the caller also considered to be a register # save area. # # It also shrinks the code segment by a tiny amount by moving # the failure case argument setup into the slow path. This not # only makes the fast path smaller, but it makes it easier on # gcc (gcc is not very good at generating code that uses fixed # register names). # # include/linux/spinlock.h # 2004/10/29 13:50:19-07:00 torvalds@ppc970.osdl.org +1 -1 # Make x86 semaphore routines use register calling convention. # # include/asm-i386/semaphore.h # 2004/10/29 13:50:19-07:00 torvalds@ppc970.osdl.org +23 -19 # Make x86 semaphore routines use register calling convention. # # arch/i386/kernel/semaphore.c # 2004/10/29 13:50:19-07:00 torvalds@ppc970.osdl.org +7 -11 # Make x86 semaphore routines use register calling convention. # # ChangeSet # 2004/10/29 13:28:35-07:00 james4765@gmail.com # [PATCH] Documentation/mkdev.ida removal # # This file is no longer reqired - the MAKEDEV program makes the ida/ nodes # automatically. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/00-INDEX # 2004/10/29 01:14:37-07:00 james4765@gmail.com +0 -2 # Documentation/mkdev.ida removal # # BitKeeper/deleted/.del-mkdev.ida~147ecc5c6ea7ec58 # 2004/10/29 13:28:28-07:00 james4765@gmail.com +0 -0 # Delete: Documentation/mkdev.ida # # ChangeSet # 2004/10/29 13:28:22-07:00 james4765@gmail.com # [PATCH] Documentation/cpqarray.txt update # # General cleanup of Documentation/cpqarray.txt. Removal of old and obsolete # references, removed references to an external patch. # # Signed-off-by: James Nelson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/cpqarray.txt # 2004/10/29 01:14:36-07:00 james4765@gmail.com +22 -32 # Documentation/cpqarray.txt update # # ChangeSet # 2004/10/29 13:28:10-07:00 marcel@holtmann.org # [PATCH] Fix deprecated MODULE_PARM for CAPI subsystem # # The MODULE_PARM is deprecated now and should be replaced by module_param() # or module_param_named(). # # Signed-off-by: Marcel Holtmann # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/capi/kcapi.c # 2004/10/29 01:14:36-07:00 marcel@holtmann.org +2 -1 # Fix deprecated MODULE_PARM for CAPI subsystem # # drivers/isdn/capi/capidrv.c # 2004/10/29 01:14:36-07:00 marcel@holtmann.org +2 -1 # Fix deprecated MODULE_PARM for CAPI subsystem # # drivers/isdn/capi/capi.c # 2004/10/29 01:14:36-07:00 marcel@holtmann.org +4 -3 # Fix deprecated MODULE_PARM for CAPI subsystem # # ChangeSet # 2004/10/29 13:27:57-07:00 akpm@osdl.org # [PATCH] convert pipefs to fs_initcall() # # Normal initcalls which call out to userspace may need to create pipes. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/pipe.c # 2004/10/29 01:14:36-07:00 akpm@osdl.org +2 -2 # convert pipefs to fs_initcall() # # ChangeSet # 2004/10/29 13:27:45-07:00 rml@novell.com # [PATCH] make dnotify a configure-time option # # make dnotify configurable, via CONFIG_DNOTIFY. CONFIG_EMBEDDED is required # for disabling dnotify. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sysctl.c # 2004/10/29 01:14:03-07:00 rml@novell.com +2 -0 # make dnotify a configure-time option # # include/linux/fs.h # 2004/10/29 01:14:03-07:00 rml@novell.com +7 -1 # make dnotify a configure-time option # # include/linux/dnotify.h # 2004/10/29 01:14:03-07:00 rml@novell.com +41 -5 # make dnotify a configure-time option # # fs/Makefile # 2004/10/29 01:14:03-07:00 rml@novell.com +7 -6 # make dnotify a configure-time option # # fs/Kconfig # 2004/10/29 01:14:08-07:00 rml@novell.com +11 -0 # make dnotify a configure-time option # # Documentation/dnotify.txt # 2004/10/29 01:14:03-07:00 rml@novell.com +6 -0 # make dnotify a configure-time option # # ChangeSet # 2004/10/29 13:27:32-07:00 dan@debian.org # [PATCH] Unwind information fix for the vsyscall DSO # # When working on GDB support I found a typo. I assume the comment is # correct. If you step to this particular instruction and backtrace, GDB # gets lost. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/vsyscall-sysenter.S # 2004/10/29 01:13:42-07:00 dan@debian.org +1 -1 # Unwind information fix for the vsyscall DSO # # ChangeSet # 2004/10/29 13:27:20-07:00 dtor_core@ameritech.net # [PATCH] ik8.c: export power_status parameter through sysfs # # I8K: Switch to using module_param, allow switching 'power_status' through # sysfs. # # Signed-off-by: Dmitry Torokhov # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/i8k.c # 2004/10/29 01:13:42-07:00 dtor_core@ameritech.net +9 -7 # ik8.c: export power_status parameter through sysfs # # Documentation/kernel-parameters.txt # 2004/10/29 01:13:42-07:00 dtor_core@ameritech.net +8 -0 # ik8.c: export power_status parameter through sysfs # # ChangeSet # 2004/10/29 13:27:07-07:00 adaplas@hotpop.com # [PATCH] fbdev: Maintainership # # Accepted Geert's offer to maintain the framebuffer layer. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/10/29 01:13:42-07:00 adaplas@hotpop.com +3 -3 # fbdev: Maintainership # # ChangeSet # 2004/10/29 13:26:54-07:00 adaplas@hotpop.com # [PATCH] fbdev: Check if cursor image has changed in intelfb # # Check if cursor image has changed in intelfb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/intelfb/intelfbdrv.c # 2004/10/29 01:13:42-07:00 adaplas@hotpop.com +1 -1 # fbdev: Check if cursor image has changed in intelfb # # ChangeSet # 2004/10/29 13:26:42-07:00 adaplas@hotpop.com # [PATCH] fbdev: Add __iomem annotations to vfb # # Add __iomem annotations to vfb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/vfb.c # 2004/10/29 01:13:42-07:00 adaplas@hotpop.com +1 -1 # fbdev: Add __iomem annotations to vfb # # ChangeSet # 2004/10/29 13:26:29-07:00 adaplas@hotpop.com # [PATCH] fbdev: Add __iomem annotations to cirrusfb # # Add __iomem annotations to cirrusfb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/cirrusfb.c # 2004/10/29 01:13:42-07:00 adaplas@hotpop.com +12 -12 # fbdev: Add __iomem annotations to cirrusfb # # ChangeSet # 2004/10/29 13:26:17-07:00 adaplas@hotpop.com # [PATCH] fbdev: Add __iomem annotations to hgafb # # Add __iomem annotations to hgafb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/hgafb.c # 2004/10/29 01:13:42-07:00 adaplas@hotpop.com +10 -8 # fbdev: Add __iomem annotations to hgafb # # ChangeSet # 2004/10/29 13:26:05-07:00 adaplas@hotpop.com # [PATCH] fbdev: Add __iomem annotations to pm2fb # # Add __iomem annotations to pm2fb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/pm2fb.c # 2004/10/29 01:13:41-07:00 adaplas@hotpop.com +10 -9 # fbdev: Add __iomem annotations to pm2fb # # ChangeSet # 2004/10/29 13:25:52-07:00 adaplas@hotpop.com # [PATCH] fbdev: Add __iomem annotations to cyber2000fb # # Add __iomem annotations to cyber2000fb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/cyber2000fb.h # 2004/10/29 01:13:41-07:00 adaplas@hotpop.com +2 -2 # fbdev: Add __iomem annotations to cyber2000fb # # drivers/video/cyber2000fb.c # 2004/10/29 01:13:41-07:00 adaplas@hotpop.com +2 -2 # fbdev: Add __iomem annotations to cyber2000fb # # ChangeSet # 2004/10/29 13:25:40-07:00 adaplas@hotpop.com # [PATCH] fbdev: Do not memset the framebuffer memory in asiliantfb # # Do not memset the framebuffer memory in asiliantfb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/asiliantfb.c # 2004/10/29 01:13:41-07:00 adaplas@hotpop.com +0 -3 # fbdev: Do not memset the framebuffer memory in asiliantfb # # ChangeSet # 2004/10/29 13:25:28-07:00 adaplas@hotpop.com # [PATCH] fbdev: Add __iomem annotations to tdfxfb # # Add __iomem annotations to tdfxfb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/video/tdfx.h # 2004/10/29 01:13:41-07:00 adaplas@hotpop.com +1 -1 # fbdev: Add __iomem annotations to tdfxfb # # ChangeSet # 2004/10/29 13:25:15-07:00 adaplas@hotpop.com # [PATCH] fbdev: Add __iomem annotations to sstfb # # Add __iomem annotations to sstfb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/video/sstfb.h # 2004/10/29 01:13:40-07:00 adaplas@hotpop.com +7 -4 # fbdev: Add __iomem annotations to sstfb # # drivers/video/sstfb.c # 2004/10/29 01:13:41-07:00 adaplas@hotpop.com +15 -19 # fbdev: Add __iomem annotations to sstfb # # ChangeSet # 2004/10/29 13:25:03-07:00 adaplas@hotpop.com # [PATCH] fbdev: Fix io access in neofb # # - Fix IO access in neofb # - Use readl/writel # - add __iomem annotations # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/video/neomagic.h # 2004/10/29 01:13:40-07:00 adaplas@hotpop.com +2 -2 # fbdev: Fix io access in neofb # # drivers/video/neofb.c # 2004/10/29 01:13:41-07:00 adaplas@hotpop.com +42 -42 # fbdev: Fix io access in neofb # # ChangeSet # 2004/10/29 13:24:51-07:00 adaplas@hotpop.com # [PATCH] fbdev: Convert MODULE_PARM to module_param in neofb # # Convert MODULE_PARM to module_param in neofb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/neofb.c # 2004/10/29 01:39:56-07:00 adaplas@hotpop.com +6 -6 # fbdev: Convert MODULE_PARM to module_param in neofb # # ChangeSet # 2004/10/29 13:24:38-07:00 adaplas@hotpop.com # [PATCH] fbdev: Convert MODULE_PARM to module_param in intelfb # # fbdev: Convert MODULE_PARM to module_param in intelfb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/intelfb/intelfbdrv.c # 2004/10/29 01:39:55-07:00 adaplas@hotpop.com +1 -1 # fbdev: Convert MODULE_PARM to module_param in intelfb # # drivers/video/intelfb/intelfb.h # 2004/10/29 01:13:40-07:00 adaplas@hotpop.com +3 -3 # fbdev: Convert MODULE_PARM to module_param in intelfb # # ChangeSet # 2004/10/29 13:24:26-07:00 adaplas@hotpop.com # [PATCH] fbdev: Remove module parameter 'disabled' from savagefb # # Remove module parameter 'disabled' from savagefb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/savage/savagefb.c # 2004/10/29 01:13:40-07:00 adaplas@hotpop.com +0 -2 # fbdev: Remove module parameter 'disabled' from savagefb # # ChangeSet # 2004/10/29 13:24:13-07:00 adaplas@hotpop.com # [PATCH] fbdev: Convert MODULE_PARM to module_param in i810fb # # Convert MODULE_PARM to module_param in i810fb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/i810/i810_main.c # 2004/10/29 01:13:40-07:00 adaplas@hotpop.com +15 -15 # fbdev: Convert MODULE_PARM to module_param in i810fb # # ChangeSet # 2004/10/29 13:24:01-07:00 sct@redhat.com # [PATCH] ext3: online resizing # # The patch below adds online resize capability to ext3 based on Andreas # patch for 2.4 and fixed up by Stephen. # # The patch also removes s_debts: # # s_debts is currently not used by ext3 (it is created, destroyed and checked # but never set). Remove it for now. # # Resurrecting this will require adding it back in changed form. In existing # form it's already unsafe wrt. byte-tearing as it performs unlocked byte # increment/decrement on words which may be being accessed simultaneously on # other CPUs. It is also the only in-memory dynamic table which needs to be # extended by online-resize, so locking it will require care. # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/ext3_jbd.h # 2004/10/29 01:13:40-07:00 sct@redhat.com +6 -1 # ext3: online resizing # # include/linux/ext3_fs_sb.h # 2004/10/29 01:13:40-07:00 sct@redhat.com +0 -1 # ext3: online resizing # # include/linux/ext3_fs.h # 2004/10/29 01:13:40-07:00 sct@redhat.com +37 -1 # ext3: online resizing # # fs/ext3/super.c # 2004/10/29 01:13:40-07:00 sct@redhat.com +31 -22 # ext3: online resizing # # fs/ext3/resize.c # 2004/10/29 01:13:40-07:00 sct@redhat.com +996 -0 # ext3: online resizing # # fs/ext3/ioctl.c # 2004/10/29 01:13:40-07:00 sct@redhat.com +45 -0 # ext3: online resizing # # fs/ext3/inode.c # 2004/10/29 01:13:40-07:00 sct@redhat.com +3 -0 # ext3: online resizing # # fs/ext3/ialloc.c # 2004/10/29 01:13:40-07:00 sct@redhat.com +0 -2 # ext3: online resizing # # fs/ext3/balloc.c # 2004/10/29 01:13:40-07:00 sct@redhat.com +34 -14 # ext3: online resizing # # fs/ext3/Makefile # 2004/10/29 01:13:40-07:00 sct@redhat.com +1 -1 # ext3: online resizing # # fs/ext3/resize.c # 2004/10/29 01:13:40-07:00 sct@redhat.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/fs/ext3/resize.c # # ChangeSet # 2004/10/29 13:23:48-07:00 akpm@osdl.org # [PATCH] ext3 reservation: default to on # # Enable the reservation code by default. So reservations default to "on". # They can be disabled by mounting with the "noreservation" mount option. # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/ext3/super.c # 2004/10/29 01:39:57-07:00 akpm@osdl.org +2 -0 # ext3 reservation: default to on # # ChangeSet # 2004/10/29 13:23:35-07:00 cmm@us.ibm.com # [PATCH] ext3 block reservations # # rbtree implementation and other changes From: Stephen Tweedie # contributions From: Badari Pulavarty and probably me. # # This is the ext3 block reservation patch. It improves the layout of ext3 # files by establishing, for each inode, reserved areas of the disk in which # only that file can allocate blocks. Those reserved areas are managed in an # rbtree, via the in-core inode. # # It's a bit like ext2 preallocation only stronger in that it can span # already-allocated blocks, including the per-blockgroup inode tables and # bitmaps. # # The patch fixes ext3's worst performance problem: disastrous layout when # multiple files are being concurrently grown. # # It increases the size of the inode by rather a lot. A todo item is to # dynamically allocate the `struct reserve_window_node', so we don't need to # carry this storage for inodes which aren't opened for writing. # # The feature is enabled by mounting with the "reservation" mount option. # Reservations default to "off". # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/ext3_fs_sb.h # 2004/10/29 01:39:57-07:00 cmm@us.ibm.com +6 -0 # ext3 block reservations # # include/linux/ext3_fs_i.h # 2004/10/29 01:13:39-07:00 cmm@us.ibm.com +22 -1 # ext3 block reservations # # include/linux/ext3_fs.h # 2004/10/29 01:39:57-07:00 cmm@us.ibm.com +30 -20 # ext3 block reservations # # fs/ext3/super.c # 2004/10/29 01:39:58-07:00 cmm@us.ibm.com +27 -8 # ext3 block reservations # # fs/ext3/ioctl.c # 2004/10/29 01:39:57-07:00 cmm@us.ibm.com +24 -0 # ext3 block reservations # # fs/ext3/inode.c # 2004/10/29 01:39:57-07:00 cmm@us.ibm.com +8 -12 # ext3 block reservations # # fs/ext3/ialloc.c # 2004/10/29 01:39:57-07:00 cmm@us.ibm.com +5 -0 # ext3 block reservations # # fs/ext3/file.c # 2004/10/29 01:13:40-07:00 cmm@us.ibm.com +4 -0 # ext3 block reservations # # fs/ext3/balloc.c # 2004/10/29 01:39:57-07:00 cmm@us.ibm.com +709 -61 # ext3 block reservations # # ChangeSet # 2004/10/29 13:23:23-07:00 cmm@us.ibm.com # [PATCH] ext3 block reservation patch set -- ext3 preallocation cleanup # # Cleans up the old ext3 preallocation code carried from ext2 but turned off. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/ext3_fs_i.h # 2004/10/29 01:39:58-07:00 cmm@us.ibm.com +0 -4 # ext3 block reservation patch set -- ext3 preallocation cleanup # # include/linux/ext3_fs.h # 2004/10/29 01:39:58-07:00 cmm@us.ibm.com +1 -8 # ext3 block reservation patch set -- ext3 preallocation cleanup # # fs/ext3/xattr.c # 2004/10/29 01:13:39-07:00 cmm@us.ibm.com +1 -2 # ext3 block reservation patch set -- ext3 preallocation cleanup # # fs/ext3/inode.c # 2004/10/29 01:39:58-07:00 cmm@us.ibm.com +1 -90 # ext3 block reservation patch set -- ext3 preallocation cleanup # # fs/ext3/ialloc.c # 2004/10/29 01:39:58-07:00 cmm@us.ibm.com +0 -4 # ext3 block reservation patch set -- ext3 preallocation cleanup # # fs/ext3/file.c # 2004/10/29 01:39:58-07:00 cmm@us.ibm.com +0 -2 # ext3 block reservation patch set -- ext3 preallocation cleanup # # fs/ext3/balloc.c # 2004/10/29 01:39:58-07:00 cmm@us.ibm.com +1 -2 # ext3 block reservation patch set -- ext3 preallocation cleanup # # ChangeSet # 2004/10/29 13:23:10-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: fix mainline lazyness about TTY layer patch # # While changing the TTY layer, an API parameter was removed, so it was # removed by almost all calls, changing their prototype. But one use of one # such function was not updated, breaking UML compilation. This is the fix. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/drivers/ssl.c # 2004/10/29 01:13:39-07:00 blaisorblade_spam@yahoo.it +1 -1 # uml: fix mainline lazyness about TTY layer patch # # ChangeSet # 2004/10/29 13:22:58-07:00 takata@linux-m32r.org # [PATCH] m32r: fix a typo of delay.c # # This patch fixes a typo of arch/m32r/lib/delay.c. It is required to fix a # compile error for non-CONFIG_ISA_DUAL_ISSUE configuration. # # NOTE: # # The m32r has a kind of ISA (instruction set architecture) like a 2-way # VLIW. Originally the m32r has two types of 16-bit/32-bit instructions. # Only 16-bit instruction pair can be executed in parallel on a m32r chip # with dual issuing support (e.g. M32700). # # According to the insturction dual issuing of the m32r, a # programmer/compiler can explicitly put two 16-bit instructions into an # instruction word, which are to be executed in parallel. # # ex. Assembly coding style of two 16-bit instruncions; insn A and B: # # 1) insn A # insn B ; sequential execution (implicit) # # 2) insn A -> insn B ; sequential execution (explicit) # # 3) insn A || insn B ; parallel execution # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/lib/delay.c # 2004/10/29 01:13:39-07:00 takata@linux-m32r.org +1 -1 # m32r: fix a typo of delay.c # # ChangeSet # 2004/10/29 13:22:45-07:00 ak@muc.de # [PATCH] x86_64: Fix warning in genapic # # Straightforward patch to remove a warning in genapic about a unused # function. # # Independently done by Chris Wright too. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/genapic_cluster.c # 2004/10/29 01:13:39-07:00 ak@muc.de +0 -8 # x86_64: Fix warning in genapic # # ChangeSet # 2004/10/29 13:22:31-07:00 ak@muc.de # [PATCH] x86_64: Fix safe_smp_processor_id after genapic # # genapic broke early safe_smp_processor_id(), especially when you got a # WARN_ON or oops early it would loops forever in show_trace. The reason was # that the x86_cpu_to_apicid array wasn't correctly initialized. # # This patch fixes this by just testing for this case. # # Orginally from James Cleverdon # Acked-by: Andi Kleen # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/smp.h # 2004/10/29 01:13:38-07:00 ak@muc.de +5 -0 # x86_64: Fix safe_smp_processor_id after genapic # # ChangeSet # 2004/10/29 13:22:19-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Enable maple IDE fixup # # Now that pci_get_legacy_ide_irq() support has been merged, it's time to # enable use of it by the Maple platform code. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/maple_setup.c # 2004/10/29 01:13:38-07:00 benh@kernel.crashing.org +0 -2 # ppc64: Enable maple IDE fixup # # ChangeSet # 2004/10/29 13:22:06-07:00 olof@austin.ibm.com # [PATCH] ppc64: setup cpu_sibling_map on iSeries # # Nathan Lynch pointed this out: The CPU sibling map is never initialized on # iSeries. This makes the scheduler very unhappy if CONFIG_SCHED_SMT is # enabled, causing an oops in find_busiest_group during boot. # # Below patch adds the expected init. # # Signed-off-by: Olof Johansson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/iSeries_smp.c # 2004/10/29 01:13:38-07:00 olof@austin.ibm.com +1 -0 # ppc64: setup cpu_sibling_map on iSeries # # ChangeSet # 2004/10/29 13:21:54-07:00 sfr@canb.auug.org.au # [PATCH] ppc64 iSeries: fix for generic irq changes # # The generic irq patches broke pci irqs on ppc64 iSeries. # # Signed-off-by: Stephen Rothwell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/iSeries_irq.c # 2004/10/29 01:13:38-07:00 sfr@canb.auug.org.au +1 -0 # ppc64 iSeries: fix for generic irq changes # # ChangeSet # 2004/10/29 13:21:40-07:00 benh@kernel.crashing.org # [PATCH] ppc32: Fix boot on PowerMac # # Tom's recent irq patch broke PowerMac (and possibly others). I think he # forgot that PReP, CHRP and PowerMac are all built together in a single # kernel image, thus all of those arch_initcall's will end up beeing called, # even on the wrong machine... # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/i8259.c # 2004/10/29 01:13:38-07:00 benh@kernel.crashing.org +6 -0 # ppc32: Fix boot on PowerMac # # arch/ppc/platforms/prep_setup.c # 2004/10/29 01:13:38-07:00 benh@kernel.crashing.org +3 -0 # ppc32: Fix boot on PowerMac # # arch/ppc/platforms/chrp_setup.c # 2004/10/29 01:13:38-07:00 benh@kernel.crashing.org +3 -0 # ppc32: Fix boot on PowerMac # # ChangeSet # 2004/10/29 13:21:27-07:00 mporter@kernel.crashing.org # [PATCH] ppc32: fix ppc4xx_progress warnings # # The patch fixes these warnings by doing two things: # 1) Add the argument to the printk. # 2) Rearrange the ifdef to eliminate the unused variable # and function warnings. # # Signed-off-by: Scott Anderson # Signed-off-by: Matt Porter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/ppc4xx_setup.c # 2004/10/29 01:13:38-07:00 mporter@kernel.crashing.org +7 -3 # ppc32: fix ppc4xx_progress warnings # # ChangeSet # 2004/10/29 13:21:14-07:00 akpm@osdl.org # [PATCH] swapper_space warning suppression # # Suppress page allocation warnings arising from radix_tree_node_alloc() # allocations on behalf of swapper_space: these are expected under heavy load. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/swap_state.c # 2004/10/29 01:13:38-07:00 akpm@osdl.org +1 -1 # swapper_space warning suppression # # ChangeSet # 2004/10/29 13:21:00-07:00 akpm@osdl.org # [PATCH] key_init ordering fix # # The data structures which are set up by key_init() are used by exec(). And # we're using exec() super-early via the hotplug events from # do_basic_setup():driver_init(). # # So call key_init() directly, prior to driver_init(). # # Cc: David S. Miller # Cc: David Howells # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/keys/key.c # 2004/10/29 01:13:37-07:00 akpm@osdl.org +2 -9 # key_init ordering fix # # init/main.c # 2004/10/29 01:13:37-07:00 akpm@osdl.org +2 -1 # key_init ordering fix # # include/linux/key.h # 2004/10/29 01:13:37-07:00 akpm@osdl.org +2 -0 # key_init ordering fix # # ChangeSet # 2004/10/29 13:20:47-07:00 pavel@ucw.cz # [PATCH] Add typechecking to suspend types and powerdown types # # This adds typechecking to suspend types and powerdown types. This should # solve at least part of suspend type confusion. There should be no code # changes generated by this one. # # Acked-by: Patrick Mochel # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/power/main.c # 2004/10/29 01:13:37-07:00 pavel@ucw.cz +6 -6 # Add typechecking to suspend types and powerdown types # # kernel/power/disk.c # 2004/10/29 01:13:37-07:00 pavel@ucw.cz +3 -2 # Add typechecking to suspend types and powerdown types # # include/linux/pm.h # 2004/10/29 01:13:38-07:00 pavel@ucw.cz +18 -20 # Add typechecking to suspend types and powerdown types # # drivers/acpi/sleep/main.c # 2004/10/29 01:13:37-07:00 pavel@ucw.cz +3 -3 # Add typechecking to suspend types and powerdown types # # arch/arm/mach-sa1100/pm.c # 2004/10/29 01:13:37-07:00 pavel@ucw.cz +3 -3 # Add typechecking to suspend types and powerdown types # # arch/arm/mach-pxa/pm.c # 2004/10/29 01:13:37-07:00 pavel@ucw.cz +3 -3 # Add typechecking to suspend types and powerdown types # # ChangeSet # 2004/10/29 13:20:35-07:00 iwamoto@valinux.co.jp # [PATCH] direct IO write memory leak fix # # It seems that O_DIRECT write sometimes leaks memory. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/direct-io.c # 2004/10/29 01:13:37-07:00 iwamoto@valinux.co.jp +3 -1 # direct IO write memory leak fix # # ChangeSet # 2004/10/29 20:59:55+01:00 rmk@flint.arm.linux.org.uk # [ARM] Fix wrong variable name in icside.c # # drivers/ide/arm/icside.c # 2004/10/29 20:57:11+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Fix wrong variable name. # # ChangeSet # 2004/10/29 20:47:54+01:00 rmk@flint.arm.linux.org.uk # [ARM] include/asm-arm/arch-integrator/time.h is unused, remove it. # # BitKeeper/deleted/.del-time.h~7e1812b6aba3e687 # 2004/10/29 20:23:42+01:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-integrator/time.h # # ChangeSet # 2004/10/29 20:13:08+01:00 rmk@flint.arm.linux.org.uk # [ARM] Remove extraneous spaces. # # arch/arm/kernel/bios32.c # 2004/10/29 20:10:23+01:00 rmk@flint.arm.linux.org.uk +4 -4 # Remove extraneous spaces. # # ChangeSet # 2004/10/29 19:49:16+01:00 rmk@flint.arm.linux.org.uk # [ARM] Add disable_irq_nosync() and CPU number headings # # include/asm-arm/irq.h # 2004/10/29 19:46:28+01:00 rmk@flint.arm.linux.org.uk +1 -2 # Add disable_irq_nosync() prototype. # # arch/arm/kernel/irq.c # 2004/10/29 19:46:28+01:00 rmk@flint.arm.linux.org.uk +39 -4 # Rename disable_irq() to disable_irq_nosync() # Add disable_irq() which uses synchronize_irq() # Add CPU number headings as per x86. # # ChangeSet # 2004/10/29 18:35:40+02:00 bzolnier@trik.(none) # [ide] ide-disk: enable stroke by default # # From: Jens Axboe # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/29 18:34:09+02:00 bzolnier@trik.(none) +0 -1 # [ide] ide-disk: enable stroke by default # # drivers/ide/ide.c # 2004/10/29 18:34:09+02:00 bzolnier@trik.(none) +1 -4 # [ide] ide-disk: enable stroke by default # # drivers/ide/ide-disk.c # 2004/10/29 18:34:09+02:00 bzolnier@trik.(none) +0 -3 # [ide] ide-disk: enable stroke by default # # Documentation/ide.txt # 2004/10/29 18:34:09+02:00 bzolnier@trik.(none) +0 -7 # [ide] ide-disk: enable stroke by default # # ChangeSet # 2004/10/29 18:21:50+02:00 bzolnier@trik.(none) # [ide] make destroy_proc_ide_interfaces static # # destroy_proc_ide_interfaces is only used inside ide-proc.c; # so lets make it static. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-proc.c # 2004/10/29 13:12:33+02:00 bzolnier@trik.(none) +1 -3 # [ide] make destroy_proc_ide_interfaces static # # ChangeSet # 2004/10/29 16:34:00+01:00 rmk@flint.arm.linux.org.uk # [ARM] Use cpu_vm_mask to determine whether to flush TLB/caches. # # Since bit 0 is only set when the MM is mapped onto the CPU, we can use # this rather than comparing the MM pointer with current->active_mm. # This simplifies the inline cache flushing and tlb code. # # include/asm-arm/tlbflush.h # 2004/10/29 16:31:17+01:00 rmk@flint.arm.linux.org.uk +2 -2 # Use cpu_vm_mask to determine whether to flush TLB entries for this MM. # # include/asm-arm/cacheflush.h # 2004/10/29 16:31:17+01:00 rmk@flint.arm.linux.org.uk +3 -3 # Use cpu_vm_mask to determine whether to flush caches for this MM. # # ChangeSet # 2004/10/29 17:07:55+02:00 bzolnier@trik.(none) # [ide] kill IDEPCI_FLAG_FORCE_MASTER # # cs5530 overrides hwif->autodma anyway. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/28 22:28:16+02:00 bzolnier@trik.(none) +1 -3 # [ide] kill IDEPCI_FLAG_FORCE_MASTER # # drivers/ide/setup-pci.c # 2004/10/28 22:28:16+02:00 bzolnier@trik.(none) +2 -7 # [ide] kill IDEPCI_FLAG_FORCE_MASTER # # drivers/ide/pci/cs5530.c # 2004/10/28 22:28:15+02:00 bzolnier@trik.(none) +0 -1 # [ide] kill IDEPCI_FLAG_FORCE_MASTER # # ChangeSet # 2004/10/29 16:05:26+01:00 rmk@flint.arm.linux.org.uk # [ARM] Use cpu_vm_mask to indicate whether the MM is mapped. # # ChangeSet # 2004/10/29 17:03:09+02:00 bzolnier@trik.(none) # [ide] setup-pci: simplify autodma logic # # Do not set hwif->autodma in ide_pci_setup_ports(). # All DMA capable PCI host drivers override it. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/29 02:49:39+02:00 bzolnier@trik.(none) +1 -1 # [ide] setup-pci: simplify autodma logic # # drivers/ide/setup-pci.c # 2004/10/29 02:49:39+02:00 bzolnier@trik.(none) +5 -17 # [ide] setup-pci: simplify autodma logic # # drivers/ide/pci/cs5520.c # 2004/10/29 02:49:39+02:00 bzolnier@trik.(none) +1 -1 # [ide] setup-pci: simplify autodma logic # # include/asm-arm/mmu_context.h # 2004/10/29 16:02:09+01:00 rmk@flint.arm.linux.org.uk +5 -6 # Manipulate cpu_vm_mask according to whether the mm is mapped or not. # # ChangeSet # 2004/10/29 17:00:16+02:00 bzolnier@trik.(none) # [ide] setup-pci: small ide_get_or_set_dma_base() cleanup # # * hwif->dma_base is set in ->init_iops() for MMIO # * if !dma_base then dma_base is really equal to zero # * remove dead code from simplex check # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/setup-pci.c # 2004/10/29 16:59:56+02:00 bzolnier@trik.(none) +5 -20 # [ide] setup-pci: small ide_get_or_set_dma_base() cleanup # # ChangeSet # 2004/10/29 16:52:32+02:00 bzolnier@trik.(none) # [ide] pmac: kill CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO # # DMA is always used by default (->autodma is never checked). # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ppc/pmac.c # 2004/10/29 02:16:36+02:00 bzolnier@trik.(none) +0 -7 # [ide] pmac: kill CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO # # drivers/ide/Kconfig # 2004/10/29 02:16:36+02:00 bzolnier@trik.(none) +1 -12 # [ide] pmac: kill CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO # # ChangeSet # 2004/10/29 16:49:20+02:00 bzolnier@trik.(none) # [ide] hpt34x: kill hpt34x.h # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/hpt34x.c # 2004/10/29 01:54:34+02:00 bzolnier@trik.(none) +14 -3 # [ide] hpt34x: kill hpt34x.h # # BitKeeper/deleted/.del-hpt34x.h~28b22a2b22be8c55 # 2004/10/29 16:49:01+02:00 bzolnier@trik.(none) +0 -0 # Delete: drivers/ide/pci/hpt34x.h # # ChangeSet # 2004/10/29 16:45:17+02:00 bzolnier@trik.(none) # [ide] remove hwif from /proc/ide/ as part of ide_unregister_hwif() # # Original patch from Mark Lord . # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/29 16:44:48+02:00 bzolnier@trik.(none) +2 -1 # [ide] remove hwif from /proc/ide/ as part of ide_unregister_hwif() # # drivers/ide/ide.c # 2004/10/29 16:44:48+02:00 bzolnier@trik.(none) +1 -3 # [ide] remove hwif from /proc/ide/ as part of ide_unregister_hwif() # # drivers/ide/ide-proc.c # 2004/10/29 16:44:48+02:00 bzolnier@trik.(none) +12 -9 # [ide] remove hwif from /proc/ide/ as part of ide_unregister_hwif() # # ChangeSet # 2004/10/29 16:24:59+02:00 bzolnier@trik.(none) # [ide] PIO bugfix # # We need to k[un]map_atomic() the current page not the first page # of the scatterlist segment. Fixes OOPS when using HIGHMEM. # # Big thanks to Randy Dunlap for a lot of debugging/testing. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-taskfile.c # 2004/10/29 01:45:36+02:00 bzolnier@trik.(none) +8 -2 # [ide] PIO bugfix # # ChangeSet # 2004/10/29 10:05:12+01:00 aia21@cantab.net # NTFS: Remove unused function fs/ntfs/runlist.c::ntfs_rl_merge(). (Adrian Bunk) # # Signed-off-by: Adrian Bunk # Signed-off-by: Anton Altaparmakov # # fs/ntfs/runlist.c # 2004/10/29 10:05:03+01:00 aia21@cantab.net +0 -24 # Remove unused function ntfs_rl_merge(). (Adrian Bunk) # # fs/ntfs/ChangeLog # 2004/10/29 10:05:03+01:00 aia21@cantab.net +7 -1 # Update # # ChangeSet # 2004/10/29 01:37:24-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-ref # into intel.com:/home/lenb/src/26-latest-dev # # arch/i386/kernel/acpi/boot.c # 2004/10/29 01:37:16-04:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/10/29 01:37:16-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/29 01:06:32-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # drivers/pnp/pnpbios/rsparser.c # 2004/10/29 01:06:25-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/pnp/isapnp/core.c # 2004/10/29 01:06:25-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/pnp/interface.c # 2004/10/29 01:06:24-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/29 01:02:04-04:00 len.brown@intel.com # [PNP] handler more than 16 IRQs # # Signed-off-by: David Shaohua Li # Signed-off-by: Len Brown # # include/linux/pnp.h # 2004/09/27 22:13:47-04:00 len.brown@intel.com +2 -1 # Import patch irq256.patch # # drivers/pnp/resource.c # 2004/09/27 22:13:28-04:00 len.brown@intel.com +2 -2 # Import patch irq256.patch # # drivers/pnp/quirks.c # 2004/09/27 22:13:09-04:00 len.brown@intel.com +5 -2 # Import patch irq256.patch # # drivers/pnp/pnpbios/rsparser.c # 2004/09/27 22:12:00-04:00 len.brown@intel.com +4 -1 # Import patch irq256.patch # # drivers/pnp/manager.c # 2004/09/27 22:12:50-04:00 len.brown@intel.com +8 -2 # Import patch irq256.patch # # drivers/pnp/isapnp/core.c # 2004/09/27 22:11:44-04:00 len.brown@intel.com +3 -1 # Import patch irq256.patch # # drivers/pnp/interface.c # 2004/09/27 22:12:22-04:00 len.brown@intel.com +3 -3 # Import patch irq256.patch # # ChangeSet # 2004/10/28 16:36:02-07:00 akpm@osdl.org # [NETFILTER]: Avoid warning on CONNTRACK_STAT_INC in destroy_conntrack() # # From: Rusty Russell # # ip_conntrack_put can be called in any context in theory: in particular, # MASQUERADE will can call it (via ip_ct_selective_cleanup) when an interface # comes up with a different address. # # Move the CONNTRACK_STAT_INC inside the lock: it needs preemption disabled. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/10/28 16:35:43-07:00 akpm@osdl.org +1 -1 # [NETFILTER]: Avoid warning on CONNTRACK_STAT_INC in destroy_conntrack() # # From: Rusty Russell # # ip_conntrack_put can be called in any context in theory: in particular, # MASQUERADE will can call it (via ip_ct_selective_cleanup) when an interface # comes up with a different address. # # Move the CONNTRACK_STAT_INC inside the lock: it needs preemption disabled. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/28 16:34:53-07:00 akpm@osdl.org # [X25]: Dont log unknown frame type when receiving clear confirm # # From: Andrew Hendry # # There is no need to log unknown # # net/x25/x25_dev.c # 2004/10/28 16:34:34-07:00 akpm@osdl.org +3 -1 # [X25]: Dont log unknown frame type when receiving clear confirm # # From: Andrew Hendry # # There is no need to log unknown # # ChangeSet # 2004/10/28 16:33:54-07:00 akpm@osdl.org # [X25]: Stop /proc/net/x25/route infinitely reading # # From: Andrew Hendry # # route add --x25 0/0 eth0 # cat /proc/net/x25/route # reads the single routing entry forever. # # This patch makes x25_get_route_idx behave the same as x25_get_socket_idx # which works correctly. # # Signed-off-by: Andrew Hendry # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/x25/x25_proc.c # 2004/10/28 16:33:35-07:00 akpm@osdl.org +4 -3 # [X25]: Stop /proc/net/x25/route infinitely reading # # From: Andrew Hendry # # route add --x25 0/0 eth0 # cat /proc/net/x25/route # reads the single routing entry forever. # # This patch makes x25_get_route_idx behave the same as x25_get_socket_idx # which works correctly. # # Signed-off-by: Andrew Hendry # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/28 16:33:01-07:00 akpm@osdl.org # [ETHERTAP]: Add missing newline to debug printk # # From: Andrew Hendry # # Very trivial, ethertap debug missing a newline. # # Signed-off-by: Andrew Hendry # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # drivers/net/ethertap.c # 2004/10/28 16:32:42-07:00 akpm@osdl.org +1 -1 # [ETHERTAP]: Add missing newline to debug printk # # From: Andrew Hendry # # Very trivial, ethertap debug missing a newline. # # Signed-off-by: Andrew Hendry # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/28 16:31:53-07:00 akpm@osdl.org # [X25]: Stop x25_destroy_socket timer looping # # From: Andrew Hendry # # The sk_timer.data for the x.25 destroy_socket timer went missing at some # stage, causing a timer loop where x25_destroy_socket would keep setting up # timers to call itself. This patch puts the sk_timer.data back. # # Signed-off-by: Andrew Hendry # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/x25/af_x25.c # 2004/10/28 16:31:34-07:00 akpm@osdl.org +1 -0 # [X25]: Stop x25_destroy_socket timer looping # # From: Andrew Hendry # # The sk_timer.data for the x.25 destroy_socket timer went missing at some # stage, causing a timer loop where x25_destroy_socket would keep setting up # timers to call itself. This patch puts the sk_timer.data back. # # Signed-off-by: Andrew Hendry # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/28 16:31:02-07:00 davem@nuts.davemloft.net # [TG3]: Bump driver version and reldate # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/10/28 16:30:19-07:00 davem@nuts.davemloft.net +2 -2 # # ChangeSet # 2004/10/28 16:29:43-07:00 akpm@osdl.org # [TG3]: Use mmiowb in tg3_poll # # From: # # Returning from tg3_poll() without flushing the PIO write which reenables # interrupts can result in lower cpu utilization and higher throughput. So # use a memory barrier, mmiowb(), instead of flushing the write with a PIO # read. # # Signed-off-by: Arthur Kepner # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/10/28 16:29:24-07:00 akpm@osdl.org +15 -1 # [TG3]: Use mmiowb in tg3_poll # # From: # # Returning from tg3_poll() without flushing the PIO write which reenables # interrupts can result in lower cpu utilization and higher throughput. So # use a memory barrier, mmiowb(), instead of flushing the write with a PIO # read. # # Signed-off-by: Arthur Kepner # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/28 16:28:59-07:00 akpm@osdl.org # [TG3]: Use mmiowb in tg3.c # # From: Jesse Barnes # # This patch originally from Greg Banks. Some parts of the tg3 driver depend # on PIO writes arriving in order. This patch ensures that in two key places # using the new mmiowb macro. This not only prevents bugs (the queues can be # corrupted), but is much faster than ensuring ordering using PIO reads # (which involve a few round trips to the target bus on some platforms). # # Arthur has another patch that uses mmiowb in tg3 that he posted earlier as # well. # # Signed-off-by: Greg Banks # Signed-off-by: Jesse Barnes # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/10/28 16:28:40-07:00 akpm@osdl.org +2 -0 # [TG3]: Use mmiowb in tg3.c # # From: Jesse Barnes # # This patch originally from Greg Banks. Some parts of the tg3 driver depend # on PIO writes arriving in order. This patch ensures that in two key places # using the new mmiowb macro. This not only prevents bugs (the queues can be # corrupted), but is much faster than ensuring ordering using PIO reads # (which involve a few round trips to the target bus on some platforms). # # Arthur has another patch that uses mmiowb in tg3 that he posted earlier as # well. # # Signed-off-by: Greg Banks # Signed-off-by: Jesse Barnes # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/28 16:24:01-07:00 davem@nuts.davemloft.net # [VLAN]: Revert vlan_dev_hard_start_xmit part of Ben Greear's changes # # They are questionable at best. Based upon commentary # by Tommy Christensen. # # Signed-off-by: David S. Miller # # net/8021q/vlan_dev.c # 2004/10/28 16:23:09-07:00 davem@nuts.davemloft.net +5 -18 # [VLAN]: Revert vlan_dev_hard_start_xmit part of Ben Greear's changes # # ChangeSet # 2004/10/28 16:20:35-07:00 ak@muc.de # [PATCH] Fix x86-64 genapic build # # The x86-64 genapic patch that was recently merged missed some definitions # and doesn't compile at all. # # This fixes it by adding the missing defines for genapic # # Signed-off-by: Andi Kleen # Signed-off-by: Linus Torvalds # # include/asm-x86_64/apicdef.h # 2004/10/16 01:30:51-07:00 ak@muc.de +3 -0 # Fix x86-64 genapic build # # ChangeSet # 2004/10/28 16:20:25-07:00 trini@kernel.crashing.org # [PATCH] Fix ppc32 compile # # D'oh. Something got cut-off there on Randy's end. Obviously correct # fix follows. # # Signed-off-by: Tom Rini # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/prep_setup.c # 2004/10/28 13:55:20-07:00 trini@kernel.crashing.org +2 -1 # Fix ppc32 compile # # ChangeSet # 2004/10/28 12:58:55-07:00 olh@suse.de # [PATCH] rmmod ohci1394 hangs # # this sequence of commands will hang the final rmmod. # # init=/bin/bash --login # mount proc # modprove -v ohci1394 # rmmod ohci1394 # modprobe -v ohci1394 # rmmod ohci1394 -> hangs # # knodemgrd_0 exits on the first rmmod, but leaves nodemgr_serialize in down # state. # # This fixes it for me. # # Signed-off-by: Olaf Hering # Acked-by: Ben Collins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/ieee1394/nodemgr.c # 2004/10/28 12:46:54-07:00 olh@suse.de +6 -2 # rmmod ohci1394 hangs # # ChangeSet # 2004/10/28 12:12:11-07:00 wensong@linux-vs.org # [IPVS]: Update version to 1.2.1 # # Signed-off-by: David S. Miller # # include/net/ip_vs.h # 2004/10/28 12:11:52-07:00 wensong@linux-vs.org +1 -1 # [IPVS]: Update version to 1.2.1 # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/28 12:11:00-07:00 torvalds@ppc970.osdl.org # Merge http://lia64.bkbits.net/linux-ia64-release-2.6.10 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # include/asm-ia64/io.h # 2004/10/28 12:10:56-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/10/28 14:53:23-03:00 acme@conectiva.com.br # [SKBUFF] introduce x25_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signet-off-by: David S. Miller # # include/net/x25device.h # 2004/10/28 14:53:08-03:00 acme@conectiva.com.br +17 -0 # [SKBUFF] introduce x25_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signet-off-by: David S. Miller # # drivers/net/wan/x25_asy.c # 2004/10/28 14:53:08-03:00 acme@conectiva.com.br +5 -13 # [SKBUFF] introduce x25_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signet-off-by: David S. Miller # # drivers/net/wan/lapbether.c # 2004/10/28 14:53:08-03:00 acme@conectiva.com.br +5 -15 # [SKBUFF] introduce x25_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signet-off-by: David S. Miller # # drivers/net/wan/hdlc_x25.c # 2004/10/28 14:53:08-03:00 acme@conectiva.com.br +4 -10 # [SKBUFF] introduce x25_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signet-off-by: David S. Miller # # drivers/net/wan/cycx_x25.c # 2004/10/28 14:53:08-03:00 acme@conectiva.com.br +3 -5 # [SKBUFF] introduce x25_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signet-off-by: David S. Miller # # drivers/isdn/i4l/isdn_x25iface.c # 2004/10/28 14:53:08-03:00 acme@conectiva.com.br +4 -12 # [SKBUFF] introduce x25_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signet-off-by: David S. Miller # # include/net/x25device.h # 2004/10/28 14:53:08-03:00 acme@conectiva.com.br +0 -0 # BitKeeper file /home/acme/bk/sk_buff-2.6/include/net/x25device.h # # ChangeSet # 2004/10/28 14:50:55-03:00 acme@conectiva.com.br # [SKBUFF] remove skb->mac.raw setting after hdlc_type_trans # # Arnaldo Carvalho de Melo : # [dscc4.c sets skb->mac.raw after hdlc_type_trans] # # >> Francois, is this really what is intended? I left it as # # # In the pre-eth_type_trans area, yes :o/ I did not test dscc4 in # a bridged setup. Please fix the driver in your patch. # # # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: Francois Romieu # Signed-off-by: David S. Miller # # drivers/net/wan/dscc4.c # 2004/10/28 14:50:41-03:00 acme@conectiva.com.br +0 -1 # [SKBUFF] remove skb->mac.raw setting after hdlc_type_trans # # Arnaldo Carvalho de Melo : # [dscc4.c sets skb->mac.raw after hdlc_type_trans] # # >> Francois, is this really what is intended? I left it as # # # In the pre-eth_type_trans area, yes :o/ I did not test dscc4 in # a bridged setup. Please fix the driver in your patch. # # # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: Francois Romieu # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/28 10:07:59-07:00 sfr@canb.auug.org.au # [PATCH] ppc64 iSeries pci cleanups # # This merges two files (iSeries_IoMmTable.[ch]) into iSeries_pci.c. This # allowed quite a few more things to become declared static. # # It then does some fairly mechanical cleanups in iSeries_pci.c (replacing # studly caps, removing the last of the PCIFR() macros and removing a # couple of empty or unused routines). There are no semantic changes. # # Signed-off-by: Stephen Rothwell # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/iSeries_pci.c # 2004/10/27 01:43:41-07:00 sfr@canb.auug.org.au +138 -49 # ppc64 iSeries pci cleanups # # arch/ppc64/kernel/Makefile # 2004/10/27 21:50:05-07:00 sfr@canb.auug.org.au +1 -2 # ppc64 iSeries pci cleanups # # BitKeeper/deleted/.del-iSeries_IoMmTable.h~e27021ebd5cdd3ee # 2004/10/28 10:07:52-07:00 sfr@canb.auug.org.au +0 -0 # Delete: arch/ppc64/kernel/iSeries_IoMmTable.h # # BitKeeper/deleted/.del-iSeries_IoMmTable.c~60ca6231a8780121 # 2004/10/28 10:07:52-07:00 sfr@canb.auug.org.au +0 -0 # Delete: arch/ppc64/kernel/iSeries_IoMmTable.c # # ChangeSet # 2004/10/28 09:31:02-07:00 martin.wilck@fujitsu-siemens.com # [PATCH] skip sync_arb_IDs on P4/Xeon # # The "Synchronize Arbitration IDs with APIC IDs" IPI does not make sense # on Pentium 4 and Xeon because they don't have an APIC bus where # arbitration IDs would be needed. # # The Intel Developers manual (Vol. 3, Ch. 8.6.1) says this IPI is # unsupported on P4/Xeon. Using it may, according to Intel, lead to # unpredictable results. # # Signed-off-by: Martin Wilck # Signed-off-by: Linus Torvalds # # arch/i386/kernel/apic.c # 2004/10/26 05:18:47-07:00 martin.wilck@fujitsu-siemens.com +4 -0 # skip sync_arb_IDs on P4/Xeon # # ChangeSet # 2004/10/28 09:14:32-07:00 stelian@popies.net # [PATCH] sonypi: bump up the version number # # Signed-off-by: Stelian Pop # Signed-off-by: Linus Torvalds # # drivers/char/sonypi.h # 2004/10/28 02:20:55-07:00 stelian@popies.net +1 -1 # sonypi: bump up the version number # # ChangeSet # 2004/10/28 09:14:19-07:00 stelian@popies.net # [PATCH] sonypi: whitespace and coding style fixes # # Signed-off-by: Stelian Pop # Signed-off-by: Linus Torvalds # # include/linux/sonypi.h # 2004/10/28 02:18:59-07:00 stelian@popies.net +8 -8 # sonypi: whitespace and coding style fixes # # drivers/char/sonypi.h # 2004/10/28 02:18:59-07:00 stelian@popies.net +9 -9 # sonypi: whitespace and coding style fixes # # drivers/char/sonypi.c # 2004/10/28 02:18:59-07:00 stelian@popies.net +155 -130 # sonypi: whitespace and coding style fixes # # ChangeSet # 2004/10/28 09:14:07-07:00 stelian@popies.net # [PATCH] sonypi: don't suppose the bluetooth subsystem is initialy off # # Leave the choice to the user. # # Signed-off-by: Stelian Pop # Signed-off-by: Linus Torvalds # # drivers/char/sonypi.c # 2004/10/28 02:13:37-07:00 stelian@popies.net +1 -1 # sonypi: don't suppose the bluetooth subsystem is initialy off # # ChangeSet # 2004/10/28 09:13:54-07:00 stelian@popies.net # [PATCH] sonypi: make CONFIG_SONYPI depend on CONFIG_INPUT # # Signed-off-by: Stelian Pop # Signed-off-by: Linus Torvalds # # drivers/char/Kconfig # 2004/10/28 02:09:18-07:00 stelian@popies.net +1 -1 # sonypi: make CONFIG_SONYPI depend on CONFIG_INPUT # # ChangeSet # 2004/10/28 09:13:42-07:00 stelian@popies.net # [PATCH] sonypi: rework input support # # * feed most of special keys through the input subsystem # * initialize two separate input devices: a mouse like one for # the jogdial and a keyboard like one for the special keys # * add support for SONYPI_EVENT_FNKEY_RELEASED # # Many people participated in a way or another to this patch, # including Daniel K. , Bastien Nocera , # Dmitry Torokhov and Vojtech Pavlik . # # Signed-off-by: Stelian Pop # Signed-off-by: Linus Torvalds # # include/linux/sonypi.h # 2004/10/28 02:06:42-07:00 stelian@popies.net +1 -0 # sonypi: rework input support # # include/linux/input.h # 2004/10/28 02:06:42-07:00 stelian@popies.net +22 -0 # sonypi: rework input support # # drivers/char/sonypi.h # 2004/10/28 02:06:42-07:00 stelian@popies.net +48 -14 # sonypi: rework input support # # drivers/char/sonypi.c # 2004/10/28 02:06:42-07:00 stelian@popies.net +134 -35 # sonypi: rework input support # # ChangeSet # 2004/10/28 09:13:29-07:00 stelian@popies.net # [PATCH] sonypi: power management related fixes # # * switch from a sysdev to a platform device # * drop old style PM code # * use pci_get_device()/pci_dev_put() instead of pci_find_device() # # Patch originaly from Dmitry Torokhov . # # Signed-off-by: Stelian Pop # Signed-off-by: Linus Torvalds # # drivers/char/sonypi.h # 2004/10/28 02:03:43-07:00 stelian@popies.net +1 -4 # sonypi: power management related fixes # # drivers/char/sonypi.c # 2004/10/28 02:03:43-07:00 stelian@popies.net +94 -122 # sonypi: power management related fixes # # ChangeSet # 2004/10/28 09:13:17-07:00 stelian@popies.net # [PATCH] sonypi: replace homebrew queue with kfifo # # Signed-off-by: Stelian Pop # Signed-off-by: Linus Torvalds # # drivers/char/sonypi.h # 2004/10/28 02:01:57-07:00 stelian@popies.net +6 -11 # sonypi: replace homebrew queue with kfifo # # drivers/char/sonypi.c # 2004/10/28 02:01:57-07:00 stelian@popies.net +42 -90 # sonypi: replace homebrew queue with kfifo # # ChangeSet # 2004/10/28 09:13:05-07:00 stelian@popies.net # [PATCH] sonypi: module related fixes # # * use module_param() instead of MODULE_PARM() and __setup() # * use MODULE_VERSION() # # Signed-off-by: Stelian Pop # Signed-off-by: Linus Torvalds # # drivers/char/sonypi.h # 2004/10/28 02:01:10-07:00 stelian@popies.net +1 -31 # sonypi: module related fixes # # drivers/char/sonypi.c # 2004/10/28 02:01:10-07:00 stelian@popies.net +77 -70 # sonypi: module related fixes # # Documentation/sonypi.txt # 2004/10/28 02:01:09-07:00 stelian@popies.net +4 -7 # sonypi: module related fixes # # Documentation/kernel-parameters.txt # 2004/10/28 02:01:10-07:00 stelian@popies.net +2 -2 # sonypi: module related fixes # # ChangeSet # 2004/10/28 08:35:45-07:00 chrisw@osdl.org # [PATCH] error out on execve with no binfmts # # Early calls to userspace can invoke an execve() before any binfmt handlers # are registered. Properly return an error in this case rather than 0. # On at least one arch (x86_64) without this patch, the system will double # fault on early attempts to call_usermodehelper. # # Signed-off-by: Chris Wright # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/exec.c # 2004/10/28 00:40:03-07:00 chrisw@osdl.org +2 -1 # error out on execve with no binfmts # # ChangeSet # 2004/10/28 08:35:33-07:00 cw@f00f.org # [PATCH] Remove build warning from drivers/char/random.c on 32-bit platforms # # Remove build warning from drivers/char/random.c on 32-bit platforms. # # Signed-off-by: Chris Wedgwood # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/random.c # 2004/10/28 00:40:02-07:00 cw@f00f.org +3 -5 # Remove build warning from drivers/char/random.c on 32-bit platforms # # ChangeSet # 2004/10/28 08:35:20-07:00 olh@suse.de # [PATCH] remove double newline from sysrq action_msg # # __handle_sysrq already prints a newline, so the action_msg string doesnt # need yet another newline. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/power/poweroff.c # 2004/10/28 00:40:02-07:00 olh@suse.de +1 -1 # remove double newline from sysrq action_msg # # arch/ppc64/xmon/start.c # 2004/10/28 00:40:02-07:00 olh@suse.de +1 -1 # remove double newline from sysrq action_msg # # arch/ppc/xmon/start.c # 2004/10/28 00:40:02-07:00 olh@suse.de +1 -1 # remove double newline from sysrq action_msg # # arch/i386/mach-voyager/voyager_basic.c # 2004/10/28 00:40:02-07:00 olh@suse.de +1 -1 # remove double newline from sysrq action_msg # # ChangeSet # 2004/10/28 08:35:08-07:00 kraxel@bytesex.org # [PATCH] bttv subdev fix # # - Make bttv check the device_register return value. # # - Yet another unchecked return value fixed. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/bttv-gpio.c # 2004/10/28 00:40:02-07:00 kraxel@bytesex.org +7 -3 # bttv subdev fix # # ChangeSet # 2004/10/28 08:34:55-07:00 axboe@suse.de # [PATCH] issues with online scheduler switching # # There are two issues with online io scheduler switching that this patch # addresses. The first is pretty simple - it concerns racing with scheduler # removal on switch. elevator_find() does not grab a reference to the io # scheduler, so before elevator_attach() is run it could go away. Add # elevator_get() to solve that. # # Second issue is the flushing out of requests that is needed before # switching can be problematic with requests that aren't allocated in the # block layer (such as requests on the stack of a process). The problem is # that we don't know when they will have finished, and most io schedulers # need to access the elevator structures on io completion. This can be fixed # by adding an intermedia step that switches to noop, since it doesn't need # to touch anything but the request_queue. The queue drain can then safely # be split into two operations - one that waits for file system requests, and # one that waits for the queue to completely empty. Requests arriving after # the first drain will get stuck in a seperate queue list. # # Signed-off-by: Jens Axboe # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/blkdev.h # 2004/10/28 00:40:02-07:00 axboe@suse.de +3 -1 # issues with online scheduler switching # # drivers/block/ll_rw_blk.c # 2004/10/28 00:40:02-07:00 axboe@suse.de +27 -3 # issues with online scheduler switching # # drivers/block/elevator.c # 2004/10/28 00:40:02-07:00 axboe@suse.de +80 -25 # issues with online scheduler switching # # ChangeSet # 2004/10/28 08:34:43-07:00 manfred@colorfullife.com # [PATCH] handle posix message queues with /proc/sys disabled # # register_sysctl_table() fails if sysctl support is not compiled into the # kernel. The POSIX message queue subsystem aborted it's initialization if # register_sysctl_table() fails, and that causes an oops in sys_mq_open(). # The patch fixes that by ignoring failures from register_sysctl_table(). # # Signed-off-by; Manfred Spraul # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ipc/mqueue.c # 2004/10/28 00:40:01-07:00 manfred@colorfullife.com +3 -6 # handle posix message queues with /proc/sys disabled # # ChangeSet # 2004/10/28 08:34:31-07:00 axboe@suse.de # [PATCH] cfq v2 switch bug # # Fix online switching issue with cfq v2. It does deferred clearing of # e->elevator_data, which screws up the current io scheduler. It does not # have to, so just remove it. # # Signed-off-by: Jens Axboe # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/cfq-iosched.c # 2004/10/28 00:40:02-07:00 axboe@suse.de +0 -2 # cfq v2 switch bug # # ChangeSet # 2004/10/28 08:34:18-07:00 wli@holomorphy.com # [PATCH] remove itimer_ticks and itimer_next # # These two variables are long, long dead. This patch removes them. # # Signed-off-by: William Irwin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/sched.h # 2004/10/28 00:40:02-07:00 wli@holomorphy.com +0 -2 # remove itimer_ticks and itimer_next # # ChangeSet # 2004/10/28 08:34:06-07:00 colin@colino.net # [PATCH] fix via-pmu.c compilation without CONFIG_PMAC_PBOOK # # This patch fixes via-pmu.c compilation when CONFIG_PMAC_PBOOK is not set. # Looks like the #endif was one line too late. # # Signed-off-by: Colin Leroy # Acked-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/macintosh/via-pmu.c # 2004/10/28 00:40:01-07:00 colin@colino.net +1 -1 # fix via-pmu.c compilation without CONFIG_PMAC_PBOOK # # ChangeSet # 2004/10/28 08:33:53-07:00 hch@lst.de # [PATCH] remove mousedrivers.sgml # # It's been totally obsoleted by the input layer # # Acked-by: Alan Cox # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/DocBook/Makefile # 2004/10/28 00:40:01-07:00 hch@lst.de +3 -3 # remove mousedrivers.sgml # # BitKeeper/deleted/.del-mousedrivers.tmpl~35c97c24ff898e5d # 2004/10/28 08:33:46-07:00 hch@lst.de +0 -0 # Delete: Documentation/DocBook/mousedrivers.tmpl # # ChangeSet # 2004/10/28 08:33:43-07:00 hch@lst.de # [PATCH] remove invoke_softirq # # This was used by the early irqstacks implementation on s390 and has been # replaced by __ARCH_HAS_DO_SOFTIRQ now. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/softirq.c # 2004/10/28 00:40:00-07:00 hch@lst.de +1 -1 # remove invoke_softirq # # include/linux/interrupt.h # 2004/10/28 00:40:01-07:00 hch@lst.de +0 -4 # remove invoke_softirq # # ChangeSet # 2004/10/28 08:33:30-07:00 hch@lst.de # [PATCH] fix show_refcnt return value type # # module_attribute.show is defined to return ssize_t # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/module.c # 2004/10/28 00:40:00-07:00 hch@lst.de +1 -1 # fix show_refcnt return value type # # ChangeSet # 2004/10/28 08:33:18-07:00 tglx@linutronix.de # [PATCH] Lock initializer unifying (Network drivers) # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/znet.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/wireless/airo.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/wan/cycx_x25.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/wan/cycx_main.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/tulip/xircom_tulip_cb.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/tulip/xircom_cb.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/tulip/de4x5.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +2 -2 # Lock initializer unifying (Network drivers) # # drivers/net/tokenring/ibmtr.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/sundance.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/ppp_generic.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/pci-skeleton.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/lasi_82596.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/hamradio/mkiss.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/depca.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/atarilance.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/82596.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # drivers/net/7990.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Network drivers) # # ChangeSet # 2004/10/28 08:33:04-07:00 tglx@linutronix.de # [PATCH] Lock initializer unifying (Core) # # To make spinlock/rwlock initialization consistent all over the kernel, # this patch converts explicit lock-initializers into spin_lock_init() and # rwlock_init() calls. # # Currently, spinlocks and rwlocks are initialized in two different ways: # # lock = SPIN_LOCK_UNLOCKED # spin_lock_init(&lock) # # rwlock = RW_LOCK_UNLOCKED # rwlock_init(&rwlock) # # this patch converts all explicit lock initializations to # spin_lock_init() or rwlock_init(). (Besides consistency this also helps # automatic lock validators and debugging code.) # # The conversion was done with a script, it was verified manually and it # was reviewed, compiled and tested as far as possible on x86, ARM, PPC. # # There is no runtime overhead or actual code change resulting out of this # patch, because spin_lock_init() and rwlock_init() are macros and are # thus equivalent to the explicit initialization method. # # Signed-off-by: Thomas Gleixner # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/swapfile.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Core) # # kernel/futex.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Core) # # kernel/fork.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +4 -4 # Lock initializer unifying (Core) # # ipc/util.c # 2004/10/28 00:40:00-07:00 tglx@linutronix.de +1 -1 # Lock initializer unifying (Core) # # ChangeSet # 2004/10/28 08:32:52-07:00 pluto@ds14.agh.edu.pl # [PATCH] signal.c: gcc-3.4 fix # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/signal.c # 2004/10/28 00:40:00-07:00 pluto@ds14.agh.edu.pl +1 -1 # signal.c: gcc-3.4 fix # # ChangeSet # 2004/10/28 08:32:40-07:00 james4765@gmail.com # [PATCH] ftape documentation fixes # # Description: Cleanup and update to Documentation/ftape.txt # # Signed-off by: James Nelson # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/ftape.txt # 2004/10/28 00:39:59-07:00 james4765@gmail.com +38 -56 # ftape documentation fixes # # ChangeSet # 2004/10/28 08:32:27-07:00 james4765@gmail.com # [PATCH] ftape has no maintainer # # After tracking down the original author of the ftape sources, I found out # that he no longer had interest in maintaining it. # # Signed-off-by: James Nelson # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/10/28 00:39:59-07:00 james4765@gmail.com +2 -4 # ftape has no maintainer # # ChangeSet # 2004/10/28 08:32:15-07:00 werner@almesberger.net # [PATCH] make buffer head argument of buffer_##name "const" # # Allow the buffer_foo() predicates to take a (const struct buffer_head *). # # I've checked that the argument of test_bit is indeed "const" on all # architectures. # # Signed-off-by: Werner Almesberger # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/buffer_head.h # 2004/10/28 00:39:59-07:00 werner@almesberger.net +1 -1 # make buffer head argument of buffer_##name "const" # # ChangeSet # 2004/10/28 08:32:02-07:00 juhl-lkml@dif.dk # [PATCH] add a bunch of missing files to Documentation/00-INDEX # # Add a bunch of entries to Documentation/00-INDEX that are currently missing # (and removes the entry for one file that no longer exist). # # Patch has already been OK'ed by Paul G. # # Signed-off-by: Jesper Juhl # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/00-INDEX # 2004/10/28 00:39:59-07:00 juhl-lkml@dif.dk +46 -4 # add a bunch of missing files to Documentation/00-INDEX # # ChangeSet # 2004/10/28 08:31:50-07:00 petero2@telia.com # [PATCH] Fix incorrect Mt Rainier detection # # cdrom_is_mrw() can incorrectly think that a drive is Mt Rainier capable, # because if forgets to check if the "GET CONFIGURATION" command returns the # MRW feature number. According to the MMC spec, the drive shall return all # feature numbers >= the starting feature number, so even if the drive # doesn't support Mt Rainier, it can return some data that makes # cdrom_is_mrw() incorrectly think the drive is MRW capable. # # This problem stops me from mounting DVD+RW discs in R/W mode on my laptop, # because it makes cdrom_open_write() call cdrom_mrw_open_write() which fails # because the drive isn't really MRW capable. # # The fix is to make sure the returned feature number is the correct one for # Mt Rainier. # # Signed-off-by: Peter Osterlund # Acked-by: Jens Axboe # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/cdrom/cdrom.c # 2004/10/28 00:39:59-07:00 petero2@telia.com +2 -0 # Fix incorrect Mt Rainier detection # # ChangeSet # 2004/10/28 08:31:38-07:00 arjan@infradead.org # [PATCH] unexport add_timer_on() # # add_timer_on() isn't used by modules (in fact it's only used ONCE, in # workqueue.c) and it's not even a good api for drivers, in fact, the comment # for it says # # * This is not very scalable on SMP. Double adds are not possible. # # Signed-off-by: Arjan van de Ven # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/timer.c # 2004/10/28 00:39:59-07:00 arjan@infradead.org +0 -1 # unexport add_timer_on() # # ChangeSet # 2004/10/28 08:31:26-07:00 axboe@suse.de # [PATCH] kill excessive cdrom prints # # Don't know where this came from, but dumping this on every open gets boring # really quickly. # # Signed-off-by: Jens Axboe # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/cdrom/cdrom.c # 2004/10/28 00:56:33-07:00 axboe@suse.de +3 -5 # kill excessive cdrom prints # # ChangeSet # 2004/10/28 08:31:13-07:00 dhowells@redhat.com # [PATCH] Unexport some RxRPC symbols # # Remove some of the exports on RxRPC symbols that aren't currently used (and # most probably won't be) by external modules. # # Signed-off-by: David Howells # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/rxrpc/rxrpc_syms.c # 2004/10/28 00:39:58-07:00 dhowells@redhat.com +0 -15 # Unexport some RxRPC symbols # # ChangeSet # 2004/10/28 08:31:00-07:00 james4765@gmail.com # [PATCH] ramdisk.txt update # # General cleanup and updating of ramdisk.txt. # # Signed-off by: Jim Nelson # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/ramdisk.txt # 2004/10/28 00:39:58-07:00 james4765@gmail.com +55 -94 # ramdisk.txt update # # ChangeSet # 2004/10/28 08:30:48-07:00 hch@lst.de # [PATCH] unexport firmware_class # # it's marked static already, and there's no point in exporting it # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/base/firmware_class.c # 2004/10/28 00:39:58-07:00 hch@lst.de +0 -1 # unexport firmware_class # # ChangeSet # 2004/10/28 08:30:36-07:00 hch@lst.de # [PATCH] unexport set_selection and paste_selection # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/selection.c # 2004/10/28 00:39:58-07:00 hch@lst.de +0 -3 # unexport set_selection and paste_selection # # ChangeSet # 2004/10/28 08:30:25-07:00 hch@lst.de # [PATCH] mark pi_unclaim static # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/paride/paride.h # 2004/10/28 00:39:58-07:00 hch@lst.de +0 -2 # mark pi_unclaim static # # drivers/block/paride/paride.c # 2004/10/28 00:39:58-07:00 hch@lst.de +1 -3 # mark pi_unclaim static # # ChangeSet # 2004/10/28 08:30:15-07:00 hch@lst.de # [PATCH] unexport vc_cons_allocated # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/vt.c # 2004/10/28 00:39:58-07:00 hch@lst.de +0 -1 # unexport vc_cons_allocated # # ChangeSet # 2004/10/28 08:30:02-07:00 hch@lst.de # [PATCH] parport: kill dead code and exports # # There's lots of exports in parport that aren't used by any drivers. Behind # many of them there's actually dead code. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/parport.h # 2004/10/28 00:39:58-07:00 hch@lst.de +0 -13 # parport: kill dead code and exports # # drivers/parport/share.c # 2004/10/28 00:39:58-07:00 hch@lst.de +0 -1 # parport: kill dead code and exports # # drivers/parport/procfs.c # 2004/10/28 00:39:58-07:00 hch@lst.de +0 -3 # parport: kill dead code and exports # # drivers/parport/probe.c # 2004/10/28 00:39:58-07:00 hch@lst.de +0 -1 # parport: kill dead code and exports # # drivers/parport/ieee1284.c # 2004/10/28 00:39:58-07:00 hch@lst.de +1 -3 # parport: kill dead code and exports # # drivers/parport/daisy.c # 2004/10/28 00:39:58-07:00 hch@lst.de +1 -154 # parport: kill dead code and exports # # ChangeSet # 2004/10/28 08:29:50-07:00 hch@lst.de # [PATCH] remove ext2 xatts exports # # I think Andreas exported them to allow modular xattr handlers, but with # James rework these aren't possible anymore, and we never had them anyway. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/ext2/xattr.c # 2004/10/28 00:39:57-07:00 hch@lst.de +0 -5 # remove ext2 xatts exports # # ChangeSet # 2004/10/28 08:29:39-07:00 hch@lst.de # [PATCH] unexport sys_lseek # # Fortunately dvb stopped using it in their firmware loader # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/read_write.c # 2004/10/28 00:39:57-07:00 hch@lst.de +0 -1 # unexport sys_lseek # # ChangeSet # 2004/10/28 08:29:27-07:00 hch@lst.de # [PATCH] remove page_follow_link # # All filesystems have been switched to page_follow_link_light # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/fs.h # 2004/10/28 00:39:58-07:00 hch@lst.de +0 -1 # remove page_follow_link # # fs/namei.c # 2004/10/28 00:39:57-07:00 hch@lst.de +0 -13 # remove page_follow_link # # ChangeSet # 2004/10/28 08:29:14-07:00 hch@lst.de # [PATCH] unexport kick_process # # This isn't exactly the kind of interface modules should use. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/10/28 00:39:57-07:00 hch@lst.de +0 -2 # unexport kick_process # # ChangeSet # 2004/10/28 08:29:01-07:00 hch@lst.de # [PATCH] unexport getnstimeofday # # This recently added function is only used by the posix timers code, no need # to be exported. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/time.c # 2004/10/28 00:39:57-07:00 hch@lst.de +0 -2 # unexport getnstimeofday # # ChangeSet # 2004/10/28 08:28:49-07:00 hch@lst.de # [PATCH] remove dead exports in sounds/oss # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # sound/oss/sound_syms.c # 2004/10/28 00:39:57-07:00 hch@lst.de +0 -3 # remove dead exports in sounds/oss # # sound/oss/sound_calls.h # 2004/10/28 00:39:57-07:00 hch@lst.de +0 -1 # remove dead exports in sounds/oss # # sound/oss/msnd.h # 2004/10/28 00:39:57-07:00 hch@lst.de +0 -4 # remove dead exports in sounds/oss # # sound/oss/msnd.c # 2004/10/28 00:39:57-07:00 hch@lst.de +2 -25 # remove dead exports in sounds/oss # # sound/oss/dev_table.h # 2004/10/28 00:39:57-07:00 hch@lst.de +0 -1 # remove dead exports in sounds/oss # # sound/oss/dev_table.c # 2004/10/28 00:39:57-07:00 hch@lst.de +3 -1 # remove dead exports in sounds/oss # # sound/oss/audio_syms.c # 2004/10/28 00:39:57-07:00 hch@lst.de +0 -3 # remove dead exports in sounds/oss # # sound/oss/audio.c # 2004/10/28 00:39:57-07:00 hch@lst.de +2 -2 # remove dead exports in sounds/oss # # sound/oss/aci.h # 2004/10/28 00:39:57-07:00 hch@lst.de +0 -1 # remove dead exports in sounds/oss # # sound/oss/aci.c # 2004/10/28 00:39:57-07:00 hch@lst.de +1 -2 # remove dead exports in sounds/oss # # ChangeSet # 2004/10/28 08:28:37-07:00 paulmck@us.ibm.com # [PATCH] RCU: eliminating explicit memory barriers from SysV IPC # # This patch uses the rcu_assign_pointer() API to eliminate a number of explicit # memory barriers from the SysV IPC code that uses RCU. It also restructures # the ipc_ids structure so that the array size is stored in the same memory # block as the array itself (see the new struct ipc_id_ary). This prevents the # race that the earlier code was subject to, where a reader could see a mismatch # between the size and the actual array. With the size stored with the array, # the possibility of mismatch is eliminated -- with out the need for careful # ordering and explicit memory barriers. This has been tested successfully on # i386 and ppc64. # # Signed-off-by: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ipc/util.h # 2004/10/28 00:39:57-07:00 paulmck@us.ibm.com +7 -6 # RCU: eliminating explicit memory barriers from SysV IPC # # ipc/util.c # 2004/10/28 00:56:32-07:00 paulmck@us.ibm.com +36 -44 # RCU: eliminating explicit memory barriers from SysV IPC # # ipc/sem.c # 2004/10/28 00:39:57-07:00 paulmck@us.ibm.com +1 -1 # RCU: eliminating explicit memory barriers from SysV IPC # # ipc/msg.c # 2004/10/28 00:39:57-07:00 paulmck@us.ibm.com +1 -1 # RCU: eliminating explicit memory barriers from SysV IPC # # ChangeSet # 2004/10/28 08:28:24-07:00 paulmck@us.ibm.com # [PATCH] RCU: use rcu_assign_pointer() # # This patch uses the rcu_assign_pointer() API to eliminate a number of explicit # memory barriers from code using RCU. This has been tested successfully on # i386 and ppc64. # # Signed-off-by: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sched/sch_api.c # 2004/10/28 00:39:56-07:00 paulmck@us.ibm.com +1 -2 # RCU: use rcu_assign_pointer() # # net/ipv4/route.c # 2004/10/28 00:39:56-07:00 paulmck@us.ibm.com +3 -4 # RCU: use rcu_assign_pointer() # # net/ipv4/devinet.c # 2004/10/28 00:39:56-07:00 paulmck@us.ibm.com +1 -2 # RCU: use rcu_assign_pointer() # # net/decnet/dn_route.c # 2004/10/28 00:39:57-07:00 paulmck@us.ibm.com +5 -8 # RCU: use rcu_assign_pointer() # # net/core/netfilter.c # 2004/10/28 00:39:56-07:00 paulmck@us.ibm.com +1 -2 # RCU: use rcu_assign_pointer() # # include/linux/list.h # 2004/10/28 00:39:57-07:00 paulmck@us.ibm.com +0 -2 # RCU: use rcu_assign_pointer() # # arch/x86_64/kernel/mce.c # 2004/10/28 00:39:56-07:00 paulmck@us.ibm.com +1 -2 # RCU: use rcu_assign_pointer() # # ChangeSet # 2004/10/28 08:28:13-07:00 paulmck@us.ibm.com # [PATCH] RCU: rcu_assign_pointer() removal of memory barriers # # This patch adds the rcu_assign_pointer() API that helps reduce the need for # explicit memory barriers in code that uses RCU. This API buries the required # memory barriers in a macro that also does the assignment. This has been # tested successfully on i386 and ppc64. # # Signed-off-by: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/rcupdate.h # 2004/10/28 00:39:57-07:00 paulmck@us.ibm.com +18 -0 # RCU: rcu_assign_pointer() removal of memory barriers # # ChangeSet # 2004/10/28 08:28:00-07:00 kraxel@bytesex.org # [PATCH] v4l: config cleanups # # Cleanup the video4linux driver configuration by using "select" instead of # "default if ...". # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/Kconfig # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +15 -2 # v4l: config cleanups # # drivers/media/Kconfig # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +0 -12 # v4l: config cleanups # # ChangeSet # 2004/10/28 08:27:48-07:00 kraxel@bytesex.org # [PATCH] v4l: videodev whitespace cleanup # # The patch just removes all trailing whitespaces, there are no actual code # changes. I've a script to remove them from my sources now, that should kill # those no-op whitespace changes in my patches after merging this initial # cleanup. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/videodev2.h # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +8 -8 # v4l: videodev whitespace cleanup # # include/linux/videodev.h # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +7 -7 # v4l: videodev whitespace cleanup # # drivers/media/video/v4l2-common.c # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +6 -6 # v4l: videodev whitespace cleanup # # drivers/media/video/v4l1-compat.c # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +18 -18 # v4l: videodev whitespace cleanup # # ChangeSet # 2004/10/28 08:27:36-07:00 kraxel@bytesex.org # [PATCH] v4l: videobuf whitespace cleanup # # The patch just removes all trailing whitespaces, there are no actual code # changes. I've a script to remove them from my sources now, that should kill # those no-op whitespace changes in my patches after merging this initial # cleanup. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/media/video-buf.h # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +3 -3 # v4l: videobuf whitespace cleanup # # drivers/media/video/video-buf.c # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +16 -16 # v4l: videobuf whitespace cleanup # # ChangeSet # 2004/10/28 08:27:23-07:00 kraxel@bytesex.org # [PATCH] v4l: tuner update # # This is an update for the v4l tuner modules (tuner.o + tda9887.o). # Changes: # # * fix two tuner config entries. # * switch insmod options to new 2.6-ish style. # * add suspend/resume functions. # # The patch also removes all trailing whitespaces. I've a script to remove them # from my sources now, that should kill those no-op whitespace changes in my # patches after merging this initial cleanup. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/media/tuner.h # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +1 -1 # v4l: tuner update # # drivers/media/video/tuner.c # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +102 -67 # v4l: tuner update # # drivers/media/video/tda9887.c # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +28 -3 # v4l: tuner update # # ChangeSet # 2004/10/28 08:27:11-07:00 kraxel@bytesex.org # [PATCH] v4l: msp3400 update # # This is a update for the msp3400 module. Changes: # # * switch over to 2.6-ish insmod options. # * use kthread for thread management. # * add support for v4l2 audio ioctls. # * merge a number of changes from the ivtv project. # * add suspend/resume functions. # # The patch also removes all trailing whitespaces. I've a script to remove them # from my sources now, that should kill those no-op whitespace changes in my # patches after merging this initial cleanup. # # Signed-off-by: Gerd Knorr # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/msp3400.h # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +22 -0 # v4l: msp3400 update # # drivers/media/video/msp3400.c # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +668 -372 # v4l: msp3400 update # # ChangeSet # 2004/10/28 08:26:59-07:00 kraxel@bytesex.org # [PATCH] v4l: IR whitespace cleanup # # The patch just removes all trailing whitespaces, there are no actual code # changes. I've a script to remove them from my sources now, that should kill # those no-op whitespace changes in my patches after merging this initial # cleanup. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/media/ir-common.h # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +2 -0 # v4l: IR whitespace cleanup # # drivers/media/common/ir-common.c # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +5 -3 # v4l: IR whitespace cleanup # # ChangeSet # 2004/10/28 08:26:46-07:00 kraxel@bytesex.org # [PATCH] v4l: i2c whitespace cleanup # # The patch just removes all trailing whitespaces, there are no actual code # changes. I've a script to remove them from my sources now, that should kill # those no-op whitespace changes in my patches after merging this initial # cleanup. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/media/audiochip.h # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +1 -1 # v4l: i2c whitespace cleanup # # drivers/media/video/tvmixer.c # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +5 -5 # v4l: i2c whitespace cleanup # # drivers/media/video/tvaudio.c # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +36 -36 # v4l: i2c whitespace cleanup # # drivers/media/video/tda9875.c # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +18 -18 # v4l: i2c whitespace cleanup # # drivers/media/video/tda7432.c # 2004/10/28 00:39:56-07:00 kraxel@bytesex.org +42 -42 # v4l: i2c whitespace cleanup # # ChangeSet # 2004/10/28 08:26:34-07:00 kraxel@bytesex.org # [PATCH] v4l: bttv whitespace cleanup # # The patch just removes all trailing whitespaces, there are no actual code # changes. I've a script to remove them from my sources now, that should kill # those no-op whitespace changes in my patches after merging this initial # cleanup. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/bttvp.h # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +4 -4 # v4l: bttv whitespace cleanup # # drivers/media/video/bttv.h # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +9 -9 # v4l: bttv whitespace cleanup # # drivers/media/video/bttv-vbi.c # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +8 -8 # v4l: bttv whitespace cleanup # # drivers/media/video/bttv-risc.c # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +7 -7 # v4l: bttv whitespace cleanup # # drivers/media/video/bttv-if.c # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +7 -7 # v4l: bttv whitespace cleanup # # drivers/media/video/bttv-i2c.c # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +7 -7 # v4l: bttv whitespace cleanup # # drivers/media/video/bttv-gpio.c # 2004/10/28 00:56:30-07:00 kraxel@bytesex.org +2 -2 # v4l: bttv whitespace cleanup # # drivers/media/video/bttv-driver.c # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +71 -72 # v4l: bttv whitespace cleanup # # drivers/media/video/bttv-cards.c # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +91 -91 # v4l: bttv whitespace cleanup # # drivers/media/video/btcx-risc.c # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +3 -3 # v4l: bttv whitespace cleanup # # drivers/media/video/bt848.h # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +5 -5 # v4l: bttv whitespace cleanup # # ChangeSet # 2004/10/28 08:26:21-07:00 kraxel@bytesex.org # [PATCH] v4l: bttv IR input update # # This is a update for the IR input modules for the bttv driver. It adds IR # support to more TV cards and has some some minor cleanups. # # It also removes all trailing whitespaces. I've a script to remove them from # my sources now, that should kill those no-op whitespace changes in my patches # after merging this initial cleanup. # # Signed-off-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/ir-kbd-i2c.c # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +24 -23 # v4l: bttv IR input update # # drivers/media/video/ir-kbd-gpio.c # 2004/10/28 00:39:55-07:00 kraxel@bytesex.org +101 -6 # v4l: bttv IR input update # # ChangeSet # 2004/10/28 08:26:09-07:00 arjanv@infradead.org # [PATCH] make filemap_fdatawrite_range() static # # The patch below marks filemap_fdatawrite_range static, it's not used # outside mm/filemap.c. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/filemap.c # 2004/10/28 00:39:54-07:00 arjanv@infradead.org +1 -2 # make filemap_fdatawrite_range() static # # ChangeSet # 2004/10/28 08:25:56-07:00 arjanv@infradead.org # [PATCH] remove unused code: dump_extended_fpu # # dump_extended_fpu() is used nowhere in the kernel; save a few bytes... # # Signed-off-by: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/i387.h # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +0 -2 # remove unused code: dump_extended_fpu # # arch/i386/kernel/i387.c # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +0 -15 # remove unused code: dump_extended_fpu # # arch/i386/kernel/i386_ksyms.c # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +0 -1 # remove unused code: dump_extended_fpu # # ChangeSet # 2004/10/28 08:25:43-07:00 arjanv@infradead.org # [PATCH] vmalloc_to_page helper # # After William did the remap_pfn_range change, a very common pattern became: # page = page_to_pfn(vmalloc_to_page((void *)pos)); # if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) { # # the patch below adds a very simple helper, vmalloc_to_pfn() to simplify this # a bit. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/nommu.c # 2004/10/28 00:39:54-07:00 arjanv@infradead.org +6 -0 # vmalloc_to_page helper # # mm/memory.c # 2004/10/28 00:39:54-07:00 arjanv@infradead.org +10 -0 # vmalloc_to_page helper # # include/linux/mm.h # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +1 -0 # vmalloc_to_page helper # # drivers/usb/media/w9968cf.c # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +1 -1 # vmalloc_to_page helper # # drivers/usb/media/vicam.c # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +1 -1 # vmalloc_to_page helper # # drivers/usb/media/usbvideo.c # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +1 -1 # vmalloc_to_page helper # # drivers/usb/media/stv680.c # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +1 -1 # vmalloc_to_page helper # # drivers/usb/media/sn9c102_core.c # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +1 -1 # vmalloc_to_page helper # # drivers/usb/media/se401.c # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +1 -1 # vmalloc_to_page helper # # drivers/usb/media/ov511.c # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +1 -1 # vmalloc_to_page helper # # drivers/media/video/meye.c # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +1 -1 # vmalloc_to_page helper # # drivers/media/video/cpia.c # 2004/10/28 00:39:55-07:00 arjanv@infradead.org +1 -1 # vmalloc_to_page helper # # ChangeSet # 2004/10/28 08:25:30-07:00 arjanv@infradead.org # [PATCH] unexport raise_softirq # # The patch below unexports raise_softirq(). raise_softirq() is not the # right api for drivers to use, instead raise_softirq_irqoff() is, and # thankfully all in-kernel code is using that variant already. To avoid # future "accidents", unexport. # # Acked-by: Ingo Molnar # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/softirq.c # 2004/10/28 00:56:31-07:00 arjanv@infradead.org +0 -2 # unexport raise_softirq # # ChangeSet # 2004/10/28 08:25:18-07:00 penberg@cs.helsinki.fi # [PATCH] fbcon: Replace logo_shown magic numbers with constants # # This patch replaces logo_shown magic numbers with constants in # drivers/video/console/fbcon.c. # # Signed-off-by: Pekka Enberg # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/console/fbcon.c # 2004/10/28 00:39:54-07:00 penberg@cs.helsinki.fi +18 -10 # fbcon: Replace logo_shown magic numbers with constants # # ChangeSet # 2004/10/28 08:25:05-07:00 penberg@cs.helsinki.fi # [PATCH] fbcon: Remove spurious casts # # This patch removes unnecessary casts from drivers/video/console/fbcon.c. # Assignment from a void pointer does not require a cast and char type is # promoted to int automatically. # # Signed-off-by: Pekka Enberg # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/console/fbcon.c # 2004/10/28 00:56:40-07:00 penberg@cs.helsinki.fi +41 -41 # fbcon: Remove spurious casts # # ChangeSet # 2004/10/28 08:24:53-07:00 adaplas@hotpop.com # [PATCH] fbcon: Fix endian bug in fbcon_putc (console mouse problem) # # The typecast (const unsigned short *) &c in fbcon_putc is not correct for # big-endian machines. This problem manifests as a black cursor that can be # used to erase the console screen contents. The correct fix is to use # scr_writew instead. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/console/fbcon.c # 2004/10/28 00:56:40-07:00 adaplas@hotpop.com +4 -1 # fbcon: Fix endian bug in fbcon_putc (console mouse problem) # # ChangeSet # 2004/10/28 08:24:40-07:00 adaplas@hotpop.com # [PATCH] fbdev: Add __iomem annotations to intelfb # # - Add __iomem annotations to intelfb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/intelfb/intelfbhw.h # 2004/10/28 00:39:54-07:00 adaplas@hotpop.com +7 -5 # fbdev: Add __iomem annotations to intelfb # # drivers/video/intelfb/intelfbhw.c # 2004/10/28 00:39:54-07:00 adaplas@hotpop.com +16 -12 # fbdev: Add __iomem annotations to intelfb # # drivers/video/intelfb/intelfbdrv.c # 2004/10/28 00:39:54-07:00 adaplas@hotpop.com +13 -10 # fbdev: Add __iomem annotations to intelfb # # drivers/video/intelfb/intelfb.h # 2004/10/28 00:39:54-07:00 adaplas@hotpop.com +3 -3 # fbdev: Add __iomem annotations to intelfb # # ChangeSet # 2004/10/28 08:24:28-07:00 adaplas@hotpop.com # [PATCH] fbdev: Add __iomem annotations for savagefb # # Add __iomem annotations for savagefb # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/savage/savagefb.h # 2004/10/28 00:39:54-07:00 adaplas@hotpop.com +4 -4 # fbdev: Add __iomem annotations for savagefb # # drivers/video/savage/savagefb.c # 2004/10/28 00:39:54-07:00 adaplas@hotpop.com +2 -6 # fbdev: Add __iomem annotations for savagefb # # ChangeSet # 2004/10/28 08:24:15-07:00 agx@sigxcpu.org # [PATCH] fbdev: Fix rivafb crashes on PPC # # - fixes crashes when changing video modes/switching away from X on ppc # - fixes random crashes when scrolling in e.g. vi # - improves on the NV30 support # - reintroduces noaccel (not perfect but helps a lot for debugging) # - converts MODULE_PARM to module_param # - cleans up some printks, FB_ACCELF_TEXT cruft # Most of this is taken from either XFree86 4.3 or BenH's 2.4 ppc tree. # # From: Antonino Daplas # - adjust pixmap->scan_align to 1 and use cfb_* drawing functions # if FBINFO_HWACCEL_DISABLED is set # # Signed-off-by: Guido Guenter # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/riva/riva_hw.h # 2004/10/28 00:39:54-07:00 agx@sigxcpu.org +3 -1 # fbdev: Fix rivafb crashes on PPC # # drivers/video/riva/riva_hw.c # 2004/10/28 00:39:54-07:00 agx@sigxcpu.org +18 -7 # fbdev: Fix rivafb crashes on PPC # # drivers/video/riva/nv_driver.c # 2004/10/28 00:39:54-07:00 agx@sigxcpu.org +61 -13 # fbdev: Fix rivafb crashes on PPC # # drivers/video/riva/fbdev.c # 2004/10/28 00:39:54-07:00 agx@sigxcpu.org +43 -26 # fbdev: Fix rivafb crashes on PPC # # drivers/video/Makefile # 2004/10/28 00:39:53-07:00 agx@sigxcpu.org +2 -1 # fbdev: Fix rivafb crashes on PPC # # ChangeSet # 2004/10/28 08:24:03-07:00 bjorn.helgaas@hp.com # [PATCH] radeonfb: If no video memory, exit with error # # Nothing good will happen if we try to ioremap and use a zero-sized frame # buffer. I observed this problem on an ia64 sx1000 box, where the BIOS # doesn't run the option ROM. If we try to continue, radeonfb just gets # hopelessly confused because the card isn't initialized correctly. # # Signed-off-by: Bjorn Helgaas # Acked-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/aty/radeon_base.c # 2004/10/28 00:39:53-07:00 bjorn.helgaas@hp.com +3 -1 # radeonfb: If no video memory, exit with error # # ChangeSet # 2004/10/28 08:23:51-07:00 penberg@cs.helsinki.fi # [PATCH] radeonfb: screeninfo initialization cleanup # # This patch changes the initialization of radeonfb_default_var to use named # initializers and avoids explicitly setting fields that are automatically # zeroed. # # Signed-off-by: Pekka Enberg # Acked-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/aty/radeon_monitor.c # 2004/10/28 00:39:53-07:00 penberg@cs.helsinki.fi +19 -4 # radeonfb: screeninfo initialization cleanup # # ChangeSet # 2004/10/28 08:23:38-07:00 adaplas@hotpop.com # [PATCH] savagefb export fixes # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/savage/savagefb_accel.c # 2004/10/28 00:39:53-07:00 adaplas@hotpop.com +5 -0 # savagefb export fixes # # drivers/video/savage/savagefb-i2c.c # 2004/10/28 00:39:53-07:00 adaplas@hotpop.com +5 -0 # savagefb export fixes # # drivers/video/Kconfig # 2004/10/28 00:39:53-07:00 adaplas@hotpop.com +2 -2 # savagefb export fixes # # ChangeSet # 2004/10/28 08:23:26-07:00 nickpiggin@yahoo.com.au # [PATCH] vmscan: pages_scanned fix # # kswapd is still sometimes going into loops. The problem seemed to be # happening on systems with zero inactive pages in ZONE_DMA, so pages_scanned # could never be increased, all_unreclaimable would never be set, and kswapd # would never break. # # So change pages_scanned to be a count of the number of _active_ list pages # scanned rather than inactive. This has been reported to solve the problems. # # This is not subject to the reverse problem where one might have zero active # list pages, because inactive pages are either be reclaimed, or put onto the # active list. # # I think it is reasonable to have all_unreclaimed trigger based on the amount # of active list scanning rather than inactive. # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/vmscan.c # 2004/10/28 00:39:52-07:00 nickpiggin@yahoo.com.au +1 -1 # vmscan: pages_scanned fix # # ChangeSet # 2004/10/28 08:23:13-07:00 paulmck@us.ibm.com # [PATCH] scheduler: remove redundant #ifdef # # Removes a redundant #ifdef CONFIG_SMP that is nested within an enclosing # #ifdef CONFIG_SMP. # # Signed-off-by: # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/10/28 00:56:35-07:00 paulmck@us.ibm.com +0 -2 # scheduler: remove redundant #ifdef # # ChangeSet # 2004/10/28 08:23:01-07:00 schwidefsky@de.ibm.com # [PATCH] s390: tty_write fix # # Make the s/390 console drivers compile without warnings again after the # recent tty layer change that moved the copy_from_user out of the drivers. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/char/tty3270.c # 2004/10/28 00:39:52-07:00 schwidefsky@de.ibm.com +0 -1 # s390: tty_write fix # # drivers/s390/char/sclp_tty.c # 2004/10/28 00:39:52-07:00 schwidefsky@de.ibm.com +1 -3 # s390: tty_write fix # # drivers/s390/char/con3215.c # 2004/10/28 00:39:52-07:00 schwidefsky@de.ibm.com +0 -1 # s390: tty_write fix # # ChangeSet # 2004/10/28 08:22:48-07:00 cw@f00f.org # [PATCH] uml: resolve symbols in back-traces # # Resolve symbols in back-traces. # # Signed-off-by: Chris Wedgwood # Acked-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/sysrq.c # 2004/10/28 00:39:52-07:00 cw@f00f.org +4 -14 # uml: resolve symbols in back-traces # # ChangeSet # 2004/10/28 08:22:36-07:00 cw@f00f.org # [PATCH] uml: mconsole_proc rewrite # # This is an update/resync of kraxel's mconsole_proc rewrite from about # two months ago and IMO it should be merged as-is (yes, it means /proc # has to be mounted but the current code crashes so this is better IMO). # # Signed-off-by: Chris Wedgwood # Acked-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/drivers/mconsole_kern.c # 2004/10/28 00:39:52-07:00 cw@f00f.org +29 -55 # uml: mconsole_proc rewrite # # ChangeSet # 2004/10/28 08:22:24-07:00 cw@f00f.org # [PATCH] uml: minor warning removal # # Include some files to remove missing prototype warnings. # # Signed-off-by: Chris Wedgwood # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/main.c # 2004/10/28 00:39:52-07:00 cw@f00f.org +2 -0 # uml: minor warning removal # # ChangeSet # 2004/10/28 08:22:11-07:00 cw@f00f.org # [PATCH] uml: Kconfig.debug update # # Update Kconfig.debug so we get SYSRQ back and also the spinlock # debugging options. # # Signed-off-by: Chris Wedgwood # Acked-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # lib/Kconfig.debug # 2004/10/28 00:39:51-07:00 cw@f00f.org +3 -3 # uml: Kconfig.debug update # # ChangeSet # 2004/10/28 08:21:59-07:00 cw@f00f.org # [PATCH] uml: Build fix for TT w/o SKAS # # This is required to get UML to build with only TT mode. # # Signed-of-by: Chris Wedgwood # Acked-by: Jeff Dike # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/process.c # 2004/10/28 00:39:51-07:00 cw@f00f.org +13 -0 # uml: Build fix for TT w/o SKAS # # ChangeSet # 2004/10/28 08:21:46-07:00 cw@f00f.org # [PATCH] uml: use generic IRQ code # # Convert UML to use the generic IRQ code. # # Signed-off-by: Chris Wedgwood # Acked-by: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/hardirq.h # 2004/10/28 00:39:51-07:00 cw@f00f.org +24 -4 # uml: use generic IRQ code # # arch/um/kernel/process_kern.c # 2004/10/28 00:39:51-07:00 cw@f00f.org +0 -1 # uml: use generic IRQ code # # arch/um/kernel/irq_user.c # 2004/10/28 00:39:51-07:00 cw@f00f.org +1 -1 # uml: use generic IRQ code # # arch/um/kernel/irq.c # 2004/10/28 00:39:51-07:00 cw@f00f.org +18 -630 # uml: use generic IRQ code # # arch/um/include/irq_user.h # 2004/10/28 00:39:51-07:00 cw@f00f.org +1 -1 # uml: use generic IRQ code # # arch/um/drivers/xterm_kern.c # 2004/10/28 00:39:51-07:00 cw@f00f.org +1 -0 # uml: use generic IRQ code # # arch/um/drivers/port_kern.c # 2004/10/28 00:39:51-07:00 cw@f00f.org +1 -0 # uml: use generic IRQ code # # arch/um/drivers/net_kern.c # 2004/10/28 00:39:51-07:00 cw@f00f.org +1 -0 # uml: use generic IRQ code # # arch/um/drivers/line.c # 2004/10/28 00:39:51-07:00 cw@f00f.org +6 -4 # uml: use generic IRQ code # # arch/um/Kconfig # 2004/10/28 00:39:51-07:00 cw@f00f.org +5 -0 # uml: use generic IRQ code # # ChangeSet # 2004/10/28 08:21:34-07:00 yi.zhu@intel.com # [PATCH] swsusp: print error message when swapping is disabled # # This patch gives some clues to the user when swapping is not enabled during # swsusp. Please apply. # # Signed-off-by: Zhu Yi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/power/swsusp.c # 2004/10/28 00:39:51-07:00 yi.zhu@intel.com +4 -1 # swsusp: print error message when swapping is disabled # # ChangeSet # 2004/10/28 08:21:21-07:00 pavel@ucw.cz # [PATCH] Kill useless pm_access from vt.c # # pm_access does nothing these days, and looks ugly. This removes it from # vt.c. That actually looks like last user in the tree; it should be # possible to kill pm_access completely after 2.6.10. Ouch and add warning # to obsolete pm.txt file. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/vt.c # 2004/10/28 00:56:35-07:00 pavel@ucw.cz +0 -6 # Kill useless pm_access from vt.c # # Documentation/pm.txt # 2004/10/28 00:39:51-07:00 pavel@ucw.cz +4 -4 # Kill useless pm_access from vt.c # # ChangeSet # 2004/10/28 08:21:08-07:00 bjorn.helgaas@hp.com # [PATCH] ia64 iomap implementation # # This preserves the ioreadX() == inX() semantics (same as i386), since it's # not clear that the speedup of omitting the mf.a for port operations is # worth the risk of breaking drivers. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # lib/iomap.c # 2004/10/28 00:39:50-07:00 bjorn.helgaas@hp.com +5 -1 # ia64 iomap implementation # # include/asm-ia64/io.h # 2004/10/28 00:39:50-07:00 bjorn.helgaas@hp.com +16 -1 # ia64 iomap implementation # # ChangeSet # 2004/10/28 08:20:56-07:00 jamesclv@us.ibm.com # [PATCH] x86-64 clustered APIC support # # Forthcoming IBM boxes will be using Nocona and/or Opteron chips in # clustered mode to get beyond 8 CPUs. In fact, there are plans to try for # 128 CPUs when the Tulsa chip comes out. Thus, there are a fair number of # signed vs. unsigned changes in the patch. # # Thanks to the HPET timer and some HW changes, I've been able to remove the # MPS/ACPI string comparisons from the detection code. Instead, it scans # bios_cpu_apicid and uses simple heuristics to select the correct IRQ # delivery mode. No need for a config option. Hurrah! # # Likewise, I've been able to avoid the preprocessor tricks that the i386 # sub-arch needed to build with one or more sub-arches. # # Reluctantly-Acked-by: Andi Kleen # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/mach_apic.h # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +28 -0 # x86-64 clustered APIC support # # include/asm-x86_64/ipi.h # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +113 -0 # x86-64 clustered APIC support # # include/asm-x86_64/genapic.h # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +34 -0 # x86-64 clustered APIC support # # arch/x86_64/kernel/genapic_flat.c # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +119 -0 # x86-64 clustered APIC support # # arch/x86_64/kernel/genapic_cluster.c # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +127 -0 # x86-64 clustered APIC support # # include/asm-x86_64/smp.h # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +19 -25 # x86-64 clustered APIC support # # include/asm-x86_64/msi.h # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +1 -0 # x86-64 clustered APIC support # # include/asm-x86_64/mpspec.h # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +2 -2 # x86-64 clustered APIC support # # include/asm-x86_64/mach_apic.h # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-x86_64/mach_apic.h # # include/asm-x86_64/irq.h # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +1 -1 # x86-64 clustered APIC support # # include/asm-x86_64/ipi.h # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-x86_64/ipi.h # # include/asm-x86_64/genapic.h # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-x86_64/genapic.h # # include/asm-x86_64/apicdef.h # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +23 -10 # x86-64 clustered APIC support # # include/asm-x86_64/apic.h # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +1 -1 # x86-64 clustered APIC support # # arch/x86_64/kernel/smpboot.c # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +4 -5 # x86-64 clustered APIC support # # arch/x86_64/kernel/smp.c # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +1 -99 # x86-64 clustered APIC support # # arch/x86_64/kernel/mpparse.c # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +1 -0 # x86-64 clustered APIC support # # arch/x86_64/kernel/io_apic.c # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +11 -50 # x86-64 clustered APIC support # # arch/x86_64/kernel/genapic_flat.c # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/x86_64/kernel/genapic_flat.c # # arch/x86_64/kernel/genapic_cluster.c # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/x86_64/kernel/genapic_cluster.c # # arch/x86_64/kernel/genapic.c # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +82 -0 # x86-64 clustered APIC support # # arch/x86_64/kernel/apic.c # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +3 -19 # x86-64 clustered APIC support # # arch/x86_64/kernel/Makefile # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +2 -1 # x86-64 clustered APIC support # # arch/i386/kernel/acpi/boot.c # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +1 -1 # x86-64 clustered APIC support # # arch/x86_64/kernel/genapic.c # 2004/10/28 00:39:50-07:00 jamesclv@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/x86_64/kernel/genapic.c # # ChangeSet # 2004/10/28 08:20:42-07:00 venkatesh.pallipadi@intel.com # [PATCH] HPET reenabling after suspend-resume # # hpet hardware seems to need a little prodding during resume for it to start # sending the timer interupts again. Attached patch does it for both i386 # and x86_64. # # Makefile change below: Right now suspend-resume ordering of system devices # depends on their order of linking. It is ugly. But, thats the way it # works currently. And we want timer device to resume before PIC. # # Signed-off-by: "Venkatesh Pallipadi" # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/hpet.h # 2004/10/28 00:39:50-07:00 venkatesh.pallipadi@intel.com +1 -0 # HPET reenabling after suspend-resume # # arch/x86_64/kernel/time.c # 2004/10/28 00:39:50-07:00 venkatesh.pallipadi@intel.com +52 -35 # HPET reenabling after suspend-resume # # arch/x86_64/kernel/Makefile # 2004/10/28 00:56:45-07:00 venkatesh.pallipadi@intel.com +1 -1 # HPET reenabling after suspend-resume # # arch/i386/kernel/time_hpet.c # 2004/10/28 00:39:50-07:00 venkatesh.pallipadi@intel.com +41 -26 # HPET reenabling after suspend-resume # # arch/i386/kernel/time.c # 2004/10/28 00:39:50-07:00 venkatesh.pallipadi@intel.com +18 -12 # HPET reenabling after suspend-resume # # arch/i386/kernel/Makefile # 2004/10/28 00:39:50-07:00 venkatesh.pallipadi@intel.com +1 -1 # HPET reenabling after suspend-resume # # ChangeSet # 2004/10/28 08:20:30-07:00 paul.mundt@nokia.com # [PATCH] sh: syscall updates # # This adds the new syscalls (waitid/add_key/request_key/keyctl). # # Signed-off-by: Paul Mundt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-sh/unistd.h # 2004/10/28 00:39:50-07:00 paul.mundt@nokia.com +6 -1 # sh: syscall updates # # arch/sh/kernel/entry.S # 2004/10/28 00:39:50-07:00 paul.mundt@nokia.com +5 -0 # sh: syscall updates # # ChangeSet # 2004/10/28 08:20:17-07:00 paul.mundt@nokia.com # [PATCH] sh: compile fixes # # A few random build failures/warnings popped up in 2.6.9, this fixes them. # # Signed-off-by: Paul Mundt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-sh/system.h # 2004/10/28 00:39:50-07:00 paul.mundt@nokia.com +0 -1 # sh: compile fixes # # include/asm-sh/pgtable.h # 2004/10/28 00:39:50-07:00 paul.mundt@nokia.com +1 -1 # sh: compile fixes # # include/asm-sh/bitops.h # 2004/10/28 00:39:50-07:00 paul.mundt@nokia.com +1 -1 # sh: compile fixes # # ChangeSet # 2004/10/28 08:20:04-07:00 paul.mundt@nokia.com # [PATCH] sh: do_signal() update for generic changes # # A while back get_signal_to_deliver() changed to take a struct k_sigaction *. # This updates do_signal() and handle_signal() to follow the generic API change. # # Signed-off-by: Paul Mundt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/sh/kernel/signal.c # 2004/10/28 00:39:49-07:00 paul.mundt@nokia.com +6 -7 # sh: do_signal() update for generic changes # # ChangeSet # 2004/10/28 08:19:52-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: rework hugepage code # # Rework the ppc64 hugepage code. Instead of using specially marked pmd # entries in the normal pagetables to represent hugepages, use normal pte_t # entries, in a special set of pagetables used for hugepages only. # # Using pte_t instead of a special hugepte_t makes the code more similar to # that for other architecturess, allowing more possibilities for # consolidating the hugepage code. # # Using independent pagetables for the hugepages is also a prerequisite for # moving the hugepages into their own region well outside the normal user # address space. The restrictions imposed by the powerpc mmu's segment # design mean we probably want to do that in the fairly near future. # # Signed-off-by: David Gibson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pgtable.h # 2004/10/28 00:39:49-07:00 david@gibson.dropbear.id.au +14 -8 # ppc64: rework hugepage code # # include/asm-ppc64/page.h # 2004/10/28 00:39:49-07:00 david@gibson.dropbear.id.au +0 -1 # ppc64: rework hugepage code # # include/asm-ppc64/mmu.h # 2004/10/28 00:39:49-07:00 david@gibson.dropbear.id.au +1 -0 # ppc64: rework hugepage code # # arch/ppc64/mm/init.c # 2004/10/28 00:39:49-07:00 david@gibson.dropbear.id.au +8 -0 # ppc64: rework hugepage code # # arch/ppc64/mm/hugetlbpage.c # 2004/10/28 00:39:49-07:00 david@gibson.dropbear.id.au +227 -194 # ppc64: rework hugepage code # # arch/ppc64/mm/hash_utils.c # 2004/10/28 00:39:49-07:00 david@gibson.dropbear.id.au +4 -6 # ppc64: rework hugepage code # # ChangeSet # 2004/10/28 08:19:39-07:00 paulus@samba.org # [PATCH] PPC/PPC64: Fix FP state corruption on UP # # Unfortunately the patch Ben sent last week to fix a bug in the saving and # restoring of floating-point and altivec context across signal handlers # introduced another bug, which tends to corrupt the FP and altivec contexts # of other tasks. This patch fixes the problem for both ppc32 and ppc64. # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/signal32.c # 2004/10/28 00:39:49-07:00 paulus@samba.org +6 -2 # PPC/PPC64: Fix FP state corruption on UP # # arch/ppc64/kernel/signal.c # 2004/10/28 00:39:49-07:00 paulus@samba.org +6 -2 # PPC/PPC64: Fix FP state corruption on UP # # arch/ppc/kernel/signal.c # 2004/10/28 00:39:49-07:00 paulus@samba.org +9 -4 # PPC/PPC64: Fix FP state corruption on UP # # ChangeSet # 2004/10/28 08:19:27-07:00 mporter@kernel.crashing.org # [PATCH] ppc32: disable broken L2 cache on all 440GX revs # # Always disable L2 cache on PPC440GX. All revs/speeds of silicon have # parity error problems despite errata claims to the contrary. # # Signed-off-by: Matt Porter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/4xx/ocotea.c # 2004/10/28 00:39:49-07:00 mporter@kernel.crashing.org +6 -2 # ppc32: disable broken L2 cache on all 440GX revs # # ChangeSet # 2004/10/28 08:19:14-07:00 paulus@samba.org # [PATCH] ppc64: cpu hotplug notifier for numa # # This patch is from Nathan Lynch . # # The NUMA properties of all "possible" cpus are not necessarily available at # boot time on ppc64 LPAR. Only the properties for present cpus are known. # # This patch modifies the ppc64 numa code to map a cpu to its node right before # it is brought up -- this means that secondary cpus are now mapped to their # nodes during smp_init(). Cpus are removed from their nodes after they have # gone offline. # # Also some minor cleanups: # # - Stash the "minimum common depth" in a global at boot time, so we don't # have to rediscover it every time something changes. # # - Remove unnecessary variable from of_get_associativity() which is accessed # while possibly uninitialized. # # - Remove the cpu portion from dump_numa_topology() since it will show only # the boot cpu now. We could display this information from smp_cpus_done() if # necessary. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/numa.c # 2004/10/28 00:39:49-07:00 paulus@samba.org +110 -84 # ppc64: cpu hotplug notifier for numa # # ChangeSet # 2004/10/28 08:19:02-07:00 sfr@canb.auug.org.au # [PATCH] ppc64: iSeries console: cleanup after tty_write user copies removal # # This patch just removes more of the infrastructure in the PPC64 iSeries # console driver that is no longer needed since we no longer need to do # copies from user mode in the tty drivers. # # Signed-off-by: Stephen Rothwell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/viocons.c # 2004/10/28 00:39:49-07:00 sfr@canb.auug.org.au +22 -123 # ppc64: iSeries console: cleanup after tty_write user copies removal # # ChangeSet # 2004/10/28 08:18:50-07:00 jmorris@redhat.com # [PATCH] SELinux: fix sidtab locking bug # # This patch by Kaigai Kohei fixes a bug in the SELinux sidtab code, where we # do a spin_unlock_irq() while nested under another irq lock, which enables # interrupts and allows a deadlock to happen: # # sidtab_set() is called between POLICY_WRLOCK and POLICY_WRUNLOCK in # services.c:1092. sidtab_set() uses SIDTAB_LOCK()/SIDTAB_UNLOCK(), but # SIDTAB_UNLOCK() enables any interruptions because it's defined as # spin_unlock_irq(). If an interruption occurs between SIDTAB_UNLOCK() and # POLICY_WRUNLOCK, and interruption context try to hold the POLICY_RDLOCK, # then a deadlock happen in the result. # # The solution is to save & restore flags on the inner lock, per the patch # below. # # Signed-off-by: James Morris # Signed-off-by: Stephen Smalley # Signed-off-by: Kaigai Kohei # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/ss/sidtab.c # 2004/10/28 00:39:48-07:00 jmorris@redhat.com +13 -8 # SELinux: fix sidtab locking bug # # ChangeSet # 2004/10/28 08:18:38-07:00 jmorris@redhat.com # [PATCH] SELinux: fix netif bugs and simplify. # # This patch fixes and simplifies locking in the SELiunux netif cache. # # An old problem (which I forgot about) is fixed where a netif lookup can be # followed by a preemption, causing a race against sel_netif_put(). Kaigai # Kohei discovered a problem where netif lookups were also not protected # against races with sel_netif_flush(). # # The code has now been reworked to fix these problems, eliminate the # refcounting and remove atomic operations entirely from the read path # (generally making better use of RCU). The avc entry ref has been removed # as part of this simplification in anticipation of an RCU scalability patch # which removes them in general. # # Signed-off-by: James Morris # Signed-off-by: Stephen Smalley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/netif.c # 2004/10/28 00:39:48-07:00 jmorris@redhat.com +75 -45 # SELinux: fix netif bugs and simplify. # # security/selinux/include/objsec.h # 2004/10/28 00:39:48-07:00 jmorris@redhat.com +0 -1 # SELinux: fix netif bugs and simplify. # # security/selinux/include/netif.h # 2004/10/28 00:39:48-07:00 jmorris@redhat.com +1 -10 # SELinux: fix netif bugs and simplify. # # security/selinux/hooks.c # 2004/10/28 00:39:48-07:00 jmorris@redhat.com +13 -30 # SELinux: fix netif bugs and simplify. # # ChangeSet # 2004/10/28 08:18:25-07:00 jgarzik@pobox.com # [PATCH] add nth_page() # # Provide a function to get the pageframe number of the nth page at # scatterlist.page. We cannot just index off scatterlist.page because the # physically-contiguous pages may not be contiguous in mem_map[]. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/mm.h # 2004/10/28 00:56:39-07:00 jgarzik@pobox.com +2 -0 # add nth_page() # # ChangeSet # 2004/10/28 08:18:13-07:00 hugh@veritas.com # [PATCH] anon cris align address_space # # CRIS does not demand alignment, so PageAnon's PAGE_MAPPING_ANON bit got # mixed up with the low bit of the struct address_space *mapping pointer. # # Patch based on that from Mikael Starvik, but moved the alignment to the # declaration of struct address_space itself, and align to sizeof(long) so # it's well-aligned on all architectures. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/fs.h # 2004/10/28 00:56:35-07:00 hugh@veritas.com +6 -1 # anon cris align address_space # # ChangeSet # 2004/10/28 08:18:00-07:00 hugh@veritas.com # [PATCH] tmpfs truncate latency # # High latency observed when deleting a large video file from tmpfs. # # shmem_truncate held info->lock (easily dropped) and nested atomic kmaps # (more awkward to handle, since it's structured to keep them) while scanning # the many pages of its swap vector. Now be prepared to cond_resched every # 64 ops (but scan an empty page in one go). # # shmem_free_pages to free a linked list of empty swap vector pages at the # end (cond_resched every 64): could still free them one by one in the main # loop, but this foreshadows scalability changes - which will want to use RCU # on them, only freeing the pages after a grace period. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/shmem.c # 2004/10/28 00:39:47-07:00 hugh@veritas.com +118 -62 # tmpfs truncate latency # # ChangeSet # 2004/10/28 08:17:47-07:00 hugh@veritas.com # [PATCH] omit CommitAvail # # CommitLimit was a good addition to /proc/meminfo, but we don't usually show # both what's used and what's free: don't waste lines of screenspace, omit # CommitAvail, let the user do the arithmetic as with all the others. And in # updating that Documentation, removed the long-gone ReverseMaps. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/proc/proc_misc.c # 2004/10/28 00:39:48-07:00 hugh@veritas.com +0 -2 # omit CommitAvail # # Documentation/vm/overcommit-accounting # 2004/10/28 00:39:48-07:00 hugh@veritas.com +2 -3 # omit CommitAvail # # Documentation/filesystems/proc.txt # 2004/10/28 00:39:48-07:00 hugh@veritas.com +0 -14 # omit CommitAvail # # ChangeSet # 2004/10/28 08:17:35-07:00 hugh@veritas.com # [PATCH] statm: fix negative data # # The sixth "data" field of /proc/$pid/statm was sometimes negative: text is # a subset of shared_vm, and so was subtracted twice from total_vm. # # Signed-off-by: Hugh Dickins # Acked-by: William Irwin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/proc/task_mmu.c # 2004/10/28 00:39:47-07:00 hugh@veritas.com +1 -1 # statm: fix negative data # # ChangeSet # 2004/10/28 08:17:23-07:00 hugh@veritas.com # [PATCH] statm: shared = rss - anon_rss # # The third "shared" field of /proc/$pid/statm in 2.4 was a count of pages in # the mm whose page_count is more than 1 (oddly, including pages shared just # with swapcache). That's too costly to calculate each time, so 2.6 changed # it to the total file-backed extent. But Andrea knows apps and users # surprised when (rss - shared) goes negative: we need to provide an rss-like # statistic, close to the 2.4 interpretation. # # Something that's quick and easy to maintain accurately is mm->anon_rss, the # count of anonymous pages in the mm. Then shared = rss - anon_rss gives a # pretty good and meaningful approximation to 2.4's intention: wli confirms # that this will be useful to Oracle too. # # Where to show it? I think it's best to treat this as a bugfix and show it # in the third field of /proc/$pid/statm, after resident, as before - there's # no evidence that the total file-backed extent was found useful. # # Albert would like other fields to revert to page counts, but that's a lot # harder: if mprotect can change the category of a page, then it can't be # accounted as simply as this. Only go that route if real need shown. # # Signed-off-by: Hugh Dickins # Acked-by: William Irwin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/rmap.c # 2004/10/28 00:39:47-07:00 hugh@veritas.com +3 -0 # statm: shared = rss - anon_rss # # mm/memory.c # 2004/10/28 00:56:39-07:00 hugh@veritas.com +7 -1 # statm: shared = rss - anon_rss # # kernel/fork.c # 2004/10/28 00:56:32-07:00 hugh@veritas.com +1 -0 # statm: shared = rss - anon_rss # # include/linux/sched.h # 2004/10/28 00:56:31-07:00 hugh@veritas.com +2 -2 # statm: shared = rss - anon_rss # # fs/proc/task_mmu.c # 2004/10/28 00:56:48-07:00 hugh@veritas.com +1 -1 # statm: shared = rss - anon_rss # # ChangeSet # 2004/10/28 08:17:10-07:00 hugh@veritas.com # [PATCH] statm: __vm_stat_accounting # # The procfs shared_vm accounting in do_mmap_pgoff didn't balance with munmap # in the case of shared anonymous: because file comes in NULL, whereas # vm_file gets set at the end by shmem_zero_setup. # # Update file; and update vm_flags (a driver is likely to add VM_IO or # VM_RESERVED, modifying reserved_vm); and update pgoff (doesn't affect # procfs accounting, but could affect vma_merge - though at present all # drivers which modify vm_pgoff set a VM_SPECIAL which prevents merging). # And do that __vm_stat_account before advancing to make_pages_present. # # Signed-off-by: Hugh Dickins # Acked-by: William Irwin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mmap.c # 2004/10/28 00:39:47-07:00 hugh@veritas.com +4 -1 # statm: __vm_stat_accounting # # ChangeSet # 2004/10/28 08:16:58-07:00 hugh@veritas.com # [PATCH] shmem NUMA policy spinlock # # The NUMA policy for shared memory or tmpfs page allocation was protected by # a semaphore. It helps to improve scalability if we change that to a # spinlock (and there's only one place that needs to drop and reacquire). # Oh, and don't even bother to get the spinlock while the tree is empty. # # Acked-by: Andi Kleen # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mempolicy.c # 2004/10/28 00:39:47-07:00 hugh@veritas.com +25 -13 # shmem NUMA policy spinlock # # include/linux/mempolicy.h # 2004/10/28 00:39:47-07:00 hugh@veritas.com +3 -3 # shmem NUMA policy spinlock # # ChangeSet # 2004/10/28 08:16:45-07:00 dhowells@redhat.com # [PATCH] move key_init to security_initcall # # During system boot many probes, etc. will generate upcalls to userspace # via call_usermodehelper(). This has the effect of calling execve() before # the key subsystem has been initialized, and thus Oopsing on a NULL key_jar # during key_alloc(). Move key_init to security_initcall so that it's called # along with other security initialization routines which have similar # requirements. # # Signed-off-by: Chris Wright # Signed-off-by: David Howells # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/keys/key.c # 2004/10/28 00:39:47-07:00 dhowells@redhat.com +1 -1 # move key_init to security_initcall # # ChangeSet # 2004/10/28 16:16:03+01:00 aia21@cantab.net # NTFS: Implement extension of resident files in the regular file write code # paths (fs/ntfs/aops.c::ntfs_{prepare,commit}_write()). At present # this only works until the data attribute becomes too big for the mft # record after which we abort the write returning -EOPNOTSUPP from # ntfs_prepare_write(). # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/aops.c # 2004/10/28 16:15:54+01:00 aia21@cantab.net +209 -179 # Implement extension of resident files in the regular file write code # paths (ntfs_{prepare,commit}_write()). At present this only works # until the data attribute becomes too big for the mft record after # which we abort the write returning -EOPNOTSUPP from ntfs_prepare_write(). # # fs/ntfs/ChangeLog # 2004/10/28 16:15:54+01:00 aia21@cantab.net +5 -0 # Update # # ChangeSet # 2004/10/28 16:07:13+01:00 aia21@cantab.net # NTFS: In fs/ntfs/aops.c::ntfs_writepage(), if t he page is fully outside # i_size, i.e. race with truncate, invalidate the buffers on the page # so that they become freeable and hence the page does not leak. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/aops.c # 2004/10/28 16:07:03+01:00 aia21@cantab.net +7 -1 # In ntfs_writepage(), if t he page is fully outside i_size, i.e. race # with truncate, invalidate the buffers on the page so that they become # freeable and hence the page does not leak. # # fs/ntfs/ChangeLog # 2004/10/28 16:07:03+01:00 aia21@cantab.net +3 -0 # Update # # ChangeSet # 2004/10/28 04:40:45-04:00 len.brown@intel.com # Merge # # include/asm-x86_64/processor.h # 2004/10/28 04:40:44-04:00 len.brown@intel.com +0 -0 # SCCS merged # # include/asm-i386/processor.h # 2004/10/28 04:40:44-04:00 len.brown@intel.com +0 -0 # SCCS merged # # include/asm-ia64/processor.h # 2004/10/28 04:35:33-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/serial/8250_pnp.c # 2004/10/28 04:35:33-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/pnp/pnpbios/rsparser.c # 2004/10/28 04:35:33-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/pnp/pnpbios/core.c # 2004/10/28 04:35:33-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/scan.c # 2004/10/28 04:35:33-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/10/28 04:35:33-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/process.c # 2004/10/28 04:35:33-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/ia64/kernel/process.c # 2004/10/28 04:35:33-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/pci/irq.c # 2004/10/28 04:35:33-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/process.c # 2004/10/28 04:35:33-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/io_apic.c # 2004/10/28 04:35:33-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/28 04:33:10-04:00 len.brown@intel.com # [ACPI] fix video module unload oops # # Signed-off-by: Luming Yu # Signed-off-by: Len Brown # # drivers/acpi/video.c # 2004/10/28 02:49:39-04:00 len.brown@intel.com +31 -5 # Import patch fix_proc_failure.patch # # ChangeSet # 2004/10/28 02:42:56-04:00 len.brown@intel.com # [ACPI] create ACPI-based PNP driver. # # With this driver, legacy device drivers (floppy ACPI driver, # COM ACPI driver, and ACPI motherboard driver) which # directly use ACPI can be removed, since now we have unified PNP # interface for legacy ACPI enumerated devices. # # Originally by Matthieu Castet # Signed-off-by: Li Shaohua # Signed-off-by: Len Brown # # include/linux/pnp.h # 2004/10/18 05:36:19-04:00 len.brown@intel.com +1 -0 # Import patch pnp-acpi.patch # # drivers/pnp/resource.c # 2004/10/18 05:53:34-04:00 len.brown@intel.com +5 -0 # Import patch pnp-acpi.patch # # drivers/pnp/pnpbios/core.c # 2004/10/18 07:14:42-04:00 len.brown@intel.com +11 -0 # Import patch pnp-acpi.patch # # drivers/pnp/pnpbios/Kconfig # 2004/10/18 07:12:20-04:00 len.brown@intel.com +2 -1 # Import patch pnp-acpi.patch # # drivers/pnp/pnpacpi/rsparser.c # 2004/10/18 05:51:11-04:00 len.brown@intel.com +818 -0 # Import patch pnp-acpi.patch # # drivers/pnp/pnpacpi/pnpacpi.h # 2004/10/18 05:42:28-04:00 len.brown@intel.com +13 -0 # Import patch pnp-acpi.patch # # drivers/pnp/pnpacpi/core.c # 2004/10/18 07:04:43-04:00 len.brown@intel.com +272 -0 # Import patch pnp-acpi.patch # # drivers/pnp/pnpacpi/Makefile # 2004/10/18 05:42:28-04:00 len.brown@intel.com +5 -0 # Import patch pnp-acpi.patch # # drivers/pnp/pnpacpi/Kconfig # 2004/10/18 07:11:43-04:00 len.brown@intel.com +18 -0 # Import patch pnp-acpi.patch # # drivers/pnp/isapnp/Kconfig # 2004/10/18 05:36:19-04:00 len.brown@intel.com +1 -1 # Import patch pnp-acpi.patch # # drivers/pnp/Makefile # 2004/10/18 05:36:19-04:00 len.brown@intel.com +1 -0 # Import patch pnp-acpi.patch # # drivers/pnp/pnpacpi/rsparser.c # 2004/10/18 05:51:11-04:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-stable-dev/drivers/pnp/pnpacpi/rsparser.c # # drivers/pnp/pnpacpi/pnpacpi.h # 2004/10/18 05:42:28-04:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-stable-dev/drivers/pnp/pnpacpi/pnpacpi.h # # drivers/pnp/pnpacpi/core.c # 2004/10/18 07:04:43-04:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-stable-dev/drivers/pnp/pnpacpi/core.c # # drivers/pnp/pnpacpi/Makefile # 2004/10/18 05:42:28-04:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-stable-dev/drivers/pnp/pnpacpi/Makefile # # drivers/pnp/pnpacpi/Kconfig # 2004/10/18 07:11:43-04:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-stable-dev/drivers/pnp/pnpacpi/Kconfig # # drivers/pnp/Kconfig # 2004/10/18 05:36:19-04:00 len.brown@intel.com +3 -1 # Import patch pnp-acpi.patch # # ChangeSet # 2004/10/28 02:25:50-04:00 len.brown@intel.com # [ACPI] export acpi_match_ids() # # Signed-off-by: David Shaohua Li # Signed-off-by: Len Brown # # include/acpi/acpi_bus.h # 2004/10/28 02:25:07-04:00 len.brown@intel.com +3 -1 # Import patch acpi_match.patch # # drivers/acpi/scan.c # 2004/10/28 02:23:42-04:00 len.brown@intel.com +4 -10 # Import patch acpi_match.patch # # ChangeSet # 2004/10/28 02:17:14-04:00 len.brown@intel.com # [ACPI] introduces acpi_penalize_isa_irq() to to avoid PCI # devices use IRQ of legacy PNP devices. # # Signed-off-by: David Shaohua Li # Signed-off-by: Len Brown # # include/linux/acpi.h # 2004/09/21 22:09:23-04:00 len.brown@intel.com +1 -0 # Import patch irq-isa.patch # # drivers/pnp/pnpbios/rsparser.c # 2004/09/21 22:31:09-04:00 len.brown@intel.com +2 -0 # Import patch irq-isa.patch # # drivers/acpi/pci_link.c # 2004/09/21 22:08:09-04:00 len.brown@intel.com +5 -0 # Import patch irq-isa.patch # # arch/i386/pci/irq.c # 2004/09/21 22:27:30-04:00 len.brown@intel.com +14 -2 # Import patch irq-isa.patch # # ChangeSet # 2004/10/28 02:11:14-04:00 len.brown@intel.com # 8250_pnp serial_req.port_high fix for Tiger # # Signed-off-by: David Shaohua Li # Signed-off-by: Len Brown # # drivers/serial/8250_pnp.c # 2004/09/27 23:28:14-04:00 len.brown@intel.com +1 -1 # Import patch 8250.patch # # ChangeSet # 2004/10/28 01:51:54-04:00 len.brown@intel.com # [PATCH] apply recent ES7000 ACPI interrupt fix to MPS mode # # Before: # IRQ26 -> 0:10-> 1:2 # IRQ27 -> 0:11-> 1:3 # # After: # IRQ26 -> 1:2 # IRQ27 -> 1:3 # IRQ58 -> 0:10 # IRQ59 -> 0:11 # # Signed-off-by: Natalie Protasevich # Signed-off-by: Len Brown # # arch/i386/kernel/io_apic.c # 2004/10/27 10:02:52-04:00 len.brown@intel.com +5 -2 # Import patch pin-2-irq.patch # # ChangeSet # 2004/10/28 01:07:53-04:00 len.brown@intel.com # [ACPI] C1 fixes when processor driver is loaded # honor "halt=" cmdline parameter # use monitor/mwait when available # http://bugzilla.kernel.org/show_bug.cgi?id=2280 # # Signed-off-by: Venkatesh Pallipadi # Signed-off-by: Len Brown # # include/asm-x86_64/processor.h # 2004/10/26 15:58:51-04:00 len.brown@intel.com +2 -0 # Import patch venki-c1.patch # # include/asm-ia64/processor.h # 2004/10/26 15:58:24-04:00 len.brown@intel.com +2 -0 # Import patch venki-c1.patch # # include/asm-i386/processor.h # 2004/10/26 15:57:05-04:00 len.brown@intel.com +2 -0 # Import patch venki-c1.patch # # drivers/acpi/processor.c # 2004/10/26 17:11:53-04:00 len.brown@intel.com +27 -14 # Import patch venki-c1.patch # # arch/x86_64/kernel/process.c # 2004/10/26 15:56:11-04:00 len.brown@intel.com +4 -0 # Import patch venki-c1.patch # # arch/ia64/kernel/process.c # 2004/10/26 15:55:26-04:00 len.brown@intel.com +2 -0 # Import patch venki-c1.patch # # arch/i386/kernel/process.c # 2004/10/26 17:02:56-04:00 len.brown@intel.com +4 -0 # Import patch venki-c1.patch # # ChangeSet # 2004/10/27 21:34:02-07:00 herbert@gondor.apana.org.au # [ETHTOOL]: Enforce SG requires TX csum rule. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/core/ethtool.c # 2004/10/27 21:33:42-07:00 herbert@gondor.apana.org.au +30 -1 # [ETHTOOL]: Enforce SG requires TX csum rule. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/27 21:32:34-07:00 herbert@gondor.apana.org.au # [XFRM]: Don't panic in xfrm_user_init # # Since xfrm_user can be built as a module it's best not to panic # when something goes wrong in xfrm_user_init. Call me a wimp for # not fixing netlink_kernel_init's return value :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_user.c # 2004/10/27 21:32:14-07:00 herbert@gondor.apana.org.au +1 -2 # [XFRM]: Don't panic in xfrm_user_init # # Since xfrm_user can be built as a module it's best not to panic # when something goes wrong in xfrm_user_init. Call me a wimp for # not fixing netlink_kernel_init's return value :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/27 21:31:44-07:00 herbert@gondor.apana.org.au # [NETLINK]: Check netlink_insert in kernel_create # # This patch checks the return value of netlink_insert() in # netlink_kernel_create(). It could fail if someone loads # the same module twice for instance. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/netlink/af_netlink.c # 2004/10/27 21:31:13-07:00 herbert@gondor.apana.org.au +4 -1 # [NETLINK]: Check netlink_insert in kernel_create # # This patch checks the return value of netlink_insert() in # netlink_kernel_create(). It could fail if someone loads # the same module twice for instance. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/27 21:14:44-07:00 gerg@snapgear.com # [PATCH] update total_vm on non-MMU configurations # # This patch fixes 3 problems with the nommu.c support code: # # 1. export mem_map and vmtruncate (to make them the same as MMU version) # # 2. update the total_vm usage in mmap routines # Without this the OOM killer has no "badness" points to rate # processes on... # # This patch was originally submitted by Giovanni Casoli # for a 2.4.26 kernel. # I applied it to the 2.6.9 code. # # 3. provide stub for arch_get_unmapped_area # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # mm/nommu.c # 2004/10/27 18:15:15-07:00 gerg@snapgear.com +18 -1 # update total_vm on non-MMU configurations # # ChangeSet # 2004/10/27 21:14:32-07:00 gerg@snapgear.com # [PATCH] support all relocation types for m68knommu modules # # Add code to support the apply_relocate_add() function, needed to # support all relocation types of the m68k and Coldfire families. # This code is straight out of the m68k support for this. # # Patch was originally from Christian Magnusson # # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/kernel/module.c # 2004/10/27 18:11:41-07:00 gerg@snapgear.com +32 -3 # support all relocation types for m68knommu modules # # ChangeSet # 2004/10/27 21:14:20-07:00 gerg@snapgear.com # [PATCH] remove other unused shglcores.h include # # Remove remaining unused shglcores.h include. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-shglports.h~c8ba727a2ef6d4b0 # 2004/10/27 21:14:13-07:00 gerg@snapgear.com +0 -0 # Delete: include/asm-m68knommu/shglports.h # # ChangeSet # 2004/10/27 21:14:07-07:00 gerg@snapgear.com # [PATCH] remove unused shglcore.h include # # Remove unused shglcore.h include. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-shglcore.h~c60e86894f746001 # 2004/10/27 21:14:00-07:00 gerg@snapgear.com +0 -0 # Delete: include/asm-m68knommu/shglcore.h # # ChangeSet # 2004/10/27 21:13:57-07:00 gerg@snapgear.com # [PATCH] clean up HZ definition # # Clean up the definition of HZ on m68knommu systems. # There is really only a couple of cases to handle, most # boards use the traditional 100Hz still. Only special # case out those that don't. The current code is just # spaghetti. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/param.h # 2004/10/27 18:14:34-07:00 gerg@snapgear.com +3 -30 # clean up HZ definition # # ChangeSet # 2004/10/27 21:13:44-07:00 gerg@snapgear.com # [PATCH] remove unused shglcore support # # Remove unused SHGLCORE support. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/page_offset.h # 2004/10/27 18:14:34-07:00 gerg@snapgear.com +0 -4 # remove unused shglcore support # # ChangeSet # 2004/10/27 21:13:32-07:00 gerg@snapgear.com # [PATCH] remove uneeded includes (5307/config.c) # # Remove uneeded includes. asm/delay.h is not needed here. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5307/config.c # 2004/10/27 18:11:45-07:00 gerg@snapgear.com +0 -1 # remove uneeded includes (5307/config.c) # # ChangeSet # 2004/10/27 21:13:20-07:00 gerg@snapgear.com # [PATCH] remove uneeded includes (5249/config.c) # # Remove uneeded includes. asm/delay.h is not needed here. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5249/config.c # 2004/10/27 18:11:42-07:00 gerg@snapgear.com +0 -1 # remove uneeded includes (5249/config.c) # # ChangeSet # 2004/10/27 21:13:07-07:00 gerg@snapgear.com # [PATCH] remove uneeded includes (5206e/config.c) # # Remove uneeded includes. asm/delay.h is not needed here. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5206e/config.c # 2004/10/27 18:11:42-07:00 gerg@snapgear.com +0 -1 # remove uneeded includes (5206e/config.c) # # ChangeSet # 2004/10/27 21:12:55-07:00 gerg@snapgear.com # [PATCH] remove unused include in m68knommu mm/memory.c # # Remove unused shglcore.h include from m68knommu/mm/memory.c # That file will be removed in an upcoming patch. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/mm/memory.c # 2004/10/27 18:11:42-07:00 gerg@snapgear.com +0 -1 # remove unused include in m68knommu mm/memory.c # # ChangeSet # 2004/10/27 21:12:43-07:00 gerg@snapgear.com # [PATCH] remove unused include in m68knommu mm/init.c # # Remove unused shglcore.h include from m68knommu/mm/init.c # That file will be removed in an upcoming patch. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/mm/init.c # 2004/10/27 18:11:42-07:00 gerg@snapgear.com +0 -1 # remove unused include in m68knommu mm/init.c # # ChangeSet # 2004/10/27 22:59:13-04:00 jgarzik@pobox.com # [libata] cosmetic libata.h changes to make merging with 2.4 easier # # include/linux/libata.h # 2004/10/27 22:59:07-04:00 jgarzik@pobox.com +2 -3 # [libata] cosmetic libata.h changes to make merging with 2.4 easier # # ChangeSet # 2004/10/27 18:50:42-07:00 torvalds@ppc970.osdl.org # Fix kbuild problem with O= # # Kbuild can't fix up "-I $(src)/.." to the right directory # due to the particular magic transformations it does on -I # arguments. Remove the space, use "-I$(src)/.." and it works. # # Hopefully Sam will fix this build issue. # # I think somebody should dress up as scripts/Makefile.lib # for Halloween. Now _that_ would be scary. # # drivers/media/video/cx88/Makefile # 2004/10/27 18:50:35-07:00 torvalds@ppc970.osdl.org +1 -1 # Fix kbuild problem with O= # # Kbuild can't fix up "-I $(src)/.." to the right directory # due to the particular magic transformations it does on -I # arguments. Remove the space, use "-I$(src)/.." and it works. # # Hopefully Sam will fix this build issue. # # I think somebody should dress up as scripts/Makefile.lib # for Halloween. Now _that_ would be scary. # # ChangeSet # 2004/10/27 18:25:29-07:00 torvalds@ppc970.osdl.org # Fix atyfb modular build on ppc. # # Noted by Al Viro, superhacker and endlessly patient person. # # Sign up today! # # You too can become a superhacker by setting up a cross-compile # environment for all architectures and building "allmodconfig" # trees all day long to find places where others have screwed up. # # drivers/video/aty/atyfb_base.c # 2004/10/27 18:25:22-07:00 torvalds@ppc970.osdl.org +5 -6 # Fix atyfb modular build on ppc. # # Noted by Al Viro, superhacker and endlessly patient person. # # Sign up today! # # You too can become a superhacker by setting up a cross-compile # environment for all architectures and building "allmodconfig" # trees all day long to find places where others have screwed up. # # ChangeSet # 2004/10/27 18:16:37-07:00 randolph@tausq.org # [PATCH] Fix cc-option call for xcompiles # # If an arch Makefile overrides CROSS_COMPILE (e.g. parisc, mips, ...) # then the cc-option call in the main Makefile uses the wrong compiler # to check for options. # # Signed-off-by: Randolph Chung # Signed-off-by: Linus Torvalds # # Makefile # 2004/10/27 16:16:30-07:00 randolph@tausq.org +2 -2 # Fix cc-option call for xcompiles # # ChangeSet # 2004/10/27 18:16:25-07:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] FB_INTEL Kconfig breakage # # FB_INTEL selects AGP_INTEL (i.e. intel-agp.c), which is i386-only. # AGP_INTEL itself depends on X86 && !X86_64 and for a good reason - it doesn't # build elsewhere. # # Added dependency to FB_INTEL itself; as it is allmodconfig had been # broken on everything outside i386. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/video/Kconfig # 2004/10/27 01:21:16-07:00 viro@parcelfarce.linux.theplanet.co.uk +1 -1 # FB_INTEL Kconfig breakage # # ChangeSet # 2004/10/27 16:33:17-07:00 greearb@candelatech.com # [VLAN]: Sync code and feature set with 2.4.x # # Signed-off-by: David S. Miller # # net/8021q/vlan_dev.c # 2004/10/27 16:32:46-07:00 greearb@candelatech.com +57 -6 # [VLAN]: Sync code and feature set with 2.4.x # # net/8021q/vlan.h # 2004/10/27 16:32:46-07:00 greearb@candelatech.com +2 -0 # [VLAN]: Sync code and feature set with 2.4.x # # net/8021q/vlan.c # 2004/10/27 16:32:46-07:00 greearb@candelatech.com +50 -17 # [VLAN]: Sync code and feature set with 2.4.x # # include/linux/if_vlan.h # 2004/10/27 16:32:46-07:00 greearb@candelatech.com +3 -1 # [VLAN]: Sync code and feature set with 2.4.x # # ChangeSet # 2004/10/27 15:56:14-07:00 trini@kernel.crashing.org # ppc32: Remove sandpoint_early_serial_map() # # This was causing problems and isn't needed. # # Signed-off-by: Randy Vinson # Signed-off-by: Tom Rini # # arch/ppc/platforms/sandpoint.c # 2004/10/27 15:55:36-07:00 trini@kernel.crashing.org +0 -36 # Remove sandpoint_early_serial_map(). # # ChangeSet # 2004/10/27 23:23:24+01:00 nico@org.rmk.(none) # [ARM PATCH] 2080/1: clean up io-{read|write}sl # # Patch from Nicolas Pitre # # - eliminate difference between ARMv3 and ARMv4 versions of io-readsl # - unified little/big endian support # - misc optimisations # # Signed-off-by: Nicolas Pitre # # arch/arm/lib/io-writesl.S # 2004/09/07 21:09:12+01:00 nico@org.rmk.(none) +32 -26 # [PATCH] 2080/1: clean up io-{read|write}sl # # arch/arm/lib/Makefile # 2004/09/07 21:14:33+01:00 nico@org.rmk.(none) +3 -3 # [PATCH] 2080/1: clean up io-{read|write}sl # # arch/arm/lib/io-readsl.S # 2004/10/27 23:19:56+01:00 nico@org.rmk.(none) +79 -0 # # arch/arm/lib/io-readsl.S # 2004/10/27 23:19:56+01:00 nico@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/lib/io-readsl.S # # BitKeeper/deleted/.del-io-readsl-armv4.S~d2b5ac49a016718a # 2004/10/27 23:19:55+01:00 nico@org.rmk.(none) +0 -0 # Delete: arch/arm/lib/io-readsl-armv4.S # # BitKeeper/deleted/.del-io-readsl-armv3.S~1f9b970464df2172 # 2004/10/27 23:19:54+01:00 nico@org.rmk.(none) +0 -0 # Delete: arch/arm/lib/io-readsl-armv3.S # # ChangeSet # 2004/10/27 15:07:39-07:00 trini@kernel.crashing.org # ppc32: Fix warning in gen550 code. # # In gen550_dbg.c, cast addr in our direct_inb/oub routines to # __iomem. # # Signed-off-by: Randy Vinson # Signed-off-by: Tom Rini # # arch/ppc/syslib/gen550_dbg.c # 2004/10/27 15:07:21-07:00 trini@kernel.crashing.org +2 -2 # In our direct_inb/outb routines, cast addr to __iomem. # # ChangeSet # 2004/10/27 15:05:27-07:00 trini@kernel.crashing.org # ppc32: Move request_irq() calls to arch_initcall() functions # # request_irq() needs to be called a bit later than we were # doing before, causing crashes. # # Signed-off-by: Randy Vinson # Signed-off-by: Tom Rini # # arch/ppc/syslib/i8259.c # 2004/10/27 15:05:16-07:00 trini@kernel.crashing.org +11 -3 # Move the call to request_irq to its own arch_initcall function. # # arch/ppc/syslib/Makefile # 2004/10/27 15:05:16-07:00 trini@kernel.crashing.org +2 -1 # Only include i8259.o on MVME5100_IPMC761_PRESENT. # # arch/ppc/platforms/sandpoint.c # 2004/10/27 15:05:16-07:00 trini@kernel.crashing.org +9 -2 # Move the call to openpic_hookup_cascade to its own arch_initcall # function. # # arch/ppc/platforms/prep_setup.c # 2004/10/27 15:05:16-07:00 trini@kernel.crashing.org +10 -3 # Move the call to openpic_hookup_cascade to its own arch_initcall # function. # # arch/ppc/platforms/pplus.c # 2004/10/27 15:05:16-07:00 trini@kernel.crashing.org +10 -2 # Move the call to openpic_hookup_cascade to its own arch_initcall # function. # # arch/ppc/platforms/mvme5100.c # 2004/10/27 15:05:16-07:00 trini@kernel.crashing.org +12 -3 # Move the call to openpic_hookup_cascade to its own arch_initcall # function. # # arch/ppc/platforms/mcpn765.c # 2004/10/27 15:05:16-07:00 trini@kernel.crashing.org +9 -2 # Move the call to openpic_hookup_cascade to its own arch_initcall # function. # # arch/ppc/platforms/lopec.c # 2004/10/27 15:05:16-07:00 trini@kernel.crashing.org +11 -4 # Move the call to openpic_hookup_cascade to its own arch_initcall # function. # # arch/ppc/platforms/chrp_setup.c # 2004/10/27 15:05:16-07:00 trini@kernel.crashing.org +10 -3 # Move the call to openpic_hookup_cascade to its own arch_initcall # function. # # ChangeSet # 2004/10/27 23:58:00+02:00 marcel@holtmann.org # [Bluetooth] Allow vendor specific packet types # # The vendor packet type 0xff is not handled at the moment. This patch # corrects this behaviour and also adapts the security filter for this # packet type. # # Signed-off-by: Marcel Holtmann # # ChangeSet # 2004/10/27 22:56:28+01:00 rmk@flint.arm.linux.org.uk # [MMC] Deprecate "req" member of mmc_data structure. # # Host drivers should now use the scatterlist rather than accessing # the request directly. This marks the request pointer as being # deprecated so that host driver authors get a chance to fix their # drivers up before we remove this member. # # net/bluetooth/hci_sock.c # 2004/10/27 23:54:40+02:00 marcel@holtmann.org +2 -1 # Allow vendor specific packet types # # include/net/bluetooth/hci.h # 2004/10/27 23:54:30+02:00 marcel@holtmann.org +1 -1 # Allow vendor specific packet types # # include/linux/mmc/mmc.h # 2004/10/27 22:53:03+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Deprecate "req" element of mmc_data structure. # # ChangeSet # 2004/10/27 23:48:28+02:00 marcel@holtmann.org # [Bluetooth] Fix another disconnect race # # When the selecting of the alternate setting for the SCO audio support # fails, the hci_usb_disconnect() will dereference a NULL pointer. To # avoid this, the isoc_iface variable must be set before releasing the # interface and unset afterwards. # # Signed-off-by: Marcel Holtmann # # ChangeSet # 2004/10/27 22:44:54+01:00 tony@com.rmk.(none) # [ARM PATCH] 2173/1: OMAP update 7/8, take 3: Add PM support # # Patch from Tony Lindgren # # This patch by Dirk Behme, Todd Poynor et al adds power management # support for OMAP. Suspend works on at least 1510 and 16xx. # # Signed-off-by: Tony Lindgren # # # drivers/bluetooth/hci_usb.c # 2004/10/27 23:42:21+02:00 marcel@holtmann.org +8 -0 # Fix another disconnect race # # include/asm-arm/arch-omap/pm.h # 2004/10/18 17:20:19+01:00 tony@com.rmk.(none) +151 -108 # [PATCH] 2173/1: OMAP update 7/8, take 3: Add PM support # # arch/arm/mach-omap/sleep.S # 2004/10/26 01:06:40+01:00 tony@com.rmk.(none) +314 -0 # [PATCH] 2173/1: OMAP update 7/8, take 3: Add PM support # # arch/arm/mach-omap/sleep.S # 2004/10/26 01:06:40+01:00 tony@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-omap/sleep.S # # arch/arm/mach-omap/pm.c # 2004/10/27 20:16:28+01:00 tony@com.rmk.(none) +621 -0 # [PATCH] 2173/1: OMAP update 7/8, take 3: Add PM support # # arch/arm/mach-omap/pm.c # 2004/10/27 20:16:28+01:00 tony@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-omap/pm.c # # ChangeSet # 2004/10/27 22:39:45+01:00 rmk@flint.arm.linux.org.uk # [MMC] Switch PXAMCI to use supplied scatterlist. # # This converts the PXA MCI driver to use the supplied scatter list # rather than accessing the struct request directly, thereby making # this host driver independent of the block layer. # # We also clean up the driver to use a consistent driver name for # resources. # # drivers/mmc/pxamci.c # 2004/10/27 22:37:04+01:00 rmk@flint.arm.linux.org.uk +34 -33 # Convert PXAMCI to use supplied scatterlist. # Use consistent driver name throughout for resources. # # ChangeSet # 2004/10/27 23:35:49+02:00 marcel@holtmann.org # [Bluetooth] Ignore the BPA 100/105 devices # # The BPA 100/105 devices from Digianswer identify themself with the USB # class code for H:2 devices, but they are using quite a different host # transport protocol and so ignore them. # # Signed-off-by: Marcel Holtmann # # ChangeSet # 2004/10/27 14:35:28-07:00 chas@relax.cmf.nrl.navy.mil # [ATM]: don't leak skb on as_indicate failure; don't wakeup twice on as_close # # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/27 14:35:24-07:00 torvalds@ppc970.osdl.org # Fix up "compat_sys_keyctl()" system call. # # Fix name, and make sure that it's listed as a conditional # system call so that we stub it out to ENOSYS if the kernel # isn't compiled with key management support. # # security/keys/compat.c # 2004/10/27 14:35:17-07:00 torvalds@ppc970.osdl.org +2 -2 # Fix up "compat_sys_keyctl()" system call. # # Fix name, and make sure that it's listed as a conditional # system call so that we stub it out to ENOSYS if the kernel # isn't compiled with key management support. # # kernel/sys.c # 2004/10/27 14:35:17-07:00 torvalds@ppc970.osdl.org +1 -0 # Fix up "compat_sys_keyctl()" system call. # # Fix name, and make sure that it's listed as a conditional # system call so that we stub it out to ENOSYS if the kernel # isn't compiled with key management support. # # include/linux/compat.h # 2004/10/27 14:35:17-07:00 torvalds@ppc970.osdl.org +1 -1 # Fix up "compat_sys_keyctl()" system call. # # Fix name, and make sure that it's listed as a conditional # system call so that we stub it out to ENOSYS if the kernel # isn't compiled with key management support. # # arch/ppc64/kernel/misc.S # 2004/10/27 14:35:17-07:00 torvalds@ppc970.osdl.org +1 -1 # Fix up "compat_sys_keyctl()" system call. # # Fix name, and make sure that it's listed as a conditional # system call so that we stub it out to ENOSYS if the kernel # isn't compiled with key management support. # # net/atm/signaling.c # 2004/10/27 14:35:08-07:00 chas@relax.cmf.nrl.navy.mil +3 -1 # [ATM]: don't leak skb on as_indicate failure; don't wakeup twice on as_close # # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/27 14:30:35-07:00 davem@nuts.davemloft.net # Merge bk://kernel.bkbits.net/acme/sk_buff-2.6 # into nuts.davemloft.net:/disk1/BK/net-2.6 # # drivers/net/wan/wanxl.c # 2004/10/27 14:30:24-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/net/wan/hd6457x.c # 2004/10/27 14:30:24-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/net/wan/farsync.c # 2004/10/27 14:30:24-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/net/wan/dscc4.c # 2004/10/27 14:30:24-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/char/pcmcia/synclink_cs.c # 2004/10/27 14:30:24-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/char/synclinkmp.c # 2004/10/27 14:30:23-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/char/synclink.c # 2004/10/27 14:30:23-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/bluetooth/hci_usb.c # 2004/10/27 23:29:02+02:00 marcel@holtmann.org +4 -3 # Ignore the BPA 100/105 devices # # ChangeSet # 2004/10/27 14:27:50-07:00 laforge@netfilter.org # [NET]: Fix NLM_F_MULTI in tcp_diag and xfrm_user # # Signed-off-by: Harald Welte # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_user.c # 2004/10/27 14:27:31-07:00 laforge@netfilter.org +7 -2 # [NET]: Fix NLM_F_MULTI in tcp_diag and xfrm_user # # Signed-off-by: Harald Welte # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_diag.c # 2004/10/27 14:27:31-07:00 laforge@netfilter.org +5 -3 # [NET]: Fix NLM_F_MULTI in tcp_diag and xfrm_user # # Signed-off-by: Harald Welte # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # drivers/bluetooth/hci_usb.h # 2004/10/27 23:27:06+02:00 marcel@holtmann.org +0 -3 # Ignore the BPA 100/105 devices # # ChangeSet # 2004/10/27 14:24:02-07:00 tgraf@suug.ch # [PKT_SCHED]: Remove bogus lock and make cls_set_class return unsigned long. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_cls.h # 2004/10/27 14:23:43-07:00 tgraf@suug.ch +1 -3 # [PKT_SCHED]: Remove bogus lock and make cls_set_class return unsigned long. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/27 21:47:06+01:00 rmk@flint.arm.linux.org.uk # [MMC] Remove block knowledge from MMCI driver. # # Convert MMCI driver to use the scatter list provided by the upper # MMC layers. This removes all knowledge of struct request from the # MMCI driver. # # drivers/mmc/mmci.h # 2004/10/27 21:44:15+01:00 rmk@flint.arm.linux.org.uk +2 -6 # Remove our own scatterlist. # Use the scatterlist provided by the upper MMC layers instead. # # drivers/mmc/mmci.c # 2004/10/27 21:44:14+01:00 rmk@flint.arm.linux.org.uk +1 -1 # max_phys_segs should be set to NR_SG # # ChangeSet # 2004/10/27 21:38:11+01:00 rmk@flint.arm.linux.org.uk # [MMC] Add support for passing scatterlists to MMC host drivers. # # This is intended to remove block layer knowledge from MMC host # drivers. Host drivers are expected to use the scatter list for # data transfers rather than accessing the struct request. # # ChangeSet # 2004/10/27 13:36:23-07:00 hollisb@us.ibm.com # [PATCH] HVSI reset support # # This patch adds support for when the service processor (the # other end of the console) resets due to a critical error; we can resume # the connection when it comes back. # # Signed-off-by: Hollis Blanchard # Signed-off-by: Linus Torvalds # # drivers/char/hvsi.c # 2004/10/20 10:10:34-07:00 hollisb@us.ibm.com +81 -37 # HVSI reset support # # ChangeSet # 2004/10/27 13:36:10-07:00 hollisb@us.ibm.com # [PATCH] HVSI early boot console # # This patch adds support for the udbg early console interfaces # when using an HVSI console. # # Signed-off-by: Hollis Blanchard # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_lpar.c # 2004/10/07 03:52:23-07:00 hollisb@us.ibm.com +77 -5 # HVSI early boot console # # ChangeSet # 2004/10/27 13:35:58-07:00 hollisb@us.ibm.com # [PATCH] HVSI hangup oops # # Testing revealed that the HVSI driver could oops if carrier # detect dropped mid-data transfer. # # This fixes it by properly locking the hangup. # # Signed-off-by: Hollis Blanchard # Signed-off-by: Linus Torvalds # # drivers/char/hvsi.c # 2004/10/11 11:24:13-07:00 hollisb@us.ibm.com +6 -0 # HVSI hangup oops # # ChangeSet # 2004/10/27 13:34:52-07:00 dhowells@redhat.com # [PATCH] ppc/ppc64: hook up key management syscalls # # The attached patch permits my key management stuff to be used on PPC, PPC64 # and PPC on PPC64. Syscall numbers were allocated by Paul Mackerras. # # I've updated my keyctl utility to work on PPC/PPC64 too: # # http://people.redhat.com/~dhowells/keys/keyctl.c # # Signed-Off-By: David Howells # Signed-off-by: Linus Torvalds # # include/linux/mmc/mmc.h # 2004/10/27 21:34:50+01:00 rmk@flint.arm.linux.org.uk +3 -0 # Add request scatterlist pointers and scatterlist length. # # drivers/mmc/mmc_queue.h # 2004/10/27 21:34:50+01:00 rmk@flint.arm.linux.org.uk +1 -0 # Add per-queue scatter list. # # drivers/mmc/mmc_queue.c # 2004/10/27 21:34:50+01:00 rmk@flint.arm.linux.org.uk +19 -3 # Allocate (and free) per-queue scatter list. # # drivers/mmc/mmc_block.c # 2004/10/27 21:34:49+01:00 rmk@flint.arm.linux.org.uk +3 -0 # Convert block requests to a scatter list. # # security/keys/keyctl.c # 2004/10/21 03:54:48-07:00 dhowells@redhat.com +25 -29 # ppc/ppc64: hook up key management syscalls # # security/keys/internal.h # 2004/10/21 03:39:25-07:00 dhowells@redhat.com +20 -0 # ppc/ppc64: hook up key management syscalls # # security/keys/compat.c # 2004/10/22 06:02:07-07:00 dhowells@redhat.com +78 -0 # ppc/ppc64: hook up key management syscalls # # security/keys/Makefile # 2004/10/22 02:49:39-07:00 dhowells@redhat.com +1 -0 # ppc/ppc64: hook up key management syscalls # # include/linux/compat.h # 2004/10/22 03:02:14-07:00 dhowells@redhat.com +2 -0 # ppc/ppc64: hook up key management syscalls # # include/asm-ppc64/unistd.h # 2004/10/22 02:27:40-07:00 dhowells@redhat.com +4 -1 # ppc/ppc64: hook up key management syscalls # # include/asm-ppc/unistd.h # 2004/10/22 02:27:40-07:00 dhowells@redhat.com +4 -1 # ppc/ppc64: hook up key management syscalls # # arch/ppc64/kernel/sys_ppc32.c # 2004/10/22 05:55:56-07:00 dhowells@redhat.com +18 -0 # ppc/ppc64: hook up key management syscalls # # arch/ppc64/kernel/misc.S # 2004/10/22 03:08:44-07:00 dhowells@redhat.com +6 -0 # ppc/ppc64: hook up key management syscalls # # arch/ppc64/Kconfig # 2004/10/22 06:01:30-07:00 dhowells@redhat.com +5 -0 # ppc/ppc64: hook up key management syscalls # # arch/ppc/kernel/misc.S # 2004/10/22 02:27:40-07:00 dhowells@redhat.com +3 -0 # ppc/ppc64: hook up key management syscalls # # security/keys/compat.c # 2004/10/22 06:02:07-07:00 dhowells@redhat.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/security/keys/compat.c # # ChangeSet # 2004/10/27 13:16:54-07:00 torvalds@ppc970.osdl.org # Don't ask the user for esoteric compiler tweaks by default. # # You can get all the kernel tweaking if you say yes to EMBEDDED, # which exposes questions that make sense only for experts. # # init/Kconfig # 2004/10/27 13:16:47-07:00 torvalds@ppc970.osdl.org +4 -4 # Don't ask the user for esoteric compiler tweaks by default. # # You can get all the kernel tweaking if you say yes to EMBEDDED, # which exposes questions that make sense only for experts. # # ChangeSet # 2004/10/27 21:09:49+01:00 rmk@flint.arm.linux.org.uk # [MMC] Fix incorrectly balanced spin_lock_irq() # # drivers/mmc/mmc_queue.c # 2004/10/27 21:07:26+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Fix incorrectly balanced spin_lock_irq # # ChangeSet # 2004/10/27 21:02:08+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2172/1: S3C2410 - clock updates # # Patch from Ben Dooks # # This patch does the following: # # - move the clock initialisation to just after the cpu init # - add the two clocks for the s3c2440 # - add dclk0/1 and clkout0/1 definitions # - add list of clocks to the board specific struct # - fix initialisation of the clock control # - update handling of parent clocks for >1 parent # # this fixes the following problems: # # - serial console with no clock sources # - clocks specific to various boards # - hang if LCD controller enabled at start time # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/s3c2440.c # 2004/10/27 14:17:19+01:00 ben-linux@org.rmk.(none) +31 -0 # [PATCH] 2172/1: S3C2410 - clock updates # # arch/arm/mach-s3c2410/s3c2410.c # 2004/10/27 13:08:09+01:00 ben-linux@org.rmk.(none) +6 -0 # [PATCH] 2172/1: S3C2410 - clock updates # # arch/arm/mach-s3c2410/cpu.h # 2004/10/27 13:21:01+01:00 ben-linux@org.rmk.(none) +3 -0 # [PATCH] 2172/1: S3C2410 - clock updates # # arch/arm/mach-s3c2410/cpu.c # 2004/10/27 13:32:28+01:00 ben-linux@org.rmk.(none) +10 -0 # [PATCH] 2172/1: S3C2410 - clock updates # # arch/arm/mach-s3c2410/clock.h # 2004/10/27 13:18:37+01:00 ben-linux@org.rmk.(none) +20 -1 # [PATCH] 2172/1: S3C2410 - clock updates # # arch/arm/mach-s3c2410/clock.c # 2004/10/27 14:56:14+01:00 ben-linux@org.rmk.(none) +87 -11 # [PATCH] 2172/1: S3C2410 - clock updates # # ChangeSet # 2004/10/27 20:57:05+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2139/1: BAST - Power management initialisation # # Patch from Ben Dooks # # Allow power managemnet support for the Simtec EB2410ITX (BAST) # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/mach-bast.c # 2004/10/07 13:36:28+01:00 ben-linux@org.rmk.(none) +37 -0 # [PATCH] 2139/1: BAST - Power management initialisation # # ChangeSet # 2004/10/27 20:46:58+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2161/1: S3C2410 - uncompressor low level uart configuration # # Patch from Ben Dooks # # Allow the uncompressing messages to be sent to the UART # specified in the kernel configuration, instead of just # UART 0. This includes the Kconfig update to make this # option available all the time, and to rename it's # description text. # # This patch also fixes s3c2440 support for the # uncompressor # # Signed-off-by: Ben Dooks # # include/asm-arm/arch-s3c2410/uncompress.h # 2004/10/26 23:50:20+01:00 ben-linux@org.rmk.(none) +22 -4 # [PATCH] 2161/1: S3C2410 - uncompressor low level uart configuration # # arch/arm/Kconfig.debug # 2004/10/26 23:54:56+01:00 ben-linux@org.rmk.(none) +5 -2 # [PATCH] 2161/1: S3C2410 - uncompressor low level uart configuration # # ChangeSet # 2004/10/27 20:42:02+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2159/1: BAST - include/asm-arm/arch-s3c2410/bast-pmu.h # # Patch from Ben Dooks # # Header file for BAST Power Management unit register # definitions # # Signed-off-by: Ben Dooks # # include/asm-arm/arch-s3c2410/bast-pmu.h # 2004/10/08 16:07:59+01:00 ben-linux@org.rmk.(none) +43 -0 # [PATCH] 2159/1: BAST - include/asm-arm/arch-s3c2410/bast-pmu.h # # include/asm-arm/arch-s3c2410/bast-pmu.h # 2004/10/08 16:07:59+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/bast-pmu.h # # ChangeSet # 2004/10/27 20:37:05+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2158/1: S3C2410 - clean warnings from arch/arm/mach-s3c2410/pm.c # # Patch from Ben Dooks # # Clean warnings about unsigned long / unsigned int printk args # and update comment on debugging # # Depends on patch 2134/3 # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/pm.c # 2004/10/25 10:40:07+01:00 ben-linux@org.rmk.(none) +9 -7 # [PATCH] 2158/1: S3C2410 - clean warnings from arch/arm/mach-s3c2410/pm.c # # ChangeSet # 2004/10/27 20:32:05+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2157/2: S3C2410 - default configuration update # # Patch from Ben Dooks # # Updated default configurations for s3c2410 and bast # # Signed-off-by: Ben Dooks # # arch/arm/configs/s3c2410_defconfig # 2004/10/27 11:30:53+01:00 ben-linux@org.rmk.(none) +61 -20 # [PATCH] 2157/2: S3C2410 - default configuration update # # arch/arm/configs/bast_defconfig # 2004/10/27 11:31:20+01:00 ben-linux@org.rmk.(none) +94 -40 # [PATCH] 2157/2: S3C2410 - default configuration update # # ChangeSet # 2004/10/27 20:27:05+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2156/1: S3C2410 - Documentation updates # # Patch from Ben Dooks # # Update the following in Documentation/arm/Samsing-S3C24XX/ # # - mtd merge update # - list of contributors # - change history # # Signed-off-by: Ben Dooks # # Documentation/arm/Samsung-S3C24XX/Overview.txt # 2004/10/25 10:10:23+01:00 ben-linux@org.rmk.(none) +14 -5 # [PATCH] 2156/1: S3C2410 - Documentation updates # # Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt # 2004/10/25 10:12:12+01:00 ben-linux@org.rmk.(none) +19 -5 # [PATCH] 2156/1: S3C2410 - Documentation updates # # ChangeSet # 2004/10/27 20:22:06+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2155/1: S3C2410 - fix definition of S3C2410_UDC_MAXP_REG # # Patch from Ben Dooks # # Attached is the fix for the S3C2410_UDC_MAXP_REG # definition. # # Signed-off-by: Ben Dooks # Signed-off-by: Arnaud Patard # # include/asm-arm/arch-s3c2410/regs-udc.h # 2004/10/24 11:50:26+01:00 ben-linux@org.rmk.(none) +4 -3 # [PATCH] 2155/1: S3C2410 - fix definition of S3C2410_UDC_MAXP_REG # # ChangeSet # 2004/10/27 20:16:54+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2152/1: S3C2410 - lcd controller register fixes # # Patch from Ben Dooks # # Fix the mis-definition of the following registers / bits # in the s3c2410 LCD controller register header: # # - S3C2410_LCDCON1_MMODE # - S3C2410_LCDCON1_ENVID # - S3C2410_LCDCON3_HBPD # - S3C2410_LCDCON3_WDLY # # and adds the following missing register definitoons # # - S3C2410_LCDBANK # - S3C2410_LCDBASEU # - S3C2410_OFFSIZE # - S3C2410_PAGEWIDTH # # thanks to Arnaud Patard for finding these problems # # Signed-off-by: Ben Dooks # Signed-off-by: Arnaud Patard # # include/asm-arm/arch-s3c2410/regs-lcd.h # 2004/09/06 01:44:05+01:00 ben-linux@org.rmk.(none) +10 -4 # [PATCH] 2152/1: S3C2410 - lcd controller register fixes # # ChangeSet # 2004/10/27 20:11:45+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2151/1: S3C2410 - fix guard on include/asm-arm/arch-s3c2410/regs-iic.h # # Patch from Ben Dooks # # fix guard define so it does not clash with another header # file. # # Signed-off-by: Ben Dooks # # include/asm-arm/arch-s3c2410/regs-iic.h # 2004/10/20 14:19:10+01:00 ben-linux@org.rmk.(none) +3 -3 # [PATCH] 2151/1: S3C2410 - fix guard on include/asm-arm/arch-s3c2410/regs-iic.h # # ChangeSet # 2004/10/27 20:06:52+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2149/1: S3C2410 - usb-simtec.c fixes and cleanup # # Patch from Ben Dooks # # This patch does the following # # - removes the setup code to change device/host # behaviour, which does not belong here # # - tidies up the debug output # # - fixes the call to free_irq() to pass the # right info # # - ensures the usb code is notified when the # over-current condition is removed # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/usb-simtec.c # 2004/10/19 15:40:40+01:00 ben-linux@org.rmk.(none) +5 -15 # [PATCH] 2149/1: S3C2410 - usb-simtec.c fixes and cleanup # # ChangeSet # 2004/10/27 20:01:54+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2148/1: S3C2410 - I2C platfrom data # # Patch from Ben Dooks # # Attached is the include file for the i2c platform data # for the s3c2410/s3c2440 I2C controller # # Signed-off-by: Ben Dooks # # include/asm-arm/arch-s3c2410/iic.h # 2004/10/19 12:15:42+01:00 ben-linux@org.rmk.(none) +36 -0 # [PATCH] 2148/1: S3C2410 - I2C platfrom data # # include/asm-arm/arch-s3c2410/iic.h # 2004/10/19 12:15:42+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/iic.h # # ChangeSet # 2004/10/27 19:56:42+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2147/1: S3C2410 - reorganise board support # # Patch from Ben Dooks # # this patch makes the following changes: # # - renames struct s3c2410_board to s3c24xx_board # - moves board registration into cpu.c # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/s3c2440.c # 2004/10/18 23:52:08+01:00 ben-linux@org.rmk.(none) +0 -5 # [PATCH] 2147/1: S3C2410 - reorganise board support # # arch/arm/mach-s3c2410/s3c2410.h # 2004/10/18 23:49:20+01:00 ben-linux@org.rmk.(none) +1 -14 # [PATCH] 2147/1: S3C2410 - reorganise board support # # arch/arm/mach-s3c2410/s3c2410.c # 2004/10/18 23:52:16+01:00 ben-linux@org.rmk.(none) +0 -24 # [PATCH] 2147/1: S3C2410 - reorganise board support # # arch/arm/mach-s3c2410/mach-vr1000.c # 2004/10/18 23:50:51+01:00 ben-linux@org.rmk.(none) +3 -2 # [PATCH] 2147/1: S3C2410 - reorganise board support # # arch/arm/mach-s3c2410/mach-smdk2410.c # 2004/10/18 23:51:15+01:00 ben-linux@org.rmk.(none) +2 -2 # [PATCH] 2147/1: S3C2410 - reorganise board support # # arch/arm/mach-s3c2410/mach-h1940.c # 2004/10/18 23:55:02+01:00 ben-linux@org.rmk.(none) +3 -2 # [PATCH] 2147/1: S3C2410 - reorganise board support # # arch/arm/mach-s3c2410/mach-bast.c # 2004/10/18 23:49:37+01:00 ben-linux@org.rmk.(none) +2 -2 # [PATCH] 2147/1: S3C2410 - reorganise board support # # arch/arm/mach-s3c2410/cpu.h # 2004/10/18 23:51:54+01:00 ben-linux@org.rmk.(none) +16 -0 # [PATCH] 2147/1: S3C2410 - reorganise board support # # arch/arm/mach-s3c2410/cpu.c # 2004/10/18 23:53:59+01:00 ben-linux@org.rmk.(none) +29 -1 # [PATCH] 2147/1: S3C2410 - reorganise board support # # ChangeSet # 2004/10/27 19:51:45+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2146/1: S3C2410 - serial fixes and s3c2440 updates # # Patch from Ben Dooks # # fixes the following: # # - no debug output in the head code for either s3c2410 or s3c2440 # - fifo size calculation in the low-level debugging code # - serial constants for s3c2440 serial fifo sizes # - added s3c2440 support for uncompress.h # # Signed-off-by: Ben Dooks # # include/asm-arm/arch-s3c2410/regs-serial.h # 2004/10/17 22:15:31+01:00 ben-linux@org.rmk.(none) +9 -0 # [PATCH] 2146/1: S3C2410 - serial fixes and s3c2440 updates # # arch/arm/kernel/debug.S # 2004/10/18 23:16:41+01:00 ben-linux@org.rmk.(none) +25 -1 # [PATCH] 2146/1: S3C2410 - serial fixes and s3c2440 updates # # arch/arm/boot/compressed/head.S # 2004/10/17 23:39:10+01:00 ben-linux@org.rmk.(none) +9 -0 # [PATCH] 2146/1: S3C2410 - serial fixes and s3c2440 updates # # ChangeSet # 2004/10/27 19:46:36+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2138/1: S3C2410 - Power Management documentation (4/4) # # Patch from Ben Dooks # # Documentation for the suspend and resume code in # Documentation/arm/Samsung-S3C24XX/Suspend.txt # # Signed-off-by: Ben Dooks # # Documentation/arm/Samsung-S3C24XX/Suspend.txt # 2004/10/07 13:50:02+01:00 ben-linux@org.rmk.(none) +88 -0 # [PATCH] 2138/1: S3C2410 - Power Management documentation (4/4) # # Documentation/arm/Samsung-S3C24XX/Suspend.txt # 2004/10/07 13:50:02+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/Documentation/arm/Samsung-S3C24XX/Suspend.txt # # ChangeSet # 2004/10/27 19:41:32+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2136/1: S3C2410 - Power Management IRQ wakeup (3/4) # # Patch from Ben Dooks # # Allow all wake-up capable IRQs to be configured # as such # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/irq.c # 2004/10/05 23:39:43+01:00 ben-linux@org.rmk.(none) +74 -7 # [PATCH] 2136/1: S3C2410 - Power Management IRQ wakeup (3/4) # # ChangeSet # 2004/10/27 11:36:56-07:00 tony.luck@intel.com # [IA64] fix(?) unwind data for ia64_monarch_init_handler # # Roland> I can see the ERROR: comes from unwcheck.pl but I have no # Roland> idea what it is checking (something to do with unwind info?) # Roland> let alone how to fix the problem. # # Roland> Is this benign or is there something to be fixed? # # David> Both: it needs to be fixed, but it's (mostly) benign since the only # David> time we're executing that code is when the unwinder can't run anyhow, # David> since we're in the middle of delivering an MCA. That may (and # David> probably will) change in the future, so it's something that should be # David> fixed. # # David> I was hoping someone who knows and could test the MCA code better # David> would fix it but that hasn't happened yet, so it's time for plan B. # # David> Tony, below is a patch that fixes the unwind info enough that the # David> warning/error goes away. The unwind-info may not be 100% correct # David> though. Someone who can test/exercise this code may want to check on # David> that. # # Signed-off-by: Tony Luck # # ChangeSet # 2004/10/27 19:36:30+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2135/3: S3C2410 - Power Management timer resume (2/4) # # Patch from Ben Dooks # # Support for restarting the system timer after a suspend-resume # cycle. # # Also fixes the following # # - missed partial setup for BAST and VR1000 # - added IPAQ RX3715 timer setup # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/time.c # 2004/10/21 12:22:11+01:00 ben-linux@org.rmk.(none) +16 -12 # [PATCH] 2135/3: S3C2410 - Power Management timer resume (2/4) # # arch/ia64/kernel/mca_asm.S # 2004/10/27 11:33:12-07:00 tony.luck@intel.com +2 -1 # fix(?) unwind data for ia64_monarch_init_handler # # ChangeSet # 2004/10/27 19:31:31+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2134/3: S3C2410 - Power Management core (1/4) # # Patch from Ben Dooks # # Core support for S3C2410 suspend to SDRAM # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/sleep.S # 2004/10/05 23:51:39+01:00 ben-linux@org.rmk.(none) +168 -0 # [PATCH] 2134/3: S3C2410 - Power Management core (1/4) # # arch/arm/mach-s3c2410/pm.h # 2004/10/07 13:35:00+01:00 ben-linux@org.rmk.(none) +36 -0 # [PATCH] 2134/3: S3C2410 - Power Management core (1/4) # # arch/arm/mach-s3c2410/sleep.S # 2004/10/05 23:51:39+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/sleep.S # # arch/arm/mach-s3c2410/pm.h # 2004/10/07 13:35:00+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/pm.h # # arch/arm/mach-s3c2410/Makefile # 2004/10/05 22:19:23+01:00 ben-linux@org.rmk.(none) +4 -0 # [PATCH] 2134/3: S3C2410 - Power Management core (1/4) # # arch/arm/mach-s3c2410/Kconfig # 2004/10/07 12:32:10+01:00 ben-linux@org.rmk.(none) +27 -0 # [PATCH] 2134/3: S3C2410 - Power Management core (1/4) # # arch/arm/mach-s3c2410/pm.c # 2004/10/07 13:38:36+01:00 ben-linux@org.rmk.(none) +583 -0 # [PATCH] 2134/3: S3C2410 - Power Management core (1/4) # # arch/arm/mach-s3c2410/pm.c # 2004/10/07 13:38:36+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/pm.c # # ChangeSet # 2004/10/27 19:15:23+01:00 tony@com.rmk.(none) # [ARM PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # Patch from Tony Lindgren # # This patch syncs the mainline kernel with the linux-omap tree. # The highlights of the patch are: # - Collapse OMAP 1610, 6912 and 1710 into one processor group 16xx # - USB updates by David Brownell # - Pin multiplexing updates by David Brownell # - Board specific low level serial port init # # Signed-off-by: Tony Lindgren # # # arch/arm/mach-omap/usb.c # 2004/10/26 01:06:40+01:00 tony@com.rmk.(none) +79 -37 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/time.c # 2004/10/27 16:48:54+01:00 tony@com.rmk.(none) +0 -1 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/ocpi.c # 2004/10/26 01:06:40+01:00 tony@com.rmk.(none) +3 -11 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/mux.c # 2004/10/26 01:06:40+01:00 tony@com.rmk.(none) +49 -11 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/irq.c # 2004/10/26 01:06:40+01:00 tony@com.rmk.(none) +4 -6 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/gpio.c # 2004/10/26 01:06:40+01:00 tony@com.rmk.(none) +11 -11 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/board-perseus2.c # 2004/10/27 00:49:50+01:00 tony@com.rmk.(none) +4 -0 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/board-osk.c # 2004/10/27 16:52:19+01:00 tony@com.rmk.(none) +18 -2 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/board-innovator.c # 2004/10/27 00:49:50+01:00 tony@com.rmk.(none) +17 -21 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/board-h3.c # 2004/10/27 16:54:44+01:00 tony@com.rmk.(none) +5 -6 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/board-h2.c # 2004/10/27 16:52:53+01:00 tony@com.rmk.(none) +11 -7 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/board-generic.c # 2004/10/27 00:49:50+01:00 tony@com.rmk.(none) +6 -27 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/Makefile # 2004/10/27 16:50:35+01:00 tony@com.rmk.(none) +2 -4 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # arch/arm/mach-omap/Kconfig # 2004/10/27 17:04:14+01:00 tony@com.rmk.(none) +37 -33 # [PATCH] 2170/1: OMAP update 2/8, take 2: Arch files # # ChangeSet # 2004/10/27 10:38:53-07:00 hunold@linuxtv.org # [PATCH] DVB: misc. updates to frontend drivers # # - [DVB] add legacy DishNetwork support to dvb core and stv0299, thanks to Jeremy Hall # - [DVB] mt352: major cleanup, support DVICO FusionHDTV DVB-T, thanks to Christopher Pascoe # # Signed-off-by: Michael Hunold # Signed-off-by: Linus Torvalds # # include/linux/dvb/frontend.h # 2004/10/25 05:14:44-07:00 hunold@linuxtv.org +2 -0 # DVB: misc. updates to frontend drivers # # drivers/media/dvb/frontends/stv0299.c # 2004/10/25 05:14:43-07:00 hunold@linuxtv.org +45 -4 # DVB: misc. updates to frontend drivers # # drivers/media/dvb/frontends/mt352.h # 2004/10/25 05:14:43-07:00 hunold@linuxtv.org +20 -23 # DVB: misc. updates to frontend drivers # # drivers/media/dvb/frontends/mt352.c # 2004/10/25 05:14:43-07:00 hunold@linuxtv.org +285 -150 # DVB: misc. updates to frontend drivers # # ChangeSet # 2004/10/27 10:38:38-07:00 hunold@linuxtv.org # [PATCH] DVB: revamp dibusb driver # # - [DVB] dibusb: update documentation for the dibusb DVB driver # - [DVB] dibusb: major overhaul of the driver, including adding new vendor and product ids from clones # # Signed-off-by: Michael Hunold # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/dib3000mb.h # 2004/09/28 12:39:06-07:00 hunold@linuxtv.org +9 -9 # DVB: revamp dibusb driver # # drivers/media/dvb/frontends/dib3000mb.c # 2004/10/13 12:36:12-07:00 hunold@linuxtv.org +209 -73 # DVB: revamp dibusb driver # # drivers/media/dvb/dibusb/dvb-dibusb.h # 2004/09/30 14:29:28-07:00 hunold@linuxtv.org +104 -55 # DVB: revamp dibusb driver # # drivers/media/dvb/dibusb/dvb-dibusb.c # 2004/10/04 02:12:20-07:00 hunold@linuxtv.org +105 -72 # DVB: revamp dibusb driver # # drivers/media/dvb/dibusb/Kconfig # 2004/09/30 14:29:28-07:00 hunold@linuxtv.org +5 -3 # DVB: revamp dibusb driver # # Documentation/dvb/README.dibusb # 2004/09/28 12:36:44-07:00 hunold@linuxtv.org +26 -8 # DVB: revamp dibusb driver # # ChangeSet # 2004/10/27 10:38:21-07:00 hunold@linuxtv.org # [PATCH] DVB: add new driver # # - [DVB] add new driver for the Terratec CinergyT2/qanu USB2 DVB-T receiver, thanks to Daniel Mack and Holger Waechtler # # Signed-off-by: Michael Hunold # Signed-off-by: Linus Torvalds # # drivers/media/dvb/cinergyT2/cinergyT2.c # 2004/10/26 06:17:54-07:00 hunold@linuxtv.org +811 -0 # DVB: add new driver # # drivers/media/dvb/cinergyT2/Makefile # 2004/10/15 08:15:48-07:00 hunold@linuxtv.org +3 -0 # DVB: add new driver # # drivers/media/dvb/cinergyT2/cinergyT2.c # 2004/10/26 06:17:54-07:00 hunold@linuxtv.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/media/dvb/cinergyT2/cinergyT2.c # # drivers/media/dvb/cinergyT2/Makefile # 2004/10/15 08:15:48-07:00 hunold@linuxtv.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/media/dvb/cinergyT2/Makefile # # drivers/media/dvb/cinergyT2/Kconfig # 2004/10/15 08:22:20-07:00 hunold@linuxtv.org +59 -0 # DVB: add new driver # # drivers/media/dvb/Makefile # 2004/10/25 05:14:41-07:00 hunold@linuxtv.org +1 -1 # DVB: add new driver # # drivers/media/dvb/Kconfig # 2004/10/25 05:14:41-07:00 hunold@linuxtv.org +1 -0 # DVB: add new driver # # drivers/media/dvb/cinergyT2/Kconfig # 2004/10/15 08:22:20-07:00 hunold@linuxtv.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/media/dvb/cinergyT2/Kconfig # # ChangeSet # 2004/10/27 10:38:00-07:00 hunold@linuxtv.org # [PATCH] DVB: misc. updates to the dvb-core # # - [DVB] ttusb_dec: add new 2000T type model number # - [DVB] dvb_ca_en50221: properly zero out private pointer # - [DVB] dvb-bt8xx: properly use a mutex when starting/stopping the dma engine, remove card list, it's not need anymore # - [DVB] bt878: fix hex <=> dec typo (missing 0x prefix), mark remove bt878_remove() function __devexit_p # - [DVB] dvb-core: add dvb_net_debug module parameter, remove some dead code # # Signed-off-by: Michael Hunold # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttusb-dec/ttusb_dec.c # 2004/10/25 05:14:44-07:00 hunold@linuxtv.org +1 -0 # DVB: misc. updates to the dvb-core # # drivers/media/dvb/frontends/grundig_29504-401.c # 2004/10/25 05:14:43-07:00 hunold@linuxtv.org +1 -1 # DVB: misc. updates to the dvb-core # # drivers/media/dvb/dvb-core/dvb_net.c # 2004/10/25 05:14:43-07:00 hunold@linuxtv.org +8 -7 # DVB: misc. updates to the dvb-core # # drivers/media/dvb/dvb-core/dvb_ca_en50221.c # 2004/10/25 05:14:42-07:00 hunold@linuxtv.org +1 -0 # DVB: misc. updates to the dvb-core # # drivers/media/dvb/bt8xx/dvb-bt8xx.h # 2004/10/25 05:14:41-07:00 hunold@linuxtv.org +2 -2 # DVB: misc. updates to the dvb-core # # drivers/media/dvb/bt8xx/dvb-bt8xx.c # 2004/10/25 05:14:41-07:00 hunold@linuxtv.org +22 -18 # DVB: misc. updates to the dvb-core # # drivers/media/dvb/bt8xx/bt878.c # 2004/10/25 05:14:41-07:00 hunold@linuxtv.org +2 -2 # DVB: misc. updates to the dvb-core # # Documentation/dvb/readme.txt # 2004/10/25 05:14:41-07:00 hunold@linuxtv.org +3 -3 # DVB: misc. updates to the dvb-core # # ChangeSet # 2004/10/27 10:37:48-07:00 hunold@linuxtv.org # [PATCH] DVB: rework debugging in av7110 # # - [DVB] av7110: switch from stupid DEB_xx() debug macros to saner dprintk() style debugging # - [DVB] av7110: fix dvb-ttpci ca write() polling # - [DVB] budget: switch from stupid DEB_xx() debug macros to saner dprintk() style debugging # # Signed-off-by: Michael Hunold # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttpci/budget.h # 2004/10/25 05:14:44-07:00 hunold@linuxtv.org +7 -0 # DVB: rework debugging in av7110 # # drivers/media/dvb/ttpci/budget.c # 2004/10/25 05:14:44-07:00 hunold@linuxtv.org +8 -9 # DVB: rework debugging in av7110 # # drivers/media/dvb/ttpci/budget-patch.c # 2004/10/25 05:14:44-07:00 hunold@linuxtv.org +7 -9 # DVB: rework debugging in av7110 # # drivers/media/dvb/ttpci/budget-core.c # 2004/10/25 05:14:44-07:00 hunold@linuxtv.org +9 -9 # DVB: rework debugging in av7110 # # drivers/media/dvb/ttpci/budget-ci.c # 2004/10/25 05:14:44-07:00 hunold@linuxtv.org +2 -4 # DVB: rework debugging in av7110 # # drivers/media/dvb/ttpci/budget-av.c # 2004/10/25 05:14:44-07:00 hunold@linuxtv.org +9 -21 # DVB: rework debugging in av7110 # # drivers/media/dvb/ttpci/av7110_v4l.c # 2004/10/25 05:14:44-07:00 hunold@linuxtv.org +33 -33 # DVB: rework debugging in av7110 # # drivers/media/dvb/ttpci/av7110_ir.c # 2004/10/25 05:14:44-07:00 hunold@linuxtv.org +3 -8 # DVB: rework debugging in av7110 # # drivers/media/dvb/ttpci/av7110_hw.c # 2004/10/25 05:14:44-07:00 hunold@linuxtv.org +50 -50 # DVB: rework debugging in av7110 # # drivers/media/dvb/ttpci/av7110_ca.c # 2004/10/25 05:14:44-07:00 hunold@linuxtv.org +12 -9 # DVB: rework debugging in av7110 # # drivers/media/dvb/ttpci/av7110_av.c # 2004/10/25 05:14:43-07:00 hunold@linuxtv.org +26 -36 # DVB: rework debugging in av7110 # # drivers/media/dvb/ttpci/av7110.h # 2004/10/25 05:14:43-07:00 hunold@linuxtv.org +5 -0 # DVB: rework debugging in av7110 # # drivers/media/dvb/ttpci/av7110.c # 2004/10/25 05:14:43-07:00 hunold@linuxtv.org +51 -58 # DVB: rework debugging in av7110 # # ChangeSet # 2004/10/27 17:07:16+00:00 steiner@sgi.com # [IA64-SGI] Update asm-ia64/sn/sn_cpuid.h macros # # (I missed a file in the cleanup code that I sent yesterday.) # # SGI SN code currently makes assumptions about the bits in the LID # register. These assumptions do not conform to the bit specifications # from Intel. For example, SN currently assumes that bits [28:16] of # the LID contain the physical node ID of a node. # # This patch eliminates these assumptions. A SAL call is now used to translate # LID values to the NASID/subnode/slice values that are needed for SN # platforms. The results of the SAL call are saved in the SN nodepda. # # Signed-off-by: Jack Steiner # Signed-off-by: Tony Luck # # arch/ia64/sn/kernel/iomv.c # 2004/10/27 17:05:02+00:00 steiner@sgi.com +1 -0 # Update asm-ia64/sn/sn_cpuid.h macros # # ChangeSet # 2004/10/27 16:21:44+00:00 jbarnes@sgi.com # [IA64] fix machine vectors for mmiowb # # I left out some of the necessary machine vector magic in the mmiowb patch # which caused the generic build to break. This patch fixes it up by properly # #defining it and #undefing it and adding a routine to lib/io.c. # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # include/asm-ia64/io.h # 2004/10/27 16:20:39+00:00 jbarnes@sgi.com +3 -2 # fix machine vectors for mmiowb # # arch/ia64/lib/io.c # 2004/10/27 16:20:39+00:00 jbarnes@sgi.com +7 -0 # fix machine vectors for mmiowb # # ChangeSet # 2004/10/27 14:29:04+01:00 rmk@flint.arm.linux.org.uk # [ARM] Group linux/* includes together in mcbsp.c # # arch/arm/mach-omap/mcbsp.c # 2004/10/27 14:24:11+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Group linux/* includes together. # # ChangeSet # 2004/10/27 14:19:43+01:00 tony@com.rmk.(none) # [ARM PATCH] 2169/1: OMAP update 8/8: McBSP update # # Patch from Tony Lindgren # # Patch by Samuel Ortiz to update OMAP McBSP support # # Signed-off-by: Tony Lindgren # # # include/asm-arm/arch-omap/mcbsp.h # 2004/10/21 00:42:48+01:00 tony@com.rmk.(none) +1 -1 # [PATCH] 2169/1: OMAP update 8/8: McBSP update # # arch/arm/mach-omap/mcbsp.c # 2004/10/26 01:06:40+01:00 tony@com.rmk.(none) +24 -8 # [PATCH] 2169/1: OMAP update 8/8: McBSP update # # ChangeSet # 2004/10/27 14:11:54+01:00 tony@com.rmk.(none) # [ARM PATCH] 2167/1: OMAP update 6/8: Add graphics acceleration support to DMA # # Patch from Tony Lindgren # # This patch by Imre Deak adds support for graphics acceleration # features on the OMAP DMA controller. # # Signed-off-by: Tony Lindgren # # # include/asm-arm/arch-omap/dma.h # 2004/10/18 17:20:19+01:00 tony@com.rmk.(none) +22 -6 # [PATCH] 2167/1: OMAP update 6/8: Add graphics acceleration support to DMA # # arch/arm/mach-omap/dma.c # 2004/10/26 01:06:40+01:00 tony@com.rmk.(none) +302 -88 # [PATCH] 2167/1: OMAP update 6/8: Add graphics acceleration support to DMA # # ChangeSet # 2004/10/27 13:59:24+01:00 tony@com.rmk.(none) # [ARM PATCH] 2166/1: OMAP update 5/8: Change OMAP to use generic clock framework # # Patch from Tony Lindgren # # This patch by Tuukka Tikkanen changes OMAP to use ARM generic # clock framework instead of older OMAP specific clock framework. # Patch replaces old clocks.c with new clock.[ch]. # # Signed-off-by: Tony Lindgren # # # arch/arm/mach-omap/clock.h # 2004/10/27 13:55:01+01:00 tony@com.rmk.(none) +106 -0 # # arch/arm/mach-omap/clock.h # 2004/10/27 13:55:01+01:00 tony@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-omap/clock.h # # arch/arm/mach-omap/clock.c # 2004/10/27 13:54:45+01:00 tony@com.rmk.(none) +947 -0 # # arch/arm/mach-omap/clock.c # 2004/10/27 13:54:45+01:00 tony@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-omap/clock.c # # BitKeeper/deleted/.del-clocks.c~6c857d00f6457e # 2004/10/27 13:54:45+01:00 tony@com.rmk.(none) +0 -0 # Delete: arch/arm/mach-omap/clocks.c # # ChangeSet # 2004/10/27 13:53:09+01:00 aia21@cantab.net # NTFS: Check for location of attribute name and improve error handling in # general in fs/ntfs/inode.c::ntfs_read_locked_inode() and friends. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/inode.c # 2004/10/27 13:53:00+01:00 aia21@cantab.net +141 -107 # Check for location of attribute name and improve error handling in # general in fs/ntfs/inode.c::ntfs_read_locked_inode() and friends. # # fs/ntfs/ChangeLog # 2004/10/27 13:53:00+01:00 aia21@cantab.net +2 -0 # Update # # ChangeSet # 2004/10/27 13:50:45+01:00 tony@com.rmk.(none) # [ARM PATCH] 2165/1: OMAP update 4/X: Replace 1610 and 5912 header files with 16xx # # Patch from Tony Lindgren # # This patch replaces old OMAP headers for 1610 and 5912. These # headers are replaced with a common omap16xx.h header file. # # Signed-off-by: Tony Lindgren # # # include/asm-arm/arch-omap/omap16xx.h # 2004/10/21 00:42:48+01:00 tony@com.rmk.(none) +72 -22 # [PATCH] 2165/1: OMAP update 4/X: Replace 1610 and 5912 header files with 16xx # # BitKeeper/deleted/.del-omap5912.h~ef7fb854d2ac315 # 2004/10/27 13:47:36+01:00 tony@com.rmk.(none) +0 -0 # Delete: include/asm-arm/arch-omap/omap5912.h # # ChangeSet # 2004/10/27 13:41:41+01:00 tony@com.rmk.(none) # [ARM PATCH] 2164/1: OMAP update 3/8: Include files # # Patch from Tony Lindgren # # This patch syncs the mainline kernel with the linux-omap tree. # The highlights of the patch are: # - Collapse OMAP 1610, 6912 and 1710 into one processor group 16xx # - USB updates by David Brownell # - Pin multiplexing updates by David Brownell # - Board specific low level serial port init # # Signed-off-by: Tony Lindgren # # # include/asm-arm/arch-omap/uncompress.h # 2004/10/18 17:20:19+01:00 tony@com.rmk.(none) +9 -16 # [PATCH] 2164/1: OMAP update 3/8: Include files # # include/asm-arm/arch-omap/timex.h # 2004/10/21 01:14:47+01:00 tony@com.rmk.(none) +1 -3 # [PATCH] 2164/1: OMAP update 3/8: Include files # # include/asm-arm/arch-omap/serial.h # 2004/10/26 23:43:05+01:00 tony@com.rmk.(none) +5 -1 # [PATCH] 2164/1: OMAP update 3/8: Include files # # include/asm-arm/arch-omap/mux.h # 2004/10/18 17:20:19+01:00 tony@com.rmk.(none) +32 -7 # [PATCH] 2164/1: OMAP update 3/8: Include files # # include/asm-arm/arch-omap/memory.h # 2004/10/18 17:20:19+01:00 tony@com.rmk.(none) +3 -1 # [PATCH] 2164/1: OMAP update 3/8: Include files # # include/asm-arm/arch-omap/irqs.h # 2004/10/20 23:42:48+01:00 tony@com.rmk.(none) +1 -21 # [PATCH] 2164/1: OMAP update 3/8: Include files # # include/asm-arm/arch-omap/hardware.h # 2004/10/20 17:35:45+01:00 tony@com.rmk.(none) +32 -64 # [PATCH] 2164/1: OMAP update 3/8: Include files # # include/asm-arm/arch-omap/board.h # 2004/10/26 18:16:38+01:00 tony@com.rmk.(none) +46 -5 # [PATCH] 2164/1: OMAP update 3/8: Include files # # include/asm-arm/arch-omap/board-innovator.h # 2004/10/18 17:20:19+01:00 tony@com.rmk.(none) +3 -9 # [PATCH] 2164/1: OMAP update 3/8: Include files # # include/asm-arm/arch-omap/board-h3.h # 2004/10/18 17:20:19+01:00 tony@com.rmk.(none) +8 -64 # [PATCH] 2164/1: OMAP update 3/8: Include files # # include/asm-arm/arch-omap/board-h2.h # 2004/10/18 17:20:19+01:00 tony@com.rmk.(none) +8 -4 # [PATCH] 2164/1: OMAP update 3/8: Include files # # include/asm-arm/arch-omap/tc.h # 2004/10/18 17:20:19+01:00 tony@com.rmk.(none) +64 -0 # [PATCH] 2164/1: OMAP update 3/8: Include files # # include/asm-arm/arch-omap/tc.h # 2004/10/18 17:20:19+01:00 tony@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-omap/tc.h # # ChangeSet # 2004/10/27 13:07:27+01:00 tony@com.rmk.(none) # [ARM PATCH] 2162/1: OMAP update 1/8: Improved cpu detection and serial init # # Patch from Tony Lindgren # # This patch improves the OMAP cpu detection during the boot, # and adds board-specific init for the serial ports. # # Signed-off-by: Tony Lindgren # # # arch/arm/mach-omap/common.h # 2004/10/26 03:17:42+01:00 tony@com.rmk.(none) +1 -0 # [PATCH] 2162/1: OMAP update 1/8: Improved cpu detection and serial init # # arch/arm/mach-omap/common.c # 2004/10/27 00:01:58+01:00 tony@com.rmk.(none) +319 -60 # [PATCH] 2162/1: OMAP update 1/8: Improved cpu detection and serial init # # include/asm-arm/arch-omap/cpu.h # 2004/10/18 17:20:19+01:00 tony@com.rmk.(none) +183 -0 # [PATCH] 2162/1: OMAP update 1/8: Improved cpu detection and serial init # # include/asm-arm/arch-omap/cpu.h # 2004/10/18 17:20:19+01:00 tony@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-omap/cpu.h # # ChangeSet # 2004/10/27 11:41:35+01:00 aia21@cantab.net # NTFS: Ensure the mft record size does not exceed the PAGE_CACHE_SIZE at # mount time as this cannot work with the current implementation. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/super.c # 2004/10/27 11:38:58+01:00 aia21@cantab.net +20 -8 # Ensure the mft record size does not exceed the PAGE_CACHE_SIZE at # mount time as this cannot work with the current implementation. # # fs/ntfs/ChangeLog # 2004/10/27 11:38:49+01:00 aia21@cantab.net +2 -0 # Update # # ChangeSet # 2004/10/26 21:50:42-07:00 herbert@gondor.apana.org.au # [NETLINK]: Remove netlink_sock_nr # # This patch removes netlink_sock_nr which is only used by a printk # statement in af_netlink.c. Even that's only there if # NETLINK_REFCNT_DEBUG is defined. # # If we were really looking for netlink refcnt bugs there are probably # better places to do that anyway. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/netlink/af_netlink.c # 2004/10/26 21:50:12-07:00 herbert@gondor.apana.org.au +0 -8 # [NETLINK]: Remove netlink_sock_nr # # This patch removes netlink_sock_nr which is only used by a printk # statement in af_netlink.c. Even that's only there if # NETLINK_REFCNT_DEBUG is defined. # # If we were really looking for netlink refcnt bugs there are probably # better places to do that anyway. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 23:50:29+00:00 tony.luck@intel.com # [IA64] Need for GRANULEROUNDDOWN # # Alex's change for mem=/max_addr= now needs to include meminit.h # # Signed-off-by: Tony Luck # # arch/ia64/kernel/efi.c # 2004/10/26 23:43:15+00:00 tony.luck@intel.com +1 -0 # Need for GRANULEROUNDDOWN # # ChangeSet # 2004/10/26 23:50:13+00:00 pfg@sgi.com # [IA64-SGI] only allocate irq if the device can interrupt # # Signed-off-by: Patrick Gefre # Acked-by: Mike Habeck # Signed-off-by: Tony Luck # # arch/ia64/sn/kernel/io_init.c # 2004/10/26 23:43:02+00:00 pfg@sgi.com +3 -1 # only allocate irq if the device can interrupt # # ChangeSet # 2004/10/26 23:49:56+00:00 steiner@sgi.com # [IA64-SGI] Delete simulator support from SN idle loop # # Delete hack for supporting simulator for SN platforms. This capability # has been moved into the simulator environment & is no longer required # in the kernel. # # Signed-off-by: Jack Steiner # Signed-off-by: Tony Luck # # arch/ia64/sn/kernel/idle.c # 2004/10/26 23:42:49+00:00 steiner@sgi.com +3 -9 # Delete simulator support from SN idle loop # # ChangeSet # 2004/10/26 23:49:38+00:00 steiner@sgi.com # [IA64-SGI] Update asm-ia64/sn/sn_cpuid.h macros # # SGI SN code currently makes assumptions about the bits in the LID # register. These assumptions do not conform to the bit specifications # from Intel. For example, SN currently assumes that bits [28:16] of # the LID contain the physical node ID of a node. # # This patch eliminates these assumptions. A SAL call is now used to translate # LID values to the NASID/subnode/slice values that are needed for SN # platforms. The results of the SAL call are saved in the SN nodepda. # # Signed-off-by: Jack Steiner # Signed-off-by: Tony Luck # # include/asm-ia64/sn/sn_sal.h # 2004/10/26 23:42:36+00:00 steiner@sgi.com +32 -0 # Update asm-ia64/sn/sn_cpuid.h macros # # include/asm-ia64/sn/sn_cpuid.h # 2004/10/26 23:42:36+00:00 steiner@sgi.com +28 -67 # Update asm-ia64/sn/sn_cpuid.h macros # # include/asm-ia64/sn/nodepda.h # 2004/10/26 23:42:36+00:00 steiner@sgi.com +10 -0 # Update asm-ia64/sn/sn_cpuid.h macros # # include/asm-ia64/sn/intr.h # 2004/10/26 23:42:36+00:00 steiner@sgi.com +1 -1 # Update asm-ia64/sn/sn_cpuid.h macros # # arch/ia64/sn/kernel/sn2/sn_proc_fs.c # 2004/10/26 23:42:36+00:00 steiner@sgi.com +2 -1 # Update asm-ia64/sn/sn_cpuid.h macros # # arch/ia64/sn/kernel/sn2/sn2_smp.c # 2004/10/26 23:42:36+00:00 steiner@sgi.com +12 -7 # Update asm-ia64/sn/sn_cpuid.h macros # # arch/ia64/sn/kernel/setup.c # 2004/10/26 23:42:36+00:00 steiner@sgi.com +45 -6 # Update asm-ia64/sn/sn_cpuid.h macros # # arch/ia64/sn/kernel/irq.c # 2004/10/26 23:42:36+00:00 steiner@sgi.com +4 -4 # Update asm-ia64/sn/sn_cpuid.h macros # # ChangeSet # 2004/10/26 16:41:27-07:00 davem@nuts.davemloft.net # [PKT_SCHED]: Make net/tc_act/tc_pedit.h include net/act_api.h # # Signed-off-by: David S. Miller # # include/net/tc_act/tc_pedit.h # 2004/10/26 16:40:56-07:00 davem@nuts.davemloft.net +1 -1 # [PKT_SCHED]: Make net/tc_act/tc_pedit.h include net/act_api.h # # ChangeSet # 2004/10/26 19:39:53-04:00 jgarzik@pobox.com # [libata] use kunmap_atomic() correctly # # drivers/scsi/libata-scsi.c # 2004/10/26 19:39:47-04:00 jgarzik@pobox.com +4 -4 # [libata] use kunmap_atomic() correctly # # ChangeSet # 2004/10/26 16:31:24-07:00 hadi@cyberus.ca # [PKT_SCHED]: Add generic packet editor. # # Signed-off-by: Jamal Hadi Salim # Signed-off-by: David S. Miller # # net/sched/Makefile # 2004/10/26 16:30:45-07:00 hadi@cyberus.ca +1 -0 # [PKT_SCHED]: Add generic packet editor. # # net/sched/Kconfig # 2004/10/26 16:30:45-07:00 hadi@cyberus.ca +7 -0 # [PKT_SCHED]: Add generic packet editor. # # include/net/tc_act/tc_pedit.h # 2004/10/26 16:30:34-07:00 hadi@cyberus.ca +14 -0 # [PKT_SCHED]: Add generic packet editor. # # include/linux/tc_act/tc_pedit.h # 2004/10/26 16:30:34-07:00 hadi@cyberus.ca +36 -0 # [PKT_SCHED]: Add generic packet editor. # # include/net/tc_act/tc_pedit.h # 2004/10/26 16:30:34-07:00 hadi@cyberus.ca +0 -0 # BitKeeper file /disk1/BK/net-2.6/include/net/tc_act/tc_pedit.h # # include/linux/tc_act/tc_pedit.h # 2004/10/26 16:30:34-07:00 hadi@cyberus.ca +0 -0 # BitKeeper file /disk1/BK/net-2.6/include/linux/tc_act/tc_pedit.h # # net/sched/pedit.c # 2004/10/26 16:30:32-07:00 hadi@cyberus.ca +302 -0 # [PKT_SCHED]: Add generic packet editor. # # net/sched/pedit.c # 2004/10/26 16:30:32-07:00 hadi@cyberus.ca +0 -0 # BitKeeper file /disk1/BK/net-2.6/net/sched/pedit.c # # ChangeSet # 2004/10/26 16:18:39-07:00 zach@vmware.com # [PATCH] faster signal handling on x86 # # Optimize away the unconditional write to debug registers on signal delivery # path. This is already done on x86_64. # # We only need to write to dr7 if there is a breakpoint to re-enable, and # MOVDR is a serializing instruction, which is expensive. Getting rid of # it gets a 33% faster signal delivery path (at least on Xeon - I didn't # test other CPUs, so your gain may vary). # # [ Editors note: it's likely only that slow on Netburst. Serializing is # not that expensive, but it is likely that writing to %db7 invalidates # the trace cache, which explains why it's so slow on Xeon - it's not # just the op itself, it has to re-populate the cache all the time. # --- Linus ] # # # Measured delta TSC for three paths on a 2.4GHz Xeon. # # 1) With unconditional write to dr7 : 800-1000 cycles # 2) With conditional write to dr7 : 84-112 cycles # 3) With unlikely write to dr7 : 84 cycles # # Performance test using divzero microbenchmark (3 million divide by zeros): # # With unconditional write: # 7.445 real / 6.136 system # 7.529 real / 6.482 system # 7.541 real / 5.974 system # 7.546 real / 6.217 system # 7.445 real / 6.167 system # # With unlikely write: # 5.779 real / 4.518 system # 5.783 real / 4.591 system # 5.552 real / 4.569 system # 5.790 real / 4.528 system # 5.554 real / 4.382 system # # That's about a 33% speedup - more than I expected; apparently getting rid # of the serializing instruction makes the do_signal path much faster. # # Zachary Amsden (zach@vmware.com) # # arch/i386/kernel/signal.c # 2004/10/26 14:30:54-07:00 zach@vmware.com +3 -1 # faster signal handling on x86 # # ChangeSet # 2004/10/26 16:07:39-07:00 tgraf@suug.ch # [PKT_SCHED]: Use new header architecture # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/police.c # 2004/10/26 16:07:19-07:00 tgraf@suug.ch +1 -1 # [PKT_SCHED]: Use new header architecture # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_u32.c # 2004/10/26 16:07:19-07:00 tgraf@suug.ch +2 -1 # [PKT_SCHED]: Use new header architecture # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_tcindex.c # 2004/10/26 16:07:19-07:00 tgraf@suug.ch +2 -1 # [PKT_SCHED]: Use new header architecture # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_rsvp6.c # 2004/10/26 16:07:19-07:00 tgraf@suug.ch +2 -1 # [PKT_SCHED]: Use new header architecture # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_rsvp.c # 2004/10/26 16:07:19-07:00 tgraf@suug.ch +2 -1 # [PKT_SCHED]: Use new header architecture # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_route.c # 2004/10/26 16:07:19-07:00 tgraf@suug.ch +2 -1 # [PKT_SCHED]: Use new header architecture # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_fw.c # 2004/10/26 16:07:19-07:00 tgraf@suug.ch +2 -1 # [PKT_SCHED]: Use new header architecture # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_api.c # 2004/10/26 16:07:19-07:00 tgraf@suug.ch +1 -0 # [PKT_SCHED]: Use new header architecture # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/act_api.c # 2004/10/26 16:07:19-07:00 tgraf@suug.ch +2 -1 # [PKT_SCHED]: Use new header architecture # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/tc_act/tc_mirred.h # 2004/10/26 16:07:19-07:00 tgraf@suug.ch +1 -1 # [PKT_SCHED]: Use new header architecture # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/tc_act/tc_gact.h # 2004/10/26 16:07:19-07:00 tgraf@suug.ch +1 -1 # [PKT_SCHED]: Use new header architecture # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 16:06:57-07:00 tgraf@suug.ch # [PKT_SCHED]: Inline psched_tod_diff # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/sch_api.c # 2004/10/26 16:06:38-07:00 tgraf@suug.ch +0 -15 # [PKT_SCHED]: Inline psched_tod_diff # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_sched.h # 2004/10/26 16:06:38-07:00 tgraf@suug.ch +12 -1 # [PKT_SCHED]: Inline psched_tod_diff # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 16:06:11-07:00 tgraf@suug.ch # [PKT_SCHED]: Cleanup cls_set_class # # Clean up a really messy cross reference where a macro cls_set_class # in pkt_sched.h would point to a function tcf_set_class in cls_api.c # that uses a inlined function __cls_set_class in pkt_sched.h again. # # Make tcf_set_class be cls_set_class since it was never used and # inline it as well. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_api.c # 2004/10/26 16:05:51-07:00 tgraf@suug.ch +0 -14 # [PKT_SCHED]: Cleanup cls_set_class # # Clean up a really messy cross reference where a macro cls_set_class # in pkt_sched.h would point to a function tcf_set_class in cls_api.c # that uses a inlined function __cls_set_class in pkt_sched.h again. # # Make tcf_set_class be cls_set_class since it was never used and # inline it as well. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_sched.h # 2004/10/26 16:05:51-07:00 tgraf@suug.ch +0 -12 # [PKT_SCHED]: Cleanup cls_set_class # # Clean up a really messy cross reference where a macro cls_set_class # in pkt_sched.h would point to a function tcf_set_class in cls_api.c # that uses a inlined function __cls_set_class in pkt_sched.h again. # # Make tcf_set_class be cls_set_class since it was never used and # inline it as well. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_cls.h # 2004/10/26 16:05:51-07:00 tgraf@suug.ch +25 -0 # [PKT_SCHED]: Cleanup cls_set_class # # Clean up a really messy cross reference where a macro cls_set_class # in pkt_sched.h would point to a function tcf_set_class in cls_api.c # that uses a inlined function __cls_set_class in pkt_sched.h again. # # Make tcf_set_class be cls_set_class since it was never used and # inline it as well. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 16:05:14-07:00 tgraf@suug.ch # [PKT_SCHED]: psched_*_per_* can be static # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/sch_api.c # 2004/10/26 16:04:54-07:00 tgraf@suug.ch +2 -2 # [PKT_SCHED]: psched_*_per_* can be static # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 16:04:32-07:00 tgraf@suug.ch # [PKT_SCHED]: Move tc_classify from pkt_cls.h to sch_api.c # # tc_classiy has grown too big to be inlined, move it to sch_api.c # and export it. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/sch_api.c # 2004/10/26 16:04:12-07:00 tgraf@suug.ch +47 -0 # [PKT_SCHED]: Move tc_classify from pkt_cls.h to sch_api.c # # tc_classiy has grown too big to be inlined, move it to sch_api.c # and export it. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_sched.h # 2004/10/26 16:04:12-07:00 tgraf@suug.ch +3 -0 # [PKT_SCHED]: Move tc_classify from pkt_cls.h to sch_api.c # # tc_classiy has grown too big to be inlined, move it to sch_api.c # and export it. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_cls.h # 2004/10/26 16:04:12-07:00 tgraf@suug.ch +0 -45 # [PKT_SCHED]: Move tc_classify from pkt_cls.h to sch_api.c # # tc_classiy has grown too big to be inlined, move it to sch_api.c # and export it. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 16:03:13-07:00 tgraf@suug.ch # [PKT_SCHED]: Transform pkt_sched.h prototypes to be extern # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_sched.h # 2004/10/26 16:02:53-07:00 tgraf@suug.ch +18 -15 # [PKT_SCHED]: Transform pkt_sched.h prototypes to be extern # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 16:02:21-07:00 tgraf@suug.ch # [PKT_SCHED]: Remove obsolete definitions in pkt_sched.h # # Removes all obsolete definitions in pkt_sched.h now in sch_generic.h # or act_api.h. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_sched.h # 2004/10/26 16:02:02-07:00 tgraf@suug.ch +1 -218 # [PKT_SCHED]: Remove obsolete definitions in pkt_sched.h # # Removes all obsolete definitions in pkt_sched.h now in sch_generic.h # or act_api.h. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 16:00:53-07:00 tgraf@suug.ch # [PKT_SCHED]: Add net/act_api.h with public action/policer bits # # Adds net/act_api.h containing all public action/policer bits used # by schedulers and classifiers # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/act_api.h # 2004/10/26 16:00:20-07:00 tgraf@suug.ch +122 -0 # [PKT_SCHED]: Add net/act_api.h with public action/policer bits # # include/net/act_api.h # 2004/10/26 16:00:20-07:00 tgraf@suug.ch +0 -0 # BitKeeper file /disk1/BK/net-2.6/include/net/act_api.h # # ChangeSet # 2004/10/26 15:58:53-07:00 tgraf@suug.ch # [PKT_SCHED]: Remove obsolete definitions in pkt_cls.h # # Removes all obsolete definitions in pkt_cls.h now in sch_generic.h # and includes them via sch_generic.h. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_cls.h # 2004/10/26 15:58:33-07:00 tgraf@suug.ch +1 -59 # [PKT_SCHED]: Remove obsolete definitions in pkt_cls.h # # Removes all obsolete definitions in pkt_cls.h now in sch_generic.h # and includes them via sch_generic.h. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 15:57:39-07:00 tgraf@suug.ch # [PKT_SCHED]: Add net/sch_generic.h with generic sched definitions. # # Adds net/sch_generic.h containing all bits directly referenced by # schedulers and classifiers. Map of users: # # Group 1) # struct qdisc_rate_table sch_*, tcf_police -> cls_* # # Could theoretically be moved to pkt_sched.h with Patch 4 # but the long term goal it so make net/act_api.h to being # dependent on net/pkt_sched.h # # Group 2) # struct Qdisc sch_*, tcf_proto -> cls_* # struct Qdisc_ops sch_*, tcf_proto -> cls_* # struct Qdisc_class_ops sch_*, tcf_proto -> cls_* # struct tcf_proto_ops sch_*, cls_* # struct tcf_proto sch_*, cls_* # # Obviously used by schedulers but also by classifiers to # bind classes (tcf_proto -> Qdisc -> Qdisc_ops -> # Qdisc_class_ops). tcf_proto OTOH is used by schedulers, # (neat cross usage). # # Group 3) # struct tcf_result sch_*, cls_* # # Used to communicate between scheduler and classifer # to report classify result. # # Group 4) # sch_tree_(un)lock sch_*, cls_* # tcf_tree_(un)lock sch_*, cls_* # qdisc(un)lock_tree sch_*, cls_* # # Randomly used in schedulers and classifiers. # # Group 5) # tcf_destroy sch_*, cls_api.c # # Coud theoretically be moved to pkt_sched.h if we include # pkt_sched.h in cls_api.c but this is really generic and # it seemd cleaner to have it here. This would be the only # classifier related action in pkt_sched.h # # The following types are referenced in sch_generic.h but defined in # either pkt_cls.h or pkt_sched.h because they will never be used # by the other side: # # - qdisc_walker (pkt_sched.h) # - tcf_walker (pkt_cls.h) # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/sch_generic.h # 2004/10/26 15:56:55-07:00 tgraf@suug.ch +175 -0 # [PKT_SCHED]: Add net/sch_generic.h with generic sched definitions. # # include/net/sch_generic.h # 2004/10/26 15:56:55-07:00 tgraf@suug.ch +0 -0 # BitKeeper file /disk1/BK/net-2.6/include/net/sch_generic.h # # ChangeSet # 2004/10/26 15:55:51-07:00 tgraf@suug.ch # [PKT_SCHED]: pkt_cls.h needs pkt_sched.h # # Signed-off-by: David S. Miller # # include/linux/pkt_cls.h # 2004/10/26 15:55:20-07:00 tgraf@suug.ch +2 -0 # [PKT_SCHED]: pkt_cls.h needs pkt_sched.h # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/27 00:36:12+02:00 rmk+lkml@arm.linux.org.uk # arm: Fix ARM kernel build with permitted binutils versions # # All ARM binutils versions post 2.11.90 contains an extra "feature" which # interferes with the kernel in various ways - extra "mapping symbols" # in the ELF symbol table '$a', '$t' and '$d'. This causes two problems: # # 1. Since '$a' symbols have the same value as function names, this # causes anything which uses the kallsyms infrastructure to report # wrong values. # 2. programs which parse System.map do not expect symbols to start with # '$'. # # Signed-off-by: Russell King # Signed-off-by: Sam Ravnborg # # ===== kernel/module.c 1.120 vs edited ===== # # scripts/mksysmap # 2004/10/08 17:39:39+02:00 rmk+lkml@arm.linux.org.uk +1 -1 # arm: Fix ARM kernel build with permitted binutils versions # # scripts/kallsyms.c # 2004/10/08 17:34:20+02:00 rmk+lkml@arm.linux.org.uk +13 -1 # arm: Fix ARM kernel build with permitted binutils versions # # kernel/module.c # 2004/10/08 17:34:19+02:00 rmk+lkml@arm.linux.org.uk +14 -2 # arm: Fix ARM kernel build with permitted binutils versions # # ChangeSet # 2004/10/27 00:29:10+02:00 juhl-lkml@dif.dk # kconfig: Small spelling fix for MODULE_SRCVERSION_ALL Kconfig # # Here's a trivial patch fixing a small spelling error in init/Kconfig in # the description of MODULE_SRCVERSION_ALL # # Signed-off-by: Jesper Juhl # Signed-off-by: Sam Ravnborg # # init/Kconfig # 2004/10/24 17:41:12+02:00 juhl-lkml@dif.dk +1 -1 # kconfig: Small spelling fix for MODULE_SRCVERSION_ALL Kconfig # # ChangeSet # 2004/10/27 00:27:31+02:00 trini@kernel.crashing.org # kbuild: warning fixes on Solaris 9 # # The following set of patches is based loosely on the patches that # Jean-Christophe Dubois came up with for 2.6.7. Where as the original # patches added a number of casts to unsigned char, I went the route of # making the chars be explicitly signed. I honestly don't know which # route is better to go down. Doing this is the bulk of the patch. Out # of the rest of the odds 'n ends is that on Solaris, Elf32_Word is a # ulong, which means all of the printf's are unhappy (uint format, ulong # arg) for most of the typedefs. # # Signed-off-by: Tom Rini # Signed-off-by: Sam Ravnborg # # scripts/mod/sumversion.c # 2004/10/27 00:22:41+02:00 trini@kernel.crashing.org +4 -4 # kbuild: warning fixes on Solaris 9 # # scripts/mod/modpost.c # 2004/10/27 00:22:13+02:00 trini@kernel.crashing.org +1 -1 # kbuild: warning fixes on Solaris 9 # # scripts/mod/file2alias.c # 2004/10/27 00:22:12+02:00 trini@kernel.crashing.org +12 -7 # kbuild: warning fixes on Solaris 9 # # scripts/kconfig/symbol.c # 2004/10/27 00:22:08+02:00 trini@kernel.crashing.org +1 -1 # kbuild: warning fixes on Solaris 9 # # scripts/kconfig/mconf.c # 2004/10/27 00:22:09+02:00 trini@kernel.crashing.org +2 -2 # kbuild: warning fixes on Solaris 9 # # scripts/kconfig/confdata.c # 2004/10/27 00:22:10+02:00 trini@kernel.crashing.org +3 -3 # kbuild: warning fixes on Solaris 9 # # scripts/kconfig/conf.c # 2004/10/27 00:22:04+02:00 trini@kernel.crashing.org +3 -3 # kbuild: warning fixes on Solaris 9 # # scripts/conmakehash.c # 2004/10/27 00:22:06+02:00 trini@kernel.crashing.org +1 -1 # kbuild: warning fixes on Solaris 9 # # scripts/basic/split-include.c # 2004/10/27 00:22:06+02:00 trini@kernel.crashing.org +1 -1 # kbuild: warning fixes on Solaris 9 # # scripts/basic/fixdep.c # 2004/10/27 00:22:09+02:00 trini@kernel.crashing.org +5 -5 # kbuild: warning fixes on Solaris 9 # # scripts/basic/docproc.c # 2004/10/27 00:22:07+02:00 trini@kernel.crashing.org +7 -7 # kbuild: warning fixes on Solaris 9 # # arch/ppc/boot/utils/mkbugboot.c # 2004/10/27 00:22:03+02:00 trini@kernel.crashing.org +1 -1 # kbuild: warning fixes on Solaris 9 # # ChangeSet # 2004/10/27 00:07:03+02:00 sam@mars.ravnborg.org # kbuild/usr: initramfs list fixed and simplified # # Moving logic to scripts/gen_initramfs_list.sh make a nice cleanup in # usr/Makefile. # A new initramfs image will be generated if the initramfs_list file changes. # This patch also fixes the bug with make O=.. # # Signed-off-by: Sam Ravnborg # # usr/Makefile # 2004/10/27 00:06:46+02:00 sam@mars.ravnborg.org +9 -20 # Simplify - logic moved to gen_initramfs_list.sh script # # scripts/gen_initramfs_list.sh # 2004/10/27 00:06:46+02:00 sam@mars.ravnborg.org +35 -16 # Moved logic to this file. # It now handles both dirs, files and no input given. # For invalid input print error and boild out. # # scripts/Makefile.lib # 2004/10/27 00:06:46+02:00 sam@mars.ravnborg.org +27 -0 # Added filechk - copy from top level Makefile # # BitKeeper/etc/ignore # 2004/10/27 00:06:24+02:00 sam@mars.ravnborg.org +1 -0 # added usr/initramfs_list # # BitKeeper/deleted/.del-initramfs_list~e02c62efaa478389 # 2004/10/27 00:02:17+02:00 sam@mars.ravnborg.org +0 -0 # Delete: usr/initramfs_list # # ChangeSet # 2004/10/26 22:53:13+02:00 bzolnier@trik.(none) # [ide] remove needless exports from ide-taskfile.c # # Also remove unused MAX_DMA define. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/26 22:51:19+02:00 bzolnier@trik.(none) +0 -5 # [ide] remove needless exports from ide-taskfile.c # # drivers/ide/ide-taskfile.c # 2004/10/26 22:52:46+02:00 bzolnier@trik.(none) +4 -29 # [ide] remove needless exports from ide-taskfile.c # # ChangeSet # 2004/10/26 20:37:32+00:00 steiner@sgi.com # [IA64] Delete obsolete code from SGI console driver # # Delete obsolete code that supports the SGI simulator. This # support code has been moved into the fakeprom and is no # longer required in the kernel. # # Signed-off-by: Jack Steiner # Signed-off-by: Tony Luck # # drivers/serial/sn_console.c # 2004/10/26 20:36:11+00:00 steiner@sgi.com +4 -75 # Delete obsolete code from SGI console driver # # ChangeSet # 2004/10/26 20:33:21+00:00 jasonuhl@sgi.com # [IA64] fix pgtable.h comments # # Remove some statements from comments in whose # correctness is page size dependent ... and based on using an 8k # page size, which almost nobody actually uses. # # Signed-off-by: Jason Uhlenkott # Signed-off-by: Tony Luck # # include/asm-ia64/pgtable.h # 2004/10/26 20:31:23+00:00 jasonuhl@sgi.com +4 -4 # fix pgtable.h comments # # ChangeSet # 2004/10/26 22:19:18+02:00 bzolnier@trik.(none) # [ide] add ide_use_dma() # # Should prevent bugs like the recent piix one in the future. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +2 -0 # [ide] add ide_use_dma() # # drivers/ide/pci/triflex.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +8 -17 # [ide] add ide_use_dma() # # drivers/ide/pci/slc90e66.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +6 -27 # [ide] add ide_use_dma() # # drivers/ide/pci/sis5513.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +7 -27 # [ide] add ide_use_dma() # # drivers/ide/pci/siimage.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +6 -27 # [ide] add ide_use_dma() # # drivers/ide/pci/serverworks.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +7 -29 # [ide] add ide_use_dma() # # drivers/ide/pci/piix.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +1 -15 # [ide] add ide_use_dma() # # drivers/ide/pci/pdc202xx_old.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +7 -28 # [ide] add ide_use_dma() # # drivers/ide/pci/pdc202xx_new.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +7 -28 # [ide] add ide_use_dma() # # drivers/ide/pci/it8172.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +7 -27 # [ide] add ide_use_dma() # # drivers/ide/pci/hpt366.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +7 -26 # [ide] add ide_use_dma() # # drivers/ide/pci/hpt34x.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +9 -29 # [ide] add ide_use_dma() # # drivers/ide/pci/cmd64x.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +7 -27 # [ide] add ide_use_dma() # # drivers/ide/pci/atiixp.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +7 -27 # [ide] add ide_use_dma() # # drivers/ide/pci/aec62xx.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +7 -27 # [ide] add ide_use_dma() # # drivers/ide/ide-dma.c # 2004/10/26 22:18:53+02:00 bzolnier@trik.(none) +32 -0 # [ide] add ide_use_dma() # # ChangeSet # 2004/10/26 21:55:02+02:00 bzolnier@trik.(none) # [ide] add pci_get_legacy_ide_irq() # # This patch adds pci_get_legacy_ide_irq() to the PCI layer for dealing # with PCI IDE chipsets that use the "legacy mode" IRQ routing, thus # violating the normal PCI routing. The generic implementation provides # IRQ numbers 14 and 15, and it adds a ppc64 specific one with platform # callbacks so that a plaform can provide different IRQ numbers for "legacy" # IDE. I only fixed the amd7xxx.c driver for now, I expect people using # this interface will slowly fix their drivers (I will fix via soon as I'll # need it too, and maybe a few others). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/asm-ppc64/pci.h # 2004/10/26 04:18:38+02:00 bzolnier@trik.(none) +10 -1 # [ide] add pci_get_legacy_ide_irq() # # include/asm-ppc64/machdep.h # 2004/10/26 04:18:38+02:00 bzolnier@trik.(none) +3 -0 # [ide] add pci_get_legacy_ide_irq() # # include/asm-generic/pci.h # 2004/10/26 04:18:38+02:00 bzolnier@trik.(none) +7 -0 # [ide] add pci_get_legacy_ide_irq() # # drivers/ide/pci/amd74xx.c # 2004/10/26 04:18:38+02:00 bzolnier@trik.(none) +2 -2 # [ide] add pci_get_legacy_ide_irq() # # ChangeSet # 2004/10/26 21:53:59+02:00 bzolnier@trik.(none) # [ide] remove unused internal exports from ide core # # From: Arjan van de Ven # # ide-iops.c exports a few functions that either have no users or have no # users AND shouldn't be used by drivers; the patch below unexports them. # # -EXPORT_SYMBOL(SELECT_INTERRUPT); # -EXPORT_SYMBOL(SELECT_MASK); # -EXPORT_SYMBOL(QUIRK_LIST); # -EXPORT_SYMBOL(ata_vlb_sync); # # only used in the core ide code # # -EXPORT_SYMBOL(ata_input_data); # -EXPORT_SYMBOL(ata_output_data); # # drivers should (and do) use the hwif-> function pointer variant of these, # these functions are internal and used for setting the default hwif-> # function pointers only. No need to export, in fact exporting is only asking # for accidents # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-iops.c # 2004/10/26 21:53:34+02:00 bzolnier@trik.(none) +0 -12 # [ide] remove unused internal exports from ide core # # ChangeSet # 2004/10/26 21:50:54+02:00 sam@mars.ravnborg.org # Merge bk://linux-sam.bkbits.net/kbuild # into mars.ravnborg.org:/home/sam/bk/to-linus # # lib/Kconfig.debug # 2004/10/26 21:50:45+02:00 sam@mars.ravnborg.org +0 -0 # Auto merged # # init/Kconfig # 2004/10/26 21:50:44+02:00 sam@mars.ravnborg.org +0 -0 # Auto merged # # arch/i386/Makefile # 2004/10/26 21:50:44+02:00 sam@mars.ravnborg.org +0 -0 # Auto merged # # Makefile # 2004/10/26 21:50:44+02:00 sam@mars.ravnborg.org +0 -0 # Auto merged # # Documentation/DocBook/Makefile # 2004/10/26 21:50:44+02:00 sam@mars.ravnborg.org +0 -0 # Auto merged # # ChangeSet # 2004/10/26 12:32:47-07:00 juhl-lkml@dif.dk # [NET]: Fix spelling error for IPComp help in Kconfig. # # Signed-off-by: Jasper Juhl # Signed-off-by: David S. Miller # # net/ipv6/Kconfig # 2004/10/26 12:32:29-07:00 juhl-lkml@dif.dk +2 -2 # [NET]: Fix spelling error for IPComp help in Kconfig. # # Signed-off-by: Jasper Juhl # Signed-off-by: David S. Miller # # net/ipv4/Kconfig # 2004/10/26 12:32:28-07:00 juhl-lkml@dif.dk +2 -2 # [NET]: Fix spelling error for IPComp help in Kconfig. # # Signed-off-by: Jasper Juhl # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 12:28:02-07:00 herbert@gondor.apana.org.au # [TCP]: Move tcp_get_info() into tcp.c # # In my recent foray into tcp_diag I discovered some ugly looking ifdef's # on CONFIG_IPV6 that'll break when IPv6 is built as a module. In order # to fix it, we need to allow tcp_diag to be built as a module. # # So here is a start. This patch move tcp_get_info from tcp_diag.c into # the site of the other caller, tcp.c. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_diag.c # 2004/10/26 12:27:43-07:00 herbert@gondor.apana.org.au +0 -57 # [TCP]: Move tcp_get_info() into tcp.c # # In my recent foray into tcp_diag I discovered some ugly looking ifdef's # on CONFIG_IPV6 that'll break when IPv6 is built as a module. In order # to fix it, we need to allow tcp_diag to be built as a module. # # So here is a start. This patch move tcp_get_info from tcp_diag.c into # the site of the other caller, tcp.c. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp.c # 2004/10/26 12:27:43-07:00 herbert@gondor.apana.org.au +57 -0 # [TCP]: Move tcp_get_info() into tcp.c # # In my recent foray into tcp_diag I discovered some ugly looking ifdef's # on CONFIG_IPV6 that'll break when IPv6 is built as a module. In order # to fix it, we need to allow tcp_diag to be built as a module. # # So here is a start. This patch move tcp_get_info from tcp_diag.c into # the site of the other caller, tcp.c. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 21:27:14+02:00 bzolnier@trik.(none) # [ide] pdc202xx_old: PDC20267 needs the same LBA48 fixup as PDC20265 # # From: Krzysztof Chmielewski # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/pdc202xx_old.c # 2004/10/26 21:26:53+02:00 bzolnier@trik.(none) +2 -1 # [ide] pdc202xx_old: PDC20267 needs the same LBA48 fixup as PDC20265 # # ChangeSet # 2004/10/26 19:24:59+00:00 kaos@sgi.com # [IA64] Correct references from text/data to init.text/data. # # These errors were found by 'make buildcheck'. # # Signed-off-by: Keith Owens # Signed-off-by: Tony Luck # # drivers/ide/pci/sgiioc4.c # 2004/10/26 19:23:57+00:00 kaos@sgi.com +6 -6 # Correct references from text/data to init.text/data. # # arch/ia64/mm/discontig.c # 2004/10/26 19:23:47+00:00 kaos@sgi.com +2 -2 # Correct references from text/data to init.text/data. # # ChangeSet # 2004/10/26 21:19:43+02:00 bzolnier@trik.(none) # [ide] ide-probe: undecoded slave fixup # # Undecoded slave fixup is a oneliner patch to ide-probe to # recognize both of my Maxtor drives that appear to have the same # serial number, D3000000. # # Signed-off-by: tabris@tabris.net # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-probe.c # 2004/10/26 21:19:22+02:00 bzolnier@trik.(none) +2 -0 # [ide] ide-probe: undecoded slave fixup # # ChangeSet # 2004/10/26 19:14:39+00:00 markgw@sgi.com # [IA64] sn_hwperf correctly handle bricks with multiple slabs # # The procfs handler for /proc/sgi_sn/sn_topology did # not correctly handle multiple slabs in the same brick, # e.g. a brick containing a compute node and an ionode. # # Signed-off-by: Mark Goodwin # Signed-off-by: Tony Luck # # include/asm-ia64/sn/sn2/sn_hwperf.h # 2004/10/26 19:13:13+00:00 markgw@sgi.com +9 -1 # sn_hwperf correctly handle bricks with multiple slabs # # arch/ia64/sn/kernel/sn2/sn_hwperf.c # 2004/10/26 19:12:58+00:00 markgw@sgi.com +22 -29 # sn_hwperf correctly handle bricks with multiple slabs # # ChangeSet # 2004/10/26 21:07:19+02:00 bzolnier@trik.(none) # [ide] ide-disk: fix /proc/ide/hd?/smart_thresholds # # Add missing ->data_phase assignment. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-disk.c # 2004/10/26 21:06:57+02:00 bzolnier@trik.(none) +1 -0 # [ide] ide-disk: fix /proc/ide/hd?/smart_thresholds # # ChangeSet # 2004/10/26 19:03:51+00:00 kaos@sgi.com # [IA64] Correct bit test for salinfo oem decode # # The valid.oem_data bit is in different positions in each section. Make # the test for valid oem data a section specific test. # # Signed-off-by: Keith Owens # Signed-off-by: Tony Luck # # arch/ia64/sn/kernel/mca.c # 2004/10/26 19:02:40+00:00 kaos@sgi.com +15 -13 # Correct bit test for salinfo oem decode # # ChangeSet # 2004/10/26 18:41:39+00:00 eranian@hpl.hp.com # [IA64] misc small patches for perfmon # # change-log: # - update comment for pfm_do_fasync() # - fix return value for pfm_smpl_buffer_alloc(). Now # return ENOMEM instead of EAGAIN when buffer too big # for RLIMIT_MEMLOCK. # - added missing vm_pgoff initialization in pfm_smpl_buffer_alloc() # - added flags tro debug print in pfm_write_pmcs # - added seed and mask to debug print in pfm_write_pmds # - shorten some of the debug prints # - remove bogus sanity check from pfm_save_regs() in SMP. # this could cause invalid PMU state restore # # signed-off-by: eranian@hpl.hp.com # Signed-off-by: Tony Luck # # arch/ia64/kernel/perfmon.c # 2004/10/26 18:39:25+00:00 eranian@hpl.hp.com +12 -20 # misc small patches for perfmon # # ChangeSet # 2004/10/26 18:36:52+00:00 alex.williamson@hp.com # [IA64] efi.c: fix mem= & max_addr= # # With this change, there's some extra fuzz introduced that a max_addr # specification will get rounded down to a granule boundary and memory # quantity, when using mem=, will be within a granule size of the # requested amount. Let me know if anyone finds more problems with it. # # Signed-off-by: Alex Williamson # Signed-off-by: Tony Luck # # arch/ia64/kernel/efi.c # 2004/10/26 18:34:33+00:00 alex.williamson@hp.com +23 -11 # fix mem= & max_addr= # # ChangeSet # 2004/10/26 18:23:18+00:00 akpm@osdl.org # [IA64] Need for KERNEL_DS & set_fs() definitions. # # Signed-off-by: Andrew Morton # Signed-off-by: Tony Luck # # arch/ia64/ia32/elfcore32.h # 2004/10/26 18:20:48+00:00 akpm@osdl.org +1 -0 # Need for KERNEL_DS & set_fs() definitions. # # ChangeSet # 2004/10/26 12:12:49-05:00 shaggy@austin.ibm.com # JFS: endian annotations # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_xtree.h # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +7 -7 # endian annotations # # fs/jfs/jfs_xtree.c # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +1 -1 # endian annotations # # fs/jfs/jfs_xattr.h # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +2 -2 # endian annotations # # fs/jfs/jfs_unicode.h # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +24 -8 # endian annotations # # fs/jfs/jfs_unicode.c # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +1 -1 # endian annotations # # fs/jfs/jfs_types.h # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +8 -8 # endian annotations # # fs/jfs/jfs_superblock.h # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +16 -16 # endian annotations # # fs/jfs/jfs_mount.c # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +1 -1 # endian annotations # # fs/jfs/jfs_logmgr.h # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +48 -48 # endian annotations # # fs/jfs/jfs_imap.h # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +46 -28 # endian annotations # # fs/jfs/jfs_imap.c # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +33 -32 # endian annotations # # fs/jfs/jfs_dtree.h # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +9 -9 # endian annotations # # fs/jfs/jfs_dtree.c # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +15 -11 # endian annotations # # fs/jfs/jfs_dmap.h # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +46 -29 # endian annotations # # fs/jfs/jfs_dmap.c # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +5 -5 # endian annotations # # fs/jfs/jfs_dinode.h # 2004/10/26 12:12:30-05:00 shaggy@austin.ibm.com +14 -14 # endian annotations # # ChangeSet # 2004/10/26 09:09:37-07:00 torvalds@ppc970.osdl.org # Merge bk://gkernel.bkbits.net/net-drivers-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # net/core/dev.c # 2004/10/26 09:09:33-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # include/linux/netdevice.h # 2004/10/26 09:09:33-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/10/26 08:22:01-07:00 akpm@osdl.org # [PATCH] revert- sys_setaltroot # # We decided to do this a different way. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/syscalls.h # 2004/10/24 02:47:46-07:00 akpm@osdl.org +0 -1 # revert- sys_setaltroot # # include/asm-sparc64/unistd.h # 2004/10/24 02:47:46-07:00 akpm@osdl.org +1 -1 # revert- sys_setaltroot # # include/asm-ia64/unistd.h # 2004/10/24 02:47:46-07:00 akpm@osdl.org +0 -1 # revert- sys_setaltroot # # include/asm-i386/unistd.h # 2004/10/24 03:32:46-07:00 akpm@osdl.org +1 -1 # revert- sys_setaltroot # # fs/namei.c # 2004/10/24 03:32:35-07:00 akpm@osdl.org +5 -57 # revert- sys_setaltroot # # arch/sparc64/kernel/systbls.S # 2004/10/24 02:47:46-07:00 akpm@osdl.org +2 -2 # revert- sys_setaltroot # # arch/ia64/kernel/entry.S # 2004/10/24 02:47:46-07:00 akpm@osdl.org +1 -1 # revert- sys_setaltroot # # arch/i386/kernel/entry.S # 2004/10/24 03:32:48-07:00 akpm@osdl.org +1 -1 # revert- sys_setaltroot # # ChangeSet # 2004/10/26 08:02:35-07:00 roland@redhat.com # [PATCH] Wake up signalled tasks when exiting ptrace # # In general it is not safe to do any non-ptrace wakeup of a thread in # TASK_TRACED, because the waking thread could race with a ptrace call # that could be doing things like mucking directly with its kernel stack. # # AFAIK noone has established that whatever clobberation ptrace can do to # a running thread is safe even if it will never return to user mode, so # we can't allow this even for SIGKILL. # # What we _can_ safely do is make a thread switching out of TASK_TRACED # resume rather than sitting in TASK_STOPPED if it has a pending SIGKILL # or SIGCONT. The following patch does this. # # This should be sufficient for the shutdown case. When killing all # processes, if the tracer gets killed first, the tracee goes into # TASK_STOPPED and will be woken and killed by the SIGKILL (same as # before). If the tracee gets killed first, it gets a pending SIGKILL and # doesn't wake up immediately--but, now, when the tracer gets killed, the # tracee will then wake up to die. # # This will also fix the (same) situations that can arise now where you # have used gdb (or whatever ptrace caller), killed -9 the gdb and the # process being debugged, but still have to kill -CONT the process before # it goes away (now it should just go away either the first time or when # you kill gdb). # # Signed-off-by: Roland McGrath # Signed-off-by: Linus Torvalds # # kernel/ptrace.c # 2004/10/25 21:13:16-07:00 roland@redhat.com +14 -0 # Wake up signalled tasks when exiting ptrace # # ChangeSet # 2004/10/26 08:02:20-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Some sparse fixes # # This is a batch of sparse fixes for things in arch/ppc64/* and # include/asm-ppc64/* # # More to come of course... # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/udbg.h # 2004/10/25 23:52:29-07:00 benh@kernel.crashing.org +3 -1 # ppc64: Some sparse fixes # # include/asm-ppc64/io.h # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +1 -1 # ppc64: Some sparse fixes # # arch/ppc64/mm/init.c # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +3 -3 # ppc64: Some sparse fixes # # arch/ppc64/kernel/xics.c # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +21 -18 # ppc64: Some sparse fixes # # arch/ppc64/kernel/vecemu.c # 2004/10/25 23:42:56-07:00 benh@kernel.crashing.org +1 -1 # ppc64: Some sparse fixes # # arch/ppc64/kernel/udbg.c # 2004/10/25 23:51:33-07:00 benh@kernel.crashing.org +46 -46 # ppc64: Some sparse fixes # # arch/ppc64/kernel/rtasd.c # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +1 -1 # ppc64: Some sparse fixes # # arch/ppc64/kernel/proc_ppc64.c # 2004/10/25 23:36:24-07:00 benh@kernel.crashing.org +22 -11 # ppc64: Some sparse fixes # # arch/ppc64/kernel/pci.c # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +2 -2 # ppc64: Some sparse fixes # # arch/ppc64/kernel/pSeries_pci.c # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +8 -8 # ppc64: Some sparse fixes # # arch/ppc64/kernel/nvram.c # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +1 -1 # ppc64: Some sparse fixes # # arch/ppc64/kernel/lparcfg.c # 2004/10/25 23:42:05-07:00 benh@kernel.crashing.org +5 -5 # ppc64: Some sparse fixes # # ChangeSet # 2004/10/26 08:02:03-07:00 benh@kernel.crashing.org # [PATCH] 8250: Fix empty port registration # # My latest 8250 patch prevented registration of "empty" ports (ports that # have a 0 iobase in the static table). Unfortunately, some archs seem to rely # on this, and so broke. This patch reverts that part of the patch. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # drivers/serial/8250.c # 2004/10/25 05:05:26-07:00 benh@kernel.crashing.org +0 -7 # 8250: Fix empty port registration # # ChangeSet # 2004/10/26 07:53:34-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Add new "Maple" platform support # # This adds support for the Maple 970FX Eval Board. It adds the basic # arch support. For the Maple to be fully functional, it needs a couple # more patches to be applied for IDE and Ethernet that are currently # pending with the respective maintainers of those subsystems. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/maple_time.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +226 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/maple_setup.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +243 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/maple_pci.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +528 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/configs/maple_defconfig # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +921 -0 # ppc64: Add new "Maple" platform support # # include/asm-ppc64/processor.h # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +1 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/udbg.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +29 -3 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/setup.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +8 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/prom_init.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +2 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/misc.S # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +2 -2 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/maple_time.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/maple_time.c # # arch/ppc64/kernel/maple_setup.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/maple_setup.c # # arch/ppc64/kernel/maple_pci.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/maple_pci.c # # arch/ppc64/kernel/idle.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +5 -3 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/Makefile # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +3 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/configs/maple_defconfig # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/configs/maple_defconfig # # arch/ppc64/Makefile # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +2 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/Kconfig # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +15 -0 # ppc64: Add new "Maple" platform support # # ChangeSet # 2004/10/26 07:31:50-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix g5-only build # # The iommu_free_table() patch broke g5 only build by adding back some # incestuous relationship between generic code and pSeries code. # # This wraps this in #ifdef as a quick fix until the original author of # the patch comes up with a better solution. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/iommu.h # 2004/10/26 00:19:17-07:00 benh@kernel.crashing.org +8 -0 # ppc64: Fix g5-only build # # arch/ppc64/kernel/prom.c # 2004/10/26 00:22:28-07:00 benh@kernel.crashing.org +5 -0 # ppc64: Fix g5-only build # # ChangeSet # 2004/10/26 07:31:36-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix new mpic driver on some POWER3 # # On machines using the "ISU" mecanism for the MPIC, the new driver didn't properly # calculate the new interrupt count when an ISU was added. That would cause later on # failure to request interrupts in the offending range. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/mpic.c # 2004/10/25 21:36:00-07:00 benh@kernel.crashing.org +4 -2 # ppc64: Fix new mpic driver on some POWER3 # # ChangeSet # 2004/10/26 07:31:24-07:00 benh@kernel.crashing.org # [PATCH] ppc64: PCI ignores empty phb regions # # The ppc64 PCI code, when parsing the OF tree, may end up getting empty # regions in addition to the "normal" ones for the PHB (some pSeries OF # device-tree contains weird "ranges" properties). These are harmless but # do trigger some annoying warnings during boot, so let's ignore them. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pci.c # 2004/10/25 21:18:54-07:00 benh@kernel.crashing.org +2 -0 # ppc64: PCI ignores empty phb regions # # ChangeSet # 2004/10/26 08:43:22-05:00 shaggy@austin.ibm.com # JFS: avoid assert in lbmfree # # In the error path, lmLogInit must clear log->lbuf_free before # calling lbmFree. # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_logmgr.c # 2004/10/26 08:43:01-05:00 shaggy@austin.ibm.com +2 -0 # error path in lmLogInit must zero wqueue & l_wqnext when calling lbmFree # # ChangeSet # 2004/10/26 03:42:24-04:00 jgarzik@pobox.com # [libata] return ENOTTY rather than EOPNOTSUPP for unknown-ioctl # # drivers/scsi/libata-scsi.c # 2004/10/26 03:42:18-04:00 jgarzik@pobox.com +1 -1 # [libata] return ENOTTY rather than EOPNOTSUPP for unknown-ioctl # # ChangeSet # 2004/10/26 02:25:28-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # arch/i386/pci/irq.c # 2004/10/26 02:25:25-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/10/26 02:25:25-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/26 01:20:52-04:00 arjan@infradead.org # [PATCH] remove NET_HW_FLOWCONTROL # # CONFIG_NET_HW_FLOWCONTROL is entirely unused now, and superceded by NAPI in # practice, so remove the dead code # # Signed-off-by: Arjan van de Ven # Signed-off-by: Jeff Garzik # # net/core/dev.c # 2004/10/25 16:14:10-04:00 arjan@infradead.org +2 -91 # remove NET_HW_FLOWCONTROL # # net/Kconfig # 2004/10/25 16:14:23-04:00 arjan@infradead.org +0 -18 # remove NET_HW_FLOWCONTROL # # include/linux/netdevice.h # 2004/10/25 16:08:54-04:00 arjan@infradead.org +0 -2 # remove NET_HW_FLOWCONTROL # # ChangeSet # 2004/10/25 21:28:00-07:00 davem@nuts.davemloft.net # Merge bk://bk.skbuff.net:20610/linux-2.6-inet6-20041026/ # into nuts.davemloft.net:/disk1/BK/net-2.6 # # net/ipv6/route.c # 2004/10/25 21:27:49-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # include/net/ip6_route.h # 2004/10/25 21:27:49-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2004/10/26 00:20:08-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-ref # into intel.com:/home/lenb/src/26-latest-dev # # drivers/acpi/thermal.c # 2004/10/26 00:19:56-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/26 13:11:47+09:00 yoshfuji@linux-ipv6.org # [IPV6] kill a warning when building without CONFIG_SYSCTL. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/addrconf.c # 2004/10/26 13:11:35+09:00 yoshfuji@linux-ipv6.org +2 -1 # [IPV6] kill a warning when building without CONFIG_SYSCTL. # # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/10/25 21:11:03-07:00 benh@kernel.crashing.org # [PATCH] ppc64: don't include # # This patch fixes a couple of places where the ppc64 iSeries code would # #include . The only "system" include I consider acceptable is # provided by gcc. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pacaData.c # 2004/10/25 15:43:35-07:00 benh@kernel.crashing.org +2 -3 # ppc64: don't include # # arch/ppc64/kernel/LparData.c # 2004/10/25 15:44:56-07:00 benh@kernel.crashing.org +2 -3 # ppc64: don't include # # ChangeSet # 2004/10/25 21:10:51-07:00 benh@kernel.crashing.org # [PATCH] Remove bogus definition of local chrp_int_ack_special in pSeries_setup.c. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_setup.c # 2004/10/25 20:09:10-07:00 benh@kernel.crashing.org +1 -3 # Remove bogus definition of local chrp_int_ack_special in pSeries_setup.c. # # ChangeSet # 2004/10/25 20:57:45-07:00 herbert@gondor.apana.org.au # [TCP]: Handle real partial-ACKs of TSO frames correctly. # # Actually, I think we've caught your crash now. If that code path # is triggering at all, then it'll trigger with TSO packets too. If # we get a truly partial ack on a TSO packet, then tcp_tso_acked will # not trim it off. So we will fall through to this last-ditch trim # call, which doesn't update packets_out. # # There are two solutions to this problem. I've taken the simpler # approach for now. We simply trim off the partial bits in tcp_tso_acked # and live with the fact that the packet counters may differ from # what's on the netwrok by one. # # Later on we can 'fix' this by remembering where the original TSO # packet started from, perhaps in skb->h or somewhere. Dave, is this # worth it? # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2004/10/25 20:57:25-07:00 herbert@gondor.apana.org.au +1 -1 # [TCP]: Handle real partial-ACKs of TSO frames correctly. # # Actually, I think we've caught your crash now. If that code path # is triggering at all, then it'll trigger with TSO packets too. If # we get a truly partial ack on a TSO packet, then tcp_tso_acked will # not trim it off. So we will fall through to this last-ditch trim # call, which doesn't update packets_out. # # There are two solutions to this problem. I've taken the simpler # approach for now. We simply trim off the partial bits in tcp_tso_acked # and live with the fact that the packet counters may differ from # what's on the netwrok by one. # # Later on we can 'fix' this by remembering where the original TSO # packet started from, perhaps in skb->h or somewhere. Dave, is this # worth it? # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_input.c # 2004/10/25 20:57:25-07:00 herbert@gondor.apana.org.au +6 -12 # [TCP]: Handle real partial-ACKs of TSO frames correctly. # # Actually, I think we've caught your crash now. If that code path # is triggering at all, then it'll trigger with TSO packets too. If # we get a truly partial ack on a TSO packet, then tcp_tso_acked will # not trim it off. So we will fall through to this last-ditch trim # call, which doesn't update packets_out. # # There are two solutions to this problem. I've taken the simpler # approach for now. We simply trim off the partial bits in tcp_tso_acked # and live with the fact that the packet counters may differ from # what's on the netwrok by one. # # Later on we can 'fix' this by remembering where the original TSO # packet started from, perhaps in skb->h or somewhere. Dave, is this # worth it? # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 12:55:56+09:00 yoshfuji@linux-ipv6.org # [IPV6] NDISC: update neighbor cache entry by RS. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/ndisc.c # 2004/10/26 12:55:42+09:00 yoshfuji@linux-ipv6.org +62 -0 # [IPV6] NDISC: update neighbor cache entry by RS. # # Signed-off-by: Hideaki YOSHIFUJI # # include/net/ndisc.h # 2004/10/26 12:55:42+09:00 yoshfuji@linux-ipv6.org +5 -0 # [IPV6] NDISC: update neighbor cache entry by RS. # # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/10/26 12:54:58+09:00 yoshfuji@linux-ipv6.org # [IPV6] simplify functions related to RTF_ALLONLINK. # # Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and # rt6_purge_dflt_routers(). # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/route.c # 2004/10/26 12:54:27+09:00 yoshfuji@linux-ipv6.org +2 -5 # [IPV6] simplify functions related to RTF_ALLONLINK. # # Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and # rt6_purge_dflt_routers(). # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/ndisc.c # 2004/10/26 12:54:27+09:00 yoshfuji@linux-ipv6.org +2 -2 # [IPV6] simplify functions related to RTF_ALLONLINK. # # Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and # rt6_purge_dflt_routers(). # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/addrconf.c # 2004/10/26 12:54:27+09:00 yoshfuji@linux-ipv6.org +5 -18 # [IPV6] simplify functions related to RTF_ALLONLINK. # # Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and # rt6_purge_dflt_routers(). # # Signed-off-by: Hideaki YOSHIFUJI # # include/net/ip6_route.h # 2004/10/26 12:54:27+09:00 yoshfuji@linux-ipv6.org +1 -1 # [IPV6] simplify functions related to RTF_ALLONLINK. # # Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and # rt6_purge_dflt_routers(). # # Signed-off-by: Hideaki YOSHIFUJI # # include/net/addrconf.h # 2004/10/26 12:54:27+09:00 yoshfuji@linux-ipv6.org +1 -2 # [IPV6] simplify functions related to RTF_ALLONLINK. # # Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and # rt6_purge_dflt_routers(). # # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/10/26 12:54:41+09:00 yoshfuji@linux-ipv6.org # [IPV6] Remove codes related to RTF_ALLONLINK. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/route.c # 2004/10/26 12:54:23+09:00 yoshfuji@linux-ipv6.org +2 -5 # [IPV6] Remove codes related to RTF_ALLONLINK. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/ndisc.c # 2004/10/26 12:54:23+09:00 yoshfuji@linux-ipv6.org +1 -1 # [IPV6] Remove codes related to RTF_ALLONLINK. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/ip6_fib.c # 2004/10/26 12:54:23+09:00 yoshfuji@linux-ipv6.org +1 -1 # [IPV6] Remove codes related to RTF_ALLONLINK. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/addrconf.c # 2004/10/26 12:54:23+09:00 yoshfuji@linux-ipv6.org +1 -1 # [IPV6] Remove codes related to RTF_ALLONLINK. # # Signed-off-by: Hideaki YOSHIFUJI # # include/linux/ipv6_route.h # 2004/10/26 12:54:23+09:00 yoshfuji@linux-ipv6.org +2 -1 # [IPV6] Remove codes related to RTF_ALLONLINK. # # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/10/26 12:51:07+09:00 Brian.Haley@hp.com # [IPV6] Lookup appropriate destination when sending TCPv6 with routing header. # # Signed-off-by: Brian Haley # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/tcp_ipv6.c # 2004/10/26 12:50:56+09:00 Brian.Haley@hp.com +6 -0 # [IPV6] Lookup appropriate destination when sending TCPv6 with routing header. # # Signed-off-by: Brian Haley # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/10/25 20:49:06-07:00 akpm@osdl.org # [CRYPTO]: aes-586-asm: small optimizations # # From: Denis Vlasenko # # - recode back-to-back fwd_rnd() pairs to avoid two register moves. # # - ditto for inv_rnd(). # # - optimize out lea 0(%ebp),%ebp # # - remove two stray insns # # # size aes-i586-asm.o.org aes-i586-asm.o # text data bss dec hex filename # 5971 0 0 5971 1753 aes-i586-asm.o.org # 5905 0 0 5905 1711 aes-i586-asm.o # # Overall, patch does not add and does not modify any insns, only removes a # handful of them. However, speed difference is way below noise level. # # Run-tested with tcrypt module. # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # arch/i386/crypto/aes-i586-asm.S # 2004/10/25 20:48:46-07:00 akpm@osdl.org +103 -65 # [CRYPTO]: aes-586-asm: small optimizations # # From: Denis Vlasenko # # - recode back-to-back fwd_rnd() pairs to avoid two register moves. # # - ditto for inv_rnd(). # # - optimize out lea 0(%ebp),%ebp # # - remove two stray insns # # # size aes-i586-asm.o.org aes-i586-asm.o # text data bss dec hex filename # 5971 0 0 5971 1753 aes-i586-asm.o.org # 5905 0 0 5905 1711 aes-i586-asm.o # # Overall, patch does not add and does not modify any insns, only removes a # handful of them. However, speed difference is way below noise level. # # Run-tested with tcrypt module. # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:48:25-07:00 akpm@osdl.org # [CRYPTO]: aes-586-asm: formatting changes # # From: Denis Vlasenko # # - Macro parameters renamed for clarity. # # - Inaccurate comments fixed. # # - ebp register usage de-obfuscated (this is needed for next patch). # # No real code changes. # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # arch/i386/crypto/aes-i586-asm.S # 2004/10/25 20:48:06-07:00 akpm@osdl.org +115 -118 # [CRYPTO]: aes-586-asm: formatting changes # # From: Denis Vlasenko # # - Macro parameters renamed for clarity. # # - Inaccurate comments fixed. # # - ebp register usage de-obfuscated (this is needed for next patch). # # No real code changes. # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:47:38-07:00 akpm@osdl.org # [CRYPTO]: reduce sha512_transform() stack usage, speedup # # Patch moves large temporary u64 W[80] from stack to ctx struct: # # * reduces stack usage by 640 bytes # * saves one 640-byte memset() per sha512_transform() # (we still do it after *all* iterations are done) # * quite unexpectedly saves 1.6k of code on i386 # because stack offsets now fit into 8bits # and many stack addressing insns got 3 bytes smaller: # # # size sha512.o.org sha512.o # text data bss dec hex filename # 8281 372 0 8653 21cd sha512.o.org # 6649 372 0 7021 1b6d sha512.o # # # objdump -d sha512.o.org | cut -b9- >sha512.d.org # # objdump -d sha512.o | cut -b9- >sha512.d # # diff -u sha512.d.org sha512.d # [snip] # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # crypto/sha512.c # 2004/10/25 20:47:19-07:00 akpm@osdl.org +7 -5 # [CRYPTO]: reduce sha512_transform() stack usage, speedup # # Patch moves large temporary u64 W[80] from stack to ctx struct: # # * reduces stack usage by 640 bytes # * saves one 640-byte memset() per sha512_transform() # (we still do it after *all* iterations are done) # * quite unexpectedly saves 1.6k of code on i386 # because stack offsets now fit into 8bits # and many stack addressing insns got 3 bytes smaller: # # # size sha512.o.org sha512.o # text data bss dec hex filename # 8281 372 0 8653 21cd sha512.o.org # 6649 372 0 7021 1b6d sha512.o # # # objdump -d sha512.o.org | cut -b9- >sha512.d.org # # objdump -d sha512.o | cut -b9- >sha512.d # # diff -u sha512.d.org sha512.d # [snip] # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:46:17-07:00 akpm@osdl.org # [CRYPTO]: small sha512 cleanup # # Looks like open-coded be_to_cpu. GCC produces rather poor code for this. # be_to_cpu produces asm()s which are ~4 times shorter. # # Compile-tested only. # # I am not sure whether input can be 64bit-unaligned. # If it indeed can be, replace: # # ((u64*)(input))[I] -> get_unaligned( ((u64*)(input))+I ) # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # crypto/sha512.c # 2004/10/25 20:45:58-07:00 akpm@osdl.org +2 -17 # [CRYPTO]: small sha512 cleanup # # Looks like open-coded be_to_cpu. GCC produces rather poor code for this. # be_to_cpu produces asm()s which are ~4 times shorter. # # Compile-tested only. # # I am not sure whether input can be 64bit-unaligned. # If it indeed can be, replace: # # ((u64*)(input))[I] -> get_unaligned( ((u64*)(input))+I ) # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:45:35-07:00 akpm@osdl.org # [CRYPTO]: small sha256 cleanup # # Looks like open-coded be_to_cpu. GCC produces rather poor code for this. # be_to_cpu produces asm()s which are ~4 times shorter. # # Compile-tested only. # # I am not sure whether input can be 32bit-unaligned. # If it indeed can be, replace: # # ((u32*)(input))[I] -> get_unaligned( ((u32*)(input))+I ) # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # crypto/sha256.c # 2004/10/25 20:45:16-07:00 akpm@osdl.org +1 -9 # [CRYPTO]: small sha256 cleanup # # Looks like open-coded be_to_cpu. GCC produces rather poor code for this. # be_to_cpu produces asm()s which are ~4 times shorter. # # Compile-tested only. # # I am not sure whether input can be 32bit-unaligned. # If it indeed can be, replace: # # ((u32*)(input))[I] -> get_unaligned( ((u32*)(input))+I ) # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 23:42:58-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/janitor # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/tulip/tulip_core.c # 2004/10/25 23:42:55-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/slip.c # 2004/10/25 23:42:55-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/sis900.c # 2004/10/25 23:42:55-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/ns83820.c # 2004/10/25 23:42:55-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/3c59x.c # 2004/10/25 23:42:55-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 23:41:18-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/misc # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/e1000/e1000_main.c # 2004/10/25 23:41:15-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 20:31:50-07:00 davem@nuts.davemloft.net # Merge bk://212.42.230.204/nf-2.6 # into nuts.davemloft.net:/disk1/BK/net-2.6 # # net/ipv6/netfilter/ip6_tables.c # 2004/10/25 20:31:40-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2004/10/25 23:30:02-04:00 len.brown@intel.com # [ACPI] Move the "only do this once" stuff from acpi_register_gsi() into # eisa_set_level(). # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Len Brown # # arch/i386/pci/irq.c # 2004/09/30 12:39:46-04:00 len.brown@intel.com +8 -1 # Import patch eisa_set_level_irq.txt # # arch/i386/kernel/acpi/boot.c # 2004/09/30 12:39:46-04:00 len.brown@intel.com +1 -7 # Import patch eisa_set_level_irq.txt # # ChangeSet # 2004/10/25 20:29:14-07:00 hch@lst.de # [NET]: Remove dead socket layer exports. # # Signed-off-by: David S. Miller # # net/socket.c # 2004/10/25 20:28:54-07:00 hch@lst.de +1 -3 # [NET]: Remove dead socket layer exports. # # Signed-off-by: David S. Miller # # net/core/sock.c # 2004/10/25 20:28:54-07:00 hch@lst.de +9 -17 # [NET]: Remove dead socket layer exports. # # Signed-off-by: David S. Miller # # include/net/sock.h # 2004/10/25 20:28:54-07:00 hch@lst.de +0 -2 # [NET]: Remove dead socket layer exports. # # Signed-off-by: David S. Miller # # include/linux/net.h # 2004/10/25 20:28:54-07:00 hch@lst.de +0 -1 # [NET]: Remove dead socket layer exports. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:26:28-07:00 hch@lst.de # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2004/10/25 20:26:08-07:00 hch@lst.de +0 -5 # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_ipv4.c # 2004/10/25 20:26:08-07:00 hch@lst.de +2 -3 # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_input.c # 2004/10/25 20:26:08-07:00 hch@lst.de +0 -1 # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/ipv4/tcp.c # 2004/10/25 20:26:08-07:00 hch@lst.de +0 -1 # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/ipv4/af_inet.c # 2004/10/25 20:26:08-07:00 hch@lst.de +0 -2 # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # include/net/tcp.h # 2004/10/25 20:26:08-07:00 hch@lst.de +0 -1 # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:25:51-07:00 hch@lst.de # [IPV6]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/ipv6/ipv6_syms.c # 2004/10/25 20:25:32-07:00 hch@lst.de +0 -4 # [IPV6]: Remove dead exports. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:24:58-07:00 torvalds@ppc970.osdl.org # Fix UP non-preempt build for kernel lock changes. # # Duh. I had tested every "interesting" combination of SMP and PREEMPT, # but the _trivial_ one was broken ;) # # include/linux/smp_lock.h # 2004/10/25 20:24:52-07:00 torvalds@ppc970.osdl.org +1 -1 # Fix UP non-preempt build for kernel lock changes. # # Duh. I had tested every "interesting" combination of SMP and PREEMPT, # but the _trivial_ one was broken ;) # # ChangeSet # 2004/10/25 20:24:06-07:00 hch@lst.de # [XFRM]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/xfrm/xfrm_state.c # 2004/10/25 20:23:46-07:00 hch@lst.de +6 -16 # [XFRM]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2004/10/25 20:23:46-07:00 hch@lst.de +6 -3 # [XFRM]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/xfrm/xfrm_export.c # 2004/10/25 20:23:46-07:00 hch@lst.de +0 -8 # [XFRM]: Remove dead exports. # # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2004/10/25 20:23:46-07:00 hch@lst.de +0 -7 # [XFRM]: Remove dead exports. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:22:11-07:00 hch@lst.de # [ATM]: Mark vcc_remove_socket static # # Signed-off-by: David S. Miller # # net/atm/common.c # 2004/10/25 20:21:51-07:00 hch@lst.de +1 -2 # [ATM]: Mark vcc_remove_socket static # # Signed-off-by: David S. Miller # # include/linux/atmdev.h # 2004/10/25 20:21:51-07:00 hch@lst.de +0 -1 # [ATM]: Mark vcc_remove_socket static # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:20:56-07:00 pcaulfie@redhat.com # [DECNET]: Connect hang bugfix # # This patch fixes a bug in the DECnet connect that seems to have been in 2.6 for # a while now. # # If a connection is rejected by a remote host (eg invalid access control, no # such object etc) the Linux end hangs in connect() because it is only waiting for # the socket to go into RUN state. # # This patch sets the ECONNREFUSED error state on the socket when the connection # is rejected to that the connect() exits it's wait loop and returns the error to # the user. # # Signed-off-by: David S. Miller # # net/decnet/dn_nsp_in.c # 2004/10/25 20:20:37-07:00 pcaulfie@redhat.com +1 -0 # [DECNET]: Connect hang bugfix # # This patch fixes a bug in the DECnet connect that seems to have been in 2.6 for # a while now. # # If a connection is rejected by a remote host (eg invalid access control, no # such object etc) the Linux end hangs in connect() because it is only waiting for # the socket to go into RUN state. # # This patch sets the ECONNREFUSED error state on the socket when the connection # is rejected to that the connect() exits it's wait loop and returns the error to # the user. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:10:46-07:00 tgraf@suug.ch # [PKT_SCHED]: Rename TCQ_F_INGRES to TCQ_F_INGRESS. # # This typo annoyned me several times by not showing up in greps. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/sch_api.c # 2004/10/25 20:10:27-07:00 tgraf@suug.ch +3 -3 # [PKT_SCHED]: Rename TCQ_F_INGRES to TCQ_F_INGRESS. # # This typo annoyned me several times by not showing up in greps. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_sched.h # 2004/10/25 20:10:27-07:00 tgraf@suug.ch +1 -1 # [PKT_SCHED]: Rename TCQ_F_INGRES to TCQ_F_INGRESS. # # This typo annoyned me several times by not showing up in greps. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:09:20-07:00 ehrhardt@mathematik.uni-ulm.de # [IPV4]: Do not try to unhash null-netdev nexthops. # # Signed-off-by: Christian Ehrhardt # Signed-off-by: David S. Miller # # net/ipv4/fib_semantics.c # 2004/10/25 20:09:01-07:00 ehrhardt@mathematik.uni-ulm.de +2 -0 # [IPV4]: Do not try to unhash null-netdev nexthops. # # Signed-off-by: Christian Ehrhardt # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:07:30-07:00 chas@cmf.nrl.navy.mil # [ATM]: [horizon] eliminate pci_find_device() # # Signed-off-by: David S. Miller # # drivers/atm/horizon.h # 2004/10/25 20:07:11-07:00 chas@cmf.nrl.navy.mil +1 -1 # [ATM]: [horizon] eliminate pci_find_device() # # Signed-off-by: David S. Miller # # drivers/atm/horizon.c # 2004/10/25 20:07:11-07:00 chas@cmf.nrl.navy.mil +156 -176 # [ATM]: [horizon] eliminate pci_find_device() # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:06:33-07:00 linville@tuxdriver.com # [VLAN]: Add MODULE_VERSION # # Signed-off-by: John W. Linville # Signed-off-by: David S. Miller # # net/8021q/vlan.c # 2004/10/25 20:06:13-07:00 linville@tuxdriver.com +6 -4 # [VLAN]: Add MODULE_VERSION # # Signed-off-by: John W. Linville # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:05:55-07:00 linville@tuxdriver.com # [BONDING]: Add MODULE_VERSION # # Signed-off-by: John W. Linville # Signed-off-by: David S. Miller # # drivers/net/bonding/bond_main.c # 2004/10/25 20:05:36-07:00 linville@tuxdriver.com +1 -0 # [BONDING]: Add MODULE_VERSION # # Signed-off-by: John W. Linville # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:04:33-07:00 arnouten@bzzt.net # [TCP]: Add /proc/net/tcp{,6} layout documentation. # # Signed-off-by: David S. Miller # # Documentation/networking/proc_net_tcp.txt # 2004/10/25 20:04:00-07:00 arnouten@bzzt.net +47 -0 # [TCP]: Add /proc/net/tcp{,6} layout documentation. # # Documentation/networking/proc_net_tcp.txt # 2004/10/25 20:04:00-07:00 arnouten@bzzt.net +0 -0 # BitKeeper file /disk1/BK/net-2.6/Documentation/networking/proc_net_tcp.txt # # ChangeSet # 2004/10/25 19:47:47-07:00 suresh.krishnan@ericsson.ca # [NET]: Address family not supported for sendmsg() # # Signed-off-by: David S. Miller # # net/ipv6/udp.c # 2004/10/25 19:47:26-07:00 suresh.krishnan@ericsson.ca +1 -1 # [NET]: Address family not supported for sendmsg() # # Signed-off-by: David S. Miller # # net/ipv6/raw.c # 2004/10/25 19:47:26-07:00 suresh.krishnan@ericsson.ca +1 -1 # [NET]: Address family not supported for sendmsg() # # Signed-off-by: David S. Miller # # net/ipv4/udp.c # 2004/10/25 19:47:26-07:00 suresh.krishnan@ericsson.ca +1 -1 # [NET]: Address family not supported for sendmsg() # # Signed-off-by: David S. Miller # # net/ipv4/raw.c # 2004/10/25 19:47:26-07:00 suresh.krishnan@ericsson.ca +1 -1 # [NET]: Address family not supported for sendmsg() # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 22:44:31-04:00 len.brown@intel.com # [ACPI] ACPI_VIDEO is EXPERIMENTAL # # drivers/acpi/Kconfig # 2004/10/25 22:44:21-04:00 len.brown@intel.com +1 -0 # ACPI_VIDEO is EXPERIMENTAL # # ChangeSet # 2004/10/25 18:42:30-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Cleanup console detection # # This removes some leftover code that was in #if 0 in the console # autodetect code. # # It also adds passing of the default serial speed as console options when # it is available from Open Firmware. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/setup.c # 2004/10/25 18:18:06-07:00 benh@kernel.crashing.org +17 -20 # ppc64: Cleanup console detection # # ChangeSet # 2004/10/25 18:42:17-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Improve PCI config accessors # # This improves the config space access routines on G5, by adding a # generic helper function to locate the pci_controller structure (to be # used by an upcoming new platform too) and cleaning up the pmac routines. # # It includes the fix to skip devices that aren't present in the OF tree # that is necessary for newer G5 desktop models. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pci-bridge.h # 2004/10/25 17:38:39-07:00 benh@kernel.crashing.org +17 -0 # ppc64: Improve PCI config accessors # # arch/ppc64/kernel/pmac_pci.c # 2004/10/25 17:38:39-07:00 benh@kernel.crashing.org +53 -65 # ppc64: Improve PCI config accessors # # arch/ppc64/kernel/pmac.h # 2004/10/25 17:38:39-07:00 benh@kernel.crashing.org +0 -1 # ppc64: Improve PCI config accessors # # ChangeSet # 2004/10/25 18:40:55-07:00 benh@kernel.crashing.org # [PATCH] ppc64: annotate remaining IO accessors # # This patch adds proper __iomem annotations to the remaning IO macros on # ppc64, and removes now useless casts from eeh.h. This fixes the sparse # warnings in mpic.c among others. # # I need to do an equivalent things for ppc32 (though I think viro did # some of it already) and fix users. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pci-bridge.h # 2004/10/25 16:04:25-07:00 benh@kernel.crashing.org +3 -3 # ppc64: annotate remaining IO accessors # # include/asm-ppc64/io.h # 2004/10/25 16:12:57-07:00 benh@kernel.crashing.org +14 -14 # ppc64: annotate remaining IO accessors # # include/asm-ppc64/eeh.h # 2004/10/25 16:17:38-07:00 benh@kernel.crashing.org +85 -72 # ppc64: annotate remaining IO accessors # # ChangeSet # 2004/10/25 18:28:03-07:00 akpm@osdl.org # [PATCH] ide_pio_sector() kmap fix # # kunmap_atomic() takes a kernel-virtual address, not a pageframe address. # For the hundredth time. # # We really should get typechecking happening there.. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/ide/ide-taskfile.c # 2004/10/25 08:54:48-07:00 akpm@osdl.org +1 -1 # ide_pio_sector() kmap fix # # ChangeSet # 2004/10/25 18:25:55-07:00 bfg-kernel@blenning.no # [PATCH] firmware spelling errors # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/scsi/megaraid.c # 2004/10/25 13:06:50-07:00 bfg-kernel@blenning.no +1 -1 # firmware spelling errors # # drivers/net/wan/cosa.c # 2004/10/25 13:06:50-07:00 bfg-kernel@blenning.no +1 -1 # firmware spelling errors # # drivers/base/Kconfig # 2004/10/25 13:06:50-07:00 bfg-kernel@blenning.no +1 -1 # firmware spelling errors # # drivers/atm/fore200e.h # 2004/10/25 13:06:50-07:00 bfg-kernel@blenning.no +1 -1 # firmware spelling errors # # ChangeSet # 2004/10/25 18:25:43-07:00 petero2@telia.com # [PATCH] Fix incorrect kunmap_atomic in pktcdvd # # The pktcdvd driver uses kunmap_atomic() incorrectly. The function is # supposed to take an address as the first parameter, but the pktcdvd driver # passed a page pointer. Thanks to Douglas Gilbert and Jens Axboe for # discovering this. # # Signed-off-by: Peter Osterlund # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/pktcdvd.c # 2004/10/25 13:06:50-07:00 petero2@telia.com +2 -2 # Fix incorrect kunmap_atomic in pktcdvd # # ChangeSet # 2004/10/25 18:25:31-07:00 jack@suse.cz # [PATCH] Quota warnings somewhat broken # # Fix end of lines in quota messages. # # Signed-off-by: Jan Kara # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/dquot.c # 2004/10/25 13:06:50-07:00 jack@suse.cz +6 -6 # Quota warnings somewhat broken # # ChangeSet # 2004/10/25 18:25:18-07:00 edwardsg@sgi.com # [PATCH] increase max LOG_BUF_SHIFT value # # We've run into problems at 512p with the kernel log buffer wrapping and # overwriting some of the early boot output. This is with a # CONFIG_LOG_BUF_SHIFT value of 20 (1MB). The patch below just bumps the max # possible setting to 21 (2MB). # # Signed-off-by: Greg Edwards # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/Kconfig # 2004/10/25 13:06:50-07:00 edwardsg@sgi.com +1 -1 # increase max LOG_BUF_SHIFT value # # ChangeSet # 2004/10/25 18:25:06-07:00 colin@colino.net # [PATCH] clean up therm_adt746x # # This patch cleans therm_adt746x a bit: lines at maximum 80 chars width, # dispatches the big function in three little ones. # # Functionality not changed. # # Signed-off-by: Colin Leroy # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/macintosh/therm_adt746x.c # 2004/10/25 13:06:50-07:00 colin@colino.net +143 -103 # clean up therm_adt746x # # ChangeSet # 2004/10/25 18:24:54-07:00 bjorn.helgaas@hp.com # [PATCH] PCDP: call acpi_register_gsi() with arguments in correct order # # PCDP: call acpi_register_gsi() with arguments in correct order # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/firmware/pcdp.c # 2004/10/25 13:06:50-07:00 bjorn.helgaas@hp.com +2 -2 # PCDP: call acpi_register_gsi() with arguments in correct order # # ChangeSet # 2004/10/25 18:24:41-07:00 bunk@stusta.de # [PATCH] ISDN hisax_fcpcipnp.c: kill unused variable # # drivers/isdn/hisax/hisax_fcpcipnp.c: In function `hisax_fcpcipnp_init': # drivers/isdn/hisax/hisax_fcpcipnp.c:999: warning: unused variable `pci_nr_found' # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/hisax/hisax_fcpcipnp.c # 2004/10/25 13:06:49-07:00 bunk@stusta.de +1 -1 # ISDN hisax_fcpcipnp.c: kill unused variable # # ChangeSet # 2004/10/25 18:24:29-07:00 bunk@stusta.de # [PATCH] CREDITS update # # Adrian sent me a check for $100. # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # CREDITS # 2004/10/25 13:06:49-07:00 bunk@stusta.de +8 -0 # CREDITS update # # ChangeSet # 2004/10/25 18:24:17-07:00 margitsw@t-online.de # [PATCH] Add prism54 to MAINTAINERS # # Add prism54 to MAINTAINERS # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/10/25 13:06:49-07:00 margitsw@t-online.de +7 -0 # Add prism54 to MAINTAINERS # # ChangeSet # 2004/10/25 18:24:02-07:00 yanmin.zhang@intel.com # [PATCH] hugetlb_get_unmapped_area fix # # hugetlb_get_unmapped_area() fails to find an unmapped area while unmapped # area is huge. That's because hugetlb_get_unmapped_area just searches # forward from mm->free_area_cache. If reaching TASK_SIZE, it does not go # back to TASK_UNMAPPED_BASE, just returns -ENOMEM. # # 1) Add a specific hugetlb_get_unmapped_area on i386. # 2) Generic hugetlb_get_unmapped_area is also fixed. # # Signed-off-by: Zhang Yanmin # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/page.h # 2004/10/25 13:06:49-07:00 yanmin.zhang@intel.com +1 -0 # hugetlb_get_unmapped_area fix # # fs/hugetlbfs/inode.c # 2004/10/25 13:06:49-07:00 yanmin.zhang@intel.com +16 -2 # hugetlb_get_unmapped_area fix # # arch/i386/mm/hugetlbpage.c # 2004/10/25 13:06:49-07:00 yanmin.zhang@intel.com +140 -0 # hugetlb_get_unmapped_area fix # # ChangeSet # 2004/10/25 18:23:50-07:00 jbarnes@engr.sgi.com # [PATCH] I/O space write barrier # # On some platforms (e.g. SGI Challenge, Origin, and Altix machines), writes # to I/O space aren't ordered coming from different CPUs. For the most part, # this isn't a problem since drivers generally spinlock around code that does # writeX calls, but if the last operation a driver does before it releases a # lock is a write and some other CPU takes the lock and immediately does a # write, it's possible the second CPU's write could arrive before the # first's. # # This patch adds a mmiowb() call to deal with this sort of situation, and # adds some documentation describing I/O ordering issues to # deviceiobook.tmpl. The idea is to mirror the regular, cacheable memory # barrier operation, wmb. Example of the problem this new macro solves: # # CPU A: spin_lock_irqsave(&dev_lock, flags) # CPU A: ... # CPU A: writel(newval, ring_ptr); # CPU A: spin_unlock_irqrestore(&dev_lock, flags) # ... # CPU B: spin_lock_irqsave(&dev_lock, flags) # CPU B: writel(newval2, ring_ptr); # CPU B: ... # CPU B: spin_unlock_irqrestore(&dev_lock, flags) # # In this case, newval2 could be written to ring_ptr before newval. Fixing # it is easy though: # # CPU A: spin_lock_irqsave(&dev_lock, flags) # CPU A: ... # CPU A: writel(newval, ring_ptr); # CPU A: mmiowb(); /* ensure no other writes beat us to the device */ # CPU A: spin_unlock_irqrestore(&dev_lock, flags) # ... # CPU B: spin_lock_irqsave(&dev_lock, flags) # CPU B: writel(newval2, ring_ptr); # CPU B: ... # CPU B: mmiowb(); # CPU B: spin_unlock_irqrestore(&dev_lock, flags) # # Note that this doesn't address a related case where the driver may want to # actually make a given write get to the device before proceeding. This # should be dealt with by immediately reading a register from the card that # has no side effects. According to the PCI spec, that will guarantee that # all writes have arrived before being sent to the target bus. If no such # register is available (in the case of card resets perhaps), reading from # config space is sufficient (though it may return all ones if the card isn't # responding to read cycles). I've tried to describe how mmiowb() differs # from PCI posted write flushing in the patch to deviceiobook.tmpl. # # Signed-off-by: Jesse Barnes # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-v850/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-sparc64/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-sparc/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-sh64/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +5 -0 # I/O space write barrier # # include/asm-sh/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-s390/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-ppc64/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-ppc/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-parisc/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-mips/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +4 -0 # I/O space write barrier # # include/asm-m68knommu/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-m68k/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +1 -0 # I/O space write barrier # # include/asm-m32r/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +5 -0 # I/O space write barrier # # include/asm-ia64/sn/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +4 -4 # I/O space write barrier # # include/asm-ia64/machvec_sn2.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-ia64/machvec_init.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +1 -0 # I/O space write barrier # # include/asm-ia64/machvec.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +7 -0 # I/O space write barrier # # include/asm-ia64/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +16 -0 # I/O space write barrier # # include/asm-i386/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-h8300/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-cris/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-arm26/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-arm/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-alpha/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # arch/ia64/sn/kernel/iomv.c # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +5 -8 # I/O space write barrier # # Documentation/DocBook/deviceiobook.tmpl # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +67 -4 # I/O space write barrier # # ChangeSet # 2004/10/25 18:23:36-07:00 paulkf@microgate.com # [PATCH] serial send_break duration fix # # Fix tty_io.c send_break() to assert break for proper duration. If driver # break_ctl() changes task state, then break may end prematurely. USB serial # driver break_ctl() sends a URB, changing task state to TASK_RUNNING. # # Signed-off-by: Paul Fulghum # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/tty_io.c # 2004/10/25 13:06:49-07:00 paulkf@microgate.com +3 -3 # serial send_break duration fix # # ChangeSet # 2004/10/25 18:23:23-07:00 jim.houston@ccur.com # [PATCH] idr_remove safety checking # # idr_remove() should fail gracefully and warn if the id being removed is not # valid. # # The attached patch should do the job without additional overhead. # # With the existing code, removing an id which was not allocated could remove # a valid id which shares the same lowest layer of the radix tree. # # I ran a kernel with this patch but have not done any tests to force # a failure. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # lib/idr.c # 2004/10/25 13:06:49-07:00 jim.houston@ccur.com +12 -3 # idr_remove safety checking # # ChangeSet # 2004/10/25 18:23:11-07:00 hch@lst.de # [PATCH] use generic_file_open in udf # # Let's try to reduce the number of hand-crafted LFS checks # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/udf/file.c # 2004/10/25 13:06:49-07:00 hch@lst.de +1 -21 # use generic_file_open in udf # # ChangeSet # 2004/10/25 18:22:59-07:00 nickpiggin@yahoo.com.au # [PATCH] vm: unreclaimable pages debugginf # # Add zone->all_unreclaiable to the sysrq-M and omm-killing diagnostic output. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/page_alloc.c # 2004/10/25 13:06:48-07:00 nickpiggin@yahoo.com.au +5 -1 # vm: unreclaimable pages debugginf # # ChangeSet # 2004/10/25 18:22:46-07:00 clameter@sgi.com # [PATCH] Posix layer <-> clock driver API fix # # This is needed for an mmtimer driver update that we are currently working # on. The mmtimer driver provides CLOCK_SGI_CYCLE via clock_gettime and # clock_settime. # # With this api fix one will be able to use timer_create, timer_settime and # friends from userspace to schedule and receive signals via timer interrupts # of mmtimer. # # Changelog # * Clean up timer api for drivers that use register_posix_clock. Drivers # will then be able to use posix timers to schedule interrupts. # * Change API for posix_clocks[].timer_create to only pass one pointer # to a k_itimer structure that is now allocated and managed by the # posix layer in the same way as for the other posix timer # functions. # * Isolate a posix_timer_event(timr) function in posix-timers.c that may # be called by the interrupt routine of a timer to signal that the # scheduled event has taken place. # # Signed-off-by: Christoph Lameter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/posix-timers.c # 2004/10/25 13:06:48-07:00 clameter@sgi.com +34 -55 # Posix layer <-> clock driver API fix # # include/linux/posix-timers.h # 2004/10/25 13:06:48-07:00 clameter@sgi.com +5 -6 # Posix layer <-> clock driver API fix # # ChangeSet # 2004/10/25 18:22:34-07:00 zippel@linux-m68k.org # [PATCH] hfs: export type/creator via xattr # # This exports the hfs type/creator info via xattr. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfs/attr.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +121 -0 # hfs: export type/creator via xattr # # fs/hfsplus/ioctl.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +106 -0 # hfs: export type/creator via xattr # # fs/hfsplus/inode.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +3 -0 # hfs: export type/creator via xattr # # fs/hfsplus/hfsplus_fs.h # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +5 -0 # hfs: export type/creator via xattr # # fs/hfs/inode.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +3 -0 # hfs: export type/creator via xattr # # fs/hfs/hfs_fs.h # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +7 -0 # hfs: export type/creator via xattr # # fs/hfs/attr.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/fs/hfs/attr.c # # fs/hfs/Makefile # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +1 -1 # hfs: export type/creator via xattr # # ChangeSet # 2004/10/25 18:22:21-07:00 zippel@linux-m68k.org # [PATCH] hfs: write back resource info directly # # Write back the information for a dirty resource inode directly and not via the # main inode, as at the time the latter is written the former might already be # gone. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfsplus/inode.c # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +14 -10 # hfs: write back resource info directly # # fs/hfs/inode.c # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +14 -11 # hfs: write back resource info directly # # ChangeSet # 2004/10/25 18:22:09-07:00 zippel@linux-m68k.org # [PATCH] hfs: read correct dir time # # Fix a small typo and read the correct time for a dir. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfs/inode.c # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +1 -1 # hfs: read correct dir time # # ChangeSet # 2004/10/25 18:21:55-07:00 zippel@linux-m68k.org # [PATCH] hfs: manage correct block count # # Manage the fs block count with a separate variable and keep a correct i_blocks # for e.g. correct du output. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfsplus/inode.c # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +6 -3 # hfs: manage correct block count # # fs/hfsplus/hfsplus_fs.h # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +1 -0 # hfs: manage correct block count # # fs/hfsplus/extents.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +6 -4 # hfs: manage correct block count # # fs/hfsplus/btree.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +5 -3 # hfs: manage correct block count # # fs/hfs/inode.c # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +6 -3 # hfs: manage correct block count # # fs/hfs/hfs_fs.h # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +1 -0 # hfs: manage correct block count # # fs/hfs/extent.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +6 -4 # hfs: manage correct block count # # fs/hfs/btree.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +5 -3 # hfs: manage correct block count # # ChangeSet # 2004/10/25 18:21:43-07:00 zippel@linux-m68k.org # [PATCH] hfs: relax dirty check # # hfs has two dirty bits, but currently OS X uses only one of them, so match its # behaviour, so that a uncleanly unmounted disk can be mounted r/w again, after # it has been checked. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfsplus/super.c # 2004/10/25 13:06:47-07:00 zippel@linux-m68k.org +2 -4 # hfs: relax dirty check # # fs/hfs/super.c # 2004/10/25 13:06:47-07:00 zippel@linux-m68k.org +1 -2 # hfs: relax dirty check # # fs/hfs/mdb.c # 2004/10/25 13:06:47-07:00 zippel@linux-m68k.org +4 -4 # hfs: relax dirty check # # ChangeSet # 2004/10/25 18:21:31-07:00 zippel@linux-m68k.org # [PATCH] hfs: update key after rename # # After a file has been renamed, the cached search key must be updated. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfs/dir.c # 2004/10/25 13:06:47-07:00 zippel@linux-m68k.org +3 -0 # hfs: update key after rename # # ChangeSet # 2004/10/25 18:21:18-07:00 jbarnes@engr.sgi.com # [PATCH] mmtimer sparse fixes # # Small patch to add __iomem annotations to mmtimer.c. # # Signed-off-by: Jesse Barnes # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/mmtimer.c # 2004/10/25 13:06:47-07:00 jbarnes@engr.sgi.com +5 -5 # mmtimer sparse fixes # # ChangeSet # 2004/10/25 18:21:06-07:00 suresh.b.siddha@intel.com # [PATCH] intel irqbalance quirk cleanup # # - Remove the call to quirk_intel_irqbalance() from quirk_pciehp_msi(). # # - Move the x86(/x86_64)-specific quirk_intel_irqbalance() into x86 quirks.c # due to its dependency on # # - Mark it __init rather than __devinit, since it calls __init functions. # # Signed-off-by: Suresh Siddha # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/quirks.c # 2004/10/25 13:06:47-07:00 suresh.b.siddha@intel.com +49 -0 # intel irqbalance quirk cleanup # # drivers/pci/quirks.c # 2004/10/25 13:06:47-07:00 suresh.b.siddha@intel.com +0 -47 # intel irqbalance quirk cleanup # # arch/x86_64/kernel/Makefile # 2004/10/25 13:06:47-07:00 suresh.b.siddha@intel.com +2 -1 # intel irqbalance quirk cleanup # # arch/i386/kernel/quirks.c # 2004/10/25 13:06:47-07:00 suresh.b.siddha@intel.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/i386/kernel/quirks.c # # arch/i386/kernel/Makefile # 2004/10/25 13:06:47-07:00 suresh.b.siddha@intel.com +1 -1 # intel irqbalance quirk cleanup # # ChangeSet # 2004/10/25 18:20:53-07:00 sds@epoch.ncsc.mil # [PATCH] Add DAC check for setxattr(security.selinux) # # This patch against 2.6.9 adds a DAC ownership check to the existing MAC # permission checks when setting the security.selinux attribute via setxattr. # In the past, the MAC permission checks were viewed as sufficient for # controlling relabeling operations, but experience in the Fedora SELinux # integration has shown that a DAC check is also appropriate here, # particularly under targeted policy. # # Signed-off-by: Stephen Smalley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/hooks.c # 2004/10/25 13:06:47-07:00 sds@epoch.ncsc.mil +3 -0 # Add DAC check for setxattr(security.selinux) # # ChangeSet # 2004/10/25 21:20:44-04:00 akpm@osdl.org # [PATCH] e1000 module_param build fix # # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # ChangeSet # 2004/10/25 18:20:41-07:00 rddunlap@osdl.org # [PATCH] __init dependencies: ignore __param # # Ignore __param section references; they aren't discarded. # # Error: ./drivers/mtd/devices/phram.o __param refers to 0000000000000010 R_X86_64_64 .init.text+0x0000000000000013 # Error: ./drivers/scsi/dc395x.o __param refers to 0000000000000020 R_X86_64_64 .init.data+0x0000000000000064 # Error: ./drivers/usb/gadget/ether.o __param refers to 0000000000000048 R_X86_64_64 .init.data+0x0000000000000020 # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/e1000/e1000_param.c # 2004/10/24 05:47:51-04:00 akpm@osdl.org +1 -1 # e1000-module_param-fix # # scripts/reference_init.pl # 2004/10/25 13:06:47-07:00 rddunlap@osdl.org +1 -0 # __init dependencies: ignore __param # # ChangeSet # 2004/10/25 18:20:28-07:00 axboe@suse.de # [PATCH] fix bad segment coalescing in blk_recalc_rq_segments() # # blk_recalc_rq_segments forgots to take ->max_segment_size into account and # gladly merges segments bigger than we can support, thus underestimating the # number of segments needed to fill it. # # Signed-off-by: Jens Axboe # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/ll_rw_blk.c # 2004/10/25 13:06:47-07:00 axboe@suse.de +19 -5 # fix bad segment coalescing in blk_recalc_rq_segments() # # ChangeSet # 2004/10/25 18:20:16-07:00 rusty@rustcorp.com.au # [PATCH] Eliminate init_module and cleanup_module from Documentation # # In 2.2, you used to just be able to call functions "init_module" and # "cleanup_module" and they'd be magically called. # # These days you should use module_init(myinit)/module_exit(myexit) and avoid # #ifdef MODULE. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/sound/oss/README.modules # 2004/10/25 13:06:47-07:00 rusty@rustcorp.com.au +3 -2 # Eliminate init_module and cleanup_module from Documentation # # Documentation/s390/s390dbf.txt # 2004/10/25 13:06:47-07:00 rusty@rustcorp.com.au +12 -6 # Eliminate init_module and cleanup_module from Documentation # # Documentation/i2c/writing-clients # 2004/10/25 13:06:47-07:00 rusty@rustcorp.com.au +7 -21 # Eliminate init_module and cleanup_module from Documentation # # Documentation/DocBook/videobook.tmpl # 2004/10/25 13:06:47-07:00 rusty@rustcorp.com.au +8 -6 # Eliminate init_module and cleanup_module from Documentation # # Documentation/DocBook/mousedrivers.tmpl # 2004/10/25 13:06:47-07:00 rusty@rustcorp.com.au +8 -13 # Eliminate init_module and cleanup_module from Documentation # # ChangeSet # 2004/10/25 18:20:03-07:00 rusty@rustcorp.com.au # [PATCH] boot parameters: quoting of environment variables revisited # # As noticed by Joey Hess (and thanks for Christoph for forwarding it). Also # requirements from Werner Almesberger. # # If someone passes 'foo="some value"' the param engine removes the quotes # and hands 'foo' and 'some value'. The __setup() parameters expect a single # string, and so we try to regenerate it from the two parts. Finally, we try # to place it as an environment variable. # # Werner wants quotes stripped out of the environment variable. It makes # sense to do that for __setup, too (so it sees 'foo=some value'), since # __setup functions don't usually handle quotes. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/main.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +9 -2 # boot parameters: quoting of environment variables revisited # # ChangeSet # 2004/10/25 18:19:51-07:00 rusty@rustcorp.com.au # [PATCH] Builtin Module Parameters in sysfs too # # Currently, only module parameters in loaded modules are exported in # /sys/modules/, while those of "modules" built into the kernel can be set by # the kernel command line, but not read or set via sysfs. # # - move module parameters from /sys/modules/$(module_name)/$(parameter_name) to # /sys/modules/$(module_name)/parameters/$(parameter_name) # # - remove dummy kernel_param for exporting refcnt, add "struct module *"-based # attribute instead # # - also export module paramters for "modules" which are built into the kernel, # so parameters are always accessible at # /sys/modules/$(KBUILD_MODNAME)/$(parameter_name) # # Signed-off-by: Rusty Russell (modified) # Signed-off-by: Dominik Brodowski # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/params.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +391 -0 # Builtin Module Parameters in sysfs too # # kernel/module.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +29 -105 # Builtin Module Parameters in sysfs too # # include/linux/moduleparam.h # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +11 -0 # Builtin Module Parameters in sysfs too # # include/linux/module.h # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +18 -20 # Builtin Module Parameters in sysfs too # # ChangeSet # 2004/10/25 18:19:39-07:00 rusty@rustcorp.com.au # [PATCH] Fix for MODULE_PARM obsolete # # There is no __attribute_unused__: use __attribute__((__unused__)). # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/module.h # 2004/10/25 13:18:33-07:00 rusty@rustcorp.com.au +2 -2 # Fix for MODULE_PARM obsolete # # ChangeSet # 2004/10/25 18:19:27-07:00 rusty@rustcorp.com.au # [PATCH] Remove MODULE_PARM from arch/i386 # # This patch removes MODULE_PARM for everything under arch/i386. Currently # only APM. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/apm.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +9 -9 # Remove MODULE_PARM from arch/i386 # # ChangeSet # 2004/10/25 18:19:14-07:00 rusty@rustcorp.com.au # [PATCH] Remove MODULE_PARM from i386 defconfig. # # This cleans up defconfig for i386. Not much work. This patch removes # MODULE_PARM for everything made by "defconfig" on x86. There are only a # few left. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/s2io.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +8 -8 # Remove MODULE_PARM from i386 defconfig. # # drivers/net/8139too.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +4 -4 # Remove MODULE_PARM from i386 defconfig. # # drivers/ide/ide-cd.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +1 -1 # Remove MODULE_PARM from i386 defconfig. # # drivers/char/lp.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +2 -2 # Remove MODULE_PARM from i386 defconfig. # # drivers/cdrom/cdrom.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +6 -6 # Remove MODULE_PARM from i386 defconfig. # # drivers/acpi/thermal.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +1 -1 # Remove MODULE_PARM from i386 defconfig. # # ChangeSet # 2004/10/25 18:19:02-07:00 rusty@rustcorp.com.au # [PATCH] MODULE_PARM must die: make it warn first. # # This patch adds a warning whenever MODULE_PARM is used. Successive # patches change them over to module_param. Help appreciated! # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/module.h # 2004/10/25 13:18:33-07:00 rusty@rustcorp.com.au +4 -2 # MODULE_PARM must die: make it warn first. # # ChangeSet # 2004/10/25 18:18:49-07:00 roland@redhat.com # [PATCH] session leader tty disassociation fix # # The session leader should disassociate from its controlling terminal and # send SIGHUP signals only when the whole session leader process dies. # Currently, this gets done when any thread in that process dies, which is # wrong. This patch fixes it. # # Signed-off-by: Roland McGrath # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/exit.c # 2004/10/25 13:06:46-07:00 roland@redhat.com +4 -2 # session leader tty disassociation fix # # ChangeSet # 2004/10/25 18:18:37-07:00 roland@redhat.com # [PATCH] acct: report single record for multithreaded process # # This patch changes process accounting to write just one record for a # process with many NPTL threads, rather than one record for each thread. No # record is written until the last thread exits. The process's record shows # the cumulative time of all the threads that ever lived in that process # (thread group). This seems like the clearly right thing and I assume it is # what anyone using process accounting really would like to see. # # There is a race condition between multiple threads exiting at the same time # to decide which one should write the accounting record. I couldn't think # of anything clever using existing bookkeeping that would get this right, so # I added another counter for this. (There may be some potential to clean up # existing places that figure out how many non-zombie threads are in the # group, now that this count is available.) # # Signed-off-by: Roland McGrath # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/fork.c # 2004/10/25 13:06:45-07:00 roland@redhat.com +2 -0 # acct: report single record for multithreaded process # # kernel/exit.c # 2004/10/25 13:18:33-07:00 roland@redhat.com +2 -1 # acct: report single record for multithreaded process # # kernel/acct.c # 2004/10/25 13:06:45-07:00 roland@redhat.com +12 -6 # acct: report single record for multithreaded process # # include/linux/sched.h # 2004/10/25 13:06:45-07:00 roland@redhat.com +1 -0 # acct: report single record for multithreaded process # # ChangeSet # 2004/10/25 18:18:25-07:00 jim.hague@acm.org # [PATCH] pm2fb: Colour palette fixes # # - Hardware CLUT only needs setting on pseudocolor. # - Pseudo palette values need to be 32bit wide for cfb_*(). # # Signed-off-by: Jim Hague # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/pm2fb.c # 2004/10/25 13:06:45-07:00 jim.hague@acm.org +3 -6 # pm2fb: Colour palette fixes # # ChangeSet # 2004/10/25 18:18:13-07:00 jim.hague@acm.org # [PATCH] pm2fb: Blanking fixes # # - Current blanking code forces +ve (h|v)sync. Correct, match 2.4 # behaviour, and introduce VESA constants for clarity. # # Signed-off-by: Jim Hague # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/pm2fb.c # 2004/10/25 13:18:34-07:00 jim.hague@acm.org +14 -12 # pm2fb: Blanking fixes # # ChangeSet # 2004/10/25 18:18:00-07:00 adaplas@hotpop.com # [PATCH] fbdev: S3 Savage Framebuffer Driver # # S3 Savage Frambuffer Driver for the following chipsets: # # Savage 3D # Savage MX # Savage 4 # Savage 2000 # ProSavage # SuperSavage # # This is based from the driver written by: # Denis Oliver Kropp # Sven Neumann # # Initial Porting to 2.6 done by: # Mika Pruikkonen # # Added the following: # - Console acceleration support (imageblit, fillrect, copyarea) - # Configurable # - DDC2/I2C support for (ProSavage DDR-K, Savage 4 and Prosavage PM only - # Configurable # - 8, 16, 32 bits per pixel # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/savage/savagefb_accel.c # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +135 -0 # fbdev: S3 Savage Framebuffer Driver # # drivers/video/savage/savagefb.h # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +354 -0 # fbdev: S3 Savage Framebuffer Driver # # drivers/video/savage/savagefb.c # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +2281 -0 # fbdev: S3 Savage Framebuffer Driver # # drivers/video/savage/savagefb-i2c.c # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +257 -0 # fbdev: S3 Savage Framebuffer Driver # # drivers/video/savage/Makefile # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +8 -0 # fbdev: S3 Savage Framebuffer Driver # # include/linux/fb.h # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +15 -0 # fbdev: S3 Savage Framebuffer Driver # # drivers/video/savage/savagefb_accel.c # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/savage/savagefb_accel.c # # drivers/video/savage/savagefb.h # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/savage/savagefb.h # # drivers/video/savage/savagefb.c # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/savage/savagefb.c # # drivers/video/savage/savagefb-i2c.c # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/savage/savagefb-i2c.c # # drivers/video/savage/Makefile # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/savage/Makefile # # drivers/video/Makefile # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +2 -1 # fbdev: S3 Savage Framebuffer Driver # # drivers/video/Kconfig # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +36 -0 # fbdev: S3 Savage Framebuffer Driver # # ChangeSet # 2004/10/25 18:17:47-07:00 adaplas@hotpop.com # [PATCH] fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G integrated # graphics chips. # Port from kernel 2.4 + some modifications and cleanup : # - Fix HW accel on 845G # - Use of agpgart for fb memory reservation # - Add mtrr support # # Signed-off-by: Sylvain Meyer # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/intelfb/intelfbhw.h # 2004/10/25 12:56:30-07:00 adaplas@hotpop.com +565 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/intelfbhw.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +1749 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/intelfbdrv.h # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +77 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/intelfbdrv.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +1625 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/intelfb.h # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +294 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/builtinmodes.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +222 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/Makefile # 2004/10/25 12:56:30-07:00 adaplas@hotpop.com +8 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # include/linux/fb.h # 2004/10/25 13:18:34-07:00 adaplas@hotpop.com +1 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/intelfbhw.h # 2004/10/25 12:56:30-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/intelfbhw.h # # drivers/video/intelfb/intelfbhw.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/intelfbhw.c # # drivers/video/intelfb/intelfbdrv.h # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/intelfbdrv.h # # drivers/video/intelfb/intelfbdrv.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/intelfbdrv.c # # drivers/video/intelfb/intelfb.h # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/intelfb.h # # drivers/video/intelfb/builtinmodes.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/builtinmodes.c # # drivers/video/intelfb/Makefile # 2004/10/25 12:56:30-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/Makefile # # drivers/video/Makefile # 2004/10/25 13:18:34-07:00 adaplas@hotpop.com +3 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/Kconfig # 2004/10/25 13:18:34-07:00 adaplas@hotpop.com +21 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/Makefile # 2004/10/25 12:56:30-07:00 adaplas@hotpop.com +2 -1 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # ChangeSet # 2004/10/25 18:17:34-07:00 adaplas@hotpop.com # [PATCH] fbdev: Cleanup rivafb cursor implementation # # remove/modify all references to info->cursor # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/riva/rivafb.h # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +1 -0 # fbdev: Cleanup rivafb cursor implementation # # drivers/video/riva/fbdev.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +26 -29 # fbdev: Cleanup rivafb cursor implementation # # ChangeSet # 2004/10/25 18:17:22-07:00 adaplas@hotpop.com # [PATCH] fbdev: Clean up i810fb cursor implementation # # remove/modify all references to info->cursor # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/i810/i810_main.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +14 -26 # fbdev: Clean up i810fb cursor implementation # # ChangeSet # 2004/10/25 18:17:10-07:00 adaplas@hotpop.com # [PATCH] fbdev: Clean up softcursor implementation # # - use struct fb_pixmap pixmap instead of struct fb_pixmap sprite. The # softcursor uses fb_imageblit which also uses pixmap. # # - remove/change all references to info->cursor # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/softcursor.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +23 -49 # fbdev: Clean up softcursor implementation # # ChangeSet # 2004/10/25 18:16:57-07:00 adaplas@hotpop.com # [PATCH] fbdev: Clean up of fbcon/fbdev cursor interface # # The current cursor interface is confusing. Some fields are taken from the # cursor structure in struct fb_info (enable, mask, rop fields) and the rest are # taken from the passed cursor structure. These lead to a lot of confusion, # making it hard for developers to write their own implementation. # # Also, the cursor code has several 'short-circuits', occassionally leading to # undefined cursor behavior. # # These are the changes brought about by the patch: # # - Removed struct fb_cursor and related fields from struct fb_info, and # instead, placed them in a struct not visible to fbdev. # # - The struct fb_cursor passed to fb_cursor() will _always_ contain valid # data with various bitflags indicating which fields have changed # # - The struct fb_pixmap sprite in struct fb_info is used only by drivers with # hardware cursor implementation. Initializing and allocating memory for this # structure is not needed. Remove initialization and memory allocation. # # - The FBIO_CURSOR ioctl is broken (because fb_cursor() is broken). For now, # remove fb_cursor code and make the FBIO_CURSOR ioctl always return -ENODEV. # # - The flag FB_CUR_SETCUR is changed to FB_CUR_SETIMAGE, indicating that the # cursor sprite has changed. The image change is now checked by fbcon so # drivers will not unnecessarily load the sprite image everytime. This causes # hardware cursors to flicker, especially in rivafb. # # - Remove fb_load_cursor_image(). This is unused, and should not be # implemented generically. # # - Documented the usage of the cursor interface in skeletonfb.c # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/fb.h # 2004/10/25 13:18:34-07:00 adaplas@hotpop.com +1 -6 # fbdev: Clean up of fbcon/fbdev cursor interface # # drivers/video/skeletonfb.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +33 -11 # fbdev: Clean up of fbcon/fbdev cursor interface # # drivers/video/fbmem.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +1 -129 # fbdev: Clean up of fbcon/fbdev cursor interface # # drivers/video/console/fbcon.h # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +4 -0 # fbdev: Clean up of fbcon/fbdev cursor interface # # drivers/video/console/fbcon.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +14 -6 # fbdev: Clean up of fbcon/fbdev cursor interface # # drivers/video/console/bitblit.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +101 -85 # fbdev: Clean up of fbcon/fbdev cursor interface # # ChangeSet # 2004/10/25 18:16:44-07:00 adaplas@hotpop.com # [PATCH] fbdev: Various mach64 changes # # Alexander Kern # [PATCH] port Daniel Mantione 2.4 driver to 2.6 # [PATCH] add more pci_id number # [PATCH] add accelerated imgblit # [PATCH] revert SDRAM_MAGIC_PLL to old behaviour # [PATCH] do a "from BIOS" initialisation only by __i386__ # # Arnaud FONTAINE # [PATCH atyfb] correction for 3D Rage Mobility L # # Geert Uytterhoeven # [PATCH atyfb] Atari Atyfb fixes # [PATCH atyfb] Atyfb on Mach64 GX or Atari # [PATCH 468] m68k sparse floating point # # James Simmons # [PATCH add] port to framebuffer_alloc api # # Nicolas Souchu # [PATCH] I do not found a copy, but it was incorporated too # # Ville Syrjälä # [PATCH] fix pan with doublescan # [PATCH] another double scan fix # [PATCH] disable linear aperture register access # [PATCH] Memory type correction # [PATCH] atyfb (2.6): Fix mmio_start # [PATCH] atyfb (2.6): Fix mem_refresh_rate for Mobility # [PATCH] atyfb (2.6): Add RGB565 support # [PATCH] atyfb: Blank LCD by turning off backlight voltage # [PATCH] atyfb: Rage LT LCD register access # [PATCH] atyfb: vblank irq support # [PATCH] atyfb: MTRR support # # # Antonino Daplas # remove/modify all references to info->cursor # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/video/mach64.h # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +285 -66 # fbdev: Various mach64 changes # # drivers/video/aty/xlinit.c # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +34 -34 # fbdev: Various mach64 changes # # drivers/video/aty/mach64_gx.c # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +10 -10 # fbdev: Various mach64 changes # # drivers/video/aty/mach64_cursor.c # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +139 -158 # fbdev: Various mach64 changes # # drivers/video/aty/mach64_ct.c # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +535 -198 # fbdev: Various mach64 changes # # drivers/video/aty/mach64_accel.c # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +192 -20 # fbdev: Various mach64 changes # # drivers/video/aty/atyfb_base.c # 2004/10/25 12:59:19-07:00 adaplas@hotpop.com +2320 -1265 # fbdev: Various mach64 changes # # drivers/video/aty/atyfb.h # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +143 -62 # fbdev: Various mach64 changes # # drivers/video/aty/ati_ids.h # 2004/10/25 12:50:24-07:00 adaplas@hotpop.com +1 -0 # fbdev: Various mach64 changes # # drivers/video/Kconfig # 2004/10/25 13:18:34-07:00 adaplas@hotpop.com +13 -6 # fbdev: Various mach64 changes # # ChangeSet # 2004/10/25 18:16:32-07:00 adaplas@hotpop.com # [PATCH] fbdev: Remove inter_module_get/put from i810fb # # The function inter_module_get/put is to be deprecated. Remove. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/i810/i810_main.c # 2004/10/25 13:18:35-07:00 adaplas@hotpop.com +24 -33 # fbdev: Remove inter_module_get/put from i810fb # # drivers/video/i810/i810.h # 2004/10/25 12:47:57-07:00 adaplas@hotpop.com +0 -1 # fbdev: Remove inter_module_get/put from i810fb # # ChangeSet # 2004/10/25 18:16:19-07:00 adaplas@hotpop.com # [PATCH] fbdev: Reduce pixmap memory allocation size # # - Reduce pixmap size allocated by fbmem, i810fb and rivafb from 16-64K to # 8K. This size is sufficient that a single putcs call can be accomodated by # a single imageblit # # - Replace NR_FB_DRIVERS with FB_MAX # # - Trivial code, Kconfig and Documentation cleanup # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/riva/fbdev.c # 2004/10/25 13:18:35-07:00 adaplas@hotpop.com +3 -3 # fbdev: Reduce pixmap memory allocation size # # drivers/video/i810/i810_main.c # 2004/10/25 13:18:36-07:00 adaplas@hotpop.com +3 -3 # fbdev: Reduce pixmap memory allocation size # # drivers/video/fbmem.c # 2004/10/25 13:18:35-07:00 adaplas@hotpop.com +4 -5 # fbdev: Reduce pixmap memory allocation size # # drivers/video/console/fbcon.c # 2004/10/25 13:18:35-07:00 adaplas@hotpop.com +6 -6 # fbdev: Reduce pixmap memory allocation size # # drivers/video/Kconfig # 2004/10/25 13:18:35-07:00 adaplas@hotpop.com +3 -3 # fbdev: Reduce pixmap memory allocation size # # ChangeSet # 2004/10/25 18:16:06-07:00 werner@almesberger.net # [PATCH] update CREDITS entry of Werner Almesberger # # This patch updates my entry. (Long overdue ...) # # Signed-off-by: Werner Almesberger # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # CREDITS # 2004/10/25 13:18:28-07:00 werner@almesberger.net +4 -6 # update CREDITS entry of Werner Almesberger # # ChangeSet # 2004/10/25 18:15:53-07:00 agk@redhat.com # [PATCH] device-mapper trivial: duplicate kfree in error path # # Remove duplicate kfree in dm_register_target error path. # # Signed-Off-By: Alasdair G Kergon # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm-target.c # 2004/10/25 12:47:57-07:00 agk@redhat.com +2 -3 # device-mapper trivial: duplicate kfree in error path # # ChangeSet # 2004/10/25 18:15:41-07:00 agk@redhat.com # [PATCH] device-mapper trivial: stray semi-colon # # Remove stray semicolon. # # Signed-Off-By: Alasdair G Kergon # From: Lars Marowsky-Bree # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm.c # 2004/10/25 12:47:57-07:00 agk@redhat.com +1 -1 # device-mapper trivial: stray semi-colon # # ChangeSet # 2004/10/25 18:15:29-07:00 agk@redhat.com # [PATCH] device-mapper: dm-crypt: new IV mode ESSIV # # This patch adds a new IV mode ''encrypted sector|salt IV'' described in # http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/472 # # To use ESSIV, set the ivmode (using the new syntax) to "essiv:". # "hash" should be a valid cryptoapi hash. # # This, for example, is a valid dm-target line: # # 0 200 crypt aes-cbc-essiv:sha256 00000000000000000000000000000000 0 /dev/loop/5 0 # # Signed-Off-By: Alasdair G Kergon # Signed-Off-By: Christophe Saout # Signed-Off-By: Fruhwirth Clemens # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm-crypt.c # 2004/10/25 12:47:56-07:00 agk@redhat.com +111 -3 # device-mapper: dm-crypt: new IV mode ESSIV # # ChangeSet # 2004/10/25 18:15:17-07:00 agk@redhat.com # [PATCH] device-mapper: dm-crypt generator extension # # Create crypt_iv_operations structure with generator method and move the # plain iv generator into this structure. Optionally accept an extended # syntax: -- # # This also makes it ready to support chaining modes other than CBC # mode, such as CMC (not implemented in cryptoapi yet), # The problems outlined by Adam J. Richter in # http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/454 # would be fixed by switching to CMC chaining mode. # # Example of a valid target line: # 0 200 crypt aes-cbc-plain 00000000000000000000000000000000 0 /dev/loop/5 0 # # Signed-Off-By: Alasdair G Kergon # Signed-Off-By: Christophe Saout # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm-crypt.c # 2004/10/25 13:18:37-07:00 agk@redhat.com +112 -37 # device-mapper: dm-crypt generator extension # # ChangeSet # 2004/10/25 18:15:05-07:00 agk@redhat.com # [PATCH] device-mapper: dm-crypt tidy-ups # # Small dm-crypt tidy-ups: # - Use unsigned consistently # - Simplify crypt_iv_plain memset # - Use DMEMIT macro # # Signed-Off-By: Alasdair G Kergon # Signed-Off-By: Christophe Saout # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm-crypt.c # 2004/10/25 13:18:37-07:00 agk@redhat.com +31 -34 # device-mapper: dm-crypt tidy-ups # # ChangeSet # 2004/10/25 18:14:52-07:00 alex.kiernan@gmail.com # [PATCH] UFS: solaris compatibility fix # # Fix handling of device inodes on Solaris x86 filesystems, add support for # large dev_t against Solaris UFS filesystems. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/ufs/util.h # 2004/10/25 12:47:56-07:00 alex.kiernan@gmail.com +2 -0 # UFS: solaris compatibility fix # # fs/ufs/util.c # 2004/10/25 12:47:56-07:00 alex.kiernan@gmail.com +53 -0 # UFS: solaris compatibility fix # # fs/ufs/namei.c # 2004/10/25 12:47:56-07:00 alex.kiernan@gmail.com +2 -2 # UFS: solaris compatibility fix # # fs/ufs/inode.c # 2004/10/25 12:47:56-07:00 alex.kiernan@gmail.com +2 -2 # UFS: solaris compatibility fix # # ChangeSet # 2004/10/25 18:14:40-07:00 marcelo.tosatti@cyclades.com # [PATCH] Change pagevec counters back to unsigned long and cacheline align # # Change pagevec "nr" and "cold" back to "unsigned long", because <4 byte # accesses can be slow on architectures < Pentium III (additional "data16" # operand on instruction). # # This still honours the cacheline alignment, making the size of "pagevec" # structure a power of two (either 64 or 128 bytes). # # Haven't been able to see any significant change on performance on my # limited testing. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/pagevec.h # 2004/10/25 12:47:56-07:00 marcelo.tosatti@cyclades.com +4 -3 # Change pagevec counters back to unsigned long and cacheline align # # ChangeSet # 2004/10/25 18:14:27-07:00 Peter_Pregler@email.com # [PATCH] cpia.c rmmod deadlock fix # # Newer versions of module-init-tools do some locking now which leads to a # dead-lock if cpia.c does a request_module("cpia_usb/pp"). The attached # patch against 2.6.8 removes the request_module. The problem is actually # the same as is documented in debian bug #259056 which was caused by alsa # autoloading some oss-modules. So I guess there might be more places in the # kernel where this new locking in the module-init-tools might lead to # dead-locks. # # Signed-off-by: Peter Pregler # Acked-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/cpia.c # 2004/10/25 12:47:55-07:00 Peter_Pregler@email.com +1 -10 # cpia.c rmmod deadlock fix # # ChangeSet # 2004/10/25 18:14:15-07:00 vandrove@vc.cvut.cz # [PATCH] Weak symbols in modules and versioned symbols # # Weak symbol may be unavailable in kernel, but if it is available, its # signature should be same as was at the build time. If we do not attach # signatures to weak symbols, kernel is tainted when such module is loaded. # # vmmon: no version for "sys_ioctl" found: kernel tainted. # # I also believe that it is safer to add & check signatures here - module # wants either sys_ioctl with right signature, or no sys_ioctl at all, not # sys_ioctl with different signature (which signals that there is some # misbuild occuring). # # Signed-off-by: Petr Vandrovec # Signed-off-by: Rusty Russell (forwarded) # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # scripts/mod/modpost.c # 2004/10/25 12:47:56-07:00 vandrove@vc.cvut.cz +9 -5 # Weak symbols in modules and versioned symbols # # ChangeSet # 2004/10/25 18:14:02-07:00 jmorris@redhat.com # [PATCH] Add d_alloc_name() to libfs # # This patch consolidates several occurrences of duplicated code into a new # libfs function d_alloc_name(). # # Signed-off-by: James Morris # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/10/25 21:14:01-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/netdev-2.6/e1000-2 # # drivers/net/e1000/e1000_main.c # 2004/10/25 21:13:57-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/e1000/e1000.h # 2004/10/25 21:13:57-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # security/selinux/selinuxfs.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +3 -14 # Add d_alloc_name() to libfs # # net/sunrpc/rpc_pipe.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +1 -5 # Add d_alloc_name() to libfs # # include/linux/fs.h # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +1 -0 # Add d_alloc_name() to libfs # # fs/libfs.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +2 -5 # Add d_alloc_name() to libfs # # fs/dcache.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +10 -0 # Add d_alloc_name() to libfs # # drivers/usb/gadget/inode.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +1 -5 # Add d_alloc_name() to libfs # # drivers/oprofile/oprofilefs.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +4 -10 # Add d_alloc_name() to libfs # # drivers/misc/ibmasm/ibmasmfs.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +2 -11 # Add d_alloc_name() to libfs # # ChangeSet # 2004/10/25 18:13:49-07:00 cmm@us.ibm.com # [PATCH] ext2: discard preallocation in last iput # # Currently the ext2 preallocation is discarded on every iput() (via # ext2_put_inode()). We should only discard the preallocation on the last # iput() (via ext2_clear_inode()). # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/ext2/super.c # 2004/10/25 12:47:55-07:00 cmm@us.ibm.com +4 -6 # ext2: discard preallocation in last iput # # fs/ext2/inode.c # 2004/10/25 12:47:55-07:00 cmm@us.ibm.com +0 -13 # ext2: discard preallocation in last iput # # fs/ext2/ext2.h # 2004/10/25 12:47:55-07:00 cmm@us.ibm.com +0 -1 # ext2: discard preallocation in last iput # # ChangeSet # 2004/10/25 18:13:38-07:00 neilb@cse.unsw.edu.au # [PATCH] md: fixes to make version-1 superblocks work in md driver # # Add some missing data_offset additions and some le_to_cpu convertions and fix # a few other little mistakes. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/raid/md_p.h # 2004/10/25 12:47:55-07:00 neilb@cse.unsw.edu.au +2 -2 # md: fixes to make version-1 superblocks work in md driver # # include/linux/raid/md.h # 2004/10/25 12:47:55-07:00 neilb@cse.unsw.edu.au +1 -1 # md: fixes to make version-1 superblocks work in md driver # # drivers/md/raid10.c # 2004/10/25 12:47:55-07:00 neilb@cse.unsw.edu.au +1 -0 # md: fixes to make version-1 superblocks work in md driver # # drivers/md/multipath.c # 2004/10/25 12:47:55-07:00 neilb@cse.unsw.edu.au +2 -0 # md: fixes to make version-1 superblocks work in md driver # # drivers/md/md.c # 2004/10/25 12:47:55-07:00 neilb@cse.unsw.edu.au +11 -20 # md: fixes to make version-1 superblocks work in md driver # # ChangeSet # 2004/10/25 18:13:26-07:00 neilb@cse.unsw.edu.au # [PATCH] md: fix typos in md and raid10 # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid10.c # 2004/10/25 13:18:38-07:00 neilb@cse.unsw.edu.au +1 -1 # md: fix typos in md and raid10 # # drivers/md/md.c # 2004/10/25 13:18:38-07:00 neilb@cse.unsw.edu.au +2 -2 # md: fix typos in md and raid10 # # ChangeSet # 2004/10/25 18:13:13-07:00 neilb@cse.unsw.edu.au # [PATCH] md: don't hold lock on md devices while waiting for them to finish resync. # # If one md array is waiting for another to finish resyncing, then it holds a # reference to the array, so the array cannot be stopped. With this patch, we # drop the reference before waiting. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/md.c # 2004/10/25 13:18:38-07:00 neilb@cse.unsw.edu.au +36 -17 # md: don't hold lock on md devices while waiting for them to finish resync. # # ChangeSet # 2004/10/25 18:13:01-07:00 neilb@cse.unsw.edu.au # [PATCH] md: discard calc_sb_csum_common in favour of csum_fold # # csum_fold should always have been used on the result of csum_partial. # calc_sb_csum_common therefore isn't needed. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/md.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +1 -26 # md: discard calc_sb_csum_common in favour of csum_fold # # ChangeSet # 2004/10/25 18:12:49-07:00 neilb@cse.unsw.edu.au # [PATCH] md: make read retry use a new bio in raid1 and raid10 # # When retrying a read request, we need to "Reset" the bio. It is easiest to # get this right if we discard the bio we have and re-clone it. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid10.c # 2004/10/25 13:18:38-07:00 neilb@cse.unsw.edu.au +6 -7 # md: make read retry use a new bio in raid1 and raid10 # # drivers/md/raid1.c # 2004/10/25 12:47:55-07:00 neilb@cse.unsw.edu.au +5 -1 # md: make read retry use a new bio in raid1 and raid10 # # ChangeSet # 2004/10/25 18:12:36-07:00 neilb@cse.unsw.edu.au # [PATCH] md: modify locking when accessing subdevices in md # # Each md personality keeps a list of devices that are currently active in the # array (mdk_rdev_t). As these can potentially be removed at any time, some # locking is needed when accessing entries in the list. Currently this involves # a spinlock, but all the spinlocking this imposed in unplug_slaves bothered me. # # So, I have changed it to use rcu locking. This is more appropriate as objects # are removed only very rarely, and there is no cost in waiting a little while # for a remove to succeed. # # Also, all changes to the list of devices are performed by the per-array thread # (calling md_check_recovery) and so are completely single threaded, so no # locking between writers is needed at all. # # Finally, devices are never added or removed while resync is happening, so # resync doesn't need to worry about locking at all. # # So with this patch, the spinlocking is replaced with rcu read locking and # synchronize_kernel. The rcu_read_lock is held while dereferencing a possible # device, and the nr_pending count is atomically incremented if the device is to # be held outside of the rcu_read_lock. # # When removing a device, if the nr_pending count appears to be zero, we set the # list entry to NULL and call synchronize_kernel(). If the count is still zero # after this, we have a safe removal. If it is non-zero, then someone has just # started using it so we put the pointer back and fail the removal. When the # new user finally drops it's reference, that will cause the per-array thread to # wake up again and retry the removal. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid6main.c # 2004/10/25 12:47:54-07:00 neilb@cse.unsw.edu.au +29 -23 # md: modify locking when accessing subdevices in md # # drivers/md/raid5.c # 2004/10/25 12:47:54-07:00 neilb@cse.unsw.edu.au +28 -23 # md: modify locking when accessing subdevices in md # # drivers/md/raid10.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +33 -29 # md: modify locking when accessing subdevices in md # # drivers/md/raid1.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +32 -29 # md: modify locking when accessing subdevices in md # # drivers/md/multipath.c # 2004/10/25 13:18:38-07:00 neilb@cse.unsw.edu.au +30 -21 # md: modify locking when accessing subdevices in md # # ChangeSet # 2004/10/25 18:12:24-07:00 neilb@cse.unsw.edu.au # [PATCH] md: fix two little bugs in raid10 # # These can cause resync to spin when there is a faulty drive. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid10.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +2 -1 # md: fix two little bugs in raid10 # # ChangeSet # 2004/10/25 18:12:11-07:00 neilb@cse.unsw.edu.au # [PATCH] md: make sure md always uses rdev_dec_pending properly # # The ->nr_pending counted should always be decremented with rdev_dec_pending, # as this need to do things when the count hits zero. There were a few places # where it was being decremented directly. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid6main.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +1 -1 # md: make sure md always uses rdev_dec_pending properly # # drivers/md/raid5.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +1 -1 # md: make sure md always uses rdev_dec_pending properly # # drivers/md/raid10.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +2 -2 # md: make sure md always uses rdev_dec_pending properly # # drivers/md/raid1.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +2 -2 # md: make sure md always uses rdev_dec_pending properly # # drivers/md/multipath.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +1 -1 # md: make sure md always uses rdev_dec_pending properly # # ChangeSet # 2004/10/25 18:11:59-07:00 neilb@cse.unsw.edu.au # [PATCH] md: rationalise unplug functions in md # # There are currently subtle differences in the different personalities # concerning when subdevices are unplugged (faulty? nr_pending?). This patch # makes them sll uniform. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid6main.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +2 -2 # md: rationalise unplug functions in md # # drivers/md/raid5.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +2 -2 # md: rationalise unplug functions in md # # drivers/md/raid10.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +1 -1 # md: rationalise unplug functions in md # # drivers/md/raid1.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +1 -1 # md: rationalise unplug functions in md # # drivers/md/multipath.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +1 -1 # md: rationalise unplug functions in md # # ChangeSet # 2004/10/25 18:11:47-07:00 neilb@cse.unsw.edu.au # [PATCH] md: rationalise issue_flush function in md personalities # # The functions are all subtly different. This patch makes them all much the # same. In particular, EOPNOTSUPP gets returned by all is appropriate. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid6main.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +6 -16 # md: rationalise issue_flush function in md personalities # # drivers/md/raid5.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +6 -16 # md: rationalise issue_flush function in md personalities # # drivers/md/raid10.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +6 -6 # md: rationalise issue_flush function in md personalities # # drivers/md/raid1.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +6 -6 # md: rationalise issue_flush function in md personalities # # drivers/md/raid0.c # 2004/10/25 12:47:54-07:00 neilb@cse.unsw.edu.au +4 -8 # md: rationalise issue_flush function in md personalities # # drivers/md/multipath.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +5 -8 # md: rationalise issue_flush function in md personalities # # drivers/md/linear.c # 2004/10/25 12:47:54-07:00 neilb@cse.unsw.edu.au +4 -7 # md: rationalise issue_flush function in md personalities # # ChangeSet # 2004/10/25 18:11:34-07:00 neilb@cse.unsw.edu.au # [PATCH] md: make retry_list non-global in raid1 and multipath # # Both raid1 and multipath have a "retry_list" which is global, so all raid1 # arrays (for example) us the same list. This is rather ugly, and it is simple # enough to make it per-array, so this patch does that. # # It also changes to multipath code to use list.h lists instead of # roll-your-own. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/raid/raid1.h # 2004/10/25 12:47:54-07:00 neilb@cse.unsw.edu.au +1 -0 # md: make retry_list non-global in raid1 and multipath # # include/linux/raid/multipath.h # 2004/10/25 12:47:54-07:00 neilb@cse.unsw.edu.au +2 -1 # md: make retry_list non-global in raid1 and multipath # # drivers/md/raid1.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +9 -9 # md: make retry_list non-global in raid1 and multipath # # drivers/md/multipath.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +12 -16 # md: make retry_list non-global in raid1 and multipath # # ChangeSet # 2004/10/25 18:11:22-07:00 neilb@cse.unsw.edu.au # [PATCH] md: remove md_flush_all # # Following are 7 patches for md # # They all grew out of a desire to redo the locking in unplug_slave. Getting # and dropping a spinlock so often for very little gain (it would be nearly # impossible to lose the relevant race) really bothered me. # # I finally figured that I could reply it with rcu locking which is very light # wait, and quite up to the task. # # One the way I found an number of inconsistencies that needed cleaning up and # even a few bugs to fix. The first 6 patches deal with these inconsistencies # and bugs. The last redoes the locking for adding/removing/accessing devices # within md personalities. # # # This patch: # # md_flush_all() isn't needed as each personality defines its own # issue_flush_fn. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/md.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +0 -33 # md: remove md_flush_all # # ChangeSet # 2004/10/25 18:11:09-07:00 dvhltc@us.ibm.com # [PATCH] sched: active_load_balance fixes # # The following patch against the latest mm fixes several problems with # active_load_balance(). # # Rather than starting with the highest allowable domain (SD_LOAD_BALANCE is # still set) and depending on the order of the cpu groups, we start at the # lowest domain and work up until we find a suitable CPU or run out of # options (SD_LOAD_BALANCE is no longer set). This is a more robust approach # as it is more explicit and not subject to the construction order of the cpu # groups. # # We move the test for busiest_rq->nr_running <=1 into the domain loop so we # don't continue to try and move tasks when there are none left to move. # This new logic (testing for nr_running in the domain loop) should make the # busiest_rq==target_rq condition really impossible, so we have replaced the # graceful continue on fail with a BUG_ON. (Bjorn Helgaas, please confirm) # # We eliminate the exclusion of the busiest_cpu's group from the pool of # available groups to push to as it is the ideal group to push to, even if # not very likely to be available. Note that by removing the test for # group==busy_group and allowing it to also be tested for suitability, the # running time is nearly the same. # # We no longer force the destination CPU to be in a group of completely idle # CPUs, nor to be the last in that group. # # Signed-off-by: Darren Hart # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/10/25 12:47:53-07:00 dvhltc@us.ibm.com +72 -57 # sched: active_load_balance fixes # # ChangeSet # 2004/10/25 18:10:57-07:00 amgta@yacht.ocn.ne.jp # [PATCH] schedstat: fix schedule() statistics # # The number of times schedule() left the processor idle in the # /proc/schedstat (runqueue.sched_goidle) seems to be wrong. # # The schedule() statistics should satisfy the equation: # sched_cnt == sched_noswitch + sched_switch + sched_goidle # # (http://eaglet.rain.com/rick/linux/schedstat/v10/format-10.html) # # The below patch fix this, and I have confirmed to be fixed with: # # grep ^cpu /proc/schedstat | awk '{print $6+$7+$9, $8}' # # Acked-by: Ingo Molnar # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/10/25 13:18:41-07:00 amgta@yacht.ocn.ne.jp +2 -1 # schedstat: fix schedule() statistics # # ChangeSet # 2004/10/25 18:10:44-07:00 hawkes@oss.sgi.com # [PATCH] sched: improved load_balance() tolerance for pinned tasks # # A large number of processes that are pinned to a single CPU results in # every other CPU's load_balance() seeing this overloaded CPU as "busiest", # yet move_tasks() never finds a task to pull-migrate. This condition occurs # during module unload, but can also occur as a denial-of-service using # sys_sched_setaffinity(). Several hundred CPUs performing this fruitless # load_balance() will livelock on the busiest CPU's runqueue lock. A smaller # number of CPUs will livelock if the pinned task count gets high. This # simple patch remedies the more common first problem: after a move_tasks() # failure to migrate anything, the balance_interval increments. Using a # simple increment, vs. the more dramatic doubling of the balance_interval, # is conservative and yet also effective. # # Signed-off-by: John Hawkes # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/10/25 13:18:41-07:00 hawkes@oss.sgi.com +12 -4 # sched: improved load_balance() tolerance for pinned tasks # # ChangeSet # 2004/10/25 18:10:32-07:00 jbarnes@engr.sgi.com # [PATCH] sched: small load balance fix # # Small bug fix for domains that don't load balance (like those that only # balance on exec for example). # # Signed-off-by: John Hawkes # Signed-off-by: Jesse Barnes # Acked-by: Nick Piggin # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/10/25 13:18:41-07:00 jbarnes@engr.sgi.com +1 -2 # sched: small load balance fix # # ChangeSet # 2004/10/25 18:10:20-07:00 schwidefsky@de.ibm.com # [PATCH] s390: network driver # # From: Frank Pavlic # From: Thomas Spatzier # # s390 network driver changes: # - ctc/iucv: Use DECLARE_PER_CPU instead of extern DEFINE_PER_CPU. # - lcs: Always set channel state to CH_STATE_INIT when stopping channels. # - qeth: vlan fixes. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/net/qeth_main.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +117 -124 # s390: network driver # # drivers/s390/net/qeth.h # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +1 -3 # s390: network driver # # drivers/s390/net/lcs.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +4 -4 # s390: network driver # # drivers/s390/net/iucv.h # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +1 -1 # s390: network driver # # drivers/s390/net/ctcdbug.h # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +3 -3 # s390: network driver # # ChangeSet # 2004/10/25 18:10:07-07:00 schwidefsky@de.ibm.com # [PATCH] s390: qdio changes # # From: Utz Bacher # # qdio changes: # - Rename iqdio_is_inbound_q_done to tiqdio_is_inbound_q_done to # keep function naming consistent. # - Allocate qdio structures below 2GB. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/cio/qdio.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +8 -8 # s390: qdio changes # # ChangeSet # 2004/10/25 18:09:55-07:00 schwidefsky@de.ibm.com # [PATCH] s390: debug feature system control # # From: Christian Borntraeger # # Debug feature changes: # - Add system control to stop the debug feature. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-s390/debug.h # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +2 -0 # s390: debug feature system control # # arch/s390/kernel/traps.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +5 -2 # s390: debug feature system control # # arch/s390/kernel/debug.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +76 -1 # s390: debug feature system control # # Documentation/s390/s390dbf.txt # 2004/10/25 13:18:32-07:00 schwidefsky@de.ibm.com +37 -0 # s390: debug feature system control # # ChangeSet # 2004/10/25 18:09:42-07:00 schwidefsky@de.ibm.com # [PATCH] s390: dcss segments cleanup # # From: Carsten Otte # From: Gerald Schaefer # # Cleanup segment load/unload infrastructure. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/10/25 21:09:39-04:00 akpm@osdl.org # [PATCH] ne2k-pci pci build fix # # Fix for updated pci_{save,restore}_state() # # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # include/asm-s390/extmem.h # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +16 -5 # s390: dcss segments cleanup # # drivers/s390/char/monreader.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +60 -2 # s390: dcss segments cleanup # # drivers/s390/block/dcssblk.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +71 -48 # s390: dcss segments cleanup # # arch/s390/mm/extmem.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +367 -408 # s390: dcss segments cleanup # # drivers/net/ne2k-pci.c # 2004/10/24 06:28:57-04:00 akpm@osdl.org +2 -2 # ne2k-pci pci build fix # # ChangeSet # 2004/10/25 18:09:30-07:00 schwidefsky@de.ibm.com # [PATCH] s390: core changes # # s390 core changes: # - Load pid to cr4 on context switch. # - Correct and check buffer length of cpcmd. Fix cpcmd inline assembly. # - Add missing cc clobber to do_softirq insline assembly. # - Regenerate default configuration. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/s390/kernel/irq.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +1 -1 # s390: core changes # # arch/s390/kernel/entry64.S # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +1 -0 # s390: core changes # # arch/s390/kernel/entry.S # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +1 -0 # s390: core changes # # arch/s390/kernel/cpcmd.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +12 -11 # s390: core changes # # arch/s390/kernel/asm-offsets.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +2 -0 # s390: core changes # # arch/s390/defconfig # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +11 -2 # s390: core changes # # ChangeSet # 2004/10/25 18:09:17-07:00 schwidefsky@de.ibm.com # [PATCH] s390: sacf local root exploit (CAN-2004-0887) # # s390 core changes: # - Force user process back to home space mode in space switch event # exception handler. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/s390/kernel/traps.c # 2004/10/25 13:18:42-07:00 schwidefsky@de.ibm.com +16 -1 # s390: sacf local root exploit (CAN-2004-0887) # # ChangeSet # 2004/10/25 18:09:05-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: add conf INITRAMFS_SOURCE # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/Kconfig_block # 2004/10/25 12:47:51-07:00 blaisorblade_spam@yahoo.it +27 -0 # uml: add conf INITRAMFS_SOURCE # # ChangeSet # 2004/10/25 18:08:53-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: unused label # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/tt/process_kern.c # 2004/10/25 12:47:51-07:00 blaisorblade_spam@yahoo.it +0 -1 # uml: unused label # # ChangeSet # 2004/10/25 18:08:41-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: resync LDS script for SMP changes # # Add a couple entries to the linker script which are needed for SMP to link. # (From Yan Burman) # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/uml.lds.S # 2004/10/25 12:47:51-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: resync LDS script for SMP changes # # arch/um/kernel/dyn.lds.S # 2004/10/25 12:47:51-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: resync LDS script for SMP changes # # ChangeSet # 2004/10/25 18:08:28-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Kconfig and defconfig updates. # # - Make CONFIG_SMP depend on TT mode. Since SMP does not work in SKAS mode # (it's still a TODO), add the dependency in the Kconfig. Also mark CONFIG_SMP # as experimental. # - Workaround kconfig warning: just for now (we wait for a "CONFIG_VIRTUAL_OS" # to exclude physical hardware) create the CONFIG_INPUT option (fixed to N), # to avoid complaints from make *config ARCH=um about it being undefined. # - Mark HPPFS as broken and needing updates. # - Update defconfig, both for new kernel options and for changes in the actual # config. For instance, enable module support by default. # - Update help text for some items and add a help to some other ones. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/defconfig # 2004/10/25 12:47:51-07:00 blaisorblade_spam@yahoo.it +38 -117 # uml: Kconfig and defconfig updates. # # arch/um/Kconfig # 2004/10/25 12:47:51-07:00 blaisorblade_spam@yahoo.it +40 -10 # uml: Kconfig and defconfig updates. # # ChangeSet # 2004/10/25 18:08:16-07:00 bunk@stusta.de # [PATCH] small SOFTWARE_SUSPEND help text fixes # # Some small fixes for the SOFTWARE_SUSPEND help text. # # Signed-off-by: Adrian Bunk # Signed-off-by: Pavel Machek # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/power/Kconfig # 2004/10/25 12:47:51-07:00 bunk@stusta.de +2 -1 # small SOFTWARE_SUSPEND help text fixes # # ChangeSet # 2004/10/25 18:08:03-07:00 pavel@ucw.cz # [PATCH] power/disk.c: small fixups # # power_down may never ever fail, so it does not really need to return # anything. Kill obsolete code and fixup old comments. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/power/disk.c # 2004/10/25 12:47:51-07:00 pavel@ucw.cz +5 -14 # power/disk.c: small fixups # # ChangeSet # 2004/10/25 18:07:51-07:00 paulus@samba.org # [PATCH] ppc64: __ioremap_explicit() criterion change # # This patch is from John Rose . # # The function __ioremap_explicit() misses a possible (obscure) case when # reserving the imalloc area for the new region. This can result in the # unexpected DLPAR-add failure for an I/O slot. The failure will be # characterized by a kernel message resembling "could not obtain imalloc area # for ea 0x..." Here's an explanation: # # At boot time, imalloc regions are created for the ranges of all PHBs. Upon # removal of a child slot for one of these PHBs, the imalloc region is split # so that the region for the child slot can be removed. # # A GFW testcase revealed the following scenario. A PHB is remapped at boot # for virtual address range A through C. At boot, the partition owns a slot # that spans from A to B. This slot is DLPAR-removed, leaving an imalloc # region from B to C. At this point, the user DLPAR adds an EADS slot that # was not present at boot, but is a child of the PHB. The new slot happens # to have a range that directly matches the leftover PHB range, from B to C. # The existing code does not expect this, so the operation fails. # # Signed-off-by: John Rose # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/init.c # 2004/10/25 12:47:50-07:00 paulus@samba.org +2 -1 # ppc64: __ioremap_explicit() criterion change # # ChangeSet # 2004/10/25 18:07:39-07:00 paulus@samba.org # [PATCH] ppc64: create iommu_free_table() # # This patch is from John Rose . # # The patch below creates iommu_free_table(). Iommu tables are not currently # freed in PPC64. This could cause a memory leak for DLPAR of an EADS slot. # The function verifies that there are no outstanding TCE entries for the # range of the table before freeing it. I added a call to iommu_free_table() # to the code that dynamically removes a device node. This should be fairly # symmetrical with the table allocation, which happens during dynamic # addition of a device node. # # Signed-off-by: John Rose # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/iommu.h # 2004/10/25 12:47:51-07:00 paulus@samba.org +3 -0 # ppc64: create iommu_free_table() # # arch/ppc64/kernel/prom.c # 2004/10/25 12:47:50-07:00 paulus@samba.org +3 -0 # ppc64: create iommu_free_table() # # arch/ppc64/kernel/pSeries_iommu.c # 2004/10/25 12:47:50-07:00 paulus@samba.org +32 -0 # ppc64: create iommu_free_table() # # ChangeSet # 2004/10/25 18:07:26-07:00 paulus@samba.org # [PATCH] ppc64: crash during firmware flash update # # This patch is from Linas Vepstas . # # Race conditions during system shutdown after a firmware flash can sometimes # lead to an invalid pointer deref (deref to freed memory). This patch fixes # this. In addition, it makes sure that the proc entries created by the # firmware flash module are removed when the module is unloaded. # # Signed-off-by: Linas Vepstas # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/rtas_flash.c # 2004/10/25 12:47:50-07:00 paulus@samba.org +3 -1 # ppc64: crash during firmware flash update # # ChangeSet # 2004/10/25 18:07:14-07:00 paulus@samba.org # [PATCH] ppc64: provide notifier list for EEH slot isolations # # When the EEH (enhanced i/o error handling) hardware on pSeries detects # various kinds of PCI errors, it immediately freezes and isolates the slot # of the offending PCI card. We get to know about that by noticing that # reads from the device return all-1s, and then we have to do a firmware call # to find out whether the all-1s value was due to a slot isolation. # # This patch adds a notifier so that other parts of the system (e.g. the RPA # PCI hotplug driver) can know that a slot isolation event has occurred and # take whatever recovery action is appropriate. The notifier is called in a # workqueue function, although the read from the device that noticed the # all-1s value may have been at interrupt level. As a precaution, if we keep # trying to read from the device at interrupt level, and do 1000 reads # without the workqueue getting a chance to run, we panic, on the grounds # that we presumably have a badly-written driver which will spin forever in # its interrupt routine, e.g. waiting for a bit in a device register to go # to 0. # # This patch is based on an earlier patch by Linas Vepstas . # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/eeh.h # 2004/10/25 12:47:50-07:00 paulus@samba.org +26 -2 # ppc64: provide notifier list for EEH slot isolations # # arch/ppc64/kernel/eeh.c # 2004/10/25 12:47:50-07:00 paulus@samba.org +224 -52 # ppc64: provide notifier list for EEH slot isolations # # ChangeSet # 2004/10/25 18:07:02-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: xmon sparse cleanups # # This patch removes many sparse warnings from the xmon code. Mostly K&R # function declarations and 0-instead-of-NULLs. There are still a whole # bunch of warnings in xmon/ppc-opc.c, which is a copy of a file from # binutils. # # Signed-off-by: David Gibson # Acked-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/xmon/xmon.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +13 -15 # ppc64: xmon sparse cleanups # # arch/ppc64/xmon/start.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +1 -1 # ppc64: xmon sparse cleanups # # ChangeSet # 2004/10/25 18:06:50-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: trivial sparse cleanups # # This patch squashes a handful of assorted sparse warnings in the ppc64 # code. Should be pretty much trivial and self explanatory. # # Signed-off-by: David Gibson # Acked-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/hugetlbpage.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +1 -1 # ppc64: trivial sparse cleanups # # arch/ppc64/mm/hash_utils.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +1 -1 # ppc64: trivial sparse cleanups # # arch/ppc64/kernel/setup.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +1 -1 # ppc64: trivial sparse cleanups # # arch/ppc64/kernel/nvram.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +2 -2 # ppc64: trivial sparse cleanups # # ChangeSet # 2004/10/25 18:06:37-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: don't build virtual IO drivers for PowerMac # # Only compile vio.c on iSeries and pSeries, since other PPC64 platforms # (PowerMac) don't use virtual IO. The resulting #ifdefs in dma.c are kind # of ugly, but at least contained, and I can't see a nicer way of doing it # for the time being. # # Signed-off-by: David Gibson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/dma.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +20 -0 # ppc64: don't build virtual IO drivers for PowerMac # # arch/ppc64/kernel/Makefile # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +2 -1 # ppc64: don't build virtual IO drivers for PowerMac # # arch/ppc64/Kconfig # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +5 -0 # ppc64: don't build virtual IO drivers for PowerMac # # ChangeSet # 2004/10/25 18:06:25-07:00 trini@kernel.crashing.org # [PATCH] ppc32: Fix building for Motorola Sandpoint with O= # # Since we directly -include $(clear_L2_L3) when needed, we need to point to # the full path of it. # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/boot/simple/Makefile # 2004/10/25 12:47:49-07:00 trini@kernel.crashing.org +1 -1 # ppc32: Fix building for Motorola Sandpoint with O= # # ChangeSet # 2004/10/25 18:06:13-07:00 chrisw@osdl.org # [PATCH] lsm: remove net related includes from security.h # # With this we're back to the times when changing skbuff.h only triggers # rebuild of _net_ related stuff 8) # # This uncovered a bug in rmap.h, that was not including mm.h to get the # definition of struct vm_area_struct, working by luck. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: Chris Wright # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/commoncap.c # 2004/10/25 12:47:50-07:00 chrisw@osdl.org +17 -0 # lsm: remove net related includes from security.h # # include/linux/security.h # 2004/10/25 12:47:50-07:00 chrisw@osdl.org +7 -18 # lsm: remove net related includes from security.h # # include/linux/rmap.h # 2004/10/25 12:47:50-07:00 chrisw@osdl.org +1 -0 # lsm: remove net related includes from security.h # # ChangeSet # 2004/10/25 18:06:00-07:00 chrisw@osdl.org # [PATCH] lsm: fix send_sigurg mediation # # Stephen Smalley notes that send_sigurg isn't mediated by LSM in the same # manner as send_sigio. Patch below is a slight modification of Stephen's # original patch. It moves the security_file_send_sigiotask() hook into the # sigio_perm(). The hook's fd and reason arguments are replaced with the # signum. sigio_perm() and it's callers are updated to pass the signum # through to the hook. In send_sigio case, the signum is simply fown->signum # or SIGIO when signum is 0, however in send_sigurg the kernel doesn't use # fown->signum, it always sends SIGURG. # # From: Stephen Smalley # Signed-off-by: Chris Wright # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/hooks.c # 2004/10/25 13:18:32-07:00 chrisw@osdl.org +3 -4 # lsm: fix send_sigurg mediation # # security/dummy.c # 2004/10/25 12:47:50-07:00 chrisw@osdl.org +1 -2 # lsm: fix send_sigurg mediation # # include/linux/security.h # 2004/10/25 13:18:46-07:00 chrisw@osdl.org +10 -12 # lsm: fix send_sigurg mediation # # fs/fcntl.c # 2004/10/25 12:47:50-07:00 chrisw@osdl.org +7 -9 # lsm: fix send_sigurg mediation # # ChangeSet # 2004/10/25 18:05:47-07:00 rddunlap@osdl.org # [PATCH] checkstack: add x86_64 arch. support # # Add support for x86_64 arch. to 'make checkstack' (checkstack.pl). # # Signed-off-by: Randy Dunlap # Acked-by: Jrn Engel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # scripts/checkstack.pl # 2004/10/25 12:47:49-07:00 rddunlap@osdl.org +3 -0 # checkstack: add x86_64 arch. support # # ChangeSet # 2004/10/25 18:05:35-07:00 nickpiggin@yahoo.com.au # [PATCH] mm: help zone padding # # Uses the zero length array which seems to be quite abundant throughout the # tree to reduce the size of the zone padding to zero. # # 1536 before, 1152 afterwards for me. # # Also try to be a bit smarter about getting commonly accessed fields # together, which surely can't be worse than before. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/mmzone.h # 2004/10/25 12:47:49-07:00 nickpiggin@yahoo.com.au +19 -18 # mm: help zone padding # # ChangeSet # 2004/10/25 18:05:23-07:00 akpm@osdl.org # [PATCH] msnd.c build fix # # sound/oss/msnd.c: In function `msnd_enable_irq': # sound/oss/msnd.c:278: warning: implicit declaration of function `enable_irq' # sound/oss/msnd.c: In function `msnd_disable_irq': # sound/oss/msnd.c:307: warning: implicit declaration of function `disable_irq' # # sound/oss/msnd.c:323: `msnd_get_num_devs' undeclared here (not in a function) # sound/oss/msnd.c:323: initializer element is not constant # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # sound/oss/msnd.c # 2004/10/25 12:47:49-07:00 akpm@osdl.org +2 -0 # msnd.c build fix # # ChangeSet # 2004/10/25 18:05:11-07:00 dhowells@redhat.com # [PATCH] Shift key-related error codes up and insert ECANCELED # # This patch shifts the key-related error codes up by one and inserts an # ECANCELED error code where not already defined. It seems that has been # defined in glibc without passing it back to the kernel:-/ # # Signed-Off-By: David Howells # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-sparc64/errno.h # 2004/10/25 12:47:49-07:00 dhowells@redhat.com +5 -4 # Shift key-related error codes up and insert ECANCELED # # include/asm-sparc/errno.h # 2004/10/25 12:47:49-07:00 dhowells@redhat.com +5 -4 # Shift key-related error codes up and insert ECANCELED # # include/asm-generic/errno.h # 2004/10/25 12:47:49-07:00 dhowells@redhat.com +5 -4 # Shift key-related error codes up and insert ECANCELED # # include/asm-alpha/errno.h # 2004/10/25 12:47:49-07:00 dhowells@redhat.com +5 -4 # Shift key-related error codes up and insert ECANCELED # # ChangeSet # 2004/10/25 18:04:58-07:00 juhl-lkml@dif.dk # [PATCH] ds_ioctl.c usercopy check # # Patch adds a check of the return value and returns -EFAULT if # __copy_to_user fails. # # Signed-off-by: Jesper Juhl # Acked-by: Russell King # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/pcmcia/ds.c # 2004/10/25 12:47:48-07:00 juhl-lkml@dif.dk +5 -1 # ds_ioctl.c usercopy check # # ChangeSet # 2004/10/25 18:04:46-07:00 akpm@osdl.org # [PATCH] revert "ppc: fix build with o=output_dir" # # This was the wrong fix - back it out and try again later. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/boot/lib/Makefile # 2004/10/25 12:47:48-07:00 akpm@osdl.org +1 -7 # revert "ppc: fix build with o=output_dir" # # ChangeSet # 2004/10/25 21:04:34-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/netdev-2.6/misc # # net/irda/irlan/irlan_client.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/tulip/xircom_cb.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/tulip/de4x5.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/tulip/de2104x.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/tokenring/olympic.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/smc91x.h # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/pcnet32.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/ns83820.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/mac8390.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/ixgb/ixgb_main.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/hamradio/hdlcdrv.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/e1000/e1000_main.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/Kconfig # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 16:21:14-07:00 andrea@novell.com # [NET]: Accept should return ENFILE not EMFILE. # # Signed-off-by: David S. Miller # # net/socket.c # 2004/10/25 16:20:43-07:00 andrea@novell.com +1 -1 # [NET]: Accept should return ENFILE not EMFILE. # # ChangeSet # 2004/10/25 16:10:45-07:00 herbert@gondor.apana.org.au # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_output.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -4 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/route.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +5 -6 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/ip6_output.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +9 -12 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_output.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -4 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/route.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -3 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_ECN.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_nat_standalone.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_fw_compat.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ip_output.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -5 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/decnet/dn_route.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -8 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/core/dst.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -2 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/core/dev.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +12 -12 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/bridge/br_netfilter.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -2 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/ipv6.h # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/ip6_route.h # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/ip.h # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -2 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/dst.h # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -2 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/linux/netdevice.h # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 16:05:16-07:00 laforge@netfilter.org # [NETFILTER]: fix ipt_ULOG bogus error messages # # Please apply the fix below, it addresses some bogus error messages # ('error during NLMSG_PUT') that were printed because of a wrong # calculation of the 'len' parameter to NLMSG_PUT(). # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_ULOG.c # 2004/10/25 16:04:57-07:00 laforge@netfilter.org +4 -2 # [NETFILTER]: fix ipt_ULOG bogus error messages # # Please apply the fix below, it addresses some bogus error messages # ('error during NLMSG_PUT') that were printed because of a wrong # calculation of the 'len' parameter to NLMSG_PUT(). # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 15:48:28-07:00 davem@nuts.davemloft.net # [NETFILTER]: ip_ct_attach decl got removed by accident. # # Signed-off-by: David S. Miller # # include/linux/netfilter.h # 2004/10/25 15:47:56-07:00 davem@nuts.davemloft.net +2 -0 # [NETFILTER]: ip_ct_attach decl got removed by accident. # # ChangeSet # 2004/10/25 15:43:30-07:00 hch@lst.de # [NETFILTER]: Make *_find_target_lock routines static. # # Signed-off-by: David S. Miller # # net/ipv6/netfilter/ip6_tables.c # 2004/10/25 15:43:11-07:00 hch@lst.de +1 -2 # [NETFILTER]: Make *_find_target_lock routines static. # # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_tables.c # 2004/10/25 15:43:11-07:00 hch@lst.de +1 -2 # [NETFILTER]: Make *_find_target_lock routines static. # # Signed-off-by: David S. Miller # # net/ipv4/netfilter/arp_tables.c # 2004/10/25 15:43:11-07:00 hch@lst.de +1 -2 # [NETFILTER]: Make *_find_target_lock routines static. # # Signed-off-by: David S. Miller # # include/linux/netfilter_ipv4/ip_tables.h # 2004/10/25 15:43:11-07:00 hch@lst.de +0 -5 # [NETFILTER]: Make *_find_target_lock routines static. # # Signed-off-by: David S. Miller # # include/linux/netfilter.h # 2004/10/25 15:43:11-07:00 hch@lst.de +0 -8 # [NETFILTER]: Make *_find_target_lock routines static. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 15:38:06-07:00 bdschuym@pandora.be # [EBTABLES]: Add wildcard support for interface matching. # # Due to an old braindead decision, ebtables doesn't yet support the # wildcard '+' for matching interface names. The following patch removes # this nuissance and is backwards compatible. # # Signed-off-by: David S. Miller # # net/bridge/netfilter/ebtables.c # 2004/10/25 15:37:34-07:00 bdschuym@pandora.be +7 -1 # [EBTABLES]: Add wildcard support for interface matching. # # Due to an old braindead decision, ebtables doesn't yet support the # wildcard '+' for matching interface names. The following patch removes # this nuissance and is backwards compatible. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 18:25:59-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # drivers/acpi/scan.c # 2004/10/25 18:25:52-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 18:21:05-04:00 len.brown@intel.com # [ACPI] Extensions for Display Adapters (Bruno Ducrot) # http://bugme.osdl.org/show_bug.cgi?id=1944 # # Signed-off-by: Luming Yu # Signed-off-by: Len Brown # # ChangeSet # 2004/10/25 15:21:01-07:00 torvalds@ppc970.osdl.org # Allow BKL re-acquire to fail, causing us to re-schedule. # # This allows for low-latency BKL contention even with # preemption. Previously, since preemption is disabled # over context switches, re-acquiring the kernel lock when # resuming a process would be non-preemtible. # # drivers/acpi/video.c # 2004/10/25 11:41:27-04:00 len.brown@intel.com +1962 -0 # Import patch video_extension2.patch # # include/acpi/acpi_bus.h # 2004/10/25 11:38:43-04:00 len.brown@intel.com +2 -0 # Import patch video_extension2.patch # # drivers/acpi/video.c # 2004/10/25 11:41:27-04:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-stable-dev/drivers/acpi/video.c # # drivers/acpi/scan.c # 2004/10/25 11:38:43-04:00 len.brown@intel.com +6 -1 # Import patch video_extension2.patch # # drivers/acpi/Makefile # 2004/10/25 11:38:43-04:00 len.brown@intel.com +1 -0 # Import patch video_extension2.patch # # drivers/acpi/Kconfig # 2004/10/25 11:38:43-04:00 len.brown@intel.com +14 -0 # Import patch video_extension2.patch # # Documentation/power/video_extension.txt # 2004/10/25 11:38:43-04:00 len.brown@intel.com +34 -0 # Import patch video_extension2.patch # # Documentation/power/video_extension.txt # 2004/10/25 11:38:43-04:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-stable-dev/Documentation/power/video_extension.txt # # lib/kernel_lock.c # 2004/10/25 15:20:55-07:00 torvalds@ppc970.osdl.org +34 -10 # Allow BKL re-acquire to fail, causing us to re-schedule. # # This allows for low-latency BKL contention even with # preemption. Previously, since preemption is disabled # over context switches, re-acquiring the kernel lock when # resuming a process would be non-preemtible. # # kernel/sched.c # 2004/10/25 15:20:55-07:00 torvalds@ppc970.osdl.org +5 -2 # Allow BKL re-acquire to fail, causing us to re-schedule. # # This allows for low-latency BKL contention even with # preemption. Previously, since preemption is disabled # over context switches, re-acquiring the kernel lock when # resuming a process would be non-preemtible. # # include/linux/smp_lock.h # 2004/10/25 15:20:55-07:00 torvalds@ppc970.osdl.org +19 -5 # Allow BKL re-acquire to fail, causing us to re-schedule. # # This allows for low-latency BKL contention even with # preemption. Previously, since preemption is disabled # over context switches, re-acquiring the kernel lock when # resuming a process would be non-preemtible. # # ChangeSet # 2004/10/25 17:54:56-04:00 len.brown@intel.com # [ACPI] ACPI_CUSTOM_DSDT for IA64 too # # Signed-off-by: Anil S Keshavamurthy # Signed-off-by: Len Brown # Signed-off-by: Linus Torvalds # # include/linux/pci.h # 2004/10/05 15:56:26-07:00 hannal@us.ibm.com +1 -0 # add 'for_each_pci_dev()' helper macro # # ChangeSet # 2004/10/25 09:20:09-07:00 torvalds@ppc970.osdl.org # ppc64: make G5 setup compile again # # The stop_self thing is accessed unconditionally from pSeries_setup.c # # arch/ppc64/kernel/rtas.c # 2004/10/25 09:20:03-07:00 torvalds@ppc970.osdl.org +0 -2 # ppc64: make G5 setup compile again # # The stop_self thing is accessed unconditionally from pSeries_setup.c # # ChangeSet # 2004/10/25 08:24:40-07:00 mingo@redhat.com # [PATCH] Avoid small irq preemption recursion window # # This will get rid of the stack recursion possibility that can occur if # an IRQ happens to hit the IRQ return path right after we've reset # preempt_count() to 0 and are about to disable interrupts again. # Trivially fixed by just moving the preempt count update to inside the # interrupt disable. # # This makes the current PREEMPT_ACTIVE method fully work for IRQ # recursions. # # arch/i386/kernel/entry.S # 2004/10/24 17:00:00-07:00 mingo@redhat.com +1 -1 # Avoid small irq preemption recursion window # # ChangeSet # 2004/10/25 08:10:39-07:00 linux@dominikbrodowski.de # [PATCH] Fix PCMCIA duplicate pc_debug names # # Avoid naming confusion concerning "pc_debug" which is widely used by drivers # be renaming the PCMCIA "driver services" variant to ds_pc_debug. The module # parameter stays the same, thanks to module_param_named(). # # Signed-off-by: Dominik Brodowski # Signed-off-by: Linus Torvalds # # drivers/pcmcia/ds.c # 2004/10/22 13:32:11-07:00 linux@dominikbrodowski.de +3 -3 # Fix PCMCIA duplicate pc_debug names # # drivers/pcmcia/bulkmem.c # 2004/10/22 13:33:05-07:00 linux@dominikbrodowski.de +2 -2 # Fix PCMCIA duplicate pc_debug names # # ChangeSet # 2004/10/25 08:03:24-07:00 torvalds@ppc970.osdl.org # Merge bk://kernel.bkbits.net/davem/net-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # drivers/video/aty/atyfb_base.c # 2004/10/25 08:03:20-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/10/25 11:01:14+01:00 aia21@cantab.net # NTFS: In fs/ntfs/aops.c::mark_ntfs_record_dirty(), take the # mapping->private_lock around the dirtying of the buffer heads # analagous to the way it is done in __set_page_dirty_buffers(). # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/aops.c # 2004/10/25 11:01:06+01:00 aia21@cantab.net +2 -0 # In mark_ntfs_record_dirty(), take the mapping->private_lock around the # dirtying of the buffer heads analagous to the way it is done in # __set_page_dirty_buffers(). # # fs/ntfs/ChangeLog # 2004/10/25 11:01:06+01:00 aia21@cantab.net +3 -0 # Update # # ChangeSet # 2004/10/25 10:54:46+01:00 aia21@cantab.net # NTFS: Add attribute definition handling helpers to fs/ntfs/attrib.[hc]: # ntfs_attr_size_bounds_check(), ntfs_attr_can_be_non_resident(), and # ntfs_attr_can_be_resident(), which in turn use the new private helper # ntfs_attr_find_in_attrdef(). # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/attrib.h # 2004/10/25 10:54:37+01:00 aia21@cantab.net +8 -0 # Add attribute definition handling helpers: ntfs_attr_size_bounds_check(), # ntfs_attr_can_be_non_resident(), and ntfs_attr_can_be_resident(), which in # turn use the new private helper ntfs_attr_find_in_attrdef(). # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/attrib.c # 2004/10/25 10:54:37+01:00 aia21@cantab.net +129 -0 # Add attribute definition handling helpers: ntfs_attr_size_bounds_check(), # ntfs_attr_can_be_non_resident(), and ntfs_attr_can_be_resident(), which in # turn use the new private helper ntfs_attr_find_in_attrdef(). # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/ChangeLog # 2004/10/25 10:54:37+01:00 aia21@cantab.net +4 -0 # Update # # ChangeSet # 2004/10/25 10:49:00+01:00 aia21@cantab.net # NTFS: Fix min_size and max_size definitions in ATTR_DEF structure in # fs/ntfs/layout.h to be signed. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/layout.h # 2004/10/25 10:48:51+01:00 aia21@cantab.net +2 -2 # Fix min_size and max_size definitions in ATTR_DEF structure to be signed. # # fs/ntfs/ChangeLog # 2004/10/25 10:48:51+01:00 aia21@cantab.net +2 -0 # Update # # ChangeSet # 2004/10/25 10:46:39+01:00 aia21@cantab.net # NTFS: - Change fs/ntfs/inode.c::ntfs_truncate() to return an error code # instead of void and provide a helper ntfs_truncate_vfs() for the # vfs ->truncate method. # - Add a new ntfs inode flag NInoTruncateFailed() and modify # fs/ntfs/inode.c::ntfs_truncate() to set and clear it appropriately. # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/inode.h # 2004/10/25 10:46:30+01:00 aia21@cantab.net +4 -1 # - Change fs/ntfs/inode.c::ntfs_truncate() to return an error code # instead of void and provide a helper ntfs_truncate_vfs() for the # vfs ->truncate method. # - Add a new ntfs inode flag NInoTruncateFailed() and modify # fs/ntfs/inode.c::ntfs_truncate() to set and clear it appropriately. # # fs/ntfs/inode.c # 2004/10/25 10:46:30+01:00 aia21@cantab.net +19 -3 # - Change fs/ntfs/inode.c::ntfs_truncate() to return an error code # instead of void and provide a helper ntfs_truncate_vfs() for the # vfs ->truncate method. # - Add a new ntfs inode flag NInoTruncateFailed() and modify # fs/ntfs/inode.c::ntfs_truncate() to set and clear it appropriately. # # fs/ntfs/file.c # 2004/10/25 10:46:30+01:00 aia21@cantab.net +1 -1 # - Change fs/ntfs/inode.c::ntfs_truncate() to return an error code # instead of void and provide a helper ntfs_truncate_vfs() for the # vfs ->truncate method. # - Add a new ntfs inode flag NInoTruncateFailed() and modify # fs/ntfs/inode.c::ntfs_truncate() to set and clear it appropriately. # # fs/ntfs/ChangeLog # 2004/10/25 10:46:30+01:00 aia21@cantab.net +5 -0 # Update # # ChangeSet # 2004/10/25 10:41:30+01:00 aia21@cantab.net # NTFS: Add fs/ntfs/aops.c to list of providers for ->b_end_io method in # Documentation/filesystems/Locking. # # Signed-off-by: Anton Altaparmakov # # Documentation/filesystems/Locking # 2004/10/25 10:41:20+01:00 aia21@cantab.net +2 -2 # Add fs/ntfs/aops.c to list of providers for ->b_end_io method. # # ChangeSet # 2004/10/25 03:49:28-04:00 jgarzik@pobox.com # Merge # # drivers/net/tg3.c # 2004/10/25 03:49:24-04:00 jgarzik@pobox.com +0 -0 # SCCS merged # # ChangeSet # 2004/10/25 03:37:14-04:00 jgarzik@pobox.com # Cset exclude: elf@buici.com|ChangeSet|20040920183610|08290 # # Revert smc91x driver changeset, since this is already covered by other # smc91x updates already upstream. # # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.h # 2004/10/25 03:37:12-04:00 jgarzik@pobox.com +0 -0 # Exclude # # ChangeSet # 2004/10/25 03:34:39-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/set-config # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/wireless/netwave_cs.c # 2004/10/25 03:34:36-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/wan/lmc/lmc_main.c # 2004/10/25 03:34:36-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/sk_mca.c # 2004/10/25 03:34:36-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/ibmlana.c # 2004/10/25 03:34:36-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/media/dvb/dvb-core/dvb_net.c # 2004/10/25 03:34:36-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 03:33:45-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/defxx # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/defxx.c # 2004/10/25 03:33:42-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 03:30:48-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/acenic # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/acenic.c # 2004/10/25 03:30:45-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 03:27:44-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/e100 # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/e100.c # 2004/10/25 03:27:41-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/24 21:44:39-07:00 geert@linux-m68k.org # [PATCH] Atyfb: kill assignment warnings on Atari due to __iomem # # Signed-off-by: Linus Torvalds # # drivers/video/aty/atyfb_base.c # 2004/10/24 03:59:07-07:00 geert@linux-m68k.org +3 -3 # Atyfb: kill assignment warnings on Atari due to __iomem # # ChangeSet # 2004/10/24 21:44:26-07:00 geert@linux-m68k.org # [PATCH] SCx200_ACB depends on PCI # # SCx200_ACB is a PCI driver and thus should depend on PCI # # Signed-off-by: Linus Torvalds # # drivers/i2c/busses/Kconfig # 2004/10/24 03:50:17-07:00 geert@linux-m68k.org +1 -1 # SCx200_ACB depends on PCI # # ChangeSet # 2004/10/24 21:44:14-07:00 geert@linux-m68k.org # [PATCH] Cyclades assignment warning # # Remove unneeded cast that causes a warning (cy_isa_addresses is an array # of unsigned ints). # # Signed-off-by: Linus Torvalds # # drivers/char/cyclades.c # 2004/10/24 03:47:52-07:00 geert@linux-m68k.org +1 -1 # Cyclades assignment warning # # ChangeSet # 2004/10/24 21:44:02-07:00 geert@linux-m68k.org # [PATCH] NTFS: missing #include # # fs/ntfs/compress.c calls v{malloc,free}() without including # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # fs/ntfs/compress.c # 2004/10/24 02:58:41-07:00 geert@linux-m68k.org +1 -0 # NTFS: missing #include # # ChangeSet # 2004/10/24 21:43:49-07:00 bgerst@quark.didntduck.org # [PATCH] mem leak in tty_io.c # # The recent patch to clean up user accesses introduced a memory leak. If # write_buf is reallocated, the old buffer isn't freed. Also, since kfree # can take nulls, I removed the if from the other kfree. # # Signed-off-by: Linus Torvalds # # drivers/char/tty_io.c # 2004/10/22 07:36:11-07:00 bgerst@quark.didntduck.org +2 -2 # mem leak in tty_io.c # # ChangeSet # 2004/10/24 21:09:41-07:00 benh@kernel.crashing.org # [PATCH] ppc64: remove unused cruft from prom.h # # This patch removes some bogus struct definitions from prom.h that aren't # used anymore after the other pending ppc64 patches have been applied. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/prom.h # 2004/10/24 18:55:43-07:00 benh@kernel.crashing.org +0 -27 # ppc64: remove unused cruft from prom.h # # ChangeSet # 2004/10/24 21:09:28-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Some cleanups of prom_init.c # # This patch does a few cleanups of arch/ppc64/kernel/prom_init.c, making # the RTAS instanciation code more readable & more robust, fixing a bug # in the code bringing in additional CPUs (would work with IBM firmware, # but not with another firmware of an upcoming platform), plus remove some # old commented out cruft left-over from the big cleanup. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/prom_init.c # 2004/10/24 18:51:05-07:00 benh@kernel.crashing.org +41 -38 # ppc64: Some cleanups of prom_init.c # # ChangeSet # 2004/10/24 21:09:16-07:00 benh@kernel.crashing.org # [PATCH] ppc64: cleanup/split SMP code # # Splits arch/ppc64/kernel/smp.c into 3 different files, smp.c, pSeries_smp.c and # iSeries_smp.c, thus removing most of the #define mess in those files and making # it easier to add a new platform. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/smp.h # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +9 -3 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/pSeries_smp.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +393 -0 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/iSeries_smp.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +151 -0 # ppc64: cleanup/split SMP code # # include/asm-ppc64/machdep.h # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +2 -0 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/smp.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +16 -452 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/setup.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +7 -0 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/pmac_smp.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +19 -13 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/pSeries_smp.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/pSeries_smp.c # # arch/ppc64/kernel/pSeries_setup.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +15 -0 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/iSeries_smp.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/iSeries_smp.c # # arch/ppc64/kernel/Makefile # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +2 -0 # ppc64: cleanup/split SMP code # # ChangeSet # 2004/10/24 21:09:03-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Rework PCI <-> OF node matching # # This patch reworks the code that deals with matching PCI devices # with Open Firmware device nodes. This code made several incorrect # assumptions and can be simplified significantly. The main functional # difference now is that PHBs are no longer special cased, but that # shouldn't cause any specific problem. # # It also fixes a problem where u3_iommu.c wouldn't work for PCI # devices that lacked a matching OF device node. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/u3_iommu.c # 2004/10/24 18:12:22-07:00 benh@kernel.crashing.org +6 -0 # ppc64: Rework PCI <-> OF node matching # # arch/ppc64/kernel/pci_dn.c # 2004/10/24 18:15:30-07:00 benh@kernel.crashing.org +34 -53 # ppc64: Rework PCI <-> OF node matching # # ChangeSet # 2004/10/24 21:08:51-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Some small pci fixes # # This patch fixes a few issues in the ppc64 pci code, notably some # incorrect parsing of Open Firmware "ranges" when setting up host # bridge resources that would cause a problem with some future # platforms, a default mapping of the ISA IOs if the OF "isa" node # lacks a "ranges" property, and a safeguard in pci_scan_all_fns() # in case a pci<->OF node mapping cannot be established. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pci.c # 2004/10/24 18:04:50-07:00 benh@kernel.crashing.org +9 -5 # ppc64: Some small pci fixes # # ChangeSet # 2004/10/24 21:08:39-07:00 benh@kernel.crashing.org # [PATCH] ppc64: cleanups of ppc64 pci.c # # This patch applies on top of previously posted "ppc64: Move PCI IO mapping # from pSeries_pci.c to pci.c". # # It does cosmetic cleanups & add some debug macros to pci.c without actually # changing any functionality. Further patches against ppc64 pci.c that I'll # post will be against a file already patched with this one. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pci.c # 2004/10/24 17:36:51-07:00 benh@kernel.crashing.org +31 -19 # ppc64: cleanups of ppc64 pci.c # # ChangeSet # 2004/10/24 21:08:24-07:00 benh@kernel.crashing.org # [PATCH] ppc64: clean up existence-check of legacy ISAdevices # # My previous patch exposed the internals of the ppc_md. data structure # to drivers, which wasn't nice, this new patch cleans that up. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/machdep.h # 2004/10/23 00:41:21-07:00 benh@kernel.crashing.org +3 -0 # ppc64: clean up existence-check of legacy ISAdevices # # include/asm-ppc64/io.h # 2004/10/23 00:37:07-07:00 benh@kernel.crashing.org +5 -1 # ppc64: clean up existence-check of legacy ISAdevices # # include/asm-ppc64/floppy.h # 2004/10/22 20:22:20-07:00 benh@kernel.crashing.org +1 -0 # ppc64: clean up existence-check of legacy ISAdevices # # drivers/input/serio/i8042-io.h # 2004/10/23 00:00:53-07:00 benh@kernel.crashing.org +9 -2 # ppc64: clean up existence-check of legacy ISAdevices # # drivers/block/floppy.c # 2004/10/23 00:04:20-07:00 benh@kernel.crashing.org +7 -0 # ppc64: clean up existence-check of legacy ISAdevices # # arch/ppc64/kernel/setup.c # 2004/10/23 00:09:58-07:00 benh@kernel.crashing.org +8 -0 # ppc64: clean up existence-check of legacy ISAdevices # # arch/ppc64/kernel/pmac_setup.c # 2004/10/22 20:22:20-07:00 benh@kernel.crashing.org +10 -0 # ppc64: clean up existence-check of legacy ISAdevices # # arch/ppc64/kernel/pSeries_setup.c # 2004/10/22 20:22:20-07:00 benh@kernel.crashing.org +26 -0 # ppc64: clean up existence-check of legacy ISAdevices # # arch/ppc64/kernel/pSeries_pci.c # 2004/10/22 20:22:20-07:00 benh@kernel.crashing.org +0 -13 # ppc64: clean up existence-check of legacy ISAdevices # # ChangeSet # 2004/10/24 21:08:12-07:00 benh@kernel.crashing.org # [PATCH] ppc64: properly build list of legacy serial ports from OF # # This patch adds a ppc64 implementation of the routine providing # the list of default 8250 serial ports. It provides a empty list # by default unless the platform code fills it, and it provides # a generic function for user by Open Firmware based machines which # fills the list based on serial ports found in the OF device-tree. # # It depends on the previous patch adding the generic support for # this to the 8250 driver. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/udbg.h # 2004/10/22 18:43:59-07:00 benh@kernel.crashing.org +1 -1 # ppc64: properly build list of legacy serial ports from OF # # include/asm-ppc64/serial.h # 2004/10/22 18:43:59-07:00 benh@kernel.crashing.org +6 -106 # ppc64: properly build list of legacy serial ports from OF # # arch/ppc64/kernel/udbg.c # 2004/10/22 18:43:59-07:00 benh@kernel.crashing.org +15 -2 # ppc64: properly build list of legacy serial ports from OF # # arch/ppc64/kernel/setup.c # 2004/10/22 19:30:58-07:00 benh@kernel.crashing.org +182 -0 # ppc64: properly build list of legacy serial ports from OF # # arch/ppc64/kernel/pSeries_setup.c # 2004/10/22 18:43:59-07:00 benh@kernel.crashing.org +5 -71 # ppc64: properly build list of legacy serial ports from OF # # ChangeSet # 2004/10/24 21:08:00-07:00 benh@kernel.crashing.org # [PATCH] 8250: Let arch provide the list of leagacy ports # # This patch adds an optional callback for the 8250 driver to request the # list of legacy port via a function call instead of relying on a #define # of an array. # # This finally allows to fix the problem of platforms like ppc and ppc64 # for which the same kernel can boot machines with and without a 8250, and # is necessary to properly deal with a new platform coming to ppc64 which # has a 8250 but with different irq numbers. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/linux/8250.h # 2004/10/22 16:03:31-07:00 benh@kernel.crashing.org +0 -0 # 8250: Let arch provide the list of leagacy ports # # drivers/serial/serial_cs.c # 2004/10/22 16:06:40-07:00 benh@kernel.crashing.org +1 -2 # 8250: Let arch provide the list of leagacy ports # # drivers/serial/au1x00_uart.c # 2004/10/22 16:06:15-07:00 benh@kernel.crashing.org +1 -1 # 8250: Let arch provide the list of leagacy ports # # drivers/serial/8250_pnp.c # 2004/10/22 16:05:53-07:00 benh@kernel.crashing.org +1 -2 # 8250: Let arch provide the list of leagacy ports # # drivers/serial/8250_pci.c # 2004/10/22 16:33:40-07:00 benh@kernel.crashing.org +2 -2 # 8250: Let arch provide the list of leagacy ports # # drivers/serial/8250.c # 2004/10/22 16:31:26-07:00 benh@kernel.crashing.org +30 -12 # 8250: Let arch provide the list of leagacy ports # # ChangeSet # 2004/10/24 21:03:45-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Rewrite the openpic driver # # This patch replaces the open_pic IRQ controller driver with a new # version rewritten from scratch, called "mpic" (this is the name of # IBM's open_pic implementation and also the only one actually used # on any platform). # # It is smaller, hopefully more readable, supports the various variants # of the cell in a single driver (open_pic_u3.c is gone), and adds # optional support for the workaround of U3 mpic beeing used along with # IO-APICs on HyperTransport (the eval board will uses that, among # others). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/mpic.h # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +267 -0 # # arch/ppc64/kernel/mpic.c # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +859 -0 # # include/asm-ppc64/smp.h # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +4 -0 # ppc64: Rewrite the openpic driver # # include/asm-ppc64/irq.h # 2004/10/22 18:44:19-07:00 benh@kernel.crashing.org +13 -0 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/xics.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +1 -1 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/smp.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +19 -15 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/prom_init.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +0 -1 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/prom.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +4 -4 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/pmac_smp.c # 2004/10/22 18:47:24-07:00 benh@kernel.crashing.org +7 -7 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/pmac_setup.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +23 -48 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/pSeries_setup.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +80 -22 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/pSeries_pci.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +4 -3 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/mpic.h # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/mpic.h # # arch/ppc64/kernel/mpic.c # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/mpic.c # # arch/ppc64/kernel/i8259.h # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +2 -2 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/i8259.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +17 -3 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/Makefile # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +3 -3 # ppc64: Rewrite the openpic driver # # BitKeeper/deleted/.del-open_pic_u3.c~d4b087c3ee7ad834 # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +0 -0 # Delete: arch/ppc64/kernel/open_pic_u3.c # # BitKeeper/deleted/.del-open_pic.h~3394270b8d4236a7 # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +0 -0 # Delete: arch/ppc64/kernel/open_pic.h # # BitKeeper/deleted/.del-open_pic.c~be95ffa1bf03a15a # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +0 -0 # Delete: arch/ppc64/kernel/open_pic.c # # BitKeeper/deleted/.del-open_pic_defs.h~e0e1008090653957 # 2004/10/24 21:03:37-07:00 benh@kernel.crashing.org +0 -0 # Delete: arch/ppc64/kernel/open_pic_defs.h # # ChangeSet # 2004/10/24 21:03:26-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix pSeries secondary CPU setup # # This patch fixes the setup of the secondary CPU(s) on pSeries, # on non-LPAR platforms, especially with 970 CPUs, we need to copy # some of the HID registers from CPU0 to the other ones as soon as # they reach the early asm code. The PowerMac SMP entry did it # already, but not the pSeries one. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/smp.c # 2004/10/19 00:19:36-07:00 benh@kernel.crashing.org +0 -3 # ppc64: Fix pSeries secondary CPU setup # # arch/ppc64/kernel/head.S # 2004/10/19 00:18:43-07:00 benh@kernel.crashing.org +28 -20 # ppc64: Fix pSeries secondary CPU setup # # arch/ppc64/kernel/cpu_setup_power4.S # 2004/10/19 00:37:12-07:00 benh@kernel.crashing.org +9 -0 # ppc64: Fix pSeries secondary CPU setup # # ChangeSet # 2004/10/24 23:42:57-04:00 ambx1@neo.rr.com # [PNPBIOS] acpi compile fix # # Allow PNPBIOS to compile if ACPI support is not enabled. # # Signed-off-by: Adam Belay # # # drivers/pnp/pnpbios/core.c # 2004/10/24 23:30:15-04:00 ambx1@neo.rr.com +2 -0 # [PNPBIOS] acpi compile fix # # ChangeSet # 2004/10/24 23:27:24-04:00 nacc@us.ibm.com # [PNPBIOS] use msleep_interruptible() # # Description: Use msleep_interruptible() instead of # schedule_timeout() to guarantee the task delays as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Adam Belay # # # drivers/pnp/pnpbios/core.c # 2004/09/27 12:52:49-04:00 nacc@us.ibm.com +2 -2 # [PNPBIOS] use msleep_interruptible() # # ChangeSet # 2004/10/24 23:07:32-04:00 ambx1@neo.rr.com # [PNPBIOS] disable if ACPI is active # # As further ACPI pnp functionaility is implemented it is no longer # safe to run ACPI and PNPBIOS concurrently. # # We therefore take the following approach: # - attempt to enable ACPI support # - if ACPI fails (blacklist etc.) enable pnpbios support # - if ACPI support is not compiled in the kernel enable pnpbios support # # Signed-off-by: Adam Belay # # # drivers/pnp/pnpbios/core.c # 2004/10/24 21:58:05-04:00 amb@neo.rr.com +6 -0 # [PNPBIOS] disable if ACPI is active # # ChangeSet # 2004/10/24 17:40:16-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Move PCI IO mapping from pSeries_pci.c to pci.c # # This patch moves some of the routines responsible for dealing # with the mapping of PCI host bridges IO space from pSeries to # the generic ppc64 pci code. PowerMac doesn't use it currently, # but a new platform will soon. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pci-bridge.h # 2004/10/24 17:30:23-07:00 benh@kernel.crashing.org +2 -0 # ppc64: Move PCI IO mapping from pSeries_pci.c to pci.c # # arch/ppc64/kernel/pci.c # 2004/10/24 17:28:50-07:00 benh@kernel.crashing.org +90 -0 # ppc64: Move PCI IO mapping from pSeries_pci.c to pci.c # # arch/ppc64/kernel/pSeries_pci.c # 2004/10/24 17:28:40-07:00 benh@kernel.crashing.org +0 -86 # ppc64: Move PCI IO mapping from pSeries_pci.c to pci.c # # ChangeSet # 2004/10/24 17:36:12-07:00 benh@kernel.crashing.org # [PATCH] Fix msleep to sleep _at_least_ the requested amount # # Makes sure msleep() sleeps at least the amount provided, since # schedule_timeout() doesn't guarantee a full jiffy. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # kernel/timer.c # 2004/10/22 16:16:10-07:00 benh@kernel.crashing.org +2 -2 # Fix msleep to sleep _at_least_ the requested amount # # ChangeSet # 2004/10/24 16:44:07-07:00 torvalds@evo.osdl.org # Fix broken intel8x0.c ALSA "merge" # # The file didn't compile, and the ALSA CVS tree # had dropped the bitfield signedness fixes. # # sound/pci/intel8x0.c # 2004/10/24 16:43:57-07:00 torvalds@evo.osdl.org +12 -11 # Fix broken intel8x0.c ALSA "merge" # # The file didn't compile, and the ALSA CVS tree # had dropped the bitfield signedness fixes. # # ChangeSet # 2004/10/24 16:24:27-07:00 torvalds@ppc970.osdl.org # Un-inline the big kernel lock. # # Now that spinlocks are uninlined, it is silly to keep the # BKL inlined. And this should make it a lot easier for people # to play around with variations on the locking (ie Ingo's # semaphores etc). # # lib/kernel_lock.c # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +102 -0 # # lib/kernel_lock.c # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/lib/kernel_lock.c # # lib/Makefile # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +1 -0 # Un-inline the big kernel lock. # # Now that spinlocks are uninlined, it is silly to keep the # BKL inlined. And this should make it a lot easier for people # to play around with variations on the locking (ie Ingo's # semaphores etc). # # kernel/sched.c # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +0 -15 # Un-inline the big kernel lock. # # Now that spinlocks are uninlined, it is silly to keep the # BKL inlined. And this should make it a lot easier for people # to play around with variations on the locking (ie Ingo's # semaphores etc). # # init/Kconfig # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +5 -0 # Un-inline the big kernel lock. # # Now that spinlocks are uninlined, it is silly to keep the # BKL inlined. And this should make it a lot easier for people # to play around with variations on the locking (ie Ingo's # semaphores etc). # # include/linux/spinlock.h # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +2 -2 # Un-inline the big kernel lock. # # Now that spinlocks are uninlined, it is silly to keep the # BKL inlined. And this should make it a lot easier for people # to play around with variations on the locking (ie Ingo's # semaphores etc). # # include/linux/smp_lock.h # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +16 -42 # Un-inline the big kernel lock. # # Now that spinlocks are uninlined, it is silly to keep the # BKL inlined. And this should make it a lot easier for people # to play around with variations on the locking (ie Ingo's # semaphores etc). # # ChangeSet # 2004/10/25 01:11:17+02:00 pablo@eurodev.net # [NETFILTER]: fix stats in __ip_conntrack_confirm # # net_rx_softirq can preempt the calling process while incrementing the stats. # I think that we can fix this moving both CONNTRACK_STAT_INC to the locked # section. # # Signed-off-by: Pablo Neira Ayuso # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/10/25 01:11:10+02:00 pablo@eurodev.net +3 -2 # [NETFILTER]: fix stats in __ip_conntrack_confirm # # net_rx_softirq can preempt the calling process while incrementing the stats. # I think that we can fix this moving both CONNTRACK_STAT_INC to the locked # section. # # Signed-off-by: Pablo Neira Ayuso # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/25 00:46:55+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Introduce skb_header_pointer() to hbh match # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_hbh.c # 2004/10/25 00:46:48+02:00 yasuyuki.kozakai@toshiba.co.jp +30 -20 # [NETFILTER]: Introduce skb_header_pointer() to hbh match # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/25 00:45:22+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Introduce skb_header_pointer() to dst match # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_dst.c # 2004/10/25 00:45:16+02:00 yasuyuki.kozakai@toshiba.co.jp +30 -20 # [NETFILTER]: Introduce skb_header_pointer() to dst match # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/25 00:43:08+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Fix multiple bugs in hbh match # # This patch fixes the following bugs in ip6t_hbh.c. # - The cast of the pointer to the next IPv6 extension header is wrong. # - hdrlen may underflow. # - (u16)*optdesc causes to alignment problem. # - The calculation of the offset to next option is wrong. In the case # that the type isn't 0, it should be "Opt Data Len" field + 2 # (see RFC2460). # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_hbh.c # 2004/10/25 00:43:01+02:00 yasuyuki.kozakai@toshiba.co.jp +38 -36 # [NETFILTER]: Fix multiple bugs in hbh match # # This patch fixes the following bugs in ip6t_hbh.c. # - The cast of the pointer to the next IPv6 extension header is wrong. # - hdrlen may underflow. # - (u16)*optdesc causes to alignment problem. # - The calculation of the offset to next option is wrong. In the case # that the type isn't 0, it should be "Opt Data Len" field + 2 # (see RFC2460). # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/25 00:39:13+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Fix multiple bugs in dst match # # This patch fixes the following bugs in ip6t_dst.c. # # - ".me = THIS_MODULE" is missing # - The cast of the pointer to the next IPv6 extension header is wrong. # - hdrlen may underflow. # - (u16)*optdesc causes to alignment problem. # - The calculation of the offset to next option is wrong. In the case # that the type isn't 0, it should be "Opt Data Len" field + 2 # (see RFC2460). # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_dst.c # 2004/10/25 00:39:07+02:00 yasuyuki.kozakai@toshiba.co.jp +39 -37 # [NETFILTER]: Fix multiple bugs in dst match # # This patch fixes the following bugs in ip6t_dst.c. # # - ".me = THIS_MODULE" is missing # - The cast of the pointer to the next IPv6 extension header is wrong. # - hdrlen may underflow. # - (u16)*optdesc causes to alignment problem. # - The calculation of the offset to next option is wrong. In the case # that the type isn't 0, it should be "Opt Data Len" field + 2 # (see RFC2460). # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/24 15:20:06-07:00 adaplas@hotpop.com # [PATCH] fbdev: Fix software blanking code # # The code in fbmem.c:fb_blank() is broken. For drivers without an fb_blank # hook, an FBIO_BLANK ioctl will produce wrong colors or will segfault. # # Signed-off-by: Antonino Daplas # Signed-off-by: Linus Torvalds # # drivers/video/fbmem.c # 2004/10/24 14:45:24-07:00 adaplas@hotpop.com +5 -3 # fbdev: Fix software blanking code # # ChangeSet # 2004/10/24 13:34:51-07:00 torvalds@ppc970.osdl.org # Annotate the trivial unconditional lock/unlock functions on SMP. # # This does _not_ handle the conditional ones (lock_kernel and the # trylock variants), so there will be a fair number of context # error warnings with this. However, the warnings are disabled by # default in sparse - you have to use "-Wcontext" to see them. # # include/linux/spinlock.h # 2004/10/24 13:34:44-07:00 torvalds@ppc970.osdl.org +31 -25 # Annotate the trivial unconditional lock/unlock functions on SMP. # # This does _not_ handle the conditional ones (lock_kernel and the # trylock variants), so there will be a fair number of context # error warnings with this. However, the warnings are disabled by # default in sparse - you have to use "-Wcontext" to see them. # # ChangeSet # 2004/10/24 13:33:07-07:00 torvalds@ppc970.osdl.org # Start supporting lock context annotations. # # This just sets up the portability defines. # # include/linux/compiler.h # 2004/10/24 13:33:00-07:00 torvalds@ppc970.osdl.org +8 -0 # Start supporting lock context annotations. # # This just sets up the portability defines. # # ChangeSet # 2004/10/24 12:21:08-07:00 rth@twiddle.net # [PATCH] Add __ioremap # # I hadn't realized this was supposed to be an official interface. # Or maybe it's not, but the fb drivers all use it. Anyway... # # include/asm-alpha/io.h # 2004/10/23 11:04:06-07:00 rth@twiddle.net +6 -0 # Add __ioremap # # ChangeSet # 2004/10/24 12:20:55-07:00 ink@jurassic.park.msu.ru # [PATCH] alpha: bootp fixes # # - redefine "printk" as "srm_printk" for bootstrappers; # - fix stack corruption problem with bootp/bootpz loaders and older # SRM consoles. # # arch/alpha/boot/misc.c # 2004/10/24 11:31:29-07:00 ink@jurassic.park.msu.ru +0 -12 # alpha: bootp fixes # # arch/alpha/boot/head.S # 2004/10/24 11:30:59-07:00 ink@jurassic.park.msu.ru +21 -0 # alpha: bootp fixes # # arch/alpha/boot/bootpz.c # 2004/10/24 11:30:59-07:00 ink@jurassic.park.msu.ru +14 -11 # alpha: bootp fixes # # arch/alpha/boot/bootp.c # 2004/10/24 11:30:59-07:00 ink@jurassic.park.msu.ru +12 -7 # alpha: bootp fixes # # arch/alpha/boot/bootloader.lds # 2004/10/24 11:30:59-07:00 ink@jurassic.park.msu.ru +1 -0 # alpha: bootp fixes # # ChangeSet # 2004/10/24 12:20:41-07:00 ink@jurassic.park.msu.ru # [PATCH] alpha: fix CIA IO # # The high order bits of the input address should be cleared only after # IO type and base are determined. # # include/asm-alpha/core_cia.h # 2004/10/24 09:52:42-07:00 ink@jurassic.park.msu.ru +6 -6 # alpha: fix CIA IO # # ChangeSet # 2004/10/24 12:20:28-07:00 ink@jurassic.park.msu.ru # [PATCH] alpha: fix sparse warnings # # - add missing "__user" annotations in csum_partial_copy.c; # - make io_remap_page_range more readable and fix a warning. # # include/asm-alpha/pgtable.h # 2004/10/24 11:10:55-07:00 ink@jurassic.park.msu.ru +6 -2 # alpha: fix sparse warnings # # arch/alpha/lib/csum_partial_copy.c # 2004/10/24 10:25:20-07:00 ink@jurassic.park.msu.ru +4 -2 # alpha: fix sparse warnings # # ChangeSet # 2004/10/24 15:34:10+01:00 arjan@nl.rmk.(none) # [SERIAL] Remove dead code. # # serial8250_get_irq_map is no longer used anywhere in the kernel (it # used to be used by the isapnp code but isn't anymore) so it's dead # code, below is a patch to remove this. # # drivers/serial/au1x00_uart.c # 2004/10/24 15:31:17+01:00 arjan@nl.rmk.(none) +0 -15 # [PATCH] Remove dead code. # # drivers/serial/8250.h # 2004/10/24 15:31:17+01:00 arjan@nl.rmk.(none) +0 -1 # [PATCH] Remove dead code. # # drivers/serial/8250.c # 2004/10/24 15:31:17+01:00 arjan@nl.rmk.(none) +0 -15 # [PATCH] Remove dead code. # # ChangeSet # 2004/10/24 16:16:40+02:00 tgraf@suug.ch # [NETFILTER]: Fix warning in CONNMARK # # Signed-off-by: Thomas Graf # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ipt_CONNMARK.c # 2004/10/24 16:16:34+02:00 tgraf@suug.ch +1 -1 # [NETFILTER]: Fix warning in CONNMARK # # Signed-off-by: Thomas Graf # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/24 16:11:28+02:00 kaber@coreworks.de # Merge coreworks.de:/home/kaber/src/bk-repos/net-2.6 # into coreworks.de:/home/kaber/src/nf/nf-2.6 # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/10/24 16:11:24+02:00 kaber@coreworks.de +0 -0 # Auto merged # # ChangeSet # 2004/10/24 00:43:42+01:00 rmk@flint.arm.linux.org.uk # [ARM] Fix missing parens for __FD_* operations. # # fork.c highlighted that we were missing some parens. Add them. # # include/asm-arm/posix_types.h # 2004/10/24 00:41:22+01:00 rmk@flint.arm.linux.org.uk +4 -4 # Add parens around use of fd and fdsetp # # ChangeSet # 2004/10/23 23:19:19+02:00 bzolnier@trik.(none) # [ide] slc90e66: kill /proc/ide/slc90e66 # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/slc90e66.c # 2004/10/23 23:18:50+02:00 bzolnier@trik.(none) +1 -110 # [ide] slc90e66: kill /proc/ide/slc90e66 # # ChangeSet # 2004/10/23 23:16:57+02:00 bzolnier@trik.(none) # [ide] serverworks: kill /proc/ide/svwks # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/serverworks.h # 2004/10/23 23:16:37+02:00 bzolnier@trik.(none) +0 -2 # [ide] serverworks: kill /proc/ide/svwks # # drivers/ide/pci/serverworks.c # 2004/10/23 23:16:37+02:00 bzolnier@trik.(none) +0 -168 # [ide] serverworks: kill /proc/ide/svwks # # ChangeSet # 2004/10/23 23:13:46+02:00 bzolnier@trik.(none) # [ide] sc1200: kill /proc/ide/sc1200 # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/sc1200.c # 2004/10/23 23:13:25+02:00 bzolnier@trik.(none) +0 -65 # [ide] sc1200: kill /proc/ide/sc1200 # # ChangeSet # 2004/10/23 23:08:13+02:00 bzolnier@trik.(none) # [ide] piix: kill /proc/ide/piix # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/piix.h # 2004/10/23 23:07:58+02:00 bzolnier@trik.(none) +0 -4 # [ide] piix: kill /proc/ide/piix # # drivers/ide/pci/piix.c # 2004/10/23 23:07:58+02:00 bzolnier@trik.(none) +0 -167 # [ide] piix: kill /proc/ide/piix # # ChangeSet # 2004/10/23 23:05:06+02:00 bzolnier@trik.(none) # [ide] pdc202xx_old: kill /proc/ide/pdc202xx # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/pdc202xx_old.h # 2004/10/23 23:04:45+02:00 bzolnier@trik.(none) +0 -37 # [ide] pdc202xx_old: kill /proc/ide/pdc202xx # # drivers/ide/pci/pdc202xx_old.c # 2004/10/23 23:04:45+02:00 bzolnier@trik.(none) +3 -127 # [ide] pdc202xx_old: kill /proc/ide/pdc202xx # # ChangeSet # 2004/10/23 22:56:34+02:00 bzolnier@trik.(none) # [ide] pdc202xx_new: kill /proc/ide/pdcnew # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/pdc202xx_new.h # 2004/10/23 22:56:18+02:00 bzolnier@trik.(none) +0 -2 # [ide] pdc202xx_new: kill /proc/ide/pdcnew # # drivers/ide/pci/pdc202xx_new.c # 2004/10/23 22:56:18+02:00 bzolnier@trik.(none) +0 -64 # [ide] pdc202xx_new: kill /proc/ide/pdcnew # # ChangeSet # 2004/10/23 22:54:07+02:00 bzolnier@trik.(none) # [ide] hpt366: kill /proc/ide/hpt366 # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/hpt366.h # 2004/10/23 22:53:46+02:00 bzolnier@trik.(none) +0 -2 # [ide] hpt366: kill /proc/ide/hpt366 # # drivers/ide/pci/hpt366.c # 2004/10/23 22:53:46+02:00 bzolnier@trik.(none) +1 -71 # [ide] hpt366: kill /proc/ide/hpt366 # # ChangeSet # 2004/10/23 22:51:31+02:00 bzolnier@trik.(none) # [ide] cs5530: kill /proc/ide/cs5530 # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/cs5530.c # 2004/10/23 22:51:16+02:00 bzolnier@trik.(none) +0 -58 # [ide] cs5530: kill /proc/ide/cs5530 # # ChangeSet # 2004/10/23 22:49:23+02:00 bzolnier@trik.(none) # [ide] cs5520: kill /proc/ide/cs5520 # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/cs5520.c # 2004/10/23 22:48:59+02:00 bzolnier@trik.(none) +5 -69 # [ide] cs5520: kill /proc/ide/cs5520 # # ChangeSet # 2004/10/23 22:46:33+02:00 bzolnier@trik.(none) # [ide] atiixp: kill /proc/ide/atiixp # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/atiixp.c # 2004/10/23 22:46:12+02:00 bzolnier@trik.(none) +0 -118 # [ide] atiixp: kill /proc/ide/atiixp # # ChangeSet # 2004/10/23 22:43:33+02:00 bzolnier@trik.(none) # [ide] aec62xx: kill /proc/ide/aec62xx # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/aec62xx.h # 2004/10/23 22:43:19+02:00 bzolnier@trik.(none) +0 -2 # [ide] aec62xx: kill /proc/ide/aec62xx # # drivers/ide/pci/aec62xx.c # 2004/10/23 22:43:19+02:00 bzolnier@trik.(none) +2 -108 # [ide] aec62xx: kill /proc/ide/aec62xx # # ChangeSet # 2004/10/23 13:37:09-04:00 len.brown@intel.com # [ACPI] ibm-acpi 0.7 from Borislav Deianov # # The CMOS handle was incorrectly marked as required, breaking insmod # on models without one; # # The BLED method was incorrectly required if LED is not defined, # breaking LED control on the A21e. # # Signed-off-by: Len Brown # # drivers/acpi/ibm_acpi.c # 2004/10/23 03:43:34-04:00 len.brown@intel.com +20 -17 # Import patch ibm-acpi-0.7.patch # # Documentation/ibm-acpi.txt # 2004/10/23 03:43:48-04:00 len.brown@intel.com +4 -4 # Import patch ibm-acpi-0.7.patch # # ChangeSet # 2004/10/23 10:07:23-07:00 roland@redhat.com # [PATCH] fix core-dump return code # # While looking at the signal.c coredumping BUG_ON race, I noticed a bug # (not directly related) in do_coredump. It was setting the "core dumped" # flag even when the format dumping hook failed (e.g. for memory # allocation failures). # # Signed-off-by: Linus Torvalds # # fs/exec.c # 2004/10/22 21:23:42-07:00 roland@redhat.com +2 -1 # fix core-dump return code # # ChangeSet # 2004/10/23 10:07:11-07:00 roland@redhat.com # [PATCH] Fix ptrace problem # # This is indeed a new bug, and it is not architecture-specific. In my # recent changes to close some race conditions, I overlooked the case of a # process using PTRACE_ATTACH on its own children. The new PT_ATTACHED flag # does not really mean "PTRACE_ATTACH was used", it means "PTRACE_ATTACH is # changing the ->parent link". # # This fixes the problem that Stephane Eranian program demonstrates. # # Signed-off-by: Roland McGrath # Signed-off-by: Linus Torvalds # # kernel/ptrace.c # 2004/10/22 21:43:20-07:00 roland@redhat.com +2 -1 # Fix ptrace problem # # ChangeSet # 2004/10/23 10:06:59-07:00 roland@redhat.com # [PATCH] Invalid BUG_ONs in signal.c # # Oh, duh. The race is obvious. Sorry for the confusion there. # # The BUG_ON's were useful for debugging, since they trigger on a lot of # errors, but they _also_ trigger on some unlikely (but valid) races. # # So just remove them - just fall through to the regular exit code after # core-dumping (which does everything right). # # Signed-off-by: Linus Torvalds # # kernel/signal.c # 2004/10/22 21:23:31-07:00 roland@redhat.com +8 -14 # Invalid BUG_ONs in signal.c # # ChangeSet # 2004/10/23 19:01:21+02:00 perex@suse.cz # [ALSA] boot_devs removal - module_param_array() accepts NULL now # # Intel8x0 driver,RME96 driver,ICE1724 driver,NM256 driver # # # Signed-off-by: Jaroslav Kysela # # sound/pci/rme96.c # 2004/10/23 11:12:56+02:00 perex@suse.cz +3 -4 # [ALSA] boot_devs removal - module_param_array() accepts NULL now # # D:2004/10/23 17:12:56 # C:Intel8x0 driver,RME96 driver,ICE1724 driver,NM256 driver # F:pci/intel8x0.c:1.173->1.174 # F:pci/rme96.c:1.45->1.46 # F:pci/ice1712/ice1724.c:1.46->1.47 # F:pci/nm256/nm256.c:1.53->1.54 # L: # Signed-off-by: Jaroslav Kysela # # sound/pci/nm256/nm256.c # 2004/10/23 11:12:56+02:00 perex@suse.cz +1 -2 # [ALSA] boot_devs removal - module_param_array() accepts NULL now # # D:2004/10/23 17:12:56 # C:Intel8x0 driver,RME96 driver,ICE1724 driver,NM256 driver # F:pci/intel8x0.c:1.173->1.174 # F:pci/rme96.c:1.45->1.46 # F:pci/ice1712/ice1724.c:1.46->1.47 # F:pci/nm256/nm256.c:1.53->1.54 # L: # Signed-off-by: Jaroslav Kysela # # sound/pci/intel8x0.c # 2004/10/23 11:12:56+02:00 perex@suse.cz +1 -2 # [ALSA] boot_devs removal - module_param_array() accepts NULL now # # D:2004/10/23 17:12:56 # C:Intel8x0 driver,RME96 driver,ICE1724 driver,NM256 driver # F:pci/intel8x0.c:1.173->1.174 # F:pci/rme96.c:1.45->1.46 # F:pci/ice1712/ice1724.c:1.46->1.47 # F:pci/nm256/nm256.c:1.53->1.54 # L: # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/ice1724.c # 2004/10/23 11:12:56+02:00 perex@suse.cz +4 -5 # [ALSA] boot_devs removal - module_param_array() accepts NULL now # # D:2004/10/23 17:12:56 # C:Intel8x0 driver,RME96 driver,ICE1724 driver,NM256 driver # F:pci/intel8x0.c:1.173->1.174 # F:pci/rme96.c:1.45->1.46 # F:pci/ice1712/ice1724.c:1.46->1.47 # F:pci/nm256/nm256.c:1.53->1.54 # L: # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/10/23 09:49:57-07:00 chrisw@osdl.org # [PATCH] delay rq_lock acquisition in setscheduler # # Doing access control checks with rq_lock held can cause deadlock when # audit messages are created (via printk or audit infrastructure) which # trigger a wakeup and deadlock, as noted by both SELinux and SubDomain # folks. This patch will let the security checks happen w/out lock held, # then re-sample the p->policy in case it was raced. # # Originally from John Johansen , reworked by me. # AFAIK, this version drew no objections from Ingo or Andrea. # # From: John Johansen # Acked-by: Ingo Molnar # Signed-off-by: Chris Wright # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/10/21 09:41:23-07:00 chrisw@osdl.org +17 -16 # delay rq_lock acquisition in setscheduler # # ChangeSet # 2004/10/23 10:31:03+02:00 perex@suse.cz # Merge # # sound/pci/nm256/nm256.c # 2004/10/23 10:30:38+02:00 perex@suse.cz +1 -0 # SCCS merged # # sound/pci/intel8x0.c # 2004/10/23 10:29:06+02:00 perex@suse.cz +5 -2 # SCCS merged # # sound/parisc/harmony.c # 2004/10/23 10:26:42+02:00 perex@suse.cz +0 -9 # SCCS merged # # sound/parisc/Kconfig # 2004/10/23 10:26:24+02:00 perex@suse.cz +0 -3 # SCCS merged # # ChangeSet # 2004/10/23 02:16:04-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-latest-dominik # into intel.com:/home/lenb/src/26-latest-dev # # drivers/acpi/processor.c # 2004/10/23 02:16:00-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c # 2004/10/23 02:16:00-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/cpu/cpufreq/powernow-k8.c # 2004/10/23 02:16:00-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/23 02:13:06-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # include/acpi/acpiosxf.h # 2004/10/23 02:13:02-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/thermal.c # 2004/10/23 02:13:02-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/osl.c # 2004/10/23 02:13:02-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/mach-es7000/es7000plat.c # 2004/10/23 02:13:02-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/mpparse.c # 2004/10/23 02:13:02-04:00 len.brown@intel.com +0 -0 # Auto merged # # sound/usb/usx2y/usbusx2y.c # 2004/10/23 07:45:34+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/usb/usbaudio.c # 2004/10/23 07:45:34+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/rme9652/rme9652.c # 2004/10/23 07:45:33+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/rme9652/hdsp.c # 2004/10/23 07:45:33+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/mixart/mixart.c # 2004/10/23 07:45:33+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/korg1212/korg1212.c # 2004/10/23 07:45:32+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/ice1712/ice1724.c # 2004/10/23 07:45:32+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/ice1712/ice1712.c # 2004/10/23 07:45:32+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/via82xx.c # 2004/10/23 07:45:31+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/rme96.c # 2004/10/23 07:45:31+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/au88x0/au88x0.c # 2004/10/23 07:45:31+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/rme32.c # 2004/10/23 07:45:30+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/intel8x0m.c # 2004/10/23 07:45:30+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/es1968.c # 2004/10/23 07:45:29+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/ens1370.c # 2004/10/23 07:45:29+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/cs4281.c # 2004/10/23 07:45:28+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/bt87x.c # 2004/10/23 07:45:28+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/atiixp_modem.c # 2004/10/23 07:45:28+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/atiixp.c # 2004/10/23 07:45:28+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/isa/es18xx.c # 2004/10/23 07:45:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/drivers/dummy.c # 2004/10/23 07:45:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/seq/seq.c # 2004/10/23 07:45:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/oss/pcm_oss.c # 2004/10/23 07:45:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/memalloc.c # 2004/10/23 07:45:27+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/10/23 01:21:11-04:00 len.brown@intel.com # Cset exclude: jason.davis@unisys.com[torvalds]|ChangeSet|20040914144015|50315 # # arch/i386/mach-es7000/es7000.h # 2004/10/23 01:20:53-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/i386/mach-es7000/es7000plat.c # 2004/10/23 01:20:52-04:00 len.brown@intel.com +0 -0 # Exclude # # ChangeSet # 2004/10/22 23:44:20-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-acpica # into intel.com:/home/lenb/src/26-stable-dev # # drivers/acpi/osl.c # 2004/10/22 23:44:17-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/22 23:12:41-04:00 len.brown@intel.com # [ACPI] fix build warning # # drivers/acpi/executer/exstore.c # 2004/10/22 23:12:35-04:00 len.brown@intel.com +1 -1 # build warning # # ChangeSet # 2004/10/22 22:56:02-04:00 len.brown@intel.com # [ACPI] ACPICA 20041015 from Bob Moore # # Signed-off-by: Len Brown # # Note: ACPI CA is currently undergoing an in-depth and # complete formal evaluation to test/verify the following # areas. Other suggestions are welcome. This will result in # an increase in the frequency of releases and the number # of bug fixes in the next few months. # # - Functional tests for all ASL/AML operators # - All implicit/explicit type conversions # - Bit fields and operation regions # - 64-bit math support and 32-bit-only "truncated" math support # - Exceptional conditions, both compiler and interpreter # - Dynamic object deletion and memory leaks # - ACPI 3.0 support when implemented # - External interfaces to the ACPI subsystem # # Fixed two alignment issues on 64-bit platforms - # within debug statements in acpi_ev_gpe_detect and # acpi_ev_create_gpe_block. Removed references to the # Address field within the non-aligned ACPI generic address # structure. # # Fixed a problem in the Increment and Decrement operators # where incorrect operand resolution could result in the # inadvertent modification of the original integer when the # integer is passed into another method as an argument and # the arg is then incremented/decremented. # # Fixed a problem in the FromBCD operator where the upper # 32-bits of a 64-bit BCD number were truncated during # conversion. # # Fixed a problem in the ToDecimal operator where the length # of the resulting string could be set incorrectly too long # if the input operand was a Buffer object. # # Fixed a problem in the Logical operators (LLess, # etc.) where a NULL byte (0) within a buffer would # prematurely terminate a compare between buffer objects. # # Added a check for string overflow (>200 characters as per # the ACPI specification) during the Concatenate operator # with two string operands. # # include/acpi/platform/acenv.h # 2004/10/22 22:22:10-04:00 len.brown@intel.com +2 -0 # ACPICA 20041015 # # include/acpi/acutils.h # 2004/10/22 22:22:09-04:00 len.brown@intel.com +6 -0 # ACPICA 20041015 # # include/acpi/acconfig.h # 2004/10/22 22:22:10-04:00 len.brown@intel.com +1 -1 # ACPICA 20041015 # # drivers/acpi/utilities/utobject.c # 2004/10/22 22:22:15-04:00 len.brown@intel.com +15 -17 # ACPICA 20041015 # # drivers/acpi/parser/psopcode.c # 2004/10/22 22:22:14-04:00 len.brown@intel.com +1 -1 # ACPICA 20041015 # # drivers/acpi/hardware/hwregs.c # 2004/10/22 22:22:14-04:00 len.brown@intel.com +2 -2 # ACPICA 20041015 # # drivers/acpi/executer/exstore.c # 2004/10/22 22:22:15-04:00 len.brown@intel.com +11 -2 # ACPICA 20041015 # # drivers/acpi/executer/exresop.c # 2004/10/22 22:22:15-04:00 len.brown@intel.com +4 -3 # ACPICA 20041015 # # drivers/acpi/executer/exoparg2.c # 2004/10/22 22:22:15-04:00 len.brown@intel.com +2 -2 # ACPICA 20041015 # # drivers/acpi/executer/exoparg1.c # 2004/10/22 22:22:15-04:00 len.brown@intel.com +59 -29 # ACPICA 20041015 # # drivers/acpi/executer/exmisc.c # 2004/10/22 22:22:15-04:00 len.brown@intel.com +12 -5 # ACPICA 20041015 # # drivers/acpi/executer/exconvrt.c # 2004/10/22 22:22:15-04:00 len.brown@intel.com +7 -3 # ACPICA 20041015 # # drivers/acpi/events/evgpeblk.c # 2004/10/22 22:22:14-04:00 len.brown@intel.com +1 -3 # ACPICA 20041015 # # drivers/acpi/events/evgpe.c # 2004/10/22 22:22:14-04:00 len.brown@intel.com +2 -7 # ACPICA 20041015 # # drivers/acpi/dispatcher/dsutils.c # 2004/10/22 22:22:15-04:00 len.brown@intel.com +1 -1 # ACPICA 20041015 # # drivers/acpi/dispatcher/dsmthdat.c # 2004/10/22 22:22:15-04:00 len.brown@intel.com +2 -2 # ACPICA 20041015 # # ChangeSet # 2004/10/22 22:55:32-04:00 len.brown@intel.com # [ACPI] fix build warning in tables/tbget.c # # drivers/acpi/tables/tbget.c # 2004/10/22 22:55:25-04:00 len.brown@intel.com +1 -1 # fix build warning # # ChangeSet # 2004/10/22 22:10:26-04:00 len.brown@intel.com # [ACPI] ACPICA 20041006 from Bob Moore # # Signed-off-by: Len Brown # # Implemented support for the ACPI 3.0 Timer operator. This # ASL function implements a 64-bit timer with 100 nanosecond # granularity. # # Defined a new OSL interface, acpi_os_get_timer. This # interface is used to implement the ACPI 3.0 Timer # operator. This allows the host OS to implement the timer # with the best clock available. Also, it keeps the core # subsystem out of the clock handling business, since the # host OS (usually) performs this function. # # Fixed an alignment issue on 64-bit platforms. The # hw_low_level_read/write() functions use a 64-bit address # which is part of the packed ACPI Generic Address # Structure. Since the structure is non-aligned, the # alignment macros are now used to extract the address to # a local variable before use. # # Fixed a problem where the ToInteger operator assumed all # input strings were hexadecimal. The operator now handles # both decimal strings and hex strings (prefixed with "0x"). # # Fixed a problem where the string length in the string # object created as a result of the internal ConvertToString # procedure could be incorrect. This potentially affected # all implicit conversions and also the ToDecimalString and # ToHexString operators. # # Fixed two problems in the ToString operator. If the # length parameter was zero, an incorrect string object was # created and the value of the input length parameter was # inadvertently changed from zero to Ones. # # Fixed a problem where the optional ResourceSource string # in the ExtendedIRQ resource macro was ignored. # # Simplified the interfaces to the internal division # functions, reducing code size and complexity. # # include/acpi/acutils.h # 2004/10/22 22:09:21-04:00 len.brown@intel.com +7 -3 # ACPICA 20041015 # # include/acpi/actypes.h # 2004/10/22 22:09:21-04:00 len.brown@intel.com +5 -1 # ACPICA 20041015 # # include/acpi/acinterp.h # 2004/10/22 22:09:21-04:00 len.brown@intel.com +4 -6 # ACPICA 20041015 # # include/acpi/acconfig.h # 2004/10/22 22:09:22-04:00 len.brown@intel.com +1 -1 # ACPICA 20041015 # # drivers/acpi/utilities/utmisc.c # 2004/10/22 22:09:29-04:00 len.brown@intel.com +41 -61 # ACPICA 20041015 # # drivers/acpi/utilities/utmath.c # 2004/10/22 22:09:29-04:00 len.brown@intel.com +22 -21 # ACPICA 20041015 # # drivers/acpi/utilities/utdelete.c # 2004/10/22 22:09:29-04:00 len.brown@intel.com +7 -2 # ACPICA 20041015 # # drivers/acpi/resources/rscalc.c # 2004/10/22 22:09:28-04:00 len.brown@intel.com +47 -65 # ACPICA 20041015 # # drivers/acpi/parser/psutils.c # 2004/10/22 22:09:28-04:00 len.brown@intel.com +10 -15 # ACPICA 20041015 # # drivers/acpi/hardware/hwtimer.c # 2004/10/22 22:09:28-04:00 len.brown@intel.com +8 -11 # ACPICA 20041015 # # drivers/acpi/hardware/hwregs.c # 2004/10/22 22:09:28-04:00 len.brown@intel.com +24 -10 # ACPICA 20041015 # # drivers/acpi/executer/exutils.c # 2004/10/22 22:09:28-04:00 len.brown@intel.com +8 -10 # ACPICA 20041015 # # drivers/acpi/executer/exresop.c # 2004/10/22 22:09:28-04:00 len.brown@intel.com +4 -7 # ACPICA 20041015 # # drivers/acpi/executer/exregion.c # 2004/10/22 22:09:28-04:00 len.brown@intel.com +1 -1 # ACPICA 20041015 # # drivers/acpi/executer/exoparg2.c # 2004/10/22 22:09:28-04:00 len.brown@intel.com +29 -22 # ACPICA 20041015 # # drivers/acpi/executer/exoparg1.c # 2004/10/22 22:09:28-04:00 len.brown@intel.com +8 -9 # ACPICA 20041015 # # drivers/acpi/executer/exmisc.c # 2004/10/22 22:09:29-04:00 len.brown@intel.com +6 -8 # ACPICA 20041015 # # drivers/acpi/executer/exconvrt.c # 2004/10/22 22:09:29-04:00 len.brown@intel.com +18 -53 # ACPICA 20041015 # # drivers/acpi/dispatcher/dswexec.c # 2004/10/22 22:09:28-04:00 len.brown@intel.com +3 -1 # ACPICA 20041015 # # ChangeSet # 2004/10/22 22:00:01-04:00 len.brown@intel.com # [ACPI] place-holder for ACPI 3.0 acpi_os_get_timer() # # drivers/acpi/osl.c # 2004/10/22 21:59:54-04:00 len.brown@intel.com +23 -0 # acpi_os_get_timer place-holder # # ChangeSet # 2004/10/22 18:04:49-07:00 david-b@pacbell.net # [PATCH] Missed usb devices on boot # # This marks sets change_bits to all ones when bringing up a hub, since # not all hubs seem to send change events for devices that were plugged in # when the hub was reset. # # David Miller confirms this fixes his boot-time lost keyboard/mouse # problem # # drivers/usb/core/hub.c # 2004/10/22 01:56:46-07:00 david-b@pacbell.net +1 -0 # Missed usb devices on boot # # ChangeSet # 2004/10/22 16:07:33-07:00 davem@nuts.davemloft.net # [ATY]: Fix build on sparc after viro sparse changes. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/22 16:07:19-07:00 greg@kroah.com # Merge kroah.com:/home/greg/linux/BK/bleed-2.6 # into kroah.com:/home/greg/linux/BK/usb-2.6 # # drivers/usb/serial/console.c # 2004/10/22 16:07:14-07:00 greg@kroah.com +0 -2 # Auto merged # # drivers/video/aty/atyfb_base.c # 2004/10/22 16:07:03-07:00 davem@nuts.davemloft.net +4 -2 # [ATY]: Fix build on sparc after viro sparse changes. # # ChangeSet # 2004/10/22 15:54:52-07:00 david-b@pacbell.net # [PATCH] USB ehci: minor debug cleanups # # This updates debug messages, declaring that labels can be constant strings # and changing some old-school dbg() calls to driver model dev_dbg(). # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ehci-sched.c # 2004/10/22 08:03:19-07:00 david-b@pacbell.net +7 -6 # USB ehci: minor debug cleanups # # drivers/usb/host/ehci-dbg.c # 2004/10/21 09:19:33-07:00 david-b@pacbell.net +9 -8 # USB ehci: minor debug cleanups # # ChangeSet # 2004/10/22 15:54:23-07:00 david-b@pacbell.net # [PATCH] USB ehci: handle earlier endpoint_disable() # # The recent patch to scrub out ep0 state earlier (to get rid of some of # the enumeration problems that started with about 2.6.6) requires EHCI # to handle endpoint_disable() calls in a slightly different context. # # This makes those calls work when an endpoint's QH may still be on the # async schedule, rather than already unlinked. (The QH stays on the async # schedule for a few milliseconds after it's empty, since it's routine to # issue another request almost immediately.) # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ehci-hcd.c # 2004/10/22 14:11:55-07:00 david-b@pacbell.net +37 -23 # USB ehci: handle earlier endpoint_disable() # # ChangeSet # 2004/10/22 15:53:58-07:00 david-b@pacbell.net # [PATCH] USB ehci: minor pci tweaks # # This has minor PCI tweaks for the EHCI driver: # # - If the (nonfunctional) AMD 8111 controller shows up, ignore it. # (Patch from Matt Dharm, with minor coding style tweaks). # # - Delete some code that interprets an EHCI capability code; it # should be a PCI capability instead. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ehci-hcd.c # 2004/10/22 14:11:55-07:00 david-b@pacbell.net +11 -6 # USB ehci: minor pci tweaks # # ChangeSet # 2004/10/22 15:43:17-07:00 greg@kroah.com # hotplug: prevent skips in sequence number from happening # # Signed-off-by: Greg Kroah-Hartman # # lib/kobject_uevent.c # 2004/10/22 15:42:52-07:00 greg@kroah.com +9 -8 # hotplug: prevent skips in sequence number from happening # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/22 15:25:42-07:00 davem@nuts.davemloft.net # [NETFILTER]: Fix ipt_hashlimit build with NETFILTER_DEBUG enabled. # # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_hashlimit.c # 2004/10/22 15:25:10-07:00 davem@nuts.davemloft.net +9 -12 # [NETFILTER]: Fix ipt_hashlimit build with NETFILTER_DEBUG enabled. # # ChangeSet # 2004/10/22 15:01:24-07:00 tgraf@suug.ch # [PKT_SCHED]: u32: Remove unused hgenerator field in tc_u_hnode. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_u32.c # 2004/10/22 15:01:02-07:00 tgraf@suug.ch +0 -1 # [PKT_SCHED]: u32: Remove unused hgenerator field in tc_u_hnode. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/22 14:59:07-07:00 shemminger@osdl.org # [PKT_SCHED]: netem: use timer to handle packets not rescheduling # # Change the behaviour of netem's delayed packets queue to make it work better # with TBF and other rate control disciplines. # # Now, packets are put in the delayed queue and held there until the next timer interval, # then moved to the underlying qdisc. qlen is set to match the available packets in # the underlying discipline (and not count those waiting). Previously, netem would perturb # the rate control disciplines because of rescheduling and moving packets in # the dequeue handler. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/sched/sch_netem.c # 2004/10/22 14:58:48-07:00 shemminger@osdl.org +29 -19 # [PKT_SCHED]: netem: use timer to handle packets not rescheduling # # Change the behaviour of netem's delayed packets queue to make it work better # with TBF and other rate control disciplines. # # Now, packets are put in the delayed queue and held there until the next timer interval, # then moved to the underlying qdisc. qlen is set to match the available packets in # the underlying discipline (and not count those waiting). Previously, netem would perturb # the rate control disciplines because of rescheduling and moving packets in # the dequeue handler. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/22 14:56:35-07:00 herbert@gondor.apana.org.au # [TCP]: Only re-set TSO size for packet which was TSO to begin with. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2004/10/22 14:56:16-07:00 herbert@gondor.apana.org.au +2 -1 # [TCP]: Only re-set TSO size for packet which was TSO to begin with. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/22 14:30:22-07:00 akpm@osdl.org # [PATCH] kobject_uevent warning fix # # lib/kobject_uevent.c:39: warning: `action_to_string' defined but not used # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # lib/kobject_uevent.c # 2004/10/18 21:47:24-07:00 akpm@osdl.org +2 -0 # kobject_uevent warning fix # # ChangeSet # 2004/10/22 14:29:57-07:00 akpm@osdl.org # [PATCH] remove cpu_run_sbin_hotplug() # # From: Keshavamurthy Anil S # # Remove cpu_run_sbin_hotplug() - use kobject_hotplug() instead. # # Signed-off-by: Anil S Keshavamurthy # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # lib/kobject_uevent.c # 2004/10/18 21:45:44-07:00 akpm@osdl.org +2 -0 # remove cpu_run_sbin_hotplug() # # kernel/cpu.c # 2004/10/18 21:45:44-07:00 akpm@osdl.org +0 -35 # remove cpu_run_sbin_hotplug() # # include/linux/kobject_uevent.h # 2004/10/18 21:45:44-07:00 akpm@osdl.org +1 -0 # remove cpu_run_sbin_hotplug() # # drivers/base/cpu.c # 2004/10/18 21:45:44-07:00 akpm@osdl.org +2 -0 # remove cpu_run_sbin_hotplug() # # ChangeSet # 2004/10/22 14:29:19-07:00 akpm@osdl.org # [PATCH] kobject_hotplug: permit no hotplug_ops # # Make kobject_hotplug() work even if the kobject's kset doesn't implement any # hotplug_ops. # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # lib/kobject_uevent.c # 2004/10/18 21:47:24-07:00 akpm@osdl.org +12 -7 # kobject_hotplug: permit no hotplug_ops # # ChangeSet # 2004/10/22 14:01:16-07:00 shemminger@osdl.org # [PATCH] avoid problems with kobject_set_name and name with % # # kobject_set_name takes a printf style argument list. There are many # callers that pass only one string, if this string contained a '%' character # than bad things would happen. The fix is simple. # # Signed-off-by: Stephen Hemminger # Signed-off-by: Greg Kroah-Hartman # # kernel/module.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +1 -1 # avoid problems with kobject_set_name and name with % # # fs/sysfs/dir.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +1 -1 # avoid problems with kobject_set_name and name with % # # drivers/pci/hotplug/pci_hotplug_core.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +1 -1 # avoid problems with kobject_set_name and name with % # # drivers/firmware/efivars.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +1 -1 # avoid problems with kobject_set_name and name with % # # drivers/base/core.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +1 -1 # avoid problems with kobject_set_name and name with % # # drivers/base/class.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +2 -2 # avoid problems with kobject_set_name and name with % # # drivers/base/bus.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +2 -2 # avoid problems with kobject_set_name and name with % # # ChangeSet # 2004/10/22 13:55:29-07:00 shemminger@osdl.org # [PATCH] cdev: protect against buggy drivers # # Here is a better fix (thanks Greg) that allows long names for character # device objects. # # Signed-off-by: Stephen Hemminger # Signed-off-by: Greg Kroah-Hartman # # fs/char_dev.c # 2004/10/08 11:14:29-07:00 shemminger@osdl.org +2 -2 # cdev: protect against buggy drivers # # ChangeSet # 2004/10/22 13:37:30-07:00 greg@kroah.com # Merge kroah.com:/home/greg/linux/BK/bleed-2.6 # into kroah.com:/home/greg/linux/BK/driver-2.6 # # lib/Makefile # 2004/10/22 13:37:23-07:00 greg@kroah.com +0 -0 # Auto merged # # ChangeSet # 2004/10/22 16:17:02-04:00 len.brown@intel.com # [ACPI] ACPICA 20040924 from Bob Moore # # Signed-off-by: Len Brown # # Added a new OSL interface, acpi_os_get_timer. This # interface implements a 64-bit monotonic timer in 100 # nanosecond units. # # Implemented support for the ACPI 3.0 Timer operator. # This 64-bit timer utilizes the timer provided by the # acpi_os_get_timer interface. # # include/acpi/amlcode.h # 2004/10/22 16:16:07-04:00 len.brown@intel.com +14 -11 # ACPICA 20040924 # # include/acpi/acpiosxf.h # 2004/10/22 16:16:08-04:00 len.brown@intel.com +1 -1 # ACPICA 20040924 # # include/acpi/aclocal.h # 2004/10/22 16:16:08-04:00 len.brown@intel.com +1 -1 # ACPICA 20040924 # # include/acpi/acinterp.h # 2004/10/22 16:16:07-04:00 len.brown@intel.com +4 -0 # ACPICA 20040924 # # include/acpi/acconfig.h # 2004/10/22 16:16:08-04:00 len.brown@intel.com +1 -1 # ACPICA 20040924 # # drivers/acpi/parser/psopcode.c # 2004/10/22 16:16:10-04:00 len.brown@intel.com +12 -5 # ACPICA 20040924 # # drivers/acpi/executer/exoparg1.c # 2004/10/22 16:16:11-04:00 len.brown@intel.com +63 -0 # ACPICA 20040924 # # drivers/acpi/dispatcher/dswexec.c # 2004/10/22 16:16:11-04:00 len.brown@intel.com +13 -12 # ACPICA 20040924 # # ChangeSet # 2004/10/22 21:12:37+01:00 rmk@flint.arm.linux.org.uk # [PCMCIA] Fix PCMCIA behaviour on resume with different card. # # PCMCIA checks the card CIS against its cached copy. If it finds # that the card does not match, it destroys the bindings with existing # drivers, issues an remove event followed by an insert event. However, # ds.c delays the remove event by 100ms, so cardmgr sees the insert # before remove. It thereby ignores the new card. # # Also, we ended up leaving the fake CIS intact, so the new card appears # to be described by the fake CIS. Destroy the fake CIS in addition to # the CIS cache. # # ChangeSet # 2004/10/22 16:12:02-04:00 len.brown@intel.com # [ACPI] acpi_os_sleep() now takes a single 64-bit value in [ms] # # Signed-off-by: Len Brown # # drivers/acpi/osl.c # 2004/10/22 16:11:56-04:00 len.brown@intel.com +2 -2 # acpi_os_sleep() now takes a single 64-bit value in [ms] # # drivers/pcmcia/cs.c # 2004/10/22 21:09:33+01:00 rmk@flint.arm.linux.org.uk +8 -4 # Move fake CIS destruction into cistpl.c # Report via debug whether the CIS verification was successful on resume. # Wait 200ms before sending a new card insertion event. # # drivers/pcmcia/cistpl.c # 2004/10/22 21:09:32+01:00 rmk@flint.arm.linux.org.uk +8 -0 # When we destroy the CIS cache, also destroy the fake CIS as well. # # ChangeSet # 2004/10/22 12:52:13-07:00 ebs@ebshome.net # [PATCH] I2C: fix recently introduced race in IBM PPC4xx I2C driver # # On Tue, Oct 19, 2004 at 10:21:08PM -0700, Eugene Surovegin wrote: # [snip] # > It looks like this change added race I tried to avoid here. # > # > This code is modeled after __wait_event_interruptible_timeout, where # > "prepare_to_wait" is done _before_ checking completion status. This # > change breaks this, e.g. if IRQ happens right after we check iic->sts, # > but before calling msleep_interruptible(). In this case we'll sleep # > much more than required (seconds instead of microseconds) # > # > Greg, if my analysis is correct, please rollback this change. # > # > Nishanth, I'd be nice if you CC'ed me with this patch, my e-mail is at # > the top of that source file. # # Oh, well. I should have used wait_event_interruptible_timeout when I # ported this driver to 2.6. # # This patch fixes recently introduced race and also cleans ups some # 2.4-ism. # # # Signed-off-by: Eugene Surovegin # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/i2c-ibm_iic.c # 2004/10/19 23:18:16-07:00 ebs@ebshome.net +5 -11 # I2C: fix recently introduced race in IBM PPC4xx I2C driver # # ChangeSet # 2004/10/22 12:51:52-07:00 ben@fluff.org # [PATCH] I2C: Fix compile of drivers/i2c/busses/i2c-s3c2410.c # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/i2c-s3c2410.c # 2004/10/20 08:29:03-07:00 ben@fluff.org +1 -2 # I2C: Fix compile of drivers/i2c/busses/i2c-s3c2410.c # # ChangeSet # 2004/10/22 15:39:52-04:00 len.brown@intel.com # [ACPI] ACPICA 20040922 from Bob Moore # # Signed-off-by: Len Brown # # Fixed a problem with the implementation of the LNot() # operator where "Ones" was not returned for the TRUE # case. Changed the code to return Ones instead of (!Arg) # which was usually 1. This change affects iASL constant # folding for this operator also. # # Fixed a problem in acpi_ut_initialize_buffer where an # existing buffer was not initialized properly -- Now zero # the entire buffer in this case where the buffer already # exists. # # Changed the interface to acpi_os_sleep from (UINT32 # Seconds, UINT32 Milliseconds) to simply (ACPI_INTEGER # Milliseconds). This simplifies all related code # considerably. This requires changes/updates to all OS # interface layers (OSLs.) # # Implemented a new external interface, # acpi_install_exception_handler, to allow a system exception # handler to be installed. This handler is invoked upon # any run-time exception that occurs during control method # execution. # # Added support for the DSDT in acpi_tb_find_table. This # allows the DataTableRegion() operator to access the local # copy of the DSDT. # # include/acpi/actypes.h # 2004/10/22 15:38:55-04:00 len.brown@intel.com +4 -0 # ACPICA 20040922 # # include/acpi/acpixf.h # 2004/10/22 15:38:55-04:00 len.brown@intel.com +9 -0 # ACPICA 20040922 # # include/acpi/acpiosxf.h # 2004/10/22 15:38:55-04:00 len.brown@intel.com +5 -2 # ACPICA 20040922 # # include/acpi/acinterp.h # 2004/10/22 15:38:55-04:00 len.brown@intel.com +1 -1 # ACPICA 20040922 # # include/acpi/acglobal.h # 2004/10/22 15:38:55-04:00 len.brown@intel.com +1 -0 # ACPICA 20040922 # # include/acpi/acconfig.h # 2004/10/22 15:38:55-04:00 len.brown@intel.com +1 -1 # ACPICA 20040922 # # drivers/acpi/utilities/utglobal.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +1 -0 # ACPICA 20040922 # # drivers/acpi/utilities/utalloc.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +8 -7 # ACPICA 20040922 # # drivers/acpi/tables/tbxfroot.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +22 -5 # ACPICA 20040922 # # drivers/acpi/tables/tbget.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +3 -0 # ACPICA 20040922 # # drivers/acpi/namespace/nsutils.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +27 -26 # ACPICA 20040922 # # drivers/acpi/namespace/nssearch.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +26 -23 # ACPICA 20040922 # # drivers/acpi/namespace/nsnames.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +2 -1 # ACPICA 20040922 # # drivers/acpi/namespace/nsload.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +6 -5 # ACPICA 20040922 # # drivers/acpi/namespace/nsinit.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +14 -13 # ACPICA 20040922 # # drivers/acpi/namespace/nseval.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +37 -55 # ACPICA 20040922 # # drivers/acpi/namespace/nsdumpdv.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +6 -5 # ACPICA 20040922 # # drivers/acpi/namespace/nsdump.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +32 -29 # ACPICA 20040922 # # drivers/acpi/namespace/nsaccess.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +9 -5 # ACPICA 20040922 # # drivers/acpi/executer/exsystem.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +2 -3 # ACPICA 20040922 # # drivers/acpi/executer/exstore.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +15 -9 # ACPICA 20040922 # # drivers/acpi/executer/exoparg1.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +8 -2 # ACPICA 20040922 # # drivers/acpi/executer/exdump.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +89 -84 # ACPICA 20040922 # # drivers/acpi/events/evxface.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +45 -0 # ACPICA 20040922 # # drivers/acpi/dispatcher/dswexec.c # 2004/10/22 15:38:58-04:00 len.brown@intel.com +11 -0 # ACPICA 20040922 # # ChangeSet # 2004/10/22 15:33:45-04:00 len.brown@intel.com # [ACPI] ACPICA 20040827 update from Bob Moore # # Signed-off-by: Len Brown # # Implemented support for implicit object conversion in # the non-numeric logical operators (LEqual, LGreater, # LGreaterEqual, LLess, LLessEqual, and LNotEqual.) Any # combination of Integers/Strings/Buffers may now be used; # the second operand is implicitly converted on the fly to # match the type of the first operand. For example: # # LEqual (Source1, Source2) # # Source1 and Source2 must each evaluate to an integer, a # string, or a buffer. The data type of Source1 dictates the # required type of Source2. Source2 is implicitly converted # if necessary to match the type of Source1. # # Updated and corrected the behavior of the string # conversion support. The rules concerning conversion of # buffers to strings (according to the ACPI specification) # are as follows: # # ToDecimalString - explicit byte-wise conversion of buffer # to string of decimal values (0-255) separated by commas. # # ToHexString - explicit byte-wise conversion of buffer to # string of hex values (0-FF) separated by commas. # # ToString - explicit byte-wise conversion of buffer to # string. Byte-by-byte copy with no transform except NULL # terminated. Any other implicit buffer-to-string conversion # # byte-wise conversion of buffer to string of hex values # (0-FF) separated by spaces. # # Fixed a problem in acpi_ns_get_pathname_length where the # returned length was one byte too short in the case of a # node in the root scope. This could cause a fault during # debug output. # # include/acpi/amlresrc.h # 2004/10/22 15:30:48-04:00 len.brown@intel.com +2 -2 # ACPICA 20040827 # # include/acpi/amlcode.h # 2004/10/22 15:30:48-04:00 len.brown@intel.com +13 -12 # ACPICA 20040827 # # include/acpi/acutils.h # 2004/10/22 15:30:48-04:00 len.brown@intel.com +4 -0 # ACPICA 20040827 # # include/acpi/actypes.h # 2004/10/22 15:30:48-04:00 len.brown@intel.com +7 -2 # ACPICA 20040827 # # include/acpi/acobject.h # 2004/10/22 15:30:48-04:00 len.brown@intel.com +4 -1 # ACPICA 20040827 # # include/acpi/acinterp.h # 2004/10/22 15:30:48-04:00 len.brown@intel.com +23 -9 # ACPICA 20040827 # # include/acpi/acconfig.h # 2004/10/22 15:30:48-04:00 len.brown@intel.com +1 -1 # ACPICA 20040827 # # drivers/acpi/utilities/utobject.c # 2004/10/22 15:30:51-04:00 len.brown@intel.com +59 -3 # ACPICA 20040827 # # drivers/acpi/utilities/utalloc.c # 2004/10/22 15:30:51-04:00 len.brown@intel.com +3 -2 # ACPICA 20040827 # # drivers/acpi/parser/psopcode.c # 2004/10/22 15:30:51-04:00 len.brown@intel.com +2 -2 # ACPICA 20040827 # # drivers/acpi/namespace/nsnames.c # 2004/10/22 15:30:51-04:00 len.brown@intel.com +5 -1 # ACPICA 20040827 # # drivers/acpi/executer/exresop.c # 2004/10/22 15:30:51-04:00 len.brown@intel.com +8 -4 # ACPICA 20040827 # # drivers/acpi/executer/exoparg2.c # 2004/10/22 15:30:51-04:00 len.brown@intel.com +23 -72 # ACPICA 20040827 # # drivers/acpi/executer/exoparg1.c # 2004/10/22 15:30:51-04:00 len.brown@intel.com +14 -8 # ACPICA 20040827 # # drivers/acpi/executer/exmisc.c # 2004/10/22 15:30:51-04:00 len.brown@intel.com +291 -173 # ACPICA 20040827 # # drivers/acpi/executer/exfldio.c # 2004/10/22 15:30:51-04:00 len.brown@intel.com +1 -1 # ACPICA 20040827 # # drivers/acpi/executer/exconvrt.c # 2004/10/22 15:30:51-04:00 len.brown@intel.com +164 -156 # ACPICA 20040827 # # drivers/acpi/dispatcher/dswexec.c # 2004/10/22 15:30:51-04:00 len.brown@intel.com +2 -1 # ACPICA 20040827 # # ChangeSet # 2004/10/22 11:08:47-07:00 oliver@neukum.org # [PATCH] kaweth: no need for packed # # there was an uneeded packed attribute for a data structure. # # Signed-off-by: Oliver Neukum # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/kaweth.c # 2004/10/21 16:18:11-07:00 oliver@neukum.org +1 -1 # kaweth: no need for packed # # ChangeSet # 2004/10/22 11:08:25-07:00 oliver@neukum.org # [PATCH] kaweth: full conversion to usb_unlink_urb # # kaweth used its own synchronisation superseded by usb_unlink_urb(). # # Signed-off-by: Oliver Neukum # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/kaweth.c # 2004/10/21 15:41:12-07:00 oliver@neukum.org +3 -10 # kaweth: full conversion to usb_unlink_urb # # ChangeSet # 2004/10/22 11:08:03-07:00 david-b@pacbell.net # [PATCH] USB input Kconfig updates # # This tweaks the USB input driver support, notably fixing a botched # dependency that makes all the USB drivers appear strangely in Kconfig. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/input/Kconfig # 2004/10/21 08:19:30-07:00 david-b@pacbell.net +5 -6 # USB input Kconfig updates # # ChangeSet # 2004/10/22 11:07:37-07:00 bunk@stusta.de # [PATCH] USB: fix usb/serial/console.c compile error # # The following compile error seems to come from Linus' tree: # # # <-- snip --> # # ... # CC drivers/usb/serial/bus.o # CC drivers/usb/serial/console.o # drivers/usb/serial/console.c: In function `usb_console_write': # drivers/usb/serial/console.c:221: warning: passing arg 3 of pointer to function makes integer from pointer without a cast # drivers/usb/serial/console.c:221: error: too many arguments to function # drivers/usb/serial/console.c:223: warning: passing arg 3 of `usb_serial_generic_write' makes integer from pointer without a cast # drivers/usb/serial/console.c:223: error: too many arguments to function `usb_serial_generic_write' # make[3]: *** [drivers/usb/serial/console.o] Error 1 # # <-- snip --> # # # This was caused by the changed "write" in usb_serial_device_type. # # # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/console.c # 2004/10/22 06:12:59-07:00 bunk@stusta.de +2 -2 # USB: fix usb/serial/console.c compile error # # ChangeSet # 2004/10/22 11:07:15-07:00 stern@rowland.harvard.edu # [PATCH] USB device init: implement the Windows scheme # # This patch implements the Windows scheme for USB device initialization. # It also incorporates the change recently posted by David to scrub the # endpoint state following a SET-ADDRESS. Other noteworthy changes: # # There are two new module parameters to control whether the # old scheme or the new one is used first and whether the other # scheme is tried if the first one fails. Default settings are # to use the new scheme only. # # hub_set_address() returns 0 immediately if the device is already # in the USB_STATE_ADDRESS state. # # On the first attempt to read the device descriptor the code # uses a short 1-second timeout. This ought to help prevent # full-speed devices with an 8- or 16-byte maxpacket from # slowing the procedure down by NAKing the unexpectedly early # status stage of the transfer. # # For debugging, the ep0 maxpacket value is printed. It might # be a good idea to validate it rather than just believing the # device -- although I haven't heard of any device providing # an incorrect value other than 0. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/urb.c # 2004/10/21 08:00:16-07:00 stern@rowland.harvard.edu +4 -5 # USB device init: implement the Windows scheme # # drivers/usb/core/hub.c # 2004/10/21 14:48:17-07:00 stern@rowland.harvard.edu +135 -38 # USB device init: implement the Windows scheme # # ChangeSet # 2004/10/22 11:06:49-07:00 janitor@sternwelten.at # [PATCH] USB: dabusb: replace schedule_timeout() with msleep_interruptible() # # Description: Use msleep_interruptible() instead of schedule_timeout() # so that the task delays as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/dabusb.c # 2004/10/20 17:41:59-07:00 janitor@sternwelten.at +1 -2 # USB: dabusb: replace schedule_timeout() with msleep_interruptible() # # ChangeSet # 2004/10/22 11:06:26-07:00 janitor@sternwelten.at # [PATCH] USB: tiglusb: replace schedule_timeout() with msleep_interruptible() # # Description: Use msleep_interruptible() instead of schedule_timeout() to # guarantee the task delays as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/misc/tiglusb.c # 2004/10/20 17:42:00-07:00 janitor@sternwelten.at +1 -2 # USB: tiglusb: replace schedule_timeout() with msleep_interruptible() # # ChangeSet # 2004/10/22 19:18:21+02:00 bzolnier@trik.(none) # [ide] kill /proc/ide/ide?/config # # * writes to PCI config space are non-functional since 2.4.21 # * reads of full PCI config space are allowed for normal users # * I'm not aware of any applications using this interface # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-proc.c # 2004/10/22 19:17:03+02:00 bzolnier@trik.(none) +0 -257 # [ide] kill /proc/ide/ide?/config # # ChangeSet # 2004/10/22 19:10:29+02:00 bzolnier@trik.(none) # [ide] kill ide_hwif_t->ide_dma_verbose # # * make __ide_dma_verbose() void and drop "__" prefix # * ide_dma_verbose() is always available now # * use it instead of ide_hwif_t->ide_dma_verbose # * sgiioc4.c version reported wrong mode # * icside.c version repeated info given by ->ide_dma_check() # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/22 18:12:35+02:00 bzolnier@trik.(none) +2 -2 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/ppc/pmac.c # 2004/10/22 18:12:34+02:00 bzolnier@trik.(none) +0 -1 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/pci/siimage.c # 2004/10/22 18:12:34+02:00 bzolnier@trik.(none) +0 -7 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/pci/sgiioc4.c # 2004/10/22 18:12:35+02:00 bzolnier@trik.(none) +0 -12 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/ide.c # 2004/10/22 18:12:34+02:00 bzolnier@trik.(none) +0 -1 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/ide-dma.c # 2004/10/22 18:12:35+02:00 bzolnier@trik.(none) +12 -14 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/ide-disk.c # 2004/10/22 18:12:35+02:00 bzolnier@trik.(none) +1 -1 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/ide-cd.c # 2004/10/22 18:12:35+02:00 bzolnier@trik.(none) +2 -3 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/arm/icside.c # 2004/10/22 18:12:35+02:00 bzolnier@trik.(none) +0 -9 # [ide] kill ide_hwif_t->ide_dma_verbose # # ChangeSet # 2004/10/22 19:06:43+02:00 bzolnier@trik.(none) # [ide] ide-scsi: simplify+speedup DMA support # # * add hwif->sg_mapped flag # * add idescsi_map_sg() converting scsi_cmd->sg into # hwif->sg_table (this removes need for rq->bio) # * remove code (de)allocating rq->bio # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/22 01:46:25+02:00 bzolnier@trik.(none) +1 -0 # [ide] ide-scsi: simplify+speedup DMA support # # drivers/scsi/ide-scsi.c # 2004/10/22 01:46:25+02:00 bzolnier@trik.(none) +49 -92 # [ide] ide-scsi: simplify+speedup DMA support # # drivers/ide/ide-io.c # 2004/10/22 01:46:25+02:00 bzolnier@trik.(none) +9 -3 # [ide] ide-scsi: simplify+speedup DMA support # # ChangeSet # 2004/10/22 19:04:21+02:00 bzolnier@trik.(none) # [ide] kill ide_raw_build_sglist() # # ide_build_sglist() can be now used for REQ_DRIVE_TASKFILE requests. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/22 19:03:55+02:00 bzolnier@trik.(none) +0 -1 # [ide] kill ide_raw_build_sglist() # # drivers/ide/ppc/pmac.c # 2004/10/22 19:03:55+02:00 bzolnier@trik.(none) +2 -5 # [ide] kill ide_raw_build_sglist() # # drivers/ide/pci/sgiioc4.c # 2004/10/22 19:03:55+02:00 bzolnier@trik.(none) +1 -4 # [ide] kill ide_raw_build_sglist() # # drivers/ide/ide-dma.c # 2004/10/22 19:03:55+02:00 bzolnier@trik.(none) +4 -35 # [ide] kill ide_raw_build_sglist() # # ChangeSet # 2004/10/22 18:51:08+02:00 bzolnier@trik.(none) # [ide] use ide_map_sg() # # * make Etrax ide.c, icside.c and ide-dma.c use ide_map_sg() # * use one sg for REQ_DRIVE_TASKFILE requests in ide-dma.c # (no reason for 128 sectors per sg limit) # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-dma.c # 2004/10/22 18:50:48+02:00 bzolnier@trik.(none) +7 -23 # [ide] use ide_map_sg() # # drivers/ide/arm/icside.c # 2004/10/22 18:50:48+02:00 bzolnier@trik.(none) +7 -22 # [ide] use ide_map_sg() # # arch/cris/arch-v10/drivers/ide.c # 2004/10/22 18:50:48+02:00 bzolnier@trik.(none) +2 -8 # [ide] use ide_map_sg() # # ChangeSet # 2004/10/22 18:20:30+02:00 bzolnier@trik.(none) # [ide] pmac: kill pmac_ide_[raw_]build_sglist() # # Just use ide_dma_[raw_]build_sglist() from ide-dma.c. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ppc/pmac.c # 2004/10/22 18:20:10+02:00 bzolnier@trik.(none) +2 -52 # [ide] pmac: kill pmac_ide_[raw_]build_sglist() # # ChangeSet # 2004/10/21 21:57:50-04:00 len.brown@intel.com # [ACPI] disable printk on AML breakpoint # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=135856 # # Signed-off-by: Len Brown # # drivers/acpi/osl.c # 2004/10/21 21:57:43-04:00 len.brown@intel.com +9 -5 # disable printk on AML breakpoint # # drivers/acpi/osl.c # 2004/10/21 21:50:03-04:00 len.brown@intel.com +1 -1 # tweak _OS printk # # ChangeSet # 2004/10/21 18:47:50-04:00 hannal@us.ibm.com # [PATCH] hw_random.c: replace pci_find_device # # As pci_find_device is going away I've replaced it with pci_get_device. # for_each_pci_dev is a macro wrapper around pci_get_device. # If someone with this hardware could test it I would appreciate it. # # Thanks. # # Hanna Linder # IBM Linux Technology Center # # Signed-off-by: Hanna Linder # Signed-off-by: Jeff Garzik # # drivers/char/hw_random.c # 2004/10/20 17:52:42-04:00 hannal@us.ibm.com +1 -1 # hw_random.c: replace pci_find_device # # ChangeSet # 2004/10/21 15:38:41-07:00 sri@us.ibm.com # [SCTP] Fix HEARTBEAT_ACKs being sent to wrong dest. ip address in a # multi-homing scenario after a failback. # # Signed-off-by: Jorge Hernandez-Herrero # Signed-off-by: Sridhar Samudrala # # net/sctp/outqueue.c # 2004/10/21 15:38:30-07:00 sri@us.ibm.com +12 -3 # [SCTP] Fix HEARTBEAT_ACKs being sent to wrong dest. ip address in a # multi-homing scenario after a failback. # # ChangeSet # 2004/10/21 15:32:54-07:00 sri@us.ibm.com # [SCTP] When an address is deleted, update any transports that are caching it as a source adddress. # # Signed-off-by: Sridhar Samudrala # # net/sctp/sm_make_chunk.c # 2004/10/21 15:32:42-07:00 sri@us.ibm.com +8 -0 # [SCTP] When an address is deleted, update any transports that are caching it as a source adddress. # # ChangeSet # 2004/10/21 15:28:41-07:00 sri@us.ibm.com # [SCTP] Update cwnd/ssthresh as per the sctpimpguide modifications. # # Signed-off-by: Sridhar Samudrala # # net/sctp/transport.c # 2004/10/21 15:28:29-07:00 sri@us.ibm.com +14 -13 # [SCTP] Update cwnd/ssthresh as per the sctpimpguide modifications. # # net/sctp/associola.c # 2004/10/21 15:28:29-07:00 sri@us.ibm.com +4 -3 # [SCTP] Update cwnd/ssthresh as per the sctpimpguide modifications. # # ChangeSet # 2004/10/21 15:21:31-07:00 sri@us.ibm.com # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # Signed-off-by: Sridhar Samudrala # # net/sctp/ulpevent.c # 2004/10/21 15:21:19-07:00 sri@us.ibm.com +36 -2 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # net/sctp/socket.c # 2004/10/21 15:21:18-07:00 sri@us.ibm.com +47 -0 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # net/sctp/sm_statefuns.c # 2004/10/21 15:21:18-07:00 sri@us.ibm.com +59 -0 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # net/sctp/sm_make_chunk.c # 2004/10/21 15:21:17-07:00 sri@us.ibm.com +23 -0 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # include/net/sctp/ulpevent.h # 2004/10/21 15:21:17-07:00 sri@us.ibm.com +3 -0 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # include/net/sctp/structs.h # 2004/10/21 15:21:17-07:00 sri@us.ibm.com +6 -0 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # include/linux/sctp.h # 2004/10/21 15:21:16-07:00 sri@us.ibm.com +5 -1 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # ChangeSet # 2004/10/21 15:18:18-07:00 sri@us.ibm.com # [SCTP] Change sctp_assoc_t to a sized type(s32). # # Signed-off-by: Sridhar Samudrala # # net/sctp/socket.c # 2004/10/21 15:18:06-07:00 sri@us.ibm.com +1 -1 # [SCTP] Change sctp_assoc_t to a sized type(s32). # # net/sctp/associola.c # 2004/10/21 15:18:06-07:00 sri@us.ibm.com +3 -3 # [SCTP] Change sctp_assoc_t to a sized type(s32). # # include/net/sctp/user.h # 2004/10/21 15:18:06-07:00 sri@us.ibm.com +1 -1 # [SCTP] Change sctp_assoc_t to a sized type(s32). # # include/net/sctp/sctp.h # 2004/10/21 15:18:05-07:00 sri@us.ibm.com +1 -1 # [SCTP] Change sctp_assoc_t to a sized type(s32). # # ChangeSet # 2004/10/21 13:31:40-07:00 stern@rowland.harvard.edu # [PATCH] USB file-storage gadget: clean up endian issues # # This patch adds the __le16 data types to the file-storage gadget and # removes some erroneous conversions to little-endian order. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/file_storage.c # 2004/10/20 07:25:24-07:00 stern@rowland.harvard.edu +15 -15 # USB file-storage gadget: clean up endian issues # # ChangeSet # 2004/10/21 13:29:33-07:00 david-b@pacbell.net # [PATCH] USB: net2280 compile fixes # # Fix some compiler warnings that came up with net2280 on processors with # 64bit dma_addr-t ... one of them would have been a bug on big-endian CPUs. # (Thanks to Randy Dunlap for reporting these.) # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/net2280.h # 2004/10/15 13:26:59-07:00 david-b@pacbell.net +4 -4 # USB: net2280 compile fixes # # drivers/usb/gadget/net2280.c # 2004/10/15 13:34:35-07:00 david-b@pacbell.net +6 -3 # USB: net2280 compile fixes # # ChangeSet # 2004/10/21 13:29:21-07:00 david-b@pacbell.net # [PATCH] USB: omap_udc updates # # This is a collection of updates to the OMAP UDC driver. # # - OMAP-1510 support, including DMA (the DMA controller isn't quite # the same as on newer chips) but not double buffering. # # - Some PIO work: # # * fix some races that showed up on OMAP-1510 # # * tracking down annoying PIO-OUT lossage and making double buffering # start to behave (needed as fallback if all DMA channels are in use). # # - DMA-IN works on both 1510 and 16xx # # Plus minor cleanups. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/omap_udc.h # 2004/10/21 09:19:33-07:00 david-b@pacbell.net +4 -2 # USB: omap_udc updates # # drivers/usb/gadget/omap_udc.c # 2004/10/21 09:19:33-07:00 david-b@pacbell.net +245 -90 # USB: omap_udc updates # # ChangeSet # 2004/10/21 13:29:07-07:00 david-b@pacbell.net # [PATCH] USB: ohci module param for broken bios # # This patch provides a way to work around especially broken BIOS/SMM # implementations which claim they support the OS-handoff handshake # but actually don't. It's confirmed that this resolves some OSDL bug # (ID isn't handy just now). # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci-hcd.c # 2004/10/12 06:24:03-07:00 david-b@pacbell.net +6 -1 # USB: ohci module param for broken bios # # ChangeSet # 2004/10/21 13:28:54-07:00 david-b@pacbell.net # [PATCH] USB: usb error code docs # # This has various updates to the USB error code documentation that I've # had floating around. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # Documentation/usb/error-codes.txt # 2004/10/21 11:17:34-07:00 david-b@pacbell.net +28 -15 # USB: usb error code docs # # ChangeSet # 2004/10/21 13:28:41-07:00 david-b@pacbell.net # [PATCH] USB: usb/hcd kconfig updates # # This updates the dependencies of the HCDs and host-side USB so that: # # - Options for PCI-only HCDs (UHCI and, for now, EHCI) only appear # systems that actually have PCI. # # - Adding non-PCI bus glue support for another OHCI adapter doesn't # need involve changing the main USB Kconfig anymore. # # - Minor tweaks to the OMAP support, so OMAP 17xx and 24xx don't need # additional Kconfig changes and so the H3/17xx gets the ISP1301 too. # # This still tries to hide host-side USB config options on systems that # don't offer USB. While currently convenient, that's a losing proposition # in the long term: host controllers on chips like SL811 and TD243 can be # put onto any custom board. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/Kconfig # 2004/10/21 10:36:59-07:00 david-b@pacbell.net +22 -4 # USB: usb/hcd kconfig updates # # drivers/usb/Kconfig # 2004/10/21 10:13:54-07:00 david-b@pacbell.net +1 -1 # USB: usb/hcd kconfig updates # # ChangeSet # 2004/10/21 13:28:29-07:00 david-b@pacbell.net # [PATCH] USB: goku_udc sparse updates # # This is a bunch of "sparse" fixes for goku_udc. One of these might be # an issue on some systems for code that explicitly halts IN endpoints # (like file_storage) if normal memory access doesn't work for PCI. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/goku_udc.h # 2004/10/21 09:19:33-07:00 david-b@pacbell.net +4 -4 # USB: goku_udc sparse updates # # drivers/usb/gadget/goku_udc.c # 2004/10/21 09:19:33-07:00 david-b@pacbell.net +76 -73 # USB: goku_udc sparse updates # # ChangeSet # 2004/10/21 12:51:05-07:00 greg@kroah.com # Merge gregkh@kernel.bkbits.net:linux/usb-2.6 # into kroah.com:/home/greg/linux/BK/usb-2.6 # # drivers/usb/serial/visor.c # 2004/10/21 12:51:02-07:00 greg@kroah.com +0 -0 # Auto merged # # drivers/usb/serial/usb-serial.c # 2004/10/21 12:51:02-07:00 greg@kroah.com +0 -0 # Auto merged # # drivers/usb/serial/pl2303.c # 2004/10/21 12:51:02-07:00 greg@kroah.com +0 -0 # Auto merged # # drivers/usb/serial/cyberjack.c # 2004/10/21 12:51:02-07:00 greg@kroah.com +0 -0 # Auto merged # # ChangeSet # 2004/10/21 14:04:06-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-ref # into intel.com:/home/lenb/src/26-latest-dev # # drivers/acpi/processor.c # 2004/10/21 14:04:02-04:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/10/21 14:04:01-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/21 12:31:59+01:00 aia21@cantab.net # NTFS: Improve error handling in fs/ntfs/inode.c::ntfs_truncate(). # # Signed-off-by: Anton Altaparmakov # # fs/ntfs/inode.c # 2004/10/21 12:31:50+01:00 aia21@cantab.net +29 -20 # Improve error handling in ntfs_truncate(). # # fs/ntfs/Makefile # 2004/10/21 12:31:50+01:00 aia21@cantab.net +1 -1 # Start 2.1.22-WIP. # # fs/ntfs/ChangeLog # 2004/10/21 12:31:50+01:00 aia21@cantab.net +4 -0 # Update # # ChangeSet # 2004/10/20 16:49:07-07:00 stern@rowland.harvard.edu # [PATCH] USB Gadget: Use proper BCD values # # This updates an earlier patch that added bcdDevice values for a new # USB peripheral controller. The values weren't valid BCD numbers. # # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/zero.c # 2004/10/20 07:01:08-07:00 stern@rowland.harvard.edu +1 -1 # USB Gadget: Use proper BCD values # # drivers/usb/gadget/file_storage.c # 2004/10/20 07:00:56-07:00 stern@rowland.harvard.edu +1 -1 # USB Gadget: Use proper BCD values # # drivers/usb/gadget/ether.c # 2004/10/20 07:01:03-07:00 stern@rowland.harvard.edu +1 -1 # USB Gadget: Use proper BCD values # # ChangeSet # 2004/10/20 16:37:46-07:00 shemminger@osdl.org # [PATCH] USB kaweth: use alloc_etherdev to allocate device private data - fix # # Goof found by compile warning. # # # From: Stephen Hemminger # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/kaweth.c # 2004/10/19 15:07:25-07:00 shemminger@osdl.org +1 -1 # USB kaweth: use alloc_etherdev to allocate device private data - fix # # ChangeSet # 2004/10/20 16:37:27-07:00 david-b@pacbell.net # [PATCH] USB: usbnet patch (new ax8817x device) # # This patch enables usage of another USB2 100BASE-T adapter. # http://www.corega.co.jp/product/list/lanadp/feusb2tx.htm # # From: Naoki Shibata # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/usbnet.c # 2004/10/20 16:30:29-07:00 david-b@pacbell.net +4 -0 # USB: usbnet patch (new ax8817x device) # # ChangeSet # 2004/10/20 16:37:08-07:00 dale@farnsworth.org # [PATCH] USB: USB fixes for non-cache-coherent processors # # I posted this before, but didn't see any discussion. # # This patch fixes a couple of places where the usb subsystem # DMAs to/from local (stack) variables. This doesn't work on # non-cache-coherent processors. I'm testing on PPC 4xx systems. # # Signed-off-by: Dale Farnsworth # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/message.c # 2004/10/01 12:16:40-07:00 dale@farnsworth.org +13 -3 # USB: USB fixes for non-cache-coherent processors # # drivers/usb/class/audio.c # 2004/10/01 12:16:40-07:00 dale@farnsworth.org +11 -2 # USB: USB fixes for non-cache-coherent processors # # ChangeSet # 2004/10/20 16:36:50-07:00 stern@rowland.harvard.edu # [PATCH] UHCI: No bandwidth reclamation during enumeration # # A few devices prefer not to have full-speed bandwidth reclamation turned # on while they are being enumerated. In particular this seems to be true # for the USB Bluetooth adapters built in to some laptop models (used for # remote keyboards). This patch alters the UHCI driver so that control URBs # for devices still in the USB_STATE_DEFAULT state will be placed on the # low-speed queue rather than the full-speed queue. Since the low-speed # queue isn't subject to bandwidth reclamation the devices will work # properly. The negative impact on other devices is minimal; the process of # device initialization will be slowed down by a few milliseconds. # # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-hcd.c # 2004/10/14 10:25:46-07:00 stern@rowland.harvard.edu +6 -2 # UHCI: No bandwidth reclamation during enumeration # # ChangeSet # 2004/10/20 16:36:31-07:00 shemminger@osdl.org # [PATCH] usbnet: use alloc_etherdev to allocate private data # # In order for network device lifetime stuff to work properly, it is necessary # for devices to allocate private data as part of alloc_etherdev. # Also, netdev_priv() is improvement over dereferencing netdev->priv # # Signed-off-by: Stephen Hemminger # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/usbnet.c # 2004/10/19 09:44:03-07:00 shemminger@osdl.org +31 -35 # usbnet: use alloc_etherdev to allocate private data # # ChangeSet # 2004/10/20 16:36:12-07:00 shemminger@osdl.org # [PATCH] kaweth: use alloc_etherdev to allocate device private # # Change other usb network driver to use alloc_etherdev to allocate the # private data structure. And use netdev_priv to find it. # # Signed-off-by: Stephen Hemminger # Signed-off-by: Oliver Neukum # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/kaweth.c # 2004/10/19 10:39:56-07:00 shemminger@osdl.org +47 -72 # kaweth: use alloc_etherdev to allocate device private # # ChangeSet # 2004/10/20 16:14:25-07:00 david-b@pacbell.net # [PATCH] USB: usb suspend support for hid-core # # Basic HID driver support for USB suspend/resume. At least one keyboard # works OK as a remote wakeup source ... unless you write the sysfs # power/state attribute using that USB keyboard, in which case the input # subsystem reports an endless stream of newlines! :) # # Someone still needs to implement some configurable timer to support the # "suspend idle mice/keyboards/..." policy for devices that can issue # wakeup events. In conjunction with autosuspend policies in hub and # HCD (UHCI) code, that could allegedly save 2W of power by enabling the # C3 state on Centrino laptops that use USB mice. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/input/hid-core.c # 2004/10/01 12:12:41-07:00 david-b@pacbell.net +27 -0 # USB: usb suspend support for hid-core # # ChangeSet # 2004/10/20 16:14:05-07:00 david-b@pacbell.net # [PATCH] USB: usb hub descriptor fetch needs retries # # Some of the recent changes to change how descriptors are read have managed # to confuse one USB keyboard. It recovers OK with a few retries though. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hub.c # 2004/10/01 10:18:19-07:00 david-b@pacbell.net +11 -3 # USB: usb hub descriptor fetch needs retries # # ChangeSet # 2004/10/20 16:13:46-07:00 lkml@lievin.net # [PATCH] USB: tiglusb.c: add direct USB support on some new TI handhelds # # I have extended my driver to add support of the embedded USB port provided by # some new Texas Instruments' handhelds. Things are the same except for the # maximum packet size. # # Description: add support of the USB port embedded on some new TI handhelds (TI84+ and TI89 Titanium). # # Thanks, Romain. # # Signed-off-by: Romain Lievin # Signed-off-by: Greg Kroah-Hartman # # include/linux/ticable.h # 2004/09/26 06:25:53-07:00 lkml@lievin.net +2 -0 # USB: tiglusb.c: add direct USB support on some new TI handhelds # # drivers/usb/misc/tiglusb.h # 2004/09/26 06:27:17-07:00 lkml@lievin.net +2 -6 # USB: tiglusb.c: add direct USB support on some new TI handhelds # # drivers/usb/misc/tiglusb.c # 2004/09/26 06:39:34-07:00 lkml@lievin.net +42 -16 # USB: tiglusb.c: add direct USB support on some new TI handhelds # # Documentation/usb/silverlink.txt # 2004/09/26 06:16:15-07:00 lkml@lievin.net +4 -2 # USB: tiglusb.c: add direct USB support on some new TI handhelds # # ChangeSet # 2004/10/20 16:13:25-07:00 lcapitulino@conectiva.com.br # [PATCH] USB: Module version info for Belkin_sa. # # Add module version information for usb/serial/belkin_sa.c. # # # Signed-off-by: Luiz Capitulino # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/belkin_sa.c # 2004/09/25 13:27:57-07:00 lcapitulino@conectiva.com.br +1 -0 # USB: Module version info for Belkin_sa. # # ChangeSet # 2004/10/20 16:13:07-07:00 lcapitulino@conectiva.com.br # [PATCH] USB: Module version info for PL2303. # # Add module version information for usb/serial/pl2303.c. # # # Signed-off-by: Luiz Capitulino # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/pl2303.c # 2004/09/25 13:16:56-07:00 lcapitulino@conectiva.com.br +1 -0 # USB: Module version info for PL2303. # # ChangeSet # 2004/10/20 16:12:48-07:00 lcapitulino@conectiva.com.br # [PATCH] USB: Module version info for CyberJack. # # Add module version information for drivers/usb/serial/cyberjack.c. # # # Signed-off-by: Luiz Capitulino # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/cyberjack.c # 2004/09/27 17:51:53-07:00 lcapitulino@conectiva.com.br +1 -0 # USB: Module version info for CyberJack. # # ChangeSet # 2004/10/20 16:12:29-07:00 zaitcev@redhat.com # [PATCH] USB: usblp BKL removal # # the appended patch is not in yet, what gives? I sent it to Marcelo with # an understanding that it would be in Linus tree any day now. It was a couple # of months ago. It's not just BKL witchhunt either. I remember that it fixed # an oops, although I do not remember the precise scenario by now (it had # something to do with a race between ->release and ->disconnect). # # # From: Pete Zaitcev # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/class/usblp.c # 2004/10/04 17:15:43-07:00 zaitcev@redhat.com +8 -8 # USB: usblp BKL removal # # ChangeSet # 2004/10/20 16:12:08-07:00 rco3@2005dauphin.org # [PATCH] USB: PL2303 - PharosGPS patch # # This patch adds recognition/support for the PharosGPS puck, as included with # Microsoft's Streets and Trips package. The device has an inline # USB-to-serial converter which functions as a PL2303 but with different # VENDOR_ID and PRODUCT_ID, and so the PL2303 driver is modified to recognize # this additional device. # # Signed-off by: Robert C. Olsen, III [pl2303@2005dauphin.org] # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/pl2303.h # 2004/10/01 06:53:56-07:00 rco3@2005dauphin.org +3 -0 # USB: PL2303 - PharosGPS patch # # drivers/usb/serial/pl2303.c # 2004/10/01 06:50:59-07:00 rco3@2005dauphin.org +1 -0 # USB: PL2303 - PharosGPS patch # # ChangeSet # 2004/10/20 16:11:49-07:00 philippe.bertin@pandora.be # [PATCH] USB: Superfluous statement in usb.c # # drivers/usb/core/usb.c # 2004/10/06 12:46:34-07:00 philippe.bertin@pandora.be +0 -2 # USB: Superfluous statement in usb.c # # ChangeSet # 2004/10/20 16:11:28-07:00 luca.risolia@studio.unibo.it # [PATCH] USB: W996[87]CF driver updates # # Small W996[87]CF documentation updates. # # Signed-off-by: Luca Risolia # # drivers/usb/media/w9968cf.h # 2004/10/08 06:03:21-07:00 luca.risolia@studio.unibo.it +1 -1 # USB: W996[87]CF driver updates # # MAINTAINERS # 2004/10/08 06:04:18-07:00 luca.risolia@studio.unibo.it +2 -2 # USB: W996[87]CF driver updates # # Documentation/usb/w9968cf.txt # 2004/10/08 06:19:58-07:00 luca.risolia@studio.unibo.it +27 -24 # USB: W996[87]CF driver updates # # ChangeSet # 2004/10/20 16:11:09-07:00 stern@rowland.harvard.edu # [PATCH] usbcore: drop reference to bus on allocation error # # A recent patch introduced this reference counting leak. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # # ===== drivers/usb/core/usb.c 1.293 vs edited ===== # # drivers/usb/core/usb.c # 2004/10/08 10:05:23-07:00 stern@rowland.harvard.edu +1 -0 # usbcore: drop reference to bus on allocation error # # ChangeSet # 2004/10/20 16:10:49-07:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: Fix queuecommand() for disconnected devices # # Following the recommendation of James Bottomley (of SCSI fame), this patch # changes the queuecommand() routine so that when a command is received for a # disconnected device, instead of accepting the command and then ignoring it, # we fail the command immediately with DID_NO_CONNECT. # # This fixes a timeout-abort-oops sequence that would occur when the # higher-level drivers (mostly the CD driver) try to queue a SYNCHRONIZE # CACHE command during scsi_remove_host(). # # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # # ===== drivers/usb/storage/scsiglue.c 1.84 vs edited ===== # # drivers/usb/storage/scsiglue.c # 2004/09/30 13:07:33-07:00 mdharm-usb@one-eyed-alien.net +10 -3 # USB Storage: Fix queuecommand() for disconnected devices # # ChangeSet # 2004/10/20 15:38:19-07:00 greg@kroah.com # kobject: add CONFIG_DEBUG_KOBJECT # # Signed-off-by: Greg Kroah-Hartman # # lib/kobject.c # 2004/10/20 15:38:09-07:00 greg@kroah.com +1 -3 # kobject: add CONFIG_DEBUG_KOBJECT # # Signed-off-by: Greg Kroah-Hartman # # lib/Makefile # 2004/10/20 15:38:09-07:00 greg@kroah.com +5 -1 # kobject: add CONFIG_DEBUG_KOBJECT # # Signed-off-by: Greg Kroah-Hartman # # lib/Kconfig.debug # 2004/10/20 15:38:09-07:00 greg@kroah.com +7 -0 # kobject: add CONFIG_DEBUG_KOBJECT # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/20 15:33:03-07:00 greg@kroah.com # USB: fix DoS in the visor driver by rate limiting sends. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/visor.c # 2004/10/20 15:32:53-07:00 greg@kroah.com +69 -12 # USB: fix DoS in the visor driver by rate limiting sends. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/20 15:32:01-07:00 greg@kroah.com # USB: fix build error in the USB core if CONFIG_PROCFS is disabled # # Signed-off-by: Greg Kroah-Hartman # # include/linux/proc_fs.h # 2004/10/20 15:31:50-07:00 greg@kroah.com +1 -0 # USB: fix build error in the USB core if CONFIG_PROCFS is disabled # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/20 15:31:02-07:00 greg@kroah.com # USB: remove unneeded checks in the usb-serial core. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/usb-serial.c # 2004/10/20 15:30:52-07:00 greg@kroah.com +12 -24 # USB: remove unneeded checks in the usb-serial core. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/20 15:30:06-07:00 greg@kroah.com # USB: add phidgetkit driver. # # originally written by Sean Young but with LED additions and # cleanups from me. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/misc/phidgetkit.c # 2004/10/20 15:29:55-07:00 greg@kroah.com +581 -0 # # drivers/usb/misc/phidgetkit.c # 2004/10/20 15:29:55-07:00 greg@kroah.com +0 -0 # BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/misc/phidgetkit.c # # drivers/usb/misc/Makefile # 2004/10/20 15:29:55-07:00 greg@kroah.com +2 -1 # USB: add phidgetkit driver. # # originally written by Sean Young but with LED additions and # cleanups from me. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/misc/Kconfig # 2004/10/20 15:29:55-07:00 greg@kroah.com +10 -0 # USB: add phidgetkit driver. # # originally written by Sean Young but with LED additions and # cleanups from me. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/20 15:28:22-07:00 greg@kroah.com # USB: update devices.txt with the proper USB minor number information. # # Signed-off-by: Greg Kroah-Hartman # # Documentation/devices.txt # 2004/10/20 15:28:12-07:00 greg@kroah.com +17 -6 # USB: update devices.txt with the proper USB minor number information. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/20 17:13:13-04:00 len.brown@intel.com # [ACPI] clarify #define ACPI_THERMAL_MODE_CRITICAL (Pavel Machek) # # drivers/acpi/thermal.c # 2004/10/20 17:11:04-04:00 len.brown@intel.com +3 -3 # ACPI_THERMAL_MODE_CRT is now ACPI_THERMAL_MODE_CRITICAL # # ChangeSet # 2004/10/20 21:36:17+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Enable ip6t_frag.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_frag.c # 2004/10/20 21:35:34+02:00 yasuyuki.kozakai@toshiba.co.jp +31 -29 # [NETFILTER]: Enable ip6t_frag.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/20 21:33:37+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Enable ip6t_multiport.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_multiport.c # 2004/10/20 21:33:00+02:00 yasuyuki.kozakai@toshiba.co.jp +18 -13 # [NETFILTER]: Enable ip6t_multiport.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/20 21:27:38+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Enable ip6t_rt.c to work without skb_linearize() # # Signed-off-by: Patrick McHardy # Signed-off-by: Yasuyuki KOZAKAI # # net/ipv6/netfilter/ip6t_rt.c # 2004/10/20 21:26:53+02:00 yasuyuki.kozakai@toshiba.co.jp +59 -62 # [NETFILTER]: Enable ip6t_rt.c to work without skb_linearize() # # Signed-off-by: Patrick McHardy # Signed-off-by: Yasuyuki KOZAKAI # # ChangeSet # 2004/10/20 20:45:50+02:00 kaber@coreworks.de # Merge coreworks.de:/home/kaber/src/nf/nf-post-2.6.9 # into coreworks.de:/home/kaber/src/nf/nf-2.6 # # net/ipv6/netfilter/ip6t_rt.c # 2004/10/20 20:45:30+02:00 kaber@coreworks.de +0 -0 # Auto merged # # net/ipv6/netfilter/ip6t_multiport.c # 2004/10/20 20:45:30+02:00 kaber@coreworks.de +0 -0 # Auto merged # # net/ipv6/netfilter/ip6t_frag.c # 2004/10/20 20:45:30+02:00 kaber@coreworks.de +0 -0 # Auto merged # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/10/20 20:45:30+02:00 kaber@coreworks.de +0 -0 # Auto merged # # ChangeSet # 2004/10/20 20:33:06+02:00 perex@suse.cz # Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5 # into suse.cz:/home/perex/bk/linux-sound/linux-sound # # sound/core/init.c # 2004/10/20 20:32:42+02:00 perex@suse.cz +0 -1 # Auto merged # # ChangeSet # 2004/10/20 20:27:59+02:00 kaber@coreworks.de # [NETFILTER]: Select source address for gateway in MASQUERADE # # Suggested by Herbert Xu # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ipt_MASQUERADE.c # 2004/10/20 20:26:59+02:00 kaber@coreworks.de +3 -1 # [NETFILTER]: Select source address for gateway in MASQUERADE # # Suggested by Herbert Xu # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/20 13:14:44+01:00 aia21@cantab.net # NTFS: Fix two typos in Documentation/filesystems/ntfs.txt. # # Thanks to Richard Russon for pointing them out. # # Signed-off-by: Anton Altaparmakov # # Documentation/filesystems/ntfs.txt # 2004/10/20 13:14:35+01:00 aia21@cantab.net +2 -2 # Fix typos. # # ChangeSet # 2004/10/20 14:14:29+02:00 perex@suse.cz # [ALSA] Fix non-blocking write in ALSA OSS emulation # # ALSA<-OSS emulation # write() calls in non-blocking mode eat the written data and never # return -EAGAIN. The attached patch fixes the problem. # # Signed-off-by: Benjamin Otte # Signed-off-by: Takashi Iwai # # sound/core/oss/pcm_oss.c # 2004/10/18 10:42:06+02:00 perex@suse.cz +6 -6 # [ALSA] Fix non-blocking write in ALSA OSS emulation # # D:2004/10/18 16:42:06 # C:ALSA<-OSS emulation # F:core/oss/pcm_oss.c:1.78->1.79 # L:write() calls in non-blocking mode eat the written data and never # L:return -EAGAIN. The attached patch fixes the problem. # Signed-off-by: Benjamin Otte # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:13:41+02:00 perex@suse.cz # [ALSA] PCM boundary fix in 32bit compat layer # # IOCTL32 emulation # PCM boundary size is fixed within the 32bit value range when HW_PARAMS # ioctl is called in 32bit mode. # Also, with this patch, the conversion functions are inlined. # # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/pcm32.c # 2004/10/18 09:55:51+02:00 perex@suse.cz +64 -4 # [ALSA] PCM boundary fix in 32bit compat layer # # D:2004/10/18 15:55:51 # C:IOCTL32 emulation # F:core/ioctl32/hwdep32.c:1.8->1.9 # F:core/ioctl32/ioctl32.c:1.22->1.23 # F:core/ioctl32/ioctl32.h:1.15->1.16 # F:core/ioctl32/pcm32.c:1.21->1.22 # L:PCM boundary size is fixed within the 32bit value range when HW_PARAMS # L:ioctl is called in 32bit mode. # L:Also, with this patch, the conversion functions are inlined. # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/ioctl32.h # 2004/10/18 09:55:51+02:00 perex@suse.cz +2 -2 # [ALSA] PCM boundary fix in 32bit compat layer # # D:2004/10/18 15:55:51 # C:IOCTL32 emulation # F:core/ioctl32/hwdep32.c:1.8->1.9 # F:core/ioctl32/ioctl32.c:1.22->1.23 # F:core/ioctl32/ioctl32.h:1.15->1.16 # F:core/ioctl32/pcm32.c:1.21->1.22 # L:PCM boundary size is fixed within the 32bit value range when HW_PARAMS # L:ioctl is called in 32bit mode. # L:Also, with this patch, the conversion functions are inlined. # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/ioctl32.c # 2004/10/18 09:55:51+02:00 perex@suse.cz +3 -3 # [ALSA] PCM boundary fix in 32bit compat layer # # D:2004/10/18 15:55:51 # C:IOCTL32 emulation # F:core/ioctl32/hwdep32.c:1.8->1.9 # F:core/ioctl32/ioctl32.c:1.22->1.23 # F:core/ioctl32/ioctl32.h:1.15->1.16 # F:core/ioctl32/pcm32.c:1.21->1.22 # L:PCM boundary size is fixed within the 32bit value range when HW_PARAMS # L:ioctl is called in 32bit mode. # L:Also, with this patch, the conversion functions are inlined. # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/hwdep32.c # 2004/10/18 09:55:51+02:00 perex@suse.cz +1 -1 # [ALSA] PCM boundary fix in 32bit compat layer # # D:2004/10/18 15:55:51 # C:IOCTL32 emulation # F:core/ioctl32/hwdep32.c:1.8->1.9 # F:core/ioctl32/ioctl32.c:1.22->1.23 # F:core/ioctl32/ioctl32.h:1.15->1.16 # F:core/ioctl32/pcm32.c:1.21->1.22 # L:PCM boundary size is fixed within the 32bit value range when HW_PARAMS # L:ioctl is called in 32bit mode. # L:Also, with this patch, the conversion functions are inlined. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:12:54+02:00 perex@suse.cz # [ALSA] Add VIA8237 driver type # # VIA82xx driver # VIA8237 and later chips are handled as a different type from VIA8233, # since they don't support the AC97 slot mapping any more. # The alsa-lib will resolve the 5.1 remapping for them. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/10/18 09:54:00+02:00 perex@suse.cz +4 -0 # [ALSA] Add VIA8237 driver type # # D:2004/10/18 15:54:00 # C:VIA82xx driver # F:pci/via82xx.c:1.124->1.125 # L:VIA8237 and later chips are handled as a different type from VIA8233, # L:since they don't support the AC97 slot mapping any more. # L:The alsa-lib will resolve the 5.1 remapping for them. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:12:07+02:00 perex@suse.cz # [ALSA] Exclude uneeded code when ! CONFIG_PROC_FS # # PCM Midlevel,AC97 Codec Core # From Michal Rokos # # I tried to compile without procfs support and I got few 'unused code' # warnings. # # This patch fixes it. # # Tested by compilation only. (With CONFIG_PROC_FS on and off) # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_local.h # 2004/10/18 08:01:40+02:00 perex@suse.cz +7 -0 # [ALSA] Exclude uneeded code when ! CONFIG_PROC_FS # # D:2004/10/18 14:01:40 # C:PCM Midlevel,AC97 Codec Core # F:core/pcm.c:1.46->1.47 # F:pci/ac97/Makefile:1.14->1.15 # F:pci/ac97/ac97_local.h:1.7->1.8 # L:From Michal Rokos # L: # L:I tried to compile without procfs support and I got few 'unused code' # L:warnings. # L: # L:This patch fixes it. # L: # L:Tested by compilation only. (With CONFIG_PROC_FS on and off) # Signed-off-by: Takashi Iwai # # sound/pci/ac97/Makefile # 2004/10/18 08:01:40+02:00 perex@suse.cz +6 -1 # [ALSA] Exclude uneeded code when ! CONFIG_PROC_FS # # D:2004/10/18 14:01:40 # C:PCM Midlevel,AC97 Codec Core # F:core/pcm.c:1.46->1.47 # F:pci/ac97/Makefile:1.14->1.15 # F:pci/ac97/ac97_local.h:1.7->1.8 # L:From Michal Rokos # L: # L:I tried to compile without procfs support and I got few 'unused code' # L:warnings. # L: # L:This patch fixes it. # L: # L:Tested by compilation only. (With CONFIG_PROC_FS on and off) # Signed-off-by: Takashi Iwai # # sound/core/pcm.c # 2004/10/18 08:01:40+02:00 perex@suse.cz +2 -1 # [ALSA] Exclude uneeded code when ! CONFIG_PROC_FS # # D:2004/10/18 14:01:40 # C:PCM Midlevel,AC97 Codec Core # F:core/pcm.c:1.46->1.47 # F:pci/ac97/Makefile:1.14->1.15 # F:pci/ac97/ac97_local.h:1.7->1.8 # L:From Michal Rokos # L: # L:I tried to compile without procfs support and I got few 'unused code' # L:warnings. # L: # L:This patch fixes it. # L: # L:Tested by compilation only. (With CONFIG_PROC_FS on and off) # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:11:20+02:00 perex@suse.cz # [ALSA] Fix AC97_EXTENDED_STATUS initialial value # # AC97 Codec Core # Fixed a bug to write an invalid initial value of AC97_EXTENDED_STATUS. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/10/13 04:26:12+02:00 perex@suse.cz +5 -2 # [ALSA] Fix AC97_EXTENDED_STATUS initialial value # # D:2004/10/13 10:26:12 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.151->1.152 # L:Fixed a bug to write an invalid initial value of AC97_EXTENDED_STATUS. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:10:33+02:00 perex@suse.cz # [ALSA] Fixed SPDIF on CS4298 # # AC97 Codec Core # Fixed SPDIF support on CS4298 AC97 chip. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/10/13 04:22:48+02:00 perex@suse.cz +1 -1 # [ALSA] Fixed SPDIF on CS4298 # # D:2004/10/13 10:22:48 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.150->1.151 # L:Fixed SPDIF support on CS4298 AC97 chip. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:09:47+02:00 perex@suse.cz # [ALSA] fix build in !KMOD case (sequencer) # # ALSA sequencer # seq_device.c needs to pull in the snd_seq_autoload_lock()/unlock() # defines from seq_kernel.h in the !KMOD case. # # Signed-off-by: Ingo Molnar # Signed-off-by: Jaroslav Kysela # # sound/core/seq/seq_device.c # 2004/10/12 01:17:43+02:00 perex@suse.cz +1 -0 # [ALSA] fix build in !KMOD case (sequencer) # # D:2004/10/12 07:17:43 # C:ALSA sequencer # F:core/seq/seq_device.c:1.17->1.18 # L:seq_device.c needs to pull in the snd_seq_autoload_lock()/unlock() # L:defines from seq_kernel.h in the !KMOD case. # Signed-off-by: Ingo Molnar # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/10/20 14:09:00+02:00 perex@suse.cz # [ALSA] RME9632 precise_ptr fix # # RME HDSP driver # Correct hardware position mask to mask correctly when buffer is not # maximum size. # # Signed-off-by: Ed Wildgoose # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/10/11 05:28:09+02:00 perex@suse.cz +1 -3 # [ALSA] RME9632 precise_ptr fix # # D:2004/10/11 11:28:09 # C:RME HDSP driver # F:pci/rme9652/hdsp.c:1.71->1.72 # L:Correct hardware position mask to mask correctly when buffer is not # L:maximum size. # Signed-off-by: Ed Wildgoose # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:08:13+02:00 perex@suse.cz # [ALSA] Misc. volume fixes # # ICE1712 driver # - Added mute function to Master/Front/Rear/Side/LFE/CEnter # - Master volume is artificially made in software # - Added PCM volume control (basically what was the master volume) # - Front/Read/Side/LFE/Center is now logarithmic (and computed as * / ) # # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.h # 2004/10/11 05:15:49+02:00 perex@suse.cz +5 -1 # [ALSA] Misc. volume fixes # # D:2004/10/11 11:15:49 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.21->1.22 # F:pci/ice1712/ice1712.h:1.25->1.26 # L: - Added mute function to Master/Front/Rear/Side/LFE/CEnter # L: - Master volume is artificially made in software # L: - Added PCM volume control (basically what was the master volume) # L: - Front/Read/Side/LFE/Center is now logarithmic (and computed as * / ) # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/10/11 05:15:49+02:00 perex@suse.cz +295 -77 # [ALSA] Misc. volume fixes # # D:2004/10/11 11:15:49 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.21->1.22 # F:pci/ice1712/ice1712.h:1.25->1.26 # L: - Added mute function to Master/Front/Rear/Side/LFE/CEnter # L: - Master volume is artificially made in software # L: - Added PCM volume control (basically what was the master volume) # L: - Front/Read/Side/LFE/Center is now logarithmic (and computed as * / ) # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:07:27+02:00 perex@suse.cz # [ALSA] Add routing/volume of ADAT I/O on EWS88D # # ICE1712 driver # The routing/volume control of ADAT I/O on EWS88D is added. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ews.c # 2004/10/11 05:08:07+02:00 perex@suse.cz +4 -1 # [ALSA] Add routing/volume of ADAT I/O on EWS88D # # D:2004/10/11 11:08:07 # C:ICE1712 driver # F:pci/ice1712/ews.c:1.20->1.21 # L:The routing/volume control of ADAT I/O on EWS88D is added. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:04:46+02:00 perex@suse.cz # [ALSA] fixing a two-rme32-in-one-machine bug # # RME32 driver # - fixing the dev counter in snd_rme32_probe(). The patch can enable a second # rme32 card # # Signed-off-by: Martin Langer # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/10/07 07:58:41+02:00 perex@suse.cz +5 -7 # [ALSA] fixing a two-rme32-in-one-machine bug # # RME32 driver # - fixing the dev counter in snd_rme32_probe(). The patch can enable a second # rme32 card now. # # Signed-off-by: Martin Langer # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 01:42:31-04:00 len.brown@intel.com # [ACPI] simplify ES7000 IRQ re-naming scheme # so that it works for all PCI interrupts. # # Signed-off-by: Natalie Protasevich # Signed-off-by: Len Brown # # arch/i386/mach-es7000/es7000plat.c # 2004/10/20 01:42:24-04:00 len.brown@intel.com +20 -18 # es7000_rename_gsi() update to rename all interrupts below 16 # to use IRQs above the highest actual GSI in the system. # This is needed because the ES7000 has mapped its legacy # interrupts above 16 and uses the lines < 16 for PCI devices. # # arch/i386/kernel/mpparse.c # 2004/10/20 01:42:24-04:00 len.brown@intel.com +6 -0 # ES7000 has no legacy identity mapped IRQs # # ChangeSet # 2004/10/20 00:47:18-04:00 ganesh.venkatesan@intel.com # [PATCH] ixgb: Configuration and user guide update # # Signed-off-by: Ganesh Venkatesan # # drivers/net/Kconfig # 2004/10/07 18:52:27-04:00 ganesh.venkatesan@intel.com +2 -8 # ixgb: Configuration and user guide update # # Documentation/networking/ixgb.txt # 2004/10/07 18:51:47-04:00 ganesh.venkatesan@intel.com +12 -25 # ixgb: Configuration and user guide update # # ChangeSet # 2004/10/20 00:47:07-04:00 ganesh.venkatesan@intel.com # [PATCH] e100: Configuration and user guide update # # Signed-off-by: Ganesh Venkatesan # # drivers/net/Kconfig # 2004/10/07 18:52:27-04:00 ganesh.venkatesan@intel.com +5 -54 # e100: Configuration and user guide update # # Documentation/networking/e100.txt # 2004/10/07 18:51:33-04:00 ganesh.venkatesan@intel.com +127 -11 # e100: Configuration and user guide update # # ChangeSet # 2004/10/20 00:46:56-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000: Configuration and user guide update # # Signed-off-by: Ganesh Venkatesan # # drivers/net/Kconfig # 2004/10/07 18:52:27-04:00 ganesh.venkatesan@intel.com +2 -23 # e1000: Configuration and user guide update # # Documentation/networking/e1000.txt # 2004/10/07 18:51:15-04:00 ganesh.venkatesan@intel.com +154 -65 # e1000: Configuration and user guide update # # ChangeSet # 2004/10/20 00:44:45-04:00 ganesh.venkatesan@intel.com # [PATCH] e100: Driver version number update # # Signed-off-by: Ganesh Venkatesan # # drivers/net/e100.c # 2004/10/15 15:27:01-04:00 ganesh.venkatesan@intel.com +1 -1 # e100: Driver version number update # # ChangeSet # 2004/10/20 00:44:35-04:00 ganesh.venkatesan@intel.com # [PATCH] e100: Fix set ringparam for ethtool returning error code on bad input # # Signed-off-by: Ganesh Venkatesan # # drivers/net/e100.c # 2004/10/15 15:27:01-04:00 ganesh.venkatesan@intel.com +3 -0 # e100: Fix set ringparam for ethtool returning error # # ChangeSet # 2004/10/20 00:44:25-04:00 ganesh.venkatesan@intel.com # [PATCH] e100: Fix loss of connectivity to BMC when interface # is brought down. # # Signed-off-by: Ganesh Venkatesan # # drivers/net/e100.c # 2004/10/15 15:27:01-04:00 ganesh.venkatesan@intel.com +0 -10 # e100: Fix loss of connectivity to BMC when interface # # ChangeSet # 2004/10/20 00:41:25-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/netdev-2.6/e100 # # drivers/net/e100.c # 2004/10/20 00:41:22-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/19 20:18:57-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-ref # into intel.com:/home/lenb/src/26-latest-dev # # Documentation/kernel-parameters.txt # 2004/10/19 20:18:53-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/19 19:29:50-04:00 len.brown@intel.com # [ACPI] create IBM ThinkPad ACPI driver -- ibm-acpi-0.6.patch # # by Borislav Deianov # Signed-off-by: Len Brown # # drivers/acpi/ibm_acpi.c # 2004/10/19 01:21:21-04:00 len.brown@intel.com +1240 -0 # ibm-acpi-0.6.patch # # drivers/acpi/ibm_acpi.c # 2004/10/19 01:21:21-04:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-stable-dev/drivers/acpi/ibm_acpi.c # # drivers/acpi/Makefile # 2004/10/18 20:20:44-04:00 len.brown@intel.com +1 -0 # ibm-acpi-0.6.patch # # drivers/acpi/Kconfig # 2004/10/19 19:29:15-04:00 len.brown@intel.com +14 -0 # ibm-acpi-0.6.patch # # Documentation/ibm-acpi.txt # 2004/10/19 01:46:55-04:00 len.brown@intel.com +474 -0 # ibm-acpi-0.6.patch # # Documentation/ibm-acpi.txt # 2004/10/19 01:46:55-04:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-stable-dev/Documentation/ibm-acpi.txt # # ChangeSet # 2004/10/19 12:51:26-04:00 len.brown@intel.com # Merge # # Documentation/kernel-parameters.txt # 2004/10/19 12:51:21-04:00 len.brown@intel.com +0 -0 # SCCS merged # # drivers/acpi/sleep/main.c # 2004/10/19 12:49:04-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/10/19 12:49:04-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/19 15:49:43+02:00 kaber@coreworks.de # [NETFILTER]: Convert ip6t_physdev match function to new argument order # # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_physdev.c # 2004/10/19 15:49:12+02:00 kaber@coreworks.de +1 -2 # [NETFILTER]: Convert ip6t_physdev match function to new argument order # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:21:00+02:00 kaber@coreworks.de # [NETFILTER]: ip6t_esp.c whitespace cleanup # # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_esp.c # 2004/10/19 02:20:32+02:00 kaber@coreworks.de +36 -38 # [NETFILTER]: ip6t_esp.c whitespace cleanup # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:19:33+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Enable ip6t_esp.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_esp.c # 2004/10/19 02:19:06+02:00 yasuyuki.kozakai@toshiba.co.jp +12 -10 # [NETFILTER]: Enable ip6t_esp.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:18:14+02:00 kaber@coreworks.de # [NETFILTER]: Introduce tabs to ip6t_ah.c # # Fix horrible indentation, not a single tab in the file. # # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_ah.c # 2004/10/19 02:17:48+02:00 kaber@coreworks.de +130 -134 # [NETFILTER]: Introduce tabs to ip6t_ah.c # # Fix horrible indentation, not a single tab in the file. # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:16:42+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Enable ip6t_ah.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_ah.c # 2004/10/19 02:16:15+02:00 yasuyuki.kozakai@toshiba.co.jp +9 -7 # [NETFILTER]: Enable ip6t_ah.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:15:21+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Enable ip6t_LOG.c to work without skb_linearize() # # This patch enables ip6t_LOG.c to work without skb_linearize(). # # I changed a large part of this file. At first, ip6_nexthdr() is deleted # to prevent multiple call of skb_header_pointer() at dump_packet() and # ip6_nexthdr(). # # And the following bugs are fixed. The first bug is fixed by introducing # skb_header_pointer(), then I didn't separate patches. # # - No check with skb->len. Then invalid memory access may occur. # # - If packet is fragmented and it's not first fragment, nonexistent # extension headers is tried to parse. # # - All headers which aren't TCP/UDP/ICMPv6 are treated as IPv6 # extension header. # # - The encrypted data after ESP is tried to parse. # # - ntohl() for ID in Fragment header is missing. # # - If doff*4 of TCP header is less than sizeof(struct tcphdr), # TCP options are tried to parse. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_LOG.c # 2004/10/19 02:14:54+02:00 yasuyuki.kozakai@toshiba.co.jp +178 -99 # [NETFILTER]: Enable ip6t_LOG.c to work without skb_linearize() # # This patch enables ip6t_LOG.c to work without skb_linearize(). # # I changed a large part of this file. At first, ip6_nexthdr() is deleted # to prevent multiple call of skb_header_pointer() at dump_packet() and # ip6_nexthdr(). # # And the following bugs are fixed. The first bug is fixed by introducing # skb_header_pointer(), then I didn't separate patches. # # - No check with skb->len. Then invalid memory access may occur. # # - If packet is fragmented and it's not first fragment, nonexistent # extension headers is tried to parse. # # - All headers which aren't TCP/UDP/ICMPv6 are treated as IPv6 # extension header. # # - The encrypted data after ESP is tried to parse. # # - ntohl() for ID in Fragment header is missing. # # - If doff*4 of TCP header is less than sizeof(struct tcphdr), # TCP options are tried to parse. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:13:27+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_rt.c # 2004/10/19 02:13:00+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_owner.c # 2004/10/19 02:13:00+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_multiport.c # 2004/10/19 02:13:00+02:00 yasuyuki.kozakai@toshiba.co.jp +3 -4 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_mark.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_mac.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_limit.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_length.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_ipv6header.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_hl.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -1 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_hbh.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_frag.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_eui64.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_esp.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_dst.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_ah.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_MARK.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -1 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_LOG.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -1 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6_tables.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +122 -132 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # include/linux/netfilter_ipv6/ip6_tables.h # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +8 -4 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:08:50+02:00 rusty@rustcorp.com.au # [NETFILTER]: Change MASQUERADE to Use Device Address Directly # # Instead of doing a dubious route lookup, just use the first IP address # of the (dynamic) interface. Also, reset assured bit so after masq # connections can be cleaned up if memory pressure. # # Signed-off-by: Rusty Russell # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ipt_MASQUERADE.c # 2004/10/19 02:08:24+02:00 rusty@rustcorp.com.au +18 -29 # [NETFILTER]: Change MASQUERADE to Use Device Address Directly # # Instead of doing a dubious route lookup, just use the first IP address # of the (dynamic) interface. Also, reset assured bit so after masq # connections can be cleaned up if memory pressure. # # Signed-off-by: Rusty Russell # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:06:42+02:00 pablo@eurodev.net # [NETFILTER]: Clean up ip_conntrack stats # # Signed-off-by: Pablo Neira # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/10/19 02:06:14+02:00 pablo@eurodev.net +2 -4 # [NETFILTER]: Clean up ip_conntrack stats # # Signed-off-by: Pablo Neira # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/18 16:28:17-04:00 len.brown@intel.com # [ACPI] add module parameters: processor.c2=[0,1] processor.c3=[0,1] # to disable/enable C2 or C3 # blacklist entries for R40e and Medion 41700 # http://bugme.osdl.org/show_bug.cgi?id=3549 # # from Andi Kleen # # drivers/acpi/processor.c # 2004/10/18 16:28:11-04:00 len.brown@intel.com +39 -0 # module parameters: processor.c2=[0,1] processor.c3=[0,1] # to disable/enable C2 or C3 # blacklist entry for R40e and Medion to disable c2/c3 using above # # Documentation/kernel-parameters.txt # 2004/10/18 16:28:11-04:00 len.brown@intel.com +5 -0 # module parameters: processor.c2=[0,1] processor.c3=[0,1] # to disable/enable C2 or C3 # # ChangeSet # 2004/10/18 14:47:59-04:00 len.brown@intel.com # [ACPI] firmware wakeup address is physical, not virtual (David Shaohua Li) # http://bugzilla.kernel.org/show_bug.cgi?id=3390 # # drivers/acpi/sleep/main.c # 2004/10/18 14:47:51-04:00 len.brown@intel.com +4 -1 # firmware wakeup address is physical, not virtual # # ChangeSet # 2004/10/17 11:48:59+02:00 vda@port.imtp.ilyichevsk.odessa.ua # kbuild: make gcc -align options .config-settable # # With all alignment options set to 1 (minimum alignment), # I've got 5% smaller vmlinux compared to one built with # default code alignment. # Original implementation altered to use cc-option-align by sam. # # From: Denis Vlasenko # Signed-off-by: Sam Ravnborg # # init/Kconfig # 2004/10/17 02:03:21+02:00 vda@port.imtp.ilyichevsk.odessa.ua +37 -0 # kbuild: make gcc -align options .config-settable # # Makefile # 2004/10/17 11:44:55+02:00 vda@port.imtp.ilyichevsk.odessa.ua +7 -0 # kbuild: make gcc -align options .config-settable # # ChangeSet # 2004/10/17 11:41:54+02:00 sam@mars.ravnborg.org # kbuild: Add cc-option-align # # gcc version >= 3.00 shifted from -malign-* to -falign-*. $(cc-option-align) will # based on current gcc version specify the right prefix for the align option. # Documented in Documentation/makefiles.txt # # Signed-off-by: Sam Ravnborg # # arch/i386/Makefile # 2004/10/17 11:41:36+02:00 sam@mars.ravnborg.org +1 -1 # Use cc-option-align from top-level Makefile # # Makefile # 2004/10/17 11:41:36+02:00 sam@mars.ravnborg.org +5 -0 # Introduced cc-option-align # # Documentation/kbuild/makefiles.txt # 2004/10/17 11:41:36+02:00 sam@mars.ravnborg.org +15 -0 # Documented cc-option-align # # ChangeSet # 2004/10/17 02:01:07+02:00 sam@mars.ravnborg.org # kbuild: explicit enable framepointer # # Newer gcc versions automatically turns on -fomit-frame-pointer when # -O2 is specified thus breaking CONFIG_FRAME_POINTER option. # Explicitly specifying -fno-omit-frame-pointer fixes it. # # From: Tejun Heo # Signed-off-by: Sam Ravnborg # # Makefile # 2004/10/17 02:00:48+02:00 sam@mars.ravnborg.org +3 -1 # Newer gcc versions automatically turns on -fomit-frame-pointer when # -O2 is specified thus breaking CONFIG_FRAME_POINTER option. # Explicitly specifying -fno-omit-frame-pointer fixes it. # # ChangeSet # 2004/10/17 01:55:32+02:00 sam@mars.ravnborg.org # kbuild: use two double-quotes for localversion # # Modifies LOCALVERSION definition such that it uses # patsubst instead of subst to remove surrounding double quotes from # CONFIG_LOCALVERSION. This helps syntax-highlighting editors. # # From: Tejun Heo # Signed-off-by: Sam Ravnborg # # Makefile # 2004/10/17 01:55:11+02:00 sam@mars.ravnborg.org +1 -1 # Use two double qutes so editors do not get confused # # ChangeSet # 2004/10/17 01:17:08+02:00 sam@mars.ravnborg.org # kbuild: Create Makefile in output dir for *config targets # # Upon request from Andi Kleen the Makefile is now created for *config # targets also. So the MAkefile in the output directory is present when # it is expected (after kernel configuration). # Also tell user the Makefile is generated. # # Signed-off-by: Sam Ravnborg # # Makefile # 2004/10/17 01:16:51+02:00 sam@mars.ravnborg.org +19 -14 # Create a Makefile in output directory for *config targets and # tell user a Makefile is generated. # # ChangeSet # 2004/10/16 23:51:27+02:00 trini@kernel.crashing.org # kbuild: fix 'htmldocs' and friends with O= # # The following patch fixes up 'htmldocs' and related to work when # trees are being built with O=. I fixed it all up by passing the srctree # as an env-var to docproc (and thus what it calls) and then pull that out # when needed. # # Signed-off-by: Tom Rini # Signed-off-by: Sam Ravnborg # # scripts/kernel-doc # 2004/10/16 02:00:00+02:00 trini@kernel.crashing.org +1 -1 # kbuild: fix 'htmldocs' and friends with O= # # scripts/basic/docproc.c # 2004/10/16 02:00:00+02:00 trini@kernel.crashing.org +15 -4 # kbuild: fix 'htmldocs' and friends with O= # # Documentation/DocBook/Makefile # 2004/10/16 02:00:00+02:00 trini@kernel.crashing.org +5 -2 # kbuild: fix 'htmldocs' and friends with O= # # ChangeSet # 2004/10/16 23:48:22+02:00 agruen@suse.de # kbuild: Allow install of external modules to custom path # # Currently, a ``make modules_install'' for an external module will # install that module into /lib/modules/$(uname -r)/extra. Allow to # override this default by specifying INSTALL_MOD_DIR. # # Signed-off-by: Andreas Gruenbacher # Signed-off-by: Sam Ravnborg # # scripts/Makefile.modinst # 2004/10/16 02:00:00+02:00 agruen@suse.de +4 -1 # kbuild: Allow install of external modules to custom path # # ChangeSet # 2004/10/16 23:26:48+02:00 rddunlap@osdl.org # kconfig: OVERRIDE: save kernel version in .config file # # Omit .config file timestamp in the file if the environment variable # "KCONFIG_NOTIMESTAMP" exists and is non-null. # # Signed-off-by: Randy Dunlap # Signed-off-by: Sam Ravnborg # # scripts/kconfig/confdata.c # 2004/09/17 18:31:23+02:00 rddunlap@osdl.org +12 -4 # kconfig: OVERRIDE: save kernel version in .config file # # ChangeSet # 2004/10/16 23:03:11+02:00 vda@port.imtp.ilyichevsk.odessa.ua # kconfig.debug: mention that DEBUG_SLAB can slow down machine quite a bit # # I experienced x3 slowdown due to this option being set. # # Please add this small warning to DEBUG_SLAB help text. # # Signed-off-by: Sam Ravnborg # # lib/Kconfig.debug # 2004/09/16 13:19:28+02:00 vda@port.imtp.ilyichevsk.odessa.ua +1 -1 # kconfig.debug: mention that DEBUG_SLAB can slow down machine quite a bit # # ChangeSet # 2004/10/15 19:54:22-04:00 rddunlap@osdl.org # [PATCH] skfp: remove assignment expression in conditional (sparse)(v2) # # Fix sparse warning: # drivers/net/skfp/hwmtm.c:1904:20: warning: assignment expression in # conditional # # Signed-off-by: Randy Dunlap # # drivers/net/skfp/hwmtm.c # 2004/10/15 17:47:42-04:00 rddunlap@osdl.org +2 -1 # skfp: remove assignment expression in conditional (sparse)(v2) # # ChangeSet # 2004/10/15 19:53:37-04:00 shemminger@osdl.org # [PATCH] slip: use netdev_priv # # Replace dev->priv with netdev_priv(dev) # # Signed-off-by: Stephen Hemminger # # drivers/net/slip.c # 2004/10/15 15:35:54-04:00 shemminger@osdl.org +16 -18 # slip: use netdev_priv # # ChangeSet # 2004/10/15 19:53:24-04:00 shemminger@osdl.org # [PATCH] slip: use module_param # # Replace MODULE_PARM with module_param (also make slip_maxdev static). # # Signed-off-by: Stephen Hemminger # # drivers/net/slip.c # 2004/10/15 15:34:30-04:00 shemminger@osdl.org +3 -2 # slip: use module_param # # ChangeSet # 2004/10/15 19:52:15-04:00 shemminger@osdl.org # [PATCH] tg3: make driver only data static # # Several data structures should have been marked static because # the are local to this driver. # # Signed-off-by: Stephen Hemminger # Signed-off-by: Jeff Garzik # # drivers/net/tg3.c # 2004/10/15 15:57:56-04:00 shemminger@osdl.org +6 -6 # tg3: make driver only data static # # ChangeSet # 2004/10/15 19:52:02-04:00 shemminger@osdl.org # [PATCH] tg3: use netdev_priv # # use netdev_priv # # Signed-off-by: Stephen Hemminger # Signed-off-by: Jeff Garzik # # drivers/net/tg3.c # 2004/10/15 15:19:26-04:00 shemminger@osdl.org +2 -2 # tg3: use netdev_priv # # ChangeSet # 2004/10/15 19:51:49-04:00 shemminger@osdl.org # [PATCH] tg3: use module_param # # get rid of deprecated use of MODULE_PARM # # Signed-off-by: Stephen Hemminger # Signed-off-by: Jeff Garzik # # drivers/net/tg3.c # 2004/10/15 15:19:54-04:00 shemminger@osdl.org +3 -3 # tg3: use module_param # # ChangeSet # 2004/10/15 19:44:57-04:00 shemminger@osdl.org # [PATCH] dummy: use netdev_priv # # Can use netdev_priv in dummy device. # # Signed-off-by: Stephen Hemminger # # drivers/net/dummy.c # 2004/10/15 17:25:11-04:00 shemminger@osdl.org +2 -2 # dummy: use netdev_priv # # ChangeSet # 2004/10/15 19:44:44-04:00 shemminger@osdl.org # [PATCH] eql: use netdev_priv # # Use netdev_priv where possible. # # Signed-off-by: Stephen Hemminger # # drivers/net/eql.c # 2004/10/15 17:26:15-04:00 shemminger@osdl.org +13 -13 # eql: use netdev_priv # # ChangeSet # 2004/10/15 19:43:15-04:00 shemminger@osdl.org # [PATCH] ns83820: use module_param # # Replace MODULE_PARM with module_param # # Signed-off-by: Stephen Hemminger # # drivers/net/ns83820.c # 2004/10/15 18:05:25-04:00 shemminger@osdl.org +5 -4 # ns83820: use module_param # # ChangeSet # 2004/10/15 19:13:34-04:00 jgarzik@pobox.com # Merge pobox.com:/spare/repo/linux-2.6 # into pobox.com:/spare/repo/netdev-2.6/janitor # # drivers/net/3c59x.c # 2004/10/15 19:13:31-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/15 15:31:42-04:00 bunk@stusta.de # [PATCH] net/tokenring/olympic.c: remove unused variable # # Recent changes in Linus' tree removed all uses of a variable, resulteing # in the following warning: # # <-- snip --> # # ... # CC drivers/net/tokenring/olympic.o # drivers/net/tokenring/olympic.c: In function `olympic_arb_cmd': # drivers/net/tokenring/olympic.c:1404: warning: unused variable `i' # ... # # <-- snip --> # # # The following patch removes this unused variable: # # # Signed-off-by: Adrian Bunk # # drivers/net/tokenring/olympic.c # 2004/10/07 16:53:15-04:00 bunk@stusta.de +0 -1 # net/tokenring/olympic.c: remove unused variable # # ChangeSet # 2004/10/15 15:27:16-04:00 linville@tuxdriver.com # [PATCH] 3c59x: style change in vortex_ethtool_ops declaration # # Style change suggested during patch review. # # Signed-off-by: John W. Linville # # drivers/net/3c59x.c # 2004/10/14 20:00:00-04:00 linville@tuxdriver.com +1 -1 # 3c59x: style change in vortex_ethtool_ops declaration # # ChangeSet # 2004/10/15 15:25:41-04:00 rddunlap@osdl.org # [PATCH] pcnet32: use unsigned 1-bit fields # # drivers/net/pcnet32.c # 2004/10/10 18:23:08-04:00 rddunlap@osdl.org +3 -3 # pcnet32: use unsigned 1-bit fields # # ChangeSet # 2004/10/15 12:47:59-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000: white space corrections # # drivers/net/e1000/e1000_ethtool.c # 2004/10/07 16:59:53-04:00 ganesh.venkatesan@intel.com +0 -1 # e1000: white space corrections # # ChangeSet # 2004/10/15 12:47:46-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000: driver version update # # drivers/net/e1000/e1000_main.c # 2004/10/07 16:59:54-04:00 ganesh.venkatesan@intel.com +1 -1 # e1000: driver version update # # ChangeSet # 2004/10/15 12:47:32-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000: fix set ringparam for ethtool returning error code on bad input # # drivers/net/e1000/e1000_ethtool.c # 2004/10/07 16:59:53-04:00 ganesh.venkatesan@intel.com +3 -0 # e1000: fix set ringparam for ethtool returning error # # ChangeSet # 2004/10/15 12:47:19-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000: remove unused function e1000_enable_mng_pass_thru # # drivers/net/e1000/e1000_hw.c # 2004/10/07 16:59:53-04:00 ganesh.venkatesan@intel.com +0 -25 # e1000: remove unused function e1000_enable_mng_pass_thru # # ChangeSet # 2004/10/15 12:47:06-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000: modified ethtool_set_pauseparam to use e1000_setup_link # for flow control settings for fiber serdes link # # drivers/net/e1000/e1000_ethtool.c # 2004/10/07 16:59:53-04:00 ganesh.venkatesan@intel.com +2 -1 # e1000: modified ethtool_set_pauseparam to use # # ChangeSet # 2004/10/14 09:10:57-04:00 pekon@fi.muni.cz # [PATCH] PATCH: netpoll with xircom_cb # # I have a headless computer with xircom pcmcia card and needed netconsole # on it. After looking around in other drivers I concocted this patch. It # survived light testing. I have no documentation for the hw, so it maybe # totally bogus. # # drivers/net/tulip/xircom_cb.c # 2004/10/13 21:54:34-04:00 pekon@fi.muni.cz +14 -0 # PATCH: netpoll with xircom_cb # # ChangeSet # 2004/10/10 04:25:57-04:00 len.brown@intel.com # EXPORT_SYMBOL(acpi_os_write_port); # EXPORT_SYMBOL(acpi_fadt_is_v1); # # drivers/acpi/acpi_ksyms.c # 2004/10/10 04:24:53-04:00 len.brown@intel.com +3 -0 # EXPORT_SYMBOL(acpi_os_write_port); # EXPORT_SYMBOL(acpi_fadt_is_v1); # # ChangeSet # 2004/10/08 16:55:44-04:00 len.brown@intel.com # [ACPI] Notify SMM of cpufreq # http://marc.theaimsgroup.com/?l=acpi4linux&m=109428989121089&w=2 # # Signed-off-by: Dominik Brodowski # # include/acpi/processor.h # 2004/09/04 05:07:43-04:00 len.brown@intel.com +4 -0 # Notify SMM of cpufreq # # include/acpi/actbl.h # 2004/09/04 05:07:43-04:00 len.brown@intel.com +2 -0 # Notify SMM of cpufreq # # drivers/acpi/tables/tbconvrt.c # 2004/09/04 05:07:43-04:00 len.brown@intel.com +8 -2 # Notify SMM of cpufreq # # drivers/acpi/processor.c # 2004/09/04 05:07:43-04:00 len.brown@intel.com +79 -8 # Notify SMM of cpufreq # # arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c # 2004/09/04 05:07:43-04:00 len.brown@intel.com +3 -0 # Notify SMM of cpufreq # # arch/i386/kernel/cpu/cpufreq/powernow-k8.c # 2004/09/04 05:07:43-04:00 len.brown@intel.com +4 -0 # Notify SMM of cpufreq # # arch/i386/kernel/cpu/cpufreq/powernow-k7.c # 2004/09/04 05:07:43-04:00 len.brown@intel.com +3 -0 # Notify SMM of cpufreq # # arch/i386/kernel/cpu/cpufreq/acpi.c # 2004/09/04 05:07:43-04:00 len.brown@intel.com +3 -1 # Notify SMM of cpufreq # # ChangeSet # 2004/10/07 22:35:15-03:00 acme@conectiva.com.br # [SKBUFF] move common code to hdlc_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/hdlc.h # 2004/10/07 22:35:06-03:00 acme@conectiva.com.br +6 -2 # [SKBUFF] move common code to hdlc_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/net/wan/wanxl.c # 2004/10/07 22:35:06-03:00 acme@conectiva.com.br +0 -2 # [SKBUFF] move common code to hdlc_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/net/wan/pc300_drv.c # 2004/10/07 22:35:06-03:00 acme@conectiva.com.br +0 -1 # [SKBUFF] move common code to hdlc_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/net/wan/hd6457x.c # 2004/10/07 22:35:06-03:00 acme@conectiva.com.br +0 -2 # [SKBUFF] move common code to hdlc_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/net/wan/farsync.c # 2004/10/07 22:35:06-03:00 acme@conectiva.com.br +20 -22 # [SKBUFF] move common code to hdlc_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/net/wan/dscc4.c # 2004/10/07 22:35:06-03:00 acme@conectiva.com.br +0 -1 # [SKBUFF] move common code to hdlc_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/char/synclinkmp.c # 2004/10/07 22:35:06-03:00 acme@conectiva.com.br +1 -3 # [SKBUFF] move common code to hdlc_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/char/synclink.c # 2004/10/07 22:35:06-03:00 acme@conectiva.com.br +1 -3 # [SKBUFF] move common code to hdlc_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/char/pcmcia/synclink_cs.c # 2004/10/07 22:35:06-03:00 acme@conectiva.com.br +1 -3 # [SKBUFF] move common code to hdlc_type_trans # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/07 14:06:21+02:00 perex@suse.cz # Merge suse.cz:/home/perex/bk/linux-sound/linux-sound # into suse.cz:/home/perex/bk/linux-sound/work # # sound/pci/intel8x0.c # 2004/10/07 14:06:00+02:00 perex@suse.cz +0 -0 # Auto merged # # include/sound/seq_kernel.h # 2004/10/07 14:05:59+02:00 perex@suse.cz +0 -0 # Auto merged # # include/sound/pcm.h # 2004/10/07 14:05:59+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/10/07 13:16:37+02:00 perex@suse.cz # Merge # # sound/pci/intel8x0.c # 2004/10/07 13:16:21+02:00 perex@suse.cz +9 -7 # SCCS merged # # include/sound/pcm.h # 2004/10/07 13:06:21+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/10/07 12:34:36+02:00 perex@suse.cz # [ALSA] Fix the detection of secondary codec # # CS46xx driver # Fixed the detection of secondary codec. # # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/10/06 05:25:53+02:00 perex@suse.cz +1 -2 # [ALSA] Fix the detection of secondary codec # # D:2004/10/06 11:25:53 # C:CS46xx driver # F:pci/cs46xx/cs46xx_lib.c:1.86->1.87 # L:Fixed the detection of secondary codec. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:33:47+02:00 perex@suse.cz # [ALSA] Fix Aureon CCS init sequence # # ICE1712 driver # - Fix Aureon 5.1 Sky GPIO write mask bits # - Fix 192kHz bit # # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/10/06 05:19:28+02:00 perex@suse.cz +6 -6 # [ALSA] Fix Aureon CCS init sequence # # D:2004/10/06 11:19:28 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.20->1.21 # L:- Fix Aureon 5.1 Sky GPIO write mask bits # L:- Fix 192kHz bit # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:32:59+02:00 perex@suse.cz # [ALSA] Fix compilation (sync with parisc tree) # # PARISC Harmony driver # Sync with parisc tree - fix compilations, module description fixes. # # Signed-off-by: Takashi Iwai # # sound/parisc/harmony.c # 2004/10/06 05:12:12+02:00 perex@suse.cz +9 -6 # [ALSA] Fix compilation (sync with parisc tree) # # D:2004/10/06 11:12:12 # C:PARISC Harmony driver # F:parisc/harmony.c:1.17->1.18 # L:Sync with parisc tree - fix compilations, module description fixes. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:32:11+02:00 perex@suse.cz # [ALSA] Fix ac97 codec reset and clean up # # CS46xx driver # - Fixed AC97 codec RESET for duel codecs (only for CONFIG_SND_CS46XX_NEW_DSP) # - Clean up the codec detection routine # # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/10/06 04:55:22+02:00 perex@suse.cz +49 -74 # [ALSA] Fix ac97 codec reset and clean up # # D:2004/10/06 10:55:22 # C:CS46xx driver # F:pci/cs46xx/cs46xx_lib.c:1.85->1.86 # L:- Fixed AC97 codec RESET for duel codecs (only for CONFIG_SND_CS46XX_NEW_DSP) # L:- Clean up the codec detection routine # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:31:18+02:00 perex@suse.cz # [ALSA] Added dxs quirk for QDI Kudoz 7X/600-6AL # # VIA82xx driver # Added the default dxs_support entry for QDI Kudoz 7X/600-6AL. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/10/05 12:19:28+02:00 perex@suse.cz +1 -0 # [ALSA] Added dxs quirk for QDI Kudoz 7X/600-6AL # # D:2004/10/05 18:19:28 # C:VIA82xx driver # F:pci/via82xx.c:1.123->1.124 # L:Added the default dxs_support entry for QDI Kudoz 7X/600-6AL. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:30:20+02:00 perex@suse.cz # [ALSA] Fix typo # # ALSA sequencer # Fixed a typo for snd_seq_autoload_lock() in the last change # (only for the case without CONFIG_KMOD). # # Signed-off-by: Takashi Iwai # # include/sound/seq_kernel.h # 2004/10/05 05:07:41+02:00 perex@suse.cz +1 -1 # [ALSA] Fix typo # # D:2004/10/05 11:07:41 # C:ALSA sequencer # F:include/seq_kernel.h:1.12->1.13 # L:Fixed a typo for snd_seq_autoload_lock() in the last change # L:(only for the case without CONFIG_KMOD). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:29:22+02:00 perex@suse.cz # [ALSA] Add KERN_ERR to error messages # # ALSA Core # Added KERN_ERR prefix to error messages in snd_assert() and # snd_runtime_check() macros. # # Signed-off-by: Takashi Iwai # # include/sound/core.h # 2004/10/04 10:41:01+02:00 perex@suse.cz +2 -2 # [ALSA] Add KERN_ERR to error messages # # D:2004/10/04 16:41:01 # C:ALSA Core # F:include/core.h:1.58->1.59 # L:Added KERN_ERR prefix to error messages in snd_assert() and # L:snd_runtime_check() macros. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:28:22+02:00 perex@suse.cz # [ALSA] Fix pci_restore_state() # # ALSA Core # Fixed pci_save_state() call with the new API. # # Signed-off-by: Takashi Iwai # # sound/core/init.c # 2004/10/04 10:40:12+02:00 perex@suse.cz +1 -1 # [ALSA] Fix pci_restore_state() # # D:2004/10/04 16:40:12 # C:ALSA Core # F:core/init.c:1.48->1.49 # L:Fixed pci_save_state() call with the new API. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:27:21+02:00 perex@suse.cz # [ALSA] Fix dead blocking during module_init() # # ALSA sequencer,ALSA<-OSS sequencer # Fixed the auto-loading of modules during module_init(). # # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_midi.c # 2004/10/04 05:33:23+02:00 perex@suse.cz +2 -0 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_dummy.c # 2004/10/04 05:33:23+02:00 perex@suse.cz +5 -1 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_device.c # 2004/10/04 05:33:23+02:00 perex@suse.cz +30 -1 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_clientmgr.c # 2004/10/04 05:33:23+02:00 perex@suse.cz +1 -6 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # sound/core/seq/seq.c # 2004/10/04 05:33:23+02:00 perex@suse.cz +10 -12 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss.c # 2004/10/04 05:33:24+02:00 perex@suse.cz +9 -5 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # include/sound/seq_kernel.h # 2004/10/04 05:33:24+02:00 perex@suse.cz +8 -0 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:26:16+02:00 perex@suse.cz # [ALSA] Clean up bitmap # # EMU10K1/EMU10K2 driver # Clean up the declaration of bitmap with DECLARE_BITMAP(). # # Signed-off-by: Takashi Iwai # # include/sound/emu10k1.h # 2004/10/01 10:16:50+02:00 perex@suse.cz +3 -3 # [ALSA] Clean up bitmap # # D:2004/10/01 16:16:50 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.46->1.47 # L:Clean up the declaration of bitmap with DECLARE_BITMAP(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:25:41+02:00 perex@suse.cz # [ALSA] fix snd_opl3_init documentation # # Documentation # # # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/10/01 08:43:42+02:00 perex@suse.cz +1 -1 # [ALSA] fix snd_opl3_init documentation # # D:2004/10/01 14:43:42 # C:Documentation # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.41->1.42 # L: # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/10/07 12:25:09+02:00 perex@suse.cz # [ALSA] fix description of SPSA=3 in the proc file # # AC97 Codec Core # # # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_proc.c # 2004/10/01 08:42:22+02:00 perex@suse.cz +1 -1 # [ALSA] fix description of SPSA=3 in the proc file # # D:2004/10/01 14:42:22 # C:AC97 Codec Core # F:pci/ac97/ac97_proc.c:1.11->1.12 # L: # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/10/07 12:24:37+02:00 perex@suse.cz # [ALSA] fix DAC slot assignment # # AC97 Codec Core # write the DAC slot assignment bits to the extended ID register # where they belong instead of overwriting the SPSA bits in the # extended status register # # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_pcm.c # 2004/10/01 08:41:04+02:00 perex@suse.cz +2 -2 # [ALSA] fix DAC slot assignment # # D:2004/10/01 14:41:04 # C:AC97 Codec Core # F:pci/ac97/ac97_pcm.c:1.17->1.18 # L:write the DAC slot assignment bits to the extended ID register # L:where they belong instead of overwriting the SPSA bits in the # L:extended status register # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/10/07 12:24:06+02:00 perex@suse.cz # [ALSA] Fix / clean up OPL3 for CS4281 # # Documentation,OPL3,CS4281 driver # Moved cs4281-specific code into cs4281 driver from opl3. # The ugly type-casting is removed now. # # The opl3 instance can be created via snd_opl3_new() (followed by # snd_opl3_init()) to allow the driver to set its own command and # private_data/private_free. # # snd_opl3_create() is kept for compatibility as it was. # # Signed-off-by: Takashi Iwai # # sound/pci/cs4281.c # 2004/09/30 11:48:43+02:00 perex@suse.cz +29 -4 # [ALSA] Fix / clean up OPL3 for CS4281 # # D:2004/09/30 17:48:43 # C:Documentation,OPL3,CS4281 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.40->1.41 # F:drivers/opl3/opl3_lib.c:1.22->1.23 # F:include/opl3.h:1.11->1.12 # F:pci/cs4281.c:1.64->1.65 # L:Moved cs4281-specific code into cs4281 driver from opl3. # L:The ugly type-casting is removed now. # L: # L:The opl3 instance can be created via snd_opl3_new() (followed by # L:snd_opl3_init()) to allow the driver to set its own command and # L:private_data/private_free. # L: # L:snd_opl3_create() is kept for compatibility as it was. # Signed-off-by: Takashi Iwai # # sound/drivers/opl3/opl3_lib.c # 2004/09/30 11:48:43+02:00 perex@suse.cz +70 -68 # [ALSA] Fix / clean up OPL3 for CS4281 # # D:2004/09/30 17:48:43 # C:Documentation,OPL3,CS4281 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.40->1.41 # F:drivers/opl3/opl3_lib.c:1.22->1.23 # F:include/opl3.h:1.11->1.12 # F:pci/cs4281.c:1.64->1.65 # L:Moved cs4281-specific code into cs4281 driver from opl3. # L:The ugly type-casting is removed now. # L: # L:The opl3 instance can be created via snd_opl3_new() (followed by # L:snd_opl3_init()) to allow the driver to set its own command and # L:private_data/private_free. # L: # L:snd_opl3_create() is kept for compatibility as it was. # Signed-off-by: Takashi Iwai # # include/sound/opl3.h # 2004/09/30 11:48:43+02:00 perex@suse.cz +5 -0 # [ALSA] Fix / clean up OPL3 for CS4281 # # D:2004/09/30 17:48:43 # C:Documentation,OPL3,CS4281 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.40->1.41 # F:drivers/opl3/opl3_lib.c:1.22->1.23 # F:include/opl3.h:1.11->1.12 # F:pci/cs4281.c:1.64->1.65 # L:Moved cs4281-specific code into cs4281 driver from opl3. # L:The ugly type-casting is removed now. # L: # L:The opl3 instance can be created via snd_opl3_new() (followed by # L:snd_opl3_init()) to allow the driver to set its own command and # L:private_data/private_free. # L: # L:snd_opl3_create() is kept for compatibility as it was. # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/09/30 11:48:43+02:00 perex@suse.cz +33 -1 # [ALSA] Fix / clean up OPL3 for CS4281 # # D:2004/09/30 17:48:43 # C:Documentation,OPL3,CS4281 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.40->1.41 # F:drivers/opl3/opl3_lib.c:1.22->1.23 # F:include/opl3.h:1.11->1.12 # F:pci/cs4281.c:1.64->1.65 # L:Moved cs4281-specific code into cs4281 driver from opl3. # L:The ugly type-casting is removed now. # L: # L:The opl3 instance can be created via snd_opl3_new() (followed by # L:snd_opl3_init()) to allow the driver to set its own command and # L:private_data/private_free. # L: # L:snd_opl3_create() is kept for compatibility as it was. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:23:34+02:00 perex@suse.cz # ALSA CVS update # USB generic driver # add Edirol UA-25 support # # Signed-off-by: Clemens Ladisch # # sound/usb/usbquirks.h # 2004/09/30 05:11:25+02:00 perex@suse.cz +34 -3 # ALSA CVS update # D:2004/09/30 11:11:25 # C:USB generic driver # F:usb/usbaudio.c:1.109->1.110 # F:usb/usbaudio.h:1.34->1.35 # F:usb/usbquirks.h:1.37->1.38 # L:add Edirol UA-25 support # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.h # 2004/09/30 05:11:25+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/09/30 11:11:25 # C:USB generic driver # F:usb/usbaudio.c:1.109->1.110 # F:usb/usbaudio.h:1.34->1.35 # F:usb/usbquirks.h:1.37->1.38 # L:add Edirol UA-25 support # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.c # 2004/09/30 05:11:25+02:00 perex@suse.cz +26 -10 # ALSA CVS update # D:2004/09/30 11:11:25 # C:USB generic driver # F:usb/usbaudio.c:1.109->1.110 # F:usb/usbaudio.h:1.34->1.35 # F:usb/usbquirks.h:1.37->1.38 # L:add Edirol UA-25 support # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/10/07 12:23:01+02:00 perex@suse.cz # [ALSA] Fix AC3 playback on SB Live # # EMU10K1/EMU10K2 driver # Fix the AC3 playback on SB Live! # (Audigy has been working fine.) # # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emupcm.c # 2004/09/30 05:06:53+02:00 perex@suse.cz +1 -1 # [ALSA] Fix AC3 playback on SB Live # # D:2004/09/30 11:06:53 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emupcm.c:1.32->1.33 # L:Fix the AC3 playback on SB Live! # L:(Audigy has been working fine.) # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:22:30+02:00 perex@suse.cz # [ALSA] Fix AC97 master mute # # ICE1712 driver # Instead of muting the AC97 chip and thus eliminating the possibility of recording, # muting is done by setting front playback to DAC only instead of DAC+AUX. # # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/09/29 10:55:44+02:00 perex@suse.cz +39 -3 # [ALSA] Fix AC97 master mute # # D:2004/09/29 16:55:44 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.19->1.20 # L:Instead of muting the AC97 chip and thus eliminating the possibility of recording, # L:muting is done by setting front playback to DAC only instead of DAC+AUX. # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:21:33+02:00 perex@suse.cz # [ALSA] Fix SPDIF support on ICH4/5/6 # # Intel8x0 driver # Fixed SPDIF support on ICH4/5/6. The driver name of these chipsets # is set as 'ICH4' to tell from the older ICHs. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/09/29 10:46:41+02:00 perex@suse.cz +11 -0 # [ALSA] Fix SPDIF support on ICH4/5/6 # # D:2004/09/29 16:46:41 # C:Intel8x0 driver # F:pci/intel8x0.c:1.171->1.172 # L:Fixed SPDIF support on ICH4/5/6. The driver name of these chipsets # L:is set as 'ICH4' to tell from the older ICHs. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:20:47+02:00 perex@suse.cz # [ALSA] Add (experimental) CM9761 support # # AC97 Codec Core # CM9761 support patch is added. # At least, SPDIF and 4.0 output seems working. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_patch.h # 2004/09/29 10:45:52+02:00 perex@suse.cz +1 -0 # [ALSA] Add (experimental) CM9761 support # # D:2004/09/29 16:45:52 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.149->1.150 # F:pci/ac97/ac97_id.h:1.9->1.10 # F:pci/ac97/ac97_patch.c:1.57->1.58 # F:pci/ac97/ac97_patch.h:1.16->1.17 # L:CM9761 support patch is added. # L:At least, SPDIF and 4.0 output seems working. # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_patch.c # 2004/09/29 10:45:52+02:00 perex@suse.cz +134 -0 # [ALSA] Add (experimental) CM9761 support # # D:2004/09/29 16:45:52 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.149->1.150 # F:pci/ac97/ac97_id.h:1.9->1.10 # F:pci/ac97/ac97_patch.c:1.57->1.58 # F:pci/ac97/ac97_patch.h:1.16->1.17 # L:CM9761 support patch is added. # L:At least, SPDIF and 4.0 output seems working. # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_id.h # 2004/09/29 10:45:52+02:00 perex@suse.cz +3 -0 # [ALSA] Add (experimental) CM9761 support # # D:2004/09/29 16:45:52 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.149->1.150 # F:pci/ac97/ac97_id.h:1.9->1.10 # F:pci/ac97/ac97_patch.c:1.57->1.58 # F:pci/ac97/ac97_patch.h:1.16->1.17 # L:CM9761 support patch is added. # L:At least, SPDIF and 4.0 output seems working. # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/09/29 10:45:52+02:00 perex@suse.cz +3 -0 # [ALSA] Add (experimental) CM9761 support # # D:2004/09/29 16:45:52 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.149->1.150 # F:pci/ac97/ac97_id.h:1.9->1.10 # F:pci/ac97/ac97_patch.c:1.57->1.58 # F:pci/ac97/ac97_patch.h:1.16->1.17 # L:CM9761 support patch is added. # L:At least, SPDIF and 4.0 output seems working. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:19:58+02:00 perex@suse.cz # [ALSA] add overclocking option for the analog input # # PCI drivers,BT87x driver # adds CONFIG_SND_BT87X_OVERCLOCK to enable sample rates # up to 1792000 Hz when recording from the analog input # # Signed-off-by: Clemens Ladisch # # sound/pci/bt87x.c # 2004/09/29 08:33:18+02:00 perex@suse.cz +14 -6 # [ALSA] add overclocking option for the analog input # # D:2004/09/29 14:33:18 # C:PCI drivers,BT87x driver # F:pci/Kconfig:1.34->1.35 # F:pci/bt87x.c:1.13->1.14 # L:adds CONFIG_SND_BT87X_OVERCLOCK to enable sample rates # L:up to 1792000 Hz when recording from the analog input # Signed-off-by: Clemens Ladisch # # sound/pci/Kconfig # 2004/09/29 08:33:18+02:00 perex@suse.cz +10 -0 # [ALSA] add overclocking option for the analog input # # D:2004/09/29 14:33:18 # C:PCI drivers,BT87x driver # F:pci/Kconfig:1.34->1.35 # F:pci/bt87x.c:1.13->1.14 # L:adds CONFIG_SND_BT87X_OVERCLOCK to enable sample rates # L:up to 1792000 Hz when recording from the analog input # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/10/07 12:19:13+02:00 perex@suse.cz # [ALSA] Add reset_workaround module option # # Documentation,NM256 driver # - The workaround for some laptops like Dell Latitude LS can be # specified via reset_workaround module option, too. # - The check of reset_workaround is merged into the quirk table. # - The spinlock in AC97 reset callback is removed. # # Signed-off-by: Takashi Iwai # # sound/pci/nm256/nm256.c # 2004/09/28 11:44:03+02:00 perex@suse.cz +20 -20 # [ALSA] Add reset_workaround module option # # D:2004/09/28 17:44:02 # C:Documentation,NM256 driver # F:Documentation/ALSA-Configuration.txt:1.52->1.53 # F:pci/nm256/nm256.c:1.51->1.52 # L:- The workaround for some laptops like Dell Latitude LS can be # L: specified via reset_workaround module option, too. # L:- The check of reset_workaround is merged into the quirk table. # L:- The spinlock in AC97 reset callback is removed. # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/ALSA-Configuration.txt # 2004/09/28 11:44:02+02:00 perex@suse.cz +6 -0 # [ALSA] Add reset_workaround module option # # D:2004/09/28 17:44:02 # C:Documentation,NM256 driver # F:Documentation/ALSA-Configuration.txt:1.52->1.53 # F:pci/nm256/nm256.c:1.51->1.52 # L:- The workaround for some laptops like Dell Latitude LS can be # L: specified via reset_workaround module option, too. # L:- The check of reset_workaround is merged into the quirk table. # L:- The spinlock in AC97 reset callback is removed. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:18:24+02:00 perex@suse.cz # [ALSA] Adds AC'97 support to Aureon cards. # # ICE1712 driver # This patch adds support of the STAC9744 chip located on Aureon cards, # enabling volume control for analogue input channels. # It also adds the posibility of listening to both the analogue inputs # and the digital audio. # # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.h # 2004/09/27 09:45:22+02:00 perex@suse.cz +2 -0 # [ALSA] Adds AC'97 support to Aureon cards. # # D:2004/09/27 15:45:22 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.18->1.19 # F:pci/ice1712/aureon.h:1.4->1.5 # F:pci/ice1712/ice1712.h:1.24->1.25 # L:This patch adds support of the STAC9744 chip located on Aureon cards, # L:enabling volume control for analogue input channels. # L:It also adds the posibility of listening to both the analogue inputs # L:and the digital audio. # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.h # 2004/09/27 09:45:22+02:00 perex@suse.cz +5 -0 # [ALSA] Adds AC'97 support to Aureon cards. # # D:2004/09/27 15:45:22 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.18->1.19 # F:pci/ice1712/aureon.h:1.4->1.5 # F:pci/ice1712/ice1712.h:1.24->1.25 # L:This patch adds support of the STAC9744 chip located on Aureon cards, # L:enabling volume control for analogue input channels. # L:It also adds the posibility of listening to both the analogue inputs # L:and the digital audio. # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/09/27 09:45:22+02:00 perex@suse.cz +333 -5 # [ALSA] Adds AC'97 support to Aureon cards. # # D:2004/09/27 15:45:22 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.18->1.19 # F:pci/ice1712/aureon.h:1.4->1.5 # F:pci/ice1712/ice1712.h:1.24->1.25 # L:This patch adds support of the STAC9744 chip located on Aureon cards, # L:enabling volume control for analogue input channels. # L:It also adds the posibility of listening to both the analogue inputs # L:and the digital audio. # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:17:32+02:00 perex@suse.cz # [ALSA] Clean up ice1712 chip struct # # ICE1712 driver # Clean up of ice1712 chip struct. The board-specific data are moved # to spec union. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.h # 2004/09/27 09:44:14+02:00 perex@suse.cz +13 -5 # [ALSA] Clean up ice1712 chip struct # # D:2004/09/27 15:44:14 # C:ICE1712 driver # F:pci/ice1712/ews.c:1.19->1.20 # F:pci/ice1712/hoontech.c:1.7->1.8 # F:pci/ice1712/ice1712.h:1.23->1.24 # L:Clean up of ice1712 chip struct. The board-specific data are moved # L:to spec union. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/hoontech.c # 2004/09/27 09:44:14+02:00 perex@suse.cz +82 -82 # [ALSA] Clean up ice1712 chip struct # # D:2004/09/27 15:44:14 # C:ICE1712 driver # F:pci/ice1712/ews.c:1.19->1.20 # F:pci/ice1712/hoontech.c:1.7->1.8 # F:pci/ice1712/ice1712.h:1.23->1.24 # L:Clean up of ice1712 chip struct. The board-specific data are moved # L:to spec union. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ews.c # 2004/09/27 09:44:14+02:00 perex@suse.cz +32 -22 # [ALSA] Clean up ice1712 chip struct # # D:2004/09/27 15:44:14 # C:ICE1712 driver # F:pci/ice1712/ews.c:1.19->1.20 # F:pci/ice1712/hoontech.c:1.7->1.8 # F:pci/ice1712/ice1712.h:1.23->1.24 # L:Clean up of ice1712 chip struct. The board-specific data are moved # L:to spec union. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:16:41+02:00 perex@suse.cz # [ALSA] Fix peakmeter ioctl on big-endian # # RME HDSP driver # Fixed the data transfer of peakmeter ioctl on big-endian architectures. # # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/09/27 08:00:11+02:00 perex@suse.cz +66 -53 # [ALSA] Fix peakmeter ioctl on big-endian # # D:2004/09/27 14:00:11 # C:RME HDSP driver # F:pci/rme9652/hdsp.c:1.70->1.71 # L:Fixed the data transfer of peakmeter ioctl on big-endian architectures. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:15:56+02:00 perex@suse.cz # [ALSA] Replace with usb_kill_urb() # # USB generic driver # Use usb_kill_urb() instead of deprecated usb_unlink_urb() for sync'ed URBs. # # Signed-off-by: Takashi Iwai # # sound/usb/usbaudio.c # 2004/09/24 10:50:48+02:00 perex@suse.cz +8 -8 # [ALSA] Replace with usb_kill_urb() # # D:2004/09/24 16:50:48 # C:USB generic driver # F:usb/usbaudio.c:1.108->1.109 # L:Use usb_kill_urb() instead of deprecated usb_unlink_urb() for sync'ed URBs. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:15:03+02:00 perex@suse.cz # [ALSA] snd-usb-usx2y 0.7.3 # # USB generic driver,USB USX2Y # Use usb_kill_urb() instead of deprecated usb_unlink_urb() # # Signed-off-by: Karsten Wiese # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/usbusx2yaudio.c # 2004/09/24 10:50:04+02:00 perex@suse.cz +17 -19 # [ALSA] snd-usb-usx2y 0.7.3 # # D:2004/09/24 16:50:04 # C:USB generic driver,USB USX2Y # F:usb/usbmidi.c:1.33->1.34 # F:usb/usx2y/usbusx2y.c:1.2->1.3 # F:usb/usx2y/usbusx2yaudio.c:1.3->1.4 # L:Use usb_kill_urb() instead of deprecated usb_unlink_urb() # Signed-off-by: Karsten Wiese # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/usbusx2y.c # 2004/09/24 10:50:04+02:00 perex@suse.cz +7 -3 # [ALSA] snd-usb-usx2y 0.7.3 # # D:2004/09/24 16:50:04 # C:USB generic driver,USB USX2Y # F:usb/usbmidi.c:1.33->1.34 # F:usb/usx2y/usbusx2y.c:1.2->1.3 # F:usb/usx2y/usbusx2yaudio.c:1.3->1.4 # L:Use usb_kill_urb() instead of deprecated usb_unlink_urb() # Signed-off-by: Karsten Wiese # Signed-off-by: Takashi Iwai # # sound/usb/usbmidi.c # 2004/09/24 10:50:04+02:00 perex@suse.cz +3 -3 # [ALSA] snd-usb-usx2y 0.7.3 # # D:2004/09/24 16:50:04 # C:USB generic driver,USB USX2Y # F:usb/usbmidi.c:1.33->1.34 # F:usb/usx2y/usbusx2y.c:1.2->1.3 # F:usb/usx2y/usbusx2yaudio.c:1.3->1.4 # L:Use usb_kill_urb() instead of deprecated usb_unlink_urb() # Signed-off-by: Karsten Wiese # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:56:30+02:00 perex@suse.cz # [ALSA] Fix drain/drop of linked PCM streams # # PCM Midlevel # This patch fixes the dead-locking of linked PCM streams when # drain/drop is called. The counter field is added to pcm group # struct to handle link/unlink more easily. # # When the PCM streams are linked, start/drain/drop are operated # to all linked streams. The drain will wait until draining of all # linked streams are finished. # # The XRUN triggers stopping of all linked streams and changes the # state of all of them to XRUN even if only one of them is actually # in XRUN. # # Signed-off-by: Takashi Iwai # # sound/core/pcm_native.c # 2004/09/24 09:25:02+02:00 perex@suse.cz +320 -314 # [ALSA] Fix drain/drop of linked PCM streams # # D:2004/09/24 15:25:02 # C:PCM Midlevel # F:core/pcm_lib.c:1.57->1.58 # F:core/pcm_native.c:1.106->1.107 # F:include/pcm.h:1.48->1.49 # L:This patch fixes the dead-locking of linked PCM streams when # L:drain/drop is called. The counter field is added to pcm group # L:struct to handle link/unlink more easily. # L: # L:When the PCM streams are linked, start/drain/drop are operated # L:to all linked streams. The drain will wait until draining of all # L:linked streams are finished. # L: # L:The XRUN triggers stopping of all linked streams and changes the # L:state of all of them to XRUN even if only one of them is actually # L:in XRUN. # Signed-off-by: Takashi Iwai # # sound/core/pcm_lib.c # 2004/09/24 09:25:02+02:00 perex@suse.cz +1 -1 # [ALSA] Fix drain/drop of linked PCM streams # # D:2004/09/24 15:25:02 # C:PCM Midlevel # F:core/pcm_lib.c:1.57->1.58 # F:core/pcm_native.c:1.106->1.107 # F:include/pcm.h:1.48->1.49 # L:This patch fixes the dead-locking of linked PCM streams when # L:drain/drop is called. The counter field is added to pcm group # L:struct to handle link/unlink more easily. # L: # L:When the PCM streams are linked, start/drain/drop are operated # L:to all linked streams. The drain will wait until draining of all # L:linked streams are finished. # L: # L:The XRUN triggers stopping of all linked streams and changes the # L:state of all of them to XRUN even if only one of them is actually # L:in XRUN. # Signed-off-by: Takashi Iwai # # include/sound/pcm.h # 2004/09/24 09:25:03+02:00 perex@suse.cz +2 -0 # [ALSA] Fix drain/drop of linked PCM streams # # D:2004/09/24 15:25:02 # C:PCM Midlevel # F:core/pcm_lib.c:1.57->1.58 # F:core/pcm_native.c:1.106->1.107 # F:include/pcm.h:1.48->1.49 # L:This patch fixes the dead-locking of linked PCM streams when # L:drain/drop is called. The counter field is added to pcm group # L:struct to handle link/unlink more easily. # L: # L:When the PCM streams are linked, start/drain/drop are operated # L:to all linked streams. The drain will wait until draining of all # L:linked streams are finished. # L: # L:The XRUN triggers stopping of all linked streams and changes the # L:state of all of them to XRUN even if only one of them is actually # L:in XRUN. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:55:58+02:00 perex@suse.cz # [ALSA] Aureon S/PDIF input fixes # # ICE1712 driver # GPIO directions changed # * GPIO>22 not configured as they do not exist # * GPIO22 set to output (CS8415A CS pin) # * GPIO21 set to input. (SPI MISO pin) # # Init sequence of CS8415A changed: # * SWCLK is set to 1 (OMCK output to RMCK pin) # * MUX2:0 is set to 001 (S/PDIF input on RXP1) # * SODEL is set to 1 (MSB of SDOUT data occurs if the second OSCLK period after the OLRCK edge) # * SOLRPOL is set to 1 (SDOUT data is for the right channel with OLRCK is high) # # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/09/24 07:42:05+02:00 perex@suse.cz +2 -2 # [ALSA] Aureon S/PDIF input fixes # # D:2004/09/24 13:42:05 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.17->1.18 # L:GPIO directions changed # L: * GPIO>22 not configured as they do not exist # L: * GPIO22 set to output (CS8415A CS pin) # L: * GPIO21 set to input. (SPI MISO pin) # L: # L:Init sequence of CS8415A changed: # L: * SWCLK is set to 1 (OMCK output to RMCK pin) # L: * MUX2:0 is set to 001 (S/PDIF input on RXP1) # L: * SODEL is set to 1 (MSB of SDOUT data occurs if the second OSCLK period after the OLRCK edge) # L: * SOLRPOL is set to 1 (SDOUT data is for the right channel with OLRCK is high) # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:55:16+02:00 perex@suse.cz # [ALSA] Aureon S/PDIF input fixes # # ICE1712 driver # Fix GPIO pin directions and use RXP1 instead of RXP0 as S/PDIF source on CS8415A # # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/09/24 07:28:44+02:00 perex@suse.cz +5 -5 # [ALSA] Aureon S/PDIF input fixes # # D:2004/09/24 13:28:44 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.16->1.17 # L:Fix GPIO pin directions and use RXP1 instead of RXP0 as S/PDIF source on CS8415A # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:54:31+02:00 perex@suse.cz # [ALSA] Fix DXS entry for GA-7VAX # # VIA82xx driver # From: 1 1 # # I have tested my MB GA-7VAX and want to say you that you should use # VIA_DXS_ENABLE instead VIA_DXS_NO_VRA. On the maximum volume output level # with VIA_DXS_NO_VRA there is abnormal loud noise, and with VIA_DXS_ENABLE # there are much less noises. And I have detected unused code section. # # Signed-off-by: Andrew Morton # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/09/24 05:08:02+02:00 perex@suse.cz +1 -7 # [ALSA] Fix DXS entry for GA-7VAX # # D:2004/09/24 11:08:02 # C:VIA82xx driver # F:pci/via82xx.c:1.122->1.123 # L:From: 1 1 # L: # L:I have tested my MB GA-7VAX and want to say you that you should use # L:VIA_DXS_ENABLE instead VIA_DXS_NO_VRA. On the maximum volume output level # L:with VIA_DXS_NO_VRA there is abnormal loud noise, and with VIA_DXS_ENABLE # L:there are much less noises. And I have detected unused code section. # Signed-off-by: Andrew Morton # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:53:30+02:00 perex@suse.cz # [ALSA] Fix HDSP meter ioctl # # RME HDSP driver # Fixes and clean up of GET_PEAK_RMS ioctl. # # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/09/23 05:05:29+02:00 perex@suse.cz +122 -98 # [ALSA] Fix HDSP meter ioctl # # D:2004/09/23 11:05:29 # C:RME HDSP driver # F:pci/rme9652/hdsp.c:1.69->1.70 # L:Fixes and clean up of GET_PEAK_RMS ioctl. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:52:15+02:00 perex@suse.cz # [ALSA] more au88x0 eq cleanups # # au88x0 driver # cleanup au88x0 equalizer code by factoring out a sign_invert function # that ensures all negative integers become positive. # # Signed-off-by: Jeff Muizelaar # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0_eq.c # 2004/09/22 11:11:17+02:00 perex@suse.cz +25 -51 # [ALSA] more au88x0 eq cleanups # # D:2004/09/22 17:11:17 # C:au88x0 driver # F:pci/au88x0/au88x0_eq.c:1.4->1.5 # L:cleanup au88x0 equalizer code by factoring out a sign_invert function # L:that ensures all negative integers become positive. # Signed-off-by: Jeff Muizelaar # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:51:16+02:00 perex@suse.cz # [ALSA] Fix the variable types in struct # # RME HDSP driver # The variable types are declared explicitly like u32 and u64 # to avoid ambiguity. # # Signed-off-by: Takashi Iwai # # include/sound/hdsp.h # 2004/09/22 10:20:44+02:00 perex@suse.cz +6 -6 # [ALSA] Fix the variable types in struct # # D:2004/09/22 16:20:44 # C:RME HDSP driver # F:include/hdsp.h:1.6->1.7 # L:The variable types are declared explicitly like u32 and u64 # L:to avoid ambiguity. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/06 23:44:56-04:00 akpm@osdl.org # [PATCH] fix acenic hotplug # # From: Anton Blanchard # # Now that the acenic has been converted to the hotplug API a number of uses # of __init and __initdata have to be changed to __devinit and __devinitdata. # # Acked-by: Jes Sorensen # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # # drivers/net/acenic_firmware.h # 2004/10/05 02:28:48-04:00 akpm@osdl.org +1 -1 # fix acenic hotplug # # drivers/net/acenic.c # 2004/10/05 02:30:43-04:00 akpm@osdl.org +10 -10 # fix acenic hotplug # # ChangeSet # 2004/10/04 17:17:08-04:00 nhorman@redhat.com # [PATCH] ns83820: add vlan tag hardware acceleration support # # I was poking about in the National Semi 83820 driver, and I happened to notice that the chip supports vlan tag add/strip assist in hardware, but the driver wasn't making use of it. This patch adds in the driver support to use the vlan tag add/remove hardware, and enables the drivers use of the kernel vlan hwaccel interface. # # Signed-off-by: Neil Horman # # drivers/net/ns83820.c # 2004/10/01 09:29:04-04:00 nhorman@redhat.com +106 -6 # ns83820: add vlan tag hardware acceleration support # # ChangeSet # 2004/10/04 16:51:14-04:00 sfeldma@pobox.com # [PATCH] janitor: net/tulip: pci_find_device to pci_dev_present # # Replace pci_find_device with pci_dev_present. Compile tested. # # Signed-off-by: Scott Feldman # # drivers/net/tulip/tulip_core.c # 2004/10/03 01:01:22-04:00 sfeldma@pobox.com +12 -9 # janitor: net/tulip: pci_find_device to pci_dev_present # # ChangeSet # 2004/10/04 16:51:01-04:00 sfeldma@pobox.com # [PATCH] janitor: net/sis900: pci_find_device to pci_get_device # # Replace pci_find_device with pci_get_device/pci_dev_put to plug # race with pci_find_device. Compile tested. # # Signed-off-by: Scott Feldman # # drivers/net/sis900.c # 2004/10/03 00:29:07-04:00 sfeldma@pobox.com +10 -8 # janitor: net/sis900: pci_find_device to pci_get_device # # ChangeSet # 2004/10/02 23:28:36-07:00 ebs@ebshome.net # PPC32: remove bogus eXecute permissions # # Signed-off-by: Eugene Surovegin # # arch/ppc/platforms/4xx/sycamore.h # 2004/10/02 23:26:32-07:00 ebs@ebshome.net +0 -0 # Change mode to -rw-rw-r-- # # arch/ppc/platforms/4xx/redwood6.h # 2004/10/02 23:26:32-07:00 ebs@ebshome.net +0 -0 # Change mode to -rw-rw-r-- # # arch/ppc/platforms/4xx/ebony.h # 2004/10/02 23:26:32-07:00 ebs@ebshome.net +0 -0 # Change mode to -rw-rw-r-- # # ChangeSet # 2004/10/01 00:22:45-04:00 jesse.brandeburg@intel.com # [PATCH] e100: whitespace and DPRINTKS # # This is a short patch to add a couple of new DPRINTKS and fix some # whitespace issues. # # Signed-off-by: Jesse Brandeburg # # drivers/net/e100.c # 2004/09/22 14:55:01-04:00 jesse.brandeburg@intel.com +6 -3 # e100: whitespace and DPRINTKS # # ChangeSet # 2004/10/01 00:22:32-04:00 jesse.brandeburg@intel.com # [PATCH] e100: fix NAPI race with watchdog # # While polling in NAPI mode, we were occassionally getting interrupts # re-enabled by the watchdog trying to generate a software interrupt. Fix # is to add a spinlock around that shared hardware register to allow a # read-modify-write operation. This was nasty nasty. I don't like the # spinlock in the hot path but i see no other way. Comments are welcome. # Updates the driver version as well. # # Signed-off-by: Jesse Brandeburg # # drivers/net/e100.c # 2004/09/22 14:49:05-04:00 jesse.brandeburg@intel.com +16 -3 # e100: fix NAPI race with watchdog # # ChangeSet # 2004/10/01 00:20:57-04:00 jesse.brandeburg@intel.com # [PATCH] ixgb: fix endianness issue for tx cleanup # # This patch fixes tx cleanup so that it works correctly on big endian # machines. # This time I remembered to update the version string. # # Signed-off-by: Jesse Brandeburg # # drivers/net/ixgb/ixgb_main.c # 2004/09/22 15:01:42-04:00 jesse.brandeburg@intel.com +2 -2 # RESEND ixgb: fix endianness issue for tx cleanup # # ChangeSet # 2004/10/01 00:18:59-04:00 nacc@us.ibm.com # [PATCH] net/de2104x: replace schedule_timeout() with msleep() # # Any comments would be appreciated. # # Description: Use msleep() instead of schedule_timeout() # to guarantee the task delays as expected. # # Signed-off-by: Nishanth Aravamudan # # drivers/net/tulip/de2104x.c # 2004/09/15 12:38:42-04:00 nacc@us.ibm.com +1 -2 # net/de2104x: replace schedule_timeout() with msleep() # # ChangeSet # 2004/10/01 00:14:33-04:00 akpm@osdl.org # [PATCH] e1000 sparc64 dma_mapping build fix # # drivers/net/e1000/e1000_main.c: In function `e1000_probe': # drivers/net/e1000/e1000_main.c:389: error: `DMA_64BIT_MASK' undeclared (first use in this function) # drivers/net/e1000/e1000_main.c:389: error: (Each undeclared identifier is reported only once # drivers/net/e1000/e1000_main.c:389: error: for each function it appears in.) # drivers/net/e1000/e1000_main.c:392: error: `DMA_32BIT_MASK' undeclared (first use in this function) # # Signed-off-by: Andrew Morton # # drivers/net/e1000/e1000.h # 2004/09/21 02:38:09-04:00 akpm@osdl.org +1 -0 # e1000 sparc64 dma_mapping build fix # # ChangeSet # 2004/10/01 00:13:59-04:00 akpm@osdl.org # [PATCH] igxb speedup # # The interrupt routine will call both those functions even if the first doesn't # have any work to do. # # Signed-off-by: Andrew Morton # # drivers/net/ixgb/ixgb_main.c # 2004/08/30 03:50:40-04:00 akpm@osdl.org +5 -1 # igxb speedup # # ChangeSet # 2004/09/30 23:29:15-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 update -- fix MODULE_PARM, module_param, module_param_array # # drivers/net/e1000/e1000_param.c # 2004/09/21 00:54:34-04:00 ganesh.venkatesan@intel.com +104 -63 # e1000 update -- fix MODULE_PARM, module_param, # # drivers/net/e1000/e1000.h # 2004/09/21 00:54:33-04:00 ganesh.venkatesan@intel.com +0 -1 # e1000 update -- fix MODULE_PARM, module_param, # # drivers/net/Kconfig # 2004/09/17 11:39:00-04:00 akpm@osdl.org +12 -12 # via-velocity Kconfig fix # # ChangeSet # 2004/09/30 19:33:53-04:00 jgarzik@pobox.com # Merge pobox.com:/spare/repo/linux-2.6 # into pobox.com:/spare/repo/netdev-2.6/misc # # drivers/net/Kconfig # 2004/09/30 19:33:49-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/09/22 12:28:46+02:00 perex@suse.cz # [ALSA] don't stop capture on errors # # BT87x driver # don't stop capture on errors because there's too much broken hardware out there # # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 12:28:15+02:00 perex@suse.cz # [ALSA] remove 'Rawmidi' part from sequencer port names # # ALSA sequencer # # # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 11:25:08+02:00 perex@suse.cz # Merge # # ChangeSet # 2004/09/22 10:06:58+02:00 perex@suse.cz # Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5 # into suse.cz:/home/perex/bk/linux-sound/linux-sound # # sound/pci/bt87x.c # 2004/09/22 03:53:26+02:00 perex@suse.cz +2 -3 # [ALSA] don't stop capture on errors # # D:2004/09/22 09:53:26 # C:BT87x driver # F:pci/bt87x.c:1.12->1.13 # L:don't stop capture on errors because there's too much broken hardware out there # Signed-off-by: Clemens Ladisch # # sound/core/seq/seq_midi.c # 2004/09/22 02:16:27+02:00 perex@suse.cz +1 -1 # [ALSA] remove 'Rawmidi' part from sequencer port names # # D:2004/09/22 08:16:27 # C:ALSA sequencer # F:core/seq/seq_midi.c:1.22->1.23 # L: # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/09/22 11:24:55+02:00 perex@suse.cz +0 -8 # SCCS merged # # sound/pci/atiixp_modem.c # 2004/09/22 11:23:23+02:00 perex@suse.cz +0 -3 # SCCS merged # # sound/pci/atiixp.c # 2004/09/22 11:23:14+02:00 perex@suse.cz +0 -3 # SCCS merged # # sound/pci/intel8x0.c # 2004/09/22 10:06:47+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/09/22 09:55:28+02:00 perex@suse.cz # [ALSA] use card-specific driver name # # au88x0 driver # use CARD_NAME_SHORT as driver name to allow different configuration file aliases in alsa-lib # # Signed-off-by: Clemens Ladisch # # sound/pci/au88x0/au88x0.c # 2004/09/22 02:11:15+02:00 perex@suse.cz +1 -1 # [ALSA] use card-specific driver name # # D:2004/09/22 08:11:15 # C:au88x0 driver # F:pci/au88x0/au88x0.c:1.12->1.13 # L:use CARD_NAME_SHORT as driver name to allow different configuration file aliases in alsa-lib # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:55:06+02:00 perex@suse.cz # [ALSA] Fix SPDIF rate setting for old ICHs # # Intel8x0 driver # Force to set SPDIF rate when PCMOUT is used on ICH[1-3]. # ICH4, NFORCE and ALI uses a separate DMA for SPDIF. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/09/21 08:15:27+02:00 perex@suse.cz +12 -12 # [ALSA] Fix SPDIF rate setting for old ICHs # # D:2004/09/21 14:15:27 # C:Intel8x0 driver # F:pci/intel8x0.c:1.170->1.171 # L:Force to set SPDIF rate when PCMOUT is used on ICH[1-3]. # L:ICH4, NFORCE and ALI uses a separate DMA for SPDIF. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:54:42+02:00 perex@suse.cz # [ALSA] [hdsp] Fix for 64bit architectures # # RME HDSP driver # Fixed the loading of firmware data and the handling of meter mmap # on 64bit architectures. # # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/09/21 05:32:27+02:00 perex@suse.cz +3 -3 # [ALSA] [hdsp] Fix for 64bit architectures # # D:2004/09/21 11:32:27 # C:RME HDSP driver # F:include/hdsp.h:1.5->1.6 # F:pci/rme9652/hdsp.c:1.68->1.69 # L:Fixed the loading of firmware data and the handling of meter mmap # L:on 64bit architectures. # Signed-off-by: Takashi Iwai # # include/sound/hdsp.h # 2004/09/21 05:32:27+02:00 perex@suse.cz +1 -1 # [ALSA] [hdsp] Fix for 64bit architectures # # D:2004/09/21 11:32:27 # C:RME HDSP driver # F:include/hdsp.h:1.5->1.6 # F:pci/rme9652/hdsp.c:1.68->1.69 # L:Fixed the loading of firmware data and the handling of meter mmap # L:on 64bit architectures. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:54:19+02:00 perex@suse.cz # [ALSA] rme32 segfault fix # # RME32 driver # - disables buffer prefill in halfduplex mode, which fixes segmentation fault # of rme32 for playback in halfduplex mode # # Signed-Off-By: Martin Langer # # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/09/20 05:10:47+02:00 perex@suse.cz +1 -1 # [ALSA] rme32 segfault fix # # D:2004/09/20 11:10:47 # C:RME32 driver # F:pci/rme32.c:1.46->1.47 # L:- disables buffer prefill in halfduplex mode, which fixes segmentation fault # L: of rme32 for playback in halfduplex mode # L: # L:Signed-Off-By: Martin Langer # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:53:57+02:00 perex@suse.cz # [ALSA] Added support of Mediastation # # ICE1712 driver # The support for Lionstracs Mediastation is added. # The model name is 'mediastation'. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/delta.h # 2004/09/17 12:38:26+02:00 perex@suse.cz +3 -1 # [ALSA] Added support of Mediastation # # D:2004/09/17 18:38:26 # C:ICE1712 driver # F:pci/ice1712/delta.c:1.18->1.19 # F:pci/ice1712/delta.h:1.6->1.7 # L:The support for Lionstracs Mediastation is added. # L:The model name is 'mediastation'. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/delta.c # 2004/09/17 12:38:26+02:00 perex@suse.cz +13 -0 # [ALSA] Added support of Mediastation # # D:2004/09/17 18:38:26 # C:ICE1712 driver # F:pci/ice1712/delta.c:1.18->1.19 # F:pci/ice1712/delta.h:1.6->1.7 # L:The support for Lionstracs Mediastation is added. # L:The model name is 'mediastation'. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:53:32+02:00 perex@suse.cz # [ALSA] Fix iomem variable type # # Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # RME9652 driver,PPC Tumbler driver # The type of iomem variables is changed to void __iomem *. # # Signed-off-by: Takashi Iwai # # sound/ppc/tumbler.c # 2004/09/16 13:40:26+02:00 perex@suse.cz +3 -3 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/ymfpci/ymfpci_main.c # 2004/09/16 13:40:26+02:00 perex@suse.cz +2 -2 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/rme9652.c # 2004/09/16 13:40:26+02:00 perex@suse.cz +5 -5 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/09/16 13:40:26+02:00 perex@suse.cz +29 -29 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/rme96.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +8 -6 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +10 -10 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/nm256/nm256.c # 2004/09/16 13:40:26+02:00 perex@suse.cz +17 -17 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.h # 2004/09/16 13:40:25+02:00 perex@suse.cz +1 -1 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.c # 2004/09/16 13:40:25+02:00 perex@suse.cz +3 -3 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/korg1212/korg1212.c # 2004/09/16 13:40:25+02:00 perex@suse.cz +34 -33 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +10 -10 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +10 -10 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/dsp_spos_scb_lib.c # 2004/09/16 13:40:25+02:00 perex@suse.cz +2 -2 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/dsp_spos.c # 2004/09/16 13:40:25+02:00 perex@suse.cz +5 -5 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/09/16 13:40:25+02:00 perex@suse.cz +5 -5 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/cs4281.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +8 -8 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0.h # 2004/09/16 13:40:24+02:00 perex@suse.cz +1 -1 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +1 -1 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/atiixp_modem.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +5 -5 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +5 -5 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/drivers/opl3/opl3_lib.c # 2004/09/16 13:40:23+02:00 perex@suse.cz +4 -4 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/drivers/mpu401/mpu401_uart.c # 2004/09/16 13:40:23+02:00 perex@suse.cz +2 -2 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/core/memory.c # 2004/09/16 13:40:23+02:00 perex@suse.cz +4 -4 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # include/sound/ymfpci.h # 2004/09/16 13:40:24+02:00 perex@suse.cz +1 -1 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # include/sound/cs46xx.h # 2004/09/16 13:40:24+02:00 perex@suse.cz +1 -1 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # include/sound/core.h # 2004/09/16 13:40:24+02:00 perex@suse.cz +2 -2 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/09/16 13:40:23+02:00 perex@suse.cz +3 -4 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:53:03+02:00 perex@suse.cz # [ALSA] Fix auto-loading of sequencer modules # # ALSA sequencer # Allow auto-loading of sequencer modules except for module init time # (which may cause blocking). # # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_clientmgr.c # 2004/09/16 13:35:29+02:00 perex@suse.cz +5 -3 # [ALSA] Fix auto-loading of sequencer modules # # D:2004/09/16 19:35:29 # C:ALSA sequencer # F:core/seq/seq.c:1.14->1.15 # F:core/seq/seq_clientmgr.c:1.36->1.37 # L:Allow auto-loading of sequencer modules except for module init time # L:(which may cause blocking). # Signed-off-by: Takashi Iwai # # sound/core/seq/seq.c # 2004/09/16 13:35:29+02:00 perex@suse.cz +4 -0 # [ALSA] Fix auto-loading of sequencer modules # # D:2004/09/16 19:35:29 # C:ALSA sequencer # F:core/seq/seq.c:1.14->1.15 # F:core/seq/seq_clientmgr.c:1.36->1.37 # L:Allow auto-loading of sequencer modules except for module init time # L:(which may cause blocking). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:52:41+02:00 perex@suse.cz # [ALSA] Fixed the obsolete description in comments # # IOCTL32 emulation # # # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/ioctl32.h # 2004/09/16 07:27:18+02:00 perex@suse.cz +1 -1 # [ALSA] Fixed the obsolete description in comments # # D:2004/09/16 13:27:18 # C:IOCTL32 emulation # F:core/ioctl32/ioctl32.h:1.14->1.15 # L: # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:52:19+02:00 perex@suse.cz # [ALSA] Improved clock measurement # # Intel8x0 driver # Improved the clock measurement routine to allow the longer sleep time. # Now it invokes schedule_timeout() instead of a long mdelay(). # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/09/16 07:26:16+02:00 perex@suse.cz +5 -6 # [ALSA] Improved clock measurement # # D:2004/09/16 13:26:16 # C:Intel8x0 driver # F:pci/intel8x0.c:1.168->1.169 # L:Improved the clock measurement routine to allow the longer sleep time. # L:Now it invokes schedule_timeout() instead of a long mdelay(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:51:57+02:00 perex@suse.cz # [ALSA] Remove delay() to improve latency # # ES1968 driver # - Removed mdelay() in ac97 codec handling. # - Improved the clock measurement routine to allow the longer sleep time. # Now it invokes schedule_timeout() instead of a long mdelay(). # # Signed-off-by: Takashi Iwai # # sound/pci/es1968.c # 2004/09/16 07:25:25+02:00 perex@suse.cz +28 -20 # [ALSA] Remove delay() to improve latency # # D:2004/09/16 13:25:25 # C:ES1968 driver # F:pci/es1968.c:1.75->1.76 # L:- Removed mdelay() in ac97 codec handling. # L:- Improved the clock measurement routine to allow the longer sleep time. # L: Now it invokes schedule_timeout() instead of a long mdelay(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:51:34+02:00 perex@suse.cz # [ALSA] Support for capture of 16,32,64 channels on emu10k1 device 2 # # EMU10K1/EMU10K2 driver # This patch changes default constraint on 'EFX voices mask' control and # allow capture of 1, 2, 4, 8, 16, 32, 64 channels instead of 1, 2, 4, 8. # # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emupcm.c # 2004/09/16 05:36:44+02:00 perex@suse.cz +8 -1 # [ALSA] Support for capture of 16,32,64 channels on emu10k1 device 2 # # D:2004/09/16 11:36:44 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emupcm.c:1.31->1.32 # L:This patch changes default constraint on 'EFX voices mask' control and # L:allow capture of 1, 2, 4, 8, 16, 32, 64 channels instead of 1, 2, 4, 8. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:35:51+02:00 perex@suse.cz # [ALSA] Fixes for PCM/control 32bit emulation # # PCM Midlevel,IOCTL32 emulation # - Size mismatch of control element struct due to packed attribute # is removed. # - A typo in PCM syncptr definition is fixed. # - Suppress the mmap of PCM status/control records on 32bit emulation # mode since the record size doesn't match. # # Signed-off-by: Takashi Iwai # # sound/core/pcm_native.c # 2004/09/15 04:30:08+02:00 perex@suse.cz +5 -0 # [ALSA] Fixes for PCM/control 32bit emulation # # D:2004/09/15 10:30:08 # C:PCM Midlevel,IOCTL32 emulation # F:core/pcm_native.c:1.105->1.106 # F:core/ioctl32/ioctl32.c:1.21->1.22 # F:core/ioctl32/pcm32.c:1.20->1.21 # F:include/pcm.h:1.47->1.48 # L:- Size mismatch of control element struct due to packed attribute # L: is removed. # L:- A typo in PCM syncptr definition is fixed. # L:- Suppress the mmap of PCM status/control records on 32bit emulation # L: mode since the record size doesn't match. # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/pcm32.c # 2004/09/15 04:30:08+02:00 perex@suse.cz +27 -2 # [ALSA] Fixes for PCM/control 32bit emulation # # D:2004/09/15 10:30:08 # C:PCM Midlevel,IOCTL32 emulation # F:core/pcm_native.c:1.105->1.106 # F:core/ioctl32/ioctl32.c:1.21->1.22 # F:core/ioctl32/pcm32.c:1.20->1.21 # F:include/pcm.h:1.47->1.48 # L:- Size mismatch of control element struct due to packed attribute # L: is removed. # L:- A typo in PCM syncptr definition is fixed. # L:- Suppress the mmap of PCM status/control records on 32bit emulation # L: mode since the record size doesn't match. # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/ioctl32.c # 2004/09/15 04:30:08+02:00 perex@suse.cz +1 -1 # [ALSA] Fixes for PCM/control 32bit emulation # # D:2004/09/15 10:30:08 # C:PCM Midlevel,IOCTL32 emulation # F:core/pcm_native.c:1.105->1.106 # F:core/ioctl32/ioctl32.c:1.21->1.22 # F:core/ioctl32/pcm32.c:1.20->1.21 # F:include/pcm.h:1.47->1.48 # L:- Size mismatch of control element struct due to packed attribute # L: is removed. # L:- A typo in PCM syncptr definition is fixed. # L:- Suppress the mmap of PCM status/control records on 32bit emulation # L: mode since the record size doesn't match. # Signed-off-by: Takashi Iwai # # include/sound/pcm.h # 2004/09/15 04:30:08+02:00 perex@suse.cz +2 -0 # [ALSA] Fixes for PCM/control 32bit emulation # # D:2004/09/15 10:30:08 # C:PCM Midlevel,IOCTL32 emulation # F:core/pcm_native.c:1.105->1.106 # F:core/ioctl32/ioctl32.c:1.21->1.22 # F:core/ioctl32/pcm32.c:1.20->1.21 # F:include/pcm.h:1.47->1.48 # L:- Size mismatch of control element struct due to packed attribute # L: is removed. # L:- A typo in PCM syncptr definition is fixed. # L:- Suppress the mmap of PCM status/control records on 32bit emulation # L: mode since the record size doesn't match. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:35:27+02:00 perex@suse.cz # [ALSA] fix ALI M5451 description # # PCI drivers # modify ali5451 and intel8x0 help texts to better distinguish # between M5451 and M5455 AC97 controllers # # Signed-off-by: Clemens Ladisch # # sound/pci/Kconfig # 2004/09/13 07:53:25+02:00 perex@suse.cz +8 -4 # [ALSA] fix ALI M5451 description # # D:2004/09/13 13:53:25 # C:PCI drivers # F:pci/Kconfig:1.33->1.34 # L:modify ali5451 and intel8x0 help texts to better distinguish # L:between M5451 and M5455 AC97 controllers # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:35:05+02:00 perex@suse.cz # [ALSA] remove 'ALSA' from Kconfig USB menu name # # USB # make ISA, PCI and USB device look the same in {q,x,menu}config # # Signed-off-by: Thierry Vignaud # Signed-off-by: Clemens Ladisch # # sound/usb/Kconfig # 2004/09/13 05:53:20+02:00 perex@suse.cz +1 -1 # [ALSA] remove 'ALSA' from Kconfig USB menu name # # D:2004/09/13 11:53:20 # C:USB # F:usb/Kconfig:1.6->1.7 # L:make ISA, PCI and USB device look the same in {q,x,menu}config # Signed-off-by: Thierry Vignaud # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:34:41+02:00 perex@suse.cz # [ALSA] enhance Kconfig help texts # # ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # USB # add module names and references to other documentation files # add more help for generic options # # Signed-off-by: Clemens Ladisch # # sound/usb/Kconfig # 2004/09/13 02:15:00+02:00 perex@suse.cz +9 -2 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/ppc/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +5 -0 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/pcmcia/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +15 -3 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/pci/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +200 -63 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/parisc/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +4 -1 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/isa/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +141 -48 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/drivers/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +38 -10 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/core/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +57 -18 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/arm/Kconfig # 2004/09/13 02:14:58+02:00 perex@suse.cz +6 -3 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:34:18+02:00 perex@suse.cz # [ALSA] adjust intel8x0 joystick documentation # # Documentation # # # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/Joystick.txt # 2004/09/13 01:56:22+02:00 perex@suse.cz +4 -6 # [ALSA] adjust intel8x0 joystick documentation # # D:2004/09/13 07:56:22 # C:Documentation # F:Documentation/Joystick.txt:1.3->1.4 # L: # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:33:57+02:00 perex@suse.cz # [ALSA] show codec name in card description # # AC97 Codec Core,ATIIXP driver,Intel8x0 driver,VIA82xx driver # Include the AC97 codec name in the card longname of # motherboard controllers. # (to enhance the chance of getting useful bug reports :) # # Signed-off-by: Clemens Ladisch # # sound/pci/via82xx.c # 2004/09/10 09:19:29+02:00 perex@suse.cz +3 -2 # [ALSA] show codec name in card description # # D:2004/09/10 15:19:28 # C:AC97 Codec Core,ATIIXP driver,Intel8x0 driver,VIA82xx driver # F:include/ac97_codec.h:1.55->1.56 # F:pci/atiixp.c:1.22->1.23 # F:pci/intel8x0.c:1.167->1.168 # F:pci/via82xx.c:1.121->1.122 # F:pci/ac97/ac97_codec.c:1.148->1.149 # L:Include the AC97 codec name in the card longname of # L:motherboard controllers. # L:(to enhance the chance of getting useful bug reports :) # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/09/10 09:19:29+02:00 perex@suse.cz +3 -2 # [ALSA] show codec name in card description # # D:2004/09/10 15:19:28 # C:AC97 Codec Core,ATIIXP driver,Intel8x0 driver,VIA82xx driver # F:include/ac97_codec.h:1.55->1.56 # F:pci/atiixp.c:1.22->1.23 # F:pci/intel8x0.c:1.167->1.168 # F:pci/via82xx.c:1.121->1.122 # F:pci/ac97/ac97_codec.c:1.148->1.149 # L:Include the AC97 codec name in the card longname of # L:motherboard controllers. # L:(to enhance the chance of getting useful bug reports :) # Signed-off-by: Clemens Ladisch # # sound/pci/atiixp.c # 2004/09/10 09:19:29+02:00 perex@suse.cz +4 -2 # [ALSA] show codec name in card description # # D:2004/09/10 15:19:28 # C:AC97 Codec Core,ATIIXP driver,Intel8x0 driver,VIA82xx driver # F:include/ac97_codec.h:1.55->1.56 # F:pci/atiixp.c:1.22->1.23 # F:pci/intel8x0.c:1.167->1.168 # F:pci/via82xx.c:1.121->1.122 # F:pci/ac97/ac97_codec.c:1.148->1.149 # L:Include the AC97 codec name in the card longname of # L:motherboard controllers. # L:(to enhance the chance of getting useful bug reports :) # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_codec.c # 2004/09/10 09:19:29+02:00 perex@suse.cz +17 -0 # [ALSA] show codec name in card description # # D:2004/09/10 15:19:28 # C:AC97 Codec Core,ATIIXP driver,Intel8x0 driver,VIA82xx driver # F:include/ac97_codec.h:1.55->1.56 # F:pci/atiixp.c:1.22->1.23 # F:pci/intel8x0.c:1.167->1.168 # F:pci/via82xx.c:1.121->1.122 # F:pci/ac97/ac97_codec.c:1.148->1.149 # L:Include the AC97 codec name in the card longname of # L:motherboard controllers. # L:(to enhance the chance of getting useful bug reports :) # Signed-off-by: Clemens Ladisch # # include/sound/ac97_codec.h # 2004/09/10 09:19:28+02:00 perex@suse.cz +1 -0 # [ALSA] show codec name in card description # # D:2004/09/10 15:19:28 # C:AC97 Codec Core,ATIIXP driver,Intel8x0 driver,VIA82xx driver # F:include/ac97_codec.h:1.55->1.56 # F:pci/atiixp.c:1.22->1.23 # F:pci/intel8x0.c:1.167->1.168 # F:pci/via82xx.c:1.121->1.122 # F:pci/ac97/ac97_codec.c:1.148->1.149 # L:Include the AC97 codec name in the card longname of # L:motherboard controllers. # L:(to enhance the chance of getting useful bug reports :) # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:33:34+02:00 perex@suse.cz # [ALSA] Fix driver name for nforce and clean-up # # Intel8x0-modem driver # Driver name is always ICH-MODEM as defined in alsa-lib config. # Cosmetic cleanups: unused include files, MODULE_DEVICE update. # # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/09/08 10:23:50+02:00 perex@suse.cz +8 -13 # [ALSA] Fix driver name for nforce and clean-up # # D:2004/09/08 16:23:50 # C:Intel8x0-modem driver # F:pci/intel8x0m.c:1.19->1.20 # L:Driver name is always ICH-MODEM as defined in alsa-lib config. # L:Cosmetic cleanups: unused include files, MODULE_DEVICE update. # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:33:11+02:00 perex@suse.cz # [ALSA] Added missing header file for AudioTrak Prodigy 192 cards # # ICE1712 driver # # # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/stac946x.h # 2004/09/22 09:09:18+02:00 perex@suse.cz +25 -0 # [ALSA] Added missing header file for AudioTrak Prodigy 192 cards # # D:2004/09/08 12:28:25 # C:ICE1712 driver # F:pci/ice1712/stac946x.h:INITIAL->1.1 # L: # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/stac946x.h # 2004/09/22 09:09:18+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ice1712/stac946x.h # # ChangeSet # 2004/09/22 09:32:47+02:00 perex@suse.cz # [ALSA] copy_to_user() return value checking in snd_seq_read() # # ALSA sequencer # Here's a patch that ensures the copy_to_user() return value gets checked # and acted upon if it is != 0 (that is, if we failed to copy all data) in # snd_seq_read(). # # Signed-off-by: Jesper Juhl # Signed-off-by: Jaroslav Kysela # # sound/core/seq/seq_clientmgr.c # 2004/09/07 14:22:28+02:00 perex@suse.cz +4 -1 # [ALSA] copy_to_user() return value checking in snd_seq_read() # # D:2004/09/07 20:22:28 # C:ALSA sequencer # F:core/seq/seq_clientmgr.c:1.35->1.36 # L:Here's a patch that ensures the copy_to_user() return value gets checked # L:and acted upon if it is != 0 (that is, if we failed to copy all data) in # L:snd_seq_read(). # Signed-off-by: Jesper Juhl # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/09/22 09:32:20+02:00 perex@suse.cz # [ALSA] [ac97 core] added AC97_SCAP_DETECT_BY_VENDOR flag # # AC97 Codec Core,Intel8x0 driver # This patch adds a AC97_SCAP_DETECT_BY_VENDOR flag for Xbox. If the flag # is set, the AC97 codec is detected only by reading of a reasonable # vendor ID. It seems that Xbox has accessible only vendor/device ID # registers for reading. Also, a new xbox parameter for snd-intel8x0 # has been introduced to let user force this behaviour. # # Signed-off-by: Jaroslav Kysela # # sound/pci/intel8x0.c # 2004/09/07 10:58:24+02:00 perex@suse.cz +8 -0 # [ALSA] [ac97 core] added AC97_SCAP_DETECT_BY_VENDOR flag # # D:2004/09/07 16:58:24 # C:AC97 Codec Core,Intel8x0 driver # F:include/ac97_codec.h:1.54->1.55 # F:pci/intel8x0.c:1.166->1.167 # F:pci/ac97/ac97_codec.c:1.147->1.148 # L:This patch adds a AC97_SCAP_DETECT_BY_VENDOR flag for Xbox. If the flag # L:is set, the AC97 codec is detected only by reading of a reasonable # L:vendor ID. It seems that Xbox has accessible only vendor/device ID # L:registers for reading. Also, a new xbox parameter for snd-intel8x0 # L:has been introduced to let user force this behaviour. # Signed-off-by: Jaroslav Kysela # # sound/pci/ac97/ac97_codec.c # 2004/09/07 10:58:24+02:00 perex@suse.cz +18 -10 # [ALSA] [ac97 core] added AC97_SCAP_DETECT_BY_VENDOR flag # # D:2004/09/07 16:58:24 # C:AC97 Codec Core,Intel8x0 driver # F:include/ac97_codec.h:1.54->1.55 # F:pci/intel8x0.c:1.166->1.167 # F:pci/ac97/ac97_codec.c:1.147->1.148 # L:This patch adds a AC97_SCAP_DETECT_BY_VENDOR flag for Xbox. If the flag # L:is set, the AC97 codec is detected only by reading of a reasonable # L:vendor ID. It seems that Xbox has accessible only vendor/device ID # L:registers for reading. Also, a new xbox parameter for snd-intel8x0 # L:has been introduced to let user force this behaviour. # Signed-off-by: Jaroslav Kysela # # include/sound/ac97_codec.h # 2004/09/07 10:58:24+02:00 perex@suse.cz +1 -0 # [ALSA] [ac97 core] added AC97_SCAP_DETECT_BY_VENDOR flag # # D:2004/09/07 16:58:24 # C:AC97 Codec Core,Intel8x0 driver # F:include/ac97_codec.h:1.54->1.55 # F:pci/intel8x0.c:1.166->1.167 # F:pci/ac97/ac97_codec.c:1.147->1.148 # L:This patch adds a AC97_SCAP_DETECT_BY_VENDOR flag for Xbox. If the flag # L:is set, the AC97 codec is detected only by reading of a reasonable # L:vendor ID. It seems that Xbox has accessible only vendor/device ID # L:registers for reading. Also, a new xbox parameter for snd-intel8x0 # L:has been introduced to let user force this behaviour. # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/09/22 09:30:18+02:00 perex@suse.cz # [ALSA] mark snd_card_dummy_new_mixer() as static # # Generic drivers # # # Signed-off-by: Jaroslav Kysela # # sound/drivers/dummy.c # 2004/09/07 10:52:40+02:00 perex@suse.cz +1 -1 # [ALSA] mark snd_card_dummy_new_mixer() as static # # D:2004/09/07 16:52:40 # C:Generic drivers # F:drivers/dummy.c:1.32->1.33 # L: # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/09/22 09:29:41+02:00 perex@suse.cz # [ALSA] add UA-1000 sample rate detection # # USB generic driver # Instead of assuming 48 kHz, the driver now detects # the current sample rate setting. # # Signed-off-by: Clemens Ladisch # # sound/usb/usbquirks.h # 2004/09/07 10:09:08+02:00 perex@suse.cz +2 -28 # [ALSA] add UA-1000 sample rate detection # # D:2004/09/07 16:09:08 # C:USB generic driver # F:usb/usbaudio.c:1.107->1.108 # F:usb/usbaudio.h:1.33->1.34 # F:usb/usbquirks.h:1.36->1.37 # L:Instead of assuming 48 kHz, the driver now detects # L:the current sample rate setting. # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.h # 2004/09/07 10:09:08+02:00 perex@suse.cz +2 -1 # [ALSA] add UA-1000 sample rate detection # # D:2004/09/07 16:09:08 # C:USB generic driver # F:usb/usbaudio.c:1.107->1.108 # F:usb/usbaudio.h:1.33->1.34 # F:usb/usbquirks.h:1.36->1.37 # L:Instead of assuming 48 kHz, the driver now detects # L:the current sample rate setting. # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.c # 2004/09/07 10:09:08+02:00 perex@suse.cz +52 -0 # [ALSA] add UA-1000 sample rate detection # # D:2004/09/07 16:09:08 # C:USB generic driver # F:usb/usbaudio.c:1.107->1.108 # F:usb/usbaudio.h:1.33->1.34 # F:usb/usbquirks.h:1.36->1.37 # L:Instead of assuming 48 kHz, the driver now detects # L:the current sample rate setting. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:29:10+02:00 perex@suse.cz # [ALSA] Added support for AudioTrak Prodigy 192 cards # # ICE1712 driver,ICE1724 driver # # # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/prodigy192.h # 2004/09/22 09:08:13+02:00 perex@suse.cz +11 -0 # [ALSA] Added support for AudioTrak Prodigy 192 cards # # D:2004/09/07 16:02:49 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/Makefile:1.13->1.14 # F:pci/ice1712/ice1724.c:1.44->1.45 # F:pci/ice1712/prodigy192.c:INITIAL->1.1 # F:pci/ice1712/prodigy192.h:INITIAL->1.1 # L: # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/prodigy192.h # 2004/09/22 09:08:13+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ice1712/prodigy192.h # # sound/pci/ice1712/ice1724.c # 2004/09/07 10:02:49+02:00 perex@suse.cz +3 -0 # [ALSA] Added support for AudioTrak Prodigy 192 cards # # D:2004/09/07 16:02:49 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/Makefile:1.13->1.14 # F:pci/ice1712/ice1724.c:1.44->1.45 # F:pci/ice1712/prodigy192.c:INITIAL->1.1 # F:pci/ice1712/prodigy192.h:INITIAL->1.1 # L: # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/Makefile # 2004/09/07 10:02:49+02:00 perex@suse.cz +1 -1 # [ALSA] Added support for AudioTrak Prodigy 192 cards # # D:2004/09/07 16:02:49 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/Makefile:1.13->1.14 # F:pci/ice1712/ice1724.c:1.44->1.45 # F:pci/ice1712/prodigy192.c:INITIAL->1.1 # F:pci/ice1712/prodigy192.h:INITIAL->1.1 # L: # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/prodigy192.c # 2004/09/22 09:08:08+02:00 perex@suse.cz +524 -0 # [ALSA] Added support for AudioTrak Prodigy 192 cards # # D:2004/09/07 16:02:49 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/Makefile:1.13->1.14 # F:pci/ice1712/ice1724.c:1.44->1.45 # F:pci/ice1712/prodigy192.c:INITIAL->1.1 # F:pci/ice1712/prodigy192.h:INITIAL->1.1 # L: # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/prodigy192.c # 2004/09/22 09:08:08+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ice1712/prodigy192.c # # ChangeSet # 2004/09/22 09:28:40+02:00 perex@suse.cz # [ALSA] Fix the OSS PCM emulation - O_NONBLOCK write # # ALSA<-OSS emulation # This patch fixes the OSS PCM write() in O_NONBLOCK mode. # The previous code had not returned partial written bytes. # # Signed-off-by: Jaroslav Kysela # # sound/core/oss/pcm_oss.c # 2004/09/07 09:17:48+02:00 perex@suse.cz +9 -1 # [ALSA] Fix the OSS PCM emulation - O_NONBLOCK write # # D:2004/09/07 15:17:48 # C:ALSA<-OSS emulation # F:core/oss/pcm_oss.c:1.77->1.78 # L:This patch fixes the OSS PCM write() in O_NONBLOCK mode. # L:The previous code had not returned partial written bytes. # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/09/20 15:29:26-04:00 jgarzik@pobox.com # Merge # # drivers/net/smc91x.h # 2004/09/20 15:29:25-04:00 jgarzik@pobox.com +0 -0 # SCCS merged # # drivers/net/Kconfig # 2004/09/20 15:28:07-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/09/20 15:17:45-04:00 ralf@linux-mips.org # [PATCH] Stop queue on close in hdlcdrv # # The stop method of a driver should ensure queueing is stopped ... # # drivers/net/hamradio/hdlcdrv.c # 2004/05/04 07:47:17-04:00 ralf@linux-mips.org +2 -0 # Stop queue on close in hdlcdrv # # ChangeSet # 2004/09/20 14:44:20-04:00 romieu@fr.zoreil.com # [PATCH] via-velocity: wrong module name in Kconfig documentation # # Copy/paste abuse. # # drivers/net/Kconfig # 2004/08/14 06:11:16-04:00 romieu@fr.zoreil.com +1 -1 # via-velocity: wrong module name in Kconfig documentation # # ChangeSet # 2004/09/20 14:34:45-04:00 pavel@ucw.cz # [PATCH] swsuspend for ne2k-pci cards # # Author: Éric Brunet # # drivers/net/ne2k-pci.c # 2004/08/21 06:24:27-04:00 pavel@ucw.cz +31 -0 # PATCH: swsuspend for ne2k-pci cards # # ChangeSet # 2004/09/20 14:03:45-04:00 shemminger@osdl.org # [PATCH] (4/4) acenic - don't spin forever in hard_start_xmit # # If driver is stuck due to ring full and hardware or link error, don't spin # forever in the hard_start_xmit routine. # # Signed-off-by: Stephen Hemminger # # drivers/net/acenic.c # 2004/09/20 13:47:22-04:00 shemminger@osdl.org +11 -3 # (4/4) acenic - don't spin forever in hard_start_xmit # # ChangeSet # 2004/09/20 14:03:34-04:00 shemminger@osdl.org # [PATCH] (3/4) acenic - __iomem warnings cleanup # # This cleans all the compile warnings and most of the sparse warnings # for the acenic driver relating to io memory space. # Remaining warnings are because tx_ring can be either in i/o or not # depending on the version of the card. # Not tested on old TIGON card. # # Signed-off-by: Stephen Hemminger # # drivers/net/acenic.h # 2004/09/20 13:47:00-04:00 shemminger@osdl.org +4 -4 # (3/4) acenic - __iomem warnings cleanup # # drivers/net/acenic.c # 2004/09/20 13:47:00-04:00 shemminger@osdl.org +57 -80 # (3/4) acenic - __iomem warnings cleanup # # ChangeSet # 2004/09/20 14:03:22-04:00 shemminger@osdl.org # [PATCH] (2/4) acenic - eliminate MAX_SKB_FRAGS #if # # Since MAX_SKB_FRAGS is defined in both 2.4 and 2.6, it makes sense # to eliminate this old #if code. # # Signed-off-by: Stephen Hemminger # # drivers/net/acenic.h # 2004/09/20 13:46:46-04:00 shemminger@osdl.org +0 -11 # (2/4) acenic - eliminate MAX_SKB_FRAGS #if # # drivers/net/acenic.c # 2004/09/20 13:46:46-04:00 shemminger@osdl.org +2 -8 # (2/4) acenic - eliminate MAX_SKB_FRAGS #if # # ChangeSet # 2004/09/20 14:03:11-04:00 shemminger@osdl.org # [PATCH] (1/4) acenic - use netdev_priv # # Trivial, use netdev_priv # # Signed-off-by: Stephen Hemminger # # drivers/net/acenic.h # 2004/09/20 13:46:22-04:00 shemminger@osdl.org +2 -2 # (1/4) acenic - use netdev_priv # # drivers/net/acenic.c # 2004/09/20 13:46:22-04:00 shemminger@osdl.org +1 -1 # (1/4) acenic - use netdev_priv # # ChangeSet # 2004/09/17 10:37:55-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 - Ethtool -- 82545 do not support WoL # # drivers/net/e1000/e1000_ethtool.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +2 -0 # e1000 - Ethtool -- 82545 do not support WoL # # ChangeSet # 2004/09/17 10:37:43-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 - Polarity reversal workaround for 10F/10H links # # drivers/net/e1000/e1000_osdep.h # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +6 -0 # e1000 - Polarity reversal workaround for 10F/10H links # # drivers/net/e1000/e1000_hw.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +115 -0 # e1000 - Polarity reversal workaround for 10F/10H links # # ChangeSet # 2004/09/17 10:37:32-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 - Fix VLAN filter setup errors (while running on PPC) # # drivers/net/e1000/e1000_main.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +4 -4 # e1000 - Fix VLAN filter setup errors (while running on PPC) # # ChangeSet # 2004/09/17 10:37:20-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 Check value returned by from pci_enable_device # # drivers/net/e1000/e1000_main.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +2 -2 # e1000 Check value returned by from pci_enable_device # # drivers/net/e1000/e1000_ethtool.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +2 -2 # e1000 Check value returned by from pci_enable_device # # ChangeSet # 2004/09/17 10:37:08-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 - Removed support for advanced TCO features # # drivers/net/e1000/e1000_main.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +2 -9 # e1000 - Removed support for advanced TCO features # # ChangeSet # 2004/09/17 10:36:56-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 - use pci_device_name for syslog messages till # registering netdevice. # # drivers/net/e1000/e1000_main.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +5 -11 # e1000 - use pci_device_name for syslog messages till # registering netdevice. # # drivers/net/e1000/e1000.h # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +0 -2 # e1000 - use pci_device_name for syslog messages till # registering netdevice. # # ChangeSet # 2004/09/17 10:26:28-04:00 ganesh.venkatesan@intel.com # [PATCH] e100 driver version number update # # drivers/net/e100.c # 2004/09/09 17:51:32-04:00 ganesh.venkatesan@intel.com +2 -2 # e100 driver version number update # # ChangeSet # 2004/09/17 10:26:17-04:00 ganesh.venkatesan@intel.com # [PATCH] e100 - use NET_IP_ALIGN to set rx data buffer alignment # # drivers/net/e100.c # 2004/09/09 17:51:32-04:00 ganesh.venkatesan@intel.com +2 -4 # e100 - use NET_IP_ALIGN to set rx data buffer alignment # # ChangeSet # 2004/09/17 10:26:04-04:00 ganesh.venkatesan@intel.com # [PATCH] e100 - Use pci_device_name for syslog messages till registering netdevice # # drivers/net/e100.c # 2004/09/09 17:51:32-04:00 ganesh.venkatesan@intel.com +2 -0 # e100 - Use pci_device_name for syslog messages till registering netdevice # # ChangeSet # 2004/09/16 20:21:15-04:00 akpm@osdl.org # [PATCH] add missing pci_disable_device for e1000 # # From: Kenji Kaneshige # # This patch adds pci_disable_device() into e1000_remove(). # # If your driver decides to stop using the device, it should call # pci_disable_device() to deallocate any IRQ resources, disable PCI # bus-mastering, etc. # # Signed-off-by: Kenji Kaneshige # Signed-off-by: Andrew Morton # # drivers/net/e1000/e1000_main.c # 2004/09/13 02:03:20-04:00 akpm@osdl.org +2 -0 # add missing pci_disable_device for e1000 # # ChangeSet # 2004/09/06 20:33:07+02:00 perex@suse.cz # [ALSA] [emu10k1] Audigy DSP support # # EMU10K1/EMU10K2 driver # This patch will add better support for Audigy DSP. More gpr, # instruction and tram. It will break binary compatibility for app # which use emu10k1 hwdep. # # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emuproc.c # 2004/09/06 10:05:19+02:00 perex@suse.cz +19 -11 # [ALSA] [emu10k1] Audigy DSP support # # D:2004/09/06 16:05:18 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.45->1.46 # F:pci/emu10k1/emufx.c:1.58->1.59 # F:pci/emu10k1/emuproc.c:1.20->1.21 # L:This patch will add better support for Audigy DSP. More gpr, # L:instruction and tram. It will break binary compatibility for app # L:which use emu10k1 hwdep. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emufx.c # 2004/09/06 10:05:18+02:00 perex@suse.cz +25 -17 # [ALSA] [emu10k1] Audigy DSP support # # D:2004/09/06 16:05:18 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.45->1.46 # F:pci/emu10k1/emufx.c:1.58->1.59 # F:pci/emu10k1/emuproc.c:1.20->1.21 # L:This patch will add better support for Audigy DSP. More gpr, # L:instruction and tram. It will break binary compatibility for app # L:which use emu10k1 hwdep. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # include/sound/emu10k1.h # 2004/09/06 10:05:18+02:00 perex@suse.cz +37 -24 # [ALSA] [emu10k1] Audigy DSP support # # D:2004/09/06 16:05:18 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.45->1.46 # F:pci/emu10k1/emufx.c:1.58->1.59 # F:pci/emu10k1/emuproc.c:1.20->1.21 # L:This patch will add better support for Audigy DSP. More gpr, # L:instruction and tram. It will break binary compatibility for app # L:which use emu10k1 hwdep. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:25:33+02:00 perex@suse.cz # [ALSA] Added Compaq Evo W4000 quirk # # Intel8x0 driver # Added an AC97 quirk entry for Compaq Evo W4000. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/09/06 07:51:11+02:00 perex@suse.cz +6 -0 # [ALSA] Added Compaq Evo W4000 quirk # # D:2004/09/06 13:51:11 # C:Intel8x0 driver # F:pci/intel8x0.c:1.165->1.166 # L:Added an AC97 quirk entry for Compaq Evo W4000. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:24:49+02:00 perex@suse.cz # [ALSA] detect errors reported by the hardware # # BT87x driver # stop the PCM if the hardware reports FIFO/PCI errors # # Signed-off-by: Clemens Ladisch # # sound/pci/bt87x.c # 2004/09/06 03:10:32+02:00 perex@suse.cz +3 -2 # [ALSA] detect errors reported by the hardware # # D:2004/09/06 09:10:32 # C:BT87x driver # F:pci/bt87x.c:1.11->1.12 # L:stop the PCM if the hardware reports FIFO/PCI errors # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/06 20:24:04+02:00 perex@suse.cz # [ALSA] inverted EAPD support # # Documentation,AC97 Codec Core,Intel8x0 driver,CS46xx driver # Since there are more than one (broken) implementation of EAPD bit # on ac97 chips, the new scaps bit is added for the inverted EAPD. # Also, AC97_TUNE_INV_EAPD is used to tune this behavior later by # snd_ac97_tune_hardware(). # # The ac97 quirk entry for Sony S1XP is added to turn this on. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/09/03 09:21:14+02:00 perex@suse.cz +6 -0 # [ALSA] inverted EAPD support # # D:2004/09/03 15:21:13 # C:Documentation,AC97 Codec Core,Intel8x0 driver,CS46xx driver # F:Documentation/ALSA-Configuration.txt:1.51->1.52 # F:include/ac97_codec.h:1.53->1.54 # F:pci/intel8x0.c:1.164->1.165 # F:pci/ac97/ac97_codec.c:1.146->1.147 # F:pci/cs46xx/cs46xx_lib.c:1.83->1.84 # L:Since there are more than one (broken) implementation of EAPD bit # L:on ac97 chips, the new scaps bit is added for the inverted EAPD. # L:Also, AC97_TUNE_INV_EAPD is used to tune this behavior later by # L:snd_ac97_tune_hardware(). # L: # L:The ac97 quirk entry for Sony S1XP is added to turn this on. # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/09/03 09:21:24+02:00 perex@suse.cz +2 -12 # [ALSA] inverted EAPD support # # D:2004/09/03 15:21:13 # C:Documentation,AC97 Codec Core,Intel8x0 driver,CS46xx driver # F:Documentation/ALSA-Configuration.txt:1.51->1.52 # F:include/ac97_codec.h:1.53->1.54 # F:pci/intel8x0.c:1.164->1.165 # F:pci/ac97/ac97_codec.c:1.146->1.147 # F:pci/cs46xx/cs46xx_lib.c:1.83->1.84 # L:Since there are more than one (broken) implementation of EAPD bit # L:on ac97 chips, the new scaps bit is added for the inverted EAPD. # L:Also, AC97_TUNE_INV_EAPD is used to tune this behavior later by # L:snd_ac97_tune_hardware(). # L: # L:The ac97 quirk entry for Sony S1XP is added to turn this on. # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/09/03 09:21:14+02:00 perex@suse.cz +30 -6 # [ALSA] inverted EAPD support # # D:2004/09/03 15:21:13 # C:Documentation,AC97 Codec Core,Intel8x0 driver,CS46xx driver # F:Documentation/ALSA-Configuration.txt:1.51->1.52 # F:include/ac97_codec.h:1.53->1.54 # F:pci/intel8x0.c:1.164->1.165 # F:pci/ac97/ac97_codec.c:1.146->1.147 # F:pci/cs46xx/cs46xx_lib.c:1.83->1.84 # L:Since there are more than one (broken) implementation of EAPD bit # L:on ac97 chips, the new scaps bit is added for the inverted EAPD. # L:Also, AC97_TUNE_INV_EAPD is used to tune this behavior later by # L:snd_ac97_tune_hardware(). # L: # L:The ac97 quirk entry for Sony S1XP is added to turn this on. # Signed-off-by: Takashi Iwai # # include/sound/ac97_codec.h # 2004/09/03 09:21:14+02:00 perex@suse.cz +2 -0 # [ALSA] inverted EAPD support # # D:2004/09/03 15:21:13 # C:Documentation,AC97 Codec Core,Intel8x0 driver,CS46xx driver # F:Documentation/ALSA-Configuration.txt:1.51->1.52 # F:include/ac97_codec.h:1.53->1.54 # F:pci/intel8x0.c:1.164->1.165 # F:pci/ac97/ac97_codec.c:1.146->1.147 # F:pci/cs46xx/cs46xx_lib.c:1.83->1.84 # L:Since there are more than one (broken) implementation of EAPD bit # L:on ac97 chips, the new scaps bit is added for the inverted EAPD. # L:Also, AC97_TUNE_INV_EAPD is used to tune this behavior later by # L:snd_ac97_tune_hardware(). # L: # L:The ac97 quirk entry for Sony S1XP is added to turn this on. # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/ALSA-Configuration.txt # 2004/09/03 09:21:13+02:00 perex@suse.cz +1 -0 # [ALSA] inverted EAPD support # # D:2004/09/03 15:21:13 # C:Documentation,AC97 Codec Core,Intel8x0 driver,CS46xx driver # F:Documentation/ALSA-Configuration.txt:1.51->1.52 # F:include/ac97_codec.h:1.53->1.54 # F:pci/intel8x0.c:1.164->1.165 # F:pci/ac97/ac97_codec.c:1.146->1.147 # F:pci/cs46xx/cs46xx_lib.c:1.83->1.84 # L:Since there are more than one (broken) implementation of EAPD bit # L:on ac97 chips, the new scaps bit is added for the inverted EAPD. # L:Also, AC97_TUNE_INV_EAPD is used to tune this behavior later by # L:snd_ac97_tune_hardware(). # L: # L:The ac97 quirk entry for Sony S1XP is added to turn this on. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:23:17+02:00 perex@suse.cz # [ALSA] ac97 quirk entry for Soltek SL-75DRV5 # # VIA82xx driver # Added an ac97 quirk entry for Soltek SL-75DRV5. # Since the PCI subsystem id is identical with ASRock K7VT2, codec_id is # used additionally to tell between them. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/09/03 09:17:29+02:00 perex@suse.cz +7 -0 # [ALSA] ac97 quirk entry for Soltek SL-75DRV5 # # D:2004/09/03 15:17:29 # C:VIA82xx driver # F:pci/via82xx.c:1.120->1.121 # L:Added an ac97 quirk entry for Soltek SL-75DRV5. # L:Since the PCI subsystem id is identical with ASRock K7VT2, codec_id is # L:used additionally to tell between them. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:22:32+02:00 perex@suse.cz # [ALSA] [ac97] Check ac97 codec id in quirk table # # AC97 Codec Core # Added codec_id field to ac97_quirk struct so that the devices with # the same PCI subsystem IDs but with different AC97 chips can be # distinguished properly. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/09/03 09:15:35+02:00 perex@suse.cz +2 -0 # [ALSA] [ac97] Check ac97 codec id in quirk table # # D:2004/09/03 15:15:35 # C:AC97 Codec Core # F:include/ac97_codec.h:1.52->1.53 # F:pci/ac97/ac97_codec.c:1.145->1.146 # L:Added codec_id field to ac97_quirk struct so that the devices with # L:the same PCI subsystem IDs but with different AC97 chips can be # L:distinguished properly. # Signed-off-by: Takashi Iwai # # include/sound/ac97_codec.h # 2004/09/03 09:15:35+02:00 perex@suse.cz +1 -0 # [ALSA] [ac97] Check ac97 codec id in quirk table # # D:2004/09/03 15:15:35 # C:AC97 Codec Core # F:include/ac97_codec.h:1.52->1.53 # F:pci/ac97/ac97_codec.c:1.145->1.146 # L:Added codec_id field to ac97_quirk struct so that the devices with # L:the same PCI subsystem IDs but with different AC97 chips can be # L:distinguished properly. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:21:46+02:00 perex@suse.cz # [ALSA] [ac97] Added VIA shared type. # # AC97 Codec Core,VIA82xx driver # Added a new shared type AC97_SHARED_TYPE_VIA for via82xx southbridge # to share codecs between audio and modem drivers. # # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/09/03 08:50:25+02:00 perex@suse.cz +1 -0 # [ALSA] [ac97] Added VIA shared type. # # D:2004/09/03 14:50:25 # C:AC97 Codec Core,VIA82xx driver # F:include/ac97_codec.h:1.51->1.52 # F:pci/via82xx.c:1.119->1.120 # L:Added a new shared type AC97_SHARED_TYPE_VIA for via82xx southbridge # L:to share codecs between audio and modem drivers. # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # include/sound/ac97_codec.h # 2004/09/03 08:50:25+02:00 perex@suse.cz +1 -0 # [ALSA] [ac97] Added VIA shared type. # # D:2004/09/03 14:50:25 # C:AC97 Codec Core,VIA82xx driver # F:include/ac97_codec.h:1.51->1.52 # F:pci/via82xx.c:1.119->1.120 # L:Added a new shared type AC97_SHARED_TYPE_VIA for via82xx southbridge # L:to share codecs between audio and modem drivers. # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:21:03+02:00 perex@suse.cz # [ALSA] add mixer quirk for LineX FM Transmitter # # USB generic driver # The LineX FM Transmitter needs a mixer quirk entry # to ignore control errors. # # Signed-off-by: Lonnie Mendez # Signed-off-by: Clemens Ladisch # # sound/usb/usbmixer_maps.c # 2004/09/03 07:33:11+02:00 perex@suse.cz +9 -0 # [ALSA] add mixer quirk for LineX FM Transmitter # # D:2004/09/03 13:33:11 # C:USB generic driver # F:usb/usbmixer_maps.c:1.7->1.8 # L:The LineX FM Transmitter needs a mixer quirk entry # L:to ignore control errors. # Signed-off-by: Lonnie Mendez # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/06 20:20:18+02:00 perex@suse.cz # [ALSA] remove gameport/MIDI support # # Documentation,PCI drivers,Intel8x0 driver # snd-intel8x0's gameport/MIDI code has quite a few problems: the port # addresses cannot be detected reliably (or not at all with newer LPC # bridge devices), joystick port address 0x208 isn't supported, the MIDI # interrupt isn't detected, PnP isn't supported, changing the port # addresses in the LPC bridge configuration doesn't affect the devices # in the Super-I/O chip connected to the LPC bus, and registering this # driver for the LPC bridge PCI device prevents other drivers using the # LPC's PCI id from loading later. # # All these problems can be cured by removing the offending code and # using the proper modules for these devices (ns558/snd-mpu401) instead. # # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/09/03 05:32:02+02:00 perex@suse.cz +0 -146 # [ALSA] remove gameport/MIDI support # # D:2004/09/03 11:32:02 # C:Documentation,PCI drivers,Intel8x0 driver # F:Documentation/ALSA-Configuration.txt:1.50->1.51 # F:pci/Kconfig:1.31->1.32 # F:pci/intel8x0.c:1.163->1.164 # L:snd-intel8x0's gameport/MIDI code has quite a few problems: the port # L:addresses cannot be detected reliably (or not at all with newer LPC # L:bridge devices), joystick port address 0x208 isn't supported, the MIDI # L:interrupt isn't detected, PnP isn't supported, changing the port # L:addresses in the LPC bridge configuration doesn't affect the devices # L:in the Super-I/O chip connected to the LPC bus, and registering this # L:driver for the LPC bridge PCI device prevents other drivers using the # L:LPC's PCI id from loading later. # L: # L:All these problems can be cured by removing the offending code and # L:using the proper modules for these devices (ns558/snd-mpu401) instead. # Signed-off-by: Clemens Ladisch # # sound/pci/Kconfig # 2004/09/03 05:32:02+02:00 perex@suse.cz +0 -1 # [ALSA] remove gameport/MIDI support # # D:2004/09/03 11:32:02 # C:Documentation,PCI drivers,Intel8x0 driver # F:Documentation/ALSA-Configuration.txt:1.50->1.51 # F:pci/Kconfig:1.31->1.32 # F:pci/intel8x0.c:1.163->1.164 # L:snd-intel8x0's gameport/MIDI code has quite a few problems: the port # L:addresses cannot be detected reliably (or not at all with newer LPC # L:bridge devices), joystick port address 0x208 isn't supported, the MIDI # L:interrupt isn't detected, PnP isn't supported, changing the port # L:addresses in the LPC bridge configuration doesn't affect the devices # L:in the Super-I/O chip connected to the LPC bus, and registering this # L:driver for the LPC bridge PCI device prevents other drivers using the # L:LPC's PCI id from loading later. # L: # L:All these problems can be cured by removing the offending code and # L:using the proper modules for these devices (ns558/snd-mpu401) instead. # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/ALSA-Configuration.txt # 2004/09/03 05:32:02+02:00 perex@suse.cz +3 -4 # [ALSA] remove gameport/MIDI support # # D:2004/09/03 11:32:02 # C:Documentation,PCI drivers,Intel8x0 driver # F:Documentation/ALSA-Configuration.txt:1.50->1.51 # F:pci/Kconfig:1.31->1.32 # F:pci/intel8x0.c:1.163->1.164 # L:snd-intel8x0's gameport/MIDI code has quite a few problems: the port # L:addresses cannot be detected reliably (or not at all with newer LPC # L:bridge devices), joystick port address 0x208 isn't supported, the MIDI # L:interrupt isn't detected, PnP isn't supported, changing the port # L:addresses in the LPC bridge configuration doesn't affect the devices # L:in the Super-I/O chip connected to the LPC bus, and registering this # L:driver for the LPC bridge PCI device prevents other drivers using the # L:LPC's PCI id from loading later. # L: # L:All these problems can be cured by removing the offending code and # L:using the proper modules for these devices (ns558/snd-mpu401) instead. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/06 20:19:32+02:00 perex@suse.cz # [ALSA] add AC97 quirk for Fujitsu-Siemens E4010 # # Intel8x0 driver # # # Signed-off-by: # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/09/02 06:59:21+02:00 perex@suse.cz +6 -0 # [ALSA] add AC97 quirk for Fujitsu-Siemens E4010 # # D:2004/09/02 12:59:21 # C:Intel8x0 driver # F:pci/intel8x0.c:1.162->1.163 # L: # Signed-off-by: # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/06 20:18:46+02:00 perex@suse.cz # [ALSA] Fix latency in ens1371 driver # # ENS1370/1+ driver # The high latency in prepare callback of ens1371 driver is fixed. # The *_rate_set() functions are moved outside of spinlock, and # cond_resched() is inserted in the busy probing loop. # # Signed-off-by: Takashi Iwai # # sound/pci/ens1370.c # 2004/09/01 14:27:33+02:00 perex@suse.cz +18 -6 # [ALSA] Fix latency in ens1371 driver # # D:2004/09/01 20:27:33 # C:ENS1370/1+ driver # F:pci/ens1370.c:1.68->1.69 # L:The high latency in prepare callback of ens1371 driver is fixed. # L:The *_rate_set() functions are moved outside of spinlock, and # L:cond_resched() is inserted in the busy probing loop. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:18:03+02:00 perex@suse.cz # [ALSA] suppress auto-loading of modules in module_init(). # # ALSA sequencer # The auto-loading of sequencer modules is suppressed in module_init(). # The recent module-init-tools may cause blocking. # # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_clientmgr.c # 2004/09/01 14:25:27+02:00 perex@suse.cz +4 -1 # [ALSA] suppress auto-loading of modules in module_init(). # # D:2004/09/01 20:25:27 # C:ALSA sequencer # F:core/seq/seq_clientmgr.c:1.34->1.35 # L:The auto-loading of sequencer modules is suppressed in module_init(). # L:The recent module-init-tools may cause blocking. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:17:20+02:00 perex@suse.cz # [ALSA] add missing ifdef for disabling MIDI # # Intel8x0 driver # # # Signed-off-by: # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/09/01 02:41:19+02:00 perex@suse.cz +2 -0 # [ALSA] add missing ifdef for disabling MIDI # # D:2004/09/01 08:41:19 # C:Intel8x0 driver # F:pci/intel8x0.c:1.161->1.162 # L: # Signed-off-by: # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/06 20:16:34+02:00 perex@suse.cz # [ALSA] AC97 96 kHz sample rate support # # Documentation,AC97 Codec Core,Intel8x0 driver # # # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/09/01 02:30:56+02:00 perex@suse.cz +26 -11 # [ALSA] AC97 96 kHz sample rate support # # D:2004/09/01 08:30:56 # C:Documentation,AC97 Codec Core,Intel8x0 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.38->1.39 # F:include/ac97_codec.h:1.50->1.51 # F:pci/intel8x0.c:1.160->1.161 # F:pci/ac97/ac97_codec.c:1.144->1.145 # F:pci/ac97/ac97_pcm.c:1.16->1.17 # F:pci/ac97/ac97_proc.c:1.10->1.11 # L: # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_proc.c # 2004/09/01 02:30:57+02:00 perex@suse.cz +4 -0 # [ALSA] AC97 96 kHz sample rate support # # D:2004/09/01 08:30:56 # C:Documentation,AC97 Codec Core,Intel8x0 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.38->1.39 # F:include/ac97_codec.h:1.50->1.51 # F:pci/intel8x0.c:1.160->1.161 # F:pci/ac97/ac97_codec.c:1.144->1.145 # F:pci/ac97/ac97_pcm.c:1.16->1.17 # F:pci/ac97/ac97_proc.c:1.10->1.11 # L: # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_pcm.c # 2004/09/01 02:30:57+02:00 perex@suse.cz +120 -34 # [ALSA] AC97 96 kHz sample rate support # # D:2004/09/01 08:30:56 # C:Documentation,AC97 Codec Core,Intel8x0 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.38->1.39 # F:include/ac97_codec.h:1.50->1.51 # F:pci/intel8x0.c:1.160->1.161 # F:pci/ac97/ac97_codec.c:1.144->1.145 # F:pci/ac97/ac97_pcm.c:1.16->1.17 # F:pci/ac97/ac97_proc.c:1.10->1.11 # L: # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_codec.c # 2004/09/01 02:30:57+02:00 perex@suse.cz +31 -1 # [ALSA] AC97 96 kHz sample rate support # # D:2004/09/01 08:30:56 # C:Documentation,AC97 Codec Core,Intel8x0 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.38->1.39 # F:include/ac97_codec.h:1.50->1.51 # F:pci/intel8x0.c:1.160->1.161 # F:pci/ac97/ac97_codec.c:1.144->1.145 # F:pci/ac97/ac97_pcm.c:1.16->1.17 # F:pci/ac97/ac97_proc.c:1.10->1.11 # L: # Signed-off-by: Clemens Ladisch # # include/sound/ac97_codec.h # 2004/09/01 02:30:56+02:00 perex@suse.cz +10 -1 # [ALSA] AC97 96 kHz sample rate support # # D:2004/09/01 08:30:56 # C:Documentation,AC97 Codec Core,Intel8x0 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.38->1.39 # F:include/ac97_codec.h:1.50->1.51 # F:pci/intel8x0.c:1.160->1.161 # F:pci/ac97/ac97_codec.c:1.144->1.145 # F:pci/ac97/ac97_pcm.c:1.16->1.17 # F:pci/ac97/ac97_proc.c:1.10->1.11 # L: # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/09/01 02:30:56+02:00 perex@suse.cz +2 -2 # [ALSA] AC97 96 kHz sample rate support # # D:2004/09/01 08:30:56 # C:Documentation,AC97 Codec Core,Intel8x0 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.38->1.39 # F:include/ac97_codec.h:1.50->1.51 # F:pci/intel8x0.c:1.160->1.161 # F:pci/ac97/ac97_codec.c:1.144->1.145 # F:pci/ac97/ac97_pcm.c:1.16->1.17 # F:pci/ac97/ac97_proc.c:1.10->1.11 # L: # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/06 20:15:40+02:00 perex@suse.cz # [ALSA] Korg1212 misc fixes # # KORG1212 driver # The DSP firmware download timeout has been increased; # Some concurrent device settings has been fixed (I have shameless copied # some code from RME9652); and # One debug message was fixed. # # Signed-off-by: Haroldo Gamal # Signed-off-by: Takashi Iwai # # sound/pci/korg1212/korg1212.c # 2004/08/31 04:50:15+02:00 perex@suse.cz +59 -9 # [ALSA] Korg1212 misc fixes # # D:2004/08/31 10:50:15 # C:KORG1212 driver # F:pci/korg1212/korg1212.c:1.47->1.48 # L:The DSP firmware download timeout has been increased; # L:Some concurrent device settings has been fixed (I have shameless copied # L:some code from RME9652); and # L:One debug message was fixed. # Signed-off-by: Haroldo Gamal # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:14:51+02:00 perex@suse.cz # [ALSA] Enable __GFP_NOWARN as default for buffer allocation # # Memalloc module # __GFP_NOWARN is enabled for DMA buffer allocation regardless of # its size. The DMA buffer allocation is not a critical task. # # Signed-off-by: Takashi Iwai # # sound/core/memalloc.c # 2004/08/31 04:49:23+02:00 perex@suse.cz +3 -4 # [ALSA] Enable __GFP_NOWARN as default for buffer allocation # # D:2004/08/31 10:49:23 # C:Memalloc module # F:core/memalloc.c:1.37->1.38 # L:__GFP_NOWARN is enabled for DMA buffer allocation regardless of # L:its size. The DMA buffer allocation is not a critical task. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:14:05+02:00 perex@suse.cz # [ALSA] Added __GFP_NORETRY to avoid OOM-killer # # Memalloc module # __GFP_NORETRY is added to the DMA buffer allocator to avoid triggering # OOM-killer. # # Signed-off-by: Takashi Iwai # # sound/core/memalloc.c # 2004/08/30 12:39:22+02:00 perex@suse.cz +1 -0 # [ALSA] Added __GFP_NORETRY to avoid OOM-killer # # D:2004/08/30 18:39:22 # C:Memalloc module # F:core/memalloc.c:1.36->1.37 # L:__GFP_NORETRY is added to the DMA buffer allocator to avoid triggering # L:OOM-killer. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:13:09+02:00 perex@suse.cz # ALSA CVS update # ES18xx driver # Fixed a bug in setting the filter register. # # A fix from the kernel OSS driver. The original report/patch is from # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=204147 # # Signed-off-by: Takashi Iwai # # sound/isa/es18xx.c # 2004/08/26 10:57:47+02:00 perex@suse.cz +5 -0 # ALSA CVS update # D:2004/08/26 16:57:47 # C:ES18xx driver # F:isa/es18xx.c:1.48->1.49 # L:Fixed a bug in setting the filter register. # L: # L:A fix from the kernel OSS driver. The original report/patch is from # L:http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=204147 # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:12:22+02:00 perex@suse.cz # ALSA CVS update # ICE1712 driver # Allow the private EEPROM image for evaluation boards # # The driver may have a private EEPROM image instead of reading # from the board (as well as ice1724 does). It'll be helpful for # test boards. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.c # 2004/08/26 10:55:43+02:00 perex@suse.cz +39 -19 # ALSA CVS update # D:2004/08/26 16:55:43 # C:ICE1712 driver # F:pci/ice1712/ice1712.c:1.61->1.62 # L:Allow the private EEPROM image for evaluation boards # L: # L:The driver may have a private EEPROM image instead of reading # L:from the board (as well as ice1724 does). It'll be helpful for # L:test boards. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:11:34+02:00 perex@suse.cz # ALSA CVS update # ENS1370/1+ driver # Fixed AC3-passthru on ens1371/1373 boards. # # SRC is bypassed when the sample rate is 48k, so that the non-audio # signal won't be broken. The other sample rates still need SRC. # # Signed-off-by: Takashi Iwai # # sound/pci/ens1370.c # 2004/08/26 10:53:55+02:00 perex@suse.cz +7 -0 # ALSA CVS update # D:2004/08/26 16:53:55 # C:ENS1370/1+ driver # F:pci/ens1370.c:1.67->1.68 # L:Fixed AC3-passthru on ens1371/1373 boards. # L: # L:SRC is bypassed when the sample rate is 48k, so that the non-audio # L:signal won't be broken. The other sample rates still need SRC. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/02 10:19:56-05:00 shaggy@austin.ibm.com # JFS: Fix extent overflow bugs # # The code which handled adding a new extent when it is unable to grow an extent # past the maximum size made an invalid assumption about when the root page # would split. # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_xtree.c # 2004/09/02 10:19:36-05:00 shaggy@austin.ibm.com +26 -34 # Code splitting extents when maximum extent size reached was buggy # # ChangeSet # 2004/08/29 16:37:18-04:00 jgarzik@pobox.com # [netdev] Remove no-op in-driver implementations of ->set_config() # # drivers/net/wireless/netwave_cs.c # 2004/08/29 16:37:11-04:00 jgarzik@pobox.com +0 -12 # [netdev] Remove no-op in-driver implementations of ->set_config() # # drivers/net/wan/lmc/lmc_main.c # 2004/08/29 16:37:11-04:00 jgarzik@pobox.com +0 -9 # [netdev] Remove no-op in-driver implementations of ->set_config() # # drivers/net/sk_mca.c # 2004/08/29 16:37:11-04:00 jgarzik@pobox.com +0 -9 # [netdev] Remove no-op in-driver implementations of ->set_config() # # drivers/net/meth.c # 2004/08/29 16:37:11-04:00 jgarzik@pobox.com +0 -26 # [netdev] Remove no-op in-driver implementations of ->set_config() # # drivers/net/ibmlana.c # 2004/08/29 16:37:11-04:00 jgarzik@pobox.com +0 -9 # [netdev] Remove no-op in-driver implementations of ->set_config() # # drivers/media/dvb/dvb-core/dvb_net.c # 2004/08/29 16:37:11-04:00 jgarzik@pobox.com +0 -9 # [netdev] Remove no-op in-driver implementations of ->set_config() # # ChangeSet # 2004/08/28 19:25:49-04:00 olh@suse.de # [PATCH] remove old version check from mac8390 # # This 'netdevice' define will end up in the 'tags' file. # Its not used, so just remove it. # # drivers/net/mac8390.c # 2004/08/21 11:45:12-04:00 olh@suse.de +0 -4 # remove old version check from mac8390 # # ChangeSet # 2004/08/28 19:00:51-04:00 akpm@osdl.org # [PATCH] de4x5 warning fix # # Ugh. # # drivers/net/tulip/de4x5.c: In function `mii_get_phy': # drivers/net/tulip/de4x5.c:5092: warning: operation on `i' may be undefined # # Signed-off-by: Andrew Morton # # drivers/net/tulip/de4x5.c # 2004/08/26 03:24:25-04:00 akpm@osdl.org +1 -1 # de4x5 warning fix # # ChangeSet # 2004/08/28 18:53:53-04:00 akpm@osdl.org # [PATCH] sparse: fix warnings in net/irda/* # # From: "Mika Kukkonen" # # CHECK net/irda/irlan/irlan_client.c # net/irda/irlan/irlan_client.c:237:14: warning: assignment expression in # conditional # # Signed-off-by: Andrew Morton # # net/irda/irlan/irlan_client.c # 2004/08/27 02:30:32-04:00 akpm@osdl.org +1 -1 # sparse: fix warnings in net/irda/* # # ChangeSet # 2004/08/28 18:52:23-04:00 akpm@osdl.org # [PATCH] defxx device name fixes # # From: "Maciej W. Rozycki" # # This is a fix for the "fddi%d" device name reported literally due to the # switch from init_fddidev() to alloc_fddidev(). Plus related updates to # module information. Applies on top of the 2.4.27-defxx-sync2681 or # 2.6.8.1-defxx-misc patches, respectively. Please apply. # # Signed-off-by: Maciej W. Rozycki # Signed-off-by: Andrew Morton # # drivers/net/defxx.c # 2004/08/24 22:18:36-04:00 akpm@osdl.org +68 -68 # defxx device name fixes # # ChangeSet # 2004/08/28 18:52:12-04:00 akpm@osdl.org # [PATCH] defxx trivial updates # # From: "Maciej W. Rozycki" # # Here are a few obvious clean-ups I did to the driver. # # Signed-off-by: Maciej W. Rozycki # Signed-off-by: Andrew Morton # # drivers/net/defxx.h # 2004/08/24 22:18:36-04:00 akpm@osdl.org +1 -1 # defxx trivial updates # # drivers/net/defxx.c # 2004/08/24 22:18:36-04:00 akpm@osdl.org +5 -5 # defxx trivial updates # diff -Nru a/CREDITS b/CREDITS --- a/CREDITS 2004-11-10 17:19:05 -08:00 +++ b/CREDITS 2004-11-10 17:19:05 -08:00 @@ -46,13 +46,11 @@ S: United Kingdom N: Werner Almesberger -E: werner.almesberger@epfl.ch +E: werner@almesberger.net +W: http://www.almesberger.net/ D: dosfs, LILO, some fd features, ATM, various other hacks here and there -S: Ecole Polytechnique Federale de Lausanne -S: DSC ICA -S: INN (Ecublens) -S: CH-1015 Lausanne -S: Switzerland +S: Buenos Aires +S: Argentina N: Tim Alpaerts E: tim_alpaerts@toyota-motor-europe.com @@ -495,6 +493,14 @@ N: Matthias Bruestle E: m@mbsks.franken.de D: REINER SCT cyberJack pinpad/e-com USB chipcard reader driver +S: Germany + +N: Adrian Bunk +E: bunk@stusta.de +P: 1024D/4F12B400 B29C E71E FE19 6755 5C8A 84D4 99FC EA98 4F12 B400 +D: misc kernel hacking and testing +S: Grasmeierstrasse 11 +S: 80805 Muenchen S: Germany N: Ray Burr diff -Nru a/Documentation/00-INDEX b/Documentation/00-INDEX --- a/Documentation/00-INDEX 2004-11-10 17:19:03 -08:00 +++ b/Documentation/00-INDEX 2004-11-10 17:19:03 -08:00 @@ -20,6 +20,8 @@ - list of changes that break older software packages. CodingStyle - how the boss likes the C code in the kernel to look. +DMA-API.txt + - DMA API, pci_ API & extensions for non-consistent memory machines. DMA-mapping.txt - info for PCI drivers using DMA portably across all platforms. DocBook/ @@ -30,8 +32,12 @@ - info on Linux Intelligent Platform Management Interface (IPMI) Driver. IRQ-affinity.txt - how to select which CPU(s) handle which interrupt events on SMP. +ManagementStyle + - how to (attempt to) manage kernel hackers. MSI-HOWTO.txt - the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ. +RCU/ + - directory with info on RCU (read-copy update). README.DAC960 - info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux. README.moxa @@ -46,8 +52,6 @@ - how to change your VGA cursor from a blinking underscore. arm/ - directory with info about Linux on the ARM architecture. -as-iosched.txt - - info on anticipatory IO scheduler. basic_profiling.txt - basic instructions for those who wants to profile Linux kernel. binfmt_misc.txt @@ -60,20 +64,24 @@ - info, major/minor #'s for Compaq's SMART Array Controllers. cdrom/ - directory with information on the CD-ROM drivers that Linux has. +cli-sti-removal.txt + - cli()/sti() removal guide. computone.txt - info on Computone Intelliport II/Plus Multiport Serial Driver. cpqarray.txt - info on using Compaq's SMART2 Intelligent Disk Array Controllers. -cpufreq/ +cpu-freq/ - info on CPU frequency and voltage scaling. cris/ - directory with info about Linux on CRIS architecture. +crypto/ + - directory with info on the Crypto API. debugging-modules.txt - some notes on debugging modules after Linux 2.6.3. +device-mapper/ + - directory with info on Device Mapper. devices.txt - plain ASCII listing of all the nodes in /dev/ with major minor #'s. -digiboard.txt - - info on the Digiboard PC/X{i,e,eve} multiport boards. digiepca.txt - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards. dnotify.txt @@ -92,6 +100,8 @@ - directory with info on the frame buffer graphics abstraction layer. filesystems/ - directory with info on the various filesystems that Linux supports. +firmware_class/ + - request_firmware() hotplug interface info. floppy.txt - notes and driver options for the floppy disk driver. ftape.txt @@ -100,10 +110,14 @@ - info on using the Hayes ESP serial driver. highuid.txt - notes on the change from 16 bit to 32 bit user/group IDs. +hpet.txt + - High Precision Event Timer Driver for Linux. hw_random.txt - info on Linux support for random number generator in i8xx chipsets. i2c/ - directory with info about the I2C bus/protocol (2 wire, kHz speed). +i2o/ + - directory with info about the Linux I2O subsystem. i386/ - directory with info about Linux on Intel 32 bit architecture. ia64/ @@ -114,6 +128,8 @@ - how to use the RAM disk as an initial/temporary root filesystem. input/ - info on Linux input device support. +io_ordering.txt + - info on ordering I/O writes to memory-mapped addresses. ioctl-number.txt - how to implement and register device/driver ioctl calls. iostats.txt @@ -134,6 +150,8 @@ - summary listing of command line / boot prompt args for the kernel. kobject.txt - info of the kobject infrastructure of the Linux kernel. +laptop-mode.txt + - How to conserve battery power using laptop-mode. ldm.txt - a brief description of LDM (Windows Dynamic Disks). locks.txt @@ -158,8 +176,8 @@ - directory with info about Linux on MIPS architecture. mkdev.cciss - script to make /dev entries for SMART controllers (see cciss.txt). -mkdev.ida - - script to make /dev entries for Intelligent Disk Array Controllers. +mono.txt + - how to execute Mono-based .NET binaries with the help of BINFMT_MISC. moxa-smartio - info on installing/using Moxa multiport serial driver. mtrr.txt @@ -172,6 +190,8 @@ - short guide on setting up a diskless box with NFS root filesystem. nmi_watchdog.txt - info on NMI watchdog for SMP systems. +numastat.txt + - info on how to read Numa policy hit/miss statistics in sysfs. oops-tracing.txt - how to decode those nasty internal kernel error dump messages. paride.txt @@ -199,17 +219,25 @@ riscom8.txt - notes on using the RISCom/8 multi-port serial driver. rocket.txt - - info on installing/using the Comtrol RocketPort multiport serial driver. + - info on the Comtrol RocketPort multiport serial driver. rpc-cache.txt - introduction to the caching mechanisms in the sunrpc layer. rtc.txt - notes on how to use the Real Time Clock (aka CMOS clock) driver. s390/ - directory with info on using Linux on the IBM S390. +sched-coding.txt + - reference for various scheduler-related methods in the O(1) scheduler. sched-design.txt - goals, design and implementation of the Linux O(1) scheduler. +sched-domains.txt + - information on scheduling domains. +sched-stats.txt + - information on schedstats (Linux Scheduler Statistics). scsi/ - directory with info on Linux scsi support. +serial/ + - directory with info on the low level serial API. serial-console.txt - how to set up Linux with a serial line console as the default. sgi-visws.txt @@ -242,14 +270,24 @@ - info on the magic SysRq key. telephony/ - directory with info on telephony (e.g. voice over IP) support. +time_interpolators.txt + - info on time interpolators. +tipar.txt + - information about Parallel link cable for Texas Instruments handhelds. +tty.txt + - guide to the locking policies of the tty layer. unicode.txt - info on the Unicode character/font mapping used in Linux. +uml/ + - directory with infomation about User Mode Linux. usb/ - directory with info regarding the Universal Serial Bus. video4linux/ - directory with info regarding video/TV/radio cards and linux. vm/ - directory with info on the Linux vm code. +voyager.txt + - guide to running Linux on the Voyager architecture. watchdog/ - how to auto-reboot Linux if it has "fallen and can't get up". ;-) x86_64/ diff -Nru a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile --- a/Documentation/DocBook/Makefile 2004-11-10 17:19:04 -08:00 +++ b/Documentation/DocBook/Makefile 2004-11-10 17:19:04 -08:00 @@ -8,9 +8,9 @@ DOCBOOKS := wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml \ kernel-hacking.sgml kernel-locking.sgml via-audio.sgml \ - mousedrivers.sgml deviceiobook.sgml procfs-guide.sgml \ - tulip-user.sgml writing_usb_driver.sgml scsidrivers.sgml \ - sis900.sgml kernel-api.sgml journal-api.sgml lsm.sgml usb.sgml \ + deviceiobook.sgml procfs-guide.sgml tulip-user.sgml \ + writing_usb_driver.sgml scsidrivers.sgml sis900.sgml \ + kernel-api.sgml journal-api.sgml lsm.sgml usb.sgml \ gadget.sgml libata.sgml mtdnand.sgml librs.sgml ### @@ -58,14 +58,14 @@ # The following rules are used to generate the .sgml documentation # required to generate the final targets. (ps, pdf, html). quiet_cmd_docproc = DOCPROC $@ - cmd_docproc = $(DOCPROC) doc $< >$@ + cmd_docproc = SRCTREE=$(srctree)/ $(DOCPROC) doc $< >$@ define rule_docproc set -e; \ $(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \ $(cmd_$(1)); \ ( \ echo 'cmd_$@ := $(cmd_$(1))'; \ - echo $@: `$(DOCPROC) depend $<`; \ + echo $@: `SRCTREE=$(srctree) $(DOCPROC) depend $<`; \ ) > $(dir $@).$(notdir $@).cmd endef @@ -129,6 +129,9 @@ # Rule to generate man files - output is placed in the man subdirectory %.9: %.sgml +ifneq ($(KBUILD_SRC),) + $(Q)mkdir -p $(objtree)/Documentation/DocBook/man +endif $(SPLITMAN) $< $(objtree)/Documentation/DocBook/man "$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)" $(MAKEMAN) convert $(objtree)/Documentation/DocBook/man $< diff -Nru a/Documentation/DocBook/deviceiobook.tmpl b/Documentation/DocBook/deviceiobook.tmpl --- a/Documentation/DocBook/deviceiobook.tmpl 2004-11-10 17:19:04 -08:00 +++ b/Documentation/DocBook/deviceiobook.tmpl 2004-11-10 17:19:04 -08:00 @@ -147,8 +147,7 @@ compiler is not permitted to reorder the I/O sequence. When the ordering can be compiler optimised, you can use __readb and friends to indicate the relaxed ordering. Use - this with care. The rmb provides a read memory - barrier. The wmb provides a write memory barrier. + this with care. @@ -159,19 +158,113 @@ asynchronously. A driver author must issue a read from the same device to ensure that writes have occurred in the specific cases the author cares. This kind of property cannot be hidden from driver - writers in the API. + writers in the API. In some cases, the read used to flush the device + may be expected to fail (if the card is resetting, for example). In + that case, the read should be done from config space, which is + guaranteed to soft-fail if the card doesn't respond. + + + + The following is an example of flushing a write to a device when + the driver would like to ensure the write's effects are visible prior + to continuing execution. + + + +static inline void +qla1280_disable_intrs(struct scsi_qla_host *ha) +{ + struct device_reg *reg; + + reg = ha->iobase; + /* disable risc and host interrupts */ + WRT_REG_WORD(&reg->ictrl, 0); + /* + * The following read will ensure that the above write + * has been received by the device before we return from this + * function. + */ + RD_REG_WORD(&reg->ictrl); + ha->flags.ints_enabled = 0; +} + + + + In addition to write posting, on some large multiprocessing systems + (e.g. SGI Challenge, Origin and Altix machines) posted writes won't + be strongly ordered coming from different CPUs. Thus it's important + to properly protect parts of your driver that do memory-mapped writes + with locks and use the mmiowb to make sure they + arrive in the order intended. Issuing a regular readX + will also ensure write ordering, but should only be used + when the driver has to be sure that the write has actually arrived + at the device (not that it's simply ordered with respect to other + writes), since a full readX is a relatively + expensive operation. + + + + Generally, one should use mmiowb prior to + releasing a spinlock that protects regions using writeb + or similar functions that aren't surrounded by + readb calls, which will ensure ordering and flushing. The + following pseudocode illustrates what might occur if write ordering + isn't guaranteed via mmiowb or one of the + readX functions. + + + +CPU A: spin_lock_irqsave(&dev_lock, flags) +CPU A: ... +CPU A: writel(newval, ring_ptr); +CPU A: spin_unlock_irqrestore(&dev_lock, flags) + ... +CPU B: spin_lock_irqsave(&dev_lock, flags) +CPU B: writel(newval2, ring_ptr); +CPU B: ... +CPU B: spin_unlock_irqrestore(&dev_lock, flags) + + + + In the case above, newval2 could be written to ring_ptr before + newval. Fixing it is easy though: + + + +CPU A: spin_lock_irqsave(&dev_lock, flags) +CPU A: ... +CPU A: writel(newval, ring_ptr); +CPU A: mmiowb(); /* ensure no other writes beat us to the device */ +CPU A: spin_unlock_irqrestore(&dev_lock, flags) + ... +CPU B: spin_lock_irqsave(&dev_lock, flags) +CPU B: writel(newval2, ring_ptr); +CPU B: ... +CPU B: mmiowb(); +CPU B: spin_unlock_irqrestore(&dev_lock, flags) + + + + See tg3.c for a real world example of how to use mmiowb + PCI ordering rules also guarantee that PIO read responses arrive - after any outstanding DMA writes on that bus, since for some devices + after any outstanding DMA writes from that bus, since for some devices the result of a readb call may signal to the driver that a DMA transaction is complete. In many cases, however, the driver may want to indicate that the next readb call has no relation to any previous DMA writes performed by the device. The driver can use readb_relaxed for these cases, although only - some platforms will honor the relaxed semantics. + some platforms will honor the relaxed semantics. Using the relaxed + read functions will provide significant performance benefits on + platforms that support it. The qla2xxx driver provides examples + of how to use readX_relaxed. In many cases, + a majority of the driver's readX calls can + safely be converted to readX_relaxed calls, since + only a few will indicate or depend on DMA completion. diff -Nru a/Documentation/DocBook/mousedrivers.tmpl b/Documentation/DocBook/mousedrivers.tmpl --- a/Documentation/DocBook/mousedrivers.tmpl 2004-11-10 17:19:05 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,1022 +0,0 @@ - - - - - Mouse Drivers - - - - Alan - Cox - -
- alan@redhat.com -
-
-
-
- - - 2000 - Alan Cox - - - - - This documentation is free software; you can redistribute - it and/or modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later - version. - - - - This program is distributed in the hope that it will be - useful, but WITHOUT ANY WARRANTY; without even the implied - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, - MA 02111-1307 USA - - - - For more details see the file COPYING in the source - distribution of Linux. - - -
- - - - - Introduction - - Earlier publication - - Parts of this document first appeared in Linux Magazine under a - ninety day exclusivity. - - - - - Mice are conceptually one of the simplest device interfaces in the - Linux operating system. Not all mice are handled by the kernel. - Instead there is a two layer abstraction. - - - - The kernel mouse drivers and userspace drivers for the serial mice are - all managed by a system daemon called gpm - - the general purpose mouse driver. gpm - handles cutting and pasting on the text consoles. It provides a - general library for mouse-aware applications and it handles the - sharing of mouse services with the - X Window System user interface. - - - Sometimes a mouse speaks a sufficiently convoluted protocol that the - protocol is handled by Gpm itself. Most - of the mouse drivers follow a common interface called the bus mouse - protocol. - - - Each read from a bus mouse interface device returns a block of data. - The first three bytes of each read are defined as follows: - - - Mouse Data Encoding - - - - Byte 0 - 0x80 + the buttons currently down. - - - Byte 1 - A signed value for the shift in X position - - - Byte 2 - A signed value for the shift in Y position - - - -
- - An application can choose to read more than 3 bytes. The rest of the - bytes will be zero, or may optionally return some additional - device-specific information. -
- - The position values are truncated if they exceed the 8bit range (that - is -127 <= delta <= 127). While the value -128 does fit into a - byte is not allowed. - - - The buttons are numbered left to right as - 0, 1, 2, 3.. and each button sets the relevant bit. So a user pressing - the left and right button of a three button mouse will set bits 0 and 2. - - - All mice are required to support the poll - operation. Indeed pretty much every user of a mouse device uses - poll to wait for mouse events to occur. - - - Finally the mice support asynchronous I/O. This is a topic we have not - yet covered but which I will explain after looking at a simple mouse - driver. - -
- - - A simple mouse driver - - First we will need the set up functions for our mouse device. To keep - this simple our imaginary mouse device has three I/O ports fixed at I/O - address 0x300 and always lives on interrupt 5. The ports will be the X - position, the Y position and the buttons in that order. - - - -#define OURMOUSE_BASE 0x300 - -static struct miscdevice our_mouse = { - OURMOUSE_MINOR, "ourmouse", &our_mouse_fops -}; - -__init ourmouse_init(void) -{ - - if (request_region(OURMOUSE_BASE, 3, "ourmouse") < 0) { - printk(KERN_ERR "ourmouse: request_region failed.\n"); - return -ENODEV; - } - - if (misc_register(&our_mouse) < 0) { - printk(KERN_ERR "ourmouse: cannot register misc device.\n"); - release_region(OURMOUSE_BASE, 3); - return -EBUSY; - } - - return 0; -} - - - - The miscdevice is new here. Linux normally - parcels devices out by major number, and each device has 256 units. - For things like mice this is extremely wasteful so a device exists - which is used to accumulate all the odd individual devices that - computers tend to have. - - - Minor numbers in this space are allocated by a central source, although - you can look in the kernel Documentation/devices.txt - file and pick a free one for development use. This kernel file also - carries instructions for registering a device. This may change over time - so it is a good idea to obtain a current copy of this file first. - - - Our code then is fairly simple. We reserve our I/O address space with - request_region, checking to make sure that it succeeded (i.e. the - space wasn't reserved by anyone else). - - - Then we ask the misc driver to allocate our minor device number. We also - hand it our name (which is used in - /proc/misc) and a set of file - operations that are to be used. The file operations work exactly like the - file operations you would register for a normal character device. The misc - device itself is simply acting as a redirector for requests. - Since misc_register can fail, it is important to check for failure - and act accordingly (which in the case of a mouse driver is to abort, - since you can't use the mouse without a working device node). - - - Next, in order to be able to use and test our code we need to add some - module code to support it. This too is fairly simple: - - -#ifdef MODULE - -int init_module(void) -{ - if(ourmouse_init()<0) - return -ENODEV: - return 0; -} - -void cleanup_module(void) -{ - misc_deregister(&our_mouse); - free_region(OURMOUSE_BASE, 3); -} - - -#endif - - - - The module code provides the normal two functions. The - init_module function is called when the module is - loaded. In our case it simply calls the initialising function we wrote - and returns an error if this fails. This ensures the module will only - be loaded if it was successfully set up. - - - The cleanup_module function is called when the - module is unloaded. We give the miscellaneous device entry back, and - then free our I/O resources. If we didn't free the I/O resources then - the next time the module loaded it would think someone else had its I/O - space. - - - Once the misc_deregister has been called any - attempts to open the mouse device will fail with the error - ENODEV (No such device). - - - Next we need to fill in our file operations. A mouse doesn't need many - of these. We need to provide open, release, read and poll. That makes - for a nice simple structure: - - - -struct file_operations our_mouse_fops = { - owner: THIS_MODULE, /* Automatic usage management */ - read: read_mouse, /* You can read a mouse */ - write: write_mouse, /* This won't do a lot */ - poll: poll_mouse, /* Poll */ - open: open_mouse, /* Called on open */ - release: close_mouse, /* Called on close */ -}; - - - - There is nothing particularly special needed here. We provide functions - for all the relevant or required operations and little else. There is - nothing stopping us providing an ioctl function for this mouse. Indeed - if you have a configurable mouse it may be very appropriate to provide - configuration interfaces via ioctl calls. - - - The syntax we use is not standard C as such. GCC provides the ability - to initialise fields by name, and this generally makes the method table - much easier to read than counting through NULL pointers and remembering - the order by hand. - - - The owner field is used to manage the locking of module load an - unloading. It is obviously important that a module is not unloaded while - in use. When your device is opened the module specified by "owner" is - locked. When it is finally released the module is unlocked. - - - The open and close routines need to manage enabling and disabling the - interrupts for the mouse as well as stopping the mouse being unloaded - when it is no longer required. - - - -static int mouse_users = 0; /* User count */ -static int mouse_dx = 0; /* Position changes */ -static int mouse_dy = 0; -static int mouse_event = 0; /* Mouse has moved */ - -static int open_mouse(struct inode *inode, struct file *file) -{ - if(mouse_users++) - return 0; - - if(request_irq(mouse_intr, OURMOUSE_IRQ, 0, "ourmouse", NULL)) - { - mouse_users--; - return -EBUSY; - } - mouse_dx = 0; - mouse_dy = 0; - mouse_event = 0; - mouse_buttons = 0; - return 0; -} - - - The open function has to do a small amount of housework. We keep a count - of the number of times the mouse is open. This is because we do not want - to request the interrupt multiple times. If the mouse has at least one - user then it is set up and we simply add to the user count and return - 0 for success. - - - We grab the interrupt and thus start mouse interrupts. If the interrupt - has been borrowed by some other driver then request_irq - will fail and we will return an error. If we were capable of sharing an - interrupt line we would specify SA_SHIRQ instead of - zero. Provided that everyone claiming an interrupt - sets this flag, they get to share the line. PCI can - share interrupts, ISA normally however cannot. - - - We do the housekeeping. We make the current mouse position the starting - point for accumulated changes and declare that nothing has happened - since the mouse driver was opened. - - - The release function needs to unwind all these: - - -static int close_mouse(struct inode *inode, struct file *file) -{ - if(--mouse_users) - return 0; - free_irq(OURMOUSE_IRQ, NULL); - return 0; -} - - - We count off a user and provided that there are still other users need - take no further action. The last person closing the mouse causes us to - free up the interrupt. This stops interrupts from the mouse from using - our CPU time, and ensures that the mouse can now be unloaded. - - - We can fill in the write handler at this point as the write function for - our mouse simply declines to allow writes: - - - -static ssize_t write_mouse(struct file *file, const char *buffer, size_t - count, loff_t *ppos) -{ - return -EINVAL; -} - - - - This is pretty much self-explanatory. Whenever you write you get told - it was an invalid function. - - - To make the poll and read functions work we have to consider how we - handle the mouse interrupt. - - - -static struct wait_queue *mouse_wait; -static spinlock_t mouse_lock = SPIN_LOCK_UNLOCKED; - -static void ourmouse_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - char delta_x; - char delta_y; - unsigned char new_buttons; - - delta_x = inb(OURMOUSE_BASE); - delta_y = inb(OURMOUSE_BASE+1); - new_buttons = inb(OURMOUSE_BASE+2); - - if(delta_x || delta_y || new_buttons != mouse_buttons) - { - /* Something happened */ - - spin_lock(&mouse_lock); - mouse_event = 1; - mouse_dx += delta_x; - mouse_dy += delta_y; - mouse_buttons = new_buttons; - spin_unlock(&mouse_lock); - - wake_up_interruptible(&mouse_wait); - } -} - - - - The interrupt handler reads the mouse status. The next thing we do is - to check whether something has changed. If the mouse was smart it would - only interrupt us if something had changed, but let's assume our mouse - is stupid as most mice actually tend to be. - - - If the mouse has changed we need to update the status variables. What we - don't want is the mouse functions reading these variables to read them - during a change. We add a spinlock that protects these variables while we - play with them. - - - If a change has occurred we also need to wake sleeping processes, so we - add a wakeup call and a wait_queue to use when - we wish to await a mouse event. - - - Now we have the wait queue we can implement the poll function for the - mouse relatively easily: - - - -static unsigned int mouse_poll(struct file *file, poll_table *wait) -{ - poll_wait(file, &mouse_wait, wait); - if(mouse_event) - return POLLIN | POLLRDNORM; - return 0; -} - - - - This is fairly standard poll code. First we add the wait queue to the - list of queues we want to monitor for an event. Secondly we check if an - event has occurred. We only have one kind of event - the - mouse_event flag tells us that something happened. - We know that this something can only be mouse data. We return the flags - indicating input and normal reading will succeed. - - - You may be wondering what happens if the function returns saying 'no - event yet'. In this case the wake up from the wait queue we added to - the poll table will cause the function to be called again. Eventually - we will be woken up and have an event ready. At this point the - poll call will exit back to the user. - - - After the poll completes the user will want to read the data. We now - need to think about how our mouse_read function - will work: - - -static ssize_t mouse_read(struct file *file, char *buffer, - size_t count, loff_t *pos) -{ - int dx, dy; - unsigned char button; - unsigned long flags; - int n; - - if(count<3) - return -EINVAL; - - /* - * Wait for an event - */ - - while(!mouse_event) - { - if(file->f_flags&O_NDELAY) - return -EAGAIN; - interruptible_sleep_on(&mouse_wait); - if(signal_pending(current)) - return -ERESTARTSYS; - } - - - - We start by validating that the user is reading enough data. We could - handle partial reads if we wanted but it isn't terribly useful and the - mouse drivers don't bother to try. - - - Next we wait for an event to occur. The loop is fairly standard event - waiting in Linux. Having checked that the event has not yet occurred, we - then check if an event is pending and if not we need to sleep. - - - A user process can set the O_NDELAY flag on a file - to indicate that it wishes to be told immediately if no event is - pending. We check this and give the appropriate error if so. - - - Next we sleep until the mouse or a signal awakens us. A signal will - awaken us as we have used wakeup_interruptible. - This is important as it means a user can kill processes waiting for - the mouse - clearly a desirable property. If we are interrupted we - exit the call and the kernel will then process signals and maybe - restart the call again - from the beginning. - - - This code contains a classic Linux bug. All will be revealed later in this - article as well as explanations for how to avoid it. - - - /* Grab the event */ - - spinlock_irqsave(&mouse_lock, flags); - - dx = mouse_dx; - dy = mouse_dy; - button = mouse_buttons; - - if(dx<=-127) - dx=-127; - if(dx>=127) - dx=127; - if(dy<=-127) - dy=-127; - if(dy>=127) - dy=127; - - mouse_dx -= dx; - mouse_dy -= dy; - - if(mouse_dx == 0 && mouse_dy == 0) - mouse_event = 0; - - spin_unlock_irqrestore(&mouse_lock, flags); - - - This is the next stage. Having established that there is an event - going, we capture it. To be sure that the event is not being updated - as we capture it we also take the spinlock and thus prevent parallel - updates. Note here we use spinlock_irqsave. We - need to disable interrupts on the local processor otherwise bad things - will happen. - - - What will occur is that we take the spinlock. While we hold the lock - an interrupt will occur. At this point our interrupt handler will try - and take the spinlock. It will sit in a loop waiting for the read - routine to release the lock. However because we are sitting in a loop - in the interrupt handler we will never release the lock. The machine - hangs and the user gets upset. - - - By blocking the interrupt on this processor we ensure that the lock - holder will always give the lock back without deadlocking. - - - There is a little cleverness in the reporting mechanism too. We can - only report a move of 127 per read. We don't however want to lose - information by throwing away further movement. Instead we keep - returning as much information as possible. Each time we return a - report we remove the amount from the pending movement in - mouse_dx and mouse_dy. Eventually - when these counts hit zero we clear the mouse_event - flag as there is nothing else left to report. - - - - if(put_user(button|0x80, buffer)) - return -EFAULT; - if(put_user((char)dx, buffer+1)) - return -EFAULT; - if(put_user((char)dy, buffer+2)) - return -EFAULT; - - for(n=3; n < count; n++) - if(put_user(0x00, buffer+n)) - return -EFAULT; - - return count; -} - - - - Finally we must put the results in the user supplied buffer. We cannot - do this while holding the lock as a write to user memory may sleep. - For example the user memory may be residing on disk at this instant. - Thus we did our computation beforehand and now copy the data. Each - put_user call is filling in one byte of the buffer. - If it returns an error we inform the program that it passed us an - invalid buffer and abort. - - - Having written the data we blank the rest of the buffer that was read - and report the read as being successful. - - - - - Debugging the mouse driver - - - We now have an almost perfectly usable mouse driver. If you were to - actually try and use it however you would eventually find a couple of - problems with it. A few programs will also not work with as it does not - yet support asynchronous I/O. - - - First let us look at the bugs. The most obvious one isn't really a driver - bug but a failure to consider the consequences. Imagine you bumped the - mouse hard by accident and sent it skittering across the desk. The mouse - interrupt routine will add up all that movement and report it in steps of - 127 until it has reported all of it. Clearly there is a point beyond - which mouse movement isn't worth reporting. We need to add this as a - limit to the interrupt handler: - - - -static void ourmouse_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - char delta_x; - char delta_y; - unsigned char new_buttons; - - delta_x = inb(OURMOUSE_BASE); - delta_y = inb(OURMOUSE_BASE+1); - new_buttons = inb(OURMOUSE_BASE+2); - - if(delta_x || delta_y || new_buttons != mouse_buttons) - { - /* Something happened */ - - spin_lock(&mouse_lock); - mouse_event = 1; - mouse_dx += delta_x; - mouse_dy += delta_y; - - if(mouse_dx < -4096) - mouse_dx = -4096; - if(mouse_dx > 4096) - mouse_dx = 4096; - - if(mouse_dy < -4096) - mouse_dy = -4096; - if(mouse_dy > 4096) - mouse_dy = 4096; - - mouse_buttons = new_buttons; - spin_unlock(&mouse_lock); - - wake_up_interruptible(&mouse_wait); - } -} - - - - By adding these checks we limit the range of accumulated movement to - something sensible. - - - The second bug is a bit more subtle, and that is perhaps why this is - such a common mistake. Remember, I said the waiting loop for the read - handler had a bug in it. Think about what happens when we execute: - - - - while(!mouse_event) - { - - - - and an interrupt occurs at this point here. This causes a mouse movement - and wakes up the queue. - - - - interruptible_sleep_on(&mouse_wait); - - - - Now we sleep on the queue. We missed the wake up and the application - will not see an event until the next mouse event occurs. This will - lead to just the odd instance when a mouse button gets delayed. The - consequences to the user will probably be almost undetectable with a - mouse driver. With other drivers this bug could be a lot more severe. - - - There are two ways to solve this. The first is to disable interrupts - during the testing and the sleep. This works because when a task sleeps - it ceases to disable interrupts, and when it resumes it disables them - again. Our code thus becomes: - - - - save_flags(flags); - cli(); - - while(!mouse_event) - { - if(file->f_flags&O_NDELAY) - { - restore_flags(flags); - return -EAGAIN; - } - interruptible_sleep_on(&mouse_wait); - if(signal_pending(current)) - { - restore_flags(flags); - return -ERESTARTSYS; - } - } - restore_flags(flags); - - - - This is the sledgehammer approach. It works but it means we spend a - lot more time turning interrupts on and off. It also affects - interrupts globally and has bad properties on multiprocessor machines - where turning interrupts off globally is not a simple operation, but - instead involves kicking each processor, waiting for them to disable - interrupts and reply. - - - The real problem is the race between the event testing and the sleeping. - We can avoid that by using the scheduling functions more directly. - Indeed this is the way they generally should be used for an interrupt. - - - - struct wait_queue wait = { current, NULL }; - - add_wait_queue(&mouse_wait, &wait); - set_current_state(TASK_INTERRUPTIBLE); - - while(!mouse_event) - { - if(file->f_flags&O_NDELAY) - { - remove_wait_queue(&mouse_wait, &wait); - set_current_state(TASK_RUNNING); - return -EWOULDBLOCK; - } - if(signal_pending(current)) - { - remove_wait_queue(&mouse_wait, &wait); - current->state = TASK_RUNNING; - return -ERESTARTSYS; - } - schedule(); - set_current_state(TASK_INTERRUPTIBLE); - } - - remove_wait_wait(&mouse_wait, &wait); - set_current_state(TASK_RUNNING); - - - - At first sight this probably looks like deep magic. To understand how - this works you need to understand how scheduling and events work on - Linux. Having a good grasp of this is one of the keys to writing clean - efficient device drivers. - - - add_wait_queue does what its name suggests. It adds - an entry to the mouse_wait list. The entry in this - case is the entry for our current process (current - is the current task pointer). - - - So we start by adding an entry for ourself onto the - mouse_wait list. This does not put us to sleep - however. We are merely tagged onto the list. - - - Next we set our status to TASK_INTERRUPTIBLE. Again - this does not mean we are now asleep. This flag says what should happen - next time the process sleeps. TASK_INTERRUPTIBLE says - that the process should not be rescheduled. It will run from now until it - sleeps and then will need to be woken up. - - - The wakeup_interruptible call in the interrupt - handler can now be explained in more detail. This function is also very - simple. It goes along the list of processes on the queue it is given and - any that are marked as TASK_INTERRUPTIBLE it changes - to TASK_RUNNING and tells the kernel that new - processes are runnable. - - - Behind all the wrappers in the original code what is happening is this - - - - - - We add ourself to the mouse wait queue - - - - - We mark ourself as sleeping - - - - - We ask the kernel to schedule tasks again - - - - - The kernel sees we are asleep and schedules someone else. - - - - - The mouse interrupt sets our state to TASK_RUNNING - and makes a note that the kernel should reschedule tasks - - - - - The kernel sees we are running again and continues our execution - - - - - This is why the apparent magic works. Because we mark ourself as - TASK_INTERRUPTIBLE and as we add ourselves - to the queue before we check if there are events pending, the race - condition is removed. - - - Now if an interrupt occurs after we check the queue status and before - we call the schedule function in order to sleep, - things work out. Instead of missing an event, we are set back to - TASK_RUNNING by the mouse interrupt. We still call - schedule but it will continue running our task. - We go back around the loop and this time there may be an event. - - - There will not always be an event. Thus we set ourselves back to - TASK_INTERRUPTIBLE before resuming the loop. - Another process doing a read may already have cleared the event flag, - and if so we will need to go back to sleep again. Eventually we will - get our event and escape. - - - Finally when we exit the loop we remove ourselves from the - mouse_wait queue as we are no longer interested - in mouse events, and we set ourself back to - TASK_RUNNABLE as we do not wish to go to sleep - again just yet. - - - Note - - This isn't an easy topic. Don't be afraid to reread the description a - few times and also look at other device drivers to see how it works. - Finally if you can't grasp it just yet, you can use the code as - boilerplate to write other drivers and trust me instead. - - - - - - Asynchronous I/O - - This leaves the missing feature - Asynchronous I/O. Normally UNIX - programs use the poll call (or its variant form - select) to wait for an event to occur on one of - multiple input or output devices. This model works well for most tasks - but because poll and select - wait for an event isn't suitable for tasks that are also continually - doing computation work. Such programs really want the kernel to kick - them when something happens rather than watch for events. - - - Poll is akin to having a row of lights in front of you. You can see at a - glance which ones if any are lit. You cannot however get anything useful - done while watching them. Asynchronous I/O uses signals which work more - like a door bell. Instead of you watching, it tells you that something - is up. - - - Asynchronous I/O sends the signal SIGIO to a user process when the I/O - events occur. In this case that means when people move the mouse. The - SIGIO signal causes the user process to jump to its signal handler and - execute code in that handler before returning to whatever was going on - previously. It is the application equivalent of an interrupt handler. - - - Most of the code needed for this operation is common to all its users. - The kernel provides a simple set of functions for managing asynchronous - I/O. - - - Our first job is to allow users to set asynchronous I/O on file handles. - To do that we need to add a new function to the file operations table for - our mouse: - - - -struct file_operations our_mouse_fops = { - owner: THIS_MODULE - read: read_mouse, /* You can read a mouse */ - write: write_mouse, /* This won't do a lot */ - poll: poll_mouse, /* Poll */ - open: open_mouse, /* Called on open */ - release: close_mouse, /* Called on close */ - fasync: fasync_mouse, /* Asynchronous I/O */ -}; - - - - Once we have installed this entry the kernel knows we support - asynchronous I/O and will allow all the relevant operations on the - device. Whenever a user adds or removes asynchronous I/O notification - on a file handle it calls our fasync_mouse routine - we just added. This routine uses the helper functions to keep the queue - of handles up to date: - - - -static struct fasync_struct *mouse_fasync = NULL; - -static int fasync_mouse(int fd, struct file *filp, int on) -{ - int retval = fasync_helper(fd, filp, on, &mouse_fasync); - - if (retval < 0) - return retval; - return 0; -} - - - - The fasync helper adds and deletes entries by managing the supplied - list. We also need to remove entries from this list when the file is - closed. This requires we add one line to our close function: - - - -static int close_mouse(struct inode *inode, struct file *file) -{ - fasync_mouse(-1, file, 0) - if(--mouse_users) - return 0; - free_irq(OURMOUSE_IRQ, NULL); - return 0; -} - - - - When we close the file we now call our own fasync handler as if the - user had requested that this file cease to be used for asynchronous - I/O. This rather neatly cleans up any loose ends. We certainly don't - wait to deliver a signal for a file that no longer exists. - - - At this point the mouse driver supports all the asynchronous I/O - operations, and applications using them will not error. They won't - however work yet. We need to actually send the signals. Again the - kernel provides a function for handling this. - - - We update our interrupt handler a little: - - - -static void ourmouse_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - char delta_x; - char delta_y; - unsigned char new_buttons; - - delta_x = inb(OURMOUSE_BASE); - delta_y = inb(OURMOUSE_BASE+1); - new_buttons = inb(OURMOUSE_BASE+2); - - if(delta_x || delta_y || new_buttons != mouse_buttons) - { - /* Something happened */ - - spin_lock(&mouse_lock); - mouse_event = 1; - mouse_dx += delta_x; - mouse_dy += delta_y; - - if(mouse_dx < -4096) - mouse_dx = -4096; - if(mouse_dx > 4096) - mouse_dx = 4096; - - if(mouse_dy < -4096) - mouse_dy = -4096; - if(mouse_dy > 4096) - mouse_dy = 4096; - - mouse_buttons = new_buttons; - spin_unlock(&mouse_lock); - - /* Now we do asynchronous I/O */ - kill_fasync(&mouse_fasync, SIGIO); - - wake_up_interruptible(&mouse_wait); - } -} - - - - The new code simply calls the kill_fasync routine - provided by the kernel if the queue is non-empty. This sends the - required signal (SIGIO in this case) to the process each file handle - says should be informed about the exciting new mouse movement that - just happened. - - - With this in place and the bugs in the original version fixed, you now - have a fully functional mouse driver using the bus mouse protocol. It - will work with the X window system, will work - with GPM and should work with every other - application you need. Doom is of course the - ideal way to test your new mouse driver is functioning properly. Be sure - to test it thoroughly. - - -
- diff -Nru a/Documentation/DocBook/procfs-guide.tmpl b/Documentation/DocBook/procfs-guide.tmpl --- a/Documentation/DocBook/procfs-guide.tmpl 2004-11-10 17:19:05 -08:00 +++ b/Documentation/DocBook/procfs-guide.tmpl 2004-11-10 17:19:05 -08:00 @@ -100,8 +100,8 @@ I'd like to thank Jeff Garzik jgarzik@pobox.com and Alexander Viro - viro@math.psu.edu for their input, Tim Waugh - twaugh@redhat.com for his viro@parcelfarce.linux.theplanet.co.uk for their input, + Tim Waugh twaugh@redhat.com for his Selfdocbook, and Marc Joosen marcj@historia.et.tudelft.nl for proofreading. diff -Nru a/Documentation/DocBook/videobook.tmpl b/Documentation/DocBook/videobook.tmpl --- a/Documentation/DocBook/videobook.tmpl 2004-11-10 17:19:07 -08:00 +++ b/Documentation/DocBook/videobook.tmpl 2004-11-10 17:19:07 -08:00 @@ -731,13 +731,14 @@ static int io = -1; +#endif MODULE_AUTHOR("Alan Cox"); MODULE_DESCRIPTION("A driver for an imaginary radio card."); -MODULE_PARM(io, "i"); +module_param(io, int, 0444); MODULE_PARM_DESC(io, "I/O address of the card."); -int init_module(void) +static int __init init(void) { if(io==-1) { @@ -748,25 +749,26 @@ return myradio_init(NULL); } -void cleanup_module(void) +static void __exit cleanup(void) { video_unregister_device(&my_radio); release_region(io, MY_IO_SIZE); } -#endif +module_init(init); +module_exit(cleanup); In this example we set the IO base by default if the driver is compiled into - the kernel where you cannot pass a parameter. For the module we require the + the kernel: you can still set it using "my_radio.irq" if this file is called my_radio.c. For the module we require the user sets the parameter. We set io to a nonsense port (-1) so that we can tell if the user supplied an io parameter or not. We use MODULE_ defines to give an author for the card driver and a description. We also use them to declare that io is an integer and it is the - address of the card. + address of the card, and can be read by anyone from sysfs. The clean-up routine unregisters the video_device we registered, and frees diff -Nru a/Documentation/RCU/listRCU.txt b/Documentation/RCU/listRCU.txt --- a/Documentation/RCU/listRCU.txt 2004-11-10 17:19:03 -08:00 +++ b/Documentation/RCU/listRCU.txt 2004-11-10 17:19:03 -08:00 @@ -82,7 +82,7 @@ list_for_each_entry(e, list, list) { if (!audit_compare_rule(rule, &e->rule)) { list_del(&e->list); - call_rcu(&e->rcu, audit_free_rule, e); + write_unlock(&auditsc_lock); return 0; } } diff -Nru a/Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt b/Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt --- a/Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt 2004-11-10 17:19:07 -08:00 +++ b/Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt 2004-11-10 17:19:07 -08:00 @@ -15,7 +15,7 @@ ------------- To set the default configuration, use `make bast_defconfig` which - supports the commonly used features of this board + supports the commonly used features of this board. Support @@ -23,15 +23,23 @@ Official support information can be found on the Simtec Electronics website, at the product page http://www.simtec.co.uk/products/EB2410ITX/ - and http://www.simtec.co.uk/products/EB2410ITX/resources.html + + Useful links: + + - Resources Page http://www.simtec.co.uk/products/EB2410ITX/resources.html + + - Board FAQ at http://www.simtec.co.uk/products/EB2410ITX/faq.html + + - Bootloader info http://www.simtec.co.uk/products/SWABLE/resources.html + and FAQ http://www.simtec.co.uk/products/SWABLE/faq.html MTD --- - The NAND and NOR onboard are currently supported in the linux-mtd cvs, - and are awaiting merge in the mainline. see the linux-mtd project at - http://www.linux-mtd.infradead.org/ for more information. + The NAND and NOR support has been merged from the linux-mtd project. + Any prolbems, see http://www.linux-mtd.infradead.org/ for more + information or up-to-date versions of linux-mtd. IDE @@ -39,6 +47,12 @@ Both onboard IDE ports are supported, however there is no support for changing speed of devices, PIO Mode 4 capable drives should be used. + + +Maintainers +----------- + + This board is maintained by Simtec Electronics. (c) 2004 Ben Dooks, Simtec Electronics diff -Nru a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt --- a/Documentation/arm/Samsung-S3C24XX/Overview.txt 2004-11-10 17:19:07 -08:00 +++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt 2004-11-10 17:19:07 -08:00 @@ -48,9 +48,9 @@ NAND ---- - The current kernels do not have direct support for the NAND - controller, the latest linux-mtd CVS has support for this. - See http://www.linux-mtd.infradead.org/ + The current kernels now have support for the s3c2410 NAND + controller. If there are any problems the latest linux-mtd + CVS can be found from http://www.linux-mtd.infradead.org/ Serial @@ -84,12 +84,21 @@ Port Contributors ----------------- - Ben Dooks + Ben Dooks (BJD) Vincent Sanders Herbert Potzl - Arnaud Patard + Arnaud Patard (RTP) Roc Wu + Klaus Fetscher + Dimitry Andric +Document Changes +---------------- + + 05 Sep 2004 - BJD - Added Document Changes section + 05 Sep 2004 - BJD - Added Klaus Fetscher to list of contributors + 25 Oct 2004 - BJD - Added Dimitry Andric to list of contributors + 25 Oct 2004 - BJD - Updated the MTD from the 2.6.9 merge Document Author --------------- diff -Nru a/Documentation/arm/Samsung-S3C24XX/Suspend.txt b/Documentation/arm/Samsung-S3C24XX/Suspend.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/arm/Samsung-S3C24XX/Suspend.txt 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,106 @@ + S3C24XX Suspend Support + ======================= + + +Introduction +------------ + + The S3C2410 supports a low-power suspend mode, where the SDRAM is kept + in Self-Refresh mode, and all but the essential peripheral blocks are + powered down. For more information on how this works, please look + at the S3C2410 datasheets from Samsung. + + +Requirements +------------ + + 1) A bootloader that can support the necessary resume operation + + 2) Support for at least 1 source for resume + + 3) CONFIG_PM enabled in the kernel + + 4) Any peripherals that are going to be powered down at the same + time require suspend/resume support. + + +Resuming +-------- + + The S3C2410 user manual defines the process of sending the CPU to + sleep and how it resumes. The default behaviour of the Linux code + is to set the GSTATUS3 register to the physical address of the + code to resume Linux operation. + + GSTATUS4 is currently left alone by the sleep code, and is free to + use for any other purposes (for example, the EB2410ITX uses this to + save memory configuration in). + + +Machine Support +--------------- + + The machine specific functions must call the s3c2410_pm_init() function + to say that its bootloader is capable of resuming. This can be as + simple as adding the following to the machine's definition: + + INITMACHINE(s3c2410_pm_init) + + A board can do its own setup before calling s3c2410_pm_init, if it + needs to setup anything else for power management support. + + There is currently no support for over-riding the default method of + saving the resume address, if your board requires it, then contact + the maintainer and discuss what is required. + + Note, the original method of adding an late_initcall() is wrong, + and will end up initialising all compiled machines' pm init! + + +Debugging +--------- + + There are several important things to remember when using PM suspend: + + 1) The uart drivers will disable the clocks to the UART blocks when + suspending, which means that use of printascii() or similar direct + access to the UARTs will cause the debug to stop. + + 2) Whilst the pm code itself will attempt to re-enable the UART clocks, + care should be taken that any external clock sources that the UARTs + rely on are still enabled at that point. + + +Configuration +------------- + + The S3C2410 specific configuration in `System Type` defines various + aspects of how the S3C2410 suspend and resume support is configured + + `S3C2410 PM Suspend debug` + + This option prints messages to the serial console before and after + the actual suspend, giving detailed information on what is + happening + + + `S3C2410 PM Suspend Memory CRC` + + Allows the entire memory to be checksummed before and after the + suspend to see if there has been any corruption of the contents. + + This support requires the CRC32 function to be enabled. + + + `S3C2410 PM Suspend CRC Chunksize (KiB)` + + Defines the size of memory each CRC chunk covers. A smaller value + will mean that the CRC data block will take more memory, but will + identify any faults with better precision + + +Document Author +--------------- + +Ben Dooks, (c) 2004 Simtec Electronics + diff -Nru a/Documentation/computone.txt b/Documentation/computone.txt --- a/Documentation/computone.txt 2004-11-10 17:19:06 -08:00 +++ b/Documentation/computone.txt 2004-11-10 17:19:06 -08:00 @@ -1,3 +1,13 @@ +NOTE: This is an unmaintained driver. It is not guaranteed to work due to +changes made in the tty layer in 2.6. If you wish to take over maintenance of +this driver, contact Michael Warfield . + +Changelog: +---------- +11-01-2001: Original Document + +10-29-2004: Minor misspelling & format fix, update status of driver. + James Nelson Computone Intelliport II/Plus Multiport Serial Driver ----------------------------------------------------- @@ -146,7 +156,7 @@ ip2.c are used. If you are autoloading the driver module with kerneld or kmod the base addresses and interrupt number must also be set in ip2.c and recompile or just insert and options line in /etc/modprobe.conf or both. -The options line is equivalent to the command line and takes precidence over +The options line is equivalent to the command line and takes precedence over what is in ip2.c. /etc/modprobe.conf sample: @@ -166,7 +176,8 @@ Note: Both io and irq should be updated to reflect YOUR system. An "io" - address of 1 or 2 indicates a PCI or EISA card in the board table. The PCI or EISA irq will be assigned automatically. + address of 1 or 2 indicates a PCI or EISA card in the board table. + The PCI or EISA irq will be assigned automatically. Specifying an invalid or in-use irq will default the driver into running in polled mode for that card. If all irq entries are 0 then diff -Nru a/Documentation/cpqarray.txt b/Documentation/cpqarray.txt --- a/Documentation/cpqarray.txt 2004-11-10 17:19:04 -08:00 +++ b/Documentation/cpqarray.txt 2004-11-10 17:19:04 -08:00 @@ -26,31 +26,13 @@ * IDA-2 * IAES -Installing: ------------ - -You need to build a new kernel to use this device, even if you want to -use a loadable module. - -Apply the patch to a 2.2.x kernel: - -# cd linux -# patch -p1 + + +1999 : Original Document diff -Nru a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt --- a/Documentation/crypto/api-intro.txt 2004-11-10 17:19:05 -08:00 +++ b/Documentation/crypto/api-intro.txt 2004-11-10 17:19:05 -08:00 @@ -231,6 +231,9 @@ Aaron Grothe Jean-Luc Cooke +Anubis algorithm contributors: + Aaron Grothe + Generic scatterwalk code by Adam J. Richter Please send any credits updates or corrections to: diff -Nru a/Documentation/devices.txt b/Documentation/devices.txt --- a/Documentation/devices.txt 2004-11-10 17:19:04 -08:00 +++ b/Documentation/devices.txt 2004-11-10 17:19:04 -08:00 @@ -2546,12 +2546,7 @@ 0 = /dev/usb/lp0 First USB printer ... 15 = /dev/usb/lp15 16th USB printer - 16 = /dev/usb/mouse0 First USB mouse - ... - 31 = /dev/usb/mouse15 16th USB mouse - 32 = /dev/usb/ez0 First USB firmware loader - ... - 47 = /dev/usb/ez15 16th USB firmware loader + 32 = /dev/usb/mdc800 MDC800 USB camera 48 = /dev/usb/scanner0 First USB scanner ... 63 = /dev/usb/scanner15 16th USB scanner @@ -2559,6 +2554,22 @@ 65 = /dev/usb/usblcd USBLCD Interface (info@usblcd.de) 66 = /dev/usb/cpad0 Synaptics cPad (mouse/LCD) + 96 = /dev/usb/hiddev0 1st USB HID device + ... + 111 = /dev/usb/hiddev15 16th USB HID device + 112 = /dev/usb/auer0 1st auerswald ISDN device + ... + 127 = /dev/usb/auer15 16th auerswald ISDN device + 128 = /dev/usb/brlvgr0 First Braille Voyager device + ... + 131 = /dev/usb/brlvgr3 Fourth Braille Voyager device + 144 = /dev/usb/lcd USB LCD device + 160 = /dev/usb/legousbtower0 1st USB Legotower device + ... + 175 = /dev/usb/legousbtower15 16th USB Legotower device + 240 = /dev/usb/dabusb0 First daubusb device + ... + 243 = /dev/usb/dabusb3 Fourth dabusb device 181 char Conrad Electronic parallel port radio clocks 0 = /dev/pcfclock0 First Conrad radio clock diff -Nru a/Documentation/digiboard.txt b/Documentation/digiboard.txt --- a/Documentation/digiboard.txt 2004-11-10 17:19:04 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,272 +0,0 @@ -The Linux Digiboard Driver --------------------------- - -The Digiboard Driver for Linux supports the following boards: - - DigiBoard PC/Xi, PC/Xe, PC/Xeve(which is the newer, smaller Xe with - a 8K window which is also known as PC/Xe(8K) and has no memory/irq - switches) You can use up to 4 cards with this driver and it should work - on other architectures than intel also. - -A version of this driver has been taken by Digiboard to make a driver -software package which supports also PC/Xem cards and newer PCI cards -but it doesn't support the old PC/Xi cards and it isn't yet ported to -linux-2.1.x and may not be usable on other architectures than intel now. -It is available from ftp.digi.com/ftp.digiboard.com. You can write me if -you need an patch for this driver. - -Bernhard Kaindl (bkaindl@netway.at) 6. April 1997. - -Configuring the Driver ----------------------- - -The driver can be built direct into the kernel or as a module. -The pcxx driver can be configured using the command line feature while -loading the kernel with LILO or LOADLIN or, if built as a module, -with arguments to insmod and modprobe or with parameters in -/etc/modprobe.conf for modprobe and kerneld. - -After configuring the driver you need to create the device special files -as described in "Device file creation:" below and set the appropriate -permissions for your application. - -As Module ---------- - -modprobe pcxx io= \ - membase= \ - memsize= \ - numports= \ - altpin= \ - verbose= - -or, if several cards are installed - -modprobe pcxx io=,,... \ - membase=,,... \ - memsize=,,... \ - numports=,,... \ - altpin=,,... \ - verbose= - -where is the io address of the Nth card and is the -memory base address of the Nth card, etc. - -The parameters can be specified in any order. For example, the numports -parameter can precede the membase parameter, or vice versa. If several -cards are installed the ordering within the comma separated parameter -lists must be consistent, of course. - -io - I/O port address of that card. -membase - Memory start address of that card. -memsize - Memory size of that card, in kilobytes. If given, this value - is compared against the card to verify configuration and - hinder the driver from using a misconfigured card. If the parameter - does not match the board it is disabled with a memory size error. -numports - Number of ports on this card. This is the number of devices to - assign to this card or reserve if disabled. -altpin - 1: swap DCD and DSR for 8-pin RJ-45 with modems. - 0: don't swap DCD and DSR. - other values count as 1. -verbose - 1: give nice verbose output during initialisation of the driver, - possibly helpful during board configuration. - 0: normal terse output. - -Only the parameters which differ from the defaults need to be specified. -If the io= parameter is not given, the default config is used. This is - - io=0x200 membase=0xD0000 numports=16 altpin=0 - -Only applicable parameters need be specified. For example to configure -2 boards, first one at 0x200 with 8 ports, rest defaults, second one at -0x120, memory at 0xD80000, altpin enabled, rest defaults, you can do this -by using these parameters: - - modprobe pcxx io=0x200,0x120 numports=8,8 membase=,0xD80000 altpin=,1 - -To disable a temporary unusable board without changing the mapping of the -devices following that board, you can empty the io-value for that board: - - modprobe pcxx io=,0x120 numports=8,8 membase=,0xD80000 altpin=,1 - -The remaining board still uses ttyD8-ttyD15 and cud8-cud15. - -Example line for /etc/modprobe.conf for use with kerneld and as default -parameters for modprobe: - -options pcxx io=0x200 numports=8 - -For kmod to work you will likely need to add these two lines to your -/etc/modprobe.conf: - -alias char-major-22 pcxx -alias char-major-23 pcxx - - -Boot-time configuration when linked into the kernel ---------------------------------------------------- - -Per board to be configured, pass a digi= command-line parameter to the -kernel using lilo or loadlin. It consists of a string of comma separated -identifiers or integers. The 6 values in order are: - -Card status: Enable - use that board - Disable - don't actually use that board. - -Card type: PC/Xi - the old ones with 64/128/256/512K RAM. - PC/Xe - PC/Xe(old ones with 64k mem range). - PC/Xeve - PC/Xe(new ones with 8k mem range). - -Note: This is for documentation only, the type is detected from the board. - -Altpin setting: Enable - swap DCD and DSR for 8-pin RJ-45 with modems. - Disable - don't swap DCD and DSR. - -Number of ports: 1 ... 16 - Number of ports on this card. This is the - number of devices to assign to this card. - -I/O port address: eg. 200 - I/O Port address where the card is configured. - -Memory base addr: eg. 80000 - Memory address where the board's memory starts. - -This is an example for a line which you can insert into you lilo.conf: - - append="digi=Enable,PC/Xi,Disable,4,120,D0000" - -there is an alternate form, in which you must use decimal values only: - - append="digi=1,0,0,16,512,851968" - -If you don't give a digi= command line, the compiled-in defaults of -board 1: io=0x200, membase=0xd0000, altpin=off and numports=16 are used. - -If you have the resources (io&mem) free for use, configure your board to -these settings and you should be set up fine even if yours has not got 16 -ports. - - -Sources of Information ----------------------- - -Please contact digi directly digilnux@dgii.com. Forward any information of -general interest to me so that I can include it on the webpage. - -Web page: http://lameter.com/digi - -Christoph Lameter (christoph@lameter.com) Aug 14, 2000. - -Device file creation --------------------- - -Currently the Linux MAKEDEV command does not support generating the Digiboard -Devices. - -The /dev/cud devices behave like the /dev/cua devices -and the ttyD devices are like the /dev/ttyS devices. - -Use the following script to generate the devices: - ------------------- mkdigidev begin -#!/bin/sh -# -# Script to create Digiboard Devices -# Christoph Lameter, April 16, 1996 -# -# Usage: -# mkdigidev [] -# - -DIGI_MAJOR=23 -DIGICU_MAJOR=22 - -BOARDS=$1 - -if [ "$BOARDS" = "" ]; then -BOARDS=1 -fi - -boardnum=0 -while [ $boardnum -lt $BOARDS ]; -do - for c in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; - do - name=`expr $boardnum \* 16 + $c` - mknod /dev/cud$name c $DIGICU_MAJOR $name - mknod /dev/ttyD$name c $DIGI_MAJOR $name - done - boardnum=`expr $boardnum + 1` -done ------------------- mkdigidev end - -or apply the following patch to /dev/MAKEDEV and do a -sh /dev/MAKEDEV digi - ------ MAKEDEV Patch ---- /dev/MAKEDEV Sun Aug 13 15:48:23 1995 -+++ MAKEDEV Tue Apr 16 17:53:27 1996 -@@ -120,7 +120,7 @@ - while [ $# -ne 0 ] - do - case "$1" in -- mem|tty|ttyp|cua|cub) ;; -+ mem|tty|ttyp|cua|cub|cud) ;; - hd) echo hda hdb hdc hdd ;; - xd) echo xda xdb ;; - fd) echo fd0 fd1 ;; -@@ -140,6 +140,7 @@ - dcf) echo dcf ;; - pcmcia) ;; # taken care of by its own driver - ttyC) echo cyclades ;; -+ ttyD) echo digi ;; - *) echo "$0: don't know what \"$1\" is" >&2 ;; - esac - shift -@@ -208,6 +209,15 @@ - do - makedev ttyC$i c $major1 `expr 32 + $i` $tty - makedev cub$i c $major2 `expr 32 + $i` $dialout -+ done -+ ;; -+ digi) -+ major1=`Major ttyD` || continue -+ major2=`Major cud` || continue -+ for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 -+ do -+ makedev ttyD$i c $major1 `expr 32 + $i` $tty -+ makedev cud$i c $major2 `expr 32 + $i` $dialout - done - ;; - par[0-2]) ------ End Makedev patch - ------------------------------------------------------------------------------ - -Changes v1.5.5: - -The ability to use the kernel's command line to pass in the configuration for -boards. Using LILO's APPEND command, a string of comma separated identifiers -or integers can be used. The 6 values in order are: - - Enable/Disable this card, - Type of card: PC/Xi(0), PC/Xe(1), PC/Xeve(2), PC/Xem(3) - Enable/Disable alternate pin arrangement, - Number of ports on this card, - I/O Port where card is configured (in HEX if using string identifiers), - Base of memory window (in HEX if using string identifiers), - -Samples: - append="digi=E,PC/Xi,D,16,200,D0000" - append="digi=1,0,0,16,512,(whatever D0000 is in base 10 :) - -Drivers' minor device numbers are conserved. This means that instead of -each board getting a block of 16 minors pre-assigned, it gets however -many it should, with the next card following directly behind it. A -system with 4 2-port PC/Xi boards will use minor numbers 0-7. -This conserves some memory, and removes a few hard coded constants. - -NOTE!! NOTE!! NOTE!! -The definition of PC/Xem as a valid board type is the BEGINNING of support -for this device. The driver does not currently recognise the board, nor -does it want to initialize it. At least not the EISA version. - -Mike McLagan 5, April 1996. diff -Nru a/Documentation/digiepca.txt b/Documentation/digiepca.txt --- a/Documentation/digiepca.txt 2004-11-10 17:19:02 -08:00 +++ b/Documentation/digiepca.txt 2004-11-10 17:19:02 -08:00 @@ -1,3 +1,11 @@ +NOTE: This driver is obsolete. Digi provides a 2.6 driver (dgdm) at +http://www.digi.com for PCI cards. They no longer maintain this driver, +and have no 2.6 driver for ISA cards. + +This driver requires a number of user-space tools. They can be aquired from +http://www.digi.com, but only works with 2.4 kernels. + + The Digi Intl. epca driver. ---------------------------- The Digi Intl. epca driver for Linux supports the following boards: @@ -64,9 +72,6 @@ this driver REQUIRES that digiDload be executed prior to it being used. Failure to do this will result in an ENODEV error. -The latest version of the tool package is available at: -ftp://ftp.dgii.com/drivers/linux/released/async/ - Documentation: -------------- Complete documentation for this product may be found in the tool package. @@ -74,14 +79,8 @@ Sources of information and support: ----------------------------------- Digi Intl. support site for this product: --> digilnux@dgii.com -Related information and information concerning other drivers supporting -Digi Intl. products: - --> FTP: ftp://dgii.com --> Webpage: http://www.dgii.com --> Webpage: http://lameter.com/digi +-> http://www.digi.com Acknowledgments: ---------------- @@ -90,3 +89,10 @@ 1994,1995 Troy De Jongh. Many thanks to Christoph Lameter (christoph@lameter.com) and Mike McLagan (mike.mclagan@linux.org) who authored and contributed to the original document. + +Changelog: +---------- +10-29-04: Update status of driver, remove dead links in document + James Nelson + +2000 (?) Original Document diff -Nru a/Documentation/dnotify.txt b/Documentation/dnotify.txt --- a/Documentation/dnotify.txt 2004-11-10 17:19:05 -08:00 +++ b/Documentation/dnotify.txt 2004-11-10 17:19:05 -08:00 @@ -54,6 +54,12 @@ Also, files that are unlinked, will still cause notifications in the last directory that they were linked to. +Configuration +------------- + +Dnotify is controlled via the CONFIG_DNOTIFY configuration option. When +disabled, fcntl(fd, F_NOTIFY, ...) will return -EINVAL. + Example ------- diff -Nru a/Documentation/dvb/README.dibusb b/Documentation/dvb/README.dibusb --- a/Documentation/dvb/README.dibusb 2004-11-10 17:19:02 -08:00 +++ b/Documentation/dvb/README.dibusb 2004-11-10 17:19:02 -08:00 @@ -1,9 +1,11 @@ + + Documentation for dib3000mb frontend driver and dibusb device driver The drivers should work with - Twinhan VisionPlus VisionDTV USB-Ter DVB-T Device (VP7041) - http://www.twinhan.com/visiontv-2_4.htm + http://www.twinhan.com/ - CTS Portable (Chinese Television System) http://www.2cts.tv/ctsportable/ @@ -19,6 +21,10 @@ - Ultima Electronic/Artec T1 USB TVBOX http://www.arteceuro.com/products-tvbox.html +- Compro Videomate DVB-U2000 - DVB-T USB + http://www.comprousa.com/products/vmu2000.htm + +- Unknown USB DVB-T device with vendor ID Hyper-Paltek Copyright (C) 2004 Patrick Boettcher (patrick.boettcher@desy.de), @@ -32,6 +38,11 @@ NEWS: + 2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek) + 2004-09-20 - added support for a new device (Compro DVB-U2000), thanks + to Amaury Demol for reporting + - changed usb TS transfer method (several urbs, stopping transfer + before setting a new pid) 2004-09-13 - added support for a new device (Artec T1 USB TVBOX), thanks to Christian Motschke for reporting 2004-09-05 - released the dibusb device and dib3000mb-frontend driver @@ -85,8 +96,13 @@ If you want to enable debug output, you have to load the driver manually. -modprobe dvb-dibusb debug=1 -modprobe dib3000mb debug=1 +first have a look, which debug level are available: + +modinfo dvb-dibusb +modinfo dib3000mb + +modprobe dvb-dibusb debug= +modprobe dib3000mb debug= should do the trick. @@ -102,11 +118,13 @@ 2. Known problems and bugs TODO: -- add some additional URBs for USB data transfer -- due a firmware problem i2c writes during mpeg transfers destroy the stream - no i2c writes during streaming, interrupt streaming, when adding another pid +- remote control tasklet +- signal-quality and strength calculations +- debug messages restructure +- i2c address probing +- -2.1. Adding new devices +2.1. Adding support for devices It is not possible to determine the range of devices based on the DiBcom reference design. This is because the reference design of DiBcom can be sold @@ -122,7 +140,7 @@ others. If you are familar with C you can also add the VID and PID of the device to -the dvb-dibusb.[hc]-files and create a patch and send it over to me or to +the dvb-dibusb.h-file and create a patch and send it over to me or to the linux-dvb mailing list, _after_ you have tried compiling and modprobing it. diff -Nru a/Documentation/dvb/readme.txt b/Documentation/dvb/readme.txt --- a/Documentation/dvb/readme.txt 2004-11-10 17:19:02 -08:00 +++ b/Documentation/dvb/readme.txt 2004-11-10 17:19:02 -08:00 @@ -41,9 +41,9 @@ various bt8xx based "budget" DVB cards (Nebula, Pinnacle PCTV, Twinhan DST) -"vp7041.txt" -contains detailed informations about the -Visionplus VisionDTV USB-Ter DVB-T adapter. +"README.dibusb" +contains detailed information about adapters +based on DiBcom reference design. "udev.txt" how to get DVB and udev up and running. diff -Nru a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking --- a/Documentation/filesystems/Locking 2004-11-10 17:19:06 -08:00 +++ b/Documentation/filesystems/Locking 2004-11-10 17:19:06 -08:00 @@ -317,8 +317,8 @@ locking rules: called from interrupts. In other words, extreme care is needed here. bh is locked, but that's all warranties we have here. Currently only RAID1, -highmem and fs/buffer.c are providing these. Block devices call this method -upon the IO completion. +highmem, fs/buffer.c, and fs/ntfs/aops.c are providing these. Block devices +call this method upon the IO completion. --------------------------- block_device_operations ----------------------- prototypes: diff -Nru a/Documentation/filesystems/devfs/ChangeLog b/Documentation/filesystems/devfs/ChangeLog --- a/Documentation/filesystems/devfs/ChangeLog 2004-11-10 17:19:02 -08:00 +++ b/Documentation/filesystems/devfs/ChangeLog 2004-11-10 17:19:02 -08:00 @@ -1632,7 +1632,7 @@ - Fixed bugs in handling symlinks: could leak or cause Oops - Cleaned up directory handling by separating fops - Thanks to Alexander Viro + Thanks to Alexander Viro =============================================================================== Changes for patch v178 diff -Nru a/Documentation/filesystems/ext2.txt b/Documentation/filesystems/ext2.txt --- a/Documentation/filesystems/ext2.txt 2004-11-10 17:19:03 -08:00 +++ b/Documentation/filesystems/ext2.txt 2004-11-10 17:19:03 -08:00 @@ -11,56 +11,52 @@ Options ======= -When mounting an ext2 filesystem, the following options are accepted. -Defaults are marked with (*). +Most defaults are determined by the filesystem superblock, and can be +set using tune2fs(8). Kernel-determined defaults are indicated by (*). bsddf (*) Makes `df' act like BSD. minixdf Makes `df' act like Minix. -barrier=1 This enables/disables barriers. barrier=0 disables it, - barrier=1 enables it. - -orlov (*) This enables the new Orlov block allocator. It's - enabled by default. - -oldalloc This disables the Orlov block allocator and - enables the old block allocator. Orlov should - have better performance, we'd like to get some - feedback if it's the contrary for you. - -user_xattr (*) Enables POSIX Extended Attributes. It's enabled by - default, however you need to confifure its support - (CONFIG_EXT2_FS_XATTR). This is neccesary if you want - to use POSIX Acces Control Lists support. You can visit - http://acl.bestbits.at to know more about POSIX Extended - attributes. - -nouser_xattr Disables POSIX Extended Attributes. - -acl (*) Enables POSIX Access Control Lists support. This is - enabled by default, however you need to configure - its support (CONFIG_EXT2_FS_POSIX_ACL). If you want - to know more about ACLs visit http://acl.bestbits.at - -noacl This option disables POSIX Access Control List support. - +check Check block and inode bitmaps at mount time + (requires CONFIG_EXT2_CHECK). check=none, nocheck (*) Don't do extra checking of bitmaps on mount (check=normal and check=strict options removed) debug Extra debugging information is sent to the kernel syslog. Useful for developers. -errors=continue (*) Keep going on a filesystem error. +errors=continue Keep going on a filesystem error. errors=remount-ro Remount the filesystem read-only on an error. errors=panic Panic and halt the machine if an error occurs. grpid, bsdgroups Give objects the same group ID as their parent. -nogrpid, sysvgroups (*) New objects have the group ID of their creator. +nogrpid, sysvgroups New objects have the group ID of their creator. + +nouid32 Use 16-bit UIDs and GIDs. + +oldalloc Enable the old block allocator. Orlov should + have better performance, we'd like to get some + feedback if it's the contrary for you. +orlov (*) Use the Orlov block allocator. + (See http://lwn.net/Articles/14633/ and + http://lwn.net/Articles/14446/.) resuid=n The user ID which may use the reserved blocks. -resgid=n The group ID which may use the reserved blocks. +resgid=n The group ID which may use the reserved blocks. sb=n Use alternate superblock at this location. + +user_xattr Enable "user." POSIX Extended Attributes + (requires CONFIG_EXT2_FS_XATTR). + See also http://acl.bestbits.at +nouser_xattr Don't support "user." extended attributes. + +acl Enable POSIX Access Control Lists support + (requires CONFIG_EXT2_FS_POSIX_ACL). + See also http://acl.bestbits.at +noacl Don't support POSIX ACLs. + +nobh Do not attach buffer_heads to file pagecache. grpquota,noquota,quota,usrquota Quota options are silently ignored by ext2. diff -Nru a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt --- a/Documentation/filesystems/ntfs.txt 2004-11-10 17:19:04 -08:00 +++ b/Documentation/filesystems/ntfs.txt 2004-11-10 17:19:04 -08:00 @@ -258,10 +258,10 @@ $ ./ldminfo --dump /dev/hda This would dump the LDM database found on /dev/hda which describes all of your -dinamic disks and all the volumes on them. At the bottom you will see the +dynamic disks and all the volumes on them. At the bottom you will see the VOLUME DEFINITIONS section which is all you really need. You may need to look further above to determine which of the disks in the volume definitions is -which device in Linux. Hint: Run ldminfo on each of your dinamic disks and +which device in Linux. Hint: Run ldminfo on each of your dynamic disks and look at the Disk Id close to the top of the output for each (the PRIVATE HEADER section). You can then find these Disk Ids in the VBLK DATABASE section in the components where you will get the LDM Name for the disk that is found in @@ -432,6 +432,9 @@ Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. +2.1.22: + - Improve handling of ntfs volumes with errors. + - Fix various bugs and race conditions. 2.1.21: - Fix several race conditions and various other bugs. - Many internal cleanups, code reorganization, optimizations, and mft diff -Nru a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt --- a/Documentation/filesystems/proc.txt 2004-11-10 17:19:03 -08:00 +++ b/Documentation/filesystems/proc.txt 2004-11-10 17:19:03 -08:00 @@ -380,9 +380,7 @@ Slab: 684068 kB CommitLimit: 7669796 kB Committed_AS: 100056 kB -CommitAvail: 7569740 kB PageTables: 24448 kB -ReverseMaps: 1080904 VmallocTotal: 112216 kB VmallocUsed: 428 kB VmallocChunk: 111088 kB @@ -446,20 +444,8 @@ above) will not be permitted. This is useful if one needs to guarantee that processes will not fail due to lack of memory once that memory has been successfully allocated. - CommitAvail: Based on the current overcommit ratio - ('vm.overcommit_ratio'), this is the amount of memory - currently available to be allocated under the overcommit - limit (the CommitLimit above). This is calculated as: - CommitAvail = CommitLimit - Committed_AS - This limit is only enforced if strict overcommit accounting - is enabled (mode 2 in 'vm.overcommit_memory'). CommitAvail - may be a negative number if strict accounting is not enabled - and the system's memory is currently overcommitted. - For more details, see the memory overcommit documentation - in vm/overcommit-accounting. PageTables: amount of memory dedicated to the lowest level of page tables. - ReverseMaps: number of reverse mappings performed VmallocTotal: total size of vmalloc memory area VmallocUsed: amount of vmalloc area which is used VmallocChunk: largest contigious block of vmalloc area which is free diff -Nru a/Documentation/filesystems/ufs.txt b/Documentation/filesystems/ufs.txt --- a/Documentation/filesystems/ufs.txt 2004-11-10 17:19:05 -08:00 +++ b/Documentation/filesystems/ufs.txt 2004-11-10 17:19:05 -08:00 @@ -15,13 +15,15 @@ ufs manually by mount option ufstype. Possible values are: old old format of ufs - default value, supported os read-only + default value, supported as read-only 44bsd used in FreeBSD, NetBSD, OpenBSD - supported os read-write + supported as read-write + + ufs2 used in FreeBSD 5.x + supported as read-only - ufs2 used in FreeBSD 5.x - supported os read-only + 5xbsd synonym for ufs2 sun used in SunOS (Solaris) supported as read-write @@ -29,6 +31,9 @@ sunx86 used in SunOS for Intel (Solarisx86) supported as read-write + hp used in HP-UX + supported as read-only + nextstep used in NextStep supported as read-only @@ -46,7 +51,7 @@ ================= There is still bug in reallocation of fragment, in file fs/ufs/balloc.c, -line 364. But it seem working on current buffer cache configuration. +line 364. But it seems working on current buffer cache configuration. BUG REPORTS diff -Nru a/Documentation/floppy.txt b/Documentation/floppy.txt --- a/Documentation/floppy.txt 2004-11-10 17:19:04 -08:00 +++ b/Documentation/floppy.txt 2004-11-10 17:19:04 -08:00 @@ -13,15 +13,20 @@ The floppy driver is configured using the 'floppy=' option in lilo. This option can be typed at the boot prompt, or entered in the lilo configuration file. - Example: If your kernel is called linux-2.2.13, type the following line + + Example: If your kernel is called linux-2.6.9, type the following line at the lilo boot prompt (if you have a thinkpad): - linux-2.2.13 floppy=thinkpad + + linux-2.6.9 floppy=thinkpad + You may also enter the following line in /etc/lilo.conf, in the description -of linux-2.2.13: +of linux-2.6.9: + append = "floppy=thinkpad" Several floppy related options may be given, example: - linux-2.2.13 floppy=daring floppy=two_fdc + + linux-2.6.9 floppy=daring floppy=two_fdc append = "floppy=daring floppy=two_fdc" If you give options both in the lilo config file and on the boot @@ -29,17 +34,25 @@ prompt options coming last. That's why there are also options to restore the default behavior. + +Module configuration options +============================ + If you use the floppy driver as a module, use the following syntax: - insmod floppy +modprobe floppy Example: - insmod floppy daring two_fdc + modprobe floppy omnibook messages + + If you need certain options enabled every time you load the floppy driver, +you can put: + + options floppy omnibook messages - Some versions of insmod are buggy in one way or another. If you have -any problems (options not being passed correctly, segfaults during -insmod), first check whether there is a more recent version. +in /etc/modprobe.conf. - The floppy related options include: + + The floppy driver related options are: floppy=asus_pci Sets the bit mask to allow only units 0 and 1. (default) @@ -99,7 +112,7 @@ master arbitration error" messages from your Ethernet card (or from other devices) while accessing the floppy. - floppy=fifo + floppy=usefifo Enables the FIFO. (default) floppy=,fifo_depth @@ -110,6 +123,7 @@ lower, the interrupt latency should be lower too (faster processor). The benefit of a lower threshold is less interrupts. + To tune the fifo threshold, switch on over/underrun messages using 'floppycontrol --messages'. Then access a floppy disk. If you get a huge amount of "Over/Underrun - retrying" @@ -120,6 +134,7 @@ fifo values without rebooting the machine for each test. Note that you need to do 'floppycontrol --messages' every time you re-insert the module. + Usually, tuning the fifo threshold should not be needed, as the default (0xa) is reasonable. @@ -128,6 +143,7 @@ you have more than two floppy drives (only two can be described in the physical CMOS), or if your BIOS uses non-standard CMOS types. The CMOS types are: + 0 - Use the value of the physical CMOS 1 - 5 1/4 DD 2 - 5 1/4 HD @@ -136,6 +152,7 @@ 5 - 3 1/2 ED 6 - 3 1/2 ED 16 - unknown or not installed + (Note: there are two valid types for ED drives. This is because 5 was initially chosen to represent floppy *tapes*, and 6 for ED drives. AMI ignored this, and used 5 for ED drives. That's why the floppy @@ -188,7 +205,6 @@ in some more extreme cases." - Supporting utilities and additional documentation: ================================================== @@ -219,3 +235,11 @@ Be sure to read the FAQ before mailing/posting any bug reports! Alain + +Changelog +========= + +10-30-2004 : Cleanup, updating, add reference to module configuration. + James Nelson + +6-3-2000 : Original Document diff -Nru a/Documentation/ftape.txt b/Documentation/ftape.txt --- a/Documentation/ftape.txt 2004-11-10 17:19:02 -08:00 +++ b/Documentation/ftape.txt 2004-11-10 17:19:02 -08:00 @@ -2,26 +2,21 @@ ===== This file describes some issues involved when using the "ftape" -floppy tape device driver that comes with the Linux kernel. This -document deals with ftape-3.04 and later. Please read the section -"Changes" for the most striking differences between version 3.04 and -2.08; the latter was the version of ftape delivered with the kernel -until kernel version 2.0.30 and 2.1.57. ftape-3.x developed as the -re-unification of ftape-2.x and zftape. zftape was developed in -parallel with the stock ftape-2.x driver sharing the same hardware -support but providing an enhanced file system interface. zftape also -provided user transparent block-wise on-the-fly compression (regard it -as a feature or bug of zftape). +floppy tape device driver that comes with the Linux kernel. ftape has a home page at -http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape +http://ftape.dot-heine.de/ which contains further information about ftape. Please cross check this WWW address against the address given (if any) in the MAINTAINERS file located in the top level directory of the Linux kernel source tree. +NOTE: This is an unmaintained set of drivers, and it is not guaranteed to work. +If you are interested in taking over maintenance, contact Claus-Justus Heine +, the former maintainer. + Contents ======== @@ -31,9 +26,8 @@ 1. Goal 2. I/O Block Size 3. Write Access when not at EOD (End Of Data) or BOT (Begin Of Tape) - 4. MTBSF - backspace over file mark and position at its EOT side - 5. Formatting - 6. Interchanging cartridges with other operating systems + 4. Formatting + 5. Interchanging cartridges with other operating systems B. Debugging Output 1. Introduction @@ -58,7 +52,7 @@ versions of ftape and useful links to related topics can be found at the ftape home page at -http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape +http://ftape.dot-heine.de/ ******************************************************************************* @@ -70,7 +64,7 @@ The goal of all that incompatibilities was to give ftape an interface that resembles the interface provided by SCSI tape drives as close as possible. Thus any Unix backup program that is known to work - with SCSI tape drives should also work with ftape-3.04 and above. + with SCSI tape drives should also work. The concept of a fixed block size for read/write transfers is rather unrelated to this SCSI tape compatibility at the file system @@ -81,14 +75,8 @@ 2. I/O Block Size ~~~~~~~~~~~~~~ - The probably most striking difference between ftape-2.x and - ftape-3.x with the zftape file system interface is the concept of a - fixed block size: data must be written to or read from the tape in - multiples of a fixed block size. The block size defaults to 10k - which is the default block size of GNU tar. While this is quite - usual for SCSI tapes (block size of 32k?) and the QIC-150 driver - `./drivers/char/tpqic02.c' ftape-2.x allowed data to be written in - arbitrary portions to the tape. + The block size defaults to 10k which is the default block size of + GNU tar. The block size can be tuned either during kernel configuration or at runtime with the MTIOCTOP ioctl using the MTSETBLK operation @@ -109,53 +97,41 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ zftape (the file system interface of ftape-3.x) denies write access to the tape cartridge when it isn't positioned either at BOT or - EOD. This inconvenience has been introduced as it was reported that - the former behavior of ftape-2.x which allowed write access at - arbitrary locations already has caused data loss with some backup - programs. - -4. MTBSF - backspace over file mark and position at its EOT side - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ftape-2.x didn't handle the MTBSF tape operation correctly. A MTBSF - call (i.e. "mt -f /dev/nqft0 bsf #COUNT") should space over #COUNT - file marks and then position at the EOT tape side of the file - mark. This has to be taken literally, i.e. "mt -f /dev/nqft0 bsf 1" - should simply position at the start of the current volume. + EOD. -5. Formatting +4. Formatting ~~~~~~~~~~ - ftape-3.x DOES support formatting of floppy tape cartridges. You - need the `ftformat' program that is shipped with the modules version - of ftape-3.x. Please get the latest version of ftape from + ftape DOES support formatting of floppy tape cartridges. You need the + `ftformat' program that is shipped with the modules version of ftape. + Please get the latest version of ftape from ftp://sunsite.unc.edu/pub/Linux/kernel/tapes or from the ftape home page at - http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape + http://ftape.dot-heine.de/ `ftformat' is contained in the `./contrib/' subdirectory of that separate ftape package. -6. Interchanging cartridges with other operating systems +5. Interchanging cartridges with other operating systems ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The internal emulation of Unix tape device file marks has changed - completely. ftape-3.x now uses the volume table segment as specified + completely. ftape now uses the volume table segment as specified by the QIC-40/80/3010/3020/113 standards to emulate file marks. As a consequence there is limited support to interchange cartridges with other operating systems. To be more precise: ftape will detect volumes written by other OS's programs and other OS's programs will detect volumes written by - ftape-3.x. + ftape. However, it isn't possible to extract the data dumped to the tape - by some MSDOG program with ftape-3.x. This exceeds the scope of a + by some MSDOS program with ftape. This exceeds the scope of a kernel device driver. If you need such functionality, then go ahead - and write a user space utility that is able to do - that. ftape-3.x/zftape already provides all kernel level support - necessary to do that. + and write a user space utility that is able to do that. ftape already + provides all kernel level support necessary to do that. ******************************************************************************* @@ -200,7 +176,7 @@ ii) trim the debugging output at module load time with - insmod ftape.o ft_tracing=#DBGLVL + modprobe ftape ft_tracing=#DBGLVL Of course, this applies only if you have configured ftape to be compiled as a module. @@ -240,7 +216,7 @@ 2. Module load time parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Module parameters can be specified either directly when invoking - the program 'insmod' at the shell prompt: + the program 'modprobe' at the shell prompt: modprobe ftape ft_tracing=4 @@ -277,6 +253,12 @@ line documentation provided during that kernel configuration process. + ft_probe_fc10 is set to a non-zero value if you wish for ftape to + probe for a Colorado FC-10 or FC-20 controller. + + ft_mach2 is set to a non-zero value if you wish for ftape to probe + for a Mountain MACH-2 controller. + module | kernel command line -----------------------|---------------------- ft_fdc_base=BASE | ftape=BASE,ioport @@ -316,10 +298,10 @@ page to query for the most recent documentation, related work and development versions of ftape. + Changelog: + ========== + +~1996: Original Document - LocalWords: ftape Linux zftape http www rwth aachen LBFM claus EOD config - LocalWords: datarate LocalWords BOT MTBSF EOT HOWTO QIC tpqic menuconfig - LocalWords: MTIOCTOP MTSETBLK mt dev qft setblk BLKSZ bsf zftape's xconfig - LocalWords: nqft ftformat ftp sunsite unc edu contrib ft MSDOG fdc - LocalWords: dma setdensity DBGLVL insmod lilo LI nux ader conf txt - LocalWords: modprobe IRQ BOOL ioport irq fc mach THR +10-24-2004: General cleanup and updating, noting additional module options. + James Nelson diff -Nru a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients --- a/Documentation/i2c/writing-clients 2004-11-10 17:19:03 -08:00 +++ b/Documentation/i2c/writing-clients 2004-11-10 17:19:03 -08:00 @@ -571,7 +571,7 @@ have to be cleaned up! */ static int __initdata foo_initialized = 0; - int __init foo_init(void) + static int __init foo_init(void) { int res; printk("foo version %s (%s)\n",FOO_VERSION,FOO_DATE); @@ -585,41 +585,27 @@ return 0; } - int __init foo_cleanup(void) + void foo_cleanup(void) { - int res; if (foo_initialized == 1) { if ((res = i2c_del_driver(&foo_driver))) { printk("foo: Driver registration failed, module not removed.\n"); - return res; + return; } foo_initialized --; } - return 0; } - #ifdef MODULE - /* Substitute your own name and email address */ MODULE_AUTHOR("Frodo Looijaard " MODULE_DESCRIPTION("Driver for Barf Inc. Foo I2C devices"); - int init_module(void) - { - return foo_init(); - } - - int cleanup_module(void) - { - return foo_cleanup(); - } - - #endif /* def MODULE */ + module_init(foo_init); + module_exit(foo_cleanup); Note that some functions are marked by `__init', and some data structures -by `__init_data'. If this driver is compiled as part of the kernel (instead -of as a module), those functions and structures can be removed after -kernel booting is completed. +by `__init_data'. Hose functions and structures can be removed after +kernel booting (or module loading) is completed. Command function ================ diff -Nru a/Documentation/ibm-acpi.txt b/Documentation/ibm-acpi.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/ibm-acpi.txt 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,474 @@ + IBM ThinkPad ACPI Extras Driver + + Version 0.8 + 8 November 2004 + + Borislav Deianov + http://ibm-acpi.sf.net/ + + +This is a Linux ACPI driver for the IBM ThinkPad laptops. It aims to +support various features of these laptops which are accessible through +the ACPI framework but not otherwise supported by the generic Linux +ACPI drivers. + + +Status +------ + +The features currently supported are the following (see below for +detailed description): + + - Fn key combinations + - Bluetooth enable and disable + - video output switching, expansion control + - ThinkLight on and off + - limited docking and undocking + - UltraBay eject + - Experimental: CMOS control + - Experimental: LED control + - Experimental: ACPI sounds + +A compatibility table by model and feature is maintained on the web +site, http://ibm-acpi.sf.net/. I appreciate any success or failure +reports, especially if they add to or correct the compatibility table. +Please include the following information in your report: + + - ThinkPad model name + - a copy of your DSDT, from /proc/acpi/dsdt + - which driver features work and which don't + - the observed behavior of non-working features + +Any other comments or patches are also more than welcome. + + +Installation +------------ + +If you are compiling this driver as included in the Linux kernel +sources, simply enable the CONFIG_ACPI_IBM option (Power Management / +ACPI / IBM ThinkPad Laptop Extras). The rest of this section describes +how to install this driver when downloaded from the web site. + +First, you need to get a kernel with ACPI support up and running. +Please refer to http://acpi.sourceforge.net/ for help with this +step. How successful you will be depends a lot on you ThinkPad model, +the kernel you are using and any additional patches applied. The +kernel provided with your distribution may not be good enough. I +needed to compile a 2.6.7 kernel with the 20040715 ACPI patch to get +ACPI working reliably on my ThinkPad X40. Old ThinkPad models may not +be supported at all. + +Assuming you have the basic ACPI support working (e.g. you can see the +/proc/acpi directory), follow the following steps to install this +driver: + + - unpack the archive: + + tar xzvf ibm-acpi-x.y.tar.gz; cd ibm-acpi-x.y + + - compile the driver: + + make + + - install the module in your kernel modules directory: + + make install + + - load the module: + + modprobe ibm_acpi + +After loading the module, check the "dmesg" output for any error messages. + + +Features +-------- + +The driver creates the /proc/acpi/ibm directory. There is a file under +that directory for each feature described below. Note that while the +driver is still in the alpha stage, the exact proc file format and +commands supported by the various features is guaranteed to change +frequently. + +Driver Version -- /proc/acpi/ibm/driver +-------------------------------------- + +The driver name and version. No commands can be written to this file. + +Hot Keys -- /proc/acpi/ibm/hotkey +--------------------------------- + +Without this driver, only the Fn-F4 key (sleep button) generates an +ACPI event. With the driver loaded, the hotkey feature enabled and the +mask set (see below), the various hot keys generate ACPI events in the +following format: + + ibm/hotkey HKEY 00000080 0000xxxx + +The last four digits vary depending on the key combination pressed. +All labeled Fn-Fx key combinations generate distinct events. In +addition, the lid microswitch and some docking station buttons may +also generate such events. + +The following commands can be written to this file: + + echo enable > /proc/acpi/ibm/hotkey -- enable the hot keys feature + echo disable > /proc/acpi/ibm/hotkey -- disable the hot keys feature + echo 0xffff > /proc/acpi/ibm/hotkey -- enable all possible hot keys + echo 0x0000 > /proc/acpi/ibm/hotkey -- disable all possible hot keys + ... any other 4-hex-digit mask ... + echo reset > /proc/acpi/ibm/hotkey -- restore the original mask + +The bit mask allows some control over which hot keys generate ACPI +events. Not all bits in the mask can be modified. Not all bits that +can be modified do anything. Not all hot keys can be individually +controlled by the mask. Most recent ThinkPad models honor the +following bits (assuming the hot keys feature has been enabled): + + key bit behavior when set behavior when unset + + Fn-F3 always generates ACPI event + Fn-F4 always generates ACPI event + Fn-F5 0010 generate ACPI event enable/disable Bluetooth + Fn-F7 0040 generate ACPI event switch LCD and external display + Fn-F8 0080 generate ACPI event expand screen or none + Fn-F9 0100 generate ACPI event none + Fn-F12 always generates ACPI event + +Some models do not support all of the above. For example, the T30 does +not support Fn-F5 and Fn-F9. Other models do not support the mask at +all. On those models, hot keys cannot be controlled individually. + +Note that enabling ACPI events for some keys prevents their default +behavior. For example, if events for Fn-F5 are enabled, that key will +no longer enable/disable Bluetooth by itself. This can still be done +from an acpid handler for the ibm/hotkey event. + +Note also that not all Fn key combinations are supported through +ACPI. For example, on the X40, the brightness, volume and "Access IBM" +buttons do not generate ACPI events even with this driver. They *can* +be used through the "ThinkPad Buttons" utility, see +http://www.nongnu.org/tpb/ + +Bluetooth -- /proc/acpi/ibm/bluetooth +------------------------------------- + +This feature shows the presence and current state of a Bluetooth +device. If Bluetooth is installed, the following commands can be used: + + echo enable > /proc/acpi/ibm/bluetooth + echo disable > /proc/acpi/ibm/bluetooth + +Video output control -- /proc/acpi/ibm/video +-------------------------------------------- + +This feature allows control over the devices used for video output - +LCD, CRT or DVI (if available). The following commands are available: + + echo lcd_enable > /proc/acpi/ibm/video + echo lcd_disable > /proc/acpi/ibm/video + echo crt_enable > /proc/acpi/ibm/video + echo crt_disable > /proc/acpi/ibm/video + echo dvi_enable > /proc/acpi/ibm/video + echo dvi_disable > /proc/acpi/ibm/video + echo auto_enable > /proc/acpi/ibm/video + echo auto_disable > /proc/acpi/ibm/video + echo expand_toggle > /proc/acpi/ibm/video + echo video_switch > /proc/acpi/ibm/video + +Each video output device can be enabled or disabled individually. +Reading /proc/acpi/ibm/video shows the status of each device. + +Automatic video switching can be enabled or disabled. When automatic +video switching is enabled, certain events (e.g. opening the lid, +docking or undocking) cause the video output device to change +automatically. While this can be useful, it also causes flickering +and, on the X40, video corruption. By disabling automatic switching, +the flickering or video corruption can be avoided. + +The video_switch command cycles through the available video outputs +(it sumulates the behavior of Fn-F7). + +Video expansion can be toggled through this feature. This controls +whether the display is expanded to fill the entire LCD screen when a +mode with less than full resolution is used. Note that the current +video expansion status cannot be determined through this feature. + +Note that on many models (particularly those using Radeon graphics +chips) the X driver configures the video card in a way which prevents +Fn-F7 from working. This also disables the video output switching +features of this driver, as it uses the same ACPI methods as +Fn-F7. Video switching on the console should still work. + +ThinkLight control -- /proc/acpi/ibm/light +------------------------------------------ + +The current status of the ThinkLight can be found in this file. A few +models which do not make the status available will show it as +"unknown". The available commands are: + + echo on > /proc/acpi/ibm/light + echo off > /proc/acpi/ibm/light + +Docking / Undocking -- /proc/acpi/ibm/dock +------------------------------------------ + +Docking and undocking (e.g. with the X4 UltraBase) requires some +actions to be taken by the operating system to safely make or break +the electrical connections with the dock. + +The docking feature of this driver generates the following ACPI events: + + ibm/dock GDCK 00000003 00000001 -- eject request + ibm/dock GDCK 00000003 00000002 -- undocked + ibm/dock GDCK 00000000 00000003 -- docked + +NOTE: These events will only be generated if the laptop was docked +when originally booted. This is due to the current lack of support for +hot plugging of devices in the Linux ACPI framework. If the laptop was +booted while not in the dock, the following message is shown in the +logs: "ibm_acpi: dock device not present". No dock-related events are +generated but the dock and undock commands described below still +work. They can be executed manually or triggered by Fn key +combinations (see the example acpid configuration files included in +the driver tarball package available on the web site). + +When the eject request button on the dock is pressed, the first event +above is generated. The handler for this event should issue the +following command: + + echo undock > /proc/acpi/ibm/dock + +After the LED on the dock goes off, it is safe to eject the laptop. +Note: if you pressed this key by mistake, go ahead and eject the +laptop, then dock it back in. Otherwise, the dock may not function as +expected. + +When the laptop is docked, the third event above is generated. The +handler for this event should issue the following command to fully +enable the dock: + + echo dock > /proc/acpi/ibm/dock + +The contents of the /proc/acpi/ibm/dock file shows the current status +of the dock, as provided by the ACPI framework. + +The docking support in this driver does not take care of enabling or +disabling any other devices you may have attached to the dock. For +example, a CD drive plugged into the UltraBase needs to be disabled or +enabled separately. See the provided example acpid configuration files +for how this can be accomplished. + +There is no support yet for PCI devices that may be attached to a +docking station, e.g. in the ThinkPad Dock II. The driver currently +does not recognize, enable or disable such devices. This means that +the only docking stations currently supported are the X-series +UltraBase docks and "dumb" port replicators like the Mini Dock (the +latter don't need any ACPI support, actually). + +UltraBay Eject -- /proc/acpi/ibm/bay +------------------------------------ + +Inserting or ejecting an UltraBay device requires some actions to be +taken by the operating system to safely make or break the electrical +connections with the device. + +This feature generates the following ACPI events: + + ibm/bay MSTR 00000003 00000000 -- eject request + ibm/bay MSTR 00000001 00000000 -- eject lever inserted + +NOTE: These events will only be generated if the UltraBay was present +when the laptop was originally booted (on the X series, the UltraBay +is in the dock, so it may not be present if the laptop was undocked). +This is due to the current lack of support for hot plugging of devices +in the Linux ACPI framework. If the laptop was booted without the +UltraBay, the following message is shown in the logs: "ibm_acpi: bay +device not present". No bay-related events are generated but the eject +command described below still works. It can be executed manually or +triggered by a hot key combination. + +Sliding the eject lever generates the first event shown above. The +handler for this event should take whatever actions are necessary to +shut down the device in the UltraBay (e.g. call idectl), then issue +the following command: + + echo eject > /proc/acpi/ibm/bay + +After the LED on the UltraBay goes off, it is safe to pull out the +device. + +When the eject lever is inserted, the second event above is +generated. The handler for this event should take whatever actions are +necessary to enable the UltraBay device (e.g. call idectl). + +The contents of the /proc/acpi/ibm/bay file shows the current status +of the UltraBay, as provided by the ACPI framework. + +Experimental Features +--------------------- + +The following features are marked experimental because using them +involves guessing the correct values of some parameters. Guessing +incorrectly may have undesirable effects like crashing your +ThinkPad. USE THESE WITH CAUTION! To activate them, you'll need to +supply the experimental=1 parameter when loading the module. + +Experimental: CMOS control - /proc/acpi/ibm/cmos +------------------------------------------------ + +This feature is used internally by the ACPI firmware to control the +ThinkLight on most newer ThinkPad models. It appears that it can also +control LCD brightness, sounds volume and more, but only on some +models. + +The commands are non-negative integer numbers: + + echo 0 >/proc/acpi/ibm/cmos + echo 1 >/proc/acpi/ibm/cmos + echo 2 >/proc/acpi/ibm/cmos + ... + +The range of numbers which are used internally by various models is 0 +to 21, but it's possible that numbers outside this range have +interesting behavior. Here is the behavior on the X40 (tpb is the +ThinkPad Buttons utility): + + 0 - no effect but tpb reports "Volume down" + 1 - no effect but tpb reports "Volume up" + 2 - no effect but tpb reports "Mute on" + 3 - simulate pressing the "Access IBM" button + 4 - LCD brightness up + 5 - LCD brightness down + 11 - toggle screen expansion + 12 - ThinkLight on + 13 - ThinkLight off + 14 - no effect but tpb reports ThinkLight status change + +If you try this feature, please send me a report similar to the +above. On models which allow control of LCD brightness or sound +volume, I'd like to provide this functionality in an user-friendly +way, but first I need a way to identify the models which this is +possible. + +Experimental: LED control - /proc/acpi/ibm/LED +---------------------------------------------- + +Some of the LED indicators can be controlled through this feature. The +available commands are: + + echo on >/proc/acpi/ibm/led + echo off >/proc/acpi/ibm/led + echo blink >/proc/acpi/ibm/led + +The parameter is a non-negative integer. The range of LED +numbers used internally by various models is 0 to 7 but it's possible +that numbers outside this range are also valid. Here is the mapping on +the X40: + + 0 - power + 1 - battery (orange) + 2 - battery (green) + 3 - UltraBase + 4 - UltraBay + 7 - standby + +All of the above can be turned on and off and can be made to blink. + +If you try this feature, please send me a report similar to the +above. I'd like to provide this functionality in an user-friendly way, +but first I need to identify the which numbers correspond to which +LEDs on various models. + +Experimental: ACPI sounds - /proc/acpi/ibm/beep +----------------------------------------------- + +The BEEP method is used internally by the ACPI firmware to provide +audible alerts in various situtation. This feature allows the same +sounds to be triggered manually. + +The commands are non-negative integer numbers: + + echo 0 >/proc/acpi/ibm/beep + echo 1 >/proc/acpi/ibm/beep + echo 2 >/proc/acpi/ibm/beep + ... + +The range of numbers which are used internally by various models is 0 +to 17, but it's possible that numbers outside this range are also +valid. Here is the behavior on the X40: + + 2 - two beeps, pause, third beep + 3 - single beep + 4 - "unable" + 5 - single beep + 6 - "AC/DC" + 7 - high-pitched beep + 9 - three short beeps + 10 - very long beep + 12 - low-pitched beep + +(I've only been able to identify a couple of them). + +If you try this feature, please send me a report similar to the +above. I'd like to provide this functionality in an user-friendly way, +but first I need to identify the which numbers correspond to which +sounds on various models. + + +Multiple Command, Module Parameters +----------------------------------- + +Multiple commands can be written to the proc files in one shot by +separating them with commas, for example: + + echo enable,0xffff > /proc/acpi/ibm/hotkey + echo lcd_disable,crt_enable > /proc/acpi/ibm/video + +Commands can also be specified when loading the ibm_acpi module, for +example: + + modprobe ibm_acpi hotkey=enable,0xffff video=auto_disable + + +Example Configuration +--------------------- + +The ACPI support in the kernel is intended to be used in conjunction +with a user-space daemon, acpid. The configuration files for this +daemon control what actions are taken in response to various ACPI +events. An example set of configuration files are included in the +config/ directory of the tarball package available on the web +site. Note that these are provided for illustration purposes only and +may need to be adapted to your particular setup. + +The following utility scripts are used by the example action +scripts (included with ibm-acpi for completeness): + + /usr/local/sbin/idectl -- from the hdparm source distribution, + see http://www.ibiblio.org/pub/Linux/system/hardware + /usr/local/sbin/laptop_mode -- from the Linux kernel source + distribution, see Documentation/laptop-mode.txt + /sbin/service -- comes with Redhat/Fedora distributions + +Toan T Nguyen has written a SuSE powersave +script for the X20, included in config/usr/sbin/ibm_hotkeys_X20 + +Henrik Brix Andersen has written a Gentoo ACPI event +handler script for the X31. You can get the latest version from +http://dev.gentoo.org/~brix/files/x31.sh + +David Schweikert has written an alternative blank.sh +script which works on Debian systems, included in +configs/etc/acpi/actions/blank-debian.sh + + +TODO +---- + +I'd like to implement the following features but haven't yet found the +time and/or I don't yet know how to implement them: + +- UltraBay floppy drive support + diff -Nru a/Documentation/ide.txt b/Documentation/ide.txt --- a/Documentation/ide.txt 2004-11-10 17:19:05 -08:00 +++ b/Documentation/ide.txt 2004-11-10 17:19:05 -08:00 @@ -248,13 +248,6 @@ allowing ide-floppy, ide-tape, and ide-cdrom|writers to use ide-scsi emulation on a device specific option. - "hdx=stroke" : Should you have a system w/ an AWARD Bios and your - drives are larger than 32GB and it will not boot, - one is required to perform a few OEM operations first. - The option is called "stroke" because it allows one - to "soft clip" the drive to work around a barrier - limit. - "idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz, where "xx" is between 20 and 66 inclusive, used when tuning chipset PIO modes. diff -Nru a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt --- a/Documentation/kbuild/makefiles.txt 2004-11-10 17:19:06 -08:00 +++ b/Documentation/kbuild/makefiles.txt 2004-11-10 17:19:06 -08:00 @@ -6,7 +6,7 @@ === 1 Overview === 2 Who does what - === 3 The kbuild Makefiles + === 3 The kbuild files --- 3.1 Goal definitions --- 3.2 Built-in object goals - obj-y --- 3.3 Loadable module goals - obj-m @@ -101,11 +101,14 @@ This document is aimed towards normal developers and arch developers. -=== 3 The kbuild Makefiles +=== 3 The kbuild files Most Makefiles within the kernel are kbuild Makefiles that use the kbuild infrastructure. This chapter introduce the syntax used in the kbuild makefiles. +The preferred name for the kbuild files is 'Kbuild' but 'Makefile' will +continue to be supported. All new developmen is expected to use the +Kbuild filename. Section 3.1 "Goal definitions" is a quick intro, further chapters provide more details, with real examples. @@ -707,15 +710,17 @@ probe supported options: #arch/i386/Makefile - check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc \ - /dev/null\ > /dev/null 2>&1; then echo "$(1)"; \ - else echo "$(2)"; fi) - cflags-$(CONFIG_MCYRIXIII) += $(call check_gcc,\ - -march=c3,-march=i486) - CFLAGS += $(cflags-y) + ... + cflags-$(CONFIG_MPENTIUMII) += $(call cc-option,\ + -march=pentium2,-march=i686) + ... + # Disable unit-at-a-time mode ... + CFLAGS += $(call cc-option,-fno-unit-at-a-time) + ... + - The above examples both utilise the trick that a config option expands + The first examples utilises the trick that a config option expands to 'y' when selected. CFLAGS_KERNEL $(CC) options specific for built-in @@ -997,6 +1002,21 @@ option. When $(biarch) equals to y the expanded variables $(aflags-y) and $(cflags-y) will be assigned the values -a32 and -m32. + cc-option-align + gcc version >= 3.0 shifted type of options used to speify + alignment of functions, loops etc. $(cc-option-align) whrn used + as prefix to the align options will select the right prefix: + gcc < 3.00 + cc-option-align = -malign + gcc >= 3.00 + cc-option-align = -falign + + Example: + CFLAGS += $(cc-option-align)-functions=4 + + In the above example the option -falign-functions=4 is used for + gcc >= 3.00. For gcc < 3.00 -malign-functions=4 is used. + cc-version cc-version return a numerical version of the $(CC) compiler version. The format is where both are two digits. So for example diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt --- a/Documentation/kernel-parameters.txt 2004-11-10 17:19:07 -08:00 +++ b/Documentation/kernel-parameters.txt 2004-11-10 17:19:07 -08:00 @@ -53,6 +53,7 @@ NFS Appropriate NFS support is enabled. OSS OSS sound support is enabled. PARIDE The ParIDE subsystem is enabled. + PARISC The PA-RISC architecture is enabled. PCI PCI bus support is enabled. PCMCIA The PCMCIA subsystem is enabled. PNP Plug & Play support is enabled. @@ -394,7 +395,7 @@ eicon= [HW,ISDN] Format: ,, - eisa_irq_edge= [PARISC] + eisa_irq_edge= [PARISC,HW] See header of drivers/parisc/eisa.c. elanfreq= [IA-32] @@ -488,6 +489,14 @@ i810= [HW,DRM] + i8k.force [HW] Activate i8k driver even if SMM BIOS signature + does not match list of supported models. + i8k.power_status + [HW] Report power status in /proc/i8k + (disabled by default) + i8k.restricted [HW] Allow controlling fans only if SYS_ADMIN + capability is set. + ibmmcascsi= [HW,MCA,SCSI] IBM MicroChannel SCSI adapter See Documentation/mca.txt. @@ -692,7 +701,7 @@ [KNL,ACPI] Mark specific memory as reserved. Region of memory to be used, from ss to ss+nn. - meye= [HW] Set MotionEye Camera parameters + meye.*= [HW] Set MotionEye Camera parameters See Documentation/video4linux/meye.txt. mga= [HW,DRM] @@ -857,6 +866,16 @@ order they are specified on the command line, starting with parport0. + parport_init_mode= + [HW,PPT] Configure VIA parallel port to + operate in specific mode. This is + necessary on Pegasos computer where + firmware has no options for setting up + parallel port mode and sets it to + spp. Currently this function knows + 686a and 8231 chips. + Format: [spp|ps2|epp|ecp|ecpepp] + pas2= [HW,OSS] Format: ,,,,,,, @@ -925,6 +944,11 @@ pd. [PARIDE] See Documentation/paride.txt. + pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at + boot time. + Format: { 0 | 1 } + See arch/parisc/kernel/pdc_chassis.c + pf. [PARIDE] See Documentation/paride.txt. @@ -960,6 +984,11 @@ (param: profile step/bucket size as a power of 2 for statistical time based profiling) + processor.c2= [HW, ACPI] + processor.c3= [HW, ACPI] + 0 - disable C2 or C3 idle power saving state. + 1 - enable C2 or C3 (default unless DMI blacklist entry) + prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk before loading. See Documentation/ramdisk.txt. @@ -1001,10 +1030,6 @@ New name for the ramdisk parameter. See Documentation/ramdisk.txt. - ramdisk_start= [RAM] Starting block of RAM disk image (so you can - place it after the kernel image on a boot floppy). - See Documentation/ramdisk.txt. - reboot= [BUGS=IA-32,BUGS=ARM,BUGS=IA-64] Rebooting mode Format: [,[,...]] See arch/*/kernel/reboot.c. @@ -1217,8 +1242,8 @@ sonycd535= [HW,CD] Format: [,] - sonypi= [HW] Sony Programmable I/O Control Device driver - Format: ,,,,, + sonypi.*= [HW] Sony Programmable I/O Control Device driver + See Documentation/sonypi.txt specialix= [HW,SERIAL] Specialix multi-serial port adapter See Documentation/specialix.txt. @@ -1242,7 +1267,7 @@ st0x= [HW,SCSI] See header of drivers/scsi/seagate.c. - sti= [HW] + sti= [PARISC,HW] Format: Set the STI (builtin display/keyboard on the HP-PARISC machines) console (graphic card) which should be used diff -Nru a/Documentation/mkdev.ida b/Documentation/mkdev.ida --- a/Documentation/mkdev.ida 2004-11-10 17:19:03 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,40 +0,0 @@ -#!/bin/sh -# Script to create device nodes for SMART array controllers -# Usage: -# mkdev.ida [num controllers] [num log volumes] [num partitions] -# -# With no arguments, the script assumes 1 controller, 16 logical volumes, -# and 16 partitions/volume, which is adequate for most configurations. -# -# If you had 5 controllers and were planning on no more than 4 logical volumes -# each, using a maximum of 8 partitions per volume, you could say: -# -# mkdev.ida 5 4 8 -# -# Of course, this has no real benefit over "mkdev.ida 5" except that it -# doesn't create so many device nodes in /dev/ida. - -NR_CTLR=${1-1} -NR_VOL=${2-16} -NR_PART=${3-16} - -if [ ! -d /dev/ida ]; then - mkdir -p /dev/ida -fi - -C=0; while [ $C -lt $NR_CTLR ]; do - MAJ=`expr $C + 72` - D=0; while [ $D -lt $NR_VOL ]; do - P=0; while [ $P -lt $NR_PART ]; do - MIN=`expr $D \* 16 + $P` - if [ $P -eq 0 ]; then - mknod /dev/ida/c${C}d${D} b $MAJ $MIN - else - mknod /dev/ida/c${C}d${D}p${P} b $MAJ $MIN - fi - P=`expr $P + 1` - done - D=`expr $D + 1` - done - C=`expr $C + 1` -done diff -Nru a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt --- a/Documentation/networking/e100.txt 2004-11-10 17:19:06 -08:00 +++ b/Documentation/networking/e100.txt 2004-11-10 17:19:06 -08:00 @@ -1,14 +1,16 @@ Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters ============================================================== -March 15, 2004 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter +- Driver Configuration Parameters +- Additional Configurations - Support @@ -16,26 +18,140 @@ =============== This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of -Adapters, version 3.x.x. This driver includes support for Itanium(TM)-based -systems. +Adapters, version 3.2.x. This driver includes support for Itanium(TM)2 and +EM64T systems. -Supported Adapters -================== - -To verify that your adapter is supported, find the board ID number on the -adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +Identifying Your Adapter +======================== For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm -For the latest Intel PRO/100 network driver for Linux, see: +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: http://downloadfinder.intel.com/scripts-df/support_intel.asp +Driver Configuration Parameters +=============================== + +The default value for each parameter is generally the recommended setting, +unless otherwise noted. + +Rx Descriptors: Number of receive descriptors. A receive descriptor is a data + structure that describes a receive buffer and its attributes to the network + controller. The data in the descriptor is used by the controller to write + data from the controller to host memory. In the 3.0.x driver the valid + range for this parameter is 64-256. The default value is 64. This parameter + can be changed using the command + + ethtool -G eth? rx n, where n is the number of desired rx descriptors. + +Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a + data structure that describes a transmit buffer and its attributes to the + network controller. The data in the descriptor is used by the controller to + read data from the host memory to the controller. In the 3.0.x driver the + valid range for this parameter is 64-256. The default value is 64. This + parameter can be changed using the command + + ethtool -G eth? tx n, where n is the number of desired tx descriptors. + +Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by + default. Ethtool can be used as follows to force speed/duplex. + + ethtool -s eth? autoneg off speed {10|100} duplex {full|half} + + NOTE: setting the speed/duplex to incorrect values will cause the link to + fail. + +Event Log Message Level: The driver uses the message level flag to log events + to syslog. The message level can be set at driver load time. It can also be + set using the command + + ethtool -s eth? msglvl n + +Additional Configurations +========================= + + Configuring the Driver on Different Distributions + ------------------------------------------------- + + Configuring a network driver to load properly when the system is started is + distribution dependent. Typically, the configuration process involves adding + an alias line to /etc/modules.conf as well as editing other system startup + scripts and/or configuration files. Many popular Linux distributions ship + with tools to make these changes for you. To learn the proper way to + configure a network device for your system, refer to your distribution + documentation. If during this process you are asked for the driver or module + name, the name for the Linux Base Driver for the Intel PRO/100 Family of + Adapters is e100. + + As an example, if you install the e100 driver for two PRO/100 adapters + (eth0 and eth1), add the following to modules.conf: + + alias eth0 e100 + alias eth1 e100 + + Viewing Link Messages + --------------------- + In order to see link messages and other Intel driver information on your + console, you must set the dmesg level up to six. This can be done by + entering the following on the command line before loading the e100 driver: + + dmesg -n 8 + + If you wish to see all messages issued by the driver, including debug + messages, set the dmesg level to eight. + + NOTE: This setting is not saved across reboots. + + Ethtool + ------- + + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. Ethtool + version 1.6 or later is required for this functionality. + + The latest release of ethtool can be found at: + http://sf.net/projects/gkernel. + + After ethtool is installed, ethtool-copy.h must be copied and renamed to + ethtool.h in your kernel source tree at /include/linux. + Backup the original ethtool.h as needed before copying. The driver then + must be recompiled in order to take advantage of the latest ethtool + features. + + NOTE: This driver uses mii support from the kernel. As a result, when + there is no link, ethtool will report speed/duplex to be 10/half. + + NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support + for a more complete ethtool feature set can be enabled by upgrading + ethtool to ethtool-1.8.1. + + Enabling Wake on LAN* (WoL) + --------------------------- + WoL is provided through the Ethtool* utility. Ethtool is included with Red + Hat* 8.0. For other Linux distributions, download and install Ethtool from + the following website: http://sourceforge.net/projects/gkernel. + + For instructions on enabling WoL with Ethtool, refer to the Ethtool man + page. + + WoL will be enabled on the system during the next shut down or reboot. For + this driver version, in order to enable WoL, the e100 driver must be + loaded when shutting down or rebooting the system. + + NAPI + ---- + + NAPI (Rx polling mode) is supported in the e100 driver. NAPI is enabled + or disabled based on the configuration of the kernel. + + See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. Support ======= diff -Nru a/Documentation/networking/e1000.txt b/Documentation/networking/e1000.txt --- a/Documentation/networking/e1000.txt 2004-11-10 17:19:06 -08:00 +++ b/Documentation/networking/e1000.txt 2004-11-10 17:19:06 -08:00 @@ -1,14 +1,14 @@ Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters =============================================================== -January 8, 2003 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter - Command Line Parameters - Speed and Duplex Configuration - Additional Configurations @@ -20,63 +20,29 @@ =============== This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family -of Adapters, version 5.0.x. This driver includes support for -Itanium(TM)-based systems. +of Adapters, version 5.x.x. This driver includes support for Itanium(TM)2 +and EM64T systems. +For questions related to hardware requirements, refer to the documentation +supplied with your Intel PRO/1000 adapter. All hardware requirements listed +apply to use with Linux. Native VLANs are now available with supported kernels. - -Supported Adapters -================== - -The following Intel network adapters are compatible with the drivers in this -release: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, 717037-xxx - - 82543 PRO/1000 F Server Adapter 738640-xxx, A38888-xxx - - 82543 PRO/1000 T Server Adapter A19845-xxx, A33948-xxx - - 82544 PRO/1000 XT Server Adapter A51580-xxx - - 82544 PRO/1000 XF Server Adapter A50484-xxx - - 82544 PRO/1000 T Desktop Adapter A62947-xxx - - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 C91016-xxx - - 82545 PRO/1000 MT Server Adapter A92165-xxx - - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - - 82545 PRO/1000 MF Server Adapter A91622-xxx - - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - - -To verify your Intel adapter is supported, find the board ID number on the -adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +Identifying Your Adapter +======================== For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm -For the latest Intel network drivers for Linux, refer to the following +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: http://downloadfinder.intel.com/scripts-df/support_intel.asp - Command Line Parameters ======================= @@ -92,27 +58,39 @@ insmod e1000 TxDescriptors=80,128 -loads the e1000 driver with 80 TX resources for the first adapter and 128 TX -resources for the second adapter. +loads the e1000 driver with 80 TX descriptors for the first adapter and 128 TX +descriptors for the second adapter. The default value for each parameter is generally the recommended setting, -unless otherwise noted. - -For more information about the AutoNeg, Duplex, and Speed parameters, see the -"Speed and Duplex Configuration" section in this document. +unless otherwise noted. Also, if the driver is statically built into the +kernel, the driver is loaded with the default values for all the parameters. +Ethtool can be used to change some of the parameters at runtime. + + NOTES: For more information about the AutoNeg, Duplex, and Speed + parameters, see the "Speed and Duplex Configuration" section in + this document. + + For more information about the InterruptThrottleRate, RxIntDelay, + TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay parameters, see the + application note at: + http://www.intel.com/design/network/applnots/ap450.htm + A descriptor describes a data buffer and attributes related to the + data buffer. This information is accessed by the hardware. AutoNeg (adapters using copper connections only) Valid Range: 0x01-0x0F, 0x20-0x2F Default Value: 0x2F This parameter is a bit mask that specifies which speed and duplex settings the board advertises. When this parameter is used, the Speed and - Duplex parameters must not be specified. + Duplex parameters must not be specified. + NOTE: Refer to the Speed and Duplex section of this readme for more + information on the AutoNeg parameter. Duplex (adapters using copper connections only) Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full) Default Value: 0 - Defines the direction in which data is allowed to flow. Can by either one + Defines the direction in which data is allowed to flow. Can be either one or two-directional. If both Duplex and the link partner are set to auto- negotiate, the board auto-detects the correct duplex. If the link partner is forced (either full or half), Duplex defaults to half-duplex. @@ -125,22 +103,46 @@ InterruptThrottleRate Valid Range: 100-100000 (0=off, 1=dynamic) -Default Value: 1 +Default Value: 8000 This value represents the maximum number of interrupts per second the controller generates. InterruptThrottleRate is another setting used in interrupt moderation. Dynamic mode uses a heuristic algorithm to adjust InterruptThrottleRate based on the current traffic load. +Un-supported Adapters: InterruptThrottleRate is NOT supported by 82542, 82543 + or 82544-based adapters. NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and RxAbsIntDelay parameters. In other words, minimizing the receive and/or transmit absolute delays does not force the controller to generate more interrupts than what the Interrupt Throttle Rate allows. + CAUTION: If you are using the Intel PRO/1000 CT Network Connection + (controller 82547), setting InterruptThrottleRate to a value + greater than 75,000, may hang (stop transmitting) adapters under + certain network conditions. If this occurs a NETDEV WATCHDOG + message is logged in the system event log. In addition, the + controller is automatically reset, restoring the network + connection. To eliminate the potential for the hang, ensure + that InterruptThrottleRate is set no greater than 75,000 and is + not set to 0. + NOTE: When e1000 is loaded with default settings and multiple adapters are + in use simultaneously, the CPU utilization may increase non-linearly. + In order to limit the CPU utilization without impacting the overall + throughput, we recommend that you load the driver as follows: + + insmod e1000.o InterruptThrottleRate=3000,3000,3000 + + This sets the InterruptThrottleRate to 3000 interrupts/sec for the + first, second, and third instances of the driver. The range of 2000 to + 3000 interrupts per second works on a majority of systems and is a + good starting point, but the optimal value will be platform-specific. + If CPU utilization is not a concern, use RX_POLLING (NAPI) and default + driver settings. RxDescriptors Valid Range: 80-256 for 82542 and 82543-based adapters - 80-4096 for 82540, 82544, 82545, and 82546-based adapters -Default Value: 80 + 80-4096 for all other supported adapters +Default Value: 256 This value is the number of receive descriptors allocated by the driver. Increasing this value allows the driver to buffer more incoming packets. Each descriptor is 16 bytes. A receive buffer is also allocated for each @@ -149,6 +151,9 @@ NOTE: MTU designates the frame size. It only needs to be set for Jumbo Frames. + NOTE: Depending on the available system resources, the request for a + higher number of receive descriptors may be denied. In this case, + use a lower number. RxIntDelay Valid Range: 0-65535 (0=off) @@ -168,11 +173,11 @@ restoring the network connection. To eliminate the potential for the hang ensure that RxIntDelay is set to 0. -RxAbsIntDelay (82540, 82545, and 82546-based adapters only) +RxAbsIntDelay (82540, 82545 and later adapters only) Valid Range: 0-65535 (0=off) Default Value: 128 This value, in units of 1.024 microseconds, limits the delay in which a - transmit interrupt is generated. Useful only if RxIntDelay is non-zero, + receive interrupt is generated. Useful only if RxIntDelay is non-zero, this value ensures that an interrupt is generated after the initial packet is received within the set amount of time. Proper tuning, along with RxIntDelay, may improve traffic throughput in specific network @@ -188,12 +193,16 @@ TxDescriptors Valid Range: 80-256 for 82542 and 82543-based adapters - 80-4096 for 82540, 82544, 82545, and 82546-based adapters + 80-4096 for all other supported adapters Default Value: 256 This value is the number of transmit descriptors allocated by the driver. Increasing this value allows the driver to queue more transmits. Each descriptor is 16 bytes. + NOTE: Depending on the available system resources, the request for a + higher number of transmit descriptors may be denied. In this case, + use a lower number. + TxIntDelay Valid Range: 0-65535 (0=off) Default Value: 64 @@ -203,7 +212,7 @@ system is reporting dropped transmits, this value may be set too high causing the driver to run out of available transmit descriptors. -TxAbsIntDelay (82540, 82545, and 82546-based adapters only) +TxAbsIntDelay (82540, 82545 and later adapters only) Valid Range: 0-65535 (0=off) Default Value: 64 This value, in units of 1.024 microseconds, limits the delay in which a @@ -219,7 +228,6 @@ A value of '1' indicates that the driver should enable IP checksum offload for received packets (both UDP and TCP) to the adapter hardware. - Speed and Duplex Configuration ============================== @@ -251,6 +259,10 @@ Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10 Duplex Full Full Half Full Half +For example to limit the negotiated speed/duplex on the interface to 10 Mbps +Half or Full duplex, set AutoNeg to 0x02: + insmod e1000 AutoNeg=0x02 + Note that setting AutoNeg does not guarantee that the board will link at the highest specified speed or duplex mode, but the board will link at the highest possible speed/duplex of the link partner IF the link partner is also @@ -261,6 +273,38 @@ Additional Configurations ========================= + Configuring the Driver on Different Distributions + ------------------------------------------------- + + Configuring a network driver to load properly when the system is started is + distribution dependent. Typically, the configuration process involves adding + an alias line to /etc/modules.conf as well as editing other system startup + scripts and/or configuration files. Many popular Linux distributions ship + with tools to make these changes for you. To learn the proper way to + configure a network device for your system, refer to your distribution + documentation. If during this process you are asked for the driver or module + name, the name for the Linux Base Driver for the Intel PRO/1000 Family of + Adapters is e1000. + + As an example, if you install the e1000 driver for two PRO/1000 adapters + (eth0 and eth1) and set the speed and duplex to 10full and 100half, add the + following to modules.conf: + + alias eth0 e1000 + alias eth1 e1000 + options e1000 Speed=10,100 Duplex=2,1 + + Viewing Link Messages + --------------------- + + Link messages will not be displayed to the console if the distribution is + restricting system messages. In order to see network driver link messages on + your console, set dmesg to eight by entering the following: + + dmesg -n 8 + + NOTE: This setting is not saved across reboots. + Jumbo Frames ------------ @@ -278,6 +322,51 @@ 10 or 100 Mbps may result in poor performance or loss of link. + NOTE: MTU designates the frame size. To enable Jumbo Frames, increase the + MTU size on the interface beyond 1500. + + Ethtool + ------- + + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. Ethtool + version 1.6 or later is required for this functionality. + + The latest release of ethtool can be found from + http://sf.net/projects/gkernel. After ethtool is installed, + ethtool-copy.h must be copied and renamed to ethtool.h in your kernel + source tree at /include/linux. Backup the original + ethtool.h as needed before copying. The driver then must be recompiled + in order to take advantage of the latest ethtool features. + + NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support + for a more complete ethtool feature set can be enabled by upgrading + ethtool to ethtool-1.8.1. + + Enabling Wake on LAN* (WoL) + --------------------------- + + WoL is configured through the Ethtool* utility. Ethtool is included with + all versions of Red Hat after Red Hat 7.2. For other Linux distributions, + download and install Ethtool from the following website: + http://sourceforge.net/projects/gkernel. + + For instructions on enabling WoL with Ethtool, refer to the website listed + above. + + WoL will be enabled on the system during the next shut down or reboot. + For this driver version, in order to enable WoL, the e1000 driver must be + loaded when shutting down or rebooting the system. + + NAPI + ---- + + NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled + or disabled based on the configuration of the kernel. + + See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. + + Known Issues ============ @@ -285,9 +374,9 @@ ------------------------------- Memory allocation failures have been observed on Linux systems with 64 MB - of RAM or less that are running Jumbo Frames. If you are using Jumbo - Frames, your system may require more than the advertised minimum - requirement of 64 MB of system memory. + of RAM or less that are running Jumbo Frames. If you are using Jumbo Frames, + your system may require more than the advertised minimum requirement of 64 MB + of system memory. Support diff -Nru a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt --- a/Documentation/networking/ixgb.txt 2004-11-10 17:19:05 -08:00 +++ b/Documentation/networking/ixgb.txt 2004-11-10 17:19:05 -08:00 @@ -1,14 +1,14 @@ Linux* Base Driver for the Intel(R) PRO/10GbE Family of Adapters ================================================================ -January 06, 2003 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter - Command Line Parameters - Improving Performance - Support @@ -18,36 +18,23 @@ =============== This file describes the Linux* Base Driver for the Intel(R) PRO/10GbE Family -of Adapters, version 1.0.x. This driver is intended for 2.4.x kernels; it is -known to build properly on 2.4.x kernels through 2.4.18. Intel focused -testing on Intel architectures running kernels 2.4.18. This driver includes -support for Itanium(TM)-based systems. +of Adapters, version 1.0.x. This driver includes support for Itanium(TM)2 and +EM64T systems. For questions related to hardware requirements, refer to the documentation supplied with your Intel PRO/10GbE adapter. All hardware requirements listed apply to use with Linux. - -Supported Adapters -================== - -The following Intel network adapters are compatible with the drivers in this -release: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82597EX Intel(R) PRO/10GbE LR Server Adapter A82505-xxx - +Identifying Your Adapter +======================== To verify your Intel adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +A12345-001. -For more information on how to identify your adapter, go to the Adapter & -Driver ID Guide at: +Use the above information and the Adapter & Driver ID Guide at: - http://support.intel.com/support/network/adapter/pro100/21397.htm + http://support.intel.com/support/network/adapter/pro100/21397.htm For the latest Intel network drivers for Linux, go to: @@ -72,8 +59,9 @@ resources for the second adapter. The default value for each parameter is generally the recommended setting, -unless otherwise noted. - +unless otherwise noted. Also, if the driver is statically built into the +kernel, the driver is loaded with the default values for all the parameters. +Ethtool can be used to change some of the parameters at runtime. FlowControl Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) @@ -124,7 +112,6 @@ A value of '1' indicates that the driver should enable IP checksum offload for transmitted packets (both UDP and TCP) to the adapter hardware. - Improving Performance ===================== diff -Nru a/Documentation/networking/proc_net_tcp.txt b/Documentation/networking/proc_net_tcp.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/networking/proc_net_tcp.txt 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,47 @@ +This document describes the interfaces /proc/net/tcp and /proc/net/tcp6. + +These /proc interfaces provide information about currently active TCP +connections, and are implemented by tcp_get_info() in net/ipv4/tcp_ipv4.c and +tcp6_get_info() in net/ipv6/tcp_ipv6.c, respectively. + +It will first list all listening TCP sockets, and next list all established +TCP connections. A typical entry of /proc/net/tcp would look like this (split +up into 3 parts because of the length of the line): + + 46: 010310AC:9C4C 030310AC:1770 01 + | | | | | |--> connection state + | | | | |------> remote TCP port number + | | | |-------------> remote IPv4 address + | | |--------------------> local TCP port number + | |---------------------------> local IPv4 address + |----------------------------------> number of entry + + 00000150:00000000 01:00000019 00000000 + | | | | |--> number of unrecovered RTO timeouts + | | | |----------> number of jiffies until timer expires + | | |----------------> timer_active (see below) + | |----------------------> receive-queue + |-------------------------------> transmit-queue + + 1000 0 54165785 4 cd1e6040 25 4 27 3 -1 + | | | | | | | | | |--> slow start size threshold, + | | | | | | | | | or -1 if the treshold + | | | | | | | | | is >= 0xFFFF + | | | | | | | | |----> sending congestion window + | | | | | | | |-------> (ack.quick<<1)|ack.pingpong + | | | | | | |---------> Predicted tick of soft clock + | | | | | | (delayed ACK control data) + | | | | | |------------> retransmit timeout + | | | | |------------------> location of socket in memory + | | | |-----------------------> socket reference count + | | |-----------------------------> inode + | |----------------------------------> unanswered 0-window probes + |---------------------------------------------> uid + +timer_active: + 0 no timer is pending + 1 retransmit-timer is pending + 2 another timer (e.g. delayed ack or keepalive) is pending + 3 this is a socket in TIME_WAIT state. Not all fields will contain + data (or even exist) + 4 zero window probe timer is pending diff -Nru a/Documentation/parisc/registers b/Documentation/parisc/registers --- a/Documentation/parisc/registers 2004-11-10 17:19:04 -08:00 +++ b/Documentation/parisc/registers 2004-11-10 17:19:04 -08:00 @@ -35,8 +35,8 @@ SR0 temporary space register SR4-SR7 set to 0 SR1 temporary space register -SR2 unused -SR3 used for userspace accesses (current process)* +SR2 kernel should not clobber this +SR3 used for userspace accesses (current process) Space Registers (user mode) @@ -78,13 +78,8 @@ TOC enable bit 1 ========================================================================= -Info from John Marvin: - -From: "John Marvin" -To: randolf@tausq.org -Subject: Re: parisc asm questions - -[...] +Register usage notes, originally from John Marvin, with some additional +notes from Randolph Chung. For the general registers: @@ -111,9 +106,10 @@ don't care about the values that were passed in anymore. r28,r29: are ret0 and ret1. They are what you pass return values - in. r28 is the primary return. I'm not sure I remember - under what circumstances stuff is returned in r29 (millicode - perhaps). + in. r28 is the primary return. When returning small structures + r29 may also be used to pass data back to the caller. + + r30: stack pointer r31: the ble instruction puts the return pointer in here. @@ -122,7 +118,4 @@ general purpose registers. r27 is the data pointer, and is used to make references to global variables easier. r30 is the stack pointer. - -John - diff -Nru a/Documentation/pm.txt b/Documentation/pm.txt --- a/Documentation/pm.txt 2004-11-10 17:19:03 -08:00 +++ b/Documentation/pm.txt 2004-11-10 17:19:03 -08:00 @@ -36,8 +36,8 @@ apmd: http://worldvisions.ca/~apenwarr/apmd/ acpid: http://acpid.sf.net/ -Driver Interface ----------------- +Driver Interface -- OBSOLETE, DO NOT USE! +----------------************************* If you are writing a new driver or maintaining an old driver, it should include power management support. Without power management support, a single driver may prevent a system with power management @@ -262,8 +262,8 @@ ACPI Development mailing list: acpi-devel@lists.sourceforge.net -System Interface ----------------- +System Interface -- OBSOLETE, DO NOT USE! +----------------************************* If you are providing new power management support to Linux (ie. adding support for something like APM or ACPI), you should communicate with drivers through the existing generic power diff -Nru a/Documentation/power/video_extension.txt b/Documentation/power/video_extension.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/power/video_extension.txt 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,34 @@ +This driver implement the ACPI Extensions For Display Adapters +for integrated graphics devices on motherboard, as specified in +ACPI 2.0 Specification, Appendix B, allowing to perform some basic +control like defining the video POST device, retrieving EDID information +or to setup a video output, etc. Note that this is an ref. implementation only. +It may or may not work for your integrated video device. + +Interfaces exposed to userland through /proc/acpi/video: + +VGA/info : display the supported video bus device capability like ,Video ROM, CRT/LCD/TV. +VGA/ROM : Used to get a copy of the display devices' ROM data (up to 4k). +VGA/POST_info : Used to determine what options are implemented. +VGA/POST : Used to get/set POST device. +VGA/DOS : Used to get/set ownership of output switching: + Please refer ACPI spec B.4.1 _DOS +VGA/CRT : CRT output +VGA/LCD : LCD output +VGA/TV : TV output +VGA/*/brightness : Used to get/set brightness of output device + +Notify event through /proc/acpi/event: + +#define ACPI_VIDEO_NOTIFY_SWITCH 0x80 +#define ACPI_VIDEO_NOTIFY_PROBE 0x81 +#define ACPI_VIDEO_NOTIFY_CYCLE 0x82 +#define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83 +#define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84 + +#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x82 +#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x83 +#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x84 +#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x85 +#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x86 + diff -Nru a/Documentation/prio_tree.txt b/Documentation/prio_tree.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/prio_tree.txt 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,107 @@ +The prio_tree.c code indexes vmas using 3 different indexes: + * heap_index = vm_pgoff + vm_size_in_pages : end_vm_pgoff + * radix_index = vm_pgoff : start_vm_pgoff + * size_index = vm_size_in_pages + +A regular radix-priority-search-tree indexes vmas using only heap_index and +radix_index. The conditions for indexing are: + * ->heap_index >= ->left->heap_index && + ->heap_index >= ->right->heap_index + * if (->heap_index == ->left->heap_index) + then ->radix_index < ->left->radix_index; + * if (->heap_index == ->right->heap_index) + then ->radix_index < ->right->radix_index; + * nodes are hashed to left or right subtree using radix_index + similar to a pure binary radix tree. + +A regular radix-priority-search-tree helps to store and query +intervals (vmas). However, a regular radix-priority-search-tree is only +suitable for storing vmas with different radix indices (vm_pgoff). + +Therefore, the prio_tree.c extends the regular radix-priority-search-tree +to handle many vmas with the same vm_pgoff. Such vmas are handled in +2 different ways: 1) All vmas with the same radix _and_ heap indices are +linked using vm_set.list, 2) if there are many vmas with the same radix +index, but different heap indices and if the regular radix-priority-search +tree cannot index them all, we build an overflow-sub-tree that indexes such +vmas using heap and size indices instead of heap and radix indices. For +example, in the figure below some vmas with vm_pgoff = 0 (zero) are +indexed by regular radix-priority-search-tree whereas others are pushed +into an overflow-subtree. Note that all vmas in an overflow-sub-tree have +the same vm_pgoff (radix_index) and if necessary we build different +overflow-sub-trees to handle each possible radix_index. For example, +in figure we have 3 overflow-sub-trees corresponding to radix indices +0, 2, and 4. + +In the final tree the first few (prio_tree_root->index_bits) levels +are indexed using heap and radix indices whereas the overflow-sub-trees below +those levels (i.e. levels prio_tree_root->index_bits + 1 and higher) are +indexed using heap and size indices. In overflow-sub-trees the size_index +is used for hashing the nodes to appropriate places. + +Now, an example prio_tree: + + vmas are represented [radix_index, size_index, heap_index] + i.e., [start_vm_pgoff, vm_size_in_pages, end_vm_pgoff] + +level prio_tree_root->index_bits = 3 +----- + _ + 0 [0,7,7] | + / \ | + ------------------ ------------ | Regular + / \ | radix priority + 1 [1,6,7] [4,3,7] | search tree + / \ / \ | + ------- ----- ------ ----- | heap-and-radix + / \ / \ | indexed + 2 [0,6,6] [2,5,7] [5,2,7] [6,1,7] | + / \ / \ / \ / \ | + 3 [0,5,5] [1,5,6] [2,4,6] [3,4,7] [4,2,6] [5,1,6] [6,0,6] [7,0,7] | + / / / _ + / / / _ + 4 [0,4,4] [2,3,5] [4,1,5] | + / / / | + 5 [0,3,3] [2,2,4] [4,0,4] | Overflow-sub-trees + / / | + 6 [0,2,2] [2,1,3] | heap-and-size + / / | indexed + 7 [0,1,1] [2,0,2] | + / | + 8 [0,0,0] | + _ + +Note that we use prio_tree_root->index_bits to optimize the height +of the heap-and-radix indexed tree. Since prio_tree_root->index_bits is +set according to the maximum end_vm_pgoff mapped, we are sure that all +bits (in vm_pgoff) above prio_tree_root->index_bits are 0 (zero). Therefore, +we only use the first prio_tree_root->index_bits as radix_index. +Whenever index_bits is increased in prio_tree_expand, we shuffle the tree +to make sure that the first prio_tree_root->index_bits levels of the tree +is indexed properly using heap and radix indices. + +We do not optimize the height of overflow-sub-trees using index_bits. +The reason is: there can be many such overflow-sub-trees and all of +them have to be suffled whenever the index_bits increases. This may involve +walking the whole prio_tree in prio_tree_insert->prio_tree_expand code +path which is not desirable. Hence, we do not optimize the height of the +heap-and-size indexed overflow-sub-trees using prio_tree->index_bits. +Instead the overflow sub-trees are indexed using full BITS_PER_LONG bits +of size_index. This may lead to skewed sub-trees because most of the +higher significant bits of the size_index are likely to be be 0 (zero). In +the example above, all 3 overflow-sub-trees are skewed. This may marginally +affect the performance. However, processes rarely map many vmas with the +same start_vm_pgoff but different end_vm_pgoffs. Therefore, we normally +do not require overflow-sub-trees to index all vmas. + +From the above discussion it is clear that the maximum height of +a prio_tree can be prio_tree_root->index_bits + BITS_PER_LONG. +However, in most of the common cases we do not need overflow-sub-trees, +so the tree height in the common cases will be prio_tree_root->index_bits. + +It is fair to mention here that the prio_tree_root->index_bits +is increased on demand, however, the index_bits is not decreased when +vmas are removed from the prio_tree. That's tricky to do. Hence, it's +left as a home work problem. + + diff -Nru a/Documentation/ramdisk.txt b/Documentation/ramdisk.txt --- a/Documentation/ramdisk.txt 2004-11-10 17:19:02 -08:00 +++ b/Documentation/ramdisk.txt 2004-11-10 17:19:02 -08:00 @@ -5,115 +5,66 @@ 1) Overview 2) Kernel Command Line Parameters - 3) Using "rdev -r" With New Kernels + 3) Using "rdev -r" 4) An Example of Creating a Compressed RAM Disk 1) Overview ----------- -As of kernel v1.3.48, the RAM disk driver was substantially changed. - -The older versions would grab a chunk of memory off the top before -handing the remainder to the kernel at boot time. Thus a size parameter -had to be specified via "ramdisk=1440" or "rdev -r /dev/fd0 1440" so -that the driver knew how much memory to grab. - -Now the RAM disk dynamically grows as more space is required. It does -this by using RAM from the buffer cache. The driver marks the buffers -it is using with a new "BH_Protected" flag so that the kernel does -not try to reuse them later. This means that the old size parameter -is no longer used, new command line parameters exist, and the behavior -of the "rdev -r" or "ramsize" (usually a symbolic link to "rdev") -command has changed. - -Also, the new RAM disk supports up to 16 RAM disks out of the box, and can -be reconfigured in rd.c to support up to 255 RAM disks. To use multiple -RAM disk support with your system, run 'mknod /dev/ramX b 1 X' and chmod -(to change its permissions) it to your liking. The default /dev/ram(disk) -uses minor #1, so start with ram2 and go from there. - -The old "ramdisk=" has been changed to "ramdisk_size=" -to make it clearer. The original "ramdisk=" has been kept around -for compatibility reasons, but it will probably be removed in 2.1.x. +The RAM disk driver is a way to use main system memory as a block device. It +is required for initrd, an initial filesystem used if you need to load modules +in order to access the root filesystem (see Documentation/initrd.txt). It can +also be used for a temporary filesystem for crypto work, since the contents +are erased on reboot. + +The RAM disk dynamically grows as more space is required. It does this by using +RAM from the buffer cache. The driver marks the buffers it is using as dirty +so that the VM subsystem does not try to reclaim them later. + +Also, the RAM disk supports up to 16 RAM disks out of the box, and can +be reconfigured to support up to 255 RAM disks - change "#define NUM_RAMDISKS" +in drivers/block/rd.c. To use RAM disk support with your system, run +'./MAKEDEV ram' from the /dev directory. RAM disks are all major number 1, and +start with minor number 0 for /dev/ram0, etc. If used, modern kernels use +/dev/ram0 for an initrd. + +The old "ramdisk=" has been changed to "ramdisk_size=" to +make it clearer. The original "ramdisk=" has been kept around for +compatibility reasons, but it may be removed in the future. The new RAM disk also has the ability to load compressed RAM disk images, allowing one to squeeze more programs onto an average installation or rescue floppy disk. -Notes: You may have "/dev/ram" or "/dev/ramdisk" or both. They are -equivalent from the standpoint of this document. Also, the new RAM disk -is a config option. When running "make config", make sure you enable -RAM disk support for the kernel with which you intend to use the RAM disk. - 2) Kernel Command Line Parameters --------------------------------- - ramdisk_start=NNN - ================= - -To allow a kernel image to reside on a floppy disk along with a compressed -RAM disk image, the "ramdisk_start=" command was added. The kernel -can't be included into the compressed RAM disk filesystem image, because -it needs to be stored starting at block zero so that the BIOS can load the -boot sector and then the kernel can bootstrap itself to get going. - -Note: If you are using an uncompressed RAM disk image, then the kernel can -be a part of the filesystem image that is being loaded into the RAM disk, -and the floppy can be booted with LILO, or the two can be separate as -is done for the compressed images. - -If you are using a two-disk boot/root setup (kernel on #1, RAM disk image -on #2) then the RAM disk would start at block zero, and an offset of -zero would be used. Since this is the default value, you would not need -to actually use the command at all. - -If instead, you have a "zImage" of about 350 kB, and a "fs_image.gz" of -say about 1 MB, and you want them both on the same disk, then you -would use an offset. If you stored the "fs_image.gz" onto the floppy -starting at an offset of 400 kB, you would use "ramdisk_start=400". - - - load_ramdisk=N - ============== - -This parameter tells the kernel whether it is to try to load a -RAM disk image or not. Specifying "load_ramdisk=1" will tell the -kernel to load a floppy into the RAM disk. The default value is -zero, meaning that the kernel should not try to load a RAM disk. - - - prompt_ramdisk=N - ================ - -This parameter tells the kernel whether or not to give you a prompt -asking you to insert the floppy containing the RAM disk image. In -a single floppy configuration the RAM disk image is on the same floppy -as the kernel that just finished loading/booting and so a prompt -is not needed. In this case one can use "prompt_ramdisk=0". In a -two floppy configuration, you will need the chance to switch disks, -and thus "prompt_ramdisk=1" can be used. Since this is the default -value, it doesn't really need to be specified. - ramdisk_size=N ============== This parameter tells the RAM disk driver to set up RAM disks of N k size. The -default is 4096 (4 MB). +default is 4096 (4 MB) (8192 (8 MB) on S390). + + ramdisk_blocksize=N + =================== -3) Using "rdev -r" With New Kernels ------------------------------------ +This parameter tells the RAM disk driver how many bytes to use per block. The +default is 512. -The usage of the word (two bytes) that "rdev -r" sets in the kernel image -has changed. The low 11 bits (0 -> 10) specify an offset (in 1 k blocks) -of up to 2 MB (2^11) of where to find the RAM disk (this used to be the -size). Bit 14 indicates that a RAM disk is to be loaded, and bit 15 -indicates whether a prompt/wait sequence is to be given before trying -to read the RAM disk. Since the RAM disk dynamically grows as data is -being written into it, a size field is no longer required. Bits 11 -to 13 are not currently used and may as well be zero. These numbers -are no magical secrets, as seen below: + +3) Using "rdev -r" +------------------ + +The usage of the word (two bytes) that "rdev -r" sets in the kernel image is +as follows. The low 11 bits (0 -> 10) specify an offset (in 1 k blocks) of up +to 2 MB (2^11) of where to find the RAM disk (this used to be the size). Bit +14 indicates that a RAM disk is to be loaded, and bit 15 indicates whether a +prompt/wait sequence is to be given before trying to read the RAM disk. Since +the RAM disk dynamically grows as data is being written into it, a size field +is not required. Bits 11 to 13 are not currently used and may as well be zero. +These numbers are no magical secrets, as seen below: ./arch/i386/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK 0x07FF ./arch/i386/kernel/setup.c:#define RAMDISK_PROMPT_FLAG 0x8000 @@ -152,10 +103,10 @@ To create a RAM disk image, you will need a spare block device to construct it on. This can be the RAM disk device itself, or an unused disk partition (such as an unmounted swap partition). For this -example, we will use the RAM disk device, "/dev/ram". +example, we will use the RAM disk device, "/dev/ram0". Note: This technique should not be done on a machine with less than 8 MB -of RAM. If using a spare disk partition instead of /dev/ram, then this +of RAM. If using a spare disk partition instead of /dev/ram0, then this restriction does not apply. a) Decide on the RAM disk size that you want. Say 2 MB for this example. @@ -164,11 +115,11 @@ area (esp. for disks) so that maximal compression is achieved for the unused blocks of the image that you are about to create. - dd if=/dev/zero of=/dev/ram bs=1k count=2048 + dd if=/dev/zero of=/dev/ram0 bs=1k count=2048 b) Make a filesystem on it. Say ext2fs for this example. - mke2fs -vm0 /dev/ram 2048 + mke2fs -vm0 /dev/ram0 2048 c) Mount it, copy the files you want to it (eg: /etc/* /dev/* ...) and unmount it again. @@ -177,7 +128,7 @@ will be approximately 50% of the space used by the files. Unused space on the RAM disk will compress to almost nothing. - dd if=/dev/ram bs=1k count=2048 | gzip -v9 > /tmp/ram_image.gz + dd if=/dev/ram0 bs=1k count=2048 | gzip -v9 > /tmp/ram_image.gz e) Put the kernel onto the floppy @@ -203,4 +154,14 @@ users may wish to combine steps (d) and (f) by using a pipe. -------------------------------------------------------------------------- - Paul Gortmaker 12/95 + Paul Gortmaker 12/95 + +Changelog: +---------- + +10-22-04 : Updated to reflect changes in command line options, remove + obsolete references, general cleanup. + James Nelson (james4765@gmail.com) + + +12-95 : Original Document diff -Nru a/Documentation/s390/s390dbf.txt b/Documentation/s390/s390dbf.txt --- a/Documentation/s390/s390dbf.txt 2004-11-10 17:19:05 -08:00 +++ b/Documentation/s390/s390dbf.txt 2004-11-10 17:19:05 -08:00 @@ -78,6 +78,23 @@ > echo "-" > /proc/s390dbf/dasd/level +It is also possible to deactivate the debug feature globally for every +debug log. You can change the behavior using 2 sysctl parameters in +/proc/sys/s390dbf: +There are currently 2 possible triggers, which stop the debug feature +globally. The first possbility is to use the "debug_active" sysctl. If +set to 1 the debug feature is running. If "debug_active" is set to 0 the +debug feature is turned off. +The second trigger which stops the debug feature is an kernel oops. +That prevents the debug feature from overwriting debug information that +happened before the oops. After an oops you can reactivate the debug feature +by piping 1 to /proc/sys/s390dbf/debug_active. Nevertheless, its not +suggested to use an oopsed kernel in an production environment. +If you want to disallow the deactivation of the debug feature, you can use +the "debug_stoppable" sysctl. If you set "debug_stoppable" to 0 the debug +feature cannot be stopped. If the debug feature is already stopped, it +will stay deactivated. + Kernel Interfaces: ------------------ @@ -115,6 +132,17 @@ Return Value: none Description: Sets new actual debug level if new_level is valid. + +--------------------------------------------------------------------------- ++void debug_stop_all(void); + +Parameter: none + +Return Value: none + +Description: stops the debug feature if stopping is allowed. Currently + used in case of a kernel oops. + --------------------------------------------------------------------------- debug_entry_t* debug_event (debug_info_t* id, int level, void* data, int length); @@ -271,12 +299,12 @@ * hex_ascii- + raw-view Example */ -#include +#include #include static debug_info_t* debug_info; -int init_module(void) +static int init(void) { /* register 4 debug areas with one page each and 4 byte data field */ @@ -291,23 +319,26 @@ return 0; } -void cleanup_module(void) +static void cleanup(void) { debug_unregister (debug_info); } +module_init(init); +module_exit(cleanup); + --------------------------------------------------------------------------- /* * sprintf-view Example */ -#include +#include #include static debug_info_t* debug_info; -int init_module(void) +static int init(void) { /* register 4 debug areas with one page each and data field for */ /* format string pointer + 2 varargs (= 3 * sizeof(long)) */ @@ -321,11 +352,14 @@ return 0; } -void cleanup_module(void) +static void cleanup(void) { debug_unregister (debug_info); } +module_init(init); +module_exit(cleanup); + ProcFS Interface @@ -376,6 +410,15 @@ 2. Flush all debug areas: > echo "-" > /proc/s390dbf/dasd/flush + +Stooping the debug feature +-------------------------- +Example: + +1. Check if stopping is allowed +> cat /proc/sys/s390dbf/debug_stoppable +2. Stop debug feature +> echo 0 > /proc/sys/s390dbf/debug_active lcrash Interface ---------------- diff -Nru a/Documentation/sonypi.txt b/Documentation/sonypi.txt --- a/Documentation/sonypi.txt 2004-11-10 17:19:02 -08:00 +++ b/Documentation/sonypi.txt 2004-11-10 17:19:02 -08:00 @@ -1,6 +1,6 @@ Sony Programmable I/O Control Device Driver Readme -------------------------------------------------- - Copyright (C) 2001-2003 Stelian Pop + Copyright (C) 2001-2004 Stelian Pop Copyright (C) 2001-2002 Alcôve Copyright (C) 2001 Michael Ashley Copyright (C) 2001 Junichi Morita @@ -23,16 +23,18 @@ Those events (see linux/sonypi.h) can be polled using the character device node /dev/sonypi (major 10, minor auto allocated or specified as a option). - A simple daemon which translates the jogdial movements into mouse wheel events can be downloaded at: +Another option to intercept the events is to get them directly through the +input layer. + This driver supports also some ioctl commands for setting the LCD screen -brightness and querying the batteries charge information (some more +brightness and querying the batteries charge information (some more commands may be added in the future). This driver can also be used to set the camera controls on Picturebook series -(brightness, contrast etc), and is used by the video4linux driver for the +(brightness, contrast etc), and is used by the video4linux driver for the Motion Eye camera. Please note that this driver was created by reverse engineering the Windows @@ -42,15 +44,12 @@ Driver options: --------------- -Several options can be passed to the sonypi driver, either by adding them -to /etc/modprobe.conf file, when the driver is compiled as a module or by -adding the following to the kernel command line (in your bootloader): - - sonypi=minor[,verbose[,fnkeyinit[,camera[,compat[,mask[,useinput]]]]]] +Several options can be passed to the sonypi driver using the standard +module argument syntax (= when passing the option to the +module or sonypi.= on the kernel boot line when sonypi is +statically linked into the kernel). Those options are: -where: - - minor: minor number of the misc device /dev/sonypi, + minor: minor number of the misc device /dev/sonypi, default is -1 (automatic allocation, see /proc/misc or kernel logs) @@ -62,14 +61,14 @@ get enabled unless you set this parameter to 1. Do not use this option unless it's actually necessary, some Vaio models don't deal well with this option. - This option is available only if the kernel is + This option is available only if the kernel is compiled without ACPI support (since it conflicts - with it and it shouldn't be required anyway if + with it and it shouldn't be required anyway if ACPI is already enabled). - verbose: set to 1 to print unknown events received from the + verbose: set to 1 to print unknown events received from the sonypi device. - set to 2 to print all events received from the + set to 2 to print all events received from the sonypi device. compat: uses some compatibility code for enabling the sonypi @@ -78,14 +77,15 @@ add this option and report to the author. mask: event mask telling the driver what events will be - reported to the user. This parameter is required for some - Vaio models where the hardware reuses values used in - other Vaio models (like the FX series who does not - have a jogdial but reuses the jogdial events for + reported to the user. This parameter is required for + some Vaio models where the hardware reuses values + used in other Vaio models (like the FX series who does + not have a jogdial but reuses the jogdial events for programmable keys events). The default event mask is - set to 0xffffffff, meaning that all possible events will be - tried. You can use the following bits to construct - your own event mask (from drivers/char/sonypi.h): + set to 0xffffffff, meaning that all possible events + will be tried. You can use the following bits to + construct your own event mask (from + drivers/char/sonypi.h): SONYPI_JOGGER_MASK 0x0001 SONYPI_CAPTURE_MASK 0x0002 SONYPI_FNKEY_MASK 0x0004 @@ -100,10 +100,10 @@ SONYPI_MEMORYSTICK_MASK 0x0800 SONYPI_BATTERY_MASK 0x1000 - useinput: if set (which is the default) jogdial events are - forwarded to the input subsystem as mouse wheel - events. - + useinput: if set (which is the default) two input devices are + created, one which interprets the jogdial events as + mouse events, the other one which acts like a + keyboard reporting the pressing of the special keys. Module use: ----------- @@ -126,17 +126,17 @@ external monitor on/off. There is no workaround yet, since this driver disables all APM management for those keys, by enabling the ACPI management (and the ACPI core stuff is not complete yet). If - you have one of those laptops with working Fn keys and want to + you have one of those laptops with working Fn keys and want to continue to use them, don't use this driver. - some users reported that the laptop speed is lower (dhrystone tested) when using the driver with the fnkeyinit parameter. I cannot reproduce it on my laptop and not all users have this problem. - This happens because the fnkeyinit parameter enables the ACPI - mode (but without additional ACPI control, like processor + This happens because the fnkeyinit parameter enables the ACPI + mode (but without additional ACPI control, like processor speed handling etc). Use ACPI instead of APM if it works on your laptop. - + - since all development was done by reverse engineering, there is _absolutely no guarantee_ that this driver will not crash your laptop. Permanently. diff -Nru a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt --- a/Documentation/sound/alsa/ALSA-Configuration.txt 2004-11-10 17:19:02 -08:00 +++ b/Documentation/sound/alsa/ALSA-Configuration.txt 2004-11-10 17:19:02 -08:00 @@ -661,8 +661,6 @@ * ALi m5455 ac97_clock - AC'97 codec clock base (0 = auto-detect) - joystick - Enable joystick (default off) - mpu_port - MPU401 port # (0 = disabled, 0x330,0x300) ac97_quirk - AC'97 workaround for strange hardware (-1 = default) -1 = default, don't override 0 = disable @@ -670,6 +668,7 @@ 2 = swap headphone and master controls 3 = for AD1985, turn on OMS bit and use headphone 4 = for ALC65x, turn on the jack sense mode + 5 = inverted EAPD implementation buggy_irq - Enable workaround for buggy interrupts on some motherboards (default off) @@ -679,8 +678,9 @@ if you still encounter too fast playback, specify the clock explicitly via the module option "ac97_clock=41194". - The joystick and MPU-401 are supported only certain hardwares. - MPU401 is experimental, It doesn't work perfectly. + Joystick/MIDI ports are not supported by this driver. If your + motherboard has these devices, use the ns558 or snd-mpu401 + modules, respectively. The ac97_quirk option is used to enable/override the workaround for specific devices. Some hardware have swapped output pins @@ -809,6 +809,7 @@ buffer_top - specify buffer top address use_cache - 0 or 1 (disabled by default) vaio_hack - alias buffer_top=0x25a800 + reset_workaround - enable AC97 RESET workaround for some laptops Module supports autoprobe and multiple chips (max 8). @@ -833,6 +834,11 @@ other drivers, e.g. snd-cs4232 or snd-opl3sa2. Some has ISA-PnP but some doesn't have ISA PnP. You'll need to speicfy isapnp=0 and proper hardware parameters in the case without ISA PnP. + + Note: some laptops need a workaround for AC97 RESET. For the + known hardware like Dell Latitude LS and Sony PCG-F305, this + workaround is enabled automatically. For other laptops with a + hard freeze, you can try reset_workaround=1 option. Note: This driver is really crappy. It's a porting from the OSS driver, which is a result of black-magic reverse engineering. diff -Nru a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 2004-11-10 17:19:03 -08:00 +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 2004-11-10 17:19:03 -08:00 @@ -1479,7 +1479,7 @@ struct snd_mychip { .... unsigned long iobase_phys; - unsigned long iobase_virt; + void __iomem *iobase_virt; }; ]]> @@ -1495,8 +1495,7 @@ return err; } chip->iobase_phys = pci_resource_start(pci, 0); - chip->iobase_virt = (unsigned long) - ioremap_nocache(chip->iobase_phys, + chip->iobase_virt = ioremap_nocache(chip->iobase_phys, pci_resource_len(pci, 0)); ]]> @@ -1511,7 +1510,7 @@ { .... if (chip->iobase_virt) - iounmap((void *)chip->iobase_virt); + iounmap(chip->iobase_virt); .... pci_release_regions(chip->pci); .... @@ -4060,8 +4059,8 @@ Also, there is a function to change the sample rate (of a certain register such as - AC97_PCM_FRONT_DAC_RATE) when VRA is - supported by the codec: + AC97_PCM_FRONT_DAC_RATE) when VRA or + DRA is supported by the codec: snd_ac97_set_rate(). @@ -4341,7 +4340,39 @@ - If this function returns successfully with 0, then create a + When the accessing to the hardware requires special method + instead of the standard I/O access, you can create opl3 instance + separately with snd_opl3_new(). + + + + + + + + + + Then set command, + private_data and + private_free for the private + access function, the private data and the destructor. + The l_port and r_port are not necessarily set. Only the + command must be set properly. You can retrieve the data + from opl3->private_data field. + + + + After creating the opl3 instance via snd_opl3_new(), + call snd_opl3_init() to initialize the chip to the + proper state. Note that snd_opl3_create() always + calls it internally. + + + + If the opl3 instance is created successfully, then create a hwdep device for this opl3. diff -Nru a/Documentation/sound/alsa/Joystick.txt b/Documentation/sound/alsa/Joystick.txt --- a/Documentation/sound/alsa/Joystick.txt 2004-11-10 17:19:04 -08:00 +++ b/Documentation/sound/alsa/Joystick.txt 2004-11-10 17:19:04 -08:00 @@ -49,17 +49,15 @@ cs46xx N/A N/A es1938 N/A N/A es1968 joystick 0 = disable (default), 1 = enable - intel8x0(*1)joystick 0 = disable (default), 1 = enable sonicvibes N/A N/A trident N/A N/A - via82xx(*2) joystick 0 = disable (default), 1 = enable + via82xx(*1) joystick 0 = disable (default), 1 = enable ymfpci joystick_port 0 = disable (default), 1 = auto-detect, - manual: 0x201, 0x202, 0x204, 0x205(*3) + manual: 0x201, 0x202, 0x204, 0x205(*2) --------------------------------------------------------------------------- - *1) not all chips support joystick - *2) VIA686A/B only - *3) With YMF744/754 chips, the port address can be chosen arbitrarily + *1) VIA686A/B only + *2) With YMF744/754 chips, the port address can be chosen arbitrarily The following drivers don't support gameport natively, but there are additional modules. Load the corresponding module to add the gameport diff -Nru a/Documentation/sound/oss/README.modules b/Documentation/sound/oss/README.modules --- a/Documentation/sound/oss/README.modules 2004-11-10 17:19:06 -08:00 +++ b/Documentation/sound/oss/README.modules 2004-11-10 17:19:06 -08:00 @@ -59,8 +59,9 @@ uart401.o # Used by sb, maybe other cards Whichever card you have, try feeding it the options that would be the -default if you were making the driver wired, not as modules. You can look -at the init_module() code for the card to see what args are expected. +default if you were making the driver wired, not as modules. You can +look at function referred to by module_init() for the card to see what +args are expected. Note that at present there is no way to configure the io, irq and other parameters for the modular drivers as one does for the wired drivers.. One diff -Nru a/Documentation/time_interpolators.txt b/Documentation/time_interpolators.txt --- a/Documentation/time_interpolators.txt 2004-11-10 17:19:06 -08:00 +++ b/Documentation/time_interpolators.txt 2004-11-10 17:19:06 -08:00 @@ -9,32 +9,33 @@ settimeofday under Linux. The time interpolator provides both if an arch defines CONFIG_TIME_INTERPOLATION. The arch still must set up timer tick operations and call the necessary functions to advance the clock. + With the time interpolator a standardized interface exists for time -interpolation between ticks which also allows the determination -of time in a hardware independent way. The provided logic is highly scalable +interpolation between ticks. The provided logic is highly scalable and has been tested in SMP situations of up to 512 CPUs. If CONFIG_TIME_INTERPOLATION is defined then the architecture specific code -(or the device drivers - like HPET) must register time interpolators. +(or the device drivers - like HPET) may register time interpolators. These are typically defined in the following way: -static struct time_interpolator my_interpolator; +static struct time_interpolator my_interpolator { + .frequency = MY_FREQUENCY, + .source = TIME_SOURCE_MMIO32, + .shift = 8, /* scaling for higher accuracy */ + .drift = -1, /* Unknown drift */ + .jitter = 0 /* time source is stable */ +}; void time_init(void) { .... /* Initialization of the timer *. - my_interpolator.frequency = MY_FREQUENCY; - my_interpolator.source = TIME_SOURCE_MMIO32; my_interpolator.address = &my_timer; - my_interpolator.shift = 32; /* increase accuracy of scaling */ - my_interpolator.drift = -1; /* Unknown */ - my_interpolator.jitter = 0; /* A stable time source */ register_time_interpolator(&my_interpolator); .... } -For more details see include/linux/timex.h. +For more details see include/linux/timex.h and kernel/timer.c. -Christoph Lameter , September 8, 2004 +Christoph Lameter , October 31, 2004 diff -Nru a/Documentation/tipar.txt b/Documentation/tipar.txt --- a/Documentation/tipar.txt 2004-11-10 17:19:02 -08:00 +++ b/Documentation/tipar.txt 2004-11-10 17:19:02 -08:00 @@ -4,7 +4,7 @@ Author: Romain Lievin -Homepage: http://lpg.ticalc.org/prj_dev +Homepage: http://lpg.ticalc.org/prj_tidev/index.html INTRODUCTION: @@ -12,31 +12,30 @@ This is a driver for the very common home-made parallel link cable, a cable designed for connecting TI8x/9x graphing calculators (handhelds) to a computer or workstation (Alpha, Sparc). Given that driver is built on parport, the -parallel port abstraction layer, this driver is independent of the platform. +parallel port abstraction layer, this driver is architecture-independent. It can also be used with another device plugged on the same port (such as a -ZIP drive). I have a 100MB ZIP and both of them work fine ! +ZIP drive). I have a 100MB ZIP and both of them work fine! If you need more information, please visit the 'TI drivers' homepage at the URL above. WHAT YOU NEED: -A TI calculator of course and a program capable to communicate with your -calculator. -TiLP will work for sure (since I am his developer !). yal92 may be able to use +A TI calculator and a program capable of communicating with your calculator. + +TiLP will work for sure (since I am its developer!). yal92 may be able to use it by changing tidev for tipar (may require some hacking...). HOW TO USE IT: You must have first compiled parport support (CONFIG_PARPORT_DEV): either compiled in your kernel, either as a module. -This driver supports the new device hierarchy (devfs). -Next, (as root) from your appropriate modules directory (lib/modules/2.5.XX): +Next, (as root): modprobe parport - insmod tipar.o + modprobe tipar If it is not already there (it usually is), create the device: @@ -47,14 +46,14 @@ You will have to set permissions on this device to allow you to read/write from it: - chmod 666 /dev/tipar? + chmod 666 /dev/tipar[0..2] Now you are ready to run a linking program such as TiLP. Be sure to configure it properly (RTFM). MODULE PARAMETERS: - You can set these with: insmod tipar NAME=VALUE + You can set these with: modprobe tipar NAME=VALUE There is currently no way to set these on a per-cable basis. NAME: timeout @@ -66,11 +65,12 @@ NAME: delay TYPE: integer DEFAULT: 10 - DESC: Inter-bit delay in micro-seconds. An lower value gives an higher data + DESC: Inter-bit delay in micro-seconds. A lower value gives an higher data rate but makes transmission less reliable. These parameters can be changed at run time by any program via ioctl(2) calls -as listed in ./include/linux/ticable.h +as listed in ./include/linux/ticable.h. + Rather than write 50 pages describing the ioctl() and so on, it is perhaps more useful you look at ticables library (dev_link.c) that demonstrates how to use them, and demonstrates the features of the driver. This is diff -Nru a/Documentation/usb/error-codes.txt b/Documentation/usb/error-codes.txt --- a/Documentation/usb/error-codes.txt 2004-11-10 17:19:02 -08:00 +++ b/Documentation/usb/error-codes.txt 2004-11-10 17:19:02 -08:00 @@ -1,11 +1,12 @@ -Revised: 2002-Feb-09. +Revised: 2004-Oct-21 This is the documentation of (hopefully) all possible error codes (and their interpretation) that can be returned from usbcore. Some of them are returned by the Host Controller Drivers (HCDs), which device drivers only see through usbcore. As a rule, all the HCDs should -behave the same except for transfer speed dependent behaviors. +behave the same except for transfer speed dependent behaviors and the +way certain faults are reported. ************************************************************************** @@ -26,29 +27,35 @@ of urb. (treat as a host controller bug.) -EINVAL a) Invalid transfer type specified (or not supported) - b) Invalid interrupt interval (0<=n<256) - c) more than one interrupt packet requested + b) Invalid or unsupported periodic transfer interval + c) ISO: attempted to change transfer interval d) ISO: number_of_packets is < 0 + e) various other cases -EAGAIN a) specified ISO start frame too early b) (using ISO-ASAP) too much scheduled for the future wait some time and try again. --EFBIG too much ISO frames requested (currently uhci>900) +-EFBIG Host controller driver can't schedule that many ISO frames. -EPIPE Specified endpoint is stalled. For non-control endpoints, reset this status with usb_clear_halt(). --EMSGSIZE endpoint message size is zero, do interface/alternate setting +-EMSGSIZE (a) endpoint maxpacket size is zero; it is not usable + in the current interface altsetting. + (b) ISO packet is biger than endpoint maxpacket + (c) requested data transfer size is invalid (negative) --ENOSPC The host controller's bandwidth is already consumed and - this request would push it past its allowed limit. +-ENOSPC This request would overcommit the usb bandwidth reserved + for periodic transfers (interrupt, isochronous). --ESHUTDOWN The host controller has been disabled due to some +-ESHUTDOWN The device or host controller has been disabled due to some problem that could not be worked around. -EPERM Submission failed because urb->reject was set. +-EHOSTUNREACH URB was rejected because the device is suspended. + ************************************************************************** * Error codes returned by in urb->status * @@ -71,14 +78,14 @@ -EINPROGRESS URB still pending, no results yet (That is, if drivers see this it's a bug.) --EPROTO (*) a) bitstuff error +-EPROTO (*, **) a) bitstuff error b) no response packet received within the prescribed bus turn-around time c) unknown USB error --EILSEQ (*) CRC mismatch +-EILSEQ (*, **) CRC mismatch --EPIPE Endpoint stalled. For non-control endpoints, +-EPIPE (**) Endpoint stalled. For non-control endpoints, reset this status with usb_clear_halt(). -ECOMM During an IN transfer, the host controller @@ -97,7 +104,7 @@ specified buffer, and URB_SHORT_NOT_OK was set in urb->transfer_flags. --ETIMEDOUT transfer timed out, NAK +-ETIMEDOUT (**) transfer timed out, NAK -ENODEV Device was removed. Often preceded by a burst of other errors, since the hub driver does't detect @@ -110,12 +117,18 @@ -ECONNRESET URB was asynchronously unlinked by usb_unlink_urb --ESHUTDOWN The host controller has been disabled due to some - problem that could not be worked around. +-ESHUTDOWN The device or host controller has been disabled due + to some problem that could not be worked around, + such as a physical disconnect. (*) Error codes like -EPROTO, -EILSEQ and -EOVERFLOW normally indicate hardware problems such as bad devices (including firmware) or cables. + +(**) This is also one of several codes that different kinds of host +controller use to to indicate a transfer has failed because of device +disconnect. In the interval before the hub driver starts disconnect +processing, devices may receive such fault reports for every request. diff -Nru a/Documentation/usb/silverlink.txt b/Documentation/usb/silverlink.txt --- a/Documentation/usb/silverlink.txt 2004-11-10 17:19:03 -08:00 +++ b/Documentation/usb/silverlink.txt 2004-11-10 17:19:03 -08:00 @@ -1,5 +1,6 @@ ------------------------------------------------------------------------- Readme for Linux device driver for the Texas Instruments SilverLink cable +and direct USB cable provided by some TI's handhelds. ------------------------------------------------------------------------- Author: Romain Liévin & Julien Blache @@ -9,7 +10,8 @@ This is a driver for the TI-GRAPH LINK USB (aka SilverLink) cable, a cable designed by TI for connecting their TI8x/9x calculators to a computer -(PC or Mac usually). +(PC or Mac usually). It has been extended to support the USB port offered by +some latest TI handhelds (TI84+ and TI89 Titanium). If you need more information, please visit the 'SilverLink drivers' homepage at the above URL. @@ -73,4 +75,4 @@ CREDITS: The code is based on dabusb.c, printer.c and scanner.c ! -The driver has been developed independently of Texas Instruments. +The driver has been developed independently of Texas Instruments Inc. diff -Nru a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt --- a/Documentation/usb/usb-serial.txt 2004-11-10 17:19:02 -08:00 +++ b/Documentation/usb/usb-serial.txt 2004-11-10 17:19:02 -08:00 @@ -211,6 +211,62 @@ azummo@towertech.it +Cypress M8 CY4601 Family Serial Driver + + This driver was in most part developed by Neil "koyama" Whelchel. It + has been improved since that previous form to support dynamic serial + line settings and improved line handling. The driver is for the most + part stable and has been tested on an smp machine. (dual p2) + + Chipsets supported under CY4601 family: + + CY7C63723, CY7C63742, CY7C63743, CY7C64013 + + Devices supported: + + -DeLorme's USB Earthmate (SiRF Star II lp arch) + -Cypress HID->COM RS232 adapter + + Note: Cypress Semiconductor claims no affiliation with the + the hid->com device. + + Most devices using chipsets under the CY4601 family should + work with the driver. As long as they stay true to the CY4601 + usbserial specification. + + Technical notes: + + The Earthmate starts out at 4800 8N1 by default... the driver will + upon start init to this setting. usbserial core provides the rest + of the termios settings, along with some custom termios so that the + output is in proper format and parsable. + + The device can be put into sirf mode by issuing NMEA command: + $PSRF100,,,,,*CHECKSUM + $PSRF100,0,9600,8,1,0*0C + + It should then be sufficient to change the port termios to match this + to begin communicating. + + As far as I can tell it supports pretty much every sirf command as + documented online available with firmware 2.31, with some unknown + message ids. + + The hid->com adapter can run at a maximum baud of 115200bps. Please note + that the device has trouble or is incapable of raising line voltage properly. + It will be fine with null modem links, as long as you do not try to link two + together without hacking the adapter to set the line high. + + The driver is smp safe. Performance with the driver is rather low when using + it for transfering files. This is being worked on, but I would be willing to + accept patches. An urb queue or packet buffer would likely fit the bill here. + + If you have any questions, problems, patches, feature requests, etc. you can + contact me here via email: + dignome@gmail.com + (your problems/patches can alternately be submitted to usb-devel) + + Digi AccelePort Driver This driver supports the Digi AccelePort USB 2 and 4 devices, 2 port diff -Nru a/Documentation/usb/w9968cf.txt b/Documentation/usb/w9968cf.txt --- a/Documentation/usb/w9968cf.txt 2004-11-10 17:19:05 -08:00 +++ b/Documentation/usb/w9968cf.txt 2004-11-10 17:19:05 -08:00 @@ -8,26 +8,30 @@ Index ===== -1. Copyright -2. License -3. Overview -4. Supported devices -5. Module dependencies -6. Module loading -7. Module paramaters -8. Contact information -9. Credits +1. Copyright +2. Disclaimer +3. License +4. Overview +5. Supported devices +6. Module dependencies +7. Module loading +8. Module paramaters +9. Contact information +10. Credits 1. Copyright ============ Copyright (C) 2002-2004 by Luca Risolia + +2. Disclaimer +============= Winbond is a trademark of Winbond Electronics Corporation. -This driver is not sponsored or developed by Winbond. +This software is not sponsored or developed by Winbond. -2. License +3. License ========== This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +48,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -3. Overview +4. Overview =========== This driver supports the video streaming capabilities of the devices mounting Winbond W9967CF and Winbond W9968CF JPEG USB Dual Mode Camera Chips. OV681 @@ -57,7 +61,7 @@ every time an application tries to open a recognized device, "w9968cf" checks the presence of the "w9968cf-vpp" module and loads it automatically by default. -Please keep in mind that official kernels do NOT include the second module for +Please keep in mind that official kernels do not include the second module for performance purposes. However it is always recommended to download and install the latest and complete release of the driver, replacing the existing one, if present: it will be still even possible not to load the "w9968cf-vpp" module at @@ -65,7 +69,7 @@ the official Linux 2.4 kernels is the writeable /proc filesystem interface. The latest and full-featured version of the W996[87]CF driver can be found at: -http://go.lamarinapunto.com/ . Please refer to the documentation included in +http://www.linux-projects.org. Please refer to the documentation included in that package, if you are going to use it. Up to 32 cameras can be handled at the same time. They can be connected and @@ -83,7 +87,7 @@ compiled with the automatic module loading option). -4. Supported devices +5. Supported devices ==================== At the moment, known W996[87]CF and OV681 based devices are: - Aroma Digi Pen VGA Dual Mode ADG-5000 (unknown image sensor) @@ -99,11 +103,9 @@ If you know any other W996[87]CF or OV681 based cameras, please contact me. -The list above does NOT imply that all those devices work with this driver: up +The list above does not imply that all those devices work with this driver: up until now only webcams that have an image sensor supported by the "ovcamchip" -module work. -For a list of supported image sensors, please visit the author's homepage on -this module: http://alpha.dyndns.org/ov511/ +module work. Kernel messages will always tell you whether this is case. Possible external microcontrollers of those webcams are not supported: this means that still images cannot be downloaded from the device memory. @@ -113,7 +115,7 @@ additional testing and full support, would be much appreciated. -5. Module dependencies +6. Module dependencies ====================== For it to work properly, the driver needs kernel support for Video4Linux, USB and I2C, and the "ovcamchip" module for the image sensor. Make sure you are not @@ -157,7 +159,7 @@ CONFIG_USB_W9968CF=m -6. Module loading +7. Module loading ================= To use the driver, it is necessary to load the "w9968cf" module into memory after every other module required. @@ -166,6 +168,7 @@ [root@localhost home]# modprobe usbcore [root@localhost home]# modprobe i2c-core + [root@localhost home]# modprobe videodev [root@localhost home]# modprobe w9968cf At this point the pertinent devices should be recognized: "dmesg" can be used @@ -181,7 +184,7 @@ [root@locahost home]# modinfo w9968cf -7. Module parameters +8. Module parameters ==================== Module parameters are listed below: ------------------------------------------------------------------------------- @@ -452,7 +455,7 @@ ------------------------------------------------------------------------------- -8. Contact information +9. Contact information ====================== I may be contacted by e-mail at . @@ -461,7 +464,7 @@ is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'. -9. Credits +10. Credits ========== The development would not have proceed much further without having looked at the source code of other drivers and without the help of several persons; in diff -Nru a/Documentation/video4linux/meye.txt b/Documentation/video4linux/meye.txt --- a/Documentation/video4linux/meye.txt 2004-11-10 17:19:06 -08:00 +++ b/Documentation/video4linux/meye.txt 2004-11-10 17:19:06 -08:00 @@ -1,12 +1,12 @@ Vaio Picturebook Motion Eye Camera Driver Readme ------------------------------------------------ - Copyright (C) 2001-2003 Stelian Pop + Copyright (C) 2001-2004 Stelian Pop Copyright (C) 2001-2002 Alcôve Copyright (C) 2000 Andrew Tridgell This driver enable the use of video4linux compatible applications with the -Motion Eye camera. This driver requires the "Sony Vaio Programmable I/O -Control Device" driver (which can be found in the "Character drivers" +Motion Eye camera. This driver requires the "Sony Vaio Programmable I/O +Control Device" driver (which can be found in the "Character drivers" section of the kernel configuration utility) to be compiled and installed (using its "camera=1" parameter). @@ -24,7 +24,7 @@ The first version was connected directly on the video bus of the Neomagic video card and is unsupported. -The second one, made by Kawasaki Steel is fully supported by this +The second one, made by Kawasaki Steel is fully supported by this driver (PCI vendor/device is 0x136b/0xff01) The third one, present in recent (more or less last year) Picturebooks @@ -41,13 +41,12 @@ Driver options: --------------- -Several options can be passed to the meye driver, either by adding them -to /etc/modprobe.conf file, when the driver is compiled as a module, or -by adding the following to the kernel command line (in your bootloader): +Several options can be passed to the meye driver using the standard +module argument syntax (= when passing the option to the +module or meye.= on the kernel boot line when meye is +statically linked into the kernel). Those options are: - meye=gbuffers[,gbufsize[,video_nr]] - -where: + forcev4l1: force use of V4L1 API instead of V4L2 gbuffers: number of capture buffers, default is 2 (32 max) @@ -81,8 +80,9 @@ Private API: ------------ - The driver supports frame grabbing with the video4linux API, so - all video4linux tools (like xawtv) should work with this driver. + The driver supports frame grabbing with the video4linux API + (either v4l1 or v4l2), so all video4linux tools (like xawtv) + should work with this driver. Besides the video4linux interface, the driver has a private interface for accessing the Motion Eye extended parameters (camera sharpness, @@ -116,7 +116,7 @@ MEYEIOC_STILLJCAPT Takes a snapshot in an uncompressed or compressed jpeg format. This ioctl blocks until the snapshot is done and returns (for - jpeg snapshot) the size of the image. The image data is + jpeg snapshot) the size of the image. The image data is available from the first mmap'ed buffer. Look at the 'motioneye' application code for an actual example. @@ -124,13 +124,7 @@ Bugs / Todo: ------------ - - overlay output is not supported (although the camera is capable of). - (it should not be too hard to to it, provided we found how...) - - - mjpeg hardware playback doesn't work (depends on overlay...) - - - rewrite the driver to use some common video4linux API for snapshot - and mjpeg capture. Unfortunately, video4linux1 does not permit it, - the BUZ API seems to be targeted to TV cards only. The video4linux 2 - API may be an option, if it goes into the kernel (maybe 2.5 - material ?). + - the driver could be much cleaned up by removing the v4l1 support. + However, this means all v4l1-only applications will stop working. + + - 'motioneye' still uses the meye private v4l1 API extensions. diff -Nru a/Documentation/vm/overcommit-accounting b/Documentation/vm/overcommit-accounting --- a/Documentation/vm/overcommit-accounting 2004-11-10 17:19:07 -08:00 +++ b/Documentation/vm/overcommit-accounting 2004-11-10 17:19:07 -08:00 @@ -22,9 +22,8 @@ The overcommit percentage is set via `vm.overcommit_ratio'. -The current overcommit limit, amount used, and amount remaining below -the limit are viewable in /proc/meminfo as CommitLimit, Committed_AS, and -CommitAvail respectively. +The current overcommit limit and amount committed are viewable in +/proc/meminfo as CommitLimit and Committed_AS respectively. Gotchas ------- diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS 2004-11-10 17:19:05 -08:00 +++ b/MAINTAINERS 2004-11-10 17:19:05 -08:00 @@ -531,10 +531,9 @@ COMPUTONE INTELLIPORT MULTIPORT CARD P: Michael H. Warfield M: Michael H. Warfield -W: http://www.computone.com/ W: http://www.wittsend.com/computone.html L: linux-computone@lazuli.wittsend.com -S: Supported +S: Orphaned COSA/SRP SYNC SERIAL DRIVER P: Jan "Yenya" Kasprzak @@ -670,7 +669,7 @@ M: Eng.Linux@digi.com L: Eng.Linux@digi.com W: http://www.digi.com -S: Maintained +S: Orphaned DIGI RIGHTSWITCH NETWORK DRIVER P: Rick Richardson @@ -683,7 +682,7 @@ M: christoph@lameter.com W: http://www.digi.com L: digilnux@digi.com -S: Orphaned +S: Obsolete DIRECTORY NOTIFICATION P: Stephen Rothwell @@ -818,11 +817,11 @@ S: Supported FRAMEBUFFER LAYER -P: James Simmons, Geert Uytterhoeven -M: jsimmons@infradead.org, geert@linux-m68k.org +P: Antonino Daplas +M: adaplas@pol.net L: linux-fbdev-devel@lists.sourceforge.net W: http://linux-fbdev.sourceforge.net/ -S: Supported +S: Maintained FILE LOCKING (flock() and fcntl()/lockf()) P: Matthew Wilcox @@ -832,7 +831,7 @@ FILESYSTEMS (VFS and infrastructure) P: Alexander Viro -M: viro@math.psu.edu +M: viro@parcelfarce.linux.theplanet.co.uk S: Maintained FIRMWARE LOADER (request_firmware) @@ -858,11 +857,9 @@ S: Maintained FTAPE/QIC-117 -P: Claus-Justus Heine -M: claus@momo.math.rwth-aachen.de L: linux-tape@vger.kernel.org -W: http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape/ -S: Maintained +W: http://sourceforge.net/projects/ftape +S: Orphan FUTURE DOMAIN TMC-16x0 SCSI DRIVER (16-bit) P: Rik Faith @@ -1112,8 +1109,8 @@ M: john.ronciak@intel.com P: Ganesh Venkatesan M: ganesh.venkatesan@intel.com -P: Scott Feldman -M: scott.feldman@intel.com +P: Jesse Brandeburg +M: jesse.brandeburg@intel.com W: http://sourceforge.net/projects/e1000/ S: Supported @@ -1250,6 +1247,12 @@ W: http://www.cse.unsw.edu.au/~neilb/patches/linux-devel/ S: Maintained +KERNEL EVENT LAYER (KOBJECT_UEVENT) +P: Robert Love +M: rml@novell.com +L: linux-kernel@vger.kernel.org +S: Maintained + LANMEDIA WAN CARD DRIVER P: Andrew Stanley-Jones M: asj@lanmedia.com @@ -1760,6 +1763,13 @@ W: ftp://ftp.kernel.org/pub/linux/kernel/people/rml/preempt-kernel S: Supported +PRISM54 WIRELESS DRIVER +P: Prism54 Development Team +M: prism54-private@prism54.org +L: netdev@oss.sgi.com +W: http://prism54.org +S: Maintained + PROMISE DC4030 CACHING DISK CONTROLLER DRIVER P: Peter Denison M: promise@pnd-pc.demon.co.uk @@ -2332,6 +2342,15 @@ L: linux-usb-devel@lists.sourceforge.net S: Maintained +USB SERIAL CYPRESS M8 DRIVER +P: Lonnie Mendez +M: dignome@gmail.com +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net +S: Maintained +W: http://geocities.com/i0xox0i +W: http://firstlight.net/cvs + USB SERIAL CYBERJACK PINPAD/E-COM DRIVER L: linux-usb-users@lists.sourceforge.net L: linux-usb-devel@lists.sourceforge.net @@ -2371,7 +2390,7 @@ P: Luca Risolia M: luca.risolia@studio.unibo.it L: linux-usb-devel@lists.sourceforge.net -W: http://go.lamarinapunto.com +W: http://www.linux-projects.org S: Maintained USB SUBSYSTEM @@ -2399,7 +2418,7 @@ P: Luca Risolia M: luca.risolia@studio.unibo.it L: linux-usb-devel@lists.sourceforge.net -W: http://go.lamarinapunto.com +W: http://www.linux-projects.org S: Maintained USER-MODE LINUX diff -Nru a/Makefile b/Makefile --- a/Makefile 2004-11-10 17:19:05 -08:00 +++ b/Makefile 2004-11-10 17:19:05 -08:00 @@ -156,8 +156,8 @@ endif LOCALVERSION = $(subst $(space),, \ - $(shell cat /dev/null $(localversion-files)) \ - $(subst ",,$(CONFIG_LOCALVERSION))) + $(shell cat /dev/null $(localversion-files:%~=)) \ + $(patsubst "%",%,$(CONFIG_LOCALVERSION))) KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION) @@ -295,6 +295,11 @@ cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ > /dev/null 2>&1; then echo "y"; else echo "n"; fi;) +# cc-option-align +# Prefix align with either -falign or -malign +cc-option-align = $(subst -functions=0,,\ + $(call cc-option,-falign-functions=0,-malign-functions=0)) + # cc-version # Usage gcc-ver := $(call cc-version $(CC)) cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \ @@ -379,6 +384,18 @@ scripts_basic: $(Q)$(MAKE) $(build)=scripts/basic +.PHONY: outputmakefile +# outputmakefile generate a Makefile to be placed in output directory, if +# using a seperate output directory. This allows convinient use +# of make in output directory +outputmakefile: + $(Q)if /usr/bin/env test ! $(srctree) -ef $(objtree); then \ + $(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ + $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \ + > $(objtree)/Makefile; \ + echo ' GEN $(objtree)/Makefile'; \ + fi + # To make sure we do not include .config for any of the *config targets # catch them early, and hand them over to scripts/kconfig/Makefile # It is allowed to specify more targets when calling make, including @@ -423,9 +440,15 @@ # *config targets only - make sure prerequisites are updated, and descend # in scripts/kconfig to make the *config target -config: scripts_basic FORCE +# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed. +# KBUILD_DEFCONFIG may point out an alternative default configuration +# used for 'make defconfig' +include $(srctree)/arch/$(ARCH)/Makefile +export KBUILD_DEFCONFIG + +config: scripts_basic outputmakefile FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ -%config: scripts_basic FORCE +%config: scripts_basic outputmakefile FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ else @@ -486,7 +509,16 @@ CFLAGS += -O2 endif -ifndef CONFIG_FRAME_POINTER +#Add align options if CONFIG_CC_* is not equal to 0 +add-align = $(if $(filter-out 0,$($(1))),$(cc-option-align)$(2)=$($(1))) +CFLAGS += $(call add-align,CONFIG_CC_ALIGN_FUNCTIONS,-functions) +CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LABELS,-labels) +CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LOOPS,-loops) +CFLAGS += $(call add-align,CONFIG_CC_ALIGN_JUMPS,-jumps) + +ifdef CONFIG_FRAME_POINTER +CFLAGS += -fno-omit-frame-pointer +else CFLAGS += -fomit-frame-pointer endif @@ -494,11 +526,11 @@ CFLAGS += -g endif +include $(srctree)/arch/$(ARCH)/Makefile + # warn about C99 declaration after statement CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) -include $(srctree)/arch/$(ARCH)/Makefile - # Default kernel image to build when no specific target is given. # KBUILD_IMAGE may be overruled on the commandline or # set in the environment @@ -711,22 +743,12 @@ .PHONY: prepare-all prepare prepare0 prepare1 prepare2 -# prepare 2 generate Makefile to be placed in output directory, if -# using a seperate output directory. This allows convinient use -# of make in output directory -prepare2: - $(Q)if /usr/bin/env test ! $(srctree) -ef $(objtree); then \ - $(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ - $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \ - > $(objtree)/Makefile; \ - fi - -# prepare1 is used to check if we are building in a separate output directory, +# prepare2 is used to check if we are building in a separate output directory, # and if so do: # 1) Check that make has not been executed in the kernel src $(srctree) # 2) Create the include2 directory, used for the second asm symlink -prepare1: prepare2 +prepare2: ifneq ($(KBUILD_SRC),) @echo ' Using $(srctree) as source for kernel' $(Q)if [ -h $(srctree)/include/asm -o -f $(srctree)/.config ]; then \ @@ -737,6 +759,9 @@ $(Q)if [ ! -d include2 ]; then mkdir -p include2; fi; $(Q)ln -fsn $(srctree)/include/asm-$(ARCH) include2/asm endif + +# prepare1 creates a makefile if using a separate output directory +prepare1: prepare2 outputmakefile prepare0: prepare1 include/linux/version.h include/asm include/config/MARKER ifneq ($(KBUILD_MODULES),) diff -Nru a/arch/alpha/boot/bootloader.lds b/arch/alpha/boot/bootloader.lds --- a/arch/alpha/boot/bootloader.lds 2004-11-10 17:19:06 -08:00 +++ b/arch/alpha/boot/bootloader.lds 2004-11-10 17:19:06 -08:00 @@ -1,5 +1,6 @@ OUTPUT_FORMAT("elf64-alpha") ENTRY(__start) +printk = srm_printk; SECTIONS { . = 0x20000000; diff -Nru a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c --- a/arch/alpha/boot/bootp.c 2004-11-10 17:19:06 -08:00 +++ b/arch/alpha/boot/bootp.c 2004-11-10 17:19:06 -08:00 @@ -26,6 +26,8 @@ struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa, unsigned long *vptb); +extern void move_stack(unsigned long new_stack); + struct hwrpb_struct *hwrpb = INIT_HWRPB; static struct pcb_struct pcb_va[1]; @@ -118,12 +120,10 @@ runkernel(void) { __asm__ __volatile__( - "bis %1,%1,$30\n\t" "bis %0,%0,$27\n\t" "jmp ($27)" : /* no outputs: it doesn't even return */ - : "r" (START_ADDR), - "r" (PAGE_SIZE + INIT_STACK)); + : "r" (START_ADDR)); } extern char _end; @@ -147,9 +147,7 @@ */ static long nbytes; static char envval[256] __attribute__((aligned(8))); -#ifdef INITRD_IMAGE_SIZE static unsigned long initrd_start; -#endif srm_printk("Linux/AXP bootp loader for Linux " UTS_RELEASE "\n"); if (INIT_HWRPB->pagesize != 8192) { @@ -164,12 +162,19 @@ } pal_init(); -#ifdef INITRD_IMAGE_SIZE /* The initrd must be page-aligned. See below for the cause of the magic number 5. */ - initrd_start = ((START_ADDR + 5*KERNEL_SIZE) | (PAGE_SIZE-1)) + 1; + initrd_start = ((START_ADDR + 5*KERNEL_SIZE + PAGE_SIZE) | + (PAGE_SIZE-1)) + 1; +#ifdef INITRD_IMAGE_SIZE srm_printk("Initrd positioned at %#lx\n", initrd_start); #endif + + /* + * Move the stack to a safe place to ensure it won't be + * overwritten by kernel image. + */ + move_stack(initrd_start - PAGE_SIZE); nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval)); if (nbytes < 0 || nbytes >= sizeof(envval)) { diff -Nru a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c --- a/arch/alpha/boot/bootpz.c 2004-11-10 17:19:02 -08:00 +++ b/arch/alpha/boot/bootpz.c 2004-11-10 17:19:02 -08:00 @@ -41,9 +41,6 @@ #undef DEBUG_ADDRESSES #undef DEBUG_LAST_STEPS -#define DEBUG_SP(x) \ - {register long sp asm("30"); srm_printk("%s (sp=%lx)\n", x, sp);} - extern unsigned long switch_to_osf_pal(unsigned long nr, struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa, unsigned long *vptb); @@ -51,6 +48,8 @@ extern int decompress_kernel(void* destination, void *source, size_t ksize, size_t kzsize); +extern void move_stack(unsigned long new_stack); + struct hwrpb_struct *hwrpb = INIT_HWRPB; static struct pcb_struct pcb_va[1]; @@ -163,12 +162,10 @@ runkernel(void) { __asm__ __volatile__( - "bis %1,%1,$30\n\t" "bis %0,%0,$27\n\t" "jmp ($27)" : /* no outputs: it doesn't even return */ - : "r" (START_ADDR), - "r" (PAGE_SIZE + INIT_STACK)); + : "r" (START_ADDR)); } /* Must record the SP (it is virtual) on entry, so we can make sure @@ -253,7 +250,9 @@ for "bootmem" anyway. */ #define K_COPY_IMAGE_START NEXT_PAGE(K_KERNEL_IMAGE_END) -#define K_INITRD_START NEXT_PAGE(K_COPY_IMAGE_START + KERNEL_SIZE) +/* Reserve one page below INITRD for the new stack. */ +#define K_INITRD_START \ + NEXT_PAGE(K_COPY_IMAGE_START + KERNEL_SIZE + PAGE_SIZE) #define K_COPY_IMAGE_END \ (K_INITRD_START + REAL_INITRD_SIZE + MALLOC_AREA_SIZE) #define K_COPY_IMAGE_SIZE \ @@ -419,8 +418,7 @@ initrd_image_start, INITRD_IMAGE_SIZE); #endif - memcpy((void *)initrd_image_start, - (void *)V_INITRD_START, + memcpy((void *)initrd_image_start, (void *)V_INITRD_START, INITRD_IMAGE_SIZE); #endif /* INITRD_IMAGE_SIZE */ @@ -436,9 +434,14 @@ K_KERNEL_IMAGE_START, (unsigned)KERNEL_SIZE); #endif + /* + * Move the stack to a safe place to ensure it won't be + * overwritten by kernel image. + */ + move_stack(initrd_image_start - PAGE_SIZE); + memcpy((void *)K_KERNEL_IMAGE_START, - (void *)uncompressed_image_start, - KERNEL_SIZE); + (void *)uncompressed_image_start, KERNEL_SIZE); } /* Clear the zero page, then move the argument list in. */ diff -Nru a/arch/alpha/boot/head.S b/arch/alpha/boot/head.S --- a/arch/alpha/boot/head.S 2004-11-10 17:19:06 -08:00 +++ b/arch/alpha/boot/head.S 2004-11-10 17:19:06 -08:00 @@ -100,3 +100,24 @@ .prologue 0 call_pal PAL_halt .end halt + +/* $16 - new stack page */ + .align 3 + .globl move_stack + .ent move_stack +move_stack: + .prologue 0 + lda $0, 0x1fff($31) + and $0, $30, $1 /* Stack offset */ + or $1, $16, $16 /* New stack pointer */ + mov $30, $1 + mov $16, $2 +1: ldq $3, 0($1) /* Move the stack */ + addq $1, 8, $1 + stq $3, 0($2) + and $0, $1, $4 + addq $2, 8, $2 + bne $4, 1b + mov $16, $30 + ret ($26) + .end move_stack diff -Nru a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c --- a/arch/alpha/boot/misc.c 2004-11-10 17:19:04 -08:00 +++ b/arch/alpha/boot/misc.c 2004-11-10 17:19:04 -08:00 @@ -205,15 +205,3 @@ /* puts(" done, booting the kernel.\n"); */ return output_ptr; } - -/* dummy-up printk */ -asmlinkage int printk(const char *fmt, ...) -{ - va_list args; - long ret; - - va_start(args, fmt); - ret = srm_printk(fmt, args); - va_end(args); - return ret; -} diff -Nru a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c --- a/arch/alpha/kernel/alpha_ksyms.c 2004-11-10 17:19:02 -08:00 +++ b/arch/alpha/kernel/alpha_ksyms.c 2004-11-10 17:19:02 -08:00 @@ -185,7 +185,7 @@ EXPORT_SYMBOL(smp_num_cpus); EXPORT_SYMBOL(smp_call_function); EXPORT_SYMBOL(smp_call_function_on_cpu); -EXPORT_SYMBOL(atomic_dec_and_lock); +EXPORT_SYMBOL(_atomic_dec_and_lock); #ifdef CONFIG_DEBUG_SPINLOCK EXPORT_SYMBOL(_raw_spin_unlock); EXPORT_SYMBOL(debug_spin_lock); diff -Nru a/arch/alpha/lib/csum_partial_copy.c b/arch/alpha/lib/csum_partial_copy.c --- a/arch/alpha/lib/csum_partial_copy.c 2004-11-10 17:19:04 -08:00 +++ b/arch/alpha/lib/csum_partial_copy.c 2004-11-10 17:19:04 -08:00 @@ -251,7 +251,8 @@ * look at this too closely, you'll go blind. */ static inline unsigned long -csum_partial_cfu_unaligned(const unsigned long * src, unsigned long * dst, +csum_partial_cfu_unaligned(const unsigned long __user * src, + unsigned long * dst, unsigned long soff, unsigned long doff, long len, unsigned long checksum, unsigned long partial_dest, @@ -383,7 +384,8 @@ } unsigned int -csum_partial_copy_nocheck(const char *src, char *dst, int len, unsigned int sum) +csum_partial_copy_nocheck(const char __user *src, char *dst, int len, + unsigned int sum) { return do_csum_partial_copy_from_user(src, dst, len, sum, NULL); } diff -Nru a/arch/alpha/lib/dec_and_lock.c b/arch/alpha/lib/dec_and_lock.c --- a/arch/alpha/lib/dec_and_lock.c 2004-11-10 17:19:03 -08:00 +++ b/arch/alpha/lib/dec_and_lock.c 2004-11-10 17:19:03 -08:00 @@ -9,10 +9,10 @@ #include asm (".text \n\ - .global atomic_dec_and_lock \n\ - .ent atomic_dec_and_lock \n\ + .global _atomic_dec_and_lock \n\ + .ent _atomic_dec_and_lock \n\ .align 4 \n\ -atomic_dec_and_lock: \n\ +_atomic_dec_and_lock: \n\ .prologue 0 \n\ 1: ldl_l $1, 0($16) \n\ subl $1, 1, $1 \n\ @@ -28,7 +28,7 @@ .subsection 2 \n\ 4: br 1b \n\ .previous \n\ - .end atomic_dec_and_lock"); + .end _atomic_dec_and_lock"); static int __attribute_used__ atomic_dec_and_lock_1(atomic_t *atomic, spinlock_t *lock) diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig --- a/arch/arm/Kconfig 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/Kconfig 2004-11-10 17:19:04 -08:00 @@ -162,10 +162,10 @@ config ARCH_OMAP bool "TI OMAP" -config ARCH_VERSATILE_PB - bool "Versatile PB" +config ARCH_VERSATILE + bool "Versatile" help - This enables support for ARM Ltd Versatile PB board. + This enables support for ARM Ltd Versatile board. config ARCH_IMX bool "IMX" @@ -205,6 +205,8 @@ source "arch/arm/mach-h720x/Kconfig" +source "arch/arm/mach-versatile/Kconfig" + # Definitions to make life easier config ARCH_ACORN bool @@ -287,9 +289,14 @@ depends on ARCH_INTEGRATOR default y +config ICST307 + bool + depends on ARCH_VERSATILE + default y + config ARM_AMBA bool - depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB + depends on ARCH_INTEGRATOR || ARCH_VERSATILE default y config ISA @@ -336,6 +343,50 @@ while the decompressor is running. Unless you have special requirements, you should not change this value. +config XIP_KERNEL + bool "Kernel Execute-In-Place from ROM" + depends on !ZBOOT_ROM + help + Execute-In-Place allows the kernel to run from non-volatile storage + directly addressable by the CPU, such as NOR flash. This saves RAM + space since the text section of the kernel is not loaded from flash + to RAM. Read-write sections, such as the data section and stack, + are still copied to RAM. The XIP kernel is not compressed since + it has to run directly from flash, so it will take more space to + store it. The flash address used to link the kernel object files, + and for storing it, is configuration dependent. Therefore, if you + say Y here, you must know the proper physical address where to + store the kernel image depending on your own flash memory usage. + + Also note that the make target becomes "make xipImage" rather than + "make zImage" or "make Image". The final kernel binary to put in + ROM memory will be arch/arm/boot/xipImage. + + If unsure, say N. + +config XIP_PHYS_ADDR + hex "XIP Kernel Physical Location" + depends on XIP_KERNEL + default "0x00080000" + help + This is the physical address in your flash memory the kernel will + be linked for and stored to. This address is dependent on your + own flash usage. + + Please note that, if you're using MTD, you must use a flash chip + that is NOT handled by MTD or the flash will be turned into non + data mode for status and query purposes which will instantaneously + crash the kernel. + + MTD can however be used with a XIP kernel on the same flash chip + but only if the flash memory supports multiple partitions in + hardware, like with the Intel K3 flash parts, and only if the + kernel is not stored within the firrst hardware partition of the + chip. + + In any case, make sure that MTD support is configured out for + the first attempt. + if (ARCH_SA1100 || ARCH_INTEGRATOR) config CPU_FREQ @@ -547,7 +598,7 @@ config LEDS bool "Timer and CPU usage LEDs" - depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE_PB || ARCH_IMX + depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE || ARCH_IMX help If you say Y here, the LEDs on your machine will be used to provide useful information about your current system status. @@ -560,8 +611,8 @@ system, but the driver will do nothing. config LEDS_TIMER - bool "Timer LED" if LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || MACH_MAINSTONE || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE_PB || ARCH_IMX) - depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE_PB || ARCH_IMX + bool "Timer LED" if LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || MACH_MAINSTONE || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX) + depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE || ARCH_IMX default y if ARCH_EBSA110 help If you say Y here, one of the system LEDs (the green one on the @@ -576,7 +627,7 @@ config LEDS_CPU bool "CPU usage LED" - depends on LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE_PB || ARCH_IMX) + depends on LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX) help If you say Y here, the red LED will be used to give a good real time indication of CPU usage, by lighting whenever the idle task diff -Nru a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug --- a/arch/arm/Kconfig.debug 2004-11-10 17:19:07 -08:00 +++ b/arch/arm/Kconfig.debug 2004-11-10 17:19:07 -08:00 @@ -104,12 +104,15 @@ before it is used. config DEBUG_S3C2410_UART - depends on DEBUG_LL && ARCH_S3C2410 - int "S3C2410 UART to use for low-level debug" + depends on ARCH_S3C2410 + int "S3C2410 UART to use for low-level messages and debug" default "0" help Choice for UART for kernel low-level using S3C2410 UARTS, should be between zero and two. The port must have been initalised by the boot-loader before use. + + This will affect the port that the uncompressor code uses + to send debug information to. endmenu diff -Nru a/arch/arm/Makefile b/arch/arm/Makefile --- a/arch/arm/Makefile 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/Makefile 2004-11-10 17:19:04 -08:00 @@ -13,6 +13,10 @@ GZFLAGS :=-9 #CFLAGS +=-pipe +# Do not use arch/arm/defconfig - it's always outdated. +# Select a platform tht is kept up-to-date +KBUILD_DEFCONFIG := versatile_defconfig + ifeq ($(CONFIG_FRAME_POINTER),y) CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog endif @@ -54,14 +58,13 @@ tune-$(CONFIG_CPU_V6) :=-mtune=strongarm # Need -Uarm for gcc < 3.x -CFLAGS +=-mapcs-32 $(arch-y) $(tune-y) $(call cc-option,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm -AFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float +CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) +CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm +AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float CHECKFLAGS += -D__arm__ #Default value -DATAADDR := . - head-y := arch/arm/kernel/head.o arch/arm/kernel/init_task.o textaddr-y := 0xC0008000 @@ -93,7 +96,7 @@ machine-$(CONFIG_ARCH_OMAP) := omap machine-$(CONFIG_ARCH_S3C2410) := s3c2410 machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x - machine-$(CONFIG_ARCH_VERSATILE_PB) := versatile + machine-$(CONFIG_ARCH_VERSATILE) := versatile machine-$(CONFIG_ARCH_IMX) := imx machine-$(CONFIG_ARCH_H720X) := h720x @@ -105,6 +108,16 @@ endif TEXTADDR := $(textaddr-y) +ifeq ($(CONFIG_XIP_KERNEL),y) + DATAADDR := $(TEXTADDR) + xipaddr-$(CONFIG_ARCH_CO285) := 0x5f000000 + xipaddr-y ?= 0xbf000000 + # Replace phys addr with virt addr while keeping offset from base. + TEXTADDR := $(shell echo $(CONFIG_XIP_PHYS_ADDR) $(xipaddr-y) | \ + awk --non-decimal-data '/[:xdigit:]/ \ + { printf("0x%x\n", and($$1, 0x000fffff) + $$2) }' ) +endif + ifeq ($(incdir-y),) incdir-y := $(machine-y) endif @@ -115,7 +128,7 @@ MACHINE := endif -export TEXTADDR GZFLAGS +export TEXTADDR DATAADDR GZFLAGS # Do we have FASTFPE? FASTFPE :=arch/arm/fastfpe @@ -137,7 +150,11 @@ libs-y += arch/arm/lib/ # Default target when executing plain make +ifeq ($(CONFIG_XIP_KERNEL),y) +all: xipImage +else all: zImage +endif boot := arch/arm/boot @@ -164,7 +181,7 @@ # Convert bzImage to zImage bzImage: zImage -zImage Image bootpImage uImage: vmlinux +zImage Image xipImage bootpImage uImage: vmlinux $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ zinstall install: vmlinux @@ -190,6 +207,7 @@ define archhelp echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' + echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)' echo ' bootpImage - Combined zImage and initial RAM disk' echo ' (supply initrd image via make variable INITRD=)' echo ' install - Install uncompressed kernel' diff -Nru a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile --- a/arch/arm/boot/Makefile 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/boot/Makefile 2004-11-10 17:19:02 -08:00 @@ -24,7 +24,24 @@ export ZRELADDR INITRD_PHYS PARAMS_PHYS -targets := Image zImage bootpImage uImage +targets := Image zImage xipImage bootpImage uImage + +ifeq ($(CONFIG_XIP_KERNEL),y) + +$(obj)/xipImage: vmlinux FORCE + $(call if_changed,objcopy) + @echo ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' + +$(obj)/Image $(obj)/zImage: FORCE + @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)' + @echo 'Only the xipImage target is available in this case' + @false + +else + +$(obj)/xipImage: FORCE + @echo 'Kernel not configured for XIP (CONFIG_XIP_KERNEL!=y)' + @false $(obj)/Image: vmlinux FORCE $(call if_changed,objcopy) @@ -36,6 +53,8 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE $(call if_changed,objcopy) @echo ' Kernel: $@ is ready' + +endif quiet_cmd_uimage = UIMAGE $@ cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \ diff -Nru a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S --- a/arch/arm/boot/compressed/head.S 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/boot/compressed/head.S 2004-11-10 17:19:06 -08:00 @@ -117,6 +117,15 @@ .macro writeb, rb str \rb, [r3, #0] .endm +#elif defined(CONFIG_ARCH_S3C2410) +#include + .macro loadsp, rb + mov \rb, #0x50000000 + add \rb, \rb, #0x4000 * CONFIG_DEBUG_S3C2410_UART + .endm + .macro writeb, rb + strb \rb, [r3, #0x20] + .endm #else #error no serial architecture defined #endif diff -Nru a/arch/arm/common/Makefile b/arch/arm/common/Makefile --- a/arch/arm/common/Makefile 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/common/Makefile 2004-11-10 17:19:04 -08:00 @@ -5,6 +5,7 @@ obj-y += rtctime.o obj-$(CONFIG_ARM_AMBA) += amba.o obj-$(CONFIG_ICST525) += icst525.o +obj-$(CONFIG_ICST307) += icst307.o obj-$(CONFIG_SA1111) += sa1111.o obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o obj-$(CONFIG_DMABOUNCE) += dmabounce.o diff -Nru a/arch/arm/common/amba.c b/arch/arm/common/amba.c --- a/arch/arm/common/amba.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/common/amba.c 2004-11-10 17:19:04 -08:00 @@ -194,7 +194,7 @@ int amba_device_register(struct amba_device *dev, struct resource *parent) { u32 pid, cid; - void *tmp; + void __iomem *tmp; int i, ret; dev->dev.release = amba_device_release; diff -Nru a/arch/arm/common/icst307.c b/arch/arm/common/icst307.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/common/icst307.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,161 @@ +/* + * linux/arch/arm/common/icst307.c + * + * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Support functions for calculating clocks/divisors for the ICST307 + * clock generators. See http://www.icst.com/ for more information + * on these devices. + * + * This is an almost identical implementation to the ICST525 clock generator. + * The s2div and idx2s files are different + */ +#include +#include + +#include + +/* + * Divisors for each OD setting. + */ +static unsigned char s2div[8] = { 10, 2, 8, 4, 5, 7, 3, 6 }; + +unsigned long icst307_khz(const struct icst307_params *p, struct icst307_vco vco) +{ + return p->ref * 2 * (vco.v + 8) / ((vco.r + 2) * s2div[vco.s]); +} + +EXPORT_SYMBOL(icst307_khz); + +/* + * Ascending divisor S values. + */ +static unsigned char idx2s[8] = { 1, 6, 3, 4, 7, 5, 2, 0 }; + +struct icst307_vco +icst307_khz_to_vco(const struct icst307_params *p, unsigned long freq) +{ + struct icst307_vco vco = { .s = 1, .v = p->vd_max, .r = p->rd_max }; + unsigned long f; + unsigned int i = 0, rd, best = (unsigned int)-1; + + /* + * First, find the PLL output divisor such + * that the PLL output is within spec. + */ + do { + f = freq * s2div[idx2s[i]]; + + /* + * f must be between 6MHz and 200MHz (3.3 or 5V) + */ + if (f > 6000 && f <= p->vco_max) + break; + } while (i < ARRAY_SIZE(idx2s)); + + if (i > ARRAY_SIZE(idx2s)) + return vco; + + vco.s = idx2s[i]; + + /* + * Now find the closest divisor combination + * which gives a PLL output of 'f'. + */ + for (rd = p->rd_min; rd <= p->rd_max; rd++) { + unsigned long fref_div, f_pll; + unsigned int vd; + int f_diff; + + fref_div = (2 * p->ref) / rd; + + vd = (f + fref_div / 2) / fref_div; + if (vd < p->vd_min || vd > p->vd_max) + continue; + + f_pll = fref_div * vd; + f_diff = f_pll - f; + if (f_diff < 0) + f_diff = -f_diff; + + if ((unsigned)f_diff < best) { + vco.v = vd - 8; + vco.r = rd - 2; + if (f_diff == 0) + break; + best = f_diff; + } + } + + return vco; +} + +EXPORT_SYMBOL(icst307_khz_to_vco); + +struct icst307_vco +icst307_ps_to_vco(const struct icst307_params *p, unsigned long period) +{ + struct icst307_vco vco = { .s = 1, .v = p->vd_max, .r = p->rd_max }; + unsigned long f, ps; + unsigned int i = 0, rd, best = (unsigned int)-1; + + ps = 1000000000UL / p->vco_max; + + /* + * First, find the PLL output divisor such + * that the PLL output is within spec. + */ + do { + f = period / s2div[idx2s[i]]; + + /* + * f must be between 6MHz and 200MHz (3.3 or 5V) + */ + if (f >= ps && f < 1000000000UL / 6000 + 1) + break; + } while (i < ARRAY_SIZE(idx2s)); + + if (i > ARRAY_SIZE(idx2s)) + return vco; + + vco.s = idx2s[i]; + + ps = 500000000UL / p->ref; + + /* + * Now find the closest divisor combination + * which gives a PLL output of 'f'. + */ + for (rd = p->rd_min; rd <= p->rd_max; rd++) { + unsigned long f_in_div, f_pll; + unsigned int vd; + int f_diff; + + f_in_div = ps * rd; + + vd = (f_in_div + f / 2) / f; + if (vd < p->vd_min || vd > p->vd_max) + continue; + + f_pll = (f_in_div + vd / 2) / vd; + f_diff = f_pll - f; + if (f_diff < 0) + f_diff = -f_diff; + + if ((unsigned)f_diff < best) { + vco.v = vd - 8; + vco.r = rd - 2; + if (f_diff == 0) + break; + best = f_diff; + } + } + + return vco; +} + +EXPORT_SYMBOL(icst307_ps_to_vco); diff -Nru a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c --- a/arch/arm/common/locomo.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/common/locomo.c 2004-11-10 17:19:02 -08:00 @@ -609,17 +609,15 @@ static int locomo_probe(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); - struct resource *mem = NULL, *irq = NULL; - int i; + struct resource *mem; + int irq; - for (i = 0; i < pdev->num_resources; i++) { - if (pdev->resource[i].flags & IORESOURCE_MEM) - mem = &pdev->resource[i]; - if (pdev->resource[i].flags & IORESOURCE_IRQ) - irq = &pdev->resource[i]; - } + mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!mem) + return -EINVAL; + irq = platform_get_irq(pdev, 0); - return __locomo_probe(dev, mem, irq ? irq->start : NO_IRQ); + return __locomo_probe(dev, mem, irq); } static int locomo_remove(struct device *dev) @@ -756,7 +754,7 @@ MODULE_DESCRIPTION("Sharp LoCoMo core driver"); MODULE_LICENSE("GPL"); -MODULE_AUTHOR("John Lenz "); +MODULE_AUTHOR("John Lenz "); EXPORT_SYMBOL(locomo_driver_register); EXPORT_SYMBOL(locomo_driver_unregister); diff -Nru a/arch/arm/common/rtctime.c b/arch/arm/common/rtctime.c --- a/arch/arm/common/rtctime.c 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/common/rtctime.c 2004-11-10 17:19:03 -08:00 @@ -147,15 +147,23 @@ return ops->set_time(tm); } -static inline void rtc_read_alarm(struct rtc_ops *ops, struct rtc_wkalrm *alrm) +static inline int rtc_read_alarm(struct rtc_ops *ops, struct rtc_wkalrm *alrm) { - memset(alrm, 0, sizeof(struct rtc_wkalrm)); - ops->read_alarm(alrm); + int ret = -EINVAL; + if (ops->read_alarm) { + memset(alrm, 0, sizeof(struct rtc_wkalrm)); + ops->read_alarm(alrm); + ret = 0; + } + return ret; } static inline int rtc_set_alarm(struct rtc_ops *ops, struct rtc_wkalrm *alrm) { - return ops->set_alarm(alrm); + int ret = -EINVAL; + if (ops->set_alarm) + ret = ops->set_alarm(alrm); + return ret; } void rtc_update(unsigned long num, unsigned long events) @@ -233,11 +241,13 @@ struct rtc_ops *ops = file->private_data; struct rtc_time tm; struct rtc_wkalrm alrm; - int ret; + int ret = -EINVAL; switch (cmd) { case RTC_ALM_READ: - rtc_read_alarm(ops, &alrm); + ret = rtc_read_alarm(ops, &alrm); + if (ret) + break; ret = copy_to_user((void *)arg, &alrm.time, sizeof(tm)); if (ret) ret = -EFAULT; @@ -245,6 +255,10 @@ case RTC_ALM_SET: ret = copy_from_user(&alrm.time, (void *)arg, sizeof(tm)); + if (ret) { + ret = -EFAULT; + break; + } alrm.enabled = 0; alrm.pending = 0; alrm.time.tm_mday = -1; @@ -253,10 +267,7 @@ alrm.time.tm_wday = -1; alrm.time.tm_yday = -1; alrm.time.tm_isdst = -1; - if (ret == 0) - ret = rtc_set_alarm(ops, &alrm); - else - ret = -EFAULT; + ret = rtc_set_alarm(ops, &alrm); break; case RTC_RD_TIME: @@ -278,8 +289,8 @@ ret = -EFAULT; break; -#ifndef rtc_epoch case RTC_EPOCH_SET: +#ifndef rtc_epoch /* * There were no RTC clocks before 1900. */ @@ -293,8 +304,8 @@ } rtc_epoch = arg; ret = 0; - break; #endif + break; case RTC_EPOCH_READ: ret = put_user(rtc_epoch, (unsigned long *)arg); @@ -302,21 +313,26 @@ case RTC_WKALM_SET: ret = copy_from_user(&alrm, (void *)arg, sizeof(alrm)); - if (ret == 0) - ret = rtc_set_alarm(ops, &alrm); - else + if (ret) { ret = -EFAULT; + break; + } + ret = rtc_set_alarm(ops, &alrm); break; case RTC_WKALM_RD: - rtc_read_alarm(ops, &alrm); + ret = rtc_read_alarm(ops, &alrm); + if (ret) + break; ret = copy_to_user((void *)arg, &alrm, sizeof(alrm)); if (ret) ret = -EFAULT; break; default: - ret = ops->ioctl(cmd, arg); + if (ops->ioctl) + ret = ops->ioctl(cmd, arg); + break; } return ret; } @@ -406,36 +422,39 @@ tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, rtc_epoch); - rtc_read_alarm(ops, &alrm); - p += sprintf(p, "alrm_time\t: "); - if ((unsigned int)alrm.time.tm_hour <= 24) - p += sprintf(p, "%02d:", alrm.time.tm_hour); - else - p += sprintf(p, "**:"); - if ((unsigned int)alrm.time.tm_min <= 59) - p += sprintf(p, "%02d:", alrm.time.tm_min); - else - p += sprintf(p, "**:"); - if ((unsigned int)alrm.time.tm_sec <= 59) - p += sprintf(p, "%02d\n", alrm.time.tm_sec); - else - p += sprintf(p, "**\n"); - - p += sprintf(p, "alrm_date\t: "); - if ((unsigned int)alrm.time.tm_year <= 200) - p += sprintf(p, "%04d-", alrm.time.tm_year + 1900); - else - p += sprintf(p, "****-"); - if ((unsigned int)alrm.time.tm_mon <= 11) - p += sprintf(p, "%02d-", alrm.time.tm_mon + 1); - else - p += sprintf(p, "**-"); - if ((unsigned int)alrm.time.tm_mday <= 31) - p += sprintf(p, "%02d\n", alrm.time.tm_mday); - else - p += sprintf(p, "**\n"); - p += sprintf(p, "alrm_wakeup\t: %s\n", alrm.enabled ? "yes" : "no"); - p += sprintf(p, "alrm_pending\t: %s\n", alrm.pending ? "yes" : "no"); + if (rtc_read_alarm(ops, &alrm) == 0) { + p += sprintf(p, "alrm_time\t: "); + if ((unsigned int)alrm.time.tm_hour <= 24) + p += sprintf(p, "%02d:", alrm.time.tm_hour); + else + p += sprintf(p, "**:"); + if ((unsigned int)alrm.time.tm_min <= 59) + p += sprintf(p, "%02d:", alrm.time.tm_min); + else + p += sprintf(p, "**:"); + if ((unsigned int)alrm.time.tm_sec <= 59) + p += sprintf(p, "%02d\n", alrm.time.tm_sec); + else + p += sprintf(p, "**\n"); + + p += sprintf(p, "alrm_date\t: "); + if ((unsigned int)alrm.time.tm_year <= 200) + p += sprintf(p, "%04d-", alrm.time.tm_year + 1900); + else + p += sprintf(p, "****-"); + if ((unsigned int)alrm.time.tm_mon <= 11) + p += sprintf(p, "%02d-", alrm.time.tm_mon + 1); + else + p += sprintf(p, "**-"); + if ((unsigned int)alrm.time.tm_mday <= 31) + p += sprintf(p, "%02d\n", alrm.time.tm_mday); + else + p += sprintf(p, "**\n"); + p += sprintf(p, "alrm_wakeup\t: %s\n", + alrm.enabled ? "yes" : "no"); + p += sprintf(p, "alrm_pending\t: %s\n", + alrm.pending ? "yes" : "no"); + } if (ops->proc) p += ops->proc(p); diff -Nru a/arch/arm/configs/bast_defconfig b/arch/arm/configs/bast_defconfig --- a/arch/arm/configs/bast_defconfig 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/configs/bast_defconfig 2004-11-10 17:19:04 -08:00 @@ -1,31 +1,35 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1-bk2 +# Wed Oct 27 11:31:14 2004 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y # CONFIG_CLEAN_COMPILE is not set -CONFIG_STANDALONE=y CONFIG_BROKEN=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=17 +CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -33,11 +37,9 @@ # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -46,6 +48,7 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -60,6 +63,7 @@ # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set @@ -69,14 +73,29 @@ # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set # CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # -# S3C2410 Implementations +# S3C24XX Implementations # CONFIG_ARCH_BAST=y -# CONFIG_ARCH_H1940 is not set -# CONFIG_ARCH_SMDK2410 is not set +CONFIG_ARCH_H1940=y +CONFIG_ARCH_SMDK2410=y CONFIG_MACH_VR1000=y +CONFIG_CPU_S3C2410=y + +# +# S3C2410 Setup +# +CONFIG_S3C2410_DMA=y +# CONFIG_S3C2410_DMA_DEBUG is not set +# CONFIG_S3C2410_PM_DEBUG is not set +# CONFIG_S3C2410_PM_CHECK is not set + +# +# h720x Implementations +# # # Processor Type @@ -108,9 +127,8 @@ # At least one math emulation must be selected # CONFIG_FPE_NWFPE=y -CONFIG_FPE_NWFPE_XP=y +# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set @@ -118,13 +136,13 @@ # # Generic Driver Options # +CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_PM is not set +CONFIG_PM=y # CONFIG_PREEMPT is not set +CONFIG_APM=y # CONFIG_ARTHUR is not set -CONFIG_S3C2410_DMA=y -# CONFIG_S3C2410_DMA_DEBUG is not set CONFIG_CMDLINE="root=/dev/hda1 ro init=/bin/bash console=ttySAC0" CONFIG_ALIGNMENT_TRAP=y @@ -164,9 +182,20 @@ # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set # CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set @@ -179,11 +208,13 @@ # CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_ARM_INTEGRATOR is not set # CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_BAST is not set # # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set @@ -214,6 +245,16 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # Multi-device support (RAID and LVM) @@ -246,6 +287,7 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -338,13 +380,13 @@ CONFIG_BLK_DEV_IDETAPE=m CONFIG_BLK_DEV_IDEFLOPPY=m # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y # CONFIG_IDE_ARM is not set +CONFIG_BLK_DEV_IDE_BAST=y # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set # CONFIG_BLK_DEV_HD is not set @@ -395,16 +437,16 @@ # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PARKBD is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set # CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set @@ -431,8 +473,6 @@ # CONFIG_DIGI is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -# CONFIG_SYNCLINK is not set # CONFIG_SYNCLINKMP is not set # CONFIG_N_HDLC is not set # CONFIG_RISCOM8 is not set @@ -459,7 +499,7 @@ # CONFIG_SERIAL_S3C2410=y CONFIG_SERIAL_S3C2410_CONSOLE=y -# CONFIG_SERIAL_BAST_SIO is not set +CONFIG_SERIAL_BAST_SIO=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y @@ -469,7 +509,6 @@ # CONFIG_LP_CONSOLE is not set CONFIG_PPDEV=y # CONFIG_TIPAR is not set -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -492,12 +531,9 @@ # CONFIG_DTLK is not set # CONFIG_R3964 is not set - # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set @@ -512,35 +548,41 @@ # CONFIG_I2C_ALGOBIT=m # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support # -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set # CONFIG_I2C_ISA is not set # CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PARPORT_LIGHT is not set +CONFIG_I2C_S3C2410=y # CONFIG_SCx200_ACB is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set # # Hardware Sensors Chip support # CONFIG_I2C_SENSOR=m # CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_IT87 is not set CONFIG_SENSORS_LM75=m +# CONFIG_SENSORS_LM77 is not set CONFIG_SENSORS_LM78=m # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set CONFIG_SENSORS_LM85=m +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set # CONFIG_SENSORS_W83627HF is not set @@ -628,9 +670,14 @@ # CONFIG_EFS_FS is not set CONFIG_JFFS_FS=y CONFIG_JFFS_FS_VERBOSE=0 +# CONFIG_JFFS_PROC_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -651,6 +698,7 @@ # CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -661,13 +709,7 @@ # Partition Types # CONFIG_PARTITION_ADVANCED=y -CONFIG_ACORN_PARTITION=y -CONFIG_ACORN_PARTITION_CUMANA=y -CONFIG_ACORN_PARTITION_EESOX=y -CONFIG_ACORN_PARTITION_ICS=y -CONFIG_ACORN_PARTITION_ADFS=y -CONFIG_ACORN_PARTITION_POWERTEC=y -CONFIG_ACORN_PARTITION_RISCIX=y +# CONFIG_ACORN_PARTITION is not set # CONFIG_OSF_PARTITION is not set # CONFIG_AMIGA_PARTITION is not set # CONFIG_ATARI_PARTITION is not set @@ -736,13 +778,14 @@ # Graphics support # CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_VIRTUAL is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y # CONFIG_FRAMEBUFFER_CONSOLE is not set @@ -763,6 +806,9 @@ # # USB support # +# CONFIG_USB is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -770,17 +816,24 @@ # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_INFO=y CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set # CONFIG_MAGIC_SYSRQ is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_DEBUG_INFO=y +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set # CONFIG_DEBUG_ERRORS is not set CONFIG_DEBUG_LL=y # CONFIG_DEBUG_ICEDCC is not set @@ -790,6 +843,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig --- a/arch/arm/configs/s3c2410_defconfig 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/configs/s3c2410_defconfig 2004-11-10 17:19:03 -08:00 @@ -1,10 +1,13 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1-bk2 +# Wed Oct 27 11:30:39 2004 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options @@ -17,6 +20,7 @@ # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -25,6 +29,7 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -32,11 +37,9 @@ # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -45,6 +48,7 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -59,6 +63,7 @@ # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set @@ -68,20 +73,29 @@ # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set # CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # -# S3C2410 Implementations +# S3C24XX Implementations # CONFIG_ARCH_BAST=y CONFIG_ARCH_H1940=y CONFIG_ARCH_SMDK2410=y CONFIG_MACH_VR1000=y +CONFIG_CPU_S3C2410=y # # S3C2410 Setup # CONFIG_S3C2410_DMA=y # CONFIG_S3C2410_DMA_DEBUG is not set +# CONFIG_S3C2410_PM_DEBUG is not set +# CONFIG_S3C2410_PM_CHECK is not set + +# +# h720x Implementations +# # # Processor Type @@ -113,9 +127,8 @@ # At least one math emulation must be selected # CONFIG_FPE_NWFPE=y -CONFIG_FPE_NWFPE_XP=y +# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set @@ -126,8 +139,9 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_PM is not set +CONFIG_PM=y # CONFIG_PREEMPT is not set +CONFIG_APM=y # CONFIG_ARTHUR is not set CONFIG_CMDLINE="root=/dev/hda1 ro init=/bin/bash console=ttySAC0" CONFIG_ALIGNMENT_TRAP=y @@ -194,6 +208,7 @@ # CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_ARM_INTEGRATOR is not set # CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_BAST is not set # # Self-contained MTD device drivers @@ -230,6 +245,16 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # Multi-device support (RAID and LVM) @@ -262,6 +287,7 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -354,13 +380,13 @@ CONFIG_BLK_DEV_IDETAPE=m CONFIG_BLK_DEV_IDEFLOPPY=m # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y # CONFIG_IDE_ARM is not set +# CONFIG_BLK_DEV_IDE_BAST is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set # CONFIG_BLK_DEV_HD is not set @@ -411,10 +437,10 @@ # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PARKBD is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -483,7 +509,6 @@ # CONFIG_LP_CONSOLE is not set CONFIG_PPDEV=y # CONFIG_TIPAR is not set -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -509,7 +534,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set @@ -524,16 +548,18 @@ # CONFIG_I2C_ALGOBIT=m # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support # -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set # CONFIG_I2C_ISA is not set # CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PARPORT_LIGHT is not set +CONFIG_I2C_S3C2410=y # CONFIG_SCx200_ACB is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set # # Hardware Sensors Chip support @@ -553,8 +579,10 @@ # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set CONFIG_SENSORS_LM85=m +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set # CONFIG_SENSORS_W83627HF is not set @@ -670,6 +698,7 @@ # CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -749,13 +778,14 @@ # Graphics support # CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_VIRTUAL is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y # CONFIG_FRAMEBUFFER_CONSOLE is not set @@ -776,6 +806,9 @@ # # USB support # +# CONFIG_USB is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set # # USB Gadget Support @@ -783,17 +816,24 @@ # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_INFO=y CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set # CONFIG_MAGIC_SYSRQ is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_DEBUG_INFO=y +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set # CONFIG_DEBUG_ERRORS is not set CONFIG_DEBUG_LL=y # CONFIG_DEBUG_ICEDCC is not set @@ -803,6 +843,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/arm/defconfig b/arch/arm/defconfig --- a/arch/arm/defconfig 2004-11-10 17:19:03 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,510 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set -CONFIG_UID16=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -# CONFIG_OBSOLETE is not set - -# -# Loadable module support -# -# CONFIG_MODULES is not set - -# -# System Type -# -# CONFIG_ARCH_ARCA5K is not set -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -CONFIG_ARCH_INTEGRATOR=y -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_CLPS711X is not set - -# -# Archimedes/A5000 Implementations -# - -# -# Footbridge Implementations -# - -# -# SA11x0 Implementations -# - -# -# CLPS711X/EP721X Implementations -# -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set -CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set - -# -# Processor Type -# -CONFIG_CPU_32v4=y -CONFIG_CPU_ARM720=y -CONFIG_CPU_ARM920=y -CONFIG_CPU_ARM920_CPU_IDLE=y -CONFIG_CPU_ARM920_I_CACHE_ON=y -CONFIG_CPU_ARM920_D_CACHE_ON=y -# CONFIG_CPU_ARM920_WRITETHROUGH is not set -# CONFIG_DISCONTIGMEM is not set - -# -# General setup -# -# CONFIG_ANGELBOOT is not set -CONFIG_PCI_INTEGRATOR=y -CONFIG_PCI=y -# CONFIG_ISA is not set -# CONFIG_ISA_DMA is not set -CONFIG_PCI_NAMES=y -# CONFIG_HOTPLUG is not set -# CONFIG_PCMCIA is not set -CONFIG_NET=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -CONFIG_NWFPE=y -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=y -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=1f04 mem=32M" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DOC1000 is not set -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOCPROBE is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_MTDRAM is not set - -# -# MTD drivers for mapped chips -# -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_JEDEC is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_PHYSMAP is not set - -# -# Drivers for chip mappings -# -# CONFIG_MTD_MIXMEM is not set -# CONFIG_MTD_NORA is not set -# CONFIG_MTD_OCTAGON is not set -# CONFIG_MTD_PNC2000 is not set -# CONFIG_MTD_RPXLITE is not set -# CONFIG_MTD_VMAX is not set - -# -# User modules and translation layers for MTD devices -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -CONFIG_MTD_ARM=y - -# -# Plug and Play configuration -# -# CONFIG_PNP is not set -# CONFIG_ISAPNP is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -# CONFIG_BLK_DEV_INITRD is not set - -# -# Networking options -# -# CONFIG_PACKET is not set -# CONFIG_NETLINK is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_INET_ECN is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set -# CONFIG_ATM is not set - -# -# -# -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_LLC is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_NET_SB1000 is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_LANCE is not set -# CONFIG_NET_VENDOR_SMC is not set -# CONFIG_NET_VENDOR_RACAL is not set -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -# CONFIG_HP100 is not set -# CONFIG_NET_ISA is not set -CONFIG_NET_PCI=y -# CONFIG_PCNET32 is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_APRICOT is not set -# CONFIG_CS89x0 is not set -CONFIG_TULIP=y -# CONFIG_DE4X5 is not set -# CONFIG_DGRS is not set -# CONFIG_DM9102 is not set -CONFIG_EEPRO100=y -CONFIG_EEPRO100_PM=y -# CONFIG_LNE390 is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_NE3210 is not set -# CONFIG_ES3210 is not set -# CONFIG_8139TOO is not set -# CONFIG_RTL8129 is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set -# CONFIG_WINBOND_840 is not set -# CONFIG_HAPPYMEAL is not set -# CONFIG_NET_POCKET is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_SK98LIN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# ATA/IDE/MFM/RLL support -# -# CONFIG_IDE is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI support -# -# CONFIG_SCSI is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set -# CONFIG_I2O_PCI is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input core support -# -# CONFIG_INPUT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -# CONFIG_SERIAL is not set -# CONFIG_SERIAL_EXTENDED is not set -# CONFIG_SERIAL_NONSTANDARD is not set -CONFIG_SERIAL_AMBA=y -CONFIG_SERIAL_INTEGRATOR=y -CONFIG_SERIAL_AMBA_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -CONFIG_MOUSE=y -CONFIG_PSMOUSE=y -# CONFIG_82C710_MOUSE is not set -# CONFIG_PC110_PAD is not set - -# -# Joysticks -# -# CONFIG_JOYSTICK is not set - -# -# Input core support is needed for joysticks -# -# CONFIG_QIC02_TAPE is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# File systems -# -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_FAT_FS is not set -# CONFIG_MSDOS_FS is not set -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_RAMFS is not set -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_MINIX_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set -# CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -CONFIG_ROMFS_FS=y -CONFIG_EXT2_FS=y -# CONFIG_SYSV_FS is not set -# CONFIG_SYSV_FS_WRITE is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set -# CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -# CONFIG_CODA_FS is not set -CONFIG_NFS_FS=y -# CONFIG_NFS_V3 is not set -CONFIG_ROOT_NFS=y -# CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -CONFIG_SUNRPC=y -CONFIG_LOCKD=y -# CONFIG_SMB_FS is not set -# CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_MOUNT_SUBDIR is not set -# CONFIG_NCPFS_NDS_DOMAINS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -# CONFIG_MSDOS_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_NLS is not set - -# -# Console drivers -# -CONFIG_KMI_KEYB=y -CONFIG_PC_KEYMAP=y -CONFIG_VGA_CONSOLE=y -# CONFIG_FB is not set - -# -# Frame-buffer support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set - -# -# Kernel hacking -# -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_LL=y diff -Nru a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile --- a/arch/arm/kernel/Makefile 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/kernel/Makefile 2004-11-10 17:19:06 -08:00 @@ -2,7 +2,7 @@ # Makefile for the linux kernel. # -AFLAGS_head.o := -DTEXTADDR=$(TEXTADDR) +AFLAGS_head.o := -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR) # Object file lists. diff -Nru a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c --- a/arch/arm/kernel/asm-offsets.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/kernel/asm-offsets.c 2004-11-10 17:19:02 -08:00 @@ -14,6 +14,7 @@ #include #include #include +#include /* * Make sure that the compiler and target are compatible. @@ -72,6 +73,7 @@ DEFINE(VM_EXEC, VM_EXEC); BLANK(); DEFINE(PAGE_SZ, PAGE_SIZE); + DEFINE(VIRT_OFFSET, PAGE_OFFSET); BLANK(); DEFINE(SYS_ERROR0, 0x9f0000); BLANK(); diff -Nru a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c --- a/arch/arm/kernel/bios32.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/kernel/bios32.c 2004-11-10 17:19:04 -08:00 @@ -574,13 +574,13 @@ if (!use_firmware) { /* - * Size the bridge windows. - */ + * Size the bridge windows. + */ pci_bus_size_bridges(bus); /* - * Assign resources. - */ + * Assign resources. + */ pci_bus_assign_resources(bus); } diff -Nru a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S --- a/arch/arm/kernel/debug.S 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/kernel/debug.S 2004-11-10 17:19:03 -08:00 @@ -538,6 +538,9 @@ #elif defined(CONFIG_ARCH_S3C2410) #include #include +#include +#define S3C2410_UART1_OFF (0x4000) +#define SHIFT_2440TXF (14-9) .macro addruart, rx mrc p15, 0, \rx, c1, c0 @@ -559,7 +562,17 @@ beq 1001f @ @ FIFO enabled... 1003: + mrc p15, 0, \rd, c1, c0 + tst \rd, #1 + addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) + addne \rd, \rx, #(S3C2410_VA_GPIO - S3C2410_VA_UART) + bic \rd, \rd, #0xff000 + ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] + and \rd, \rd, #0x00ff0000 + teq \rd, #0x00440000 @ is it 2440? + ldr \rd, [ \rx, # S3C2410_UFSTAT ] + moveq \rd, \rd, lsr #SHIFT_2440TXF tst \rd, #S3C2410_UFSTAT_TXFULL bne 1003b b 1002f @@ -580,8 +593,19 @@ beq 1001f @ @ FIFO enabled... 1003: + mrc p15, 0, \rd, c1, c0 + tst \rd, #1 + addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) + addne \rd, \rx, #(S3C2410_VA_GPIO - S3C2410_VA_UART) + bic \rd, \rd, #0xff000 + ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] + and \rd, \rd, #0x00ff0000 + teq \rd, #0x00440000 @ is it 2440? + ldr \rd, [ \rx, # S3C2410_UFSTAT ] - ands \rd, \rd, #15< diff -Nru a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S --- a/arch/arm/kernel/entry-armv.S 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/kernel/entry-armv.S 2004-11-10 17:19:03 -08:00 @@ -464,7 +464,7 @@ .macro irq_prio_table .endm -#elif defined(CONFIG_ARCH_VERSATILE_PB) +#elif defined(CONFIG_ARCH_VERSATILE) .macro disable_fiq .endm diff -Nru a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S --- a/arch/arm/kernel/head.S 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/kernel/head.S 2004-11-10 17:19:02 -08:00 @@ -19,17 +19,16 @@ #include #include +#ifndef CONFIG_XIP_KERNEL /* * We place the page tables 16K below TEXTADDR. Therefore, we must make sure * that TEXTADDR is correctly set. Currently, we expect the least significant * 16 bits to be 0x8000, but we could probably relax this restriction to - * TEXTADDR > PAGE_OFFSET + 0x4000 + * TEXTADDR >= PAGE_OFFSET + 0x4000 * * Note that swapper_pg_dir is the virtual address of the page tables, and * pgtbl gives us a position-independent reference to these tables. We can * do this because stext == TEXTADDR - * - * swapper_pg_dir, pgtbl and krnladr are all closely related. */ #if (TEXTADDR & 0xffff) != 0x8000 #error TEXTADDR must start at 0xXXXX8000 @@ -38,19 +37,35 @@ .globl swapper_pg_dir .equ swapper_pg_dir, TEXTADDR - 0x4000 - .macro pgtbl, reg - adr \reg, stext - sub \reg, \reg, #0x4000 + .macro pgtbl, rd, phys + adr \rd, stext + sub \rd, \rd, #0x4000 .endm - +#else /* - * Since the page table is closely related to the kernel start address, we - * can convert the page table base address to the base address of the section - * containing both. + * XIP Kernel: + * + * We place the page tables 16K below DATAADDR. Therefore, we must make sure + * that DATAADDR is correctly set. Currently, we expect the least significant + * 16 bits to be 0x8000, but we could probably relax this restriction to + * DATAADDR >= PAGE_OFFSET + 0x4000 + * + * Note that pgtbl is meant to return the physical address of swapper_pg_dir. + * We can't make it relative to the kernel position in this case since + * the kernel can physically be anywhere. */ - .macro krnladr, rd, pgtable - bic \rd, \pgtable, #0x000ff000 +#if (DATAADDR & 0xffff) != 0x8000 +#error DATAADDR must start at 0xXXXX8000 +#endif + + .globl swapper_pg_dir + .equ swapper_pg_dir, DATAADDR - 0x4000 + + .macro pgtbl, rd, phys + ldr \rd, =((DATAADDR - 0x4000) - VIRT_OFFSET) + add \rd, \rd, \phys .endm +#endif /* * Kernel startup entry point. @@ -99,6 +114,8 @@ .type __switch_data, %object __switch_data: .long __mmap_switched + .long __data_loc @ r2 + .long __data_start @ r3 .long __bss_start @ r4 .long _end @ r5 .long processor_id @ r6 @@ -136,12 +153,20 @@ */ .align 5 __mmap_switched: - adr r3, __switch_data + 4 - ldmia r3, {r4, r5, r6, r7, r8, sp} + adr r2, __switch_data + 4 + ldmia r2, {r2, r3, r4, r5, r6, r7, r8, sp} + + cmp r2, r3 @ Copy data segment if needed +1: cmpne r3, r4 + ldrne fp, [r2], #4 + strne fp, [r3], #4 + bne 1b + mov fp, #0 @ Clear BSS (and zero fp) 1: cmp r4, r5 strcc fp, [r4],#4 bcc 1b + str r9, [r6] @ Save processor ID str r1, [r7] @ Save machine type bic r2, r0, #2 @ Clear 'A' bit @@ -156,16 +181,13 @@ * amount which are required to get the kernel running, which * generally means mapping in the kernel code. * - * We only map in 4MB of RAM, which should be sufficient in - * all cases. - * * r5 = physical address of start of RAM * r6 = physical IO address * r7 = byte offset into page tables for IO * r8 = page table flags */ __create_page_tables: - pgtbl r4 @ page table address + pgtbl r4, r5 @ page table address /* * Clear the 16K level 1 swapper page table @@ -183,28 +205,50 @@ /* * Create identity mapping for first MB of kernel to * cater for the MMU enable. This identity mapping - * will be removed by paging_init() + * will be removed by paging_init(). We use our current program + * counter to determine corresponding section base address. */ - krnladr r2, r4 @ start of kernel - add r3, r8, r2 @ flags + kernel base - str r3, [r4, r2, lsr #18] @ identity mapping + mov r2, pc, lsr #20 @ start of kernel section + add r3, r8, r2, lsl #20 @ flags + kernel base + str r3, [r4, r2, lsl #2] @ identity mapping /* * Now setup the pagetables for our kernel direct * mapped region. We round TEXTADDR down to the - * nearest megabyte boundary. + * nearest megabyte boundary. It is assumed that + * the kernel fits within 4 contigous 1MB sections. */ - add r0, r4, #(TEXTADDR & 0xff000000) >> 18 @ start of kernel - bic r2, r3, #0x00f00000 - str r2, [r0] @ PAGE_OFFSET + 0MB - add r0, r0, #(TEXTADDR & 0x00f00000) >> 18 - str r3, [r0], #4 @ KERNEL + 0MB + add r0, r4, #(TEXTADDR & 0xff000000) >> 18 @ start of kernel + str r3, [r0, #(TEXTADDR & 0x00f00000) >> 18]! add r3, r3, #1 << 20 - str r3, [r0], #4 @ KERNEL + 1MB + str r3, [r0, #4]! @ KERNEL + 1MB add r3, r3, #1 << 20 - str r3, [r0], #4 @ KERNEL + 2MB + str r3, [r0, #4]! @ KERNEL + 2MB add r3, r3, #1 << 20 - str r3, [r0], #4 @ KERNEL + 3MB + str r3, [r0, #4] @ KERNEL + 3MB + + /* + * Then map first 1MB of ram in case it contains our boot params. + */ + add r0, r4, #VIRT_OFFSET >> 18 + add r2, r5, r8 + str r2, [r0] + +#ifdef CONFIG_XIP_KERNEL + /* + * Map some ram to cover our .data and .bss areas. + * Mapping 3MB should be plenty. + */ + sub r3, r4, r5 + mov r3, r3, lsr #20 + add r0, r0, r3, lsl #2 + add r2, r2, r3, lsl #20 + str r2, [r0], #4 + add r2, r2, #(1 << 20) + str r2, [r0], #4 + add r2, r2, #(1 << 20) + str r2, [r0] +#endif bic r8, r8, #0x0c @ turn off cacheable @ and bufferable bits @@ -255,6 +299,7 @@ str r3, [r0] #endif mov pc, lr + .ltorg diff -Nru a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c --- a/arch/arm/kernel/irq.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/kernel/irq.c 2004-11-10 17:19:02 -08:00 @@ -86,7 +86,7 @@ }; /** - * disable_irq - disable an irq and wait for completion + * disable_irq_nosync - disable an irq without waiting * @irq: Interrupt to disable * * Disable the selected interrupt line. Enables and disables @@ -94,7 +94,7 @@ * * This function may be called from IRQ context. */ -void disable_irq(unsigned int irq) +void disable_irq_nosync(unsigned int irq) { struct irqdesc *desc = irq_desc + irq; unsigned long flags; @@ -104,6 +104,28 @@ list_del_init(&desc->pend); spin_unlock_irqrestore(&irq_controller_lock, flags); } +EXPORT_SYMBOL(disable_irq_nosync); + +/** + * disable_irq - disable an irq and wait for completion + * @irq: Interrupt to disable + * + * Disable the selected interrupt line. Enables and disables + * are nested. This functions waits for any pending IRQ + * handlers for this interrupt to complete before returning. + * If you use this function while holding a resource the IRQ + * handler may need you will deadlock. + * + * This function may be called - with care - from IRQ context. + */ +void disable_irq(unsigned int irq) +{ + struct irqdesc *desc = irq_desc + irq; + + disable_irq_nosync(irq); + if (desc->action) + synchronize_irq(irq); +} EXPORT_SYMBOL(disable_irq); /** @@ -175,17 +197,30 @@ int show_interrupts(struct seq_file *p, void *v) { - int i = *(loff_t *) v; + int i = *(loff_t *) v, cpu; struct irqaction * action; unsigned long flags; + if (i == 0) { + char cpuname[12]; + + seq_printf(p, " "); + for_each_present_cpu(cpu) { + sprintf(cpuname, "CPU%d", cpu); + seq_printf(p, " %10s", cpuname); + } + seq_putc(p, '\n'); + } + if (i < NR_IRQS) { spin_lock_irqsave(&irq_controller_lock, flags); action = irq_desc[i].action; if (!action) goto unlock; - seq_printf(p, "%3d: %10u ", i, kstat_irqs(i)); + seq_printf(p, "%3d: ", i); + for_each_present_cpu(cpu) + seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]); seq_printf(p, " %s", action->name); for (action = action->next; action; action = action->next) seq_printf(p, ", %s", action->name); @@ -341,7 +376,6 @@ do { struct irqaction *action; - int ret; action = desc->action; if (!action) @@ -352,9 +386,7 @@ desc->chip->unmask(irq); } - ret = __do_irq(irq, action, regs); - if (ret != IRQ_HANDLED) - report_bad_irq(irq, regs, desc, ret); + __do_irq(irq, action, regs); } while (desc->pending && !desc->disable_depth); desc->running = 0; diff -Nru a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c --- a/arch/arm/kernel/module.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/kernel/module.c 2004-11-10 17:19:02 -08:00 @@ -9,6 +9,7 @@ * * Module allocation method suggested by Andi Kleen. */ +#include #include #include #include @@ -18,6 +19,18 @@ #include #include + +#ifdef CONFIG_XIP_KERNEL +/* + * The XIP kernel text is mapped in the module area for modules and + * some other stuff to work without any indirect relocations. + * MODULE_START is redefined here and not in asm/memory.h to avoid + * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. + */ +extern void _etext; +#undef MODULE_START +#define MODULE_START (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) +#endif void *module_alloc(unsigned long size) { diff -Nru a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c --- a/arch/arm/kernel/setup.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/kernel/setup.c 2004-11-10 17:19:04 -08:00 @@ -59,7 +59,7 @@ extern void squash_mem_tags(struct tag *tag); extern void reboot_setup(char *str); extern int root_mountflags; -extern int _stext, _text, _etext, _edata, _end; +extern void _stext, _text, _etext, __data_start, _edata, _end; unsigned int processor_id; unsigned int __machine_arch_type; @@ -113,7 +113,7 @@ */ static struct resource mem_res[] = { { "Video RAM", 0, 0, IORESOURCE_MEM }, - { "Kernel code", 0, 0, IORESOURCE_MEM }, + { "Kernel text", 0, 0, IORESOURCE_MEM }, { "Kernel data", 0, 0, IORESOURCE_MEM } }; @@ -447,10 +447,10 @@ struct resource *res; int i; - kernel_code.start = __virt_to_phys(init_mm.start_code); - kernel_code.end = __virt_to_phys(init_mm.end_code - 1); - kernel_data.start = __virt_to_phys(init_mm.end_code); - kernel_data.end = __virt_to_phys(init_mm.brk - 1); + kernel_code.start = virt_to_phys(&_text); + kernel_code.end = virt_to_phys(&_etext - 1); + kernel_data.start = virt_to_phys(&__data_start); + kernel_data.end = virt_to_phys(&_end - 1); for (i = 0; i < mi->nr_banks; i++) { unsigned long virt_start, virt_end; diff -Nru a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S --- a/arch/arm/kernel/vmlinux.lds.S 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/kernel/vmlinux.lds.S 2004-11-10 17:19:03 -08:00 @@ -4,6 +4,7 @@ */ #include +#include OUTPUT_ARCH(arm) ENTRY(stext) @@ -17,7 +18,6 @@ . = TEXTADDR; .init : { /* Init code and data */ _stext = .; - __init_begin = .; _sinittext = .; *(.init.text) _einittext = .; @@ -30,7 +30,6 @@ __tagtable_begin = .; *(.taglist) __tagtable_end = .; - *(.init.data) . = ALIGN(16); __setup_start = .; *(.init.setup) @@ -57,8 +56,12 @@ __initramfs_start = .; usr/built-in.o(.init.ramfs) __initramfs_end = .; +#ifndef CONFIG_XIP_KERNEL + __init_begin = _stext; + *(.init.data) . = ALIGN(4096); __init_end = .; +#endif } /DISCARD/ : { /* Exit code and data */ @@ -79,8 +82,6 @@ *(.glue_7) *(.glue_7t) *(.got) /* Global offset table */ - - _etext = .; /* End of text section */ } . = ALIGN(16); @@ -92,15 +93,33 @@ RODATA + _etext = .; /* End of text and rodata section */ + +#ifdef CONFIG_XIP_KERNEL + __data_loc = ALIGN(4); /* location in binary */ + . = DATAADDR; +#else . = ALIGN(8192); + __data_loc = .; +#endif + + .data : AT(__data_loc) { + __data_start = .; /* address in memory */ - .data : { /* * first, the init task union, aligned * to an 8192 byte boundary. */ *(.init.task) +#ifdef CONFIG_XIP_KERNEL + . = ALIGN(4096); + __init_begin = .; + *(.init.data) + . = ALIGN(4096); + __init_end = .; +#endif + . = ALIGN(4096); __nosave_begin = .; *(.data.nosave) @@ -126,7 +145,7 @@ __bss_start = .; /* BSS */ *(.bss) *(COMMON) - _end = . ; + _end = .; } /* Stabs debugging sections. */ .stab 0 : { *(.stab) } diff -Nru a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile --- a/arch/arm/lib/Makefile 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/lib/Makefile 2004-11-10 17:19:05 -08:00 @@ -12,12 +12,12 @@ testclearbit.o testsetbit.o uaccess.o getuser.o \ putuser.o ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ ucmpdi2.o udivdi3.o lib1funcs.o div64.o \ - io-readsb.o io-writesb.o io-writesl.o + io-readsb.o io-writesb.o io-readsl.o io-writesl.o ifeq ($(CONFIG_CPU_32v3),y) - lib-y += io-readsw-armv3.o io-writesw-armv3.o io-readsl-armv3.o + lib-y += io-readsw-armv3.o io-writesw-armv3.o else - lib-y += io-readsw-armv4.o io-writesw-armv4.o io-readsl-armv4.o + lib-y += io-readsw-armv4.o io-writesw-armv4.o endif lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o diff -Nru a/arch/arm/lib/csumpartial.S b/arch/arm/lib/csumpartial.S --- a/arch/arm/lib/csumpartial.S 2004-11-10 17:19:07 -08:00 +++ b/arch/arm/lib/csumpartial.S 2004-11-10 17:19:07 -08:00 @@ -73,8 +73,7 @@ .done: adc r0, sum, #0 @ collect up the last carry ldr td0, [sp], #4 tst td0, #1 @ check buffer alignment - movne td0, r0, lsl #8 @ rotate checksum by 8 bits - orrne r0, td0, r0, lsr #24 + movne r0, r0, ror #8 @ rotate checksum by 8 bits ldr pc, [sp], #4 @ return .not_aligned: tst buf, #1 @ odd address diff -Nru a/arch/arm/lib/csumpartialcopygeneric.S b/arch/arm/lib/csumpartialcopygeneric.S --- a/arch/arm/lib/csumpartialcopygeneric.S 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/lib/csumpartialcopygeneric.S 2004-11-10 17:19:02 -08:00 @@ -160,8 +160,7 @@ .done: adc r0, sum, #0 ldr sum, [sp, #0] @ dst tst sum, #1 - movne sum, r0, lsl #8 - orrne r0, sum, r0, lsr #24 + movne r0, r0, ror #8 load_regs ea .src_not_aligned: diff -Nru a/arch/arm/lib/io-readsl-armv3.S b/arch/arm/lib/io-readsl-armv3.S --- a/arch/arm/lib/io-readsl-armv3.S 2004-11-10 17:19:06 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,78 +0,0 @@ -/* - * linux/arch/arm/lib/io-readsl-armv3.S - * - * Copyright (C) 1995-2000 Russell King - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include -#include -#include - -/* - * Note that some reads can be aligned on half-word boundaries. - */ -ENTRY(__raw_readsl) - teq r2, #0 @ do we have to check for the zero len? - moveq pc, lr - ands ip, r1, #3 - bne 2f - -1: ldr r3, [r0] - str r3, [r1], #4 - subs r2, r2, #1 - bne 1b - mov pc, lr - -2: cmp ip, #2 - ldr ip, [r0] - blt 4f - bgt 6f - - strb ip, [r1], #1 - mov ip, ip, lsr #8 - strb ip, [r1], #1 - mov ip, ip, lsr #8 -3: subs r2, r2, #1 - ldrne r3, [r0] - orrne ip, ip, r3, lsl #16 - strne ip, [r1], #4 - movne ip, r3, lsr #16 - bne 3b - strb ip, [r1], #1 - mov ip, ip, lsr #8 - strb ip, [r1], #1 - mov pc, lr - -4: strb ip, [r1], #1 - mov ip, ip, lsr #8 - strb ip, [r1], #1 - mov ip, ip, lsr #8 - strb ip, [r1], #1 - mov ip, ip, lsr #8 -5: subs r2, r2, #1 - ldrne r3, [r0] - orrne ip, ip, r3, lsl #8 - strne ip, [r1], #4 - movne ip, r3, lsr #24 - bne 5b - strb ip, [r1], #1 - mov pc, lr - -6: strb ip, [r1], #1 - mov ip, ip, lsr #8 -7: subs r2, r2, #1 - ldrne r3, [r0] - orrne ip, ip, r3, lsl #24 - strne ip, [r1], #4 - movne ip, r3, lsr #8 - bne 7b - strb ip, [r1], #1 - mov ip, ip, lsr #8 - strb ip, [r1], #1 - mov ip, ip, lsr #8 - strb ip, [r1], #1 - mov pc, lr - diff -Nru a/arch/arm/lib/io-readsl-armv4.S b/arch/arm/lib/io-readsl-armv4.S --- a/arch/arm/lib/io-readsl-armv4.S 2004-11-10 17:19:06 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,132 +0,0 @@ -/* - * linux/arch/arm/lib/io-readsl-armv4.S - * - * Copyright (C) 1995-2000 Russell King - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include -#include - -/* - * Note that some reads can be aligned on half-word boundaries. - */ -ENTRY(__raw_readsl) - teq r2, #0 @ do we have to check for the zero len? - moveq pc, lr - ands ip, r1, #3 - bne 2f - - subs r2, r2, #4 - bmi 1001f - stmfd sp!, {r4, lr} -1000: ldr r3, [r0, #0] - ldr r4, [r0, #0] - ldr ip, [r0, #0] - ldr lr, [r0, #0] - subs r2, r2, #4 - stmia r1!, {r3, r4, ip, lr} - bpl 1000b - ldmfd sp!, {r4, lr} -1001: tst r2, #2 - ldrne r3, [r0, #0] - ldrne ip, [r0, #0] - stmneia r1!, {r3, ip} - tst r2, #1 - ldrne r3, [r0, #0] - strne r3, [r1, #0] - mov pc, lr - -2: cmp ip, #2 - ldr ip, [r0] - blt 4f - bgt 6f - -#ifndef __ARMEB__ - - /* little endian code */ - - strh ip, [r1], #2 - mov ip, ip, lsr #16 -3: subs r2, r2, #1 - ldrne r3, [r0] - orrne ip, ip, r3, lsl #16 - strne ip, [r1], #4 - movne ip, r3, lsr #16 - bne 3b - strh ip, [r1], #2 - mov pc, lr - -4: strb ip, [r1], #1 - mov ip, ip, lsr #8 - strh ip, [r1], #2 - mov ip, ip, lsr #16 -5: subs r2, r2, #1 - ldrne r3, [r0] - orrne ip, ip, r3, lsl #8 - strne ip, [r1], #4 - movne ip, r3, lsr #24 - bne 5b - strb ip, [r1], #1 - mov pc, lr - -6: strb ip, [r1], #1 - mov ip, ip, lsr #8 -7: subs r2, r2, #1 - ldrne r3, [r0] - orrne ip, ip, r3, lsl #24 - strne ip, [r1], #4 - movne ip, r3, lsr #8 - bne 7b - strh ip, [r1], #2 - mov ip, ip, lsr #16 - strb ip, [r1] - mov pc, lr - -#else - - /* big endian code */ - - - mov r3, ip, lsr #16 - strh r3, [r1], #2 -3: mov r3, ip, lsl #16 - subs r2, r2, #1 - ldrne ip, [r0] - orrne r3, r3, ip, lsr #16 - strne r3, [r1], #4 - bne 3b - strh ip, [r1], #2 - mov pc, lr - -4: mov r3, ip, lsr #24 - strb r3, [r1], #1 - mov r3, ip, lsr #8 - strh r3, [r1], #2 -5: mov r3, ip, lsl #24 - subs r2, r2, #1 - ldrne ip, [r0] - orrne r3, r3, ip, lsr #8 - strne r3, [r1], #4 - bne 5b - strb ip, [r1], #1 - mov pc, lr - -6: mov r3, ip, lsr #24 - strb r3, [r1], #1 -7: mov r3, ip, lsl #8 - subs r2, r2, #1 - ldrne ip, [r0] - orrne r3, r3, ip, lsr #24 - strne r3, [r1], #4 - bne 7b - mov r3, ip, lsr #8 - strh r3, [r1], #2 - strb ip, [r1], #1 - mov pc, lr - -#endif - - diff -Nru a/arch/arm/lib/io-readsl.S b/arch/arm/lib/io-readsl.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/lib/io-readsl.S 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,78 @@ +/* + * linux/arch/arm/lib/io-readsl.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + +ENTRY(__raw_readsl) + teq r2, #0 @ do we have to check for the zero len? + moveq pc, lr + ands ip, r1, #3 + bne 3f + + subs r2, r2, #4 + bmi 2f + stmfd sp!, {r4, lr} +1: ldr r3, [r0, #0] + ldr r4, [r0, #0] + ldr ip, [r0, #0] + ldr lr, [r0, #0] + subs r2, r2, #4 + stmia r1!, {r3, r4, ip, lr} + bpl 1b + ldmfd sp!, {r4, lr} +2: movs r2, r2, lsl #31 + ldrcs r3, [r0, #0] + ldrcs ip, [r0, #0] + stmcsia r1!, {r3, ip} + ldrne r3, [r0, #0] + strne r3, [r1, #0] + mov pc, lr + +3: ldr r3, [r0] + cmp ip, #2 + mov ip, r3, get_byte_0 + strb ip, [r1], #1 + bgt 6f + mov ip, r3, get_byte_1 + strb ip, [r1], #1 + beq 5f + mov ip, r3, get_byte_2 + strb ip, [r1], #1 + +4: subs r2, r2, #1 + mov ip, r3, pull #24 + ldrne r3, [r0] + orrne ip, ip, r3, push #8 + strne ip, [r1], #4 + bne 4b + b 8f + +5: subs r2, r2, #1 + mov ip, r3, pull #16 + ldrne r3, [r0] + orrne ip, ip, r3, push #16 + strne ip, [r1], #4 + bne 5b + b 7f + +6: subs r2, r2, #1 + mov ip, r3, pull #8 + ldrne r3, [r0] + orrne ip, ip, r3, push #24 + strne ip, [r1], #4 + bne 6b + + mov r3, ip, get_byte_2 + strb r3, [r1, #2] +7: mov r3, ip, get_byte_1 + strb r3, [r1, #1] +8: mov r3, ip, get_byte_0 + strb r3, [r1, #0] + mov pc, lr diff -Nru a/arch/arm/lib/io-writesl.S b/arch/arm/lib/io-writesl.S --- a/arch/arm/lib/io-writesl.S 2004-11-10 17:19:07 -08:00 +++ b/arch/arm/lib/io-writesl.S 2004-11-10 17:19:07 -08:00 @@ -9,53 +9,58 @@ */ #include #include -#include ENTRY(__raw_writesl) teq r2, #0 @ do we have to check for the zero len? moveq pc, lr ands ip, r1, #3 - bne 2f + bne 3f - tst r2, #1 - ldrne r3, [r1], #4 - strne r3, [r0, #0] -1: subs r2, r2, #2 - ldrcs r3, [r1], #4 - ldrcs ip, [r1], #4 + subs r2, r2, #4 + bmi 2f + stmfd sp!, {r4, lr} +1: ldmia r1!, {r3, r4, ip, lr} + subs r2, r2, #4 + str r3, [r0, #0] + str r4, [r0, #0] + str ip, [r0, #0] + str lr, [r0, #0] + bpl 1b + ldmfd sp!, {r4, lr} +2: movs r2, r2, lsl #31 + ldmcsia r1!, {r3, ip} strcs r3, [r0, #0] + ldrne r3, [r1, #0] strcs ip, [r0, #0] - bcs 1b + strne r3, [r0, #0] mov pc, lr -2: bic r1, r1, #3 - cmp ip, #2 +3: bic r1, r1, #3 ldr r3, [r1], #4 - bgt 4f + cmp ip, #2 blt 5f + bgt 6f -3: mov ip, r3, lsr #16 +4: mov ip, r3, pull #16 ldr r3, [r1], #4 subs r2, r2, #1 - orr ip, ip, r3, lsl #16 - str ip, [r0, #0] - bne 3b + orr ip, ip, r3, push #16 + str ip, [r0] + bne 4b mov pc, lr -4: mov ip, r3, lsr #24 +5: mov ip, r3, pull #8 ldr r3, [r1], #4 subs r2, r2, #1 - orr ip, ip, r3, lsl #8 - str ip, [r0, #0] - bne 4b + orr ip, ip, r3, push #24 + str ip, [r0] + bne 5b mov pc, lr -5: mov ip, r3, lsr #8 +6: mov ip, r3, pull #24 ldr r3, [r1], #4 subs r2, r2, #1 - orr ip, ip, r3, lsl #24 - str ip, [r0, #0] - bne 5b + orr ip, ip, r3, push #8 + str ip, [r0] + bne 6b mov pc, lr - - diff -Nru a/arch/arm/lib/longlong.h b/arch/arm/lib/longlong.h --- a/arch/arm/lib/longlong.h 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/lib/longlong.h 2004-11-10 17:19:03 -08:00 @@ -161,7 +161,6 @@ #define UDIV_NEEDS_NORMALIZATION 1 #define udiv_qrnnd __udiv_qrnnd_c -extern const UQItype __clz_tab[]; #define count_leading_zeros(count, x) \ do { \ USItype __xr = (x); \ diff -Nru a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c --- a/arch/arm/mach-clps7500/core.c 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mach-clps7500/core.c 2004-11-10 17:19:05 -08:00 @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -312,6 +313,55 @@ .init = clps7500_timer_init, .offset = ioc_timer_gettimeoffset, }; + +static struct plat_serial8250_port serial_platform_data[] = { + { + .mapbase = 0x03010fe0, + .irq = 10, + .uartclk = 1843200, + .regshift = 2, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SKIP_TEST, + }, + { + .mapbase = 0x03010be0, + .irq = 0, + .uartclk = 1843200, + .regshift = 2, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SKIP_TEST, + }, + { + .iobase = ISASLOT_IO + 0x2e8, + .irq = 41, + .uartclk = 1843200, + .regshift = 0, + .iotype = UPIO_PORT, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { + .iobase = ISASLOT_IO + 0x3e8, + .irq = 40, + .uartclk = 1843200, + .regshift = 0, + .iotype = UPIO_PORT, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { }, +}; + +static struct platform_device serial_device = { + .name = "serial8250", + .id = 0, + .dev = { + .platform_data = serial_platform_data, + }, +}; + +static int __init clps7500_init(void) +{ + return platform_register_device(&serial_device); +} MACHINE_START(CLPS7500, "CL-PS7500") MAINTAINER("Philip Blundell") diff -Nru a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c --- a/arch/arm/mach-ebsa110/core.c 2004-11-10 17:19:07 -08:00 +++ b/arch/arm/mach-ebsa110/core.c 2004-11-10 17:19:07 -08:00 @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -195,6 +196,41 @@ .init = ebsa110_timer_init, .offset = ebsa110_gettimeoffset, }; + +static struct plat_serial8250_port serial_platform_data[] = { + { + .iobase = 0x3f8, + .irq = 1, + .uartclk = 1843200, + .regshift = 0, + .iotype = UPIO_PORT, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { + .iobase = 0x2f8, + .irq = 2, + .uartclk = 1843200, + .regshift = 0, + .iotype = UPIO_PORT, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { }, +}; + +static struct platform_device serial_device = { + .name = "serial8250", + .id = 0, + .dev = { + .platform_data = serial_platform_data, + }, +}; + +static int __init ebsa110_init(void) +{ + return platform_device_register(&serial_device); +} + +arch_initcall(ebsa110_init); MACHINE_START(EBSA110, "EBSA110") MAINTAINER("Russell King") diff -Nru a/arch/arm/mach-ebsa110/io.c b/arch/arm/mach-ebsa110/io.c --- a/arch/arm/mach-ebsa110/io.c 2004-11-10 17:19:07 -08:00 +++ b/arch/arm/mach-ebsa110/io.c 2004-11-10 17:19:07 -08:00 @@ -27,9 +27,9 @@ #include #include -static u32 __isamem_convert_addr(void *addr) +static void __iomem *__isamem_convert_addr(void __iomem *addr) { - u32 ret, a = (u32) addr; + u32 ret, a = (u32 __force) addr; /* * The PCMCIA controller is wired up as follows: @@ -53,41 +53,43 @@ ret += 0xe8000000; if ((a & 0x20000) == (a & 0x40000) >> 1) - return ret; + return (void __iomem *)ret; BUG(); - return 0; + return NULL; } /* * read[bwl] and write[bwl] */ -u8 __readb(void *addr) +u8 __readb(void __iomem *addr) { - u32 ret, a = __isamem_convert_addr(addr); + void __iomem *a = __isamem_convert_addr(addr); + u32 ret; - if ((int)addr & 1) + if ((unsigned long)addr & 1) ret = __raw_readl(a); else ret = __raw_readb(a); return ret; } -u16 __readw(void *addr) +u16 __readw(void __iomem *addr) { - u32 a = __isamem_convert_addr(addr); + void __iomem *a = __isamem_convert_addr(addr); - if ((int)addr & 1) + if ((unsigned long)addr & 1) BUG(); return __raw_readw(a); } -u32 __readl(void *addr) +u32 __readl(void __iomem *addr) { - u32 ret, a = __isamem_convert_addr(addr); + void __iomem *a = __isamem_convert_addr(addr); + u32 ret; - if ((int)addr & 3) + if ((unsigned long)addr & 3) BUG(); ret = __raw_readw(a); @@ -99,31 +101,31 @@ EXPORT_SYMBOL(__readw); EXPORT_SYMBOL(__readl); -void __writeb(u8 val, void *addr) +void __writeb(u8 val, void __iomem *addr) { - u32 a = __isamem_convert_addr(addr); + void __iomem *a = __isamem_convert_addr(addr); - if ((int)addr & 1) + if ((unsigned long)addr & 1) __raw_writel(val, a); else __raw_writeb(val, a); } -void __writew(u16 val, void *addr) +void __writew(u16 val, void __iomem *addr) { - u32 a = __isamem_convert_addr(addr); + void __iomem *a = __isamem_convert_addr(addr); - if ((int)addr & 1) + if ((unsigned long)addr & 1) BUG(); __raw_writew(val, a); } -void __writel(u32 val, void *addr) +void __writel(u32 val, void __iomem *addr) { - u32 a = __isamem_convert_addr(addr); + void __iomem *a = __isamem_convert_addr(addr); - if ((int)addr & 3) + if ((unsigned long)addr & 3) BUG(); __raw_writew(val, a); @@ -153,7 +155,7 @@ if (SUPERIO_PORT(port)) ret = __raw_readb(ISAIO_BASE + (port << 2)); else { - u32 a = ISAIO_BASE + ((port & ~1) << 1); + void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); /* * Shame nothing else does @@ -180,7 +182,7 @@ if (SUPERIO_PORT(port)) ret = __raw_readb(ISAIO_BASE + (port << 2)); else { - u32 a = ISAIO_BASE + ((port & ~1) << 1); + void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); /* * Shame nothing else does @@ -200,7 +202,7 @@ if (SUPERIO_PORT(port)) ret = __raw_readw(ISAIO_BASE + (port << 2)); else { - u32 a = ISAIO_BASE + ((port & ~1) << 1); + void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); /* * Shame nothing else does @@ -218,7 +220,7 @@ */ u32 __inl(unsigned int port) { - u32 a; + void __iomem *a; if (SUPERIO_PORT(port) || port & 3) BUG(); @@ -241,7 +243,7 @@ if (SUPERIO_PORT(port)) __raw_writeb(val, ISAIO_BASE + (port << 2)); else { - u32 a = ISAIO_BASE + ((port & ~1) << 1); + void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); /* * Shame nothing else does @@ -261,7 +263,7 @@ if (SUPERIO_PORT(port)) __raw_writeb(val, ISAIO_BASE + (port << 2)); else { - u32 a = ISAIO_BASE + ((port & ~1) << 1); + void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); /* * Shame nothing else does diff -Nru a/arch/arm/mach-epxa10db/arch.c b/arch/arm/mach-epxa10db/arch.c --- a/arch/arm/mach-epxa10db/arch.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-epxa10db/arch.c 2004-11-10 17:19:04 -08:00 @@ -20,12 +20,43 @@ */ #include #include +#include #include #include #include #include + +static struct plat_serial8250_port serial_platform_data[] = { + { + .iobase = 0x3f8, + .irq = IRQ_UARTINT0, +#error FIXME + .uartclk = 0, + .regshift = 0, + .iotype = UPIO_PORT, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { + .iobase = 0x2f8, + .irq = IRQ_UARTINT1, +#error FIXME + .uartclk = 0, + .regshift = 0, + .iotype = UPIO_PORT, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { }, +}; + +static struct platform_device serial_device = { + .name = "serial8250", + .id = 0, + .dev = { + .platform_data = serial_platform_data, + }, +}; extern void epxa10db_map_io(void); extern void epxa10db_init_irq(void); diff -Nru a/arch/arm/mach-footbridge/Makefile b/arch/arm/mach-footbridge/Makefile --- a/arch/arm/mach-footbridge/Makefile 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-footbridge/Makefile 2004-11-10 17:19:04 -08:00 @@ -26,3 +26,5 @@ obj-$(CONFIG_PCI) +=$(pci-y) obj-$(CONFIG_LEDS) +=$(leds-y) + +obj-$(CONFIG_ISA) += isa.o diff -Nru a/arch/arm/mach-footbridge/isa.c b/arch/arm/mach-footbridge/isa.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-footbridge/isa.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,48 @@ +/* + * linux/arch/arm/mach-footbridge/isa.c + * + * Copyright (C) 2004 Russell King. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + +#include + +static struct plat_serial8250_port serial_platform_data[] = { + { + .iobase = 0x3f8, + .irq = IRQ_ISA_UART, + .uartclk = 1843200, + .regshift = 0, + .iotype = UPIO_PORT, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { + .iobase = 0x2f8, + .irq = IRQ_ISA_UART2, + .uartclk = 1843200, + .regshift = 0, + .iotype = UPIO_PORT, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { }, +}; + +static struct platform_device serial_device = { + .name = "serial8250", + .id = 0, + .dev = { + .platform_data = serial_platform_data, + }, +}; + +static int __init footbridge_isa_init(void) +{ + return platform_device_register(&serial_device); +} + +arch_initcall(footbridge_isa_init); diff -Nru a/arch/arm/mach-h720x/Kconfig b/arch/arm/mach-h720x/Kconfig --- a/arch/arm/mach-h720x/Kconfig 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-h720x/Kconfig 2004-11-10 17:19:02 -08:00 @@ -1,3 +1,5 @@ +if ARCH_H720X + menu "h720x Implementations" config ARCH_H7201 @@ -25,3 +27,5 @@ bool help Select code specific to h7202 variants + +endif diff -Nru a/arch/arm/mach-h720x/common.h b/arch/arm/mach-h720x/common.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-h720x/common.h 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,29 @@ +/* + * linux/arch/arm/mach-h720x/common.h + * + * Copyright (C) 2003 Thomas Gleixner + * 2003 Robert Schwebel + * 2004 Sascha Hauer + * + * Architecture specific stuff for Hynix GMS30C7201 development board + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +extern unsigned long h720x_gettimeoffset(void); +extern void __init h720x_init_irq (void); +extern void __init h720x_map_io(void); + +#ifdef CONFIG_ARCH_H7202 +extern struct sys_timer h7202_timer; +extern void __init init_hw_h7202(void); +extern void __init h7202_init_irq (void); +extern void __init h7202_init_time(void); +#endif + +#ifdef CONFIG_ARCH_H7201 +extern struct sys_timer h7201_timer; +#endif diff -Nru a/arch/arm/mach-h720x/cpu-h7201.c b/arch/arm/mach-h720x/cpu-h7201.c --- a/arch/arm/mach-h720x/cpu-h7201.c 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/mach-h720x/cpu-h7201.c 2004-11-10 17:19:03 -08:00 @@ -22,10 +22,7 @@ #include #include #include - -extern unsigned long h720x_gettimeoffset(void); -extern void __init h720x_init_irq (void); - +#include "common.h" /* * Timer interrupt handler */ @@ -53,8 +50,6 @@ */ void __init h7201_init_time(void) { - gettimeoffset = h720x_gettimeoffset; - CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH; CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET; CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START; @@ -62,3 +57,8 @@ setup_irq(IRQ_TIMER0, &h7201_timer_irq); } + +struct sys_timer h7201_timer = { + .init = h7201_init_time, + .offset = h720x_gettimeoffset, +}; diff -Nru a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c --- a/arch/arm/mach-h720x/cpu-h7202.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-h720x/cpu-h7202.c 2004-11-10 17:19:04 -08:00 @@ -23,6 +23,8 @@ #include #include #include +#include +#include "common.h" static struct resource h7202ps2_resources[] = { [0] = { @@ -44,13 +46,55 @@ .resource = h7202ps2_resources, }; +static struct plat_serial8250_port serial_platform_data[] = { + { + .membase = SERIAL0_BASE, + .irq = IRQ_UART0, + .uartclk = 2*1843200, + .regshift = 2, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { + .membase = SERIAL1_BASE, + .irq = IRQ_UART1, + .uartclk = 2*1843200, + .regshift = 2, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { + .membase = SERIAL2_BASE, + .irq = IRQ_UART2, + .uartclk = 2*1843200, + .regshift = 2, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { + .membase = SERIAL3_BASE, + .irq = IRQ_UART3, + .uartclk = 2*1843200, + .regshift = 2, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { }, +}; + +static struct platform_device serial_device = { + .name = "serial8250", + .id = 0, + .dev = { + .platform_data = serial_platform_data, + }, +}; + static struct platform_device *devices[] __initdata = { &h7202ps2_device, + &serial_device, }; -extern unsigned long h720x_gettimeoffset(void); -extern void __init h720x_init_irq (void); - /* Although we have two interrupt lines for the timers, we only have one * status register which clears all pending timer interrupts on reading. So * we have to handle all timer interrupts in one place. @@ -130,8 +174,6 @@ */ void __init h7202_init_time(void) { - gettimeoffset = h720x_gettimeoffset; - CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH; CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET; CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START; @@ -139,6 +181,11 @@ setup_irq(IRQ_TIMER0, &h7202_timer_irq); } + +struct sys_timer h7202_timer = { + .init = h7202_init_time, + .offset = h720x_gettimeoffset, +}; void __init h7202_init_irq (void) { diff -Nru a/arch/arm/mach-h720x/h7201-eval.c b/arch/arm/mach-h720x/h7201-eval.c --- a/arch/arm/mach-h720x/h7201-eval.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-h720x/h7201-eval.c 2004-11-10 17:19:04 -08:00 @@ -27,10 +27,7 @@ #include #include #include - -extern void h720x_init_irq (void); -extern void h7201_init_time(void); -extern void __init h720x_map_io(void); +#include "common.h" MACHINE_START(H7201, "Hynix GMS30C7201") MAINTAINER("Robert Schwebel, Pengutronix") @@ -38,5 +35,5 @@ BOOT_PARAMS(0xc0001000) MAPIO(h720x_map_io) INITIRQ(h720x_init_irq) - INITTIME(h7201_init_time) + .timer = &h7201_timer, MACHINE_END diff -Nru a/arch/arm/mach-h720x/h7202-eval.c b/arch/arm/mach-h720x/h7202-eval.c --- a/arch/arm/mach-h720x/h7202-eval.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-h720x/h7202-eval.c 2004-11-10 17:19:02 -08:00 @@ -27,11 +27,7 @@ #include #include #include - -extern void __init init_hw_h7202(void); -extern void __init h7202_init_irq (void); -extern void __init h7202_init_time(void); -extern void __init h720x_map_io(void); +#include "common.h" static struct resource cirrus_resources[] = { [0] = { @@ -80,6 +76,6 @@ BOOT_PARAMS(0x40000100) MAPIO(h720x_map_io) INITIRQ(h7202_init_irq) - INITTIME(h7202_init_time) + .timer = &h7202_timer, INIT_MACHINE(init_eval_h7202) MACHINE_END diff -Nru a/arch/arm/mach-iop3xx/Makefile b/arch/arm/mach-iop3xx/Makefile --- a/arch/arm/mach-iop3xx/Makefile 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-iop3xx/Makefile 2004-11-10 17:19:06 -08:00 @@ -10,7 +10,7 @@ obj-n := obj- := -obj-$(CONFIG_ARCH_IOP321) += iop321-setup.o iop321-irq.o iop321-pci.o iop321-mm.o iop321-time.o +obj-$(CONFIG_ARCH_IOP321) += iop321-setup.o iop321-irq.o iop321-pci.o iop321-time.o obj-$(CONFIG_ARCH_IOP331) += iop331-setup.o iop331-irq.o iop331-pci.o iop331-time.o diff -Nru a/arch/arm/mach-iop3xx/common.c b/arch/arm/mach-iop3xx/common.c --- a/arch/arm/mach-iop3xx/common.c 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/mach-iop3xx/common.c 2004-11-10 17:19:03 -08:00 @@ -28,7 +28,6 @@ * Default power-off for EP80219 */ #include -#include static inline void ep80219_send_to_pic(__u8 c) { } diff -Nru a/arch/arm/mach-iop3xx/iop321-mm.c b/arch/arm/mach-iop3xx/iop321-mm.c --- a/arch/arm/mach-iop3xx/iop321-mm.c 2004-11-10 17:19:04 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,43 +0,0 @@ -/* - * linux/arch/arm/mach-iop3xx/mm.c - * - * Low level memory initialization for IOP321 based systems - * - * Author: Rory Bolt - * Copyright (C) 2002 Rory Bolt - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - */ - -#include -#include - -#include -#include -#include - -#include -#include - - -/* - * Standard IO mapping for all IOP321 based systems - */ -static struct map_desc iop321_std_desc[] __initdata = { - /* virtual physical length type */ - - /* mem mapped registers */ - { IOP321_VIRT_MEM_BASE, IOP321_PHY_MEM_BASE, 0x00002000, MT_DEVICE }, - - /* PCI IO space */ - { 0xfe000000, 0x90000000, 0x00020000, MT_DEVICE } -}; - -void __init iop321_map_io(void) -{ - iotable_init(iop321_std_desc, ARRAY_SIZE(iop321_std_desc)); -} diff -Nru a/arch/arm/mach-iop3xx/iop321-setup.c b/arch/arm/mach-iop3xx/iop321-setup.c --- a/arch/arm/mach-iop3xx/iop321-setup.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-iop3xx/iop321-setup.c 2004-11-10 17:19:04 -08:00 @@ -9,11 +9,21 @@ * published by the Free Software Foundation. * */ +#include +#include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -21,6 +31,52 @@ #include #include +#define IOP321_UART_XTAL 1843200 + +/* + * Standard IO mapping for all IOP321 based systems + */ +static struct map_desc iop321_std_desc[] __initdata = { + /* virtual physical length type */ + + /* mem mapped registers */ + { IOP321_VIRT_MEM_BASE, IOP321_PHY_MEM_BASE, 0x00002000, MT_DEVICE }, + + /* PCI IO space */ + { 0xfe000000, 0x90000000, 0x00020000, MT_DEVICE } +}; + +#ifdef CONFIG_ARCH_IQ80321 +#define UARTBASE IQ80321_UART +#define IRQ_UART IRQ_IQ80321_UART +#endif + +#ifdef CONFIG_ARCH_IQ31244 +#define UARTBASE IQ31244_UART +#define IRQ_UART IRQ_IQ31244_UART +#endif + +static struct uart_port iop321_serial_ports[] = { + { + .membase = (char*)(UARTBASE), + .mapbase = (UARTBASE), + .irq = IRQ_UART, + .flags = UPF_SKIP_TEST, + .iotype = UPIO_MEM, + .regshift = 0, + .uartclk = IOP321_UART_XTAL, + .line = 0, + .type = PORT_16550A, + .fifosize = 16 + } +}; + +void __init iop321_map_io(void) +{ + iotable_init(iop321_std_desc, ARRAY_SIZE(iop321_std_desc)); + early_serial_setup(&iop321_serial_ports[0]); +} + #ifdef CONFIG_ARCH_IQ80321 extern void iq80321_map_io(void); extern struct sys_timer iop321_timer; @@ -33,29 +89,22 @@ extern void iop321_init_time(void); #endif -static void __init -fixup_iop321(struct machine_desc *desc, struct tag *tags, - char **cmdline, struct meminfo *mi) -{ -} - #if defined(CONFIG_ARCH_IQ80321) MACHINE_START(IQ80321, "Intel IQ80321") MAINTAINER("Intel Corporation") - BOOT_MEM(PHYS_OFFSET, IQ80321_UART, 0xfe800000) - FIXUP(fixup_iop321) + BOOT_MEM(PHYS_OFFSET, IQ80321_UART, IQ80321_UART) MAPIO(iq80321_map_io) INITIRQ(iop321_init_irq) - .timer = &iop331_timer, + .timer = &iop321_timer, BOOT_PARAMS(0xa0000100) MACHINE_END #elif defined(CONFIG_ARCH_IQ31244) - MACHINE_START(IQ31244, "Intel IQ31244") +MACHINE_START(IQ31244, "Intel IQ31244") MAINTAINER("Intel Corp.") BOOT_MEM(PHYS_OFFSET, IQ31244_UART, IQ31244_UART) MAPIO(iq31244_map_io) INITIRQ(iop321_init_irq) - .timer = &iop331_timer, + .timer = &iop321_timer, BOOT_PARAMS(0xa0000100) MACHINE_END #else diff -Nru a/arch/arm/mach-iop3xx/iop321-time.c b/arch/arm/mach-iop3xx/iop321-time.c --- a/arch/arm/mach-iop3xx/iop321-time.c 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-iop3xx/iop321-time.c 2004-11-10 17:19:06 -08:00 @@ -29,11 +29,9 @@ #define IOP321_TIME_SYNC 0 -static unsigned long iop321_latch; - static inline unsigned long get_elapsed(void) { - return iop321_latch - *IOP321_TU_TCR0; + return LATCH - *IOP321_TU_TCR0; } static unsigned long iop321_gettimeoffset(void) @@ -55,14 +53,14 @@ asm volatile("mrc p6, 0, %0, c6, c1, 0" : "=r" (tisr2)); if(tisr1 & 1) - elapsed += iop321_latch; + elapsed += LATCH; else if (tisr2 & 1) - elapsed = iop321_latch + get_elapsed(); + elapsed = LATCH + get_elapsed(); /* * Now convert them to usec. */ - usec = (unsigned long)(elapsed * (tick_nsec / 1000)) / iop321_latch; + usec = (unsigned long)(elapsed * (tick_nsec / 1000)) / LATCH; return usec; } @@ -71,35 +69,16 @@ iop321_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { u32 tisr; -#ifdef IOP321_TIME_SYNC - u32 passed; -#define TM_THRESH (iop321_latch*2) -#endif - asm volatile("mrc p6, 0, %0, c6, c1, 0" : "=r" (tisr)); + write_seqlock(&xtime_lock); + asm volatile("mrc p6, 0, %0, c6, c1, 0" : "=r" (tisr)); tisr |= 1; - asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (tisr)); -#ifdef IOP321_TIME_SYNC - passed = 0xffffffff - *IOP321_TU_TCR1; + timer_tick(regs); - do - { - do_timer(regs); - if(passed < TM_THRESH) - break; - if(passed > iop321_latch) - passed -= iop321_latch; - else - passed = 0; - } while(1); - - asm volatile("mcr p6, 0, %0, c3, c1, 0" : : "r" (0xffffffff)); -#else - do_timer(regs); -#endif + write_sequnlock(&xtime_lock); return IRQ_HANDLED; } @@ -114,25 +93,14 @@ { u32 timer_ctl; - iop321_latch = (CLOCK_TICK_RATE + HZ / 2) / HZ; setup_irq(IRQ_IOP321_TIMER0, &iop321_timer_irq); timer_ctl = IOP321_TMR_EN | IOP321_TMR_PRIVILEGED | IOP321_TMR_RELOAD | IOP321_TMR_RATIO_1_1; - asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (iop321_latch)); + asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (LATCH)); asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (timer_ctl)); - -#ifdef IOP321_TIME_SYNC - /* Setup second timer */ - /* setup counter */ - timer_ctl = IOP321_TMR_EN | IOP321_TMR_PRIVILEGED | - IOP321_TMR_RATIO_1_1; - asm volatile("mcr p6, 0, %0, c3, c1, 0" : : "r" (0xffffffff)); - /* setup control */ - asm volatile("mcr p6, 0, %0, c1, c1, 0" : : "r" (timer_ctl)); -#endif } struct sys_timer iop321_timer = { diff -Nru a/arch/arm/mach-iop3xx/iop331-setup.c b/arch/arm/mach-iop3xx/iop331-setup.c --- a/arch/arm/mach-iop3xx/iop331-setup.c 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-iop3xx/iop331-setup.c 2004-11-10 17:19:06 -08:00 @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff -Nru a/arch/arm/mach-iop3xx/iop331-time.c b/arch/arm/mach-iop3xx/iop331-time.c --- a/arch/arm/mach-iop3xx/iop331-time.c 2004-11-10 17:19:07 -08:00 +++ b/arch/arm/mach-iop3xx/iop331-time.c 2004-11-10 17:19:07 -08:00 @@ -27,13 +27,9 @@ #include #include -#undef IOP331_TIME_SYNC - -static unsigned long iop331_latch; - static inline unsigned long get_elapsed(void) { - return iop331_latch - *IOP331_TU_TCR0; + return LATCH - *IOP331_TU_TCR0; } static unsigned long iop331_gettimeoffset(void) @@ -55,14 +51,14 @@ asm volatile("mrc p6, 0, %0, c6, c1, 0" : "=r" (tisr2)); if(tisr1 & 1) - elapsed += iop331_latch; + elapsed += LATCH; else if (tisr2 & 1) - elapsed = iop331_latch + get_elapsed(); + elapsed = LATCH + get_elapsed(); /* * Now convert them to usec. */ - usec = (unsigned long)(elapsed * (tick_nsec / 1000)) / iop331_latch; + usec = (unsigned long)(elapsed * (tick_nsec / 1000)) / LATCH; return usec; } @@ -71,36 +67,16 @@ iop331_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { u32 tisr; -#ifdef IOP331_TIME_SYNC - u32 passed; -#define TM_THRESH (iop331_latch*2) -#endif - asm volatile("mrc p6, 0, %0, c6, c1, 0" : "=r" (tisr)); + write_seqlock(&xtime_lock); + asm volatile("mrc p6, 0, %0, c6, c1, 0" : "=r" (tisr)); tisr |= 1; - asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (tisr)); -#ifdef IOP331_TIME_SYNC - passed = 0xffffffff - *IOP331_TU_TCR1; - - do - { - do_timer(regs); - if(passed < TM_THRESH) - break; - if(passed > iop331_latch) - passed -= iop331_latch; - else - passed = 0; - } while(1); - - asm volatile("mcr p6, 0, %0, c3, c1, 0" : : "r" (0xffffffff)); -#else - do_timer(regs); -#endif + timer_tick(regs); + write_sequnlock(&xtime_lock); return IRQ_HANDLED; } @@ -114,25 +90,15 @@ { u32 timer_ctl; - iop331_latch = (CLOCK_TICK_RATE + HZ / 2) / HZ; setup_irq(IRQ_IOP331_TIMER0, &iop331_timer_irq); timer_ctl = IOP331_TMR_EN | IOP331_TMR_PRIVILEGED | IOP331_TMR_RELOAD | IOP331_TMR_RATIO_1_1; - asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (iop331_latch)); + asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (LATCH)); asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (timer_ctl)); -#ifdef IOP331_TIME_SYNC - /* Setup second timer */ - /* setup counter */ - timer_ctl = IOP331_TMR_EN | IOP331_TMR_PRIVILEGED | - IOP331_TMR_RATIO_1_1; - asm volatile("mcr p6, 0, %0, c3, c1, 0" : : "r" (0xffffffff)); - /* setup control */ - asm volatile("mcr p6, 0, %0, c1, c1, 0" : : "r" (timer_ctl)); -#endif } struct sys_timer iop331_timer = { diff -Nru a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c --- a/arch/arm/mach-ixp2000/core.c 2004-11-10 17:19:07 -08:00 +++ b/arch/arm/mach-ixp2000/core.c 2004-11-10 17:19:07 -08:00 @@ -33,10 +33,8 @@ #include #include #include -#include #include #include -#include #include #include diff -Nru a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c --- a/arch/arm/mach-ixp2000/enp2611.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-ixp2000/enp2611.c 2004-11-10 17:19:04 -08:00 @@ -26,9 +26,6 @@ #include #include #include -#include -#include -#include #include #include #include diff -Nru a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c --- a/arch/arm/mach-ixp2000/ixdp2400.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-ixp2000/ixdp2400.c 2004-11-10 17:19:04 -08:00 @@ -23,9 +23,6 @@ #include #include #include -#include -#include -#include #include #include #include diff -Nru a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c --- a/arch/arm/mach-ixp2000/ixdp2800.c 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mach-ixp2000/ixdp2800.c 2004-11-10 17:19:05 -08:00 @@ -23,9 +23,6 @@ #include #include #include -#include -#include -#include #include #include #include diff -Nru a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c --- a/arch/arm/mach-ixp2000/ixdp2x00.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-ixp2000/ixdp2x00.c 2004-11-10 17:19:02 -08:00 @@ -23,9 +23,6 @@ #include #include #include -#include -#include -#include #include #include #include diff -Nru a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c --- a/arch/arm/mach-ixp2000/ixdp2x01.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-ixp2000/ixdp2x01.c 2004-11-10 17:19:02 -08:00 @@ -23,9 +23,6 @@ #include #include #include -#include -#include -#include #include #include #include diff -Nru a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c --- a/arch/arm/mach-ixp4xx/common-pci.c 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-ixp4xx/common-pci.c 2004-11-10 17:19:06 -08:00 @@ -33,7 +33,6 @@ #include #include #include -#include /* diff -Nru a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c --- a/arch/arm/mach-ixp4xx/common.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-ixp4xx/common.c 2004-11-10 17:19:04 -08:00 @@ -261,7 +261,7 @@ setup_irq(IRQ_IXP4XX_TIMER1, &ixp4xx_timer_irq); } -struct ixp4xx_timer = { +struct sys_timer ixp4xx_timer = { .init = ixp4xx_timer_init, .offset = ixp4xx_gettimeoffset, }; diff -Nru a/arch/arm/mach-lh7a40x/arch-kev7a400.c b/arch/arm/mach-lh7a40x/arch-kev7a400.c --- a/arch/arm/mach-lh7a40x/arch-kev7a400.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-lh7a40x/arch-kev7a400.c 2004-11-10 17:19:02 -08:00 @@ -17,7 +17,6 @@ #include #include #include -#include /* io_p2v() */ #include #include #include diff -Nru a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c --- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c 2004-11-10 17:19:02 -08:00 @@ -17,7 +17,6 @@ #include #include #include -#include /* io_p2v() */ #include #include #include diff -Nru a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig --- a/arch/arm/mach-omap/Kconfig 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/mach-omap/Kconfig 2004-11-10 17:19:03 -08:00 @@ -5,58 +5,56 @@ comment "OMAP Core Type" config ARCH_OMAP730 + depends on ARCH_OMAP bool "OMAP730 Based System" - select CPU_ARM926T + select ARCH_OMAP_OTG config ARCH_OMAP1510 + depends on ARCH_OMAP default y bool "OMAP1510 Based System" - select CPU_ARM925T - select CPU_DCACHE_WRITETHROUGH -config ARCH_OMAP1610 - bool "OMAP1610 Based System" - select CPU_ARM926T - -config ARCH_OMAP5912 - bool "OMAP5912 Based System" - select CPU_ARM926T +config ARCH_OMAP16XX + depends on ARCH_OMAP + bool "OMAP16XX Based System" + select ARCH_OMAP_OTG + +config ARCH_OMAP_OTG + bool comment "OMAP Board Type" config MACH_OMAP_INNOVATOR bool "TI Innovator" - default y - depends on ARCH_OMAP1510 || ARCH_OMAP1610 + depends on ARCH_OMAP1510 || ARCH_OMAP16XX help TI OMAP 1510 or 1610 Innovator board support. Say Y here if you have such a board. config MACH_OMAP_H2 bool "TI H2 Support" - depends on ARCH_OMAP1610 - select MACH_OMAP_INNOVATOR + depends on ARCH_OMAP16XX help - TI OMAP 1610 H2 board support. Say Y here if you have such + TI OMAP 1610/1611B H2 board support. Say Y here if you have such a board. config MACH_OMAP_H3 bool "TI H3 Support" - depends on ARCH_OMAP1610 + depends on ARCH_OMAP16XX help - TI OMAP 1610 H3 board support. Say Y here if you have such + TI OMAP 1710 H3 board support. Say Y here if you have such a board. config MACH_OMAP_H4 bool "TI H4 Support" - depends on ARCH_OMAP1610 + depends on ARCH_OMAP16XX help TI OMAP 1610 H4 board support. Say Y here if you have such a board. config MACH_OMAP_OSK bool "TI OSK Support" - depends on ARCH_OMAP5912 + depends on ARCH_OMAP16XX help TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here if you have such a board. @@ -64,19 +62,16 @@ config MACH_OMAP_PERSEUS2 bool "TI Perseus2" depends on ARCH_OMAP730 - select LEDS - select LEDS_TIMER - select LEDS_CPU help Support for TI OMAP 730 Perseus2 board. Say Y here if you have such a board. config MACH_OMAP_GENERIC bool "Generic OMAP board" - depends on ARCH_OMAP1510 || ARCH_OMAP1610 + depends on ARCH_OMAP1510 || ARCH_OMAP16XX help - Support for generic OMAP-1510 or 1610 board with no - FPGA. Can be used as template for porting Linux to + Support for generic OMAP-1510, 1610 or 1710 board with + no FPGA. Can be used as template for porting Linux to custom OMAP boards. Say Y here if you have a custom board. @@ -84,6 +79,7 @@ #config OMAP_BOOT_TAG # bool "OMAP bootloader information passing" +# depends on ARCH_OMAP # default n # help # Say Y, if you have a bootloader which passes information @@ -91,6 +87,7 @@ config OMAP_MUX bool "OMAP multiplexing support" + depends on ARCH_OMAP default y help Pin multiplexing support for OMAP boards. If your bootloader @@ -106,8 +103,18 @@ This is useful if you want to find out the correct values of the multiplexing registers. +config OMAP_MUX_WARNINGS + bool "Warn about pins the bootloader didn't set up" + depends on OMAP_MUX + default y + help + Choose Y here to warn whenever driver initialization logic needs + to change the pin multiplexing setup. When there are no warnings + printed, it's safe to deselect OMAP_MUX for your product. + choice prompt "Low-level debug console UART" + depends on ARCH_OMAP default OMAP_LL_DEBUG_UART1 config OMAP_LL_DEBUG_UART1 @@ -129,7 +136,7 @@ config OMAP_ARM_192MHZ bool "OMAP ARM 192 MHz CPU" - depends on ARCH_OMAP1610 || ARCH_OMAP5912 + depends on ARCH_OMAP16XX help Enable 192MHz clock for OMAP CPU. If unsure, say N. @@ -141,26 +148,26 @@ config OMAP_ARM_168MHZ bool "OMAP ARM 168 MHz CPU" - depends on ARCH_OMAP1510 || ARCH_OMAP1610 || ARCH_OMAP730 || ARCH_OMAP5912 + depends on ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730 help Enable 168MHz clock for OMAP CPU. If unsure, say N. config OMAP_ARM_120MHZ bool "OMAP ARM 120 MHz CPU" - depends on ARCH_OMAP1510 || ARCH_OMAP1610 || ARCH_OMAP730 + depends on ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730 help Enable 120MHz clock for OMAP CPU. If unsure, say N. config OMAP_ARM_60MHZ bool "OMAP ARM 60 MHz CPU" - depends on ARCH_OMAP1510 || ARCH_OMAP1610 || ARCH_OMAP730 + depends on ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730 default y help Enable 60MHz clock for OMAP CPU. If unsure, say Y. config OMAP_ARM_30MHZ bool "OMAP ARM 30 MHz CPU" - depends on ARCH_OMAP1510 || ARCH_OMAP1610 || ARCH_OMAP730 + depends on ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730 help Enable 30MHz clock for OMAP CPU. If unsure, say N. diff -Nru a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile --- a/arch/arm/mach-omap/Makefile 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/mach-omap/Makefile 2004-11-10 17:19:03 -08:00 @@ -3,7 +3,7 @@ # # Common support -obj-y := common.o time.o irq.o dma.o clocks.o mux.o gpio.o mcbsp.o +obj-y := common.o time.o irq.o dma.o clock.o mux.o gpio.o mcbsp.o usb.o obj-m := obj-n := obj- := @@ -18,9 +18,7 @@ obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o # OCPI interconnect support for 1710, 1610 and 5912 -obj-$(CONFIG_ARCH_OMAP1710) += ocpi.o -obj-$(CONFIG_ARCH_OMAP1610) += ocpi.o -obj-$(CONFIG_ARCH_OMAP5912) += ocpi.o +obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o # LEDs support led-$(CONFIG_MACH_OMAP_H2) += leds-h2p2-debug.o diff -Nru a/arch/arm/mach-omap/board-generic.c b/arch/arm/mach-omap/board-generic.c --- a/arch/arm/mach-omap/board-generic.c 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mach-omap/board-generic.c 2004-11-10 17:19:05 -08:00 @@ -22,42 +22,21 @@ #include #include -#include #include #include #include #include +#include #include "common.h" +static int __initdata generic_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; + static void __init omap_generic_init_irq(void) { omap_init_irq(); } -/* - * Muxes the serial ports on - */ -#ifdef CONFIG_ARCH_OMAP1510 -static void __init omap_early_serial_init(void) -{ -#ifdef CONFIG_OMAP_LL_DEBUG_UART1 - omap_cfg_reg(UART1_TX); - omap_cfg_reg(UART1_RTS); -#endif - -#ifdef CONFIG_OMAP_LL_DEBUG_UART2 - omap_cfg_reg(UART2_TX); - omap_cfg_reg(UART2_RTS); -#endif - -#ifdef CONFIG_OMAP_LL_DEBUG_UART1 - omap_cfg_reg(UART3_TX); - omap_cfg_reg(UART3_RX); -#endif -} -#endif - /* assume no Mini-AB port */ #ifdef CONFIG_ARCH_OMAP1510 @@ -69,7 +48,7 @@ }; #endif -#ifdef CONFIG_ARCH_OMAP1610 +#if defined(CONFIG_ARCH_OMAP16XX) static struct omap_usb_config generic1610_usb_config __initdata = { .register_host = 1, .register_dev = 1, @@ -91,17 +70,17 @@ */ #ifdef CONFIG_ARCH_OMAP1510 if (cpu_is_omap1510()) { - omap_early_serial_init(); generic_config[0].data = &generic1510_usb_config; } #endif -#ifdef CONFIG_ARCH_OMAP1610 +#if defined(CONFIG_ARCH_OMAP16XX) if (!cpu_is_omap1510()) { generic_config[0].data = &generic1610_usb_config; } #endif omap_board_config = generic_config; omap_board_config_size = ARRAY_SIZE(generic_config); + omap_serial_init(generic_serial_ports); } static void __init omap_generic_map_io(void) diff -Nru a/arch/arm/mach-omap/board-h2.c b/arch/arm/mach-omap/board-h2.c --- a/arch/arm/mach-omap/board-h2.c 2004-11-10 17:19:07 -08:00 +++ b/arch/arm/mach-omap/board-h2.c 2004-11-10 17:19:07 -08:00 @@ -32,14 +32,11 @@ #include #include #include +#include #include "common.h" -static struct map_desc h2_io_desc[] __initdata = { -{ OMAP1610_ETHR_BASE, OMAP1610_ETHR_START, OMAP1610_ETHR_SIZE,MT_DEVICE }, -{ OMAP1610_NOR_FLASH_BASE, OMAP1610_NOR_FLASH_START, OMAP1610_NOR_FLASH_SIZE, - MT_DEVICE }, -}; +static int __initdata h2_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; static struct resource h2_smc91x_resources[] = { [0] = { @@ -78,15 +75,22 @@ .hmc_mode = 19, // 0:host(off) 1:dev|otg 2:disabled // .hmc_mode = 21, // 0:host(off) 1:dev(loopback) 2:host(loopback) #elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) - /* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */ + /* needs OTG cable, or NONSTANDARD (B-to-MiniB) */ .hmc_mode = 20, // 1:dev|otg(off) 1:host 2:disabled #endif .pins[1] = 3, }; +static struct omap_mmc_config h2_mmc_config __initdata = { + .mmc_blocks = 1, + .mmc1_power_pin = -1, /* tps65010 gpio3 */ + .mmc1_switch_pin = OMAP_MPUIO(1), +}; + static struct omap_board_config_kernel h2_config[] = { { OMAP_TAG_USB, &h2_usb_config }, + { OMAP_TAG_MMC, &h2_mmc_config }, }; static void __init h2_init(void) @@ -99,7 +103,7 @@ static void __init h2_map_io(void) { omap_map_io(); - iotable_init(h2_io_desc, ARRAY_SIZE(h2_io_desc)); + omap_serial_init(h2_serial_ports); } MACHINE_START(OMAP_H2, "TI-H2") diff -Nru a/arch/arm/mach-omap/board-h3.c b/arch/arm/mach-omap/board-h3.c --- a/arch/arm/mach-omap/board-h3.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-omap/board-h3.c 2004-11-10 17:19:02 -08:00 @@ -30,6 +30,8 @@ #include #include #include +#include + #include "common.h" void h3_init_irq(void) @@ -37,6 +39,8 @@ omap_init_irq(); } +static int __initdata h3_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; + static struct resource smc91x_resources[] = { [0] = { .start = OMAP1710_ETHR_START, /* Physical */ @@ -66,15 +70,10 @@ (void) platform_add_devices(devices, ARRAY_SIZE(devices)); } -static struct map_desc h3_io_desc[] __initdata = { -{ OMAP1710_ETHR_BASE, OMAP1710_ETHR_START, OMAP1710_ETHR_SIZE, MT_DEVICE }, -{ OMAP_NOR_FLASH_BASE, OMAP_NOR_FLASH_START, OMAP_NOR_FLASH_SIZE, MT_DEVICE }, -}; - static void __init h3_map_io(void) { omap_map_io(); - iotable_init(h3_io_desc, ARRAY_SIZE(h3_io_desc)); + omap_serial_init(h3_serial_ports); } MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") diff -Nru a/arch/arm/mach-omap/board-innovator.c b/arch/arm/mach-omap/board-innovator.c --- a/arch/arm/mach-omap/board-innovator.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-omap/board-innovator.c 2004-11-10 17:19:02 -08:00 @@ -30,6 +30,7 @@ #include #include #include +#include #include "common.h" @@ -43,6 +44,8 @@ MT_DEVICE }, }; +static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; + static struct resource innovator1510_smc91x_resources[] = { [0] = { .start = OMAP1510_FPGA_ETHR_START, /* Physical */ @@ -69,18 +72,12 @@ #endif /* CONFIG_ARCH_OMAP1510 */ -#ifdef CONFIG_ARCH_OMAP1610 - -static struct map_desc innovator1610_io_desc[] __initdata = { -{ OMAP1610_ETHR_BASE, OMAP1610_ETHR_START, OMAP1610_ETHR_SIZE,MT_DEVICE }, -{ OMAP1610_NOR_FLASH_BASE, OMAP1610_NOR_FLASH_START, OMAP1610_NOR_FLASH_SIZE, - MT_DEVICE }, -}; +#ifdef CONFIG_ARCH_OMAP16XX static struct resource innovator1610_smc91x_resources[] = { [0] = { - .start = OMAP1610_ETHR_START, /* Physical */ - .end = OMAP1610_ETHR_START + SZ_4K, + .start = INNOVATOR1610_ETHR_START, /* Physical */ + .end = INNOVATOR1610_ETHR_START + SZ_4K, .flags = IORESOURCE_MEM, }, [1] = { @@ -101,7 +98,7 @@ &innovator1610_smc91x_device, }; -#endif /* CONFIG_ARCH_OMAP1610 */ +#endif /* CONFIG_ARCH_OMAP16XX */ void innovator_init_irq(void) { @@ -116,16 +113,19 @@ #ifdef CONFIG_ARCH_OMAP1510 static struct omap_usb_config innovator1510_usb_config __initdata = { - /* has usb host and device, but no Mini-AB port */ + /* for bundled non-standard host and peripheral cables */ + .hmc_mode = 4, + .register_host = 1, + .pins[1] = 6, + .pins[2] = 6, /* Conflicts with UART2 */ + .register_dev = 1, - /* Assume bad Innovator wiring; Use internal host only with custom cable */ - .hmc_mode = 16, .pins[0] = 2, }; #endif -#ifdef CONFIG_ARCH_OMAP1610 +#ifdef CONFIG_ARCH_OMAP16XX static struct omap_usb_config h2_usb_config __initdata = { /* usb1 has a Mini-AB port and external isp1301 transceiver */ .otg = 2, @@ -153,7 +153,7 @@ platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices)); } #endif -#ifdef CONFIG_ARCH_OMAP1610 +#ifdef CONFIG_ARCH_OMAP16XX if (!cpu_is_omap1510()) { platform_add_devices(innovator1610_devices, ARRAY_SIZE(innovator1610_devices)); } @@ -163,7 +163,7 @@ if (cpu_is_omap1510()) innovator_config[0].data = &innovator1510_usb_config; #endif -#ifdef CONFIG_ARCH_OMAP1610 +#ifdef CONFIG_ARCH_OMAP16XX if (cpu_is_omap1610()) innovator_config[0].data = &h2_usb_config; #endif @@ -187,11 +187,7 @@ fpga_read(OMAP1510_FPGA_BOARD_REV)); } #endif -#ifdef CONFIG_ARCH_OMAP1610 - if (!cpu_is_omap1510()) { - iotable_init(innovator1610_io_desc, ARRAY_SIZE(innovator1610_io_desc)); - } -#endif + omap_serial_init(innovator_serial_ports); } MACHINE_START(OMAP_INNOVATOR, "TI-Innovator") diff -Nru a/arch/arm/mach-omap/board-osk.c b/arch/arm/mach-omap/board-osk.c --- a/arch/arm/mach-omap/board-osk.c 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-omap/board-osk.c 2004-11-10 17:19:06 -08:00 @@ -38,15 +38,18 @@ #include #include #include +#include +#include #include "common.h" static struct map_desc osk5912_io_desc[] __initdata = { -{ OMAP_OSK_ETHR_BASE, OMAP_OSK_ETHR_START, OMAP_OSK_ETHR_SIZE,MT_DEVICE }, { OMAP_OSK_NOR_FLASH_BASE, OMAP_OSK_NOR_FLASH_START, OMAP_OSK_NOR_FLASH_SIZE, MT_DEVICE }, }; +static int __initdata osk_serial_ports[OMAP_MAX_NR_PORTS] = {1, 0, 0}; + static struct resource osk5912_smc91x_resources[] = { [0] = { .start = OMAP_OSK_ETHR_START, /* Physical */ @@ -76,16 +79,29 @@ omap_init_irq(); } +static struct omap_usb_config osk_usb_config __initdata = { + /* has usb host and device, but no Mini-AB port */ + .register_host = 1, + .hmc_mode = 16, + .pins[0] = 2, +}; + +static struct omap_board_config_kernel osk_config[] = { + { OMAP_TAG_USB, &osk_usb_config }, +}; + static void __init osk_init(void) { platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices)); + omap_board_config = osk_config; + omap_board_config_size = ARRAY_SIZE(osk_config); } static void __init osk_map_io(void) { omap_map_io(); iotable_init(osk5912_io_desc, ARRAY_SIZE(osk5912_io_desc)); - + omap_serial_init(osk_serial_ports); } MACHINE_START(OMAP_OSK, "TI-OSK") diff -Nru a/arch/arm/mach-omap/board-perseus2.c b/arch/arm/mach-omap/board-perseus2.c --- a/arch/arm/mach-omap/board-perseus2.c 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mach-omap/board-perseus2.c 2004-11-10 17:19:05 -08:00 @@ -24,6 +24,7 @@ #include #include #include +#include #include "common.h" @@ -45,6 +46,8 @@ }, }; +static int __initdata p2_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 0}; + static struct platform_device smc91x_device = { .name = "smc91x", .id = 0, @@ -104,6 +107,7 @@ * It is used as the Ethernet controller interrupt */ omap_writel(omap_readl(OMAP730_IO_CONF_9) & 0x1FFFFFFF, OMAP730_IO_CONF_9); + omap_serial_init(p2_serial_ports); } MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2") diff -Nru a/arch/arm/mach-omap/clock.c b/arch/arm/mach-omap/clock.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-omap/clock.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,955 @@ +/* + * linux/arch/arm/mach-omap/clock.c + * + * Copyright (C) 2004 Nokia corporation + * Written by Tuukka Tikkanen + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "clock.h" + +static LIST_HEAD(clocks); +static DECLARE_MUTEX(clocks_sem); +static spinlock_t clockfw_lock = SPIN_LOCK_UNLOCKED; +static void propagate_rate(struct clk * clk); +/* MPU virtual clock functions */ +static int select_table_rate(unsigned long rate); +static long round_to_table_rate(unsigned long rate); +void clk_setdpll(__u16, __u16); + +struct mpu_rate rate_table[] = { + /* MPU MHz, xtal MHz, dpll1 MHz, CKCTL, DPLL_CTL + * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv + */ +#if defined(CONFIG_OMAP_ARM_216MHZ) && defined(CONFIG_ARCH_OMAP16XX) + { 216000000, 12000000, 216000000, 0x050d, 0x2910 }, /* 1/1/2/2/2/8 */ +#endif +#if defined(CONFIG_OMAP_ARM_195MHZ) && defined(CONFIG_ARCH_OMAP730) + { 195000000, 13000000, 195000000, 0x050e, 0x2790 }, /* 1/1/2/2/4/8 */ +#endif +#if defined(CONFIG_OMAP_ARM_192MHZ) && defined(CONFIG_ARCH_OMAP16XX) + { 192000000, 19200000, 192000000, 0x050f, 0x2510 }, /* 1/1/2/2/8/8 */ + { 192000000, 12000000, 192000000, 0x050f, 0x2810 }, /* 1/1/2/2/8/8 */ + { 96000000, 12000000, 192000000, 0x055f, 0x2810 }, /* 2/2/2/2/8/8 */ + { 48000000, 12000000, 192000000, 0x0ccf, 0x2810 }, /* 4/4/4/4/8/8 */ + { 24000000, 12000000, 192000000, 0x0fff, 0x2810 }, /* 8/8/8/8/8/8 */ +#endif +#if defined(CONFIG_OMAP_ARM_182MHZ) && defined(CONFIG_ARCH_OMAP730) + { 182000000, 13000000, 182000000, 0x050e, 0x2710 }, /* 1/1/2/2/4/8 */ +#endif +#if defined(CONFIG_OMAP_ARM_168MHZ) + { 168000000, 12000000, 168000000, 0x010f, 0x2710 }, /* 1/1/1/2/8/8 */ +#endif +#if defined(CONFIG_OMAP_ARM_120MHZ) + { 120000000, 12000000, 120000000, 0x010a, 0x2510 }, /* 1/1/1/2/4/4 */ +#endif +#if defined(CONFIG_OMAP_ARM_96MHZ) + { 96000000, 12000000, 96000000, 0x0005, 0x2410 }, /* 1/1/1/1/2/2 */ +#endif +#if defined(CONFIG_OMAP_ARM_60MHZ) + { 60000000, 12000000, 60000000, 0x0005, 0x2290 }, /* 1/1/1/1/2/2 */ +#endif +#if defined(CONFIG_OMAP_ARM_30MHZ) + { 30000000, 12000000, 60000000, 0x0555, 0x2290 }, /* 2/2/2/2/2/2 */ +#endif + { 0, 0, 0, 0, 0 }, +}; + + +static void ckctl_recalc(struct clk * clk) +{ + int dsor; + + /* Calculate divisor encoded as 2-bit exponent */ + dsor = 1 << (3 & (omap_readw(ARM_CKCTL) >> clk->rate_offset)); + if (unlikely(clk->rate == clk->parent->rate / dsor)) + return; /* No change, quick exit */ + clk->rate = clk->parent->rate / dsor; + + if (unlikely(clk->flags & RATE_PROPAGATES)) + propagate_rate(clk); +} + + +static void followparent_recalc(struct clk * clk) +{ + clk->rate = clk->parent->rate; +} + + +static void watchdog_recalc(struct clk * clk) +{ + clk->rate = clk->parent->rate / 14; +} + + +static struct clk ck_ref = { + .name = "ck_ref", + .rate = 12000000, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + ALWAYS_ENABLED, +}; + +static struct clk ck_dpll1 = { + .name = "ck_dpll1", + .parent = &ck_ref, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + RATE_PROPAGATES | ALWAYS_ENABLED, +}; + +static struct clk ck_dpll1out = { + .name = "ck_dpll1out", + .parent = &ck_dpll1, + .flags = CLOCK_IN_OMAP16XX, + .enable_reg = ARM_IDLECT2, + .enable_bit = EN_CKOUT_ARM, + .recalc = &followparent_recalc, +}; + +static struct clk arm_ck = { + .name = "arm_ck", + .parent = &ck_dpll1, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + RATE_CKCTL | RATE_PROPAGATES | ALWAYS_ENABLED, + .rate_offset = CKCTL_ARMDIV_OFFSET, + .recalc = &ckctl_recalc, +}; + +static struct clk armper_ck = { + .name = "armper_ck", + .parent = &ck_dpll1, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + RATE_CKCTL, + .enable_reg = ARM_IDLECT2, + .enable_bit = EN_PERCK, + .rate_offset = CKCTL_PERDIV_OFFSET, + .recalc = &ckctl_recalc, +}; + +static struct clk arm_gpio_ck = { + .name = "arm_gpio_ck", + .parent = &ck_dpll1, + .flags = CLOCK_IN_OMAP1510, + .enable_reg = ARM_IDLECT2, + .enable_bit = EN_GPIOCK, + .recalc = &followparent_recalc, +}; + +static struct clk armxor_ck = { + .name = "armxor_ck", + .parent = &ck_ref, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX, + .enable_reg = ARM_IDLECT2, + .enable_bit = EN_XORPCK, + .recalc = &followparent_recalc, +}; + +static struct clk armtim_ck = { + .name = "armtim_ck", + .parent = &ck_ref, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX, + .enable_reg = ARM_IDLECT2, + .enable_bit = EN_TIMCK, + .recalc = &followparent_recalc, +}; + +static struct clk armwdt_ck = { + .name = "armwdt_ck", + .parent = &ck_ref, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX, + .enable_reg = ARM_IDLECT2, + .enable_bit = EN_WDTCK, + .recalc = &watchdog_recalc, +}; + +static struct clk arminth_ck1610 = { + .name = "arminth_ck", + .parent = &arm_ck, + .flags = CLOCK_IN_OMAP16XX, + .recalc = &followparent_recalc, + /* Note: On 1610/1710 frequency can be divided by 2 by programming + * ARM_CKCTL:ARM_INTHCK_SEL(14) to 1 + * + * 1510 version is in TC clocks. + */ +}; + +static struct clk dsp_ck = { + .name = "dsp_ck", + .parent = &ck_dpll1, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + RATE_CKCTL, + .enable_reg = ARM_CKCTL, + .enable_bit = EN_DSPCK, + .rate_offset = CKCTL_DSPDIV_OFFSET, + .recalc = &ckctl_recalc, +}; + +static struct clk dspmmu_ck = { + .name = "dspmmu_ck", + .parent = &ck_dpll1, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + RATE_CKCTL | ALWAYS_ENABLED, + .rate_offset = CKCTL_DSPMMUDIV_OFFSET, + .recalc = &ckctl_recalc, +}; + +static struct clk tc_ck = { + .name = "tc_ck", + .parent = &ck_dpll1, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + RATE_CKCTL | RATE_PROPAGATES | ALWAYS_ENABLED, + .rate_offset = CKCTL_TCDIV_OFFSET, + .recalc = &ckctl_recalc, +}; + +static struct clk arminth_ck1510 = { + .name = "arminth_ck", + .parent = &tc_ck, + .flags = CLOCK_IN_OMAP1510, + .recalc = &followparent_recalc, + /* Note: On 1510 frequency follows TC_CK + * + * 1610/1710 version is in MPU clocks. + */ +}; + +static struct clk tipb_ck = { + .name = "tibp_ck", + .parent = &tc_ck, + .flags = CLOCK_IN_OMAP1510, + .recalc = &followparent_recalc, +}; + +static struct clk l3_ocpi_ck = { + .name = "l3_ocpi_ck", + .parent = &tc_ck, + .flags = CLOCK_IN_OMAP16XX, + .enable_reg = ARM_IDLECT3, + .enable_bit = EN_OCPI_CK, + .recalc = &followparent_recalc, +}; + +static struct clk tc1_ck = { + .name = "tc1_ck", + .parent = &tc_ck, + .flags = CLOCK_IN_OMAP16XX, + .enable_reg = ARM_IDLECT3, + .enable_bit = EN_TC1_CK, + .recalc = &followparent_recalc, +}; + +static struct clk tc2_ck = { + .name = "tc2_ck", + .parent = &tc_ck, + .flags = CLOCK_IN_OMAP16XX, + .enable_reg = ARM_IDLECT3, + .enable_bit = EN_TC2_CK, + .recalc = &followparent_recalc, +}; + +static struct clk dma_ck = { + .name = "dma_ck", + .parent = &tc_ck, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX, + .recalc = &followparent_recalc, +}; + +static struct clk dma_lcdfree_ck = { + .name = "dma_lcdfree_ck", + .parent = &tc_ck, + .flags = CLOCK_IN_OMAP16XX, + .recalc = &followparent_recalc, +}; + +static struct clk api_ck = { + .name = "api_ck", + .parent = &tc_ck, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX, + .enable_reg = ARM_IDLECT2, + .enable_bit = EN_APICK, + .recalc = &followparent_recalc, +}; + +static struct clk lb_ck = { + .name = "lb_ck", + .parent = &tc_ck, + .flags = CLOCK_IN_OMAP1510, + .enable_reg = ARM_IDLECT2, + .enable_bit = EN_LBCK, + .recalc = &followparent_recalc, +}; + +static struct clk rhea1_ck = { + .name = "rhea1_ck", + .parent = &tc_ck, + .flags = CLOCK_IN_OMAP16XX, + .recalc = &followparent_recalc, +}; + +static struct clk rhea2_ck = { + .name = "rhea2_ck", + .parent = &tc_ck, + .flags = CLOCK_IN_OMAP16XX, + .recalc = &followparent_recalc, +}; + +static struct clk lcd_ck = { + .name = "lcd_ck", + .parent = &ck_dpll1, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + RATE_CKCTL, + .enable_reg = ARM_IDLECT2, + .enable_bit = EN_LCDCK, + .rate_offset = CKCTL_LCDDIV_OFFSET, + .recalc = &ckctl_recalc, +}; + +static struct clk uart1_ck = { + .name = "uart1_ck", + /* Direct from ULPD, no parent */ + .rate = 48000000, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + RATE_FIXED | ENABLE_REG_32BIT, + .enable_reg = MOD_CONF_CTRL_0, + .enable_bit = 29, + /* (Only on 1510) + * The "enable bit" actually chooses between 48MHz and 12MHz. + */ +}; + +static struct clk uart2_ck = { + .name = "uart2_ck", + /* Direct from ULPD, no parent */ + .rate = 48000000, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + RATE_FIXED | ENABLE_REG_32BIT, + .enable_reg = MOD_CONF_CTRL_0, + .enable_bit = 30, + /* (1510/1610/1710) + * The "enable bit" actually chooses between 48MHz and 12MHz/32kHz. + */ +}; + +static struct clk uart3_ck = { + .name = "uart3_ck", + /* Direct from ULPD, no parent */ + .rate = 48000000, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + RATE_FIXED | ENABLE_REG_32BIT, + .enable_reg = MOD_CONF_CTRL_0, + .enable_bit = 31, + /* (Only on 1510) + * The "enable bit" actually chooses between 48MHz and 12MHz. + */ +}; + +static struct clk usb_ck1610 = { + .name = "usb_ck", + /* Direct from ULPD, no parent */ + .rate = 48000000, + .flags = CLOCK_IN_OMAP16XX | + RATE_FIXED | ENABLE_REG_32BIT, + .enable_reg = ULPD_CLOCK_CTRL, + .enable_bit = USB_MCLK_EN, +}; + +static struct clk usb_ck1510 = { + .name = "usb_ck", + /* Direct from ULPD, no parent */ + .rate = 48000000, + .flags = CLOCK_IN_OMAP1510 | RATE_FIXED, +}; + +static struct clk usb_hhc_ck = { + .name = "usb_hhc_ck", + /* Direct from ULPD, no parent */ + .rate = 48000000, /* Actually 2 clocks, 12MHz and 48MHz */ + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + RATE_FIXED | ENABLE_REG_32BIT, + .enable_reg = MOD_CONF_CTRL_0, + .enable_bit = USB_HOST_HHC_UHOST_EN, +}; + +/* To be done -- +static struct clk mclk = { + .name = "mclk", +}; + +static struct clk bclk = { + .name = "bclk", +}; +-- to be done */ + +static struct clk mmc1_ck = { + .name = "mmc1_ck", + /* Functional clock is direct from ULPD, interface clock is ARMPER */ + .parent = &armper_ck, + .rate = 48000000, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + RATE_FIXED | ENABLE_REG_32BIT, + .enable_reg = MOD_CONF_CTRL_0, + .enable_bit = 23, +}; + +static struct clk mmc2_ck = { + .name = "mmc2_ck", + /* Functional clock is direct from ULPD, interface clock is ARMPER */ + .parent = &armper_ck, + .rate = 48000000, + .flags = CLOCK_IN_OMAP16XX | + RATE_FIXED | ENABLE_REG_32BIT, + .enable_reg = MOD_CONF_CTRL_0, + .enable_bit = 20, +}; + +static struct clk virtual_ck_mpu = { + .name = "mpu", + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + VIRTUAL_CLOCK | ALWAYS_ENABLED, + .parent = &arm_ck, /* Is smarter alias for */ + .recalc = &followparent_recalc, + .set_rate = &select_table_rate, + .round_rate = &round_to_table_rate, +}; + + +static struct clk * onchip_clks[] = { + /* non-ULPD clocks */ + &ck_ref, + &ck_dpll1, + /* CK_GEN1 clocks */ + &ck_dpll1out, + &arm_ck, + &armper_ck, + &arm_gpio_ck, + &armxor_ck, + &armtim_ck, + &armwdt_ck, + &arminth_ck1510, + &arminth_ck1610, + /* CK_GEN2 clocks */ + &dsp_ck, + &dspmmu_ck, + /* CK_GEN3 clocks */ + &tc_ck, + &tipb_ck, + &l3_ocpi_ck, + &tc1_ck, + &tc2_ck, + &dma_ck, + &dma_lcdfree_ck, + &api_ck, + &lb_ck, + &rhea1_ck, + &rhea2_ck, + &lcd_ck, + /* ULPD clocks */ + &uart1_ck, + &uart2_ck, + &uart3_ck, + &usb_ck1510, + &usb_ck1610, + &usb_hhc_ck, + /* To be done -- + &mclk, + &bclk, + -- to be done */ + &mmc1_ck, + &mmc2_ck, + /* Virtual clocks */ + &virtual_ck_mpu, +}; + +struct clk *clk_get(struct device *dev, const char *id) +{ + struct clk *p, *clk = ERR_PTR(-ENOENT); + + down(&clocks_sem); + list_for_each_entry(p, &clocks, node) { + if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { + clk = p; + break; + } + } + up(&clocks_sem); + + return clk; +} +EXPORT_SYMBOL(clk_get); + + +void clk_put(struct clk *clk) +{ + if (clk && !IS_ERR(clk)) + module_put(clk->owner); +} +EXPORT_SYMBOL(clk_put); + + +int __clk_enable(struct clk *clk) +{ + __u16 regval16; + __u32 regval32; + + if (clk->flags & ALWAYS_ENABLED) + return 0; + + if (unlikely(clk->enable_reg == 0)) { + printk(KERN_ERR "clock.c: Enable for %s without enable code\n", + clk->name); + return 0; + } + + if (clk->flags & ENABLE_REG_32BIT) { + regval32 = omap_readl(clk->enable_reg); + regval32 |= (1 << clk->enable_bit); + omap_writel(regval32, clk->enable_reg); + } else { + regval16 = omap_readw(clk->enable_reg); + regval16 |= (1 << clk->enable_bit); + omap_writew(regval16, clk->enable_reg); + } + + return 0; +} + + +void __clk_disable(struct clk *clk) +{ + __u16 regval16; + __u32 regval32; + + if (clk->enable_reg == 0) + return; + + if (clk->flags & ENABLE_REG_32BIT) { + regval32 = omap_readl(clk->enable_reg); + regval32 &= ~(1 << clk->enable_bit); + omap_writel(regval32, clk->enable_reg); + } else { + regval16 = omap_readw(clk->enable_reg); + regval16 &= ~(1 << clk->enable_bit); + omap_writew(regval16, clk->enable_reg); + } +} + + +void __clk_unuse(struct clk *clk) +{ + if (clk->usecount > 0 && !(--clk->usecount)) { + __clk_disable(clk); + if (likely(clk->parent)) + __clk_unuse(clk->parent); + } +} + + +int __clk_use(struct clk *clk) +{ + int ret = 0; + if (clk->usecount++ == 0) { + if (likely(clk->parent)) + ret = __clk_use(clk->parent); + + if (unlikely(ret != 0)) { + clk->usecount--; + return ret; + } + + ret = __clk_enable(clk); + + if (unlikely(ret != 0) && clk->parent) { + __clk_unuse(clk->parent); + clk->usecount--; + } + } + + return ret; +} + + +int clk_enable(struct clk *clk) +{ + unsigned long flags; + int ret; + + spin_lock_irqsave(&clockfw_lock, flags); + ret = __clk_enable(clk); + spin_unlock_irqrestore(&clockfw_lock, flags); + return ret; +} +EXPORT_SYMBOL(clk_enable); + + +void clk_disable(struct clk *clk) +{ + unsigned long flags; + + spin_lock_irqsave(&clockfw_lock, flags); + __clk_disable(clk); + spin_unlock_irqrestore(&clockfw_lock, flags); +} +EXPORT_SYMBOL(clk_disable); + + +int clk_use(struct clk *clk) +{ + unsigned long flags; + int ret = 0; + + spin_lock_irqsave(&clockfw_lock, flags); + ret = __clk_use(clk); + spin_unlock_irqrestore(&clockfw_lock, flags); + return ret; +} +EXPORT_SYMBOL(clk_use); + + +void clk_unuse(struct clk *clk) +{ + unsigned long flags; + + spin_lock_irqsave(&clockfw_lock, flags); + __clk_unuse(clk); + spin_unlock_irqrestore(&clockfw_lock, flags); +} +EXPORT_SYMBOL(clk_unuse); + + +unsigned long clk_get_rate(struct clk *clk) +{ + return clk->rate; +} +EXPORT_SYMBOL(clk_get_rate); + + +static __u16 verify_ckctl_value(__u16 newval) +{ + /* This function checks for following limitations set + * by the hardware (all conditions must be true): + * DSPMMU_CK == DSP_CK or DSPMMU_CK == DSP_CK/2 + * ARM_CK >= TC_CK + * DSP_CK >= TC_CK + * DSPMMU_CK >= TC_CK + * + * In addition following rules are enforced: + * LCD_CK <= TC_CK + * ARMPER_CK <= TC_CK + * + * However, maximum frequencies are not checked for! + */ + __u8 per_exp; + __u8 lcd_exp; + __u8 arm_exp; + __u8 dsp_exp; + __u8 tc_exp; + __u8 dspmmu_exp; + + per_exp = (newval >> CKCTL_PERDIV_OFFSET) & 3; + lcd_exp = (newval >> CKCTL_LCDDIV_OFFSET) & 3; + arm_exp = (newval >> CKCTL_ARMDIV_OFFSET) & 3; + dsp_exp = (newval >> CKCTL_DSPDIV_OFFSET) & 3; + tc_exp = (newval >> CKCTL_TCDIV_OFFSET) & 3; + dspmmu_exp = (newval >> CKCTL_DSPMMUDIV_OFFSET) & 3; + + if (dspmmu_exp < dsp_exp) + dspmmu_exp = dsp_exp; + if (dspmmu_exp > dsp_exp+1) + dspmmu_exp = dsp_exp+1; + if (tc_exp < arm_exp) + tc_exp = arm_exp; + if (tc_exp < dspmmu_exp) + tc_exp = dspmmu_exp; + if (tc_exp > lcd_exp) + lcd_exp = tc_exp; + if (tc_exp > per_exp) + per_exp = tc_exp; + + newval &= 0xf000; + newval |= per_exp << CKCTL_PERDIV_OFFSET; + newval |= lcd_exp << CKCTL_LCDDIV_OFFSET; + newval |= arm_exp << CKCTL_ARMDIV_OFFSET; + newval |= dsp_exp << CKCTL_DSPDIV_OFFSET; + newval |= tc_exp << CKCTL_TCDIV_OFFSET; + newval |= dspmmu_exp << CKCTL_DSPMMUDIV_OFFSET; + + return newval; +} + + +static int calc_dsor_exp(struct clk *clk, unsigned long rate) +{ + /* Note: If target frequency is too low, this function will return 4, + * which is invalid value. Caller must check for this value and act + * accordingly. + * + * Note: This function does not check for following limitations set + * by the hardware (all conditions must be true): + * DSPMMU_CK == DSP_CK or DSPMMU_CK == DSP_CK/2 + * ARM_CK >= TC_CK + * DSP_CK >= TC_CK + * DSPMMU_CK >= TC_CK + */ + unsigned long realrate; + struct clk * parent; + unsigned dsor_exp; + + if (unlikely(!(clk->flags & RATE_CKCTL))) + return -EINVAL; + + parent = clk->parent; + if (unlikely(parent == 0)) + return -EIO; + + realrate = parent->rate; + for (dsor_exp=0; dsor_exp<4; dsor_exp++) { + if (realrate <= rate) + break; + + realrate /= 2; + } + + return dsor_exp; +} + +long clk_round_rate(struct clk *clk, unsigned long rate) +{ + int dsor_exp; + + if (clk->flags & RATE_FIXED) + return clk->rate; + + if (clk->flags & RATE_CKCTL) { + dsor_exp = calc_dsor_exp(clk, rate); + if (dsor_exp < 0) + return dsor_exp; + if (dsor_exp > 3) + dsor_exp = 3; + return clk->parent->rate / (1 << dsor_exp); + } + + if(clk->round_rate != 0) + return clk->round_rate(rate); + + return clk->rate; +} +EXPORT_SYMBOL(clk_round_rate); + + +static void propagate_rate(struct clk * clk) +{ + struct clk ** clkp; + + for (clkp = onchip_clks; clkp < onchip_clks+ARRAY_SIZE(onchip_clks); clkp++) { + if (likely((*clkp)->parent != clk)) continue; + if (likely((*clkp)->recalc)) + (*clkp)->recalc(*clkp); + } +} + + +static int select_table_rate(unsigned long rate) +{ + /* Find the highest supported frequency <= rate and switch to it */ + struct mpu_rate * ptr; + + for (ptr = rate_table; ptr->rate; ptr++) { + if (ptr->xtal != ck_ref.rate) + continue; + + /* DPLL1 cannot be reprogrammed without risking system crash */ + if (likely(ck_dpll1.rate!=0) && ptr->pll_rate != ck_dpll1.rate) + continue; + + /* Can check only after xtal frequency check */ + if (ptr->rate <= rate) + break; + } + + if (!ptr->rate) + return -EINVAL; + + if (unlikely(ck_dpll1.rate == 0)) { + omap_writew(ptr->dpllctl_val, DPLL_CTL); + ck_dpll1.rate = ptr->pll_rate; + } + omap_writew(ptr->ckctl_val, ARM_CKCTL); + propagate_rate(&ck_dpll1); + return 0; +} + + +static long round_to_table_rate(unsigned long rate) +{ + /* Find the highest supported frequency <= rate */ + struct mpu_rate * ptr; + long highest_rate; + + highest_rate = -EINVAL; + + for (ptr = rate_table; ptr->rate; ptr++) { + if (ptr->xtal != ck_ref.rate) + continue; + + highest_rate = ptr->rate; + + /* Can check only after xtal frequency check */ + if (ptr->rate <= rate) + break; + } + + return highest_rate; +} + + +int clk_set_rate(struct clk *clk, unsigned long rate) +{ + int ret = -EINVAL; + int dsor_exp; + __u16 regval; + unsigned long flags; + + if (clk->flags & RATE_CKCTL) { + dsor_exp = calc_dsor_exp(clk, rate); + if (dsor_exp > 3) + dsor_exp = -EINVAL; + if (dsor_exp < 0) + return dsor_exp; + + spin_lock_irqsave(&clockfw_lock, flags); + regval = omap_readw(ARM_CKCTL); + regval &= ~(3 << clk->rate_offset); + regval |= dsor_exp << clk->rate_offset; + regval = verify_ckctl_value(regval); + omap_writew(regval, ARM_CKCTL); + clk->rate = clk->parent->rate / (1 << dsor_exp); + spin_unlock_irqrestore(&clockfw_lock, flags); + ret = 0; + } else if(clk->set_rate != 0) { + spin_lock_irqsave(&clockfw_lock, flags); + ret = clk->set_rate(rate); + spin_unlock_irqrestore(&clockfw_lock, flags); + } + + if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES))) + propagate_rate(clk); + + return ret; +} +EXPORT_SYMBOL(clk_set_rate); + + +int clk_register(struct clk *clk) +{ + down(&clocks_sem); + list_add(&clk->node, &clocks); + up(&clocks_sem); + return 0; +} +EXPORT_SYMBOL(clk_register); + +void clk_unregister(struct clk *clk) +{ + down(&clocks_sem); + list_del(&clk->node); + up(&clocks_sem); +} +EXPORT_SYMBOL(clk_unregister); + + + +int __init clk_init(void) +{ + struct clk ** clkp; + const struct omap_clock_config *info; + int crystal_type = 0; /* Default 12 MHz */ + + for (clkp = onchip_clks; clkp < onchip_clks+ARRAY_SIZE(onchip_clks); clkp++) { + if (((*clkp)->flags &CLOCK_IN_OMAP1510) && cpu_is_omap1510()) { + clk_register(*clkp); + continue; + } + + if (((*clkp)->flags &CLOCK_IN_OMAP16XX) && cpu_is_omap16xx()) { + clk_register(*clkp); + continue; + } + } + + info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config); + if (info != NULL) { + if (!cpu_is_omap1510()) + crystal_type = info->system_clock_type; + } + +#if defined(CONFIG_ARCH_OMAP730) + ck_ref.rate = 13000000; +#elif defined(CONFIG_ARCH_OMAP16XX) + if (crystal_type == 2) + ck_ref.rate = 19200000; +#endif + + /* We want to be in syncronous scalable mode */ + omap_writew(0x1000, ARM_SYSST); + + /* Find the highest supported frequency and enable it */ + if (select_table_rate(~0)) { + printk(KERN_ERR "System frequencies not set. Check your config.\n"); + /* Guess sane values (60MHz) */ + omap_writew(0x2290, DPLL_CTL); + omap_writew(0x1005, ARM_CKCTL); + ck_dpll1.rate = 60000000; + propagate_rate(&ck_dpll1); + printk(KERN_INFO "Clocking rate (xtal/DPLL1/MPU): %ld/%ld/%ld\n", + ck_ref.rate, ck_dpll1.rate, arm_ck.rate); + } + + /* Cache rates for clocks connected to ck_ref (not dpll1) */ + propagate_rate(&ck_ref); + +#ifdef CONFIG_MACH_OMAP_PERSEUS2 + /* Select slicer output as OMAP input clock */ + omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL); +#endif + + /* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */ + omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL); + + /* Put DSP/MPUI into reset until needed */ + omap_writew(0, ARM_RSTCT1); + omap_writew(1, ARM_RSTCT2); + omap_writew(0x400, ARM_IDLECT1); + + /* + * According to OMAP5910 Erratum SYS_DMA_1, bit DMACK_REQ (bit 8) + * of the ARM_IDLECT2 register must be set to zero. The power-on + * default value of this bit is one. + */ + omap_writew(0x0000, ARM_IDLECT2); /* Turn LCD clock off also */ + + /* + * Only enable those clocks we will need, let the drivers + * enable other clocks as necessary + */ + clk_use(&armper_ck); + clk_use(&armxor_ck); + clk_use(&armtim_ck); + + if (cpu_is_omap1510()) + clk_enable(&arm_gpio_ck); + + return 0; +} diff -Nru a/arch/arm/mach-omap/clock.h b/arch/arm/mach-omap/clock.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-omap/clock.h 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,106 @@ +/* + * linux/arch/arm/mach-omap/clock.h + * + * Copyright (C) 2004 Nokia corporation + * Written by Tuukka Tikkanen + * Based on clocks.h by Tony Lindgren, Gordon McNutt and RidgeRun, Inc + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ARCH_ARM_OMAP_CLOCK_H +#define __ARCH_ARM_OMAP_CLOCK_H + +struct module; + +struct clk { + struct list_head node; + struct module *owner; + const char *name; + struct clk *parent; + unsigned long rate; + __s8 usecount; + __u8 flags; + __u32 enable_reg; + __u8 enable_bit; + __u8 rate_offset; + void (*recalc)(struct clk *); + int (*set_rate)(unsigned long); + long (*round_rate)(unsigned long); +}; + + +struct mpu_rate { + unsigned long rate; + unsigned long xtal; + unsigned long pll_rate; + __u16 ckctl_val; + __u16 dpllctl_val; +}; + + +/* Clock flags */ +#define RATE_CKCTL 1 +#define RATE_FIXED 2 +#define RATE_PROPAGATES 4 +#define VIRTUAL_CLOCK 8 +#define ALWAYS_ENABLED 16 +#define ENABLE_REG_32BIT 32 +#define CLOCK_IN_OMAP16XX 64 +#define CLOCK_IN_OMAP1510 128 + +/* ARM_CKCTL bit shifts */ +#define CKCTL_PERDIV_OFFSET 0 +#define CKCTL_LCDDIV_OFFSET 2 +#define CKCTL_ARMDIV_OFFSET 4 +#define CKCTL_DSPDIV_OFFSET 6 +#define CKCTL_TCDIV_OFFSET 8 +#define CKCTL_DSPMMUDIV_OFFSET 10 +/*#define ARM_TIMXO 12*/ +#define EN_DSPCK 13 +/*#define ARM_INTHCK_SEL 14*/ /* Divide-by-2 for mpu inth_ck */ + +/* ARM_IDLECT1 bit shifts */ +/*#define IDLWDT_ARM 0*/ +/*#define IDLXORP_ARM 1*/ +/*#define IDLPER_ARM 2*/ +/*#define IDLLCD_ARM 3*/ +/*#define IDLLB_ARM 4*/ +/*#define IDLHSAB_ARM 5*/ +/*#define IDLIF_ARM 6*/ +/*#define IDLDPLL_ARM 7*/ +/*#define IDLAPI_ARM 8*/ +/*#define IDLTIM_ARM 9*/ +/*#define SETARM_IDLE 11*/ + +/* ARM_IDLECT2 bit shifts */ +#define EN_WDTCK 0 +#define EN_XORPCK 1 +#define EN_PERCK 2 +#define EN_LCDCK 3 +#define EN_LBCK 4 /* Not on 1610/1710 */ +/*#define EN_HSABCK 5*/ +#define EN_APICK 6 +#define EN_TIMCK 7 +#define DMACK_REQ 8 +#define EN_GPIOCK 9 /* Not on 1610/1710 */ +/*#define EN_LBFREECK 10*/ +#define EN_CKOUT_ARM 11 + +/* ARM_IDLECT3 bit shifts */ +#define EN_OCPI_CK 0 +#define EN_TC1_CK 2 +#define EN_TC2_CK 4 + +/* Various register defines for clock controls scattered around OMAP chip */ +#define USB_MCLK_EN 4 /* In ULPD_CLKC_CTRL */ +#define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */ + + +int clk_register(struct clk *clk); +void clk_unregister(struct clk *clk); +int clk_init(void); + +#endif diff -Nru a/arch/arm/mach-omap/clocks.c b/arch/arm/mach-omap/clocks.c --- a/arch/arm/mach-omap/clocks.c 2004-11-10 17:19:04 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,705 +0,0 @@ -/* - * Clock interface for OMAP - * - * Copyright (C) 2001 RidgeRun, Inc - * Written by Gordon McNutt - * Updated 2004 for Linux 2.6 by Tony Lindgren - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -extern void start_mputimer1(unsigned long load_val); - -/* Input clock in MHz */ -static unsigned int source_clock = 12; - -/* - * We use one spinlock for all clock registers for now. We may want to - * change this to be clock register specific later on. Before we can do - * that, we need to map out the shared clock registers. - */ -static spinlock_t clock_lock = SPIN_LOCK_UNLOCKED; - -typedef struct { - char *name; - __u8 flags; - ck_t parent; - unsigned long rate_reg; /* Clock rate register */ - unsigned long enbl_reg; /* Enable register */ - unsigned long idle_reg; /* Idle register */ - unsigned long slct_reg; /* Select register */ - __s8 rate_shift; /* Clock rate bit shift */ - __s8 enbl_shift; /* Clock enable bit shift */ - __s8 idle_shift; /* Clock idle bit shift */ - __s8 slct_shift; /* Clock select bit shift */ -} ck_info_t; - -#define CK_NAME(ck) ck_info_table[ck].name -#define CK_FLAGS(ck) ck_info_table[ck].flags -#define CK_PARENT(ck) ck_info_table[ck].parent -#define CK_RATE_REG(ck) ck_info_table[ck].rate_reg -#define CK_ENABLE_REG(ck) ck_info_table[ck].enbl_reg -#define CK_IDLE_REG(ck) ck_info_table[ck].idle_reg -#define CK_SELECT_REG(ck) ck_info_table[ck].slct_reg -#define CK_RATE_SHIFT(ck) ck_info_table[ck].rate_shift -#define CK_ENABLE_SHIFT(ck) ck_info_table[ck].enbl_shift -#define CK_IDLE_SHIFT(ck) ck_info_table[ck].idle_shift -#define CK_SELECT_SHIFT(ck) ck_info_table[ck].slct_shift -#define CK_CAN_CHANGE_RATE(cl) (CK_FLAGS(ck) & CK_RATEF) -#define CK_CAN_DISABLE(cl) (CK_FLAGS(ck) & CK_ENABLEF) -#define CK_CAN_IDLE(cl) (CK_FLAGS(ck) & CK_IDLEF) -#define CK_CAN_SWITCH(cl) (CK_FLAGS(ck) & CK_SELECTF) - -static ck_info_t ck_info_table[] = { - { - .name = "clkin", - .flags = 0, - .parent = OMAP_CLKIN, - }, { - .name = "ck_gen1", - .flags = CK_RATEF | CK_IDLEF, - .rate_reg = DPLL_CTL, - .idle_reg = ARM_IDLECT1, - .idle_shift = IDLDPLL_ARM, - .parent = OMAP_CLKIN, - }, { - .name = "ck_gen2", - .flags = 0, - .parent = OMAP_CK_GEN1, - }, { - .name = "ck_gen3", - .flags = 0, - .parent = OMAP_CK_GEN1, - }, { - .name = "tc_ck", - .flags = CK_RATEF | CK_IDLEF, - .parent = OMAP_CK_GEN3, - .rate_reg = ARM_CKCTL, /* ARM_CKCTL[TCDIV(9:8)] */ - .idle_reg = ARM_IDLECT1, - .rate_shift = TCDIV, - .idle_shift = IDLIF_ARM - }, { - .name = "arm_ck", - .flags = CK_IDLEF | CK_RATEF, - .parent = OMAP_CK_GEN1, - .rate_reg = ARM_CKCTL, /* ARM_CKCTL[ARMDIV(5:4)] */ - .idle_reg = ARM_IDLECT1, - .rate_shift = ARMDIV, - .idle_shift = SETARM_IDLE, - }, { - .name = "mpuper_ck", - .flags = CK_RATEF | CK_IDLEF | CK_ENABLEF, - .parent = OMAP_CK_GEN1, - .rate_reg = ARM_CKCTL, /* ARM_CKCTL[PERDIV(1:0)] */ - .enbl_reg = ARM_IDLECT2, - .idle_reg = ARM_IDLECT1, - .rate_shift = PERDIV, - .enbl_shift = EN_PERCK, - .idle_shift = IDLPER_ARM - }, { - .name = "arm_gpio_ck", - .flags = CK_ENABLEF, - .parent = OMAP_CK_GEN1, - .enbl_reg = ARM_IDLECT2, - .enbl_shift = EN_GPIOCK - }, { - .name = "mpuxor_ck", - .flags = CK_ENABLEF | CK_IDLEF, - .parent = OMAP_CLKIN, - .idle_reg = ARM_IDLECT1, - .enbl_reg = ARM_IDLECT2, - .idle_shift = IDLXORP_ARM, - .enbl_shift = EN_XORPCK - }, { - .name = "mputim_ck", - .flags = CK_IDLEF | CK_ENABLEF | CK_SELECTF, - .parent = OMAP_CLKIN, - .idle_reg = ARM_IDLECT1, - .enbl_reg = ARM_IDLECT2, - .slct_reg = ARM_CKCTL, - .idle_shift = IDLTIM_ARM, - .enbl_shift = EN_TIMCK, - .slct_shift = ARM_TIMXO - }, { - .name = "mpuwd_ck", - .flags = CK_IDLEF | CK_ENABLEF, - .parent = OMAP_CLKIN, - .idle_reg = ARM_IDLECT1, - .enbl_reg = ARM_IDLECT2, - .idle_shift = IDLWDT_ARM, - .enbl_shift = EN_WDTCK, - }, { - .name = "dsp_ck", - .flags = CK_RATEF | CK_ENABLEF, - .parent = OMAP_CK_GEN2, - .rate_reg = ARM_CKCTL, /* ARM_CKCTL[DSPDIV(7:6)] */ - .enbl_reg = ARM_CKCTL, - .rate_shift = DSPDIV, - .enbl_shift = EN_DSPCK, - }, { - .name = "dspmmu_ck", - .flags = CK_RATEF | CK_ENABLEF, - .parent = OMAP_CK_GEN2, - .rate_reg = ARM_CKCTL, /* ARM_CKCTL[DSPMMUDIV(11:10)] */ - .enbl_reg = ARM_CKCTL, - .rate_shift = DSPMMUDIV, - .enbl_shift = EN_DSPCK, - }, { - .name = "dma_ck", - .flags = CK_RATEF | CK_IDLEF | CK_ENABLEF, - .parent = OMAP_CK_GEN3, - .rate_reg = ARM_CKCTL, /* ARM_CKCTL[TCDIV(9:8)] */ - .idle_reg = ARM_IDLECT1, - .enbl_reg = ARM_IDLECT2, - .rate_shift = TCDIV, - .idle_shift = IDLIF_ARM, - .enbl_shift = DMACK_REQ - }, { - .name = "api_ck", - .flags = CK_RATEF | CK_IDLEF | CK_ENABLEF, - .parent = OMAP_CK_GEN3, - .rate_reg = ARM_CKCTL, /* ARM_CKCTL[TCDIV(9:8)] */ - .idle_reg = ARM_IDLECT1, - .enbl_reg = ARM_IDLECT2, - .rate_shift = TCDIV, - .idle_shift = IDLAPI_ARM, - .enbl_shift = EN_APICK, - }, { - .name = "hsab_ck", - .flags = CK_RATEF | CK_IDLEF | CK_ENABLEF, - .parent = OMAP_CK_GEN3, - .rate_reg = ARM_CKCTL, /* ARM_CKCTL[TCDIV(9:8)] */ - .idle_reg = ARM_IDLECT1, - .enbl_reg = ARM_IDLECT2, - .rate_shift = TCDIV, - .idle_shift = IDLHSAB_ARM, - .enbl_shift = EN_HSABCK, - }, { - .name = "lbfree_ck", - .flags = CK_RATEF | CK_ENABLEF, - .parent = OMAP_CK_GEN3, - .rate_reg = ARM_CKCTL, /* ARM_CKCTL[TCDIV(9:8)] */ - .enbl_reg = ARM_IDLECT2, - .rate_shift = TCDIV, - .enbl_shift = EN_LBFREECK, - }, { - .name = "lb_ck", - .flags = CK_RATEF | CK_IDLEF | CK_ENABLEF, - .parent = OMAP_CK_GEN3, - .rate_reg = ARM_CKCTL, /* ARM_CKCTL[TCDIV(9:8)] */ - .idle_reg = ARM_IDLECT1, - .enbl_reg = ARM_IDLECT2, - .rate_shift = TCDIV, - .idle_shift = IDLLB_ARM, - .enbl_shift = EN_LBCK, - }, { - .name = "lcd_ck", - .flags = CK_RATEF | CK_IDLEF | CK_ENABLEF, - .parent = OMAP_CK_GEN3, - .rate_reg = ARM_CKCTL, /* ARM_CKCTL[LCDDIV(3:2)] */ - .idle_reg = ARM_IDLECT1, - .enbl_reg = ARM_IDLECT2, - .rate_shift = LCDDIV, - .idle_shift = IDLLCD_ARM, - .enbl_shift = EN_LCDCK, - }, -}; - -/*****************************************************************************/ - -#define CK_IN_RANGE(ck) (!((ck < OMAP_CK_MIN) || (ck > OMAP_CK_MAX))) - -int ck_auto_unclock = 1; -int ck_debug = 0; - -#define CK_MAX_PLL_FREQ OMAP_CK_MAX_RATE -static __u32 ck_valid_table[CK_MAX_PLL_FREQ / 32 + 1]; -static __u8 ck_lookup_table[CK_MAX_PLL_FREQ]; - -int -ck_set_input(ck_t ck, ck_t input) -{ - int ret = 0, shift; - unsigned short reg; - unsigned long flags; - - if (!CK_IN_RANGE(ck) || !CK_CAN_SWITCH(ck)) { - ret = -EINVAL; - goto exit; - } - - reg = omap_readw(CK_SELECT_REG(ck)); - shift = CK_SELECT_SHIFT(ck); - - spin_lock_irqsave(&clock_lock, flags); - if (input == OMAP_CLKIN) { - reg &= ~(1 << shift); - omap_writew(reg, CK_SELECT_REG(ck)); - goto exit; - } else if (input == CK_PARENT(ck)) { - reg |= (1 << shift); - omap_writew(reg, CK_SELECT_REG(ck)); - goto exit; - } - - ret = -EINVAL; - exit: - spin_unlock_irqrestore(&clock_lock, flags); - return ret; -} - -int -ck_get_input(ck_t ck, ck_t * input) -{ - int ret = -EINVAL; - unsigned long flags; - - if (!CK_IN_RANGE(ck)) - goto exit; - - ret = 0; - - spin_lock_irqsave(&clock_lock, flags); - if (CK_CAN_SWITCH(ck)) { - int shift; - unsigned short reg; - - reg = omap_readw(CK_SELECT_REG(ck)); - shift = CK_SELECT_SHIFT(ck); - if (reg & (1 << shift)) { - *input = CK_PARENT(ck); - goto exit; - } - } - - *input = OMAP_CLKIN; - - exit: - spin_unlock_irqrestore(&clock_lock, flags); - return ret; -} - -static int -__ck_set_pll_rate(ck_t ck, int rate) -{ - unsigned short pll; - unsigned long flags; - - if ((rate < 0) || (rate > CK_MAX_PLL_FREQ)) - return -EINVAL; - - /* Scan downward for the closest matching frequency */ - while (rate && !test_bit(rate, (unsigned long *)&ck_valid_table)) - rate--; - - if (!rate) { - printk(KERN_ERR "%s: couldn't find a matching rate\n", - __FUNCTION__); - return -EINVAL; - } - - spin_lock_irqsave(&clock_lock, flags); - pll = omap_readw(CK_RATE_REG(ck)); - - /* Clear the rate bits */ - pll &= ~(0x1f << 5); - - /* Set the rate bits */ - pll |= (ck_lookup_table[rate - 1] << 5); - - omap_writew(pll, CK_RATE_REG(ck)); - - spin_unlock_irqrestore(&clock_lock, flags); - - return 0; -} - -static int -__ck_set_clkm_rate(ck_t ck, int rate) -{ - int shift, prate, div, ret; - unsigned short reg; - unsigned long flags; - - spin_lock_irqsave(&clock_lock, flags); - - /* - * We can only set this clock's value to a fraction of its - * parent's value. The interface says I'll round down when necessary. - * So first let's get the parent's current rate. - */ - prate = ck_get_rate(CK_PARENT(ck)); - - /* - * Let's just start with the highest fraction and keep searching - * down through available rates until we find one less than or equal - * to the desired rate. - */ - for (div = 0; div < 4; div++) { - if (prate <= rate) - break; - prate = prate / 2; - } - - /* - * Oops. Looks like the caller wants a rate lower than we can support. - */ - if (div == 5) { - printk(KERN_ERR "%s: %d is too low\n", - __FUNCTION__, rate); - ret = -EINVAL; - goto exit; - } - - /* - * One more detail: if this clock supports more than one parent, then - * we're going to automatically switch over to the parent which runs - * through the divisor. For omap this is not ambiguous because for all - * such clocks one choice is always OMAP_CLKIN (which doesn't run - * through the divisor) and the other is whatever I encoded as - * CK_PARENT. Note that I wait until we get this far because I don't - * want to switch the input until we're sure this is going to work. - */ - if (CK_CAN_SWITCH(ck)) - if ((ret = ck_set_input(ck, CK_PARENT(ck))) < 0) { - BUG(); - goto exit; - } - - /* - * At last, we can set the divisor. Clear the old rate bits and - * set the new ones. - */ - reg = omap_readw(CK_RATE_REG(ck)); - shift = CK_RATE_SHIFT(ck); - reg &= ~(3 << shift); - reg |= (div << shift); - omap_writew(reg, CK_RATE_REG(ck)); - - /* And return the new (actual, after rounding down) rate. */ - ret = prate; - - exit: - spin_unlock_irqrestore(&clock_lock, flags); - return ret; -} - -int -ck_set_rate(ck_t ck, int rate) -{ - int ret = -EINVAL; - - if (!CK_IN_RANGE(ck) || !CK_CAN_CHANGE_RATE(ck)) - goto exit; - - switch (ck) { - - default: - ret = __ck_set_clkm_rate(ck, rate); - break; - - case OMAP_CK_GEN1: - ret = __ck_set_pll_rate(ck, rate); - break; - - }; - - exit: - return ret; -} - -static int -__ck_get_pll_rate(ck_t ck) -{ - int m, d; - - unsigned short pll = omap_readw(CK_RATE_REG(ck)); - - m = (pll & (0x1f << 7)) >> 7; - m = m ? m : 1; - d = (pll & (3 << 5)) >> 5; - d++; - - return ((source_clock * m) / d); -} - -static int -__ck_get_clkm_rate(ck_t ck) -{ - static int bits2div[] = { 1, 2, 4, 8 }; - int in, bits, reg, shift; - - reg = omap_readw(CK_RATE_REG(ck)); - shift = CK_RATE_SHIFT(ck); - - in = ck_get_rate(CK_PARENT(ck)); - bits = (reg & (3 << shift)) >> shift; - - return (in / bits2div[bits]); -} - -int -ck_get_rate(ck_t ck) -{ - int ret = 0; - ck_t parent; - - if (!CK_IN_RANGE(ck)) { - ret = -EINVAL; - goto exit; - } - - switch (ck) { - - case OMAP_CK_GEN1: - ret = __ck_get_pll_rate(ck); - break; - - case OMAP_CLKIN: - ret = source_clock; - break; - - case OMAP_MPUXOR_CK: - case OMAP_CK_GEN2: - case OMAP_CK_GEN3: - case OMAP_ARM_GPIO_CK: - ret = ck_get_rate(CK_PARENT(ck)); - break; - - case OMAP_ARM_CK: - case OMAP_MPUPER_CK: - case OMAP_DSP_CK: - case OMAP_DSPMMU_CK: - case OMAP_LCD_CK: - case OMAP_TC_CK: - case OMAP_DMA_CK: - case OMAP_API_CK: - case OMAP_HSAB_CK: - case OMAP_LBFREE_CK: - case OMAP_LB_CK: - ret = __ck_get_clkm_rate(ck); - break; - - case OMAP_MPUTIM_CK: - ck_get_input(ck, &parent); - ret = ck_get_rate(parent); - break; - - case OMAP_MPUWD_CK: - /* Note that this evaluates to zero if source_clock is 12MHz. */ - ret = source_clock / 14; - break; - default: - ret = -EINVAL; - break; - } - - exit: - return ret; -} - -int -ck_enable(ck_t ck) -{ - unsigned short reg; - int ret = -EINVAL, shift; - unsigned long flags; - - if (!CK_IN_RANGE(ck)) - goto exit; - - if (ck_debug) - printk(KERN_DEBUG "%s: %s\n", __FUNCTION__, CK_NAME(ck)); - - ret = 0; - - if (!CK_CAN_DISABLE(ck)) - /* Then it must be on... */ - goto exit; - - spin_lock_irqsave(&clock_lock, flags); - reg = omap_readw(CK_ENABLE_REG(ck)); - shift = CK_ENABLE_SHIFT(ck); - reg |= (1 << shift); - omap_writew(reg, CK_ENABLE_REG(ck)); - spin_unlock_irqrestore(&clock_lock, flags); - - exit: - return ret; -} - -int -ck_disable(ck_t ck) -{ - unsigned short reg; - int ret = -EINVAL, shift; - unsigned long flags; - - if (!CK_IN_RANGE(ck)) - goto exit; - - if (ck_debug) - printk(KERN_DEBUG "%s: %s\n", __FUNCTION__, CK_NAME(ck)); - - if (!CK_CAN_DISABLE(ck)) - goto exit; - - ret = 0; - - if (ck == OMAP_CLKIN) - return -EINVAL; - - spin_lock_irqsave(&clock_lock, flags); - reg = omap_readw(CK_ENABLE_REG(ck)); - shift = CK_ENABLE_SHIFT(ck); - reg &= ~(1 << shift); - omap_writew(reg, CK_ENABLE_REG(ck)); - spin_unlock_irqrestore(&clock_lock, flags); - - exit: - return ret; -} - -int ck_valid_rate(int rate) -{ - return test_bit(rate, (unsigned long *)&ck_valid_table); -} - -static void -__ck_make_lookup_table(void) -{ - __u8 m, d; - - memset(ck_valid_table, 0, sizeof (ck_valid_table)); - - for (m = 1; m < 32; m++) - for (d = 1; d < 5; d++) { - - int rate = ((source_clock * m) / (d)); - - if (rate > CK_MAX_PLL_FREQ) - continue; - if (test_bit(rate, (unsigned long *)&ck_valid_table)) - continue; - set_bit(rate, (unsigned long *)&ck_valid_table); - ck_lookup_table[rate - 1] = (m << 2) | (d - 1); - } -} - -int __init -init_ck(void) -{ - const struct omap_clock_config *info; - int crystal_type = 0; /* Default 12 MHz */ - - __ck_make_lookup_table(); - info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config); - if (info != NULL) { - if (!cpu_is_omap1510()) - crystal_type = info->system_clock_type; - } - - /* We want to be in syncronous scalable mode */ - omap_writew(0x1000, ARM_SYSST); -#if defined(CONFIG_OMAP_ARM_30MHZ) - omap_writew(0x1555, ARM_CKCTL); - omap_writew(0x2290, DPLL_CTL); -#elif defined(CONFIG_OMAP_ARM_60MHZ) - omap_writew(0x1005, ARM_CKCTL); - omap_writew(0x2290, DPLL_CTL); -#elif defined(CONFIG_OMAP_ARM_96MHZ) - omap_writew(0x1005, ARM_CKCTL); - omap_writew(0x2410, DPLL_CTL); -#elif defined(CONFIG_OMAP_ARM_120MHZ) - omap_writew(0x110a, ARM_CKCTL); - omap_writew(0x2510, DPLL_CTL); -#elif defined(CONFIG_OMAP_ARM_168MHZ) - omap_writew(0x110f, ARM_CKCTL); - omap_writew(0x2710, DPLL_CTL); -#elif defined(CONFIG_OMAP_ARM_182MHZ) && defined(CONFIG_ARCH_OMAP730) - omap_writew(0x250E, ARM_CKCTL); - omap_writew(0x2710, DPLL_CTL); -#elif defined(CONFIG_OMAP_ARM_192MHZ) && (defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP5912) \ - || defined(CONFIG_ARCH_OMAP1710)) - omap_writew(0x150f, ARM_CKCTL); - if (crystal_type == 2) { - source_clock = 13; /* MHz */ - omap_writew(0x2510, DPLL_CTL); - } else - omap_writew(0x2810, DPLL_CTL); -#elif defined(CONFIG_OMAP_ARM_195MHZ) && defined(CONFIG_ARCH_OMAP730) - omap_writew(0x250E, ARM_CKCTL); - omap_writew(0x2790, DPLL_CTL); -#else -#error "OMAP MHZ not set, please run make xconfig" -#endif - -#ifdef CONFIG_MACH_OMAP_PERSEUS2 - /* Select slicer output as OMAP input clock */ - omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL); -#endif - - /* Turn off some other junk the bootloader might have turned on */ - - /* Turn off DSP, ARM_INTHCK, ARM_TIMXO */ - omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL); - - /* Put DSP/MPUI into reset until needed */ - omap_writew(0, ARM_RSTCT1); - omap_writew(1, ARM_RSTCT2); - omap_writew(0x400, ARM_IDLECT1); - - /* - * According to OMAP5910 Erratum SYS_DMA_1, bit DMACK_REQ (bit 8) - * of the ARM_IDLECT2 register must be set to zero. The power-on - * default value of this bit is one. - */ - omap_writew(0x0000, ARM_IDLECT2); /* Turn LCD clock off also */ - - /* - * Only enable those clocks we will need, let the drivers - * enable other clocks as necessary - */ - ck_enable(OMAP_MPUPER_CK); - ck_enable(OMAP_ARM_GPIO_CK); - ck_enable(OMAP_MPUXOR_CK); - //ck_set_rate(OMAP_MPUTIM_CK, OMAP_CLKIN); - ck_enable(OMAP_MPUTIM_CK); - start_mputimer1(0xffffffff); - - return 0; -} - - -EXPORT_SYMBOL(ck_get_rate); -EXPORT_SYMBOL(ck_set_rate); -EXPORT_SYMBOL(ck_enable); -EXPORT_SYMBOL(ck_disable); diff -Nru a/arch/arm/mach-omap/common.c b/arch/arm/mach-omap/common.c --- a/arch/arm/mach-omap/common.c 2004-11-10 17:19:07 -08:00 +++ b/arch/arm/mach-omap/common.c 2004-11-10 17:19:07 -08:00 @@ -14,65 +14,195 @@ #include #include #include +#include +#include +#include +#include #include #include #include #include -#include -#include +#include #include +#include + +#include +#include +#include +#include + + +#include "clock.h" + +#define DEBUG 1 + +struct omap_id { + u16 jtag_id; /* Used to determine OMAP type */ + u8 die_rev; /* Processor revision */ + u32 omap_id; /* OMAP revision */ + u32 type; /* Cpu id bits [31:08], cpu class bits [07:00] */ +}; + +/* Register values to detect the OMAP version */ +static struct omap_id omap_ids[] __initdata = { + { .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300100}, + { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300300}, + { .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type = 0x15100000}, + { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x16100000}, + { .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type = 0x16110000}, + { .jtag_id = 0xb576, .die_rev = 0x3, .omap_id = 0x03320100, .type = 0x16100c00}, + { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320200, .type = 0x16100d00}, + { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00}, + { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00}, + { .jtag_id = 0xb576, .die_rev = 0x1, .omap_id = 0x03320100, .type = 0x16110000}, + { .jtag_id = 0xb58c, .die_rev = 0x2, .omap_id = 0x03320200, .type = 0x16110b00}, + { .jtag_id = 0xb58c, .die_rev = 0x3, .omap_id = 0x03320200, .type = 0x16110c00}, + { .jtag_id = 0xb65f, .die_rev = 0x0, .omap_id = 0x03320400, .type = 0x16212300}, + { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320400, .type = 0x16212300}, + { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320500, .type = 0x16212300}, + { .jtag_id = 0xb5f7, .die_rev = 0x0, .omap_id = 0x03330000, .type = 0x17100000}, + { .jtag_id = 0xb5f7, .die_rev = 0x1, .omap_id = 0x03330100, .type = 0x17100000}, + { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type = 0x17100000}, +}; /* - * ---------------------------------------------------------------------------- - * OMAP revision check - * - * Since we use the cpu_is_omapnnnn() macros, there's a chance that a board - * switches to an updated core. We want to print out the OMAP revision early. - * - * We use the system_serial registers for the revision information so we - * can see it in /proc/cpuinfo. - * - * If the OMAP detection gets more complicated, we may want to expand this - * to store the OMAP version and replace the current cpu_is_omapnnnn() macros. - * - * ---------------------------------------------------------------------------- + * Get OMAP type from PROD_ID. + * 1710 has the PROD_ID in bits 15:00, not in 16:01 as documented in TRM. + * 1510 PROD_ID is empty, and 1610 PROD_ID does not make sense. + * Undocumented register in TEST BLOCK is used as fallback; This seems to + * work on 1510, 1610 & 1710. The official way hopefully will work in future + * processors. + */ +static u16 __init omap_get_jtag_id(void) +{ + u32 prod_id, omap_id; + + prod_id = omap_readl(OMAP_PRODUCTION_ID_1); + omap_id = omap_readl(OMAP32_ID_1); + + /* Check for unusable OMAP_PRODUCTION_ID_1 on 1611B/5912 and 730 */ + if (((prod_id >> 20) == 0) || (prod_id == omap_id)) + prod_id = 0; + else + prod_id &= 0xffff; + + if (prod_id) + return prod_id; + + /* Use OMAP32_ID_1 as fallback */ + prod_id = ((omap_id >> 12) & 0xffff); + + return prod_id; +} + +/* + * Get OMAP revision from DIE_REV. + * Early 1710 processors may have broken OMAP_DIE_ID, it contains PROD_ID. + * Undocumented register in the TEST BLOCK is used as fallback. + * REVISIT: This does not seem to work on 1510 */ +static u8 __init omap_get_die_rev(void) +{ + u32 die_rev; + + die_rev = omap_readl(OMAP_DIE_ID_1); + + /* Check for broken OMAP_DIE_ID on early 1710 */ + if (((die_rev >> 12) & 0xffff) == omap_get_jtag_id()) + die_rev = 0; + + die_rev = (die_rev >> 17) & 0xf; + if (die_rev) + return die_rev; + + die_rev = (omap_readl(OMAP32_ID_1) >> 28) & 0xf; + + return die_rev; +} + static void __init omap_check_revision(void) { - system_serial_high = omap_readl(OMAP_ID_BASE); - system_serial_low = OMAP_ID_REG; - system_rev = (OMAP_ID_REG >> ID_SHIFT) & ID_MASK; - - printk("OMAP revision: %d.%d (0x%08x) id: 0x%08x detected as OMAP-", - (system_serial_high >> 20) & 0xf, - (system_serial_high >> 16) & 0xf, - system_serial_high, system_serial_low); - - switch (system_rev) { - case OMAP_ID_730: - printk("730\n"); - system_rev = 0x730; - break; - case OMAP_ID_1510: - printk("1510\n"); - system_rev = 0x1510; + int i; + u16 jtag_id; + u8 die_rev; + u32 omap_id; + u8 cpu_type; + + jtag_id = omap_get_jtag_id(); + die_rev = omap_get_die_rev(); + omap_id = omap_readl(OMAP32_ID_0); + +#ifdef DEBUG + printk("OMAP_DIE_ID_0: 0x%08x\n", omap_readl(OMAP_DIE_ID_0)); + printk("OMAP_DIE_ID_1: 0x%08x DIE_REV: %i\n", + omap_readl(OMAP_DIE_ID_1), + (omap_readl(OMAP_DIE_ID_1) >> 17) & 0xf); + printk("OMAP_PRODUCTION_ID_0: 0x%08x\n", omap_readl(OMAP_PRODUCTION_ID_0)); + printk("OMAP_PRODUCTION_ID_1: 0x%08x JTAG_ID: 0x%04x\n", + omap_readl(OMAP_PRODUCTION_ID_1), + omap_readl(OMAP_PRODUCTION_ID_1) & 0xffff); + printk("OMAP32_ID_0: 0x%08x\n", omap_readl(OMAP32_ID_0)); + printk("OMAP32_ID_1: 0x%08x\n", omap_readl(OMAP32_ID_1)); + printk("JTAG_ID: 0x%04x DIE_REV: %i\n", jtag_id, die_rev); +#endif + + system_serial_high = omap_readl(OMAP_DIE_ID_0); + system_serial_low = omap_readl(OMAP_DIE_ID_1); + + /* First check only the major version in a safe way */ + for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { + if (jtag_id == (omap_ids[i].jtag_id)) { + system_rev = omap_ids[i].type; + break; + } + } + + /* Check if we can find the die revision */ + for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { + if (jtag_id == omap_ids[i].jtag_id && die_rev == omap_ids[i].die_rev) { + system_rev = omap_ids[i].type; + break; + } + } + + /* Finally check also the omap_id */ + for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { + if (jtag_id == omap_ids[i].jtag_id + && die_rev == omap_ids[i].die_rev + && omap_id == omap_ids[i].omap_id) { + system_rev = omap_ids[i].type; + break; + } + } + + /* Add the cpu class info (7xx, 15xx, 16xx, 24xx) */ + cpu_type = system_rev >> 24; + + switch (cpu_type) { + case 0x07: + system_rev |= 0x07; break; - case OMAP_ID_1610: - printk("1610\n"); - system_rev = 0x1610; + case 0x15: + system_rev |= 0x15; break; - case OMAP_ID_1710: - printk("1710\n"); - system_rev = 0x1710; + case 0x16: + case 0x17: + system_rev |= 0x16; break; - case OMAP_ID_5912: - printk("5912/1611B\n"); - system_rev = 0x5912; + case 0x24: + system_rev |= 0x24; break; default: - printk("unknown, please add support!\n"); + printk("Unknown OMAP cpu type: 0x%02x\n", cpu_type); } + + printk("OMAP%04x", system_rev >> 16); + if ((system_rev >> 8) & 0xff) + printk("%x", (system_rev >> 8) & 0xff); + printk(" revision %i handled as %02xxx id: %08x%08x\n", + die_rev, system_rev & 0xff, system_serial_low, + system_serial_high); } /* @@ -104,25 +234,23 @@ }; #endif -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710) +#if defined(CONFIG_ARCH_OMAP16XX) static struct map_desc omap1610_io_desc[] __initdata = { - { OMAP1610_DSP_BASE, OMAP1610_DSP_START, OMAP1610_DSP_SIZE, MT_DEVICE }, - { OMAP1610_DSPREG_BASE, OMAP1610_DSPREG_START, OMAP1610_DSPREG_SIZE, MT_DEVICE }, - { OMAP1610_SRAM_BASE, OMAP1610_SRAM_START, OMAP1610_SRAM_SIZE, MT_DEVICE } + { OMAP16XX_DSP_BASE, OMAP16XX_DSP_START, OMAP16XX_DSP_SIZE, MT_DEVICE }, + { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, MT_DEVICE }, + { OMAP16XX_SRAM_BASE, OMAP16XX_SRAM_START, OMAP1610_SRAM_SIZE, MT_DEVICE } }; -#endif -#ifdef CONFIG_ARCH_OMAP5912 static struct map_desc omap5912_io_desc[] __initdata = { - { OMAP5912_DSP_BASE, OMAP5912_DSP_START, OMAP5912_DSP_SIZE, MT_DEVICE }, - { OMAP5912_DSPREG_BASE, OMAP5912_DSPREG_START, OMAP5912_DSPREG_SIZE, MT_DEVICE }, + { OMAP16XX_DSP_BASE, OMAP16XX_DSP_START, OMAP16XX_DSP_SIZE, MT_DEVICE }, + { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, MT_DEVICE }, /* * The OMAP5912 has 250kByte internal SRAM. Because the mapping is baseed on page * size (4kByte), it seems that the last 2kByte (=0x800) of the 250kByte are not mapped. * Add additional 2kByte (0x800) so that the last page is mapped and the last 2kByte * can be used. */ - { OMAP5912_SRAM_BASE, OMAP5912_SRAM_START, OMAP5912_SRAM_SIZE + 0x800, MT_DEVICE } + { OMAP16XX_SRAM_BASE, OMAP16XX_SRAM_START, OMAP5912_SRAM_SIZE + 0x800, MT_DEVICE } }; #endif @@ -137,6 +265,9 @@ iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc)); omap_check_revision(); + /* clear BM to canonicalize CS0 (not CS3) at 0000:0000 */ + omap_writel(omap_readl(EMIFS_CONFIG) & 0x0d, EMIFS_CONFIG); + #ifdef CONFIG_ARCH_OMAP730 if (cpu_is_omap730()) { iotable_init(omap730_io_desc, ARRAY_SIZE(omap730_io_desc)); @@ -147,12 +278,10 @@ iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc)); } #endif -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710) +#if defined(CONFIG_ARCH_OMAP16XX) if (cpu_is_omap1610() || cpu_is_omap1710()) { iotable_init(omap1610_io_desc, ARRAY_SIZE(omap1610_io_desc)); } -#endif -#ifdef CONFIG_ARCH_OMAP5912 if (cpu_is_omap5912()) { iotable_init(omap5912_io_desc, ARRAY_SIZE(omap5912_io_desc)); } @@ -166,7 +295,7 @@ /* Must init clocks early to assure that timer interrupt works */ - init_ck(); + clk_init(); } /* @@ -178,26 +307,173 @@ _omap_map_io(); } +static inline unsigned int omap_serial_in(struct plat_serial8250_port *up, + int offset) +{ + offset <<= up->regshift; + return (unsigned int)__raw_readb(up->membase + offset); +} + +static inline void omap_serial_outp(struct plat_serial8250_port *p, int offset, + int value) +{ + offset <<= p->regshift; + __raw_writeb(value, p->membase + offset); +} + +/* + * Internal UARTs need to be initialized for the 8250 autoconfig to work + * properly. + */ +static void __init omap_serial_reset(struct plat_serial8250_port *p) +{ + omap_serial_outp(p, UART_OMAP_MDR1, 0x07); /* disable UART */ + omap_serial_outp(p, UART_OMAP_MDR1, 0x00); /* enable UART */ + + if (!cpu_is_omap1510()) { + omap_serial_outp(p, UART_OMAP_SYSC, 0x01); + while (!(omap_serial_in(p, UART_OMAP_SYSC) & 0x01)); + } +} + +static struct plat_serial8250_port serial_platform_data[] = { + { + .membase = (char*)IO_ADDRESS(OMAP_UART1_BASE), + .mapbase = (unsigned long)OMAP_UART1_BASE, + .irq = INT_UART1, + .flags = UPF_BOOT_AUTOCONF, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = OMAP16XX_BASE_BAUD * 16, + }, + { + .membase = (char*)IO_ADDRESS(OMAP_UART2_BASE), + .mapbase = (unsigned long)OMAP_UART2_BASE, + .irq = INT_UART2, + .flags = UPF_BOOT_AUTOCONF, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = OMAP16XX_BASE_BAUD * 16, + }, + { + .membase = (char*)IO_ADDRESS(OMAP_UART3_BASE), + .mapbase = (unsigned long)OMAP_UART3_BASE, + .irq = INT_UART3, + .flags = UPF_BOOT_AUTOCONF, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = OMAP16XX_BASE_BAUD * 16, + }, + { }, +}; + +static struct platform_device serial_device = { + .name = "serial8250", + .id = 0, + .dev = { + .platform_data = serial_platform_data, + }, +}; + +/* + * Note that on Innovator-1510 UART2 pins conflict with USB2. + * By default UART2 does not work on Innovator-1510 if you have + * USB OHCI enabled. To use UART2, you must disable USB2 first. + */ +void __init omap_serial_init(int ports[OMAP_MAX_NR_PORTS]) +{ + int i; + + if (cpu_is_omap730()) { + serial_platform_data[0].regshift = 0; + serial_platform_data[1].regshift = 0; + serial_platform_data[0].irq = INT_730_UART_MODEM_1; + serial_platform_data[1].irq = INT_730_UART_MODEM_IRDA_2; + } + + if (cpu_is_omap1510()) { + serial_platform_data[0].uartclk = OMAP1510_BASE_BAUD * 16; + serial_platform_data[1].uartclk = OMAP1510_BASE_BAUD * 16; + serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16; + } + + for (i = 0; i < OMAP_MAX_NR_PORTS; i++) { + unsigned char reg; + + if (ports[i] == 0) { + serial_platform_data[i].membase = 0; + serial_platform_data[i].mapbase = 0; + continue; + } + + switch (i) { + case 0: + if (cpu_is_omap1510()) { + omap_cfg_reg(UART1_TX); + omap_cfg_reg(UART1_RTS); + if (machine_is_omap_innovator()) { + reg = fpga_read(OMAP1510_FPGA_POWER); + reg |= OMAP1510_FPGA_PCR_COM1_EN; + fpga_write(reg, OMAP1510_FPGA_POWER); + udelay(10); + } + } + break; + case 1: + if (cpu_is_omap1510()) { + omap_cfg_reg(UART2_TX); + omap_cfg_reg(UART2_RTS); + if (machine_is_omap_innovator()) { + reg = fpga_read(OMAP1510_FPGA_POWER); + reg |= OMAP1510_FPGA_PCR_COM2_EN; + fpga_write(reg, OMAP1510_FPGA_POWER); + udelay(10); + } + } + break; + case 2: + if (cpu_is_omap1510()) { + omap_cfg_reg(UART3_TX); + omap_cfg_reg(UART3_RX); + } + break; + } + omap_serial_reset(&serial_platform_data[i]); + } +} + +static int __init omap_init(void) +{ + return platform_device_register(&serial_device); +} +arch_initcall(omap_init); + +#define NO_LENGTH_CHECK 0xffffffff + extern int omap_bootloader_tag_len; extern u8 omap_bootloader_tag[]; struct omap_board_config_kernel *omap_board_config; int omap_board_config_size = 0; -const void *__omap_get_config(u16 tag, size_t len) +static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out) { - struct omap_board_config_entry *info = NULL; struct omap_board_config_kernel *kinfo = NULL; int i; #ifdef CONFIG_OMAP_BOOT_TAG + struct omap_board_config_entry *info = NULL; + if (omap_bootloader_tag_len > 4) info = (struct omap_board_config_entry *) omap_bootloader_tag; while (info != NULL) { u8 *next; - if (info->tag == tag) - break; + if (info->tag == tag) { + if (skip == 0) + break; + skip--; + } next = (u8 *) info + sizeof(*info) + info->len; if (next >= omap_bootloader_tag + omap_bootloader_tag_len) @@ -208,11 +484,13 @@ if (info != NULL) { /* Check the length as a lame attempt to check for * binary inconsistancy. */ - if (info->len != len) { + if (len != NO_LENGTH_CHECK && info->len != len) { printk(KERN_ERR "OMAP peripheral config: Length mismatch with tag %x (want %d, got %d)\n", tag, len, info->len); return NULL; } + if (len_out != NULL) + *len_out = info->len; return info->data; } #endif @@ -228,7 +506,18 @@ return NULL; return kinfo->data; } + +const void *__omap_get_config(u16 tag, size_t len, int nr) +{ + return get_config(tag, len, nr, NULL); +} EXPORT_SYMBOL(__omap_get_config); + +const void *omap_get_var_config(u16 tag, size_t *len) +{ + return get_config(tag, NO_LENGTH_CHECK, 0, len); +} +EXPORT_SYMBOL(omap_get_var_config); static int __init omap_add_serial_console(void) { diff -Nru a/arch/arm/mach-omap/common.h b/arch/arm/mach-omap/common.h --- a/arch/arm/mach-omap/common.h 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-omap/common.h 2004-11-10 17:19:04 -08:00 @@ -31,5 +31,6 @@ extern void omap_map_io(void); extern struct sys_timer omap_timer; +extern void omap_serial_init(int ports[]); #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ diff -Nru a/arch/arm/mach-omap/dma.c b/arch/arm/mach-omap/dma.c --- a/arch/arm/mach-omap/dma.c 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-omap/dma.c 2004-11-10 17:19:06 -08:00 @@ -4,6 +4,8 @@ * Copyright (C) 2003 Nokia Corporation * Author: Juha Yrjölä * DMA channel linking for 1610 by Samuel Ortiz + * Graphics DMA and LCD DMA graphics tranformations + * by Imre Deak * * Support functions for the OMAP internal DMA channels. * @@ -26,6 +28,8 @@ #include #include +#include + #define OMAP_DMA_ACTIVE 0x01 #define OMAP_DMA_CCR_EN (1 << 7) @@ -87,6 +91,34 @@ omap_writew(0, lch_base + i); } +void omap_set_dma_priority(int dst_port, int priority) +{ + unsigned long reg; + u32 l; + + switch (dst_port) { + case OMAP_DMA_PORT_OCP_T1: /* FFFECC00 */ + reg = OMAP_TC_OCPT1_PRIOR; + break; + case OMAP_DMA_PORT_OCP_T2: /* FFFECCD0 */ + reg = OMAP_TC_OCPT2_PRIOR; + break; + case OMAP_DMA_PORT_EMIFF: /* FFFECC08 */ + reg = OMAP_TC_EMIFF_PRIOR; + break; + case OMAP_DMA_PORT_EMIFS: /* FFFECC04 */ + reg = OMAP_TC_EMIFS_PRIOR; + break; + default: + BUG(); + return; + } + l = omap_readl(reg); + l &= ~(0xf << 8); + l |= (priority & 0xf) << 8; + omap_writel(l, reg); +} + void omap_set_dma_transfer_params(int lch, int data_type, int elem_count, int frame_count, int sync_mode) { @@ -113,51 +145,38 @@ omap_writew(frame_count, OMAP_DMA_CFN(lch)); } -void omap_set_dma_constant_fill(int lch, u32 color) +void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode, u32 color) { u16 w; -#ifdef CONFIG_DEBUG_KERNEL - if (omap_dma_in_1510_mode()) { - printk(KERN_ERR "OMAP DMA constant fill not available in 1510 mode."); - BUG(); - return; - } -#endif - w = omap_readw(OMAP_DMA_CCR2(lch)) & ~0x03; - w |= 0x01; - omap_writew(w, OMAP_DMA_CCR2(lch)); - - omap_writew((u16)color, OMAP_DMA_COLOR_L(lch)); - omap_writew((u16)(color >> 16), OMAP_DMA_COLOR_U(lch)); - - w = omap_readw(OMAP_DMA_LCH_CTRL(lch)) & ~0x0f; - w |= 1; /* Channel type G */ - omap_writew(w, OMAP_DMA_LCH_CTRL(lch)); -} - -void omap_set_dma_transparent_copy(int lch, u32 color) -{ - u16 w; + BUG_ON(omap_dma_in_1510_mode()); -#ifdef CONFIG_DEBUG_KERNEL - if (omap_dma_in_1510_mode()) { - printk(KERN_ERR "OMAP DMA transparent copy not available in 1510 mode."); + w = omap_readw(OMAP_DMA_CCR2(lch)) & ~0x03; + switch (mode) { + case OMAP_DMA_CONSTANT_FILL: + w |= 0x01; + break; + case OMAP_DMA_TRANSPARENT_COPY: + w |= 0x02; + break; + case OMAP_DMA_COLOR_DIS: + break; + default: BUG(); } -#endif - w = omap_readw(OMAP_DMA_CCR2(lch)) & ~0x03; - w |= 0x02; omap_writew(w, OMAP_DMA_CCR2(lch)); - omap_writew((u16)color, OMAP_DMA_COLOR_L(lch)); - omap_writew((u16)(color >> 16), OMAP_DMA_COLOR_U(lch)); - w = omap_readw(OMAP_DMA_LCH_CTRL(lch)) & ~0x0f; - w |= 1; /* Channel type G */ + /* Default is channel type 2D */ + if (mode) { + omap_writew((u16)color, OMAP_DMA_COLOR_L(lch)); + omap_writew((u16)(color >> 16), OMAP_DMA_COLOR_U(lch)); + w |= 1; /* Channel type G */ + } omap_writew(w, OMAP_DMA_LCH_CTRL(lch)); } + void omap_set_dma_src_params(int lch, int src_port, int src_amode, unsigned long src_start) { @@ -192,22 +211,24 @@ omap_writew(w, OMAP_DMA_CSDP(lch)); } -void omap_set_dma_src_burst_mode(int lch, int burst_mode) +void omap_set_dma_src_burst_mode(int lch, enum omap_dma_burst_mode burst_mode) { u16 w; w = omap_readw(OMAP_DMA_CSDP(lch)) & ~(0x03 << 7); switch (burst_mode) { + case OMAP_DMA_DATA_BURST_DIS: + break; case OMAP_DMA_DATA_BURST_4: w |= (0x01 << 7); break; case OMAP_DMA_DATA_BURST_8: - w |= (0x03 << 7); - break; + /* not supported by current hardware + * w |= (0x03 << 7); + * fall through + */ default: - printk(KERN_ERR "Invalid DMA burst mode\n"); BUG(); - return; } omap_writew(w, OMAP_DMA_CSDP(lch)); } @@ -246,12 +267,14 @@ omap_writew(w, OMAP_DMA_CSDP(lch)); } -void omap_set_dma_dest_burst_mode(int lch, int burst_mode) +void omap_set_dma_dest_burst_mode(int lch, enum omap_dma_burst_mode burst_mode) { u16 w; w = omap_readw(OMAP_DMA_CSDP(lch)) & ~(0x03 << 14); switch (burst_mode) { + case OMAP_DMA_DATA_BURST_DIS: + break; case OMAP_DMA_DATA_BURST_4: w |= (0x01 << 14); break; @@ -474,7 +497,7 @@ chan->data = data; chan->enabled_irqs = OMAP_DMA_TOUT_IRQ | OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ; - if (cpu_is_omap1610() || cpu_is_omap5912() || cpu_is_omap730() || cpu_is_omap1710()) { + if (cpu_is_omap16xx() || cpu_is_omap730()) { /* If the sync device is set, configure it dynamically. */ if (dev_id != 0) { set_gdma_dev(free_ch + 1, dev_id); @@ -571,8 +594,15 @@ void (* callback)(u16 status, void *data); void *cb_data; + int active; unsigned long addr, size; int rotate, data_type, xres, yres; + int vxres; + int mirror; + int xscale, yscale; + int ext_ctrl; + int src_port; + int single_transfer; } lcd_dma; void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres, @@ -584,14 +614,70 @@ lcd_dma.yres = fb_yres; } +void omap_set_lcd_dma_src_port(int port) +{ + lcd_dma.src_port = port; +} + +void omap_set_lcd_dma_ext_controller(int external) +{ + lcd_dma.ext_ctrl = external; +} + +void omap_set_lcd_dma_single_transfer(int single) +{ + lcd_dma.single_transfer = single; +} + + +void omap_set_lcd_dma_b1_rotation(int rotate) +{ + if (omap_dma_in_1510_mode()) { + printk(KERN_ERR "DMA rotation is not supported in 1510 mode\n"); + BUG(); + return; + } + lcd_dma.rotate = rotate; +} + +void omap_set_lcd_dma_b1_mirror(int mirror) +{ + if (omap_dma_in_1510_mode()) { + printk(KERN_ERR "DMA mirror is not supported in 1510 mode\n"); + BUG(); + } + lcd_dma.mirror = mirror; +} + +void omap_set_lcd_dma_b1_vxres(unsigned long vxres) +{ + if (omap_dma_in_1510_mode()) { + printk(KERN_ERR "DMA virtual resulotion is not supported " + "in 1510 mode\n"); + BUG(); + } + lcd_dma.vxres = vxres; +} + +void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale) +{ + if (omap_dma_in_1510_mode()) { + printk(KERN_ERR "DMA scale is not supported in 1510 mode\n"); + BUG(); + } + lcd_dma.xscale = xscale; + lcd_dma.yscale = yscale; +} + static void set_b1_regs(void) { unsigned long top, bottom; int es; - u16 w, en, fn; - s16 ei; - s32 fi; - u32 l; + u16 w; + unsigned long en, fn; + long ei, fi; + unsigned long vxres; + unsigned int xscale, yscale; switch (lcd_dma.data_type) { case OMAP_DMA_DATA_TYPE_S8: @@ -608,25 +694,81 @@ return; } - if (lcd_dma.rotate == 0) { - top = lcd_dma.addr; - bottom = lcd_dma.addr + (lcd_dma.xres * lcd_dma.yres - 1) * es; - /* 1510 DMA requires the bottom address to be 2 more than the - * actual last memory access location. */ - if (omap_dma_in_1510_mode() && - lcd_dma.data_type == OMAP_DMA_DATA_TYPE_S32) - bottom += 2; + vxres = lcd_dma.vxres ? lcd_dma.vxres : lcd_dma.xres; + xscale = lcd_dma.xscale ? lcd_dma.xscale : 1; + yscale = lcd_dma.yscale ? lcd_dma.yscale : 1; + BUG_ON(vxres < lcd_dma.xres); +#define PIXADDR(x,y) (lcd_dma.addr + ((y) * vxres * yscale + (x) * xscale) * es) +#define PIXSTEP(sx, sy, dx, dy) (PIXADDR(dx, dy) - PIXADDR(sx, sy) - es + 1) + switch (lcd_dma.rotate) { + case 0: + if (!lcd_dma.mirror) { + top = PIXADDR(0, 0); + bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); + /* 1510 DMA requires the bottom address to be 2 more + * than the actual last memory access location. */ + if (omap_dma_in_1510_mode() && + lcd_dma.data_type == OMAP_DMA_DATA_TYPE_S32) + bottom += 2; + ei = PIXSTEP(0, 0, 1, 0); + fi = PIXSTEP(lcd_dma.xres - 1, 0, 0, 1); + } else { + top = PIXADDR(lcd_dma.xres - 1, 0); + bottom = PIXADDR(0, lcd_dma.yres - 1); + ei = PIXSTEP(1, 0, 0, 0); + fi = PIXSTEP(0, 0, lcd_dma.xres - 1, 1); + } en = lcd_dma.xres; fn = lcd_dma.yres; - ei = 0; - fi = 0; - } else { - top = lcd_dma.addr + (lcd_dma.xres - 1) * es; - bottom = lcd_dma.addr + (lcd_dma.yres - 1) * lcd_dma.xres * es; + break; + case 90: + if (!lcd_dma.mirror) { + top = PIXADDR(0, lcd_dma.yres - 1); + bottom = PIXADDR(lcd_dma.xres - 1, 0); + ei = PIXSTEP(0, 1, 0, 0); + fi = PIXSTEP(0, 0, 1, lcd_dma.yres - 1); + } else { + top = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); + bottom = PIXADDR(0, 0); + ei = PIXSTEP(0, 1, 0, 0); + fi = PIXSTEP(1, 0, 0, lcd_dma.yres - 1); + } + en = lcd_dma.yres; + fn = lcd_dma.xres; + break; + case 180: + if (!lcd_dma.mirror) { + top = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); + bottom = PIXADDR(0, 0); + ei = PIXSTEP(1, 0, 0, 0); + fi = PIXSTEP(0, 1, lcd_dma.xres - 1, 0); + } else { + top = PIXADDR(0, lcd_dma.yres - 1); + bottom = PIXADDR(lcd_dma.xres - 1, 0); + ei = PIXSTEP(0, 0, 1, 0); + fi = PIXSTEP(lcd_dma.xres - 1, 1, 0, 0); + } + en = lcd_dma.xres; + fn = lcd_dma.yres; + break; + case 270: + if (!lcd_dma.mirror) { + top = PIXADDR(lcd_dma.xres - 1, 0); + bottom = PIXADDR(0, lcd_dma.yres - 1); + ei = PIXSTEP(0, 0, 0, 1); + fi = PIXSTEP(1, lcd_dma.yres - 1, 0, 0); + } else { + top = PIXADDR(0, 0); + bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); + ei = PIXSTEP(0, 0, 0, 1); + fi = PIXSTEP(0, lcd_dma.yres - 1, 1, 0); + } en = lcd_dma.yres; fn = lcd_dma.xres; - ei = (lcd_dma.xres - 1) * es + 1; - fi = -(lcd_dma.xres * (lcd_dma.yres - 1) + 2) * 2 + 1; + break; + default: + BUG(); + return; /* Supress warning about uninitialized vars */ } if (omap_dma_in_1510_mode()) { @@ -652,33 +794,50 @@ w |= lcd_dma.data_type; omap_writew(w, OMAP1610_DMA_LCD_CSDP); - if (!lcd_dma.rotate) - return; + w = omap_readw(OMAP1610_DMA_LCD_CTRL); + /* Always set the source port as SDRAM for now*/ + w &= ~(0x03 << 6); + if (lcd_dma.ext_ctrl) + w |= 1 << 8; + else + w &= ~(1 << 8); + if (lcd_dma.callback != NULL) + w |= 1 << 1; /* Block interrupt enable */ + else + w &= ~(1 << 1); + omap_writew(w, OMAP1610_DMA_LCD_CTRL); - /* Rotation stuff */ - l = omap_readw(OMAP1610_DMA_LCD_CSDP); - /* Disable burst access */ - l &= ~(0x03 << 7); - omap_writew(l, OMAP1610_DMA_LCD_CSDP); + if (!(lcd_dma.rotate || lcd_dma.mirror || + lcd_dma.vxres || lcd_dma.xscale || lcd_dma.yscale)) + return; - l = omap_readw(OMAP1610_DMA_LCD_CCR); + w = omap_readw(OMAP1610_DMA_LCD_CCR); /* Set the double-indexed addressing mode */ - l |= (0x03 << 12); - omap_writew(l, OMAP1610_DMA_LCD_CCR); + w |= (0x03 << 12); + omap_writew(w, OMAP1610_DMA_LCD_CCR); omap_writew(ei, OMAP1610_DMA_LCD_SRC_EI_B1); omap_writew(fi >> 16, OMAP1610_DMA_LCD_SRC_FI_B1_U); omap_writew(fi, OMAP1610_DMA_LCD_SRC_FI_B1_L); } -void omap_set_lcd_dma_b1_rotation(int rotate) +static irqreturn_t lcd_dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) { - if (omap_dma_in_1510_mode()) { - printk(KERN_ERR "DMA rotation is not supported in 1510 mode\n"); - BUG(); - return; - } - lcd_dma.rotate = rotate; + u16 w; + + w = omap_readw(OMAP1610_DMA_LCD_CTRL); + if (unlikely(!(w & (1 << 3)))) { + printk(KERN_WARNING "Spurious LCD DMA IRQ\n"); + return IRQ_NONE; + } + /* Ack the IRQ */ + w |= (1 << 3); + omap_writew(w, OMAP1610_DMA_LCD_CTRL); + lcd_dma.active = 0; + if (lcd_dma.callback != NULL) + lcd_dma.callback(w, lcd_dma.cb_data); + + return IRQ_HANDLED; } int omap_request_lcd_dma(void (* callback)(u16 status, void *data), @@ -695,6 +854,15 @@ spin_unlock_irq(&lcd_dma.lock); lcd_dma.callback = callback; lcd_dma.cb_data = data; + lcd_dma.active = 0; + lcd_dma.single_transfer = 0; + lcd_dma.rotate = 0; + lcd_dma.vxres = 0; + lcd_dma.mirror = 0; + lcd_dma.xscale = 0; + lcd_dma.yscale = 0; + lcd_dma.ext_ctrl = 0; + lcd_dma.src_port = 0; return 0; } @@ -714,23 +882,53 @@ spin_unlock(&lcd_dma.lock); } -void omap_start_lcd_dma(void) +void omap_enable_lcd_dma(void) { + u16 w; + + /* Set the Enable bit only if an external controller is + * connected. Otherwise the OMAP internal controller will + * start the transfer when it gets enabled. + */ + if (enable_1510_mode || !lcd_dma.ext_ctrl) + return; + w = omap_readw(OMAP1610_DMA_LCD_CCR); + w |= 1 << 7; + omap_writew(w, OMAP1610_DMA_LCD_CCR); + lcd_dma.active = 1; +} + +void omap_setup_lcd_dma(void) +{ + BUG_ON(lcd_dma.active); if (!enable_1510_mode) { /* Set some reasonable defaults */ + omap_writew(0x5440, OMAP1610_DMA_LCD_CCR); omap_writew(0x9102, OMAP1610_DMA_LCD_CSDP); omap_writew(0x0004, OMAP1610_DMA_LCD_LCH_CTRL); - omap_writew(0x5740, OMAP1610_DMA_LCD_CCR); } set_b1_regs(); - if (!enable_1510_mode) - omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) | 1, OMAP1610_DMA_LCD_CCR); + if (!enable_1510_mode) { + u16 w; + + w = omap_readw(OMAP1610_DMA_LCD_CCR); + /* If DMA was already active set the end_prog bit to have + * the programmed register set loaded into the active + * register set. + */ + w |= 1 << 11; /* End_prog */ + if (!lcd_dma.single_transfer) + w |= (3 << 8); /* Auto_init, repeat */ + omap_writew(w, OMAP1610_DMA_LCD_CCR); + } } void omap_stop_lcd_dma(void) { - if (!enable_1510_mode) - omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~1, OMAP1610_DMA_LCD_CCR); + lcd_dma.active = 0; + if (!enable_1510_mode && lcd_dma.ext_ctrl) + omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~(1 << 7), + OMAP1610_DMA_LCD_CCR); } static int __init omap_init_dma(void) @@ -741,7 +939,7 @@ printk(KERN_INFO "DMA support for OMAP1510 initialized\n"); dma_chan_count = 9; enable_1510_mode = 1; - } else if (cpu_is_omap1610() || cpu_is_omap5912() || cpu_is_omap730() || cpu_is_omap1710()) { + } else if (cpu_is_omap16xx() || cpu_is_omap730()) { printk(KERN_INFO "OMAP DMA hardware version %d\n", omap_readw(OMAP_DMA_HW_ID)); printk(KERN_INFO "DMA capabilities: %08x:%08x:%04x:%04x:%04x\n", @@ -756,7 +954,7 @@ w = omap_readw(OMAP_DMA_GSCR); w |= 1 << 3; omap_writew(w, OMAP_DMA_GSCR); - dma_chan_count = OMAP_LOGICAL_DMA_CH_COUNT; + dma_chan_count = 16; } else dma_chan_count = 9; } else { @@ -790,11 +988,21 @@ return r; } } - + r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0, "LCD DMA", NULL); + if (r != 0) { + int i; + + printk(KERN_ERR "unable to request IRQ for LCD DMA (error %d)\n", r); + for (i = 0; i < dma_chan_count; i++) + free_irq(dma_irq[i], (void *) (i + 1)); + return r; + } return 0; } arch_initcall(omap_init_dma); + +EXPORT_SYMBOL(omap_set_dma_priority); EXPORT_SYMBOL(omap_request_dma); EXPORT_SYMBOL(omap_free_dma); EXPORT_SYMBOL(omap_start_dma); @@ -803,8 +1011,7 @@ EXPORT_SYMBOL(omap_disable_dma_irq); EXPORT_SYMBOL(omap_set_dma_transfer_params); -EXPORT_SYMBOL(omap_set_dma_constant_fill); -EXPORT_SYMBOL(omap_set_dma_transparent_copy); +EXPORT_SYMBOL(omap_set_dma_color_mode); EXPORT_SYMBOL(omap_set_dma_src_params); EXPORT_SYMBOL(omap_set_dma_src_index); @@ -821,7 +1028,14 @@ EXPORT_SYMBOL(omap_request_lcd_dma); EXPORT_SYMBOL(omap_free_lcd_dma); -EXPORT_SYMBOL(omap_start_lcd_dma); +EXPORT_SYMBOL(omap_enable_lcd_dma); +EXPORT_SYMBOL(omap_setup_lcd_dma); EXPORT_SYMBOL(omap_stop_lcd_dma); EXPORT_SYMBOL(omap_set_lcd_dma_b1); +EXPORT_SYMBOL(omap_set_lcd_dma_single_transfer); +EXPORT_SYMBOL(omap_set_lcd_dma_ext_controller); EXPORT_SYMBOL(omap_set_lcd_dma_b1_rotation); +EXPORT_SYMBOL(omap_set_lcd_dma_b1_vxres); +EXPORT_SYMBOL(omap_set_lcd_dma_b1_scale); +EXPORT_SYMBOL(omap_set_lcd_dma_b1_mirror); + diff -Nru a/arch/arm/mach-omap/gpio.c b/arch/arm/mach-omap/gpio.c --- a/arch/arm/mach-omap/gpio.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-omap/gpio.c 2004-11-10 17:19:04 -08:00 @@ -94,7 +94,7 @@ #define METHOD_GPIO_1610 2 #define METHOD_GPIO_730 3 -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710) || defined(CONFIG_ARCH_OMAP5912) +#if defined(CONFIG_ARCH_OMAP16XX) static struct gpio_bank gpio_bank_1610[5] = { { OMAP_MPUIO_BASE, INT_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO}, { OMAP1610_GPIO1_BASE, INT_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_1610 }, @@ -135,8 +135,8 @@ return &gpio_bank[1]; } #endif -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710) || defined(CONFIG_ARCH_OMAP5912) - if (cpu_is_omap1610() || cpu_is_omap1710() || cpu_is_omap5912()) { +#if defined(CONFIG_ARCH_OMAP16XX) + if (cpu_is_omap16xx()) { if (OMAP_GPIO_IS_MPUIO(gpio)) return &gpio_bank[0]; return &gpio_bank[1 + (gpio >> 4)]; @@ -172,8 +172,8 @@ if (cpu_is_omap1510() && gpio < 16) return 0; #endif -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710) || defined(CONFIG_ARCH_OMAP5912) - if ((cpu_is_omap1610() || cpu_is_omap1710() || cpu_is_omap5912()) && gpio < 64) +#if defined(CONFIG_ARCH_OMAP16XX) + if ((cpu_is_omap16xx()) && gpio < 64) return 0; #endif #ifdef CONFIG_ARCH_OMAP730 @@ -554,7 +554,7 @@ if (bank->method == METHOD_GPIO_1510) isr_reg = bank->base + OMAP1510_GPIO_INT_STATUS; #endif -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710) || defined(CONFIG_ARCH_OMAP5912) +#if defined(CONFIG_ARCH_OMAP16XX) if (bank->method == METHOD_GPIO_1610) isr_reg = bank->base + OMAP1610_GPIO_IRQSTATUS1; #endif @@ -588,7 +588,7 @@ if (bank->method == METHOD_GPIO_1510) __raw_writew(1 << (gpio & 0x0f), bank->base + OMAP1510_GPIO_INT_STATUS); #endif -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710) || defined(CONFIG_ARCH_OMAP5912) +#if defined(CONFIG_ARCH_OMAP16XX) if (bank->method == METHOD_GPIO_1610) __raw_writew(1 << (gpio & 0x0f), bank->base + OMAP1610_GPIO_IRQSTATUS1); #endif @@ -668,8 +668,8 @@ gpio_bank = gpio_bank_1510; } #endif -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710) || defined(CONFIG_ARCH_OMAP5912) - if (cpu_is_omap1610() || cpu_is_omap1710() || cpu_is_omap5912()) { +#if defined(CONFIG_ARCH_OMAP16XX) + if (cpu_is_omap16xx()) { int rev; gpio_bank_count = 5; @@ -702,7 +702,7 @@ __raw_writew(0x0000, bank->base + OMAP1510_GPIO_INT_STATUS); } #endif -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710) || defined(CONFIG_ARCH_OMAP5912) +#if defined(CONFIG_ARCH_OMAP16XX) if (bank->method == METHOD_GPIO_1610) { __raw_writew(0x0000, bank->base + OMAP1610_GPIO_IRQENABLE1); __raw_writew(0xffff, bank->base + OMAP1610_GPIO_IRQSTATUS1); @@ -722,7 +722,7 @@ set_irq_chip(j, &mpuio_irq_chip); else set_irq_chip(j, &gpio_irq_chip); - set_irq_handler(j, do_level_IRQ); + set_irq_handler(j, do_edge_IRQ); set_irq_flags(j, IRQF_VALID); } set_irq_chained_handler(bank->irq, gpio_irq_handler); diff -Nru a/arch/arm/mach-omap/irq.c b/arch/arm/mach-omap/irq.c --- a/arch/arm/mach-omap/irq.c 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/mach-omap/irq.c 2004-11-10 17:19:03 -08:00 @@ -140,12 +140,11 @@ }; #endif -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP5912) \ - || defined(CONFIG_ARCH_OMAP1710) +#if defined(CONFIG_ARCH_OMAP16XX) static struct omap_irq_bank omap1610_irq_banks[] = { { .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3fefe8f }, - { .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfffff7ff }, + { .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb7c1fd }, { .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0xfffff7ff }, { .base_reg = OMAP_IH2_BASE + 0x200, .trigger_map = 0xffffffff }, }; @@ -173,9 +172,8 @@ irq_bank_count = ARRAY_SIZE(omap1510_irq_banks); } #endif -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP5912) \ - || defined(CONFIG_ARCH_OMAP1710) - if (cpu_is_omap1610() || cpu_is_omap5912() || cpu_is_omap1710()) { +#if defined(CONFIG_ARCH_OMAP16XX) + if (cpu_is_omap16xx()) { irq_banks = omap1610_irq_banks; irq_bank_count = ARRAY_SIZE(omap1610_irq_banks); } diff -Nru a/arch/arm/mach-omap/mcbsp.c b/arch/arm/mach-omap/mcbsp.c --- a/arch/arm/mach-omap/mcbsp.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-omap/mcbsp.c 2004-11-10 17:19:04 -08:00 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -28,6 +29,8 @@ #include #include +#include + #ifdef CONFIG_MCBSP_DEBUG #define DBG(x...) printk(x) #else @@ -61,6 +64,8 @@ }; static struct omap_mcbsp mcbsp[OMAP_MAX_MCBSP_COUNT]; +static struct clk *mcbsp_dsp_ck = 0; +static struct clk *mcbsp_api_ck = 0; static void omap_mcbsp_dump_reg(u8 id) @@ -153,8 +158,8 @@ OMAP_MCBSP_WRITE(io_base, XCR1, config->xcr1); OMAP_MCBSP_WRITE(io_base, SRGR2, config->srgr2); OMAP_MCBSP_WRITE(io_base, SRGR1, config->srgr1); - OMAP_MCBSP_WRITE(io_base, SRGR2, config->mcr2); - OMAP_MCBSP_WRITE(io_base, SRGR1, config->mcr1); + OMAP_MCBSP_WRITE(io_base, MCR2, config->mcr2); + OMAP_MCBSP_WRITE(io_base, MCR1, config->mcr1); OMAP_MCBSP_WRITE(io_base, PCR0, config->pcr0); } @@ -181,6 +186,7 @@ return -1; } +#define EN_XORPCK 1 #define DSP_RSTCT2 0xe1008014 static void omap_mcbsp_dsp_request(void) @@ -188,10 +194,8 @@ if (cpu_is_omap1510() || cpu_is_omap1610() || cpu_is_omap1710()) { omap_writew((omap_readw(ARM_RSTCT1) | (1 << 1) | (1 << 2)), ARM_RSTCT1); - omap_writew((omap_readw(ARM_CKCTL) | 1 << EN_DSPCK), - ARM_CKCTL); - omap_writew((omap_readw(ARM_IDLECT2) | (1 << EN_APICK)), - ARM_IDLECT2); + clk_enable(mcbsp_dsp_ck); + clk_enable(mcbsp_api_ck); /* enable 12MHz clock to mcbsp 1 & 3 */ __raw_writew(__raw_readw(DSP_IDLECT2) | (1 << EN_XORPCK), @@ -588,7 +592,7 @@ }; #endif -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710) +#if defined(CONFIG_ARCH_OMAP16XX) static const struct omap_mcbsp_info mcbsp_1610[] = { [0] = { .virt_base = OMAP1610_MCBSP1_BASE, .dma_rx_sync = OMAP_DMA_MCBSP1_RX, @@ -614,6 +618,18 @@ static const struct omap_mcbsp_info *mcbsp_info; printk("Initializing OMAP McBSP system\n"); + + mcbsp_dsp_ck = clk_get(0, "dsp_ck"); + if (IS_ERR(mcbsp_dsp_ck)) { + printk(KERN_ERR "mcbsp: could not acquire dsp_ck handle.\n"); + return PTR_ERR(mcbsp_dsp_ck); + } + mcbsp_api_ck = clk_get(0, "api_ck"); + if (IS_ERR(mcbsp_dsp_ck)) { + printk(KERN_ERR "mcbsp: could not acquire api_ck handle.\n"); + return PTR_ERR(mcbsp_api_ck); + } + #ifdef CONFIG_ARCH_OMAP730 if (cpu_is_omap730()) { mcbsp_info = mcbsp_730; @@ -626,7 +642,7 @@ mcbsp_count = ARRAY_SIZE(mcbsp_1510); } #endif -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710) +#if defined(CONFIG_ARCH_OMAP16XX) if (cpu_is_omap1610() || cpu_is_omap1710()) { mcbsp_info = mcbsp_1610; mcbsp_count = ARRAY_SIZE(mcbsp_1610); diff -Nru a/arch/arm/mach-omap/mux.c b/arch/arm/mach-omap/mux.c --- a/arch/arm/mach-omap/mux.c 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-omap/mux.c 2004-11-10 17:19:06 -08:00 @@ -32,18 +32,26 @@ #define __MUX_C__ #include +#ifdef CONFIG_OMAP_MUX + /* * Sets the Omap MUX and PULL_DWN registers based on the table */ -int omap_cfg_reg(const reg_cfg_t reg_cfg) +int __init_or_module +omap_cfg_reg(const reg_cfg_t reg_cfg) { -#ifdef CONFIG_OMAP_MUX static spinlock_t mux_spin_lock = SPIN_LOCK_UNLOCKED; unsigned long flags; reg_cfg_set *cfg; unsigned int reg_orig = 0, reg = 0, pu_pd_orig = 0, pu_pd = 0, pull_orig = 0, pull = 0; + unsigned int mask, warn = 0; + + if (reg_cfg > ARRAY_SIZE(reg_cfg_table)) { + printk(KERN_ERR "MUX: reg_cfg %d\n", reg_cfg); + return -EINVAL; + } cfg = ®_cfg_table[reg_cfg]; @@ -56,12 +64,20 @@ /* Check the mux register in question */ if (cfg->mux_reg) { + unsigned tmp1, tmp2; + reg_orig = omap_readl(cfg->mux_reg); /* The mux registers always seem to be 3 bits long */ - reg = reg_orig & ~(0x7 << cfg->mask_offset); + mask = (0x7 << cfg->mask_offset); + tmp1 = reg_orig & mask; + reg = reg_orig & ~mask; + + tmp2 = (cfg->mask << cfg->mask_offset); + reg |= tmp2; - reg |= (cfg->mask << cfg->mask_offset); + if (tmp1 != tmp2) + warn = 1; omap_writel(reg, cfg->mux_reg); } @@ -70,12 +86,18 @@ if (!cpu_is_omap1510()) { if (cfg->pu_pd_reg && cfg->pull_val) { pu_pd_orig = omap_readl(cfg->pu_pd_reg); + mask = 1 << cfg->pull_bit; + if (cfg->pu_pd_val) { + if (!(pu_pd_orig & mask)) + warn = 1; /* Use pull up */ - pu_pd = pu_pd_orig | (1 << cfg->pull_bit); + pu_pd = pu_pd_orig | mask; } else { + if (pu_pd_orig & mask) + warn = 1; /* Use pull down */ - pu_pd = pu_pd_orig & ~(1 << cfg->pull_bit); + pu_pd = pu_pd_orig & ~mask; } omap_writel(pu_pd, cfg->pu_pd_reg); } @@ -84,21 +106,32 @@ /* Check for an associated pull down register */ if (cfg->pull_reg) { pull_orig = omap_readl(cfg->pull_reg); + mask = 1 << cfg->pull_bit; if (cfg->pull_val) { + if (pull_orig & mask) + warn = 1; /* Low bit = pull enabled */ - pull = pull_orig & ~(1 << cfg->pull_bit); + pull = pull_orig & ~mask; } else { + if (!(pull_orig & mask)) + warn = 1; /* High bit = pull disabled */ - pull = pull_orig | (1 << cfg->pull_bit); + pull = pull_orig | mask; } omap_writel(pull, cfg->pull_reg); } + if (warn) { +#ifdef CONFIG_OMAP_MUX_WARNINGS + printk(KERN_WARNING "MUX: initialized %s\n", cfg->name); +#endif + } + #ifdef CONFIG_OMAP_MUX_DEBUG - if (cfg->debug) { - printk("Omap: Setting register %s\n", cfg->name); + if (cfg->debug || warn) { + printk("MUX: Setting register %s\n", cfg->name); printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n", cfg->mux_reg_name, cfg->mux_reg, reg_orig, reg); @@ -118,8 +151,13 @@ spin_unlock_irqrestore(&mux_spin_lock, flags); -#endif +#ifdef CONFIG_OMAP_MUX_ERRORS + return warn ? -ETXTBSY : 0; +#else return 0; +#endif } EXPORT_SYMBOL(omap_cfg_reg); + +#endif /* CONFIG_OMAP_MUX */ diff -Nru a/arch/arm/mach-omap/ocpi.c b/arch/arm/mach-omap/ocpi.c --- a/arch/arm/mach-omap/ocpi.c 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-omap/ocpi.c 2004-11-10 17:19:06 -08:00 @@ -59,20 +59,12 @@ /* Make sure there's clock for OCPI */ -#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710) +#if defined(CONFIG_ARCH_OMAP16XX) if (cpu_is_omap1610() || cpu_is_omap1710()) { - val = omap_readl(OMAP1610_ARM_IDLECT3); + val = omap_readl(OMAP16XX_ARM_IDLECT3); val |= EN_OCPI_CK; val &= ~IDLOCPI_ARM; - omap_writel(val, OMAP1610_ARM_IDLECT3); - } -#endif -#ifdef CONFIG_ARCH_OMAP5912 - if (cpu_is_omap5912()) { - val = omap_readl(OMAP5912_ARM_IDLECT3); - val |= EN_OCPI_CK; - val &= ~IDLOCPI_ARM; - omap_writel(val, OMAP5912_ARM_IDLECT3); + omap_writel(val, OMAP16XX_ARM_IDLECT3); } #endif /* Enable access for OHCI in OCPI */ diff -Nru a/arch/arm/mach-omap/pm.c b/arch/arm/mach-omap/pm.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-omap/pm.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,621 @@ +/* + * linux/arch/arm/mach-omap/pm.c + * + * OMAP Power Management Routines + * + * Original code for the SA11x0: + * Copyright (c) 2001 Cliff Brake + * + * Modified for the PXA250 by Nicolas Pitre: + * Copyright (c) 2002 Monta Vista Software, Inc. + * + * Modified for the OMAP1510 by David Singleton: + * Copyright (c) 2002 Monta Vista Software, Inc. + * + * Cleanup 2004 for OMAP1510/1610 by Dirk Behme + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "clock.h" + +static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE]; +static unsigned short ulpd_sleep_save[ULPD_SLEEP_SAVE_SIZE]; +static unsigned int mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_SIZE]; +static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE]; + +/* + * Let's power down on idle, but only if we are really + * idle, because once we start down the path of + * going idle we continue to do idle even if we get + * a clock tick interrupt . . + */ +void omap_pm_idle(void) +{ + int (*func_ptr)(void) = 0; + unsigned int mask32 = 0; + + /* + * If the DSP is being used let's just idle the CPU, the overhead + * to wake up from Big Sleep is big, milliseconds versus micro + * seconds for wait for interrupt. + */ + + local_irq_disable(); + local_fiq_disable(); + if (need_resched()) { + local_fiq_enable(); + local_irq_enable(); + return; + } + mask32 = omap_readl(ARM_SYSST); + local_fiq_enable(); + local_irq_enable(); + if ((mask32 & DSP_IDLE) == 0) { + __asm__ volatile ("mcr p15, 0, r0, c7, c0, 4"); + } else { + + if (cpu_is_omap1510()) { + func_ptr = (void *)(OMAP1510_SRAM_IDLE_SUSPEND); + } else if (cpu_is_omap1610() || cpu_is_omap1710()) { + func_ptr = (void *)(OMAP1610_SRAM_IDLE_SUSPEND); + } else if (cpu_is_omap5912()) { + func_ptr = (void *)(OMAP5912_SRAM_IDLE_SUSPEND); + } + + func_ptr(); + } +} + +/* + * Configuration of the wakeup event is board specific. For the + * moment we put it into this helper function. Later it may move + * to board specific files. + */ +static void omap_pm_wakeup_setup(void) +{ + /* + * Enable ARM XOR clock and release peripheral from reset by + * writing 1 to PER_EN bit in ARM_RSTCT2, this is required + * for UART configuration to use UART2 to wake up. + */ + + omap_writel(omap_readl(ARM_IDLECT2) | ENABLE_XORCLK, ARM_IDLECT2); + omap_writel(omap_readl(ARM_RSTCT2) | PER_EN, ARM_RSTCT2); + omap_writew(MODEM_32K_EN, ULPD_CLOCK_CTRL); + + /* + * Turn off all interrupts except L1-2nd level cascade, + * and the L2 wakeup interrupts: keypad and UART2. + */ + + omap_writel(~IRQ_LEVEL2, OMAP_IH1_MIR); + + if (cpu_is_omap1510()) { + omap_writel(~(IRQ_UART2 | IRQ_KEYBOARD), OMAP_IH2_MIR); + } + + if (cpu_is_omap16xx()) { + omap_writel(~(IRQ_UART2 | IRQ_KEYBOARD), OMAP_IH2_0_MIR); + + omap_writel(~0x0, OMAP_IH2_1_MIR); + omap_writel(~0x0, OMAP_IH2_2_MIR); + omap_writel(~0x0, OMAP_IH2_3_MIR); + } + + /* New IRQ agreement */ + omap_writel(1, OMAP_IH1_CONTROL); + + /* external PULL to down, bit 22 = 0 */ + omap_writel(omap_readl(PULL_DWN_CTRL_2) & ~(1<<22), PULL_DWN_CTRL_2); +} + +void omap_pm_suspend(void) +{ + unsigned int mask32 = 0; + unsigned long arg0 = 0, arg1 = 0; + int (*func_ptr)(unsigned short, unsigned short) = 0; + unsigned short save_dsp_idlect2; + + printk("PM: OMAP%x is entering deep sleep now ...\n", system_rev); + + if (machine_is_omap_osk()) { + /* Stop LED1 (D9) blink */ + tps65010_set_led(LED1, OFF); + } + + /* + * Step 1: turn off interrupts + */ + + local_irq_disable(); + local_fiq_disable(); + + /* + * Step 2: save registers + * + * The omap is a strange/beautiful device. The caches, memory + * and register state are preserved across power saves. + * We have to save and restore very little register state to + * idle the omap. + * + * Save interrupt, MPUI, ARM and UPLD control registers. + */ + + if (cpu_is_omap1510()) { + MPUI1510_SAVE(OMAP_IH1_MIR); + MPUI1510_SAVE(OMAP_IH2_MIR); + MPUI1510_SAVE(MPUI_CTRL); + MPUI1510_SAVE(MPUI_DSP_BOOT_CONFIG); + MPUI1510_SAVE(MPUI_DSP_API_CONFIG); + MPUI1510_SAVE(EMIFS_CONFIG); + MPUI1510_SAVE(EMIFF_SDRAM_CONFIG); + } else if (cpu_is_omap16xx()) { + MPUI1610_SAVE(OMAP_IH1_MIR); + MPUI1610_SAVE(OMAP_IH2_0_MIR); + MPUI1610_SAVE(OMAP_IH2_1_MIR); + MPUI1610_SAVE(OMAP_IH2_2_MIR); + MPUI1610_SAVE(OMAP_IH2_3_MIR); + MPUI1610_SAVE(MPUI_CTRL); + MPUI1610_SAVE(MPUI_DSP_BOOT_CONFIG); + MPUI1610_SAVE(MPUI_DSP_API_CONFIG); + MPUI1610_SAVE(EMIFS_CONFIG); + MPUI1610_SAVE(EMIFF_SDRAM_CONFIG); + } + + ARM_SAVE(ARM_CKCTL); + ARM_SAVE(ARM_IDLECT1); + ARM_SAVE(ARM_IDLECT2); + ARM_SAVE(ARM_EWUPCT); + ARM_SAVE(ARM_RSTCT1); + ARM_SAVE(ARM_RSTCT2); + ARM_SAVE(ARM_SYSST); + ULPD_SAVE(ULPD_CLOCK_CTRL); + ULPD_SAVE(ULPD_STATUS_REQ); + + /* + * Step 3: LOW_PWR signal enabling + * + * Allow the LOW_PWR signal to be visible on MPUIO5 ball. + */ + if (cpu_is_omap1510()) { + /* POWER_CTRL_REG = 0x1 (LOW_POWER is available) */ + omap_writew(omap_readw(ULPD_POWER_CTRL) | + OMAP1510_ULPD_LOW_POWER_REQ, ULPD_POWER_CTRL); + } else if (cpu_is_omap16xx()) { + /* POWER_CTRL_REG = 0x1 (LOW_POWER is available) */ + omap_writew(omap_readw(ULPD_POWER_CTRL) | + OMAP1610_ULPD_LOW_POWER_REQ, ULPD_POWER_CTRL); + } + + /* configure LOW_PWR pin */ + omap_cfg_reg(T20_1610_LOW_PWR); + + /* + * Step 4: OMAP DSP Shutdown + */ + + /* Set DSP_RST = 1 and DSP_EN = 0, put DSP block into reset */ + omap_writel((omap_readl(ARM_RSTCT1) | DSP_RST) & ~DSP_ENABLE, + ARM_RSTCT1); + + /* Set DSP boot mode to DSP-IDLE, DSP_BOOT_MODE = 0x2 */ + omap_writel(DSP_IDLE_MODE, MPUI_DSP_BOOT_CONFIG); + + /* Set EN_DSPCK = 0, stop DSP block clock */ + omap_writel(omap_readl(ARM_CKCTL) & ~DSP_CLOCK_ENABLE, ARM_CKCTL); + + /* Stop any DSP domain clocks */ + omap_writel(omap_readl(ARM_IDLECT2) | (1< 0 (WDT clock) */ + mask32 |= (1< 1 (XORPCK clock) */ + mask32 &= ~(1< 0 (MPUPER_CK clock) */ + mask32 &= ~(1< 0 (LCDC clock) */ + mask32 &= ~(1< 0 (local bus clock) */ + mask32 |= (1< 1 (MPUI clock) */ + mask32 &= ~(1< 0 (MPU timer clock) */ + mask32 &= ~(1< 0 (DMAC clock) */ + mask32 &= ~(1< 0 (GPIO clock) */ + omap_writel(mask32, ARM_IDLECT2); + + /* disable ARM watchdog */ + omap_writel(0x00F5, OMAP_WDT_TIMER_MODE); + omap_writel(0x00A0, OMAP_WDT_TIMER_MODE); + + /* + * Step 6b: ARM and Traffic controller shutdown + * + * Step 6 continues here. Prepare jump to power management + * assembly code in internal SRAM. + * + * Since the omap_cpu_suspend routine has been copied to + * SRAM, we'll do an indirect procedure call to it and pass the + * contents of arm_idlect1 and arm_idlect2 so it can restore + * them when it wakes up and it will return. + */ + + arg0 = arm_sleep_save[ARM_SLEEP_SAVE_ARM_IDLECT1]; + arg1 = arm_sleep_save[ARM_SLEEP_SAVE_ARM_IDLECT2]; + + if (cpu_is_omap1510()) { + func_ptr = (void *)(OMAP1510_SRAM_API_SUSPEND); + } else if (cpu_is_omap1610() || cpu_is_omap1710()) { + func_ptr = (void *)(OMAP1610_SRAM_API_SUSPEND); + } else if (cpu_is_omap5912()) { + func_ptr = (void *)(OMAP5912_SRAM_API_SUSPEND); + } + + /* + * Step 6c: ARM and Traffic controller shutdown + * + * Jump to assembly code. The processor will stay there + * until wake up. + */ + + func_ptr(arg0, arg1); + + /* + * If we are here, processor is woken up! + */ + + if (cpu_is_omap1510()) { + /* POWER_CTRL_REG = 0x0 (LOW_POWER is disabled) */ + omap_writew(omap_readw(ULPD_POWER_CTRL) & + ~OMAP1510_ULPD_LOW_POWER_REQ, ULPD_POWER_CTRL); + } else if (cpu_is_omap16xx()) { + /* POWER_CTRL_REG = 0x0 (LOW_POWER is disabled) */ + omap_writew(omap_readw(ULPD_POWER_CTRL) & + ~OMAP1610_ULPD_LOW_POWER_REQ, ULPD_POWER_CTRL); + } + + + /* Restore DSP clocks */ + omap_writel(omap_readl(ARM_IDLECT2) | (1<= 1) { + *eof = 1; + return 0; + } + g_read_completed++; + + *my_first_byte = page_buffer; + return my_buffer_offset; +} + +static void omap_pm_init_proc(void) +{ + struct proc_dir_entry *entry; + + entry = create_proc_read_entry("driver/omap_pm", + S_IWUSR | S_IRUGO, NULL, + omap_pm_read_proc, 0); +} + +#endif /* DEBUG && CONFIG_PROC_FS */ + +/* + * omap_pm_prepare - Do preliminary suspend work. + * @state: suspend state we're entering. + * + */ +//#include + +static int omap_pm_prepare(u32 state) +{ + int error = 0; + + switch (state) + { + case PM_SUSPEND_STANDBY: + case PM_SUSPEND_MEM: + break; + + case PM_SUSPEND_DISK: + return -ENOTSUPP; + + default: + return -EINVAL; + } + + return error; +} + + +/* + * omap_pm_enter - Actually enter a sleep state. + * @state: State we're entering. + * + */ + +static int omap_pm_enter(u32 state) +{ + switch (state) + { + case PM_SUSPEND_STANDBY: + case PM_SUSPEND_MEM: + omap_pm_suspend(); + break; + + case PM_SUSPEND_DISK: + return -ENOTSUPP; + + default: + return -EINVAL; + } + + return 0; +} + + +/** + * omap_pm_finish - Finish up suspend sequence. + * @state: State we're coming out of. + * + * This is called after we wake back up (or if entering the sleep state + * failed). + */ + +static int omap_pm_finish(u32 state) +{ + return 0; +} + + +struct pm_ops omap_pm_ops ={ + .pm_disk_mode = 0, + .prepare = omap_pm_prepare, + .enter = omap_pm_enter, + .finish = omap_pm_finish, +}; + +static int __init omap_pm_init(void) +{ + printk("Power Management for TI OMAP.\n"); + pm_idle = omap_pm_idle; + /* + * We copy the assembler sleep/wakeup routines to SRAM. + * These routines need to be in SRAM as that's the only + * memory the MPU can see when it wakes up. + */ + +#ifdef CONFIG_ARCH_OMAP1510 + if (cpu_is_omap1510()) { + memcpy((void *)OMAP1510_SRAM_IDLE_SUSPEND, + omap1510_idle_loop_suspend, + omap1510_idle_loop_suspend_sz); + memcpy((void *)OMAP1510_SRAM_API_SUSPEND, omap1510_cpu_suspend, + omap1510_cpu_suspend_sz); + } else +#endif + if (cpu_is_omap1610() || cpu_is_omap1710()) { + memcpy((void *)OMAP1610_SRAM_IDLE_SUSPEND, + omap1610_idle_loop_suspend, + omap1610_idle_loop_suspend_sz); + memcpy((void *)OMAP1610_SRAM_API_SUSPEND, omap1610_cpu_suspend, + omap1610_cpu_suspend_sz); + } else if (cpu_is_omap5912()) { + memcpy((void *)OMAP5912_SRAM_IDLE_SUSPEND, + omap1610_idle_loop_suspend, + omap1610_idle_loop_suspend_sz); + memcpy((void *)OMAP5912_SRAM_API_SUSPEND, omap1610_cpu_suspend, + omap1610_cpu_suspend_sz); + } + + pm_set_ops(&omap_pm_ops); + +#if defined(DEBUG) && defined(CONFIG_PROC_FS) + omap_pm_init_proc(); +#endif + + return 0; +} +__initcall(omap_pm_init); + diff -Nru a/arch/arm/mach-omap/sleep.S b/arch/arm/mach-omap/sleep.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-omap/sleep.S 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,314 @@ +/* + * linux/arch/arm/mach-omap/sleep.S + * + * Low-level OMAP1510/1610 sleep/wakeUp support + * + * Initial SA1110 code: + * Copyright (c) 2001 Cliff Brake + * + * Adapted for PXA by Nicolas Pitre: + * Copyright (c) 2002 Monta Vista Software, Inc. + * + * Support for OMAP1510/1610 by Dirk Behme + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include + + .text + +/* + * Forces OMAP into idle state + * + * omapXXXX_idle_loop_suspend() + * + * Note: This code get's copied to internal SRAM at boot. When the OMAP + * wakes up it continues execution at the point it went to sleep. + * + * Note: Because of slightly different configuration values we have + * processor specific functions here. + */ + +#ifdef CONFIG_ARCH_OMAP1510 +ENTRY(omap1510_idle_loop_suspend) + + stmfd sp!, {r0 - r12, lr} @ save registers on stack + + @ load base address of ARM_IDLECT1 and ARM_IDLECT2 + mov r4, #CLKGEN_REG_ASM_BASE & 0xff000000 + orr r4, r4, #CLKGEN_REG_ASM_BASE & 0x00ff0000 + orr r4, r4, #CLKGEN_REG_ASM_BASE & 0x0000ff00 + + @ turn off clock domains + @ get ARM_IDLECT2 into r2 + ldrh r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] + mov r5, #OMAP1510_IDLE_CLOCK_DOMAINS & 0xff + orr r5,r5, #OMAP1510_IDLE_CLOCK_DOMAINS & 0xff00 + strh r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] + + @ request ARM idle + @ get ARM_IDLECT1 into r1 + ldrh r1, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff] + orr r3, r1, #OMAP1510_IDLE_LOOP_REQUEST & 0xffff + strh r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff] + + mov r5, #IDLE_WAIT_CYCLES & 0xff + orr r5, r5, #IDLE_WAIT_CYCLES & 0xff00 +l_1510: subs r5, r5, #1 + bne l_1510 +/* + * Let's wait for the next clock tick to wake us up. + */ + mov r0, #0 + mcr p15, 0, r0, c7, c0, 4 @ wait for interrupt +/* + * omap1510_idle_loop_suspend()'s resume point. + * + * It will just start executing here, so we'll restore stuff from the + * stack, reset the ARM_IDLECT1 and ARM_IDLECT2. + */ + + @ restore ARM_IDLECT1 and ARM_IDLECT2 and return + @ r1 has ARM_IDLECT1 and r2 still has ARM_IDLECT2 + strh r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] + strh r1, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff] + + ldmfd sp!, {r0 - r12, pc} @ restore regs and return + +ENTRY(omap1510_idle_loop_suspend_sz) + .word . - omap1510_idle_loop_suspend +#endif /* CONFIG_ARCH_OMAP1510 */ + +#if defined(CONFIG_ARCH_OMAP16XX) +ENTRY(omap1610_idle_loop_suspend) + + stmfd sp!, {r0 - r12, lr} @ save registers on stack + + @ load base address of ARM_IDLECT1 and ARM_IDLECT2 + mov r4, #CLKGEN_REG_ASM_BASE & 0xff000000 + orr r4, r4, #CLKGEN_REG_ASM_BASE & 0x00ff0000 + orr r4, r4, #CLKGEN_REG_ASM_BASE & 0x0000ff00 + + @ turn off clock domains + @ get ARM_IDLECT2 into r2 + ldrh r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] + mov r5, #OMAP1610_IDLE_CLOCK_DOMAINS & 0xff + orr r5,r5, #OMAP1610_IDLE_CLOCK_DOMAINS & 0xff00 + strh r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] + + @ request ARM idle + @ get ARM_IDLECT1 into r1 + ldrh r1, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff] + orr r3, r1, #OMAP1610_IDLE_LOOP_REQUEST & 0xffff + strh r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff] + + mov r5, #IDLE_WAIT_CYCLES & 0xff + orr r5, r5, #IDLE_WAIT_CYCLES & 0xff00 +l_1610: subs r5, r5, #1 + bne l_1610 +/* + * Let's wait for the next clock tick to wake us up. + */ + mov r0, #0 + mcr p15, 0, r0, c7, c0, 4 @ wait for interrupt +/* + * omap1610_idle_loop_suspend()'s resume point. + * + * It will just start executing here, so we'll restore stuff from the + * stack, reset the ARM_IDLECT1 and ARM_IDLECT2. + */ + + @ restore ARM_IDLECT1 and ARM_IDLECT2 and return + @ r1 has ARM_IDLECT1 and r2 still has ARM_IDLECT2 + strh r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] + strh r1, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff] + + ldmfd sp!, {r0 - r12, pc} @ restore regs and return + +ENTRY(omap1610_idle_loop_suspend_sz) + .word . - omap1610_idle_loop_suspend +#endif /* CONFIG_ARCH_OMAP16XX */ + +/* + * Forces OMAP into deep sleep state + * + * omapXXXX_cpu_suspend() + * + * The values of the registers ARM_IDLECT1 and ARM_IDLECT2 are passed + * as arg0 and arg1 from caller. arg0 is stored in register r0 and arg1 + * in register r1. + * + * Note: This code get's copied to internal SRAM at boot. When the OMAP + * wakes up it continues execution at the point it went to sleep. + * + * Note: Because of errata work arounds we have processor specific functions + * here. They are mostly the same, but slightly different. + * + */ + +#ifdef CONFIG_ARCH_OMAP1510 +ENTRY(omap1510_cpu_suspend) + + @ save registers on stack + stmfd sp!, {r0 - r12, lr} + + @ load base address of Traffic Controller + mov r4, #TCMIF_ASM_BASE & 0xff000000 + orr r4, r4, #TCMIF_ASM_BASE & 0x00ff0000 + orr r4, r4, #TCMIF_ASM_BASE & 0x0000ff00 + + @ work around errata of OMAP1510 PDE bit for TC shut down + @ clear PDE bit + ldr r5, [r4, #EMIFS_CONFIG_ASM_OFFSET & 0xff] + bic r5, r5, #PDE_BIT & 0xff + str r5, [r4, #EMIFS_CONFIG_ASM_OFFSET & 0xff] + + @ set PWD_EN bit + and r5, r5, #PWD_EN_BIT & 0xff + str r5, [r4, #EMIFS_CONFIG_ASM_OFFSET & 0xff] + + @ prepare to put SDRAM into self-refresh manually + ldr r5, [r4, #EMIFF_SDRAM_CONFIG_ASM_OFFSET & 0xff] + orr r5, r5, #SELF_REFRESH_MODE & 0xff000000 + orr r5, r5, #SELF_REFRESH_MODE & 0x000000ff + str r5, [r4, #EMIFF_SDRAM_CONFIG_ASM_OFFSET & 0xff] + + @ prepare to put EMIFS to Sleep + ldr r5, [r4, #EMIFS_CONFIG_ASM_OFFSET & 0xff] + orr r5, r5, #IDLE_EMIFS_REQUEST & 0xff + str r5, [r4, #EMIFS_CONFIG_ASM_OFFSET & 0xff] + + @ load base address of ARM_IDLECT1 and ARM_IDLECT2 + mov r4, #CLKGEN_REG_ASM_BASE & 0xff000000 + orr r4, r4, #CLKGEN_REG_ASM_BASE & 0x00ff0000 + orr r4, r4, #CLKGEN_REG_ASM_BASE & 0x0000ff00 + + @ turn off clock domains + mov r5, #OMAP1510_IDLE_CLOCK_DOMAINS & 0xff + orr r5,r5, #OMAP1510_IDLE_CLOCK_DOMAINS & 0xff00 + strh r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] + + @ request ARM idle + mov r3, #OMAP1510_DEEP_SLEEP_REQUEST & 0xff + orr r3, r3, #OMAP1510_DEEP_SLEEP_REQUEST & 0xff00 + strh r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff] + + mov r5, #IDLE_WAIT_CYCLES & 0xff + orr r5, r5, #IDLE_WAIT_CYCLES & 0xff00 +l_1510_2: + subs r5, r5, #1 + bne l_1510_2 +/* + * Let's wait for the next wake up event to wake us up. r0 can't be + * used here because r0 holds ARM_IDLECT1 + */ + mov r2, #0 + mcr p15, 0, r2, c7, c0, 4 @ wait for interrupt +/* + * omap1510_cpu_suspend()'s resume point. + * + * It will just start executing here, so we'll restore stuff from the + * stack, reset the ARM_IDLECT1 and ARM_IDLECT2. + */ + strh r1, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] + strh r0, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff] + + @ restore regs and return + ldmfd sp!, {r0 - r12, pc} + +ENTRY(omap1510_cpu_suspend_sz) + .word . - omap1510_cpu_suspend +#endif /* CONFIG_ARCH_OMAP1510 */ + +#if defined(CONFIG_ARCH_OMAP16XX) +ENTRY(omap1610_cpu_suspend) + + @ save registers on stack + stmfd sp!, {r0 - r12, lr} + + @ load base address of Traffic Controller + mov r4, #TCMIF_ASM_BASE & 0xff000000 + orr r4, r4, #TCMIF_ASM_BASE & 0x00ff0000 + orr r4, r4, #TCMIF_ASM_BASE & 0x0000ff00 + + @ prepare to put SDRAM into self-refresh manually + ldr r5, [r4, #EMIFF_SDRAM_CONFIG_ASM_OFFSET & 0xff] + orr r5, r5, #SELF_REFRESH_MODE & 0xff000000 + orr r5, r5, #SELF_REFRESH_MODE & 0x000000ff + str r5, [r4, #EMIFF_SDRAM_CONFIG_ASM_OFFSET & 0xff] + + @ prepare to put EMIFS to Sleep + ldr r5, [r4, #EMIFS_CONFIG_ASM_OFFSET & 0xff] + orr r5, r5, #IDLE_EMIFS_REQUEST & 0xff + str r5, [r4, #EMIFS_CONFIG_ASM_OFFSET & 0xff] + + @ load base address of ARM_IDLECT1 and ARM_IDLECT2 + mov r4, #CLKGEN_REG_ASM_BASE & 0xff000000 + orr r4, r4, #CLKGEN_REG_ASM_BASE & 0x00ff0000 + orr r4, r4, #CLKGEN_REG_ASM_BASE & 0x0000ff00 + + @ turn off clock domains + mov r5, #OMAP1610_IDLE_CLOCK_DOMAINS & 0xff + orr r5,r5, #OMAP1610_IDLE_CLOCK_DOMAINS & 0xff00 + strh r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] + + @ work around errata of OMAP1610/5912. Enable (!) peripheral + @ clock to let the chip go into deep sleep + ldrh r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] + orr r5,r5, #EN_PERCK_BIT & 0xff + strh r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] + + @ request ARM idle + mov r3, #OMAP1610_DEEP_SLEEP_REQUEST & 0xff + orr r3, r3, #OMAP1610_DEEP_SLEEP_REQUEST & 0xff00 + strh r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff] + + mov r5, #IDLE_WAIT_CYCLES & 0xff + orr r5, r5, #IDLE_WAIT_CYCLES & 0xff00 +l_1610_2: + subs r5, r5, #1 + bne l_1610_2 +/* + * Let's wait for the next wake up event to wake us up. r0 can't be + * used here because r0 holds ARM_IDLECT1 + */ + mov r2, #0 + mcr p15, 0, r2, c7, c0, 4 @ wait for interrupt +/* + * omap1610_cpu_suspend()'s resume point. + * + * It will just start executing here, so we'll restore stuff from the + * stack, reset the ARM_IDLECT1 and ARM_IDLECT2. + */ + strh r1, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] + strh r0, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff] + + @ restore regs and return + ldmfd sp!, {r0 - r12, pc} + +ENTRY(omap1610_cpu_suspend_sz) + .word . - omap1610_cpu_suspend +#endif /* CONFIG_ARCH_OMAP16XX */ diff -Nru a/arch/arm/mach-omap/time.c b/arch/arm/mach-omap/time.c --- a/arch/arm/mach-omap/time.c 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mach-omap/time.c 2004-11-10 17:19:05 -08:00 @@ -41,7 +41,6 @@ #include #include #include -#include #ifndef __instrument #define __instrument diff -Nru a/arch/arm/mach-omap/usb.c b/arch/arm/mach-omap/usb.c --- a/arch/arm/mach-omap/usb.c 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-omap/usb.c 2004-11-10 17:19:06 -08:00 @@ -48,8 +48,10 @@ */ /* TESTED ON: - * - 1611B H2 (with usb1 mini-AB) - * - 1510 Innovator with built-in transceiver (custom cable feeding 5V VBUS) + * - 1611B H2 (with usb1 mini-AB) using standard Mini-B or OTG cables + * - 1510 Innovator UDC with bundled usb0 cable + * - 1510 Innovator OHCI with bundled usb1/usb2 cable + * - 1510 Innovator OHCI with custom usb0 cable, feeding 5V VBUS * - 1710 custom development board using alternate pin group */ @@ -92,7 +94,10 @@ u32 syscon1 = 0; if (nwires == 0) { - USB_TRANSCEIVER_CTRL_REG &= ~(1 << 3); + if (!cpu_is_omap15xx()) { + /* pulldown D+/D- */ + USB_TRANSCEIVER_CTRL_REG &= ~(3 << 1); + } return 0; } @@ -101,36 +106,30 @@ * USB0_VP and USB0_VM are always set on 1510, there's no muxing * available for them. */ - if (nwires >= 2 && !cpu_is_omap1510()) { + if (nwires >= 2 && !cpu_is_omap15xx()) { omap_cfg_reg(AA9_USB0_VP); omap_cfg_reg(R9_USB0_VM); } + if (is_device) + omap_cfg_reg(W4_USB_PUEN); /* internal transceiver */ if (nwires == 2) { - if (cpu_is_omap1510()) { - /* This works for OHCI on 1510-Innovator, nothing to mux */ + if (cpu_is_omap15xx()) { + /* This works for OHCI on 1510-Innovator */ return 0; } -#if 0 /* NOTE: host OR device mode for now, no OTG */ - USB_TRANSCEIVER_CTRL_REG &= ~(3 << 4); + USB_TRANSCEIVER_CTRL_REG &= ~(7 << 4); if (is_device) { - omap_cfg_reg(W4_USB_PUEN); omap_cfg_reg(R18_1510_USB_GPIO0); // omap_cfg_reg(USB0_VBUS); - // omap_cfg_reg(USB0_PUEN); // USB_TRANSCEIVER_CTRL_REG.CONF_USB0_PORT_R = 7 - // when USB0_PUEN is needed } else /* host mode needs D+ and D- pulldowns */ USB_TRANSCEIVER_CTRL_REG &= ~(3 << 1); + return 3 << 16; -#else - /* FIXME: 1610 needs to return the right value here */ - printk(KERN_ERR "usb0 internal transceiver, nyet\n"); - return 0; -#endif } /* alternate pin config, external transceiver */ @@ -170,7 +169,7 @@ { u32 syscon1 = 0; - if (nwires != 6) + if (nwires != 6 && !cpu_is_omap15xx()) USB_TRANSCEIVER_CTRL_REG &= ~CONF_USB1_UNI_R; if (nwires == 0) return 0; @@ -178,11 +177,11 @@ /* external transceiver */ omap_cfg_reg(USB1_TXD); omap_cfg_reg(USB1_TXEN); - if (cpu_is_omap1510()) { + if (cpu_is_omap15xx()) { omap_cfg_reg(USB1_SEO); omap_cfg_reg(USB1_SPEED); // SUSP - } else if (cpu_is_omap1610() || cpu_is_omap5912() || cpu_is_omap1710()) { + } else if (cpu_is_omap16xx()) { omap_cfg_reg(W13_1610_USB1_SE0); omap_cfg_reg(R13_1610_USB1_SPEED); // SUSP @@ -203,7 +202,8 @@ syscon1 = 3; omap_cfg_reg(USB1_VP); omap_cfg_reg(USB1_VM); - USB_TRANSCEIVER_CTRL_REG |= CONF_USB1_UNI_R; + if (!cpu_is_omap15xx()) + USB_TRANSCEIVER_CTRL_REG |= CONF_USB1_UNI_R; break; default: printk(KERN_ERR "illegal usb%d %d-wire transceiver\n", @@ -216,31 +216,32 @@ { u32 syscon1 = 0; - if (alt_pingroup) + if (alt_pingroup || nwires == 0) return 0; - if (nwires != 6) + if (nwires != 6 && !cpu_is_omap15xx()) USB_TRANSCEIVER_CTRL_REG &= ~CONF_USB2_UNI_R; if (nwires == 0) return 0; /* external transceiver */ - if (cpu_is_omap1510()) { + if (cpu_is_omap15xx()) { omap_cfg_reg(USB2_TXD); omap_cfg_reg(USB2_TXEN); omap_cfg_reg(USB2_SEO); if (nwires != 3) omap_cfg_reg(USB2_RCV); - } else if (cpu_is_omap1610() || cpu_is_omap5912() || cpu_is_omap1710()) { + /* there is no USB2_SPEED */ + } else if (cpu_is_omap16xx()) { omap_cfg_reg(V6_USB2_TXD); omap_cfg_reg(W9_USB2_TXEN); omap_cfg_reg(W5_USB2_SE0); if (nwires != 3) omap_cfg_reg(Y5_USB2_RCV); + // FIXME omap_cfg_reg(USB2_SPEED); } else { pr_debug("usb unrecognized\n"); } // omap_cfg_reg(USB2_SUSP); - // FIXME omap_cfg_reg(USB2_SPEED); switch (nwires) { case 3: @@ -251,14 +252,14 @@ break; case 6: syscon1 = 3; - if (cpu_is_omap1510()) { + if (cpu_is_omap15xx()) { omap_cfg_reg(USB2_VP); omap_cfg_reg(USB2_VM); } else { omap_cfg_reg(AA9_USB2_VP); omap_cfg_reg(R9_USB2_VM); + USB_TRANSCEIVER_CTRL_REG |= CONF_USB2_UNI_R; } - USB_TRANSCEIVER_CTRL_REG |= CONF_USB2_UNI_R; break; default: printk(KERN_ERR "illegal usb%d %d-wire transceiver\n", @@ -337,7 +338,7 @@ .dev = { .release = usb_release, .dma_mask = &ohci_dmamask, - .coherent_dma_mask = 0x0fffffff, + .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(ohci_resources), .resource = ohci_resources, @@ -375,7 +376,11 @@ // FIXME correct answer depends on hmc_mode, // as does any nonzero value for config->otg port number +#ifdef CONFIG_USB_GADGET_OMAP +#define is_usb0_device(config) 1 +#else #define is_usb0_device(config) 0 +#endif /*-------------------------------------------------------------------------*/ @@ -420,7 +425,7 @@ if (alt_pingroup) printk(", usb2 alt %d wires", config->pins[2]); else if (config->pins[0]) - printk(", usb0 %d wires%s", config->pins[2], + printk(", usb0 %d wires%s", config->pins[0], is_usb0_device(config) ? " (dev)" : ""); if (config->pins[1]) printk(", usb1 %d wires", config->pins[1]); @@ -477,6 +482,19 @@ #ifdef CONFIG_ARCH_OMAP1510 +#define ULPD_SOFT_REQ_REG __REG16(ULPD_SOFT_REQ) +#define SOFT_UDC_REQ (1 << 4) +#define SOFT_DPLL_REQ (1 << 0) + +#define ULPD_DPLL_CTRL_REG __REG16(ULPD_DPLL_CTRL) +#define DPLL_IOB (1 << 13) +#define DPLL_PLL_ENABLE (1 << 4) +#define DPLL_LOCK (1 << 0) + +#define ULPD_APLL_CTRL_REG __REG16(ULPD_APLL_CTRL) +#define APLL_NDPLL_SWITCH (1 << 0) + + static void __init omap_1510_usb_init(struct omap_usb_config *config) { int status; @@ -490,16 +508,43 @@ val |= (config->hmc_mode << 1); omap_writel(val, MOD_CONF_CTRL_0); - // FIXME this has a UDC controller too + printk("USB: hmc %d", config->hmc_mode); + if (config->pins[0]) + printk(", usb0 %d wires%s", config->pins[0], + is_usb0_device(config) ? " (dev)" : ""); + if (config->pins[1]) + printk(", usb1 %d wires", config->pins[1]); + if (config->pins[2]) + printk(", usb2 %d wires", config->pins[2]); + printk("\n"); + + /* use DPLL for 48 MHz function clock */ + pr_debug("APLL %04x DPLL %04x REQ %04x\n", ULPD_APLL_CTRL_REG, + ULPD_DPLL_CTRL_REG, ULPD_SOFT_REQ_REG); + ULPD_APLL_CTRL_REG &= ~APLL_NDPLL_SWITCH; + ULPD_DPLL_CTRL_REG |= DPLL_IOB | DPLL_PLL_ENABLE; + ULPD_SOFT_REQ_REG |= SOFT_UDC_REQ | SOFT_DPLL_REQ; + while (!(ULPD_DPLL_CTRL_REG & DPLL_LOCK)) + cpu_relax(); + +#ifdef CONFIG_USB_GADGET_OMAP + if (config->register_dev) { + udc_device.dev.platform_data = config; + status = platform_device_register(&udc_device); + if (status) + pr_debug("can't register UDC device, %d\n", status); + /* udc driver gates 48MHz by D+ pullup */ + } +#endif #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) - if (config->otg || config->register_host) { + if (config->register_host) { ohci_device.dev.platform_data = config; status = platform_device_register(&ohci_device); if (status) pr_debug("can't register OHCI device, %d\n", status); + /* hcd explicitly gates 48MHz */ } - // FIXME completely untested ... #endif } @@ -524,12 +569,9 @@ } platform_data = *config; - if (cpu_is_omap730() - || cpu_is_omap1610() - || cpu_is_omap1710() - || cpu_is_omap5912()) + if (cpu_is_omap730() || cpu_is_omap16xx()) omap_otg_init(&platform_data); - else if (cpu_is_omap1510()) + else if (cpu_is_omap15xx()) omap_1510_usb_init(&platform_data); else { printk(KERN_ERR "USB: No init for your chip yet\n"); diff -Nru a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c --- a/arch/arm/mach-pxa/generic.c 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/mach-pxa/generic.c 2004-11-10 17:19:03 -08:00 @@ -49,6 +49,10 @@ int gafr; local_irq_save(flags); + if (gpio_mode & GPIO_DFLT_LOW) + GPCR(gpio) = GPIO_bit(gpio); + else if (gpio_mode & GPIO_DFLT_HIGH) + GPSR(gpio) = GPIO_bit(gpio); if (gpio_mode & GPIO_MD_MASK_DIR) GPDR(gpio) |= GPIO_bit(gpio); else diff -Nru a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c --- a/arch/arm/mach-pxa/pm.c 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mach-pxa/pm.c 2004-11-10 17:19:05 -08:00 @@ -63,7 +63,7 @@ }; -static int pxa_pm_enter(u32 state) +static int pxa_pm_enter(suspend_state_t state) { unsigned long sleep_save[SLEEP_SAVE_SIZE]; unsigned long checksum = 0; @@ -163,7 +163,7 @@ /* * Called after processes are frozen, but before we shut down devices. */ -static int pxa_pm_prepare(u32 state) +static int pxa_pm_prepare(suspend_state_t state) { return 0; } @@ -171,7 +171,7 @@ /* * Called after devices are re-setup, but before processes are thawed. */ -static int pxa_pm_finish(u32 state) +static int pxa_pm_finish(suspend_state_t state) { return 0; } diff -Nru a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-pxa/ssp.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,319 @@ +/* + * linux/arch/arm/mach-pxa/ssp.c + * + * based on linux/arch/arm/mach-sa1100/ssp.c by Russell King + * + * Copyright (C) 2003 Russell King. + * Copyright (C) 2003 Wolfson Microelectronics PLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * PXA2xx SSP driver. This provides the generic core for simple + * IO-based SSP applications and allows easy port setup for DMA access. + * + * Author: Liam Girdwood + * + * Revision history: + * 22nd Aug 2003 Initial version. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + struct ssp_dev *dev = (struct ssp_dev*) dev_id; + unsigned int status = SSSR_P(dev->port); + + SSSR_P(dev->port) = status; /* clear status bits */ + + if (status & SSSR_ROR) + printk(KERN_WARNING "SSP(%d): receiver overrun\n", dev->port); + + if (status & SSSR_TUR) + printk(KERN_WARNING "SSP(%d): transmitter underrun\n", dev->port); + + if (status & SSSR_BCE) + printk(KERN_WARNING "SSP(%d): bit count error\n", dev->port); + + return IRQ_HANDLED; +} + +/** + * ssp_write_word - write a word to the SSP port + * @data: 32-bit, MSB justified data to write. + * + * Wait for a free entry in the SSP transmit FIFO, and write a data + * word to the SSP port. + * + * The caller is expected to perform the necessary locking. + * + * Returns: + * %-ETIMEDOUT timeout occurred (for future) + * 0 success + */ +int ssp_write_word(struct ssp_dev *dev, u32 data) +{ + while (!(SSSR_P(dev->port) & SSSR_TNF)) + cpu_relax(); + + SSDR_P(dev->port) = data; + + return 0; +} + +/** + * ssp_read_word - read a word from the SSP port + * + * Wait for a data word in the SSP receive FIFO, and return the + * received data. Data is LSB justified. + * + * Note: Currently, if data is not expected to be received, this + * function will wait for ever. + * + * The caller is expected to perform the necessary locking. + * + * Returns: + * %-ETIMEDOUT timeout occurred (for future) + * 32-bit data success + */ +int ssp_read_word(struct ssp_dev *dev) +{ + while (!(SSSR_P(dev->port) & SSSR_RNE)) + cpu_relax(); + + return SSDR_P(dev->port); +} + +/** + * ssp_flush - flush the transmit and receive FIFOs + * + * Wait for the SSP to idle, and ensure that the receive FIFO + * is empty. + * + * The caller is expected to perform the necessary locking. + */ +void ssp_flush(struct ssp_dev *dev) +{ + do { + while (SSSR_P(dev->port) & SSSR_RNE) { + (void) SSDR_P(dev->port); + } + } while (SSSR_P(dev->port) & SSSR_BSY); +} + +/** + * ssp_enable - enable the SSP port + * + * Turn on the SSP port. + */ +void ssp_enable(struct ssp_dev *dev) +{ + SSCR0_P(dev->port) |= SSCR0_SSE; +} + +/** + * ssp_disable - shut down the SSP port + * + * Turn off the SSP port, optionally powering it down. + */ +void ssp_disable(struct ssp_dev *dev) +{ + SSCR0_P(dev->port) &= ~SSCR0_SSE; +} + +/** + * ssp_save_state - save the SSP configuration + * @ssp: pointer to structure to save SSP configuration + * + * Save the configured SSP state for suspend. + */ +void ssp_save_state(struct ssp_dev *dev, struct ssp_state *ssp) +{ + ssp->cr0 = SSCR0_P(dev->port); + ssp->cr1 = SSCR1_P(dev->port); + ssp->to = SSTO_P(dev->port); + ssp->psp = SSPSP_P(dev->port); + + SSCR0_P(dev->port) &= ~SSCR0_SSE; +} + +/** + * ssp_restore_state - restore a previously saved SSP configuration + * @ssp: pointer to configuration saved by ssp_save_state + * + * Restore the SSP configuration saved previously by ssp_save_state. + */ +void ssp_restore_state(struct ssp_dev *dev, struct ssp_state *ssp) +{ + SSSR_P(dev->port) = SSSR_ROR | SSSR_TUR | SSSR_BCE; + + SSCR0_P(dev->port) = ssp->cr0 & ~SSCR0_SSE; + SSCR1_P(dev->port) = ssp->cr1; + SSTO_P(dev->port) = ssp->to; + SSPSP_P(dev->port) = ssp->psp; + + SSCR0_P(dev->port) = ssp->cr0; +} + +/** + * ssp_init - setup the SSP port + * + * initialise and claim resources for the SSP port. + * + * Returns: + * %-ENODEV if the SSP port is unavailable + * %-EBUSY if the resources are already in use + * %0 on success + */ +int ssp_init(struct ssp_dev *dev, u32 port, u32 mode, u32 flags, u32 psp_flags, + u32 speed) +{ + int ret, irq; + + if (!request_mem_region(__PREG(SSCR0_P(port)), 0x2c, "SSP")) { + return -EBUSY; + } + + switch (port) { + case 1: + irq = IRQ_SSP; + break; +#if defined (CONFIG_PXA27x) + case 2: + irq = IRQ_SSP2; + break; + case 3: + irq = IRQ_SSP3; + break; +#else + case 2: + irq = IRQ_NSSP; + break; + case 3: + irq = IRQ_ASSP; + break; +#endif + default: + return -ENODEV; + } + + dev->port = port; + dev->mode = mode; + dev->flags = flags; + dev->psp_flags = psp_flags; + dev->speed = speed; + + /* set up port type, speed, port settings */ + SSCR0_P(dev->port) = (dev->speed | dev->mode); + SSCR1_P(dev->port) = dev->flags; + SSPSP_P(dev->port) = dev->psp_flags; + + ret = request_irq(irq, ssp_interrupt, 0, "SSP", dev); + if (ret) + goto out_region; + + /* turn on SSP port clock */ + switch (dev->port) { +#if defined (CONFIG_PXA27x) + case 1: + pxa_set_cken(CKEN23_SSP1, 1); + break; + case 2: + pxa_set_cken(CKEN3_SSP2, 1); + break; + case 3: + pxa_set_cken(CKEN4_SSP3, 1); + break; +#else + case 1: + pxa_set_cken(CKEN3_SSP, 1); + break; + case 2: + pxa_set_cken(CKEN9_NSSP, 1); + break; + case 3: + pxa_set_cken(CKEN10_ASSP, 1); + break; +#endif + } + + return 0; + +out_region: + release_mem_region(__PREG(SSCR0_P(dev->port)), 0x2c); + return ret; +} + +/** + * ssp_exit - undo the effects of ssp_init + * + * release and free resources for the SSP port. + */ +void ssp_exit(struct ssp_dev *dev) +{ + int irq; + + SSCR0_P(dev->port) &= ~SSCR0_SSE; + + /* find irq, save power and turn off SSP port clock */ + switch (dev->port) { +#if defined (CONFIG_PXA27x) + case 1: + irq = IRQ_SSP; + pxa_set_cken(CKEN23_SSP1, 0); + break; + case 2: + irq = IRQ_SSP2; + pxa_set_cken(CKEN3_SSP2, 0); + break; + case 3: + irq = IRQ_SSP3; + pxa_set_cken(CKEN4_SSP3, 0); + break; +#else + case 1: + irq = IRQ_SSP; + pxa_set_cken(CKEN3_SSP, 0); + break; + case 2: + irq = IRQ_NSSP; + pxa_set_cken(CKEN9_NSSP, 0); + break; + case 3: + irq = IRQ_ASSP; + pxa_set_cken(CKEN10_ASSP, 0); + break; +#endif + default: + printk(KERN_WARNING "SSP: tried to close invalid port\n"); + return; + } + + free_irq(irq, dev); + release_mem_region(__PREG(SSCR0_P(dev->port)), 0x2c); +} + +EXPORT_SYMBOL(ssp_write_word); +EXPORT_SYMBOL(ssp_read_word); +EXPORT_SYMBOL(ssp_flush); +EXPORT_SYMBOL(ssp_enable); +EXPORT_SYMBOL(ssp_disable); +EXPORT_SYMBOL(ssp_save_state); +EXPORT_SYMBOL(ssp_restore_state); +EXPORT_SYMBOL(ssp_init); +EXPORT_SYMBOL(ssp_exit); diff -Nru a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c --- a/arch/arm/mach-rpc/riscpc.c 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mach-rpc/riscpc.c 2004-11-10 17:19:05 -08:00 @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include #include @@ -65,11 +67,11 @@ static struct map_desc rpc_io_desc[] __initdata = { { SCREEN_BASE, SCREEN_START, 2*1048576, MT_DEVICE }, /* VRAM */ - { IO_BASE, IO_START, IO_SIZE , MT_DEVICE }, /* IO space */ + { IO_BASE, IO_START, IO_SIZE , MT_DEVICE }, /* IO space */ { EASI_BASE, EASI_START, EASI_SIZE, MT_DEVICE } /* EASI space */ }; -void __init rpc_map_io(void) +static void __init rpc_map_io(void) { iotable_init(rpc_io_desc, ARRAY_SIZE(rpc_io_desc)); @@ -83,6 +85,85 @@ */ elf_hwcap &= ~HWCAP_HALF; } + +static struct resource acornfb_resources[] = { + { /* VIDC */ + .start = 0x03400000, + .end = 0x035fffff, + .flags = IORESOURCE_MEM, + }, { + .start = IRQ_VSYNCPULSE, + .end = IRQ_VSYNCPULSE, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device acornfb_device = { + .name = "acornfb", + .id = -1, + .dev = { + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(acornfb_resources), + .resource = acornfb_resources, +}; + +static struct resource iomd_resources[] = { + { + .start = 0x03200000, + .end = 0x0320ffff, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device iomd_device = { + .name = "iomd", + .id = -1, + .num_resources = ARRAY_SIZE(iomd_resources), + .resource = iomd_resources, +}; + +static struct platform_device kbd_device = { + .name = "kart", + .id = -1, + .dev = { + .parent = &iomd_device.dev, + }, +}; + +static struct plat_serial8250_port serial_platform_data[] = { + { + .mapbase = 0x03010fe0, + .irq = 10, + .uartclk = 1843200, + .regshift = 2, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SKIP_TEST, + }, + { }, +}; + +static struct platform_device serial_device = { + .name = "serial8250", + .id = 0, + .dev = { + .platform_data = serial_platform_data, + }, +}; + +static struct platform_device *devs[] __initdata = { + &iomd_device, + &kbd_device, + &serial_device, + &acornfb_device, +}; + +static int __init rpc_init(void) +{ + return platform_add_devices(devs, ARRAY_SIZE(devs)); +} + +arch_initcall(rpc_init); extern struct sys_timer ioc_timer; diff -Nru a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig --- a/arch/arm/mach-s3c2410/Kconfig 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-s3c2410/Kconfig 2004-11-10 17:19:04 -08:00 @@ -72,4 +72,31 @@ the CPU time doing so. +config S3C2410_PM_DEBUG + bool "S3C2410 PM Suspend debug" + depends on ARCH_S3C2410 && PM + help + Say Y here if you want verbose debugging from the PM Suspend and + Resume code. See `Documentation/arm/Samsing-S3C24XX/Suspend.txt` + for more information. + +config S3C2410_PM_CHECK + bool "S3C2410 PM Suspend Memory CRC" + depends on ARCH_S3C2410 && PM && CRC32 + help + Enable the PM code's memory area checksum over sleep. This option + will generate CRCs of all blocks of memory, and store them before + going to sleep. The blocks are then checked on resume for any + errors. + +config S3C2410_PM_CHECK_CHUNKSIZE + int "S3C2410 PM Suspend CRC Chunksize (KiB)" + depends on ARCH_S3C2410 && PM && S3C2410_PM_CHECK + default 64 + help + Set the chunksize in Kilobytes of the CRC for checking memory + corruption over suspend and resume. A smaller value will mean that + the CRC data block will take more memory, but wil identify any + faults with better precision. + endif diff -Nru a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile --- a/arch/arm/mach-s3c2410/Makefile 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/mach-s3c2410/Makefile 2004-11-10 17:19:03 -08:00 @@ -15,6 +15,10 @@ obj-$(CONFIG_CPU_S3C2410) += s3c2410.o obj-$(CONFIG_S3C2410_DMA) += dma.o +# Power Management support + +obj-$(CONFIG_PM) += pm.o sleep.o + # S3C2440 support obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o diff -Nru a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c --- a/arch/arm/mach-s3c2410/clock.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-s3c2410/clock.c 2004-11-10 17:19:02 -08:00 @@ -59,7 +59,7 @@ /* old functions */ -void s3c2410_clk_enable(unsigned int clocks, unsigned int enable) +void inline s3c2410_clk_enable(unsigned int clocks, unsigned int enable) { unsigned long clkcon; unsigned long flags; @@ -72,11 +72,26 @@ if (enable) clkcon |= clocks; + /* ensure none of the special function bits set */ + clkcon &= ~(S3C2410_CLKCON_IDLE|S3C2410_CLKCON_POWER); + __raw_writel(clkcon, S3C2410_CLKCON); local_irq_restore(flags); } +/* enable and disable calls for use with the clk struct */ + +static int clk_null_enable(struct clk *clk, int enable) +{ + return 0; +} + +int s3c2410_clkcon_enable(struct clk *clk, int enable) +{ + s3c2410_clk_enable(clk->ctrlbit, enable); + return 0; +} /* Clock API calls */ @@ -105,15 +120,16 @@ int clk_enable(struct clk *clk) { - if (clk->ctrlbit != 0) - s3c2410_clk_enable(clk->ctrlbit, 1); + if (IS_ERR(clk)) + return -EINVAL; - return 0; + return (clk->enable)(clk, 1); } void clk_disable(struct clk *clk) { - s3c2410_clk_enable(clk->ctrlbit, 0); + if (!IS_ERR(clk)) + (clk->enable)(clk, 0); } @@ -131,8 +147,11 @@ unsigned long clk_get_rate(struct clk *clk) { - if (clk->parent != NULL) - return clk->parent->rate; + if (clk->rate != 0) + return clk->rate; + + while (clk->parent != NULL && clk->rate == 0) + clk = clk->parent; return clk->rate; } @@ -186,67 +205,105 @@ .ctrlbit = 0 }; +/* clocks that could be registered by external code */ + +struct clk s3c24xx_dclk0 = { + .name = "dclk0", +}; + +struct clk s3c24xx_dclk1 = { + .name = "dclk1", +}; + +struct clk s3c24xx_clkout0 = { + .name = "clkout1", +}; + +struct clk s3c24xx_clkout1 = { + .name = "clkout1", +}; + +struct clk s3c24xx_uclk = { + .name = "uclk", +}; + + /* clock definitions */ static struct clk init_clocks[] = { { .name = "nand", .parent = &clk_h, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_NAND }, { .name = "lcd", .parent = &clk_h, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_LCDC }, { .name = "usb-host", .parent = &clk_h, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_USBH }, { .name = "usb-device", .parent = &clk_h, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_USBD }, { .name = "timers", .parent = &clk_p, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_PWMT }, { .name = "sdi", .parent = &clk_p, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_SDI }, { .name = "uart0", .parent = &clk_p, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_UART0 }, { .name = "uart1", .parent = &clk_p, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_UART1 }, { .name = "uart2", .parent = &clk_p, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_UART2 }, { .name = "gpio", .parent = &clk_p, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_GPIO }, { .name = "rtc", .parent = &clk_p, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_RTC }, { .name = "adc", .parent = &clk_p, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_ADC }, { .name = "i2c", .parent = &clk_p, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_IIC }, { .name = "iis", .parent = &clk_p, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_IIS }, { .name = "spi", .parent = &clk_p, + .enable = s3c2410_clkcon_enable, .ctrlbit = S3C2410_CLKCON_SPI }, { .name = "watchdog", @@ -262,6 +319,9 @@ clk->owner = THIS_MODULE; atomic_set(&clk->used, 0); + if (clk->enable == NULL) + clk->enable = clk_null_enable; + /* add to the list of available clocks */ down(&clocks_sem); @@ -273,7 +333,7 @@ /* initalise all the clocks */ -static int __init s3c2410_init_clocks(void) +int __init s3c2410_init_clocks(void) { struct clk *clkp = init_clocks; int ptr; @@ -287,8 +347,25 @@ clk_p.rate = s3c24xx_pclk; clk_f.rate = s3c24xx_fclk; - /* set the enabled clocks to a minimal (known) state */ - __raw_writel(S3C2410_CLKCON_PWMT | S3C2410_CLKCON_UART0 | S3C2410_CLKCON_UART1 | S3C2410_CLKCON_UART2 | S3C2410_CLKCON_GPIO | S3C2410_CLKCON_RTC, S3C2410_CLKCON); + /* it looks like just setting the register here is not good + * enough, and causes the odd hang at initial boot time, so + * do all of them indivdually. + * + * I think disabling the LCD clock if the LCD is active is + * very dangerous, and therefore the bootloader should be + * careful to not enable the LCD clock if it is not needed. + * + * and of course, this looks neater + */ + + s3c2410_clk_enable(S3C2410_CLKCON_NAND, 0); + s3c2410_clk_enable(S3C2410_CLKCON_USBH, 0); + s3c2410_clk_enable(S3C2410_CLKCON_USBD, 0); + s3c2410_clk_enable(S3C2410_CLKCON_ADC, 0); + s3c2410_clk_enable(S3C2410_CLKCON_IIC, 0); + s3c2410_clk_enable(S3C2410_CLKCON_SPI, 0); + + /* assume uart clocks are correctly setup */ /* register our clocks */ @@ -312,5 +389,4 @@ return 0; } -arch_initcall(s3c2410_init_clocks); diff -Nru a/arch/arm/mach-s3c2410/clock.h b/arch/arm/mach-s3c2410/clock.h --- a/arch/arm/mach-s3c2410/clock.h 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-s3c2410/clock.h 2004-11-10 17:19:04 -08:00 @@ -2,7 +2,7 @@ * linux/arch/arm/mach-s3c2410/clock.h * * Copyright (c) 2004 Simtec Electronics - * Written by Ben Dooks, + * Written by Ben Dooks, * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -17,11 +17,30 @@ atomic_t used; unsigned long rate; unsigned long ctrlbit; + int (*enable)(struct clk *, int enable); }; +/* other clocks which may be registered by board support */ + +extern struct clk s3c24xx_dclk0; +extern struct clk s3c24xx_dclk1; +extern struct clk s3c24xx_clkout0; +extern struct clk s3c24xx_clkout1; +extern struct clk s3c24xx_uclk; + /* processor clock settings, in Hz */ extern unsigned long s3c24xx_xtal; extern unsigned long s3c24xx_pclk; extern unsigned long s3c24xx_hclk; extern unsigned long s3c24xx_fclk; + +/* exports for arch/arm/mach-s3c2410 + * + * Please DO NOT use these outside of arch/arm/mach-s3c2410 +*/ + +extern int s3c2410_clkcon_enable(struct clk *clk, int enable); +extern int s3c2410_register_clock(struct clk *clk); +extern int s3c2410_init_clocks(void); + diff -Nru a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c --- a/arch/arm/mach-s3c2410/cpu.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-s3c2410/cpu.c 2004-11-10 17:19:04 -08:00 @@ -38,6 +38,7 @@ #include #include "cpu.h" +#include "clock.h" #include "s3c2410.h" #include "s3c2440.h" @@ -65,7 +66,7 @@ .name = name_s3c2410 }, { - .idcode = 0x3241002, + .idcode = 0x32410002, .idmask = 0xffffffff, .map_io = s3c2410_map_io, .init = s3c2410_init, @@ -112,6 +113,26 @@ return NULL; } +/* board information */ + +static struct s3c24xx_board *board; + +void s3c24xx_set_board(struct s3c24xx_board *b) +{ + int i; + + board = b; + + if (b->clocks_count != 0) { + struct clk **ptr = b->clocks;; + + for (i = b->clocks_count; i > 0; i--, ptr++) + s3c2410_register_clock(*ptr); + } +} + +/* cpu information */ + static struct cpu_table *cpu; void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) @@ -141,12 +162,29 @@ static int __init s3c_arch_init(void) { + int ret; + // do the correct init for cpu if (cpu == NULL) panic("s3c_arch_init: NULL cpu\n"); - return (cpu->init)(); + ret = (cpu->init)(); + if (ret != 0) + return ret; + + if (board != NULL) { + ret = platform_add_devices(board->devices, board->devices_count); + if (ret) { + printk(KERN_ERR "s3c24xx: failed to add board devices (%d)\n", ret); + } + + /* mask any error, we may not need all these board + * devices */ + ret = 0; + } + + return ret; } arch_initcall(s3c_arch_init); diff -Nru a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h --- a/arch/arm/mach-s3c2410/cpu.h 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-s3c2410/cpu.h 2004-11-10 17:19:02 -08:00 @@ -11,6 +11,7 @@ * * Modifications: * 24-Aug-2004 BJD Start of generic S3C24XX support + * 18-Oct-2004 BJD Moved board struct into this file */ #define IODESC_ENT(x) { S3C2410_VA_##x, S3C2410_PA_##x, S3C2410_SZ_##x, MT_DEVICE } @@ -38,3 +39,21 @@ #endif extern void s3c24xx_init_io(struct map_desc *mach_desc, int size); + +/* the board structure is used at first initialsation time + * to get info such as the devices to register for this + * board. This is done because platfrom_add_devices() cannot + * be called from the map_io entry. +*/ + +struct s3c24xx_board { + struct platform_device **devices; + unsigned int devices_count; + + struct clk **clocks; + unsigned int clocks_count; +}; + +extern void s3c24xx_set_board(struct s3c24xx_board *board); + + diff -Nru a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c --- a/arch/arm/mach-s3c2410/dma.c 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/mach-s3c2410/dma.c 2004-11-10 17:19:03 -08:00 @@ -52,7 +52,7 @@ #include /* io map for dma */ -static void *dma_base; +static void __iomem *dma_base; /* dma channel state information */ s3c2410_dma_chan_t s3c2410_chans[S3C2410_DMA_CHANNELS]; @@ -1065,7 +1065,7 @@ /* dma channel irqs are in order.. */ cp->number = channel; cp->irq = channel + IRQ_DMA0; - cp->regs = (unsigned long)dma_base + (channel*0x40); + cp->regs = dma_base + (channel*0x40); /* point current stats somewhere */ cp->stats = &cp->stats_store; @@ -1075,7 +1075,7 @@ cp->load_timeout = 1<<18; - printk("DMA channel %d at %08lx, irq %d\n", + printk("DMA channel %d at %p, irq %d\n", cp->number, cp->regs, cp->irq); } diff -Nru a/arch/arm/mach-s3c2410/gpio.c b/arch/arm/mach-s3c2410/gpio.c --- a/arch/arm/mach-s3c2410/gpio.c 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-s3c2410/gpio.c 2004-11-10 17:19:06 -08:00 @@ -28,6 +28,7 @@ * 01-Oct-2004 BJD Fixed mask bug in pullup() call * 01-Oct-2004 BJD Added getirq() to turn pin into irqno * 04-Oct-2004 BJD Added irq filter controls for GPIO + * 05-Nov-2004 BJD EXPORT_SYMBOL() added for all code */ @@ -66,6 +67,8 @@ local_irq_restore(flags); } +EXPORT_SYMBOL(s3c2410_gpio_cfgpin); + unsigned int s3c2410_gpio_getcfg(unsigned int pin) { unsigned long base = S3C2410_GPIO_BASE(pin); @@ -80,6 +83,8 @@ return __raw_readl(base) & mask; } +EXPORT_SYMBOL(s3c2410_gpio_getcfg); + void s3c2410_gpio_pullup(unsigned int pin, unsigned int to) { unsigned long base = S3C2410_GPIO_BASE(pin); @@ -100,6 +105,8 @@ local_irq_restore(flags); } +EXPORT_SYMBOL(s3c2410_gpio_pullup); + void s3c2410_gpio_setpin(unsigned int pin, unsigned int to) { unsigned long base = S3C2410_GPIO_BASE(pin); @@ -117,6 +124,8 @@ local_irq_restore(flags); } +EXPORT_SYMBOL(s3c2410_gpio_setpin); + unsigned int s3c2410_gpio_getpin(unsigned int pin) { unsigned long base = S3C2410_GPIO_BASE(pin); @@ -125,6 +134,8 @@ return __raw_readl(base + 0x04) & (1<< offs); } +EXPORT_SYMBOL(s3c2410_gpio_getpin); + unsigned int s3c2410_modify_misccr(unsigned int clear, unsigned int change) { unsigned long flags; @@ -140,6 +151,8 @@ return misccr; } +EXPORT_SYMBOL(s3c2410_modify_misccr); + int s3c2410_gpio_getirq(unsigned int pin) { if (pin < S3C2410_GPF0 || pin > S3C2410_GPG15_EINT23) @@ -157,6 +170,8 @@ return (pin - S3C2410_GPG0) + IRQ_EINT8; } +EXPORT_SYMBOL(s3c2410_gpio_getirq); + int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on, unsigned int config) { @@ -192,3 +207,5 @@ return 0; } + +EXPORT_SYMBOL(s3c2410_gpio_irqfilter); diff -Nru a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c --- a/arch/arm/mach-s3c2410/irq.c 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/mach-s3c2410/irq.c 2004-11-10 17:19:03 -08:00 @@ -33,9 +33,14 @@ * * 05-Oct-2004 Ben Dooks * Tidy up KF's patch and sort out new release + * + * 05-Oct-2004 Ben Dooks + * Add support for power management controls + * + * 04-Nov-2004 Ben Dooks + * Fix standard IRQ wake for EINT0..4 and RTC */ - #include #include #include @@ -52,10 +57,73 @@ #include #include +#include "pm.h" #define irqdbf(x...) #define irqdbf2(x...) +#define EXTINT_OFF (IRQ_EINT4 - 4) + +/* wakeup irq control */ + +#ifdef CONFIG_PM + +/* state for IRQs over sleep */ + +/* default is to allow for EINT0..EINT15, and IRQ_RTC as wakeup sources + * + * set bit to 1 in allow bitfield to enable the wakeup settings on it +*/ + +unsigned long s3c_irqwake_intallow = 1L << (IRQ_RTC - IRQ_EINT0) | 0xfL; +unsigned long s3c_irqwake_intmask = 0xffffffffL; +unsigned long s3c_irqwake_eintallow = 0x0000fff0L; +unsigned long s3c_irqwake_eintmask = 0xffffffffL; + +static int +s3c_irq_wake(unsigned int irqno, unsigned int state) +{ + unsigned long irqbit = 1 << (irqno - IRQ_EINT0); + + if (!(s3c_irqwake_intallow & irqbit)) + return -ENOENT; + + printk(KERN_INFO "wake %s for irq %d\n", + state ? "enabled" : "disabled", irqno); + + if (!state) + s3c_irqwake_intmask |= irqbit; + else + s3c_irqwake_intmask &= ~irqbit; + + return 0; +} + +static int +s3c_irqext_wake(unsigned int irqno, unsigned int state) +{ + unsigned long bit = 1L << (irqno - EXTINT_OFF); + + if (!(s3c_irqwake_eintallow & bit)) + return -ENOENT; + + printk(KERN_INFO "wake %s for irq %d\n", + state ? "enabled" : "disabled", irqno); + + if (!state) + s3c_irqwake_eintmask |= bit; + else + s3c_irqwake_eintmask &= ~bit; + + return 0; +} + +#else +#define s3c_irqext_wake NULL +#define s3c_irq_wake NULL +#endif + + static void s3c_irq_mask(unsigned int irqno) { @@ -109,21 +177,21 @@ static struct irqchip s3c_irq_level_chip = { .ack = s3c_irq_maskack, .mask = s3c_irq_mask, - .unmask = s3c_irq_unmask + .unmask = s3c_irq_unmask, + .wake = s3c_irq_wake }; static struct irqchip s3c_irq_chip = { .ack = s3c_irq_ack, .mask = s3c_irq_mask, - .unmask = s3c_irq_unmask + .unmask = s3c_irq_unmask, + .wake = s3c_irq_wake }; /* S3C2410_EINTMASK * S3C2410_EINTPEND */ -#define EXTINT_OFF (IRQ_EINT4 - 4) - static void s3c_irqext_mask(unsigned int irqno) { @@ -276,14 +344,16 @@ .mask = s3c_irqext_mask, .unmask = s3c_irqext_unmask, .ack = s3c_irqext_ack, - .type = s3c_irqext_type + .type = s3c_irqext_type, + .wake = s3c_irqext_wake }; static struct irqchip s3c_irq_eint0t4 = { .ack = s3c_irq_ack, .mask = s3c_irq_mask, .unmask = s3c_irq_unmask, - .type = s3c_irqext_type + .wake = s3c_irq_wake, + .type = s3c_irqext_type, }; /* mask values for the parent registers for each of the interrupt types */ diff -Nru a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c --- a/arch/arm/mach-s3c2410/mach-bast.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-s3c2410/mach-bast.c 2004-11-10 17:19:04 -08:00 @@ -18,6 +18,7 @@ * 05-Sep-2003 BJD Moved to v2.6 kernel * 06-Jan-2003 BJD Updates for * 18-Jan-2003 BJD Added serial port configuration + * 05-Oct-2004 BJD Power management code */ #include @@ -33,6 +34,7 @@ #include #include +#include #include #include @@ -41,11 +43,16 @@ //#include #include +#include +#include #include "s3c2410.h" #include "devs.h" #include "cpu.h" #include "usb-simtec.h" +#include "pm.h" + +#define COPYRIGHT ", (c) 2004 Simtec Electronics" /* macros for virtual address mods for the io space entries */ #define VA_C5(item) ((item) + BAST_VAM_CS5) @@ -207,7 +214,7 @@ &bast_device_nor }; -static struct s3c2410_board bast_board __initdata = { +static struct s3c24xx_board bast_board __initdata = { .devices = bast_devices, .devices_count = ARRAY_SIZE(bast_devices) }; @@ -216,7 +223,7 @@ { s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); s3c2410_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); - s3c2410_set_board(&bast_board); + s3c24xx_set_board(&bast_board); usb_simtec_init(); } @@ -224,6 +231,36 @@ { s3c2410_init_irq(); } + +#ifdef CONFIG_PM + +/* bast_init_pm + * + * enable the power management functions for the EB2410ITX +*/ + +static __init int bast_init_pm(void) +{ + unsigned long gstatus4; + + if (!machine_is_bast()) + return 0; + + printk(KERN_INFO "BAST Power Manangement" COPYRIGHT "\n"); + + gstatus4 = (__raw_readl(S3C2410_BANKCON7) & 0x3) << 30; + gstatus4 |= (__raw_readl(S3C2410_BANKCON6) & 0x3) << 28; + gstatus4 |= (__raw_readl(S3C2410_BANKSIZE) & S3C2410_BANKSIZE_MASK); + + printk(KERN_DEBUG "setting GSTATUS4 to %08lx\n", gstatus4); + __raw_writel(gstatus4, S3C2410_GSTATUS4); + + return s3c2410_pm_init(); +} + +late_initcall(bast_init_pm); +#endif + MACHINE_START(BAST, "Simtec-BAST") MAINTAINER("Ben Dooks ") diff -Nru a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c --- a/arch/arm/mach-s3c2410/mach-h1940.c 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-s3c2410/mach-h1940.c 2004-11-10 17:19:06 -08:00 @@ -18,6 +18,7 @@ * 17-Feb-2003 BJD Copied to mach-ipaq.c * 21-Aug-2004 BJD Added struct s3c2410_board * 04-Sep-2004 BJD Changed uart init, renamed ipaq_ -> h1940_ + * 18-Oct-2004 BJD Updated new board structure name */ #include @@ -92,7 +93,7 @@ &s3c_device_iis, }; -static struct s3c2410_board h1940_board __initdata = { +static struct s3c24xx_board h1940_board __initdata = { .devices = h1940_devices, .devices_count = ARRAY_SIZE(h1940_devices) }; @@ -101,7 +102,7 @@ { s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc)); s3c2410_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs)); - s3c2410_set_board(&h1940_board); + s3c24xx_set_board(&h1940_board); } void __init h1940_init_irq(void) diff -Nru a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c --- a/arch/arm/mach-s3c2410/mach-smdk2410.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-s3c2410/mach-smdk2410.c 2004-11-10 17:19:04 -08:00 @@ -96,7 +96,7 @@ &s3c_device_iis, }; -static struct s3c2410_board smdk2410_board __initdata = { +static struct s3c24xx_board smdk2410_board __initdata = { .devices = smdk2410_devices, .devices_count = ARRAY_SIZE(smdk2410_devices) }; @@ -105,7 +105,7 @@ { s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc)); s3c2410_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); - s3c2410_set_board(&smdk2410_board); + s3c24xx_set_board(&smdk2410_board); } void __init smdk2410_init_irq(void) diff -Nru a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c --- a/arch/arm/mach-s3c2410/mach-vr1000.c 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-s3c2410/mach-vr1000.c 2004-11-10 17:19:06 -08:00 @@ -16,6 +16,7 @@ * 21-Aug-2004 BJD Added struct s3c2410_board * 06-Aug-2004 BJD Fixed call to time initialisation * 05-Apr-2004 BJD Copied to make mach-vr1000.c + * 18-Oct-2004 BJD Updated board struct */ #include @@ -151,7 +152,7 @@ &s3c_device_iis, }; -static struct s3c2410_board vr1000_board __initdata = { +static struct s3c24xx_board vr1000_board __initdata = { .devices = vr1000_devices, .devices_count = ARRAY_SIZE(vr1000_devices) }; @@ -161,7 +162,7 @@ { s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); s3c2410_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); - s3c2410_set_board(&vr1000_board); + s3c24xx_set_board(&vr1000_board); usb_simtec_init(); } diff -Nru a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-s3c2410/pm.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,667 @@ +/* linux/arch/arm/mach-s3c2410/pm.c + * + * Copyright (c) 2004 Simtec Electronics + * Ben Dooks + * + * S3C2410 Power Manager (Suspend-To-RAM) support + * + * See Documentation/arm/Samsung-S3C24XX/Suspend.txt for more information + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Parts based on arch/arm/mach-pxa/pm.c + * + * Thanks to Dimitry Andric for debugging +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "pm.h" + +/* for external use */ + +unsigned long s3c_pm_flags; + +/* cache functions from arch/arm/mm/proc-arm920.S */ + +extern void arm920_flush_kern_cache_all(void); + +#define PFX "s3c24xx-pm: " + +static struct sleep_save core_save[] = { + SAVE_ITEM(S3C2410_LOCKTIME), + SAVE_ITEM(S3C2410_CLKCON), + + /* we restore the timings here, with the proviso that the board + * brings the system up in an slower, or equal frequency setting + * to the original system. + * + * if we cannot guarantee this, then things are going to go very + * wrong here, as we modify the refresh and both pll settings. + */ + + SAVE_ITEM(S3C2410_BWSCON), + SAVE_ITEM(S3C2410_BANKCON0), + SAVE_ITEM(S3C2410_BANKCON1), + SAVE_ITEM(S3C2410_BANKCON2), + SAVE_ITEM(S3C2410_BANKCON3), + SAVE_ITEM(S3C2410_BANKCON4), + SAVE_ITEM(S3C2410_BANKCON5), + + SAVE_ITEM(S3C2410_CLKDIVN), + SAVE_ITEM(S3C2410_MPLLCON), + SAVE_ITEM(S3C2410_UPLLCON), + SAVE_ITEM(S3C2410_CLKSLOW), + SAVE_ITEM(S3C2410_REFRESH), +}; + +/* this lot should be really saved by the IRQ code */ +static struct sleep_save irq_save[] = { + SAVE_ITEM(S3C2410_EXTINT0), + SAVE_ITEM(S3C2410_EXTINT1), + SAVE_ITEM(S3C2410_EXTINT2), + SAVE_ITEM(S3C2410_EINFLT0), + SAVE_ITEM(S3C2410_EINFLT1), + SAVE_ITEM(S3C2410_EINFLT2), + SAVE_ITEM(S3C2410_EINFLT3), + SAVE_ITEM(S3C2410_EINTMASK), + SAVE_ITEM(S3C2410_INTMSK) +}; + +static struct sleep_save gpio_save[] = { + SAVE_ITEM(S3C2410_GPACON), + SAVE_ITEM(S3C2410_GPADAT), + + SAVE_ITEM(S3C2410_GPBCON), + SAVE_ITEM(S3C2410_GPBDAT), + SAVE_ITEM(S3C2410_GPBUP), + + SAVE_ITEM(S3C2410_GPCCON), + SAVE_ITEM(S3C2410_GPCDAT), + SAVE_ITEM(S3C2410_GPCUP), + + SAVE_ITEM(S3C2410_GPDCON), + SAVE_ITEM(S3C2410_GPDDAT), + SAVE_ITEM(S3C2410_GPDUP), + + SAVE_ITEM(S3C2410_GPECON), + SAVE_ITEM(S3C2410_GPEDAT), + SAVE_ITEM(S3C2410_GPEUP), + + SAVE_ITEM(S3C2410_GPFCON), + SAVE_ITEM(S3C2410_GPFDAT), + SAVE_ITEM(S3C2410_GPFUP), + + SAVE_ITEM(S3C2410_GPGCON), + SAVE_ITEM(S3C2410_GPGDAT), + SAVE_ITEM(S3C2410_GPGUP), + + SAVE_ITEM(S3C2410_GPHCON), + SAVE_ITEM(S3C2410_GPHDAT), + SAVE_ITEM(S3C2410_GPHUP), + + SAVE_ITEM(S3C2410_DCLKCON), +}; + +#ifdef CONFIG_S3C2410_PM_DEBUG + +#define SAVE_UART(va) \ + SAVE_ITEM((va) + S3C2410_ULCON), \ + SAVE_ITEM((va) + S3C2410_UCON), \ + SAVE_ITEM((va) + S3C2410_UFCON), \ + SAVE_ITEM((va) + S3C2410_UMCON), \ + SAVE_ITEM((va) + S3C2410_UBRDIV) + +static struct sleep_save uart_save[] = { + SAVE_UART(S3C2410_VA_UART0), + SAVE_UART(S3C2410_VA_UART1), + SAVE_UART(S3C2410_VA_UART2), +}; + +/* debug + * + * we send the debug to printascii() to allow it to be seen if the + * system never wakes up from the sleep +*/ + +extern void printascii(const char *); + +static void pm_dbg(const char *fmt, ...) +{ + va_list va; + char buff[256]; + + va_start(va, fmt); + vsprintf(buff, fmt, va); + va_end(va); + + printascii(buff); +} + +static void s3c2410_pm_debug_init(void) +{ + unsigned long tmp = __raw_readl(S3C2410_CLKCON); + + /* re-start uart clocks */ + tmp |= S3C2410_CLKCON_UART0; + tmp |= S3C2410_CLKCON_UART1; + tmp |= S3C2410_CLKCON_UART2; + + __raw_writel(tmp, S3C2410_CLKCON); + udelay(10); +} + +#define DBG(fmt...) pm_dbg(fmt) +#else +#define DBG(fmt...) printk(KERN_DEBUG fmt) + +#define s3c2410_pm_debug_init() do { } while(0) +#endif + +#if defined(CONFIG_S3C2410_PM_CHECK) && CONFIG_S3C2410_PM_CHECK_CHUNKSIZE != 0 + +/* suspend checking code... + * + * this next area does a set of crc checks over all the installed + * memory, so the system can verify if the resume was ok. + * + * CONFIG_S3C2410_PM_CHECK_CHUNKSIZE defines the block-size for the CRC, + * increasing it will mean that the area corrupted will be less easy to spot, + * and reducing the size will cause the CRC save area to grow +*/ + +#define CHECK_CHUNKSIZE (CONFIG_S3C2410_PM_CHECK_CHUNKSIZE * 1024) + +static u32 crc_size; /* size needed for the crc block */ +static u32 *crcs; /* allocated over suspend/resume */ + +typedef u32 *(run_fn_t)(struct resource *ptr, u32 *arg); + +/* s3c2410_pm_run_res + * + * go thorugh the given resource list, and look for system ram +*/ + +static void s3c2410_pm_run_res(struct resource *ptr, run_fn_t fn, u32 *arg) +{ + while (ptr != NULL) { + if (ptr->child != NULL) + s3c2410_pm_run_res(ptr->child, fn, arg); + + if ((ptr->flags & IORESOURCE_MEM) && + strcmp(ptr->name, "System RAM") == 0) { + DBG("Found system RAM at %08lx..%08lx\n", + ptr->start, ptr->end); + arg = (fn)(ptr, arg); + } + + ptr = ptr->sibling; + } +} + +static void s3c2410_pm_run_sysram(run_fn_t fn, u32 *arg) +{ + s3c2410_pm_run_res(&iomem_resource, fn, arg); +} + +static u32 *s3c2410_pm_countram(struct resource *res, u32 *val) +{ + u32 size = (u32)(res->end - res->start)+1; + + size += CHECK_CHUNKSIZE-1; + size /= CHECK_CHUNKSIZE; + + DBG("Area %08lx..%08lx, %d blocks\n", res->start, res->end, size); + + *val += size * sizeof(u32); + return val; +} + +/* s3c2410_pm_prepare_check + * + * prepare the necessary information for creating the CRCs. This + * must be done before the final save, as it will require memory + * allocating, and thus touching bits of the kernel we do not + * know about. +*/ + +static void s3c2410_pm_check_prepare(void) +{ + crc_size = 0; + + s3c2410_pm_run_sysram(s3c2410_pm_countram, &crc_size); + + DBG("s3c2410_pm_prepare_check: %u checks needed\n", crc_size); + + crcs = kmalloc(crc_size+4, GFP_KERNEL); + if (crcs == NULL) + printk(KERN_ERR "Cannot allocated CRC save area\n"); +} + +static u32 *s3c2410_pm_makecheck(struct resource *res, u32 *val) +{ + unsigned long addr, left; + + for (addr = res->start; addr < res->end; + addr += CHECK_CHUNKSIZE) { + left = res->end - addr; + + if (left > CHECK_CHUNKSIZE) + left = CHECK_CHUNKSIZE; + + *val = crc32_le(~0, phys_to_virt(addr), left); + val++; + } + + return val; +} + +/* s3c2410_pm_check_store + * + * compute the CRC values for the memory blocks before the final + * sleep. +*/ + +static void s3c2410_pm_check_store(void) +{ + if (crcs != NULL) + s3c2410_pm_run_sysram(s3c2410_pm_makecheck, crcs); +} + +/* in_region + * + * return TRUE if the area defined by ptr..ptr+size contatins the + * what..what+whatsz +*/ + +static inline int in_region(void *ptr, int size, void *what, size_t whatsz) +{ + if ((what+whatsz) < ptr) + return 0; + + if (what > (ptr+size)) + return 0; + + return 1; +} + +static u32 *s3c2410_pm_runcheck(struct resource *res, u32 *val) +{ + void *save_at = phys_to_virt(s3c2410_sleep_save_phys); + unsigned long addr; + unsigned long left; + void *ptr; + u32 calc; + + for (addr = res->start; addr < res->end; + addr += CHECK_CHUNKSIZE) { + left = res->end - addr; + + if (left > CHECK_CHUNKSIZE) + left = CHECK_CHUNKSIZE; + + ptr = phys_to_virt(addr); + + if (in_region(ptr, left, crcs, crc_size)) { + DBG("skipping %08lx, has crc block in\n", addr); + goto skip_check; + } + + if (in_region(ptr, left, save_at, 32*4 )) { + DBG("skipping %08lx, has save block in\n", addr); + goto skip_check; + } + + /* calculate and check the checksum */ + + calc = crc32_le(~0, ptr, left); + if (calc != *val) { + printk(KERN_ERR PFX "Restore CRC error at " + "%08lx (%08x vs %08x)\n", addr, calc, *val); + + DBG("Restore CRC error at %08lx (%08x vs %08x)\n", + addr, calc, *val); + } + + skip_check: + val++; + } + + return val; +} + +/* s3c2410_pm_check_restore + * + * check the CRCs after the restore event and free the memory used + * to hold them +*/ + +static void s3c2410_pm_check_restore(void) +{ + if (crcs != NULL) { + s3c2410_pm_run_sysram(s3c2410_pm_runcheck, crcs); + kfree(crcs); + crcs = NULL; + } +} + +#else + +static struct sleep_save uart_save[] = {}; + +#define s3c2410_pm_check_prepare() do { } while(0) +#define s3c2410_pm_check_restore() do { } while(0) +#define s3c2410_pm_check_store() do { } while(0) +#endif + +/* helper functions to save and restore register state */ + +void s3c2410_pm_do_save(struct sleep_save *ptr, int count) +{ + for (; count > 0; count--, ptr++) { + ptr->val = __raw_readl(ptr->reg); + DBG("saved %08lx value %08lx\n", ptr->reg, ptr->val); + } +} + +/* s3c2410_pm_do_restore + * + * restore the system from the given list of saved registers + * + * Note, we do not use DBG() in here, as the system may not have + * restore the UARTs state yet +*/ + +void s3c2410_pm_do_restore(struct sleep_save *ptr, int count) +{ + for (; count > 0; count--, ptr++) { + printk(KERN_DEBUG "restore %08lx (restore %08lx, was %08x)\n", + ptr->reg, ptr->val, __raw_readl(ptr->reg)); + + __raw_writel(ptr->val, ptr->reg); + } +} + +/* s3c2410_pm_do_restore_core + * + * similar to s3c2410_pm_do_restore_core + * + * WARNING: Do not put any debug in here that may effect memory or use + * peripherals, as things may be changing! +*/ + +static void s3c2410_pm_do_restore_core(struct sleep_save *ptr, int count) +{ + for (; count > 0; count--, ptr++) { + __raw_writel(ptr->val, ptr->reg); + } +} + +/* s3c2410_pm_show_resume_irqs + * + * print any IRQs asserted at resume time (ie, we woke from) +*/ + +static void s3c2410_pm_show_resume_irqs(int start, unsigned long which, + unsigned long mask) +{ + int i; + + which &= ~mask; + + for (i = 0; i <= 31; i++) { + if ((which) & (1L<>= S3C2410_GPIO_OFFSET(pin)*2; + + if (!irqstate) { + if (pinstate == 0x02) + DBG("Leaving IRQ %d (pin %d) enabled\n", irq, pin); + } else { + if (pinstate == 0x02) { + DBG("Disabling IRQ %d (pin %d)\n", irq, pin); + s3c2410_gpio_cfgpin(pin, 0x00); + } + } +} + +/* s3c2410_pm_configure_extint + * + * configure all external interrupt pins +*/ + +static void s3c2410_pm_configure_extint(void) +{ + int pin; + + /* for each of the external interrupts (EINT0..EINT15) we + * need to check wether it is an external interrupt source, + * and then configure it as an input if it is not + */ + + for (pin = S3C2410_GPF0; pin <= S3C2410_GPF7; pin++) { + s3c2410_pm_check_resume_pin(pin, pin - S3C2410_GPF0); + } + + for (pin = S3C2410_GPG0; pin <= S3C2410_GPG7; pin++) { + s3c2410_pm_check_resume_pin(pin, (pin - S3C2410_GPG0)+8); + } +} + +#define any_allowed(mask, allow) (((mask) & (allow)) != (allow)) + +/* s3c2410_pm_enter + * + * central control for sleep/resume process +*/ + +static int s3c2410_pm_enter(suspend_state_t state) +{ + unsigned long regs_save[16]; + unsigned long tmp; + + /* ensure the debug is initialised (if enabled) */ + + s3c2410_pm_debug_init(); + + DBG("s3c2410_pm_enter(%d)\n", state); + + if (state != PM_SUSPEND_MEM) { + printk(KERN_ERR PFX "error: only PM_SUSPEND_MEM supported\n"); + return -EINVAL; + } + + /* check if we have anything to wake-up with... bad things seem + * to happen if you suspend with no wakeup (system will often + * require a full power-cycle) + */ + + if (!any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) && + !any_allowed(s3c_irqwake_eintmask, s3c_irqwake_eintallow)) { + printk(KERN_ERR PFX "No sources enabled for wake-up!\n"); + printk(KERN_ERR PFX "Aborting sleep\n"); + return -EINVAL; + } + + /* prepare check area if configured */ + + s3c2410_pm_check_prepare(); + + /* store the physical address of the register recovery block */ + + s3c2410_sleep_save_phys = virt_to_phys(regs_save); + + DBG("s3c2410_sleep_save_phys=0x%08lx\n", s3c2410_sleep_save_phys); + + /* ensure at least GESTATUS3 has the resume address */ + + __raw_writel(virt_to_phys(s3c2410_cpu_resume), S3C2410_GSTATUS3); + + DBG("GSTATUS3 0x%08x\n", __raw_readl(S3C2410_GSTATUS3)); + DBG("GSTATUS4 0x%08x\n", __raw_readl(S3C2410_GSTATUS4)); + + /* save all necessary core registers not covered by the drivers */ + + s3c2410_pm_do_save(gpio_save, ARRAY_SIZE(gpio_save)); + s3c2410_pm_do_save(irq_save, ARRAY_SIZE(irq_save)); + s3c2410_pm_do_save(core_save, ARRAY_SIZE(core_save)); + s3c2410_pm_do_save(uart_save, ARRAY_SIZE(uart_save)); + + /* set the irq configuration for wake */ + + s3c2410_pm_configure_extint(); + + DBG("sleep: irq wakeup masks: %08lx,%08lx\n", + s3c_irqwake_intmask, s3c_irqwake_eintmask); + + __raw_writel(s3c_irqwake_intmask, S3C2410_INTMSK); + __raw_writel(s3c_irqwake_eintmask, S3C2410_EINTMASK); + + /* ack any outstanding external interrupts before we go to sleep */ + + __raw_writel(__raw_readl(S3C2410_EINTPEND), S3C2410_EINTPEND); + + /* flush cache back to ram */ + + arm920_flush_kern_cache_all(); + + s3c2410_pm_check_store(); + + // need to make some form of time-delta + + /* send the cpu to sleep... */ + + __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */ + + s3c2410_cpu_suspend(regs_save); + + /* unset the return-from-sleep flag, to ensure reset */ + + tmp = __raw_readl(S3C2410_GSTATUS2); + tmp &= S3C2410_GSTATUS2_OFFRESET; + __raw_writel(tmp, S3C2410_GSTATUS2); + + /* restore the system state */ + + s3c2410_pm_do_restore_core(core_save, ARRAY_SIZE(core_save)); + s3c2410_pm_do_restore(gpio_save, ARRAY_SIZE(gpio_save)); + s3c2410_pm_do_restore(irq_save, ARRAY_SIZE(irq_save)); + s3c2410_pm_do_restore(uart_save, ARRAY_SIZE(uart_save)); + + s3c2410_pm_debug_init(); + + /* check what irq (if any) restored the system */ + + DBG("post sleep: IRQs 0x%08x, 0x%08x\n", + __raw_readl(S3C2410_SRCPND), + __raw_readl(S3C2410_EINTPEND)); + + s3c2410_pm_show_resume_irqs(IRQ_EINT0, __raw_readl(S3C2410_SRCPND), + s3c_irqwake_intmask); + + s3c2410_pm_show_resume_irqs(IRQ_EINT4-4, __raw_readl(S3C2410_EINTPEND), + s3c_irqwake_eintmask); + + DBG("post sleep, preparing to return\n"); + + s3c2410_pm_check_restore(); + + /* ok, let's return from sleep */ + + DBG("S3C2410 PM Resume (post-restore)\n"); + return 0; +} + +/* + * Called after processes are frozen, but before we shut down devices. + */ +static int s3c2410_pm_prepare(suspend_state_t state) +{ + return 0; +} + +/* + * Called after devices are re-setup, but before processes are thawed. + */ +static int s3c2410_pm_finish(suspend_state_t state) +{ + return 0; +} + +/* + * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk. + */ +static struct pm_ops s3c2410_pm_ops = { + .pm_disk_mode = PM_DISK_FIRMWARE, + .prepare = s3c2410_pm_prepare, + .enter = s3c2410_pm_enter, + .finish = s3c2410_pm_finish, +}; + +/* s3c2410_pm_init + * + * Attach the power management functions. This should be called + * from the board specific initialisation if the board supports + * it. +*/ + +int __init s3c2410_pm_init(void) +{ + printk("S3C2410 Power Management, (c) 2004 Simtec Electronics\n"); + + pm_set_ops(&s3c2410_pm_ops); + return 0; +} diff -Nru a/arch/arm/mach-s3c2410/pm.h b/arch/arm/mach-s3c2410/pm.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-s3c2410/pm.h 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,49 @@ +/* linux/arch/arm/mach-s3c2410/pm.h + * + * Copyright (c) 2004 Simtec Electronics + * Written by Ben Dooks, + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +/* s3c2410_pm_init + * + * called from board at initialisation time to setup the power + * management +*/ + +extern __init int s3c2410_pm_init(void); + +/* configuration for the IRQ mask over sleep */ +extern unsigned long s3c_irqwake_intmask; +extern unsigned long s3c_irqwake_eintmask; + +/* IRQ masks for IRQs allowed to go to sleep (see irq.c) */ +extern unsigned long s3c_irqwake_intallow; +extern unsigned long s3c_irqwake_eintallow; + +/* Flags for PM Control */ + +extern unsigned long s3c_pm_flags; + +/* from sleep.S */ + +extern void s3c2410_cpu_suspend(unsigned long *saveblk); +extern void s3c2410_cpu_resume(void); + +extern unsigned long s3c2410_sleep_save_phys; + +/* sleep save info */ + +struct sleep_save { + unsigned long reg; + unsigned long val; +}; + +#define SAVE_ITEM(x) \ + { .reg = (x) } + +extern void s3c2410_pm_do_save(struct sleep_save *ptr, int count); +extern void s3c2410_pm_do_restore(struct sleep_save *ptr, int count); diff -Nru a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c --- a/arch/arm/mach-s3c2410/s3c2410.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-s3c2410/s3c2410.c 2004-11-10 17:19:04 -08:00 @@ -189,13 +189,12 @@ printk("S3C2410: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", print_mhz(s3c24xx_fclk), print_mhz(s3c24xx_hclk), print_mhz(s3c24xx_pclk)); -} -static struct s3c2410_board *board; + /* initialise the clocks here, to allow other things like the + * console to use them + */ -void s3c2410_set_board(struct s3c2410_board *b) -{ - board = b; + s3c2410_init_clocks(); } int __init s3c2410_init(void) @@ -205,22 +204,5 @@ printk("S3C2410: Initialising architecture\n"); ret = platform_add_devices(uart_devices, ARRAY_SIZE(uart_devices)); - if (ret) - return ret; - - if (board != NULL) { - if (board->devices != NULL) { - ret = platform_add_devices(board->devices, - board->devices_count); - - if (ret) { - printk(KERN_ERR "s3c2410: failed to add board devices (%d)\n", ret); - } - } - - /* not adding board devices may not be fatal */ - ret = 0; - } - return ret; } diff -Nru a/arch/arm/mach-s3c2410/s3c2410.h b/arch/arm/mach-s3c2410/s3c2410.h --- a/arch/arm/mach-s3c2410/s3c2410.h 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-s3c2410/s3c2410.h 2004-11-10 17:19:04 -08:00 @@ -13,6 +13,7 @@ * 18-Aug-2004 BJD Created initial version * 20-Aug-2004 BJD Added s3c2410_board struct * 04-Sep-2004 BJD Added s3c2410_init_uarts() call + * 17-Oct-2004 BJD Moved board out to cpu */ struct s3c2410_uartcfg; @@ -25,19 +26,5 @@ struct sys_timer; extern struct sys_timer s3c2410_timer; - -/* the board structure is used at first initialsation time - * to get info such as the devices to register for this - * board. This is done because platfrom_add_devices() cannot - * be called from the map_io entry. - * -*/ - -struct s3c2410_board { - struct platform_device **devices; - unsigned int devices_count; -}; - -extern void s3c2410_set_board(struct s3c2410_board *board); extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); diff -Nru a/arch/arm/mach-s3c2410/s3c2440-dsc.c b/arch/arm/mach-s3c2410/s3c2440-dsc.c --- a/arch/arm/mach-s3c2410/s3c2440-dsc.c 2004-11-10 17:19:06 -08:00 +++ b/arch/arm/mach-s3c2410/s3c2440-dsc.c 2004-11-10 17:19:06 -08:00 @@ -11,15 +11,14 @@ * * Modifications: * 29-Aug-2004 BJD Start of drive-strength control + * 09-Nov-2004 BJD Added symbol export */ #include #include #include -#include -#include #include -#include +#include #include #include @@ -55,3 +54,5 @@ local_irq_restore(flags); return 0; } + +EXPORT_SYMBOL(s3c2440_set_dsc); diff -Nru a/arch/arm/mach-s3c2410/s3c2440.c b/arch/arm/mach-s3c2410/s3c2440.c --- a/arch/arm/mach-s3c2410/s3c2440.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-s3c2410/s3c2440.c 2004-11-10 17:19:02 -08:00 @@ -12,6 +12,8 @@ * Modifications: * 24-Aug-2004 BJD Start of s3c2440 support * 12-Oct-2004 BJD Moved clock info out to clock.c + * 01-Nov-2004 BJD Fixed clock build code + * 09-Nov-2004 BJD Added sysdev for power management */ #include @@ -21,6 +23,7 @@ #include #include #include +#include #include #include @@ -29,13 +32,19 @@ #include #include #include +#include #include #include +#include +#include +#include #include "s3c2440.h" #include "clock.h" +#include "devs.h" #include "cpu.h" +#include "pm.h" int s3c2440_clock_tick_rate = 12*1000*1000; /* current timers at 12MHz */ @@ -120,6 +129,57 @@ &s3c_uart2 }; +/* s3c2440 specific clock sources */ + +static struct clk s3c2440_clk_cam = { + .name = "camera", + .enable = s3c2410_clkcon_enable, + .ctrlbit = S3C2440_CLKCON_CAMERA +}; + +static struct clk s3c2440_clk_ac97 = { + .name = "ac97", + .enable = s3c2410_clkcon_enable, + .ctrlbit = S3C2440_CLKCON_CAMERA +}; + +#ifdef CONFIG_PM + +struct sleep_save s3c2440_sleep[] = { + SAVE_ITEM(S3C2440_DSC0), + SAVE_ITEM(S3C2440_DSC1), + SAVE_ITEM(S3C2440_GPJDAT), + SAVE_ITEM(S3C2440_GPJCON), + SAVE_ITEM(S3C2440_GPJUP) +}; + +static int s3c2440_suspend(struct sys_device *dev, u32 state) +{ + s3c2410_pm_do_save(s3c2440_sleep, ARRAY_SIZE(s3c2440_sleep)); + return 0; +} + +static int s3c2440_resume(struct sys_device *dev) +{ + s3c2410_pm_do_restore(s3c2440_sleep, ARRAY_SIZE(s3c2440_sleep)); + return 0; +} + +#else +#define s3c2440_suspend NULL +#define s3c2440_resume NULL +#endif + +static struct sysdev_class s3c2440_sysclass = { + set_kset_name("s3c2440-core"), + .suspend = s3c2440_suspend, + .resume = s3c2440_resume +}; + +static struct sys_device s3c2440_sysdev = { + .cls = &s3c2440_sysclass, +}; + void __init s3c2440_map_io(struct map_desc *mach_desc, int size) { unsigned long clkdiv; @@ -167,9 +227,24 @@ printk("S3C2440: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", print_mhz(s3c24xx_fclk), print_mhz(s3c24xx_hclk), print_mhz(s3c24xx_pclk)); -} + /* initialise the clocks here, to allow other things like the + * console to use them, and to add new ones after the initialisation + */ + + s3c2410_init_clocks(); + /* add s3c2440 specific clocks */ + + s3c2440_clk_cam.parent = clk_get(NULL, "hclk"); + s3c2440_clk_ac97.parent = clk_get(NULL, "pclk"); + + s3c2410_register_clock(&s3c2440_clk_ac97); + s3c2410_register_clock(&s3c2440_clk_cam); + + clk_disable(&s3c2440_clk_ac97); + clk_disable(&s3c2440_clk_cam); +} int __init s3c2440_init(void) { @@ -177,12 +252,16 @@ printk("S3C2440: Initialising architecture\n"); - ret = platform_add_devices(uart_devices, ARRAY_SIZE(uart_devices)); - if (ret) - return ret; - - // todo: board specific inits? + ret = sysdev_class_register(&s3c2440_sysclass); + if (ret == 0) + ret = sysdev_register(&s3c2440_sysdev); + + if (ret != 0) + printk(KERN_ERR "failed to register sysdev for s3c2440\n"); + + if (ret != 0) + ret = platform_add_devices(uart_devices, + ARRAY_SIZE(uart_devices)); return ret; } - diff -Nru a/arch/arm/mach-s3c2410/sleep.S b/arch/arm/mach-s3c2410/sleep.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-s3c2410/sleep.S 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,180 @@ +/* linux/arch/arm/mach-s3c2410/sleep.S + * + * Copyright (c) 2004 Simtec Electronics + * Ben Dooks + * + * S3C2410 Power Manager (Suspend-To-RAM) support + * + * Based on PXA/SA1100 sleep code by: + * Nicolas Pitre, (c) 2002 Monta Vista Software Inc + * Cliff Brake, (c) 2001 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +/* CONFIG_DEBUG_RESUME is dangerous if your bootloader does not + * reset the UART configuration, only enable if you really need this! +*/ +//#define CONFIG_DEBUG_RESUME + + .text + + /* s3c2410_cpu_suspend + * + * put the cpu into sleep mode + * + * entry: + * r0 = sleep save block + */ + +ENTRY(s3c2410_cpu_suspend) + stmfd sp!, { r4 - r12, lr } + + @@ store co-processor registers + + mrc p15, 0, r4, c15, c1, 0 @ CP access register + mrc p15, 0, r5, c13, c0, 0 @ PID + mrc p15, 0, r6, c3, c0, 0 @ Domain ID + mrc p15, 0, r7, c2, c0, 0 @ translation table base address + mrc p15, 0, r8, c2, c0, 0 @ auxiliary control register + mrc p15, 0, r9, c1, c0, 0 @ control register + + stmia r0, { r4 - r13 } + + @@ flush the caches to ensure everything is back out to + @@ SDRAM before the core powers down + + bl arm920_flush_kern_cache_all + + @@ prepare cpu to sleep + + ldr r4, =S3C2410_REFRESH + ldr r5, =S3C2410_MISCCR + ldr r6, =S3C2410_CLKCON + ldr r7, [ r4 ] @ get REFRESH (and ensure in TLB) + ldr r8, [ r5 ] @ get MISCCR (and ensure in TLB) + ldr r9, [ r6 ] @ get CLKCON (and ensure in TLB) + + orr r7, r7, #S3C2410_REFRESH_SELF @ SDRAM sleep command + orr r8, r8, #S3C2410_MISCCR_SDSLEEP @ SDRAM power-down signals + orr r9, r9, #S3C2410_CLKCON_POWER @ power down command + + teq pc, #0 @ first as a trial-run to load cache + bl s3c2410_do_sleep + teq r0, r0 @ now do it for real + b s3c2410_do_sleep @ + + @@ align next bit of code to cache line + .align 8 +s3c2410_do_sleep: + streq r7, [ r4 ] @ SDRAM sleep command + streq r8, [ r5 ] @ SDRAM power-down config + streq r9, [ r6 ] @ CPU sleep +1: beq 1b + mov pc, r14 + + @@ return to the caller, after having the MMU + @@ turned on, this restores the last bits from the + @@ stack +resume_with_mmu: + ldmfd sp!, { r4 - r12, pc } + + .ltorg + + @@ the next bits sit in the .data segment, even though they + @@ happen to be code... the s3c2410_sleep_save_phys needs to be + @@ accessed by the resume code before it can restore the MMU. + @@ This means that the variable has to be close enough for the + @@ code to read it... since the .text segment needs to be RO, + @@ the data segment can be the only place to put this code. + + .data + + .global s3c2410_sleep_save_phys +s3c2410_sleep_save_phys: + .word 0 + + /* s3c2410_cpu_resume + * + * resume code entry for bootloader to call + * + * we must put this code here in the data segment as we have no + * other way of restoring the stack pointer after sleep, and we + * must not write to the code segment (code is read-only) + */ + +ENTRY(s3c2410_cpu_resume) + mov r0, #PSR_I_BIT | PSR_F_BIT | MODE_SVC + msr cpsr_c, r0 + + @@ load UART to allow us to print the two characters for + @@ resume debug + + mov r2, #S3C2410_PA_UART & 0xff000000 + orr r2, r2, #S3C2410_PA_UART & 0xff000 + +#if 0 + /* SMDK2440 LED set */ + mov r14, #S3C2410_PA_GPIO + ldr r12, [ r14, #0x54 ] + bic r12, r12, #3<<4 + orr r12, r12, #1<<7 + str r12, [ r14, #0x54 ] +#endif + +#ifdef CONFIG_DEBUG_RESUME + mov r3, #'L' + strb r3, [ r2, #S3C2410_UTXH ] +1001: + ldrb r14, [ r3, #S3C2410_UTRSTAT ] + tst r14, #S3C2410_UTRSTAT_TXE + beq 1001b +#endif /* CONFIG_DEBUG_RESUME */ + + mov r1, #0 + mcr p15, 0, r1, c8, c7, 0 @@ invalidate I & D TLBs + mcr p15, 0, r1, c7, c7, 0 @@ invalidate I & D caches + + ldr r0, s3c2410_sleep_save_phys @ address of restore block + ldmia r0, { r4 - r13 } + + mcr p15, 0, r4, c15, c1, 0 @ CP access register + mcr p15, 0, r5, c13, c0, 0 @ PID + mcr p15, 0, r6, c3, c0, 0 @ Domain ID + mcr p15, 0, r7, c2, c0, 0 @ translation table base + mcr p15, 0, r8, c1, c1, 0 @ auxilliary control + +#ifdef CONFIG_DEBUG_RESUME + mov r3, #'R' + strb r3, [ r2, #S3C2410_UTXH ] +#endif + + ldr r2, =resume_with_mmu + mcr p15, 0, r9, c1, c0, 0 @ turn on MMU, etc + nop @ second-to-last before mmu + mov pc, r2 @ go back to virtual address + + .ltorg diff -Nru a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c --- a/arch/arm/mach-s3c2410/time.c 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/mach-s3c2410/time.c 2004-11-10 17:19:03 -08:00 @@ -1,7 +1,7 @@ -/* linux/include/asm-arm/arch-s3c2410/time.h +/* linux/arch/arm/mach-s3c2410/time.c * - * Copyright (C) 2003 Simtec Electronics - * Ben Dooks, + * Copyright (C) 2003,2004 Simtec Electronics + * Ben Dooks, * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,10 +39,6 @@ static unsigned long timer_startval; static unsigned long timer_ticks_usec; -/* with an 12MHz clock, we get 12 ticks per-usec - */ - - /*** * Returns microsecond since last clock interrupt. Note that interrupts * will have been disabled by do_gettimeoffset() @@ -106,7 +102,7 @@ * Currently we only use timer4, as it is the only timer which has no * other function that can be exploited externally */ -static void __init s3c2410_timer_init (void) +static void s3c2410_timer_setup (void) { unsigned long tcon; unsigned long tcnt; @@ -126,19 +122,18 @@ if (machine_is_bast() || machine_is_vr1000()) { timer_ticks_usec = 12; /* timer is at 12MHz */ tcnt = (timer_ticks_usec * (1000*1000)) / HZ; - } - /* for the h1940, we use the pclk from the core to generate - * the timer values. since 67.5MHz is not a value we can directly - * generate the timer value from, we need to pre-scale and - * divied before using it. - * - * overall divsior to get 200Hz is 337500 - * we can fit tcnt if we pre-scale by 6, producing a tick rate - * of 11.25MHz, and a tcnt of 56250. - */ + tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK; + tcfg1 |= S3C2410_TCFG1_MUX4_TCLK1; + } else { + /* for the h1940 (and others), we use the pclk from the core + * to generate the timer values. since values around 50 to + * 70MHz are not values we can directly generate the timer + * value from, we need to pre-scaleand divide before using it. + */ + + /* this is used as default if no other timer can be found */ - if (machine_is_h1940() || machine_is_smdk2410() ) { timer_ticks_usec = s3c24xx_pclk / (1000*1000); timer_ticks_usec /= 6; @@ -151,7 +146,6 @@ tcnt = (s3c24xx_pclk / 6) / HZ; } - printk("setup_timer tcon=%08lx, tcnt %04lx, tcfg %08lx,%08lx\n", tcon, tcnt, tcfg0, tcfg1); @@ -177,15 +171,20 @@ __raw_writel(tcnt, S3C2410_TCNTB(4)); __raw_writel(tcnt, S3C2410_TCMPB(4)); - setup_irq(IRQ_TIMER4, &s3c2410_timer_irq); - /* start the timer running */ tcon |= S3C2410_TCON_T4START; tcon &= ~S3C2410_TCON_T4MANUALUPD; __raw_writel(tcon, S3C2410_TCON); } +static void __init s3c2410_timer_init (void) +{ + s3c2410_timer_setup(); + setup_irq(IRQ_TIMER4, &s3c2410_timer_irq); +} + struct sys_timer s3c2410_timer = { .init = s3c2410_timer_init, .offset = s3c2410_gettimeoffset, + .resume = s3c2410_timer_setup }; diff -Nru a/arch/arm/mach-s3c2410/usb-simtec.c b/arch/arm/mach-s3c2410/usb-simtec.c --- a/arch/arm/mach-s3c2410/usb-simtec.c 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mach-s3c2410/usb-simtec.c 2004-11-10 17:19:05 -08:00 @@ -13,6 +13,7 @@ * * Modifications: * 14-Sep-2004 BJD Created + * 18-Oct-2004 BJD Cleanups, and added code to report OC cleared */ #define DEBUG @@ -51,10 +52,8 @@ { pr_debug("usb_simtec_powercontrol(%d,%d)\n", port, to); - if (port == 1) { + if (port == 1) s3c2410_gpio_setpin(S3C2410_GPB4, to ? 0:1); - pr_debug("GPBDAT now %08x\n", __raw_readl(S3C2410_GPBDAT)); - } } static irqreturn_t @@ -67,6 +66,7 @@ s3c2410_report_oc(info, 3); } else { pr_debug("usb_simtec: over-current irq (oc cleared)\n"); + s3c2410_report_oc(info, 0); } return IRQ_HANDLED; @@ -77,16 +77,15 @@ int ret; if (on) { - pr_debug("claiming usb overccurent\n"); ret = request_irq(IRQ_USBOC, usb_simtec_ocirq, SA_INTERRUPT, - "usb-oc", info); + "USB Over-current", info); if (ret != 0) { printk(KERN_ERR "failed to request usb oc irq\n"); } set_irq_type(IRQ_USBOC, IRQT_BOTHEDGE); } else { - free_irq(IRQ_USBOC, NULL); + free_irq(IRQ_USBOC, info); } } @@ -110,14 +109,5 @@ s3c2410_gpio_cfgpin(S3C2410_GPB4, S3C2410_GPB4_OUTP); s3c2410_gpio_setpin(S3C2410_GPB4, 1); - - pr_debug("GPB: CON=%08x, DAT=%08x\n", - __raw_readl(S3C2410_GPBCON), __raw_readl(S3C2410_GPBDAT)); - - if (0) { - s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST, - S3C2410_MISCCR_USBDEV); - } - return 0; } diff -Nru a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c --- a/arch/arm/mach-sa1100/assabet.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-sa1100/assabet.c 2004-11-10 17:19:02 -08:00 @@ -9,16 +9,17 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - #include #include #include -#include #include -#include #include +#include #include +#include +#include #include +#include #include #include @@ -29,6 +30,7 @@ #include #include +#include #include #include #include @@ -92,6 +94,68 @@ ASSABET_BCR_clear(ASSABET_BCR_LCD_ON); } +#ifdef ASSABET_REV_4 +/* + * Phase 4 Assabet has two 28F160B3 flash parts in bank 0: + */ +static struct mtd_partition assabet_partitions[] = { + { + .name = "bootloader", + .size = 0x00020000, + .offset = 0, + .mask_flags = MTD_WRITEABLE, + }, { + .name = "bootloader params", + .size = 0x00020000, + .offset = MTDPART_OFS_APPEND, + .mask_flags = MTD_WRITEABLE, + }, { + .name = "jffs", + .size = MTDPART_SIZ_FULL, + .offset = MTDPART_OFS_APPEND, + } +}; +#else +/* + * Phase 5 Assabet has two 28F128J3A flash parts in bank 0: + */ +static struct mtd_partition assabet_partitions[] = { + { + .name = "bootloader", + .size = 0x00040000, + .offset = 0, + .mask_flags = MTD_WRITEABLE, + }, { + .name = "bootloader params", + .size = 0x00040000, + .offset = MTDPART_OFS_APPEND, + .mask_flags = MTD_WRITEABLE, + }, { + .name = "jffs", + .size = MTDPART_SIZ_FULL, + .offset = MTDPART_OFS_APPEND, + } +}; +#endif + +static struct flash_platform_data assabet_flash_data = { + .map_name = "cfi_probe", + .parts = assabet_partitions, + .nr_parts = ARRAY_SIZE(assabet_partitions), +}; + +static struct resource assabet_flash_resources[] = { + { + .start = SA1100_CS0_PHYS, + .end = SA1100_CS0_PHYS + SZ_32M - 1, + .flags = IORESOURCE_MEM, + }, { + .start = SA1100_CS1_PHYS, + .end = SA1100_CS1_PHYS + SZ_32M - 1, + .flags = IORESOURCE_MEM, + } +}; + static void __init assabet_init(void) { /* @@ -136,6 +200,9 @@ "hasn't been configured in the kernel\n" ); #endif } + + sa11x0_set_flash_data(&assabet_flash_data, assabet_flash_resources, + ARRAY_SIZE(assabet_flash_resources)); } /* @@ -325,5 +392,5 @@ MAPIO(assabet_map_io) INITIRQ(sa1100_init_irq) .timer = &sa1100_timer, - INIT_MACHINE(assabet_init) + .init_machine = assabet_init, MACHINE_END diff -Nru a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c --- a/arch/arm/mach-sa1100/generic.c 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/mach-sa1100/generic.c 2004-11-10 17:19:03 -08:00 @@ -161,7 +161,7 @@ static struct platform_device sa11x0udc_device = { .name = "sa11x0-udc", - .id = 0, + .id = -1, .dev = { .dma_mask = &sa11x0udc_dma_mask, .coherent_dma_mask = 0xffffffff, @@ -212,7 +212,7 @@ static struct platform_device sa11x0mcp_device = { .name = "sa11x0-mcp", - .id = 0, + .id = -1, .dev = { .dma_mask = &sa11x0mcp_dma_mask, .coherent_dma_mask = 0xffffffff, @@ -233,7 +233,7 @@ static struct platform_device sa11x0ssp_device = { .name = "sa11x0-ssp", - .id = 0, + .id = -1, .dev = { .dma_mask = &sa11x0ssp_dma_mask, .coherent_dma_mask = 0xffffffff, @@ -257,7 +257,7 @@ static struct platform_device sa11x0fb_device = { .name = "sa11x0-fb", - .id = 0, + .id = -1, .dev = { .coherent_dma_mask = 0xffffffff, }, @@ -267,9 +267,22 @@ static struct platform_device sa11x0pcmcia_device = { .name = "sa11x0-pcmcia", - .id = 0, + .id = -1, }; +static struct platform_device sa11x0mtd_device = { + .name = "flash", + .id = -1, +}; + +void sa11x0_set_flash_data(struct flash_platform_data *flash, + struct resource *res, int nr) +{ + sa11x0mtd_device.dev.platform_data = flash; + sa11x0mtd_device.resource = res; + sa11x0mtd_device.num_resources = nr; +} + static struct platform_device *sa11x0_devices[] __initdata = { &sa11x0udc_device, &sa11x0uart1_device, @@ -278,6 +291,7 @@ &sa11x0ssp_device, &sa11x0pcmcia_device, &sa11x0fb_device, + &sa11x0mtd_device, }; static int __init sa1100_init(void) diff -Nru a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h --- a/arch/arm/mach-sa1100/generic.h 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mach-sa1100/generic.h 2004-11-10 17:19:05 -08:00 @@ -27,3 +27,9 @@ extern int sa11x0_verify_speed(struct cpufreq_policy *policy); extern unsigned int sa11x0_getspeed(unsigned int cpu); extern unsigned int sa11x0_ppcr_to_freq(unsigned int idx); + +struct flash_platform_data; +struct resource; + +extern void sa11x0_set_flash_data(struct flash_platform_data *flash, + struct resource *res, int nr); diff -Nru a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c --- a/arch/arm/mach-sa1100/pm.c 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/mach-sa1100/pm.c 2004-11-10 17:19:03 -08:00 @@ -54,7 +54,7 @@ }; -static int sa11x0_pm_enter(u32 state) +static int sa11x0_pm_enter(suspend_state_t state) { unsigned long gpio, sleep_save[SLEEP_SAVE_SIZE]; struct timespec delta, rtc; @@ -135,7 +135,7 @@ /* * Called after processes are frozen, but before we shut down devices. */ -static int sa11x0_pm_prepare(u32 state) +static int sa11x0_pm_prepare(suspend_state_t state) { return 0; } @@ -143,7 +143,7 @@ /* * Called after devices are re-setup, but before processes are thawed. */ -static int sa11x0_pm_finish(u32 state) +static int sa11x0_pm_finish(suspend_state_t state) { return 0; } diff -Nru a/arch/arm/mach-sa1100/trizeps.c b/arch/arm/mach-sa1100/trizeps.c --- a/arch/arm/mach-sa1100/trizeps.c 2004-11-10 17:19:07 -08:00 +++ b/arch/arm/mach-sa1100/trizeps.c 2004-11-10 17:19:07 -08:00 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -32,9 +33,6 @@ #include #include #include -#include -#include -#include #include #include @@ -178,6 +176,34 @@ PMCR = PMCR_SF; } +static struct plat_serial8250_port serial_platform_data[] = { + { + .mapbase = TRIZEPS_UART5, + .irq = IRQ_GPIO16, + .uartclk = 24000000, + .regshift = 0, + .iotype = UPIO_PORT, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { + .mapbase = TRIZEPS_UART6, + .irq = IRQ_GPIO17, + .uartclk = 24000000, + .regshift = 0, + .iotype = UPIO_PORT, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { }, +}; + +static struct platform_device serial_device = { + .name = "serial8250", + .id = 0, + .dev = { + .platform_data = serial_platform_data, + }, +}; + static int __init trizeps_init(void) { if (!machine_is_trizeps()) @@ -200,6 +226,8 @@ GPDR &= ~(GPIO_GPIO16 | GPIO_GPIO17); // Set to Input set_irq_type(IRQ_GPIO16, IRQT_RISING); set_irq_type(IRQ_GPIO17, IRQT_RISING); + + platform_device_register(&serial_device); return 0; } diff -Nru a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c --- a/arch/arm/mach-shark/core.c 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mach-shark/core.c 2004-11-10 17:19:05 -08:00 @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -17,6 +18,46 @@ #include #include #include + +static struct plat_serial8250_port serial_platform_data[] = { + { + .iobase = 0x3f8, + .irq = 4, + .uartclk = 1843200, + .regshift = 2, + .iotype = UPIO_PORT, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { + .iobase = 0x2f8, + .irq = 3, + .uartclk = 1843200, + .regshift = 2, + .iotype = UPIO_PORT, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + { }, +}; + +static struct platform_device serial_device = { + .name = "serial8250", + .id = 0, + .dev = { + .platform_data = serial_platform_data, + }, +}; + +static int __init shark_init(void) +{ + int ret; + + if (machine_is_shark()) + ret = platform_device_register(&serial_device); + + return ret; +} + +arch_initcall(shark_init); extern void shark_init_irq(void); diff -Nru a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-versatile/Kconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,16 @@ +menu "Versatile platform type" + depends on ARCH_VERSATILE + +config ARCH_VERSATILE_PB + bool "Support Versatile/PB platform" + default y + help + Include support for the ARM(R) Versatile/PB platform. + +config ARCH_VERSATILE_AB + bool "Support Versatile/AB platform" + default n + help + Include support for the ARM(R) Versatile/AP platform. + +endmenu diff -Nru a/arch/arm/mach-versatile/Makefile b/arch/arm/mach-versatile/Makefile --- a/arch/arm/mach-versatile/Makefile 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-versatile/Makefile 2004-11-10 17:19:02 -08:00 @@ -3,3 +3,5 @@ # obj-y := core.o clock.o +obj-$(CONFIG_ARCH_VERSATILE_PB) += versatile_pb.o +obj-$(CONFIG_ARCH_VERSATILE_AB) += versatile_ab.o diff -Nru a/arch/arm/mach-versatile/clock.c b/arch/arm/mach-versatile/clock.c --- a/arch/arm/mach-versatile/clock.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mach-versatile/clock.c 2004-11-10 17:19:02 -08:00 @@ -16,7 +16,7 @@ #include #include -#include +#include #include "clock.h" @@ -83,12 +83,12 @@ int clk_set_rate(struct clk *clk, unsigned long rate) { int ret = -EIO; -#if 0 // Not yet + if (clk->setvco) { - struct icst525_vco vco; + struct icst307_vco vco; - vco = icst525_khz_to_vco(clk->params, rate / 1000); - clk->rate = icst525_khz(clk->params, vco) * 1000; + vco = icst307_khz_to_vco(clk->params, rate / 1000); + clk->rate = icst307_khz(clk->params, vco) * 1000; printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n", clk->name, vco.s, vco.r, vco.v); @@ -96,7 +96,6 @@ clk->setvco(clk, vco); ret = 0; } -#endif return ret; } EXPORT_SYMBOL(clk_set_rate); diff -Nru a/arch/arm/mach-versatile/clock.h b/arch/arm/mach-versatile/clock.h --- a/arch/arm/mach-versatile/clock.h 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mach-versatile/clock.h 2004-11-10 17:19:05 -08:00 @@ -9,16 +9,16 @@ * published by the Free Software Foundation. */ struct module; -struct icst525_params; +struct icst307_params; struct clk { struct list_head node; unsigned long rate; struct module *owner; const char *name; - const struct icst525_params *params; + const struct icst307_params *params; void *data; - void (*setvco)(struct clk *, struct icst525_vco vco); + void (*setvco)(struct clk *, struct icst307_vco vco); }; int clk_register(struct clk *clk); diff -Nru a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c --- a/arch/arm/mach-versatile/core.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mach-versatile/core.c 2004-11-10 17:19:04 -08:00 @@ -33,15 +33,17 @@ #include #include #include +#include #include #include #include #include #include -#ifdef CONFIG_MMC #include -#endif + +#include "core.h" +#include "clock.h" /* * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx @@ -111,19 +113,17 @@ #if 1 #define IRQ_MMCI0A IRQ_VICSOURCE22 -#define IRQ_MMCI1A IRQ_VICSOURCE23 #define IRQ_AACI IRQ_VICSOURCE24 #define IRQ_ETH IRQ_VICSOURCE25 #define PIC_MASK 0xFFD00000 #else #define IRQ_MMCI0A IRQ_SIC_MMCI0A -#define IRQ_MMCI1A IRQ_SIC_MMCI1A #define IRQ_AACI IRQ_SIC_AACI #define IRQ_ETH IRQ_SIC_ETH #define PIC_MASK 0 #endif -static void __init versatile_init_irq(void) +void __init versatile_init_irq(void) { unsigned int i, value; @@ -189,6 +189,10 @@ { IO_ADDRESS(VERSATILE_SIC_BASE), VERSATILE_SIC_BASE, SZ_4K, MT_DEVICE }, { IO_ADDRESS(VERSATILE_VIC_BASE), VERSATILE_VIC_BASE, SZ_4K, MT_DEVICE }, { IO_ADDRESS(VERSATILE_SCTL_BASE), VERSATILE_SCTL_BASE, SZ_4K * 9, MT_DEVICE }, +#ifdef CONFIG_ARCH_VERSATILE_AB + { IO_ADDRESS(VERSATILE_GPIO0_BASE), VERSATILE_GPIO0_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(VERSATILE_IB2_BASE), VERSATILE_IB2_BASE, SZ_64M, MT_DEVICE }, +#endif #ifdef CONFIG_DEBUG_LL { IO_ADDRESS(VERSATILE_UART0_BASE), VERSATILE_UART0_BASE, SZ_4K, MT_DEVICE }, #endif @@ -200,7 +204,7 @@ #endif }; -static void __init versatile_map_io(void) +void __init versatile_map_io(void) { iotable_init(versatile_io_desc, ARRAY_SIZE(versatile_io_desc)); } @@ -208,7 +212,7 @@ #define VERSATILE_REFCOUNTER (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_24MHz_OFFSET) /* - * This is the VersatilePB sched_clock implementation. This has + * This is the Versatile sched_clock implementation. This has * a resolution of 41.7ns, and a maximum value of about 179s. */ unsigned long long sched_clock(void) @@ -302,8 +306,7 @@ #define VERSATILE_SYSMCI (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_MCI_OFFSET) -#ifdef CONFIG_MMC -static unsigned int mmc_status(struct device *dev) +unsigned int mmc_status(struct device *dev) { struct amba_device *adev = container_of(dev, struct amba_device, dev); u32 mask; @@ -321,20 +324,50 @@ .status = mmc_status, }; -static struct mmc_platform_data mmc1_plat_data = { - .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, - .status = mmc_status, -}; +/* + * Clock handling + */ +static const struct icst307_params versatile_oscvco_params = { + .ref = 24000, + .vco_max = 200000, + .vd_min = 4 + 8, + .vd_max = 511 + 8, + .rd_min = 1 + 2, + .rd_max = 127 + 2, +}; + +static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco) +{ + unsigned long sys_lock = IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_LOCK_OFFSET; +#if defined(CONFIG_ARCH_VERSATILE_PB) + unsigned long sys_osc = IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSC4_OFFSET; +#elif defined(CONFIG_ARCH_VERSATILE_AB) + unsigned long sys_osc = IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSC1_OFFSET; #endif + u32 val; + + val = readl(sys_osc) & ~0x7ffff; + val |= vco.v | (vco.r << 9) | (vco.s << 16); + + writel(0xa05f, sys_lock); + writel(val, sys_osc); + writel(0, sys_lock); +} + +static struct clk versatile_clcd_clk = { + .name = "CLCDCLK", + .params = &versatile_oscvco_params, + .setvco = versatile_oscvco_set, +}; /* * CLCD support. */ #define SYS_CLCD_MODE_MASK (3 << 0) -#define SYS_CLCD_MODE_5551 (0 << 0) -#define SYS_CLCD_MODE_565 (1 << 0) -#define SYS_CLCD_MODE_888 (2 << 0) -#define SYS_CLCD_MODE_LT (3 << 0) +#define SYS_CLCD_MODE_888 (0 << 0) +#define SYS_CLCD_MODE_5551 (1 << 0) +#define SYS_CLCD_MODE_565_RLSB (2 << 0) +#define SYS_CLCD_MODE_565_BLSB (3 << 0) #define SYS_CLCD_NLCDIOON (1 << 2) #define SYS_CLCD_VDDPOSSWITCH (1 << 3) #define SYS_CLCD_PWR3V5SWITCH (1 << 4) @@ -342,6 +375,7 @@ #define SYS_CLCD_ID_SANYO_3_8 (0x00 << 8) #define SYS_CLCD_ID_UNKNOWN_8_4 (0x01 << 8) #define SYS_CLCD_ID_EPSON_2_2 (0x02 << 8) +#define SYS_CLCD_ID_SANYO_2_5 (0x07 << 8) #define SYS_CLCD_ID_VGA (0x1f << 8) static struct clcd_panel vga = { @@ -390,6 +424,29 @@ .bpp = 16, }; +static struct clcd_panel sanyo_2_5_in = { + .mode = { + .name = "Sanyo QVGA Portrait", + .refresh = 116, + .xres = 240, + .yres = 320, + .pixclock = 100000, + .left_margin = 20, + .right_margin = 10, + .upper_margin = 2, + .lower_margin = 2, + .hsync_len = 10, + .vsync_len = 2, + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .vmode = FB_VMODE_NONINTERLACED, + }, + .width = -1, + .height = -1, + .tim2 = TIM2_IVS | TIM2_IHS | TIM2_IPC, + .cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1), + .bpp = 16, +}; + static struct clcd_panel epson_2_2_in = { .mode = { .name = "Epson QCIF", @@ -428,6 +485,8 @@ val = readl(sys_clcd) & SYS_CLCD_ID_MASK; if (val == SYS_CLCD_ID_SANYO_3_8) panel = &sanyo_3_8_in; + else if (val == SYS_CLCD_ID_SANYO_2_5) + panel = &sanyo_2_5_in; else if (val == SYS_CLCD_ID_EPSON_2_2) panel = &epson_2_2_in; else if (val == SYS_CLCD_ID_VGA) @@ -435,9 +494,10 @@ else { printk(KERN_ERR "CLCD: unknown LCD panel ID 0x%08x, using VGA\n", val); + panel = &vga; } - return &vga; + return panel; } /* @@ -451,6 +511,20 @@ val = readl(sys_clcd); val &= ~SYS_CLCD_NLCDIOON | SYS_CLCD_PWR3V5SWITCH; writel(val, sys_clcd); + +#ifdef CONFIG_ARCH_VERSATILE_AB + /* + * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light off + */ + if (fb->panel == &sanyo_2_5_in) { + unsigned long versatile_ib2_ctrl = IO_ADDRESS(VERSATILE_IB2_CTRL); + unsigned long ctrl; + + ctrl = readl(versatile_ib2_ctrl); + ctrl &= ~0x01; + writel(ctrl, versatile_ib2_ctrl); + } +#endif } /* @@ -466,19 +540,10 @@ switch (fb->fb.var.green.length) { case 5: -#if 0 - /* - * For some undocumented reason, we need to select 565 mode - * even when using 555 with VGA. Maybe this is only true - * for the VGA output and needs to be done for LCD panels? - * I can't get an explaination from the people who should - * know. - */ val |= SYS_CLCD_MODE_5551; break; -#endif case 6: - val |= SYS_CLCD_MODE_565; + val |= SYS_CLCD_MODE_565_BLSB; break; case 8: val |= SYS_CLCD_MODE_888; @@ -495,6 +560,20 @@ */ val |= SYS_CLCD_NLCDIOON | SYS_CLCD_PWR3V5SWITCH; writel(val, sys_clcd); + +#ifdef CONFIG_ARCH_VERSATILE_AB + /* + * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light on + */ + if (fb->panel == &sanyo_2_5_in) { + unsigned long versatile_ib2_ctrl = IO_ADDRESS(VERSATILE_IB2_CTRL); + unsigned long ctrl; + + ctrl = readl(versatile_ib2_ctrl); + ctrl |= 0x01; + writel(ctrl, versatile_ib2_ctrl); + } +#endif } static unsigned long framesize = SZ_1M; @@ -525,7 +604,7 @@ } static struct clcd_board clcd_plat_data = { - .name = "Versatile PB", + .name = "Versatile", .check = clcdfb_check, .decode = clcdfb_decode, .disable = versatile_clcd_disable, @@ -534,23 +613,6 @@ .remove = versatile_clcd_remove, }; -#define AMBA_DEVICE(name,busid,base,plat) \ -static struct amba_device name##_device = { \ - .dev = { \ - .coherent_dma_mask = ~0, \ - .bus_id = busid, \ - .platform_data = plat, \ - }, \ - .res = { \ - .start = VERSATILE_##base##_BASE, \ - .end = (VERSATILE_##base##_BASE) + SZ_4K - 1,\ - .flags = IORESOURCE_MEM, \ - }, \ - .dma_mask = ~0, \ - .irq = base##_IRQ, \ - /* .dma = base##_DMA,*/ \ -} - #define AACI_IRQ { IRQ_AACI, NO_IRQ } #define AACI_DMA { 0x80, 0x81 } #define MMCI0_IRQ { IRQ_MMCI0A,IRQ_SIC_MMCI0B } @@ -559,12 +621,6 @@ #define KMI0_DMA { 0, 0 } #define KMI1_IRQ { IRQ_SIC_KMI1, NO_IRQ } #define KMI1_DMA { 0, 0 } -#define UART3_IRQ { IRQ_SIC_UART3, NO_IRQ } -#define UART3_DMA { 0x86, 0x87 } -#define SCI1_IRQ { IRQ_SIC_SCI3, NO_IRQ } -#define SCI1_DMA { 0x88, 0x89 } -#define MMCI1_IRQ { IRQ_MMCI1A, IRQ_SIC_MMCI1B } -#define MMCI1_DMA { 0x85, 0 } /* * These devices are connected directly to the multi-layer AHB switch @@ -589,10 +645,6 @@ #define GPIO0_DMA { 0, 0 } #define GPIO1_IRQ { IRQ_GPIOINT1, NO_IRQ } #define GPIO1_DMA { 0, 0 } -#define GPIO2_IRQ { IRQ_GPIOINT2, NO_IRQ } -#define GPIO2_DMA { 0, 0 } -#define GPIO3_IRQ { IRQ_GPIOINT3, NO_IRQ } -#define GPIO3_DMA { 0, 0 } #define RTC_IRQ { IRQ_RTCINT, NO_IRQ } #define RTC_DMA { 0, 0 } @@ -612,16 +664,9 @@ /* FPGA Primecells */ AMBA_DEVICE(aaci, "fpga:04", AACI, NULL); -#ifdef CONFIG_MMC AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &mmc0_plat_data); -#endif AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL); AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL); -AMBA_DEVICE(uart3, "fpga:09", UART3, NULL); -AMBA_DEVICE(sci1, "fpga:0a", SCI1, NULL); -#ifdef CONFIG_MMC -AMBA_DEVICE(mmc1, "fpga:0b", MMCI1, &mmc1_plat_data); -#endif /* DevChip Primecells */ AMBA_DEVICE(smc, "dev:00", SMC, NULL); @@ -632,8 +677,6 @@ AMBA_DEVICE(wdog, "dev:e1", WATCHDOG, NULL); AMBA_DEVICE(gpio0, "dev:e4", GPIO0, NULL); AMBA_DEVICE(gpio1, "dev:e5", GPIO1, NULL); -AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL); -AMBA_DEVICE(gpio3, "dev:e7", GPIO3, NULL); AMBA_DEVICE(rtc, "dev:e8", RTC, NULL); AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); AMBA_DEVICE(uart0, "dev:f1", UART0, NULL); @@ -646,7 +689,6 @@ &uart0_device, &uart1_device, &uart2_device, - &uart3_device, &smc_device, &mpmc_device, &clcd_device, @@ -654,23 +696,16 @@ &wdog_device, &gpio0_device, &gpio1_device, - &gpio2_device, - &gpio3_device, &rtc_device, &sci0_device, &ssp0_device, &aaci_device, -#ifdef CONFIG_MMC &mmc0_device, -#endif &kmi0_device, &kmi1_device, - &sci1_device, -#ifdef CONFIG_MMC - &mmc1_device, -#endif }; +#ifdef CONFIG_LEDS #define VA_LEDS_BASE (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET) static void versatile_leds_event(led_event_t ledevt) @@ -705,11 +740,14 @@ writel(val, VA_LEDS_BASE); local_irq_restore(flags); } +#endif /* CONFIG_LEDS */ -static void __init versatile_init(void) +void __init versatile_init(void) { int i; + clk_register(&versatile_clcd_clk); + platform_device_register(&versatile_flash_device); platform_device_register(&smc91x_device); @@ -718,7 +756,9 @@ amba_device_register(d, &iomem_resource); } +#ifdef CONFIG_LEDS leds_event = versatile_leds_event; +#endif } /* @@ -863,17 +903,7 @@ setup_irq(IRQ_TIMERINT0_1, &versatile_timer_irq); } -static struct sys_timer versatile_timer = { +struct sys_timer versatile_timer = { .init = versatile_timer_init, .offset = versatile_gettimeoffset, }; - -MACHINE_START(VERSATILE_PB, "ARM-Versatile PB") - MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") - BOOT_MEM(0x00000000, 0x101f1000, 0xf11f1000) - BOOT_PARAMS(0x00000100) - MAPIO(versatile_map_io) - INITIRQ(versatile_init_irq) - .timer = &versatile_timer, - INIT_MACHINE(versatile_init) -MACHINE_END diff -Nru a/arch/arm/mach-versatile/core.h b/arch/arm/mach-versatile/core.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-versatile/core.h 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,50 @@ +/* + * linux/arch/arm/mach-versatile/core.h + * + * Copyright (C) 2004 ARM Limited + * Copyright (C) 2000 Deep Blue Solutions Ltd + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __ASM_ARCH_VERSATILE_H +#define __ASM_ARCH_VERSATILE_H + +#include + +extern void __init versatile_init(void); +extern void __init versatile_init_irq(void); +extern void __init versatile_map_io(void); +extern struct sys_timer versatile_timer; +extern unsigned int mmc_status(struct device *dev); + +#define AMBA_DEVICE(name,busid,base,plat) \ +static struct amba_device name##_device = { \ + .dev = { \ + .coherent_dma_mask = ~0, \ + .bus_id = busid, \ + .platform_data = plat, \ + }, \ + .res = { \ + .start = VERSATILE_##base##_BASE, \ + .end = (VERSATILE_##base##_BASE) + SZ_4K - 1,\ + .flags = IORESOURCE_MEM, \ + }, \ + .dma_mask = ~0, \ + .irq = base##_IRQ, \ + /* .dma = base##_DMA,*/ \ +} + +#endif diff -Nru a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-versatile/versatile_ab.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,45 @@ +/* + * linux/arch/arm/mach-versatile/versatile_ab.c + * + * Copyright (C) 2004 ARM Limited + * Copyright (C) 2000 Deep Blue Solutions Ltd + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "core.h" + +MACHINE_START(VERSATILE_AB, "ARM-Versatile AB") + MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") + BOOT_MEM(0x00000000, 0x101f1000, 0xf11f1000) + BOOT_PARAMS(0x00000100) + MAPIO(versatile_map_io) + INITIRQ(versatile_init_irq) + .timer = &versatile_timer, + INIT_MACHINE(versatile_init) +MACHINE_END diff -Nru a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-versatile/versatile_pb.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,109 @@ +/* + * linux/arch/arm/mach-versatile/versatile_pb.c + * + * Copyright (C) 2004 ARM Limited + * Copyright (C) 2000 Deep Blue Solutions Ltd + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "core.h" + +#if 1 +#define IRQ_MMCI1A IRQ_VICSOURCE23 +#else +#define IRQ_MMCI1A IRQ_SIC_MMCI1A +#endif + +static struct mmc_platform_data mmc1_plat_data = { + .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, + .status = mmc_status, +}; + +#define UART3_IRQ { IRQ_SIC_UART3, NO_IRQ } +#define UART3_DMA { 0x86, 0x87 } +#define SCI1_IRQ { IRQ_SIC_SCI3, NO_IRQ } +#define SCI1_DMA { 0x88, 0x89 } +#define MMCI1_IRQ { IRQ_MMCI1A, IRQ_SIC_MMCI1B } +#define MMCI1_DMA { 0x85, 0 } + +/* + * These devices are connected via the core APB bridge + */ +#define GPIO2_IRQ { IRQ_GPIOINT2, NO_IRQ } +#define GPIO2_DMA { 0, 0 } +#define GPIO3_IRQ { IRQ_GPIOINT3, NO_IRQ } +#define GPIO3_DMA { 0, 0 } + +/* + * These devices are connected via the DMA APB bridge + */ + +/* FPGA Primecells */ +AMBA_DEVICE(uart3, "fpga:09", UART3, NULL); +AMBA_DEVICE(sci1, "fpga:0a", SCI1, NULL); +AMBA_DEVICE(mmc1, "fpga:0b", MMCI1, &mmc1_plat_data); + +/* DevChip Primecells */ +AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL); +AMBA_DEVICE(gpio3, "dev:e7", GPIO3, NULL); + +static struct amba_device *amba_devs[] __initdata = { + &uart3_device, + &gpio2_device, + &gpio3_device, + &sci1_device, + &mmc1_device, +}; + +static int __init versatile_pb_init(void) +{ + int i; + + if (machine_is_versatile_pb()) { + for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { + struct amba_device *d = amba_devs[i]; + amba_device_register(d, &iomem_resource); + } + } + + return 0; +} + +arch_initcall(versatile_pb_init); + +MACHINE_START(VERSATILE_PB, "ARM-Versatile PB") + MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") + BOOT_MEM(0x00000000, 0x101f1000, 0xf11f1000) + BOOT_PARAMS(0x00000100) + MAPIO(versatile_map_io) + INITIRQ(versatile_init_irq) + .timer = &versatile_timer, + INIT_MACHINE(versatile_init) +MACHINE_END diff -Nru a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig --- a/arch/arm/mm/Kconfig 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/mm/Kconfig 2004-11-10 17:19:04 -08:00 @@ -14,6 +14,7 @@ depends on ARCH_RPC select CPU_32v3 select CPU_CACHE_V3 + select CPU_CACHE_VIVT select CPU_COPY_V3 select CPU_TLB_V3 help @@ -29,6 +30,7 @@ default y if ARCH_CLPS7500 select CPU_32v3 select CPU_CACHE_V3 + select CPU_CACHE_VIVT select CPU_COPY_V3 select CPU_TLB_V3 help @@ -47,6 +49,7 @@ select CPU_32v4 select CPU_ABRT_LV4T select CPU_CACHE_V4 + select CPU_CACHE_VIVT select CPU_COPY_V4WT select CPU_TLB_V4WT help @@ -64,6 +67,7 @@ select CPU_32v4 select CPU_ABRT_EV4T select CPU_CACHE_V4WT + select CPU_CACHE_VIVT select CPU_COPY_V4WB select CPU_TLB_V4WBI help @@ -84,6 +88,7 @@ select CPU_32v4 select CPU_ABRT_EV4T select CPU_CACHE_V4WT + select CPU_CACHE_VIVT select CPU_COPY_V4WB select CPU_TLB_V4WBI help @@ -102,6 +107,7 @@ select CPU_32v4 select CPU_ABRT_EV4T select CPU_CACHE_V4WT + select CPU_CACHE_VIVT select CPU_COPY_V4WB select CPU_TLB_V4WBI help @@ -115,10 +121,11 @@ # ARM926T config CPU_ARM926T bool "Support ARM926T processor" if ARCH_INTEGRATOR - depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || ARCH_OMAP730 || ARCH_OMAP1610 || ARCH_OMAP5912 - default y if ARCH_VERSATILE_PB + depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || ARCH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP1610 || ARCH_OMAP5912 + default y if ARCH_VERSATILE_PB || ARCH_VERSATILE_AB select CPU_32v5 select CPU_ABRT_EV5TJ + select CPU_CACHE_VIVT select CPU_COPY_V4WB select CPU_TLB_V4WBI help @@ -136,6 +143,7 @@ select CPU_32v5 select CPU_ABRT_EV4T select CPU_CACHE_V4WT + select CPU_CACHE_VIVT select CPU_COPY_V4WB select CPU_TLB_V4WBI help @@ -152,6 +160,7 @@ select CPU_32v5 select CPU_ABRT_EV4T select CPU_CACHE_V4WT + select CPU_CACHE_VIVT select CPU_COPY_V4WB select CPU_TLB_V4WBI depends on n @@ -162,6 +171,7 @@ depends on ARCH_INTEGRATOR select CPU_32v5 select CPU_ABRT_EV4T + select CPU_CACHE_VIVT select CPU_COPY_V4WB # can probably do better select CPU_TLB_V4WBI help @@ -178,6 +188,7 @@ depends on ARCH_INTEGRATOR select CPU_32v5 select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10 + select CPU_CACHE_VIVT select CPU_COPY_V4WB # can probably do better select CPU_TLB_V4WBI help @@ -195,6 +206,7 @@ select CPU_32v4 if !ARCH_RPC select CPU_ABRT_EV4 select CPU_CACHE_V4WB + select CPU_CACHE_VIVT select CPU_COPY_V4WB select CPU_TLB_V4WB help @@ -214,6 +226,7 @@ select CPU_32v4 select CPU_ABRT_EV4 select CPU_CACHE_V4WB + select CPU_CACHE_VIVT select CPU_TLB_V4WB select CPU_MINICACHE @@ -224,6 +237,7 @@ default y select CPU_32v5 select CPU_ABRT_EV5T + select CPU_CACHE_VIVT select CPU_TLB_V4WBI select CPU_MINICACHE @@ -234,6 +248,7 @@ select CPU_32v6 select CPU_ABRT_EV6 select CPU_CACHE_V6 + select CPU_CACHE_VIPT select CPU_COPY_V6 select CPU_TLB_V6 @@ -284,6 +299,12 @@ bool config CPU_CACHE_V6 + bool + +config CPU_CACHE_VIVT + bool + +config CPU_CACHE_VIPT bool # The copy-page model diff -Nru a/arch/arm/mm/init.c b/arch/arm/mm/init.c --- a/arch/arm/mm/init.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/mm/init.c 2004-11-10 17:19:02 -08:00 @@ -30,7 +30,7 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; -extern char _stext, _text, _etext, _end, __init_begin, __init_end; +extern void _stext, _text, _etext, __data_start, _end, __init_begin, __init_end; extern unsigned long phys_initrd_start; extern unsigned long phys_initrd_size; @@ -282,7 +282,11 @@ * Register the kernel text and data with bootmem. * Note that this can only be in node 0. */ +#ifdef CONFIG_XIP_KERNEL + reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start); +#else reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext); +#endif /* * Reserve the page tables. These are already in use, @@ -540,7 +544,7 @@ int i, node; codepages = &_etext - &_text; - datapages = &_end - &_etext; + datapages = &_end - &__data_start; initpages = &__init_end - &__init_begin; #ifndef CONFIG_DISCONTIGMEM diff -Nru a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c --- a/arch/arm/mm/ioremap.c 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mm/ioremap.c 2004-11-10 17:19:05 -08:00 @@ -130,7 +130,7 @@ * 'flags' are the extra L_PTE_ flags that you want to specify for this * mapping. See include/asm-arm/proc-armv/pgtable.h for more information. */ -void * +void __iomem * __ioremap(unsigned long phys_addr, size_t size, unsigned long flags, unsigned long align) { @@ -161,11 +161,11 @@ vfree(addr); return NULL; } - return (void *) (offset + (char *)addr); + return (void __iomem *) (offset + (char *)addr); } EXPORT_SYMBOL(__ioremap); -void __iounmap(void *addr) +void __iounmap(void __iomem *addr) { vfree((void *) (PAGE_MASK & (unsigned long) addr)); } diff -Nru a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c --- a/arch/arm/mm/mm-armv.c 2004-11-10 17:19:05 -08:00 +++ b/arch/arm/mm/mm-armv.c 2004-11-10 17:19:05 -08:00 @@ -326,6 +326,10 @@ [MT_MEMORY] = { .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, .domain = DOMAIN_KERNEL, + }, + [MT_ROM] = { + .prot_sect = PMD_TYPE_SECT, + .domain = DOMAIN_KERNEL, } }; @@ -359,6 +363,7 @@ mem_types[MT_MINICLEAN].prot_sect |= PMD_BIT4; mem_types[MT_VECTORS].prot_l1 |= PMD_BIT4; mem_types[MT_MEMORY].prot_sect |= PMD_BIT4; + mem_types[MT_ROM].prot_sect |= PMD_BIT4; } /* @@ -370,6 +375,7 @@ * kernel memory mapping. */ mem_types[MT_MEMORY].prot_sect &= ~PMD_BIT4; + mem_types[MT_ROM].prot_sect &= ~PMD_BIT4; /* * Mark cache clean areas read only from SVC mode * and no access from userspace. @@ -389,6 +395,7 @@ mem_types[MT_VECTORS].prot_l1 |= ecc_mask; mem_types[MT_MEMORY].prot_sect |= ecc_mask | cp->pmd; + mem_types[MT_ROM].prot_sect |= cp->pmd; for (i = 0; i < 16; i++) { unsigned long v = pgprot_val(protection_map[i]); @@ -426,14 +433,14 @@ pgprot_t prot_pte; long off; - if (md->virtual != vectors_base() && md->virtual < PAGE_OFFSET) { + if (md->virtual != vectors_base() && md->virtual < TASK_SIZE) { printk(KERN_WARNING "BUG: not creating mapping for " "0x%08lx at 0x%08lx in user region\n", md->physical, md->virtual); return; } - if (md->type == MT_DEVICE && + if ((md->type == MT_DEVICE || md->type == MT_ROM) && md->virtual >= PAGE_OFFSET && md->virtual < VMALLOC_END) { printk(KERN_WARNING "BUG: mapping for 0x%08lx at 0x%08lx " "overlaps vmalloc space\n", @@ -508,6 +515,8 @@ } } +extern void _stext, _etext; + /* * Setup initial mappings. We use the page we allocated for zero page to hold * the mappings, which will get overwritten by the vectors in traps_init(). @@ -522,6 +531,14 @@ build_mem_type_table(); init_maps = p = alloc_bootmem_low_pages(PAGE_SIZE); + +#ifdef CONFIG_XIP_KERNEL + p->physical = CONFIG_XIP_PHYS_ADDR & PMD_MASK; + p->virtual = (unsigned long)&_stext & PMD_MASK; + p->length = ((unsigned long)&_etext - p->virtual + ~PMD_MASK) & PMD_MASK; + p->type = MT_ROM; + p ++; +#endif for (i = 0; i < mi->nr_banks; i++) { if (mi->bank[i].size == 0) diff -Nru a/arch/arm/nwfpe/double_cpdo.c b/arch/arm/nwfpe/double_cpdo.c --- a/arch/arm/nwfpe/double_cpdo.c 2004-11-10 17:19:02 -08:00 +++ b/arch/arm/nwfpe/double_cpdo.c 2004-11-10 17:19:02 -08:00 @@ -75,7 +75,11 @@ union float64_components u; u.f64 = rFm; +#ifdef __ARMEB__ + u.i[0] ^= 0x80000000; +#else u.i[1] ^= 0x80000000; +#endif return u.f64; } @@ -85,7 +89,11 @@ union float64_components u; u.f64 = rFm; +#ifdef __ARMEB__ + u.i[0] &= 0x7fffffff; +#else u.i[1] &= 0x7fffffff; +#endif return u.f64; } diff -Nru a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types --- a/arch/arm/tools/mach-types 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/tools/mach-types 2004-11-10 17:19:04 -08:00 @@ -6,7 +6,7 @@ # To add an entry into this database, please see Documentation/arm/README, # or contact rmk@arm.linux.org.uk # -# Last update: Thu Sep 30 15:23:21 2004 +# Last update: Sun Nov 7 13:20:41 2004 # # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # @@ -595,8 +595,8 @@ xaeniax MACH_XAENIAX XAENIAX 585 somn4250 MACH_SOMN4250 SOMN4250 586 pleb2 MACH_PLEB2 PLEB2 587 -cwl MACH_CWL CWL 588 -gd MACH_GD GD 589 +cornwallis MACH_CORNWALLIS CORNWALLIS 588 +gurney_drv MACH_GURNEY_DRV GURNEY_DRV 589 chaffee MACH_CHAFFEE CHAFFEE 590 rms101 MACH_RMS101 RMS101 591 rx3715 MACH_RX3715 RX3715 592 @@ -615,3 +615,22 @@ tomtomgo MACH_TOMTOMGO TOMTOMGO 605 versatile_ab MACH_VERSATILE_AB VERSATILE_AB 606 edb9307 MACH_EDB9307 EDB9307 607 +sg565 MACH_SG565 SG565 608 +lpd79524 MACH_LPD79524 LPD79524 609 +lpd79525 MACH_LPD79525 LPD79525 610 +rms100 MACH_RMS100 RMS100 611 +kb9200 MACH_KB9200 KB9200 612 +sx1 MACH_SX1 SX1 613 +hms39c7092 MACH_HMS39C7092 HMS39C7092 614 +armadillo MACH_ARMADILLO ARMADILLO 615 +ipcu MACH_IPCU IPCU 616 +loox720 MACH_LOOX720 LOOX720 617 +ixdp465 MACH_IXDP465 IXDP465 618 +ixdp2351 MACH_IXDP2351 IXDP2351 619 +adsvix MACH_ADSVIX ADSVIX 620 +dm270 MACH_DM270 DM270 621 +socltplus MACH_SOCLTPLUS SOCLTPLUS 622 +ecia MACH_ECIA ECIA 623 +cm4008 MACH_CM4008 CM4008 624 +p2001 MACH_P2001 P2001 625 +twister MACH_TWISTER TWISTER 626 diff -Nru a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h --- a/arch/arm/vfp/vfp.h 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/vfp/vfp.h 2004-11-10 17:19:04 -08:00 @@ -249,6 +249,12 @@ u64 significand; }; +/* + * VFP_REG_ZERO is a special register number for vfp_get_double + * which returns (double)0.0. This is useful for the compare with + * zero instructions. + */ +#define VFP_REG_ZERO 16 extern u64 vfp_get_double(unsigned int reg); extern void vfp_put_double(unsigned int reg, u64 val); diff -Nru a/arch/arm/vfp/vfpdouble.c b/arch/arm/vfp/vfpdouble.c --- a/arch/arm/vfp/vfpdouble.c 2004-11-10 17:19:04 -08:00 +++ b/arch/arm/vfp/vfpdouble.c 2004-11-10 17:19:04 -08:00 @@ -427,12 +427,12 @@ static u32 vfp_double_fcmpz(int dd, int unused, int dm, u32 fpscr) { - return vfp_compare(dd, 0, -1, fpscr); + return vfp_compare(dd, 0, VFP_REG_ZERO, fpscr); } static u32 vfp_double_fcmpez(int dd, int unused, int dm, u32 fpscr) { - return vfp_compare(dd, 1, -1, fpscr); + return vfp_compare(dd, 1, VFP_REG_ZERO, fpscr); } static u32 vfp_double_fcvts(int sd, int unused, int dm, u32 fpscr) diff -Nru a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S --- a/arch/arm/vfp/vfphw.S 2004-11-10 17:19:03 -08:00 +++ b/arch/arm/vfp/vfphw.S 2004-11-10 17:19:03 -08:00 @@ -199,6 +199,11 @@ mov pc, lr .endr + @ virtual register 16 for compare with zero + mov r0, #0 + mov r1, #0 + mov pc, lr + .globl vfp_put_double vfp_put_double: mov r0, r0, lsr #1 diff -Nru a/arch/cris/arch-v10/drivers/ide.c b/arch/cris/arch-v10/drivers/ide.c --- a/arch/cris/arch-v10/drivers/ide.c 2004-11-10 17:19:04 -08:00 +++ b/arch/cris/arch-v10/drivers/ide.c 2004-11-10 17:19:04 -08:00 @@ -656,15 +656,9 @@ ata_tot_size = 0; - if (HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) { - sg_init_one(&sg[0], rq->buffer, rq->nr_sectors * SECTOR_SIZE); - hwif->sg_nents = i = 1; - } - else - { - hwif->sg_nents = i = blk_rq_map_sg(drive->queue, rq, hwif->sg_table); - } + ide_map_sg(drive, rq); + i = hwif->sg_nents; while(i) { /* diff -Nru a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S --- a/arch/h8300/kernel/vmlinux.lds.S 2004-11-10 17:19:05 -08:00 +++ b/arch/h8300/kernel/vmlinux.lds.S 2004-11-10 17:19:05 -08:00 @@ -1,60 +1,48 @@ #define VMLINUX_SYMBOL(_sym_) _##_sym_ #include -#include #include +/* target memory map */ #ifdef CONFIG_H8300H_GENERIC -#ifdef CONFIG_ROMKERNEL -#include "../platform/h8300h/generic/rom.ld" -#endif -#ifdef CONFIG_RAMKERNEL -#include "../platform/h8300h/generic/ram.ld" -#endif +#define ROMTOP 0x000000 +#define ROMSIZE 0x200000 +#define RAMTOP 0x200000 +#define RAMSIZE 0x200000 #endif #ifdef CONFIG_H8300H_AKI3068NET -#ifdef CONFIG_ROMKERNEL -#include "../platform/h8300h/aki3068net/rom.ld" -#endif -#ifdef CONFIG_RAMKERNEL -#include "../platform/h8300h/aki3068net/ram.ld" -#endif +#define ROMTOP 0x000000 +#define ROMSIZE 0x080000 +#define RAMTOP 0x400000 +#define RAMSIZE 0x200000 #endif #ifdef CONFIG_H8300H_H8MAX -#ifdef CONFIG_ROMKERNEL -#include "../platform/h8300h/h8max/rom.ld" -#endif -#ifdef CONFIG_RAMKERNEL -#include "../platform/h8300h/h8max/ram.ld" -#endif +#define ROMTOP 0x000000 +#define ROMSIZE 0x080000 +#define RAMTOP 0x400000 +#define RAMSIZE 0x200000 #endif #ifdef CONFIG_H8300H_SIM -#ifdef CONFIG_ROMKERNEL -#include "../platform/h8300h/generic/rom.ld" -#endif -#ifdef CONFIG_RAMKERNEL -#include "../platform/h8300h/generic/ram.ld" -#endif +#define ROMTOP 0x000000 +#define ROMSIZE 0x200000 +#define RAMTOP 0x200000 +#define RAMSIZE 0x200000 #endif #ifdef CONFIG_H8S_SIM -#ifdef CONFIG_ROMKERNEL -#include "../platform/h8s/generic/rom.ld" -#endif -#ifdef CONFIG_RAMKERNEL -#include "../platform/h8s/generic/ram.ld" -#endif +#define ROMTOP 0x000000 +#define ROMSIZE 0x200000 +#define RAMTOP 0x200000 +#define RAMSIZE 0x200000 #endif #ifdef CONFIG_H8S_EDOSK2674 -#ifdef CONFIG_ROMKERNEL -#include "../platform/h8s/edosk2674/rom.ld" -#endif -#ifdef CONFIG_RAMKERNEL -#include "../platform/h8s/edosk2674/ram.ld" -#endif +#define ROMTOP 0x000000 +#define ROMSIZE 0x400000 +#define RAMTOP 0x400000 +#define RAMSIZE 0x800000 #endif #if defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM) @@ -66,68 +54,45 @@ SECTIONS { #if defined(CONFIG_ROMKERNEL) + . = ROMTOP; .vectors : { __vector = . ; *(.vectors*) - } > vector -#endif -#if defined(CONFIG_RAMKERNEL) - .bootvec : + } +#else + . = RAMTOP; + .bootvec : { *(.bootvec) - } > ram + } #endif .text : { #if defined(CONFIG_ROMKERNEL) - *(.int_redirect) + *(.int_redirect) #endif __stext = . ; *(.text) SCHED_TEXT - . = ALIGN(0x4) ; - *(.exit.text) - *(.text.*) - . = ALIGN(0x4) ; - *(.exitcall.exit) - . = ALIGN(0x4) ; - *(.kstrtab) - . = ALIGN(0x4) ; - *(.rodata*) + LOCK_TEXT + __etext = . ; . = ALIGN(16); /* Exception table */ ___start___ex_table = .; *(__ex_table) ___stop___ex_table = .; - ___start___ksymtab = .; /* Kernel symbol table */ - *(__ksymtab) - ___stop___ksymtab = .; - - ___start___ksymtab_gpl = .; /* Kernel symbol table: GPL-only symbols */ - - *(__ksymtab_gpl) - ___stop___ksymtab_gpl = .; - - ___start___kcrctab = .; /* Kernel symbol table: Normal symbols */ - *(__kcrctab) - ___stop___kcrctab = .; - - ___start___kcrctab_gpl = .; /* Kernel symbol table: GPL-only symbols */ - *(__kcrctab_gpl) - ___stop___kcrctab_gpl = .; - - *(__ksymtab_strings) /* Kernel symbol table: strings */ - - . = ALIGN(0x4) ; - __etext = . ; + RODATA #if defined(CONFIG_ROMKERNEL) - } > rom + SECURITY_INIT #endif -#if defined(CONFIG_RAMKERNEL) - } > ram + ROEND = .; +#if defined(CONFIG_ROMKERNEL) + . = RAMTOP; + .data : AT(ROEND) +#else + .data : #endif - .data : AT( ADDR(.text)+SIZEOF(.text)) { __sdata = . ; ___data_start = . ; @@ -162,6 +127,8 @@ ___con_initcall_start = .; *(.con_initcall.init) ___con_initcall_end = .; + *(.exit.text) + *(.exit.data) . = ALIGN(4); ___initramfs_start = .; *(.init.ramfs) @@ -169,13 +136,13 @@ . = ALIGN(0x4) ; ___init_end = .; __edata = . ; - } > ram + } +#if defined(CONFIG_RAMKERNEL) + SECURITY_INIT +#endif __begin_data = LOADADDR(.data) ; #if defined(CONFIG_ROMKERNEL) - .erom : - { - __erom = . ; - } > erom + __erom = LOADADDR(.data) + SIZEOF(.data) ; #endif .bss : { @@ -188,15 +155,19 @@ __ebss = . ; __end = . ; __ramstart = .; - } > ram + } + /DISCARD/ : { + *(.exitcall.exit) + } + .romfs : { *(.romfs*) - } > ram + } + . = RAMTOP+RAMSIZE; .dummy : { COMMAND_START = . - 0x200 ; __ramend = . ; - } > eram + } } - diff -Nru a/arch/h8300/platform/h8300h/aki3068net/ram.ld b/arch/h8300/platform/h8300h/aki3068net/ram.ld --- a/arch/h8300/platform/h8300h/aki3068net/ram.ld 2004-11-10 17:19:05 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,11 +0,0 @@ -/* AE-3068 (aka. aki3068net) RAM */ - -OUTPUT_ARCH(h8300h) -ENTRY("__start") - -MEMORY - { - ram : ORIGIN = 0x400000, LENGTH = 0x600000-0x400000 - eram : ORIGIN = 0x600000, LENGTH = 0 - iram : ORIGIN = 0xffbf20, LENGTH = 0x4000 - } diff -Nru a/arch/h8300/platform/h8300h/generic/ram.ld b/arch/h8300/platform/h8300h/generic/ram.ld --- a/arch/h8300/platform/h8300h/generic/ram.ld 2004-11-10 17:19:03 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,11 +0,0 @@ -/* Generic RAM */ - -OUTPUT_ARCH(h8300h) -ENTRY("__start") - -MEMORY - { - ram : ORIGIN = 0x400000, LENGTH = 0x200000 - eram : ORIGIN = 0x600000, LENGTH = 0 - iram : ORIGIN = 0xffbf20, LENGTH = 0x4000 - } diff -Nru a/arch/h8300/platform/h8300h/generic/rom.ld b/arch/h8300/platform/h8300h/generic/rom.ld --- a/arch/h8300/platform/h8300h/generic/rom.ld 2004-11-10 17:19:02 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,12 +0,0 @@ -OUTPUT_ARCH(h8300h) -ENTRY("__start") - -MEMORY - { - vector : ORIGIN = 0x000000, LENGTH = 0x000100 - rom : ORIGIN = 0x000100, LENGTH = 0x200000-0x000100 - erom : ORIGIN = 0x200000, LENGTH = 0 - ram : ORIGIN = 0x200000, LENGTH = 0x400000 - eram : ORIGIN = 0x600000, LENGTH = 0 - } - diff -Nru a/arch/h8300/platform/h8300h/h8max/ram.ld b/arch/h8300/platform/h8300h/h8max/ram.ld --- a/arch/h8300/platform/h8300h/h8max/ram.ld 2004-11-10 17:19:07 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,11 +0,0 @@ -/* H8MAX RAM */ - -OUTPUT_ARCH(h8300h) -ENTRY("__start") - -MEMORY - { - ram : ORIGIN = 0x400000, LENGTH = 0x600000-0x400000 - eram : ORIGIN = 0x600000, LENGTH = 0 - iram : ORIGIN = 0xfffd20, LENGTH = 0x100 - } diff -Nru a/arch/h8300/platform/h8s/edosk2674/crt0_rom.S b/arch/h8300/platform/h8s/edosk2674/crt0_rom.S --- a/arch/h8300/platform/h8s/edosk2674/crt0_rom.S 2004-11-10 17:19:04 -08:00 +++ b/arch/h8300/platform/h8s/edosk2674/crt0_rom.S 2004-11-10 17:19:04 -08:00 @@ -181,7 +181,7 @@ .long __start .long __start vector = 2 - .rept 126-1 + .rept 126 .long _interrupt_redirect_table+vector*4 vector = vector + 1 .endr diff -Nru a/arch/h8300/platform/h8s/edosk2674/ram.ld b/arch/h8300/platform/h8s/edosk2674/ram.ld --- a/arch/h8300/platform/h8s/edosk2674/ram.ld 2004-11-10 17:19:02 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,10 +0,0 @@ -/* EDOSK-2674R RAM */ - -OUTPUT_ARCH(h8300s) -ENTRY("__start") - -MEMORY - { - ram : ORIGIN = 0x400000, LENGTH = 0xc00000-0x400000 - eram : ORIGIN = 0xc00000, LENGTH = 0 - } diff -Nru a/arch/h8300/platform/h8s/edosk2674/rom.ld b/arch/h8300/platform/h8s/edosk2674/rom.ld --- a/arch/h8300/platform/h8s/edosk2674/rom.ld 2004-11-10 17:19:04 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,11 +0,0 @@ -OUTPUT_ARCH(h8300s) -ENTRY("__start") - -MEMORY - { - vector : ORIGIN = 0x000000, LENGTH = 0x000200 - rom : ORIGIN = 0x000200, LENGTH = 0x100000-0x000200 - erom : ORIGIN = 0x100000, LENGTH = 0 - ram : ORIGIN = 0x400000, LENGTH = 0xc00000-0x400000 - eram : ORIGIN = 0xc00000, LENGTH = 0 - } diff -Nru a/arch/h8300/platform/h8s/generic/ram.ld b/arch/h8300/platform/h8s/generic/ram.ld --- a/arch/h8300/platform/h8s/generic/ram.ld 2004-11-10 17:19:02 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,8 +0,0 @@ -OUTPUT_ARCH(h8300s) -ENTRY("__start") - -MEMORY - { - ram : ORIGIN = 0x400000, LENGTH = 0x200000 - eram : ORIGIN = 0x600000, LENGTH = 0 - } diff -Nru a/arch/h8300/platform/h8s/generic/rom.ld b/arch/h8300/platform/h8s/generic/rom.ld --- a/arch/h8300/platform/h8s/generic/rom.ld 2004-11-10 17:19:07 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,11 +0,0 @@ -OUTPUT_ARCH(h8300s) -ENTRY("__start") - -MEMORY - { - vector : ORIGIN = 0x000000, LENGTH = 0x000200 - rom : ORIGIN = 0x000200, LENGTH = 0x200000-0x000200 - erom : ORIGIN = 0x200000, LENGTH = 0 - ram : ORIGIN = 0x200000, LENGTH = 0x400000 - eram : ORIGIN = 0x600000, LENGTH = 0 - } diff -Nru a/arch/i386/Makefile b/arch/i386/Makefile --- a/arch/i386/Makefile 2004-11-10 17:19:03 -08:00 +++ b/arch/i386/Makefile 2004-11-10 17:19:03 -08:00 @@ -25,7 +25,7 @@ # prevent gcc from keeping the stack 16 byte aligned CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) -align := $(subst -functions=0,,$(call cc-option,-falign-functions=0,-malign-functions=0)) +align := $(cc-option-align) cflags-$(CONFIG_M386) += -march=i386 cflags-$(CONFIG_M486) += -march=i486 cflags-$(CONFIG_M586) += -march=i586 diff -Nru a/arch/i386/crypto/aes-i586-asm.S b/arch/i386/crypto/aes-i586-asm.S --- a/arch/i386/crypto/aes-i586-asm.S 2004-11-10 17:19:05 -08:00 +++ b/arch/i386/crypto/aes-i586-asm.S 2004-11-10 17:19:05 -08:00 @@ -61,7 +61,6 @@ #define r3 edx #define r4 esi #define r5 edi -#define r6 ebp #define eaxl al #define eaxh ah @@ -84,60 +83,63 @@ // output registers r0, r1, r4 or r5. // Parameters: +// table table base address // %1 out_state[0] // %2 out_state[1] // %3 out_state[2] // %4 out_state[3] -// %5 table base address -// %6 input register for the round (destroyed) -// %7 scratch register for the round - -#define do_col(a1, a2, a3, a4, a5, a6, a7) \ - movzx %l(a6),%a7; \ - xor a5(,%a7,4),%a1; \ - movzx %h(a6),%a7; \ - shr $16,%a6; \ - xor a5+tlen(,%a7,4),%a2; \ - movzx %l(a6),%a7; \ - movzx %h(a6),%a6; \ - xor a5+2*tlen(,%a7,4),%a3; \ - xor a5+3*tlen(,%a6,4),%a4; +// idx input register for the round (destroyed) +// tmp scratch register for the round +// sched key schedule + +#define do_col(table, a1,a2,a3,a4, idx, tmp) \ + movzx %l(idx),%tmp; \ + xor table(,%tmp,4),%a1; \ + movzx %h(idx),%tmp; \ + shr $16,%idx; \ + xor table+tlen(,%tmp,4),%a2; \ + movzx %l(idx),%tmp; \ + movzx %h(idx),%idx; \ + xor table+2*tlen(,%tmp,4),%a3; \ + xor table+3*tlen(,%idx,4),%a4; // initialise output registers from the key schedule - -#define do_fcol(a1, a2, a3, a4, a5, a6, a7, a8) \ - mov 0 a8,%a1; \ - movzx %l(a6),%a7; \ - mov 12 a8,%a2; \ - xor a5(,%a7,4),%a1; \ - mov 4 a8,%a4; \ - movzx %h(a6),%a7; \ - shr $16,%a6; \ - xor a5+tlen(,%a7,4),%a2; \ - movzx %l(a6),%a7; \ - movzx %h(a6),%a6; \ - xor a5+3*tlen(,%a6,4),%a4; \ - mov %a3,%a6; \ - mov 8 a8,%a3; \ - xor a5+2*tlen(,%a7,4),%a3; +// NB1: original value of a3 is in idx on exit +// NB2: original values of a1,a2,a4 aren't used +#define do_fcol(table, a1,a2,a3,a4, idx, tmp, sched) \ + mov 0 sched,%a1; \ + movzx %l(idx),%tmp; \ + mov 12 sched,%a2; \ + xor table(,%tmp,4),%a1; \ + mov 4 sched,%a4; \ + movzx %h(idx),%tmp; \ + shr $16,%idx; \ + xor table+tlen(,%tmp,4),%a2; \ + movzx %l(idx),%tmp; \ + movzx %h(idx),%idx; \ + xor table+3*tlen(,%idx,4),%a4; \ + mov %a3,%idx; \ + mov 8 sched,%a3; \ + xor table+2*tlen(,%tmp,4),%a3; // initialise output registers from the key schedule - -#define do_icol(a1, a2, a3, a4, a5, a6, a7, a8) \ - mov 0 a8,%a1; \ - movzx %l(a6),%a7; \ - mov 4 a8,%a2; \ - xor a5(,%a7,4),%a1; \ - mov 12 a8,%a4; \ - movzx %h(a6),%a7; \ - shr $16,%a6; \ - xor a5+tlen(,%a7,4),%a2; \ - movzx %l(a6),%a7; \ - movzx %h(a6),%a6; \ - xor a5+3*tlen(,%a6,4),%a4; \ - mov %a3,%a6; \ - mov 8 a8,%a3; \ - xor a5+2*tlen(,%a7,4),%a3; +// NB1: original value of a3 is in idx on exit +// NB2: original values of a1,a2,a4 aren't used +#define do_icol(table, a1,a2,a3,a4, idx, tmp, sched) \ + mov 0 sched,%a1; \ + movzx %l(idx),%tmp; \ + mov 4 sched,%a2; \ + xor table(,%tmp,4),%a1; \ + mov 12 sched,%a4; \ + movzx %h(idx),%tmp; \ + shr $16,%idx; \ + xor table+tlen(,%tmp,4),%a2; \ + movzx %l(idx),%tmp; \ + movzx %h(idx),%idx; \ + xor table+3*tlen(,%idx,4),%a4; \ + mov %a3,%idx; \ + mov 8 sched,%a3; \ + xor table+2*tlen(,%tmp,4),%a3; // original Gladman had conditional saves to MMX regs. @@ -147,44 +149,75 @@ #define restore(a1, a2) \ mov 4*a2(%esp),%a1 -// This macro performs a forward encryption cycle. It is entered with -// the first previous round column values in r0, r1, r4 and r5 and -// exits with the final values in the same registers, using the MMX -// registers mm0-mm1 or the stack for temporary storage - -// mov current column values into the MMX registers -#define fwd_rnd(arg, table) \ - /* mov current column values into the MMX registers */ \ - mov %r0,%r2; \ - save (0,r1); \ - save (1,r5); \ - \ - /* compute new column values */ \ - do_fcol(r0,r5,r4,r1,table, r2,r3, arg); \ - do_col (r4,r1,r0,r5,table, r2,r3); \ - restore(r2,0); \ - do_col (r1,r0,r5,r4,table, r2,r3); \ - restore(r2,1); \ - do_col (r5,r4,r1,r0,table, r2,r3); - -// This macro performs an inverse encryption cycle. It is entered with -// the first previous round column values in r0, r1, r4 and r5 and -// exits with the final values in the same registers, using the MMX -// registers mm0-mm1 or the stack for temporary storage - -#define inv_rnd(arg, table) \ - /* mov current column values into the MMX registers */ \ - mov %r0,%r2; \ - save (0,r1); \ - save (1,r5); \ - \ - /* compute new column values */ \ - do_icol(r0,r1,r4,r5, table, r2,r3, arg); \ - do_col (r4,r5,r0,r1, table, r2,r3); \ - restore(r2,0); \ - do_col (r1,r4,r5,r0, table, r2,r3); \ - restore(r2,1); \ - do_col (r5,r0,r1,r4, table, r2,r3); +// These macros perform a forward encryption cycle. They are entered with +// the first previous round column values in r0,r1,r4,r5 and +// exit with the final values in the same registers, using stack +// for temporary storage. + +// round column values +// on entry: r0,r1,r4,r5 +// on exit: r2,r1,r4,r5 +#define fwd_rnd1(arg, table) \ + save (0,r1); \ + save (1,r5); \ + \ + /* compute new column values */ \ + do_fcol(table, r2,r5,r4,r1, r0,r3, arg); /* idx=r0 */ \ + do_col (table, r4,r1,r2,r5, r0,r3); /* idx=r4 */ \ + restore(r0,0); \ + do_col (table, r1,r2,r5,r4, r0,r3); /* idx=r1 */ \ + restore(r0,1); \ + do_col (table, r5,r4,r1,r2, r0,r3); /* idx=r5 */ + +// round column values +// on entry: r2,r1,r4,r5 +// on exit: r0,r1,r4,r5 +#define fwd_rnd2(arg, table) \ + save (0,r1); \ + save (1,r5); \ + \ + /* compute new column values */ \ + do_fcol(table, r0,r5,r4,r1, r2,r3, arg); /* idx=r2 */ \ + do_col (table, r4,r1,r0,r5, r2,r3); /* idx=r4 */ \ + restore(r2,0); \ + do_col (table, r1,r0,r5,r4, r2,r3); /* idx=r1 */ \ + restore(r2,1); \ + do_col (table, r5,r4,r1,r0, r2,r3); /* idx=r5 */ + +// These macros performs an inverse encryption cycle. They are entered with +// the first previous round column values in r0,r1,r4,r5 and +// exit with the final values in the same registers, using stack +// for temporary storage + +// round column values +// on entry: r0,r1,r4,r5 +// on exit: r2,r1,r4,r5 +#define inv_rnd1(arg, table) \ + save (0,r1); \ + save (1,r5); \ + \ + /* compute new column values */ \ + do_icol(table, r2,r1,r4,r5, r0,r3, arg); /* idx=r0 */ \ + do_col (table, r4,r5,r2,r1, r0,r3); /* idx=r4 */ \ + restore(r0,0); \ + do_col (table, r1,r4,r5,r2, r0,r3); /* idx=r1 */ \ + restore(r0,1); \ + do_col (table, r5,r2,r1,r4, r0,r3); /* idx=r5 */ + +// round column values +// on entry: r2,r1,r4,r5 +// on exit: r0,r1,r4,r5 +#define inv_rnd2(arg, table) \ + save (0,r1); \ + save (1,r5); \ + \ + /* compute new column values */ \ + do_icol(table, r0,r1,r4,r5, r2,r3, arg); /* idx=r2 */ \ + do_col (table, r4,r5,r0,r1, r2,r3); /* idx=r4 */ \ + restore(r2,0); \ + do_col (table, r1,r4,r5,r0, r2,r3); /* idx=r1 */ \ + restore(r2,1); \ + do_col (table, r5,r0,r1,r4, r2,r3); /* idx=r5 */ // AES (Rijndael) Encryption Subroutine @@ -198,7 +231,6 @@ aes_enc_blk: push %ebp mov ctx(%esp),%ebp // pointer to context - xor %eax,%eax // CAUTION: the order and the values used in these assigns // rely on the register mappings @@ -208,7 +240,9 @@ push %esi mov nrnd(%ebp),%r3 // number of rounds push %edi - lea ekey(%ebp),%r6 // key pointer +#if ekey != 0 + lea ekey(%ebp),%ebp // key pointer +#endif // input four columns and xor in first round key @@ -216,47 +250,47 @@ mov 4(%r2),%r1 mov 8(%r2),%r4 mov 12(%r2),%r5 - xor (%r6),%r0 - xor 4(%r6),%r1 - xor 8(%r6),%r4 - xor 12(%r6),%r5 + xor (%ebp),%r0 + xor 4(%ebp),%r1 + xor 8(%ebp),%r4 + xor 12(%ebp),%r5 sub $8,%esp // space for register saves on stack - add $16,%r6 // increment to next round key + add $16,%ebp // increment to next round key sub $10,%r3 je 4f // 10 rounds for 128-bit key - add $32,%r6 + add $32,%ebp sub $2,%r3 je 3f // 12 rounds for 128-bit key - add $32,%r6 + add $32,%ebp -2: fwd_rnd( -64(%r6) ,ft_tab) // 14 rounds for 128-bit key - fwd_rnd( -48(%r6) ,ft_tab) -3: fwd_rnd( -32(%r6) ,ft_tab) // 12 rounds for 128-bit key - fwd_rnd( -16(%r6) ,ft_tab) -4: fwd_rnd( (%r6) ,ft_tab) // 10 rounds for 128-bit key - fwd_rnd( +16(%r6) ,ft_tab) - fwd_rnd( +32(%r6) ,ft_tab) - fwd_rnd( +48(%r6) ,ft_tab) - fwd_rnd( +64(%r6) ,ft_tab) - fwd_rnd( +80(%r6) ,ft_tab) - fwd_rnd( +96(%r6) ,ft_tab) - fwd_rnd(+112(%r6) ,ft_tab) - fwd_rnd(+128(%r6) ,ft_tab) - fwd_rnd(+144(%r6) ,fl_tab) // last round uses a different table +2: fwd_rnd1( -64(%ebp) ,ft_tab) // 14 rounds for 128-bit key + fwd_rnd2( -48(%ebp) ,ft_tab) +3: fwd_rnd1( -32(%ebp) ,ft_tab) // 12 rounds for 128-bit key + fwd_rnd2( -16(%ebp) ,ft_tab) +4: fwd_rnd1( (%ebp) ,ft_tab) // 10 rounds for 128-bit key + fwd_rnd2( +16(%ebp) ,ft_tab) + fwd_rnd1( +32(%ebp) ,ft_tab) + fwd_rnd2( +48(%ebp) ,ft_tab) + fwd_rnd1( +64(%ebp) ,ft_tab) + fwd_rnd2( +80(%ebp) ,ft_tab) + fwd_rnd1( +96(%ebp) ,ft_tab) + fwd_rnd2(+112(%ebp) ,ft_tab) + fwd_rnd1(+128(%ebp) ,ft_tab) + fwd_rnd2(+144(%ebp) ,fl_tab) // last round uses a different table // move final values to the output array. CAUTION: the // order of these assigns rely on the register mappings add $8,%esp - mov out_blk+12(%esp),%r6 - mov %r5,12(%r6) + mov out_blk+12(%esp),%ebp + mov %r5,12(%ebp) pop %edi - mov %r4,8(%r6) + mov %r4,8(%ebp) pop %esi - mov %r1,4(%r6) + mov %r1,4(%ebp) pop %ebx - mov %r0,(%r6) + mov %r0,(%ebp) pop %ebp mov $1,%eax ret @@ -273,7 +307,6 @@ aes_dec_blk: push %ebp mov ctx(%esp),%ebp // pointer to context - xor %eax,%eax // CAUTION: the order and the values used in these assigns // rely on the register mappings @@ -283,10 +316,12 @@ push %esi mov nrnd(%ebp),%r3 // number of rounds push %edi - lea dkey(%ebp),%r6 // key pointer +#if dkey != 0 + lea dkey(%ebp),%ebp // key pointer +#endif mov %r3,%r0 shl $4,%r0 - add %r0,%r6 + add %r0,%ebp // input four columns and xor in first round key @@ -294,47 +329,47 @@ mov 4(%r2),%r1 mov 8(%r2),%r4 mov 12(%r2),%r5 - xor (%r6),%r0 - xor 4(%r6),%r1 - xor 8(%r6),%r4 - xor 12(%r6),%r5 + xor (%ebp),%r0 + xor 4(%ebp),%r1 + xor 8(%ebp),%r4 + xor 12(%ebp),%r5 - sub $8,%esp // space for register saves on stack - sub $16,%r6 // increment to next round key + sub $8,%esp // space for register saves on stack + sub $16,%ebp // increment to next round key sub $10,%r3 je 4f // 10 rounds for 128-bit key - sub $32,%r6 + sub $32,%ebp sub $2,%r3 je 3f // 12 rounds for 128-bit key - sub $32,%r6 + sub $32,%ebp -2: inv_rnd( +64(%r6), it_tab) // 14 rounds for 128-bit key - inv_rnd( +48(%r6), it_tab) -3: inv_rnd( +32(%r6), it_tab) // 12 rounds for 128-bit key - inv_rnd( +16(%r6), it_tab) -4: inv_rnd( (%r6), it_tab) // 10 rounds for 128-bit key - inv_rnd( -16(%r6), it_tab) - inv_rnd( -32(%r6), it_tab) - inv_rnd( -48(%r6), it_tab) - inv_rnd( -64(%r6), it_tab) - inv_rnd( -80(%r6), it_tab) - inv_rnd( -96(%r6), it_tab) - inv_rnd(-112(%r6), it_tab) - inv_rnd(-128(%r6), it_tab) - inv_rnd(-144(%r6), il_tab) // last round uses a different table +2: inv_rnd1( +64(%ebp), it_tab) // 14 rounds for 128-bit key + inv_rnd2( +48(%ebp), it_tab) +3: inv_rnd1( +32(%ebp), it_tab) // 12 rounds for 128-bit key + inv_rnd2( +16(%ebp), it_tab) +4: inv_rnd1( (%ebp), it_tab) // 10 rounds for 128-bit key + inv_rnd2( -16(%ebp), it_tab) + inv_rnd1( -32(%ebp), it_tab) + inv_rnd2( -48(%ebp), it_tab) + inv_rnd1( -64(%ebp), it_tab) + inv_rnd2( -80(%ebp), it_tab) + inv_rnd1( -96(%ebp), it_tab) + inv_rnd2(-112(%ebp), it_tab) + inv_rnd1(-128(%ebp), it_tab) + inv_rnd2(-144(%ebp), il_tab) // last round uses a different table // move final values to the output array. CAUTION: the // order of these assigns rely on the register mappings add $8,%esp - mov out_blk+12(%esp),%r6 - mov %r5,12(%r6) + mov out_blk+12(%esp),%ebp + mov %r5,12(%ebp) pop %edi - mov %r4,8(%r6) + mov %r4,8(%ebp) pop %esi - mov %r1,4(%r6) + mov %r1,4(%ebp) pop %ebx - mov %r0,(%r6) + mov %r0,(%ebp) pop %ebp mov $1,%eax ret diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile --- a/arch/i386/kernel/Makefile 2004-11-10 17:19:03 -08:00 +++ b/arch/i386/kernel/Makefile 2004-11-10 17:19:03 -08:00 @@ -5,9 +5,9 @@ extra-y := head.o init_task.o vmlinux.lds obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \ - ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \ + ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ - doublefault.o + doublefault.o quirks.o obj-y += cpu/ obj-y += timers/ diff -Nru a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c --- a/arch/i386/kernel/acpi/boot.c 2004-11-10 17:19:06 -08:00 +++ b/arch/i386/kernel/acpi/boot.c 2004-11-10 17:19:06 -08:00 @@ -40,7 +40,7 @@ #ifdef CONFIG_X86_64 static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id) { } -static inline void clustered_apic_check(void) { } +extern void __init clustered_apic_check(void); static inline int ioapic_setup_disabled(void) { return 0; } #include @@ -457,16 +457,10 @@ * Make sure all (legacy) PCI IRQs are set as level-triggered. */ if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { - static u16 irq_mask; extern void eisa_set_level_irq(unsigned int irq); - if (edge_level == ACPI_LEVEL_SENSITIVE) { - if ((gsi < 16) && !((1 << gsi) & irq_mask)) { - Dprintk(KERN_DEBUG PREFIX "Setting GSI %u as level-triggered\n", gsi); - irq_mask |= (1 << gsi); + if (edge_level == ACPI_LEVEL_SENSITIVE) eisa_set_level_irq(gsi); - } - } } #endif diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c --- a/arch/i386/kernel/apic.c 2004-11-10 17:19:07 -08:00 +++ b/arch/i386/kernel/apic.c 2004-11-10 17:19:07 -08:00 @@ -300,6 +300,10 @@ void __init sync_Arb_IDs(void) { + /* Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 */ + unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR)); + if (ver >= 0x14) /* P4 or higher */ + return; /* * Wait for idle. */ @@ -685,7 +689,7 @@ u32 h, l, features; extern void get_cpu_vendor(struct cpuinfo_x86*); - /* Disabled by DMI scan or kernel option? */ + /* Disabled by kernel option? */ if (enable_local_apic < 0) return -1; @@ -699,8 +703,7 @@ break; goto no_apic; case X86_VENDOR_INTEL: - if (boot_cpu_data.x86 == 6 || - (boot_cpu_data.x86 == 15 && (cpu_has_apic || enable_local_apic > 0)) || + if (boot_cpu_data.x86 == 6 || boot_cpu_data.x86 == 15 || (boot_cpu_data.x86 == 5 && cpu_has_apic)) break; goto no_apic; @@ -710,15 +713,20 @@ if (!cpu_has_apic) { /* - * Over-ride BIOS and try to enable LAPIC - * only if "lapic" specified + * Over-ride BIOS and try to enable the local + * APIC only if "lapic" specified. */ - if (enable_local_apic != 1) - goto no_apic; + if (enable_local_apic <= 0) { + apic_printk(APIC_VERBOSE, + "Local APIC disabled by BIOS -- " + "you can enable it with \"lapic\"\n"); + return -1; + } /* * Some BIOSes disable the local APIC in the * APIC_BASE MSR. This can only be done in - * software for Intel P6 and AMD K7 (Model > 1). + * software for Intel P6 or later and AMD K7 + * (Model > 1) or later. */ rdmsr(MSR_IA32_APICBASE, l, h); if (!(l & MSR_IA32_APICBASE_ENABLE)) { diff -Nru a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c --- a/arch/i386/kernel/apm.c 2004-11-10 17:19:02 -08:00 +++ b/arch/i386/kernel/apm.c 2004-11-10 17:19:02 -08:00 @@ -2393,27 +2393,27 @@ MODULE_AUTHOR("Stephen Rothwell"); MODULE_DESCRIPTION("Advanced Power Management"); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +module_param(debug, bool, 0644); MODULE_PARM_DESC(debug, "Enable debug mode"); -MODULE_PARM(power_off, "i"); +module_param(power_off, bool, 0444); MODULE_PARM_DESC(power_off, "Enable power off"); -MODULE_PARM(bounce_interval, "i"); +module_param(bounce_interval, int, 0444); MODULE_PARM_DESC(bounce_interval, "Set the number of ticks to ignore suspend bounces"); -MODULE_PARM(allow_ints, "i"); +module_param(allow_ints, bool, 0444); MODULE_PARM_DESC(allow_ints, "Allow interrupts during BIOS calls"); -MODULE_PARM(broken_psr, "i"); +module_param(broken_psr, bool, 0444); MODULE_PARM_DESC(broken_psr, "BIOS has a broken GetPowerStatus call"); -MODULE_PARM(realmode_power_off, "i"); +module_param(realmode_power_off, bool, 0444); MODULE_PARM_DESC(realmode_power_off, "Switch to real mode before powering off"); -MODULE_PARM(idle_threshold, "i"); +module_param(idle_threshold, int, 0444); MODULE_PARM_DESC(idle_threshold, "System idle percentage above which to make APM BIOS idle calls"); -MODULE_PARM(idle_period, "i"); +module_param(idle_period, int, 0444); MODULE_PARM_DESC(idle_period, "Period (in sec/100) over which to caculate the idle percentage"); -MODULE_PARM(smp, "i"); +module_param(smp, bool, 0444); MODULE_PARM_DESC(smp, "Set this to enable APM use on an SMP platform. Use with caution on older systems"); MODULE_ALIAS_MISCDEV(APM_MINOR_DEV); diff -Nru a/arch/i386/kernel/cpu/cpufreq/acpi.c b/arch/i386/kernel/cpu/cpufreq/acpi.c --- a/arch/i386/kernel/cpu/cpufreq/acpi.c 2004-11-10 17:19:02 -08:00 +++ b/arch/i386/kernel/cpu/cpufreq/acpi.c 2004-11-10 17:19:02 -08:00 @@ -428,7 +428,9 @@ if (result) { goto err_freqfree; } - + + /* notify BIOS that we exist */ + acpi_processor_notify_smm(THIS_MODULE); printk(KERN_INFO "cpufreq: CPU%u - ACPI performance management activated.\n", cpu); diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c --- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c 2004-11-10 17:19:02 -08:00 +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c 2004-11-10 17:19:02 -08:00 @@ -400,6 +400,9 @@ powernow_table[i].frequency = CPUFREQ_TABLE_END; powernow_table[i].index = 0; + /* notify BIOS that we exist */ + acpi_processor_notify_smm(THIS_MODULE); + return 0; err2: diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2004-11-10 17:19:05 -08:00 +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2004-11-10 17:19:05 -08:00 @@ -777,6 +777,10 @@ data->numps = data->acpi_data.state_count; print_basics(data); powernow_k8_acpi_pst_values(data, 0); + + /* notify BIOS that we exist */ + acpi_processor_notify_smm(THIS_MODULE); + return 0; err_out_mem: diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c 2004-11-10 17:19:04 -08:00 +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c 2004-11-10 17:19:04 -08:00 @@ -428,6 +428,9 @@ centrino_model->op_points[i].frequency = CPUFREQ_ENTRY_INVALID; } + /* notify BIOS that we exist */ + acpi_processor_notify_smm(THIS_MODULE); + return 0; err_kfree_all: diff -Nru a/arch/i386/kernel/cpu/mcheck/p4.c b/arch/i386/kernel/cpu/mcheck/p4.c --- a/arch/i386/kernel/cpu/mcheck/p4.c 2004-11-10 17:19:05 -08:00 +++ b/arch/i386/kernel/cpu/mcheck/p4.c 2004-11-10 17:19:05 -08:00 @@ -70,10 +70,10 @@ /* Thermal interrupt handler for this CPU setup */ static void (*vendor_thermal_interrupt)(struct pt_regs *regs) = unexpected_thermal_interrupt; -asmlinkage void smp_thermal_interrupt(struct pt_regs regs) +fastcall void smp_thermal_interrupt(struct pt_regs *regs) { irq_enter(); - vendor_thermal_interrupt(®s); + vendor_thermal_interrupt(regs); irq_exit(); } diff -Nru a/arch/i386/kernel/cpu/proc.c b/arch/i386/kernel/cpu/proc.c --- a/arch/i386/kernel/cpu/proc.c 2004-11-10 17:19:06 -08:00 +++ b/arch/i386/kernel/cpu/proc.c 2004-11-10 17:19:06 -08:00 @@ -25,7 +25,7 @@ "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", "pbe", /* AMD-defined */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "pni", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "mp", "nx", NULL, "mmxext", NULL, NULL, NULL, NULL, NULL, NULL, "lm", "3dnowext", "3dnow", diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c --- a/arch/i386/kernel/dmi_scan.c 2004-11-10 17:19:04 -08:00 +++ b/arch/i386/kernel/dmi_scan.c 2004-11-10 17:19:04 -08:00 @@ -308,21 +308,6 @@ MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"), NO_MATCH, NO_MATCH }}, - { force_acpi_ht, "Compaq ProLiant DL380 G2", { - MATCH(DMI_SYS_VENDOR, "Compaq"), - MATCH(DMI_PRODUCT_NAME, "ProLiant DL380 G2"), - NO_MATCH, NO_MATCH }}, - - { force_acpi_ht, "Compaq ProLiant ML530 G2", { - MATCH(DMI_SYS_VENDOR, "Compaq"), - MATCH(DMI_PRODUCT_NAME, "ProLiant ML530 G2"), - NO_MATCH, NO_MATCH }}, - - { force_acpi_ht, "Compaq ProLiant ML350 G3", { - MATCH(DMI_SYS_VENDOR, "Compaq"), - MATCH(DMI_PRODUCT_NAME, "ProLiant ML350 G3"), - NO_MATCH, NO_MATCH }}, - { force_acpi_ht, "Compaq Workstation W8000", { MATCH(DMI_SYS_VENDOR, "Compaq"), MATCH(DMI_PRODUCT_NAME, "Workstation W8000"), diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S --- a/arch/i386/kernel/entry.S 2004-11-10 17:19:03 -08:00 +++ b/arch/i386/kernel/entry.S 2004-11-10 17:19:03 -08:00 @@ -131,7 +131,7 @@ movl $(__USER_DS), %edx; \ movl %edx, %ds; \ movl %edx, %es; \ - pushl $11; \ + movl $11,%eax; \ call do_exit; \ .previous; \ .section __ex_table,"a";\ @@ -187,8 +187,8 @@ movl $PREEMPT_ACTIVE,TI_preempt_count(%ebp) sti call schedule - movl $0,TI_preempt_count(%ebp) cli + movl $0,TI_preempt_count(%ebp) jmp need_resched #endif @@ -291,8 +291,8 @@ ALIGN work_notifysig_v86: - pushl %ecx - call save_v86_state + pushl %ecx # save ti_flags for do_notify_resume + call save_v86_state # %eax contains pt_regs pointer popl %ecx movl %eax, %esp xorl %edx, %edx @@ -359,6 +359,7 @@ ALIGN common_interrupt: SAVE_ALL + movl %esp,%eax call do_IRQ jmp ret_from_intr @@ -366,7 +367,8 @@ ENTRY(name) \ pushl $nr-256; \ SAVE_ALL \ - call smp_/**/name; \ + movl %esp,%eax; \ + call smp_/**/name; \ jmp ret_from_intr; /* The include is where all of the SMP etc. interrupts come from */ @@ -389,18 +391,15 @@ pushl %ebx cld movl %es, %ecx - movl ORIG_EAX(%esp), %esi # get the error code movl ES(%esp), %edi # get the function address + movl ORIG_EAX(%esp), %edx # get the error code movl %eax, ORIG_EAX(%esp) movl %ecx, ES(%esp) - movl %esp, %edx - pushl %esi # push the error code - pushl %edx # push the pt_regs pointer - movl $(__USER_DS), %edx - movl %edx, %ds - movl %edx, %es + movl $(__USER_DS), %ecx + movl %ecx, %ds + movl %ecx, %es + movl %esp,%eax # pt_regs pointer call *%edi - addl $8, %esp jmp ret_from_exception ENTRY(coprocessor_error) @@ -457,11 +456,9 @@ debug_stack_correct: pushl $-1 # mark this as an int SAVE_ALL - movl %esp,%edx - pushl $0 - pushl %edx + xorl %edx,%edx # error code 0 + movl %esp,%eax # pt_regs pointer call do_debug - addl $8,%esp testl %eax,%eax jnz restore_all jmp ret_from_exception @@ -491,11 +488,9 @@ nmi_stack_correct: pushl %eax SAVE_ALL - movl %esp, %edx - pushl $0 - pushl %edx + xorl %edx,%edx # zero error code + movl %esp,%eax # pt_regs pointer call do_nmi - addl $8, %esp RESTORE_ALL nmi_stack_fixup: @@ -515,11 +510,9 @@ ENTRY(int3) pushl $-1 # mark this as an int SAVE_ALL - movl %esp,%edx - pushl $0 - pushl %edx + xorl %edx,%edx # zero error code + movl %esp,%eax # pt_regs pointer call do_int3 - addl $8,%esp testl %eax,%eax jnz restore_all jmp ret_from_exception @@ -867,7 +860,7 @@ .long sys_mq_getsetattr .long sys_ni_syscall /* reserved for kexec */ .long sys_waitid - .long sys_setaltroot /* 285 */ + .long sys_ni_syscall /* 285 */ /* available */ .long sys_add_key .long sys_request_key .long sys_keyctl diff -Nru a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c --- a/arch/i386/kernel/i386_ksyms.c 2004-11-10 17:19:07 -08:00 +++ b/arch/i386/kernel/i386_ksyms.c 2004-11-10 17:19:07 -08:00 @@ -71,7 +71,6 @@ #endif EXPORT_SYMBOL(dump_thread); EXPORT_SYMBOL(dump_fpu); -EXPORT_SYMBOL(dump_extended_fpu); EXPORT_SYMBOL_GPL(kernel_fpu_begin); EXPORT_SYMBOL(__ioremap); EXPORT_SYMBOL(ioremap_nocache); @@ -175,7 +174,7 @@ EXPORT_SYMBOL(register_die_notifier); #ifdef CONFIG_HAVE_DEC_LOCK -EXPORT_SYMBOL(atomic_dec_and_lock); +EXPORT_SYMBOL(_atomic_dec_and_lock); #endif EXPORT_SYMBOL(__PAGE_KERNEL); diff -Nru a/arch/i386/kernel/i387.c b/arch/i386/kernel/i387.c --- a/arch/i386/kernel/i387.c 2004-11-10 17:19:07 -08:00 +++ b/arch/i386/kernel/i387.c 2004-11-10 17:19:07 -08:00 @@ -519,21 +519,6 @@ return fpvalid; } -int dump_extended_fpu( struct pt_regs *regs, struct user_fxsr_struct *fpu ) -{ - int fpvalid; - struct task_struct *tsk = current; - - fpvalid = tsk->used_math && cpu_has_fxsr; - if ( fpvalid ) { - unlazy_fpu( tsk ); - memcpy( fpu, &tsk->thread.i387.fxsave, - sizeof(struct user_fxsr_struct) ); - } - - return fpvalid; -} - int dump_task_fpu(struct task_struct *tsk, struct user_i387_struct *fpu) { int fpvalid = tsk->used_math; diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c --- a/arch/i386/kernel/io_apic.c 2004-11-10 17:19:03 -08:00 +++ b/arch/i386/kernel/io_apic.c 2004-11-10 17:19:03 -08:00 @@ -1069,8 +1069,13 @@ while (i < apic) irq += nr_ioapic_registers[i++]; irq += pin; - if ((!apic) && (irq < 16)) - irq += 16; +#ifdef CONFIG_ACPI_BOOT + /* + * For MPS mode, so far only used by ES7000 platform + */ + if (platform_rename_gsi) + irq = platform_rename_gsi(apic, irq); +#endif break; } default: diff -Nru a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c --- a/arch/i386/kernel/irq.c 2004-11-10 17:19:02 -08:00 +++ b/arch/i386/kernel/irq.c 2004-11-10 17:19:02 -08:00 @@ -45,10 +45,10 @@ * SMP cross-CPU interrupts have their own specific * handlers). */ -asmlinkage unsigned int do_IRQ(struct pt_regs regs) +fastcall unsigned int do_IRQ(struct pt_regs *regs) { /* high bits used in ret_from_ code */ - int irq = regs.orig_eax & 0xff; + int irq = regs->orig_eax & 0xff; #ifdef CONFIG_4KSTACKS union irq_ctx *curctx, *irqctx; u32 *isp; @@ -82,24 +82,24 @@ * current stack (which is the irq stack already after all) */ if (curctx != irqctx) { + int arg1, arg2, ebx; + /* build the stack frame on the IRQ stack */ isp = (u32*) ((char*)irqctx + sizeof(*irqctx)); irqctx->tinfo.task = curctx->tinfo.task; irqctx->tinfo.previous_esp = current_stack_pointer(); - *--isp = (u32) ®s; - *--isp = (u32) irq; - asm volatile( " xchgl %%ebx,%%esp \n" " call __do_IRQ \n" - " xchgl %%ebx,%%esp \n" - : : "b"(isp) - : "memory", "cc", "eax", "edx", "ecx" + " movl %%ebx,%%esp \n" + : "=a" (arg1), "=d" (arg2), "=b" (ebx) + : "0" (irq), "1" (regs), "2" (isp) + : "memory", "cc", "ecx" ); } else #endif - __do_IRQ(irq, ®s); + __do_IRQ(irq, regs); irq_exit(); diff -Nru a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c --- a/arch/i386/kernel/kprobes.c 2004-11-10 17:19:04 -08:00 +++ b/arch/i386/kernel/kprobes.c 2004-11-10 17:19:04 -08:00 @@ -42,6 +42,7 @@ static long *jprobe_saved_esp; /* copy of the kernel stack at the probe fire time */ static kprobe_opcode_t jprobes_stack[MAX_STACK_SIZE]; +void jprobe_return_end(void); /* * returns non-zero if opcode modifies the interrupt flag. @@ -58,9 +59,14 @@ return 0; } -void arch_prepare_kprobe(struct kprobe *p) +int arch_prepare_kprobe(struct kprobe *p) +{ + memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); + return 0; +} + +void arch_remove_kprobe(struct kprobe *p) { - memcpy(p->insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); } static inline void disarm_kprobe(struct kprobe *p, struct pt_regs *regs) @@ -73,7 +79,7 @@ { regs->eflags |= TF_MASK; regs->eflags &= ~IF_MASK; - regs->eip = (unsigned long)&p->insn; + regs->eip = (unsigned long)&p->ainsn.insn; } /* @@ -153,7 +159,7 @@ * instruction. To avoid the SMP problems that can occur when we * temporarily put back the original opcode to single-step, we * single-stepped a copy of the instruction. The address of this - * copy is p->insn. + * copy is p->ainsn.insn. * * This function prepares to return from the post-single-step * interrupt. We have to fix up the stack as follows: @@ -173,10 +179,10 @@ { unsigned long *tos = (unsigned long *)®s->esp; unsigned long next_eip = 0; - unsigned long copy_eip = (unsigned long)&p->insn; + unsigned long copy_eip = (unsigned long)&p->ainsn.insn; unsigned long orig_eip = (unsigned long)p->addr; - switch (p->insn[0]) { + switch (p->ainsn.insn[0]) { case 0x9c: /* pushfl */ *tos &= ~(TF_MASK | IF_MASK); *tos |= kprobe_old_eflags; @@ -185,13 +191,13 @@ *tos = orig_eip + (*tos - copy_eip); break; case 0xff: - if ((p->insn[1] & 0x30) == 0x10) { + if ((p->ainsn.insn[1] & 0x30) == 0x10) { /* call absolute, indirect */ /* Fix return addr; eip is correct. */ next_eip = regs->eip; *tos = orig_eip + (*tos - copy_eip); - } else if (((p->insn[1] & 0x31) == 0x20) || /* jmp near, absolute indirect */ - ((p->insn[1] & 0x31) == 0x21)) { /* jmp far, absolute indirect */ + } else if (((p->ainsn.insn[1] & 0x31) == 0x20) || /* jmp near, absolute indirect */ + ((p->ainsn.insn[1] & 0x31) == 0x21)) { /* jmp far, absolute indirect */ /* eip is correct. */ next_eip = regs->eip; } @@ -315,12 +321,12 @@ { preempt_enable_no_resched(); asm volatile (" xchgl %%ebx,%%esp \n" - " int3 \n"::"b" + " int3 \n" + " .globl jprobe_return_end \n" + " jprobe_return_end: \n" + " nop \n"::"b" (jprobe_saved_esp):"memory"); } -void jprobe_return_end(void) -{ -}; int longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) { diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c --- a/arch/i386/kernel/mpparse.c 2004-11-10 17:19:03 -08:00 +++ b/arch/i386/kernel/mpparse.c 2004-11-10 17:19:03 -08:00 @@ -996,6 +996,12 @@ mp_bus_id_to_type[MP_ISA_BUS] = MP_BUS_ISA; Dprintk("Bus #%d is ISA\n", MP_ISA_BUS); + /* + * ES7000 has no legacy identity mappings + */ + if (es7000_plat) + return; + /* * Locate the IOAPIC that manages the ISA IRQs (0-15). */ diff -Nru a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c --- a/arch/i386/kernel/process.c 2004-11-10 17:19:01 -08:00 +++ b/arch/i386/kernel/process.c 2004-11-10 17:19:02 -08:00 @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -57,6 +57,9 @@ int hlt_counter; +unsigned long boot_option_idle_override = 0; +EXPORT_SYMBOL(boot_option_idle_override); + /* * Return saved PC of a blocked thread. */ @@ -214,6 +217,7 @@ pm_idle = default_idle; } + boot_option_idle_override = 1; return 1; } @@ -230,7 +234,8 @@ if (regs->xcs & 3) printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); - printk(" EFLAGS: %08lx %s (%s)\n",regs->eflags, print_tainted(),UTS_RELEASE); + printk(" EFLAGS: %08lx %s (%s)\n", + regs->eflags, print_tainted(), system_utsname.release); printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", regs->eax,regs->ebx,regs->ecx,regs->edx); printk("ESI: %08lx EDI: %08lx EBP: %08lx", diff -Nru a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c --- a/arch/i386/kernel/ptrace.c 2004-11-10 17:19:03 -08:00 +++ b/arch/i386/kernel/ptrace.c 2004-11-10 17:19:03 -08:00 @@ -344,6 +344,36 @@ if(addr < (long) &dummy->u_debugreg[4] && ((unsigned long) data) >= TASK_SIZE-3) break; + /* Sanity-check data. Take one half-byte at once with + * check = (val >> (16 + 4*i)) & 0xf. It contains the + * R/Wi and LENi bits; bits 0 and 1 are R/Wi, and bits + * 2 and 3 are LENi. Given a list of invalid values, + * we do mask |= 1 << invalid_value, so that + * (mask >> check) & 1 is a correct test for invalid + * values. + * + * R/Wi contains the type of the breakpoint / + * watchpoint, LENi contains the length of the watched + * data in the watchpoint case. + * + * The invalid values are: + * - LENi == 0x10 (undefined), so mask |= 0x0f00. + * - R/Wi == 0x10 (break on I/O reads or writes), so + * mask |= 0x4444. + * - R/Wi == 0x00 && LENi != 0x00, so we have mask |= + * 0x1110. + * + * Finally, mask = 0x0f00 | 0x4444 | 0x1110 == 0x5f54. + * + * See the Intel Manual "System Programming Guide", + * 15.2.4 + * + * Note that LENi == 0x10 is defined on x86_64 in long + * mode (i.e. even for 32-bit userspace software, but + * 64-bit kernel), so the x86_64 mask value is 0x5454. + * See the AMD manual no. 24593 (AMD64 System + * Programming)*/ + if(addr == (long) &dummy->u_debugreg[7]) { data &= ~DR_CONTROL_RESERVED; for(i=0; i<4; i++) diff -Nru a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/i386/kernel/quirks.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,49 @@ +/* + * This file contains work-arounds for x86 and x86_64 platform bugs. + */ +#include +#include + +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) + +void __init quirk_intel_irqbalance(struct pci_dev *dev) +{ + u8 config, rev; + u32 word; + + /* BIOS may enable hardware IRQ balancing for + * E7520/E7320/E7525(revision ID 0x9 and below) + * based platforms. + * Disable SW irqbalance/affinity on those platforms. + */ + pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev); + if (rev > 0x9) + return; + + printk(KERN_INFO "Intel E7520/7320/7525 detected."); + + /* enable access to config space*/ + pci_read_config_byte(dev, 0xf4, &config); + config |= 0x2; + pci_write_config_byte(dev, 0xf4, config); + + /* read xTPR register */ + raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word); + + if (!(word & (1 << 13))) { + printk(KERN_INFO "Disabling irq balancing and affinity\n"); +#ifdef CONFIG_IRQBALANCE + irqbalance_disable(""); +#endif + noirqdebug_setup(""); + no_irq_affinity = 1; + } + + config &= ~0x2; + /* disable access to config space*/ + pci_write_config_byte(dev, 0xf4, config); +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_intel_irqbalance); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_intel_irqbalance); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SMCH, quirk_intel_irqbalance); +#endif diff -Nru a/arch/i386/kernel/semaphore.c b/arch/i386/kernel/semaphore.c --- a/arch/i386/kernel/semaphore.c 2004-11-10 17:19:04 -08:00 +++ b/arch/i386/kernel/semaphore.c 2004-11-10 17:19:04 -08:00 @@ -49,12 +49,12 @@ * we cannot lose wakeup events. */ -asmlinkage void __up(struct semaphore *sem) +fastcall void __up(struct semaphore *sem) { wake_up(&sem->wait); } -asmlinkage void __sched __down(struct semaphore * sem) +fastcall void __sched __down(struct semaphore * sem) { struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); @@ -91,7 +91,7 @@ tsk->state = TASK_RUNNING; } -asmlinkage int __sched __down_interruptible(struct semaphore * sem) +fastcall int __sched __down_interruptible(struct semaphore * sem) { int retval = 0; struct task_struct *tsk = current; @@ -154,7 +154,7 @@ * single "cmpxchg" without failure cases, * but then it wouldn't work on a 386. */ -asmlinkage int __down_trylock(struct semaphore * sem) +fastcall int __down_trylock(struct semaphore * sem) { int sleepers; unsigned long flags; @@ -183,9 +183,9 @@ * need to convert that sequence back into the C sequence when * there is contention on the semaphore. * - * %ecx contains the semaphore pointer on entry. Save the C-clobbered - * registers (%eax, %edx and %ecx) except %eax when used as a return - * value.. + * %eax contains the semaphore pointer on entry. Save the C-clobbered + * registers (%eax, %edx and %ecx) except %eax whish is either a return + * value or just clobbered.. */ asm( ".section .sched.text\n" @@ -196,13 +196,11 @@ "pushl %ebp\n\t" "movl %esp,%ebp\n\t" #endif - "pushl %eax\n\t" "pushl %edx\n\t" "pushl %ecx\n\t" "call __down\n\t" "popl %ecx\n\t" "popl %edx\n\t" - "popl %eax\n\t" #if defined(CONFIG_FRAME_POINTER) "movl %ebp,%esp\n\t" "popl %ebp\n\t" @@ -257,13 +255,11 @@ ".align 4\n" ".globl __up_wakeup\n" "__up_wakeup:\n\t" - "pushl %eax\n\t" "pushl %edx\n\t" "pushl %ecx\n\t" "call __up\n\t" "popl %ecx\n\t" "popl %edx\n\t" - "popl %eax\n\t" "ret" ); diff -Nru a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c --- a/arch/i386/kernel/signal.c 2004-11-10 17:19:04 -08:00 +++ b/arch/i386/kernel/signal.c 2004-11-10 17:19:04 -08:00 @@ -600,7 +600,9 @@ * have been cleared if the watchpoint triggered * inside the kernel. */ - __asm__("movl %0,%%db7" : : "r" (current->thread.debugreg[7])); + if (unlikely(current->thread.debugreg[7])) { + __asm__("movl %0,%%db7" : : "r" (current->thread.debugreg[7])); + } /* Whee! Actually deliver the signal. */ handle_signal(signr, &info, &ka, oldset, regs); diff -Nru a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c --- a/arch/i386/kernel/time.c 2004-11-10 17:19:04 -08:00 +++ b/arch/i386/kernel/time.c 2004-11-10 17:19:04 -08:00 @@ -321,7 +321,7 @@ static long clock_cmos_diff, sleep_start; -static int time_suspend(struct sys_device *dev, u32 state) +static int timer_suspend(struct sys_device *dev, u32 state) { /* * Estimate time zone so that set_time can update the clock @@ -332,12 +332,18 @@ return 0; } -static int time_resume(struct sys_device *dev) +static int timer_resume(struct sys_device *dev) { unsigned long flags; - unsigned long sec = get_cmos_time() + clock_cmos_diff; - unsigned long sleep_length = get_cmos_time() - sleep_start; + unsigned long sec; + unsigned long sleep_length; +#ifdef CONFIG_HPET_TIMER + if (is_hpet_enabled()) + hpet_reenable(); +#endif + sec = get_cmos_time() + clock_cmos_diff; + sleep_length = get_cmos_time() - sleep_start; write_seqlock_irqsave(&xtime_lock, flags); xtime.tv_sec = sec; xtime.tv_nsec = 0; @@ -346,24 +352,24 @@ return 0; } -static struct sysdev_class pit_sysclass = { - .resume = time_resume, - .suspend = time_suspend, - set_kset_name("pit"), +static struct sysdev_class timer_sysclass = { + .resume = timer_resume, + .suspend = timer_suspend, + set_kset_name("timer"), }; /* XXX this driverfs stuff should probably go elsewhere later -john */ -static struct sys_device device_i8253 = { +static struct sys_device device_timer = { .id = 0, - .cls = &pit_sysclass, + .cls = &timer_sysclass, }; static int time_init_device(void) { - int error = sysdev_class_register(&pit_sysclass); + int error = sysdev_class_register(&timer_sysclass); if (!error) - error = sysdev_register(&device_i8253); + error = sysdev_register(&device_timer); return error; } diff -Nru a/arch/i386/kernel/time_hpet.c b/arch/i386/kernel/time_hpet.c --- a/arch/i386/kernel/time_hpet.c 2004-11-10 17:19:03 -08:00 +++ b/arch/i386/kernel/time_hpet.c 2004-11-10 17:19:03 -08:00 @@ -60,13 +60,46 @@ } #endif +static int hpet_timer_stop_set_go(unsigned long tick) +{ + unsigned int cfg; + + /* + * Stop the timers and reset the main counter. + */ + cfg = hpet_readl(HPET_CFG); + cfg &= ~HPET_CFG_ENABLE; + hpet_writel(cfg, HPET_CFG); + hpet_writel(0, HPET_COUNTER); + hpet_writel(0, HPET_COUNTER + 4); + + /* + * Set up timer 0, as periodic with first interrupt to happen at + * hpet_tick, and period also hpet_tick. + */ + cfg = hpet_readl(HPET_T0_CFG); + cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC | + HPET_TN_SETVAL | HPET_TN_32BIT; + hpet_writel(cfg, HPET_T0_CFG); + hpet_writel(tick, HPET_T0_CMP); + + /* + * Go! + */ + cfg = hpet_readl(HPET_CFG); + cfg |= HPET_CFG_ENABLE | HPET_CFG_LEGACY; + hpet_writel(cfg, HPET_CFG); + + return 0; +} + /* * Check whether HPET was found by ACPI boot parse. If yes setup HPET * counter 0 for kernel base timer. */ int __init hpet_enable(void) { - unsigned int cfg, id; + unsigned int id; unsigned long tick_fsec_low, tick_fsec_high; /* tick in femto sec */ unsigned long hpet_tick_rem; @@ -108,31 +141,8 @@ if (hpet_tick_rem > (hpet_period >> 1)) hpet_tick++; /* rounding the result */ - /* - * Stop the timers and reset the main counter. - */ - cfg = hpet_readl(HPET_CFG); - cfg &= ~HPET_CFG_ENABLE; - hpet_writel(cfg, HPET_CFG); - hpet_writel(0, HPET_COUNTER); - hpet_writel(0, HPET_COUNTER + 4); - - /* - * Set up timer 0, as periodic with first interrupt to happen at - * hpet_tick, and period also hpet_tick. - */ - cfg = hpet_readl(HPET_T0_CFG); - cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC | - HPET_TN_SETVAL | HPET_TN_32BIT; - hpet_writel(cfg, HPET_T0_CFG); - hpet_writel(hpet_tick, HPET_T0_CMP); - - /* - * Go! - */ - cfg = hpet_readl(HPET_CFG); - cfg |= HPET_CFG_ENABLE | HPET_CFG_LEGACY; - hpet_writel(cfg, HPET_CFG); + if (hpet_timer_stop_set_go(hpet_tick)) + return -1; use_hpet = 1; @@ -151,6 +161,7 @@ * Register with driver. * Timer0 and Timer1 is used by platform. */ + hd.hd_phys_address = hpet_address; hd.hd_address = hpet_virt_address; hd.hd_nirqs = ntimer; hd.hd_flags = HPET_DATA_PLATFORM; @@ -183,6 +194,11 @@ wait_timer_tick = wait_hpet_tick; #endif return 0; +} + +int hpet_reenable(void) +{ + return hpet_timer_stop_set_go(hpet_tick); } int is_hpet_enabled(void) diff -Nru a/arch/i386/kernel/timers/timer_pit.c b/arch/i386/kernel/timers/timer_pit.c --- a/arch/i386/kernel/timers/timer_pit.c 2004-11-10 17:19:06 -08:00 +++ b/arch/i386/kernel/timers/timer_pit.c 2004-11-10 17:19:06 -08:00 @@ -181,7 +181,7 @@ } static struct sysdev_class timer_sysclass = { - set_kset_name("timer"), + set_kset_name("timer_pit"), .resume = timer_resume, }; diff -Nru a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c --- a/arch/i386/kernel/traps.c 2004-11-10 17:19:03 -08:00 +++ b/arch/i386/kernel/traps.c 2004-11-10 17:19:03 -08:00 @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #ifdef CONFIG_EISA @@ -218,7 +218,7 @@ printk("CPU: %d\nEIP: %04x:[<%08lx>] %s VLI\nEFLAGS: %08lx" " (%s) \n", smp_processor_id(), 0xffff & regs->xcs, regs->eip, - print_tainted(), regs->eflags, UTS_RELEASE); + print_tainted(), regs->eflags, system_utsname.release); print_symbol("EIP is at %s\n", regs->eip); printk("eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", regs->eax, regs->ebx, regs->ecx, regs->edx); @@ -404,7 +404,7 @@ } #define DO_ERROR(trapnr, signr, str, name) \ -asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ +fastcall void do_##name(struct pt_regs * regs, long error_code) \ { \ if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ == NOTIFY_STOP) \ @@ -413,7 +413,7 @@ } #define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \ -asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ +fastcall void do_##name(struct pt_regs * regs, long error_code) \ { \ siginfo_t info; \ info.si_signo = signr; \ @@ -427,7 +427,7 @@ } #define DO_VM86_ERROR(trapnr, signr, str, name) \ -asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ +fastcall void do_##name(struct pt_regs * regs, long error_code) \ { \ if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ == NOTIFY_STOP) \ @@ -436,7 +436,7 @@ } #define DO_VM86_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \ -asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ +fastcall void do_##name(struct pt_regs * regs, long error_code) \ { \ siginfo_t info; \ info.si_signo = signr; \ @@ -462,7 +462,7 @@ DO_ERROR(12, SIGBUS, "stack segment", stack_segment) DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0) -asmlinkage void do_general_protection(struct pt_regs * regs, long error_code) +fastcall void do_general_protection(struct pt_regs * regs, long error_code) { int cpu = get_cpu(); struct tss_struct *tss = &per_cpu(init_tss, cpu); @@ -583,7 +583,11 @@ static void default_do_nmi(struct pt_regs * regs) { - unsigned char reason = get_nmi_reason(); + unsigned char reason = 0; + + /* Only the BSP gets external NMIs from the system. */ + if (!smp_processor_id()) + reason = get_nmi_reason(); if (!(reason & 0xc0)) { if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT) @@ -622,7 +626,7 @@ static nmi_callback_t nmi_callback = dummy_nmi_callback; -asmlinkage void do_nmi(struct pt_regs * regs, long error_code) +fastcall void do_nmi(struct pt_regs * regs, long error_code) { int cpu; @@ -648,7 +652,7 @@ } #ifdef CONFIG_KPROBES -asmlinkage int do_int3(struct pt_regs *regs, long error_code) +fastcall int do_int3(struct pt_regs *regs, long error_code) { if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) == NOTIFY_STOP) @@ -683,7 +687,7 @@ * find every occurrence of the TF bit that could be saved away even * by user code) */ -asmlinkage void do_debug(struct pt_regs * regs, long error_code) +fastcall void do_debug(struct pt_regs * regs, long error_code) { unsigned int condition; struct task_struct *tsk = current; @@ -822,7 +826,7 @@ force_sig_info(SIGFPE, &info, task); } -asmlinkage void do_coprocessor_error(struct pt_regs * regs, long error_code) +fastcall void do_coprocessor_error(struct pt_regs * regs, long error_code) { ignore_fpu_irq = 1; math_error((void __user *)regs->eip); @@ -876,7 +880,7 @@ force_sig_info(SIGFPE, &info, task); } -asmlinkage void do_simd_coprocessor_error(struct pt_regs * regs, +fastcall void do_simd_coprocessor_error(struct pt_regs * regs, long error_code) { if (cpu_has_xmm) { @@ -900,7 +904,7 @@ } } -asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs, +fastcall void do_spurious_interrupt_bug(struct pt_regs * regs, long error_code) { #if 0 diff -Nru a/arch/i386/kernel/vsyscall-sysenter.S b/arch/i386/kernel/vsyscall-sysenter.S --- a/arch/i386/kernel/vsyscall-sysenter.S 2004-11-10 17:19:04 -08:00 +++ b/arch/i386/kernel/vsyscall-sysenter.S 2004-11-10 17:19:04 -08:00 @@ -84,7 +84,7 @@ .byte 0x04 /* DW_CFA_advance_loc4 */ .long .Lpop_ebp-.Lenter_kernel .byte 0x0e /* DW_CFA_def_cfa_offset */ - .byte 0x12 /* RA at offset 12 now */ + .byte 0x0c /* RA at offset 12 now */ .byte 0xc5 /* DW_CFA_restore %ebp */ .byte 0x04 /* DW_CFA_advance_loc4 */ .long .Lpop_edx-.Lpop_ebp diff -Nru a/arch/i386/lib/dec_and_lock.c b/arch/i386/lib/dec_and_lock.c --- a/arch/i386/lib/dec_and_lock.c 2004-11-10 17:19:03 -08:00 +++ b/arch/i386/lib/dec_and_lock.c 2004-11-10 17:19:03 -08:00 @@ -10,7 +10,7 @@ #include #include -int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) +int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) { int counter; int newcount; diff -Nru a/arch/i386/mach-es7000/es7000.h b/arch/i386/mach-es7000/es7000.h --- a/arch/i386/mach-es7000/es7000.h 2004-11-10 17:19:02 -08:00 +++ b/arch/i386/mach-es7000/es7000.h 2004-11-10 17:19:02 -08:00 @@ -104,13 +104,6 @@ #define MIP_SW_APIC 0x1020b #define MIP_FUNC(VALUE) (VALUE & 0xff) -#if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_ACPI_BOOT)) -#define IOAPIC_GSI_BOUND(ioapic) ((ioapic+1) * (nr_ioapic_registers[ioapic]-1)) -#define MAX_GSI_MAPSIZE 32 -#endif - -extern unsigned long io_apic_irqs; - extern int parse_unisys_oem (char *oemptr, int oem_entries); extern int find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length); extern int es7000_start_cpu(int cpu, unsigned long eip); diff -Nru a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c --- a/arch/i386/mach-es7000/es7000plat.c 2004-11-10 17:19:06 -08:00 +++ b/arch/i386/mach-es7000/es7000plat.c 2004-11-10 17:19:06 -08:00 @@ -52,72 +52,27 @@ unsigned long mip_addr, host_addr; #if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_ACPI_BOOT)) -static unsigned long cycle_irqs = 0; -static unsigned long free_irqs = 0; -static int gsi_map[MAX_GSI_MAPSIZE] = { [0 ... MAX_GSI_MAPSIZE-1] = -1 }; /* * GSI override for ES7000 platforms. */ -static int __init -es7000_gsi_override(int ioapic, int gsi) -{ - static int newgsi = 0; - - if (gsi_map[gsi] != -1) - gsi = gsi_map[gsi]; - else if (cycle_irqs ^ free_irqs) { - newgsi = find_next_bit(&cycle_irqs, IOAPIC_GSI_BOUND(0), newgsi); - __set_bit(newgsi, &free_irqs); - gsi_map[gsi] = newgsi; - gsi = newgsi; - newgsi++; - Dprintk("es7000_gsi_override: free_irqs = 0x%lx\n", free_irqs); - } - - return gsi; -} +static unsigned int base; -static int __init +static int es7000_rename_gsi(int ioapic, int gsi) { - static int initialized = 0; - int i; - - /* - * These should NEVER be true at this point but we'd rather be - * safe than sorry. - */ - if (acpi_disabled || acpi_pci_disabled || acpi_noirq) - return gsi; - - if (ioapic) - return gsi; - - if (!initialized) { - unsigned long tmp_irqs = 0; - - for (i = 0; i < nr_ioapic_registers[0]; i++) - __set_bit(mp_irqs[i].mpc_srcbusirq, &tmp_irqs); - - cycle_irqs = (~tmp_irqs & io_apic_irqs & ((1 << IOAPIC_GSI_BOUND(0)) - 1)); - - initialized = 1; - Dprintk("es7000_rename_gsi: cycle_irqs = 0x%lx\n", cycle_irqs); - } - - for (i = 0; i < nr_ioapic_registers[0]; i++) { - if (mp_irqs[i].mpc_srcbusirq == gsi) { - if (mp_irqs[i].mpc_dstirq == gsi) - return gsi; - else - return es7000_gsi_override(0, gsi); - } + if (!base) { + int i; + for (i = 0; i < nr_ioapics; i++) + base += nr_ioapic_registers[i]; } + if (!ioapic && (gsi < 16)) + gsi += base; return gsi; } + #endif // (CONFIG_X86_IO_APIC) && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT) /* @@ -240,7 +195,7 @@ } } } - Dprintk("ES7000: did not find Unisys ACPI OEM table!\n"); + printk("ES7000: did not find Unisys ACPI OEM table!\n"); return -1; } diff -Nru a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c --- a/arch/i386/mach-voyager/voyager_basic.c 2004-11-10 17:19:03 -08:00 +++ b/arch/i386/mach-voyager/voyager_basic.c 2004-11-10 17:19:03 -08:00 @@ -53,7 +53,7 @@ static struct sysrq_key_op sysrq_voyager_dump_op = { .handler = voyager_dump, .help_msg = "Voyager", - .action_msg = "Dump Voyager Status\n", + .action_msg = "Dump Voyager Status", }; #endif diff -Nru a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c --- a/arch/i386/mm/fault.c 2004-11-10 17:19:02 -08:00 +++ b/arch/i386/mm/fault.c 2004-11-10 17:19:02 -08:00 @@ -201,7 +201,7 @@ return 0; } -asmlinkage void do_invalid_op(struct pt_regs *, unsigned long); +fastcall void do_invalid_op(struct pt_regs *, unsigned long); /* * This routine handles page faults. It determines the address, @@ -213,7 +213,7 @@ * bit 1 == 0 means read, 1 means write * bit 2 == 0 means kernel, 1 means user-mode */ -asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code) +fastcall void do_page_fault(struct pt_regs *regs, unsigned long error_code) { struct task_struct *tsk; struct mm_struct *mm; diff -Nru a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c --- a/arch/i386/mm/hugetlbpage.c 2004-11-10 17:19:06 -08:00 +++ b/arch/i386/mm/hugetlbpage.c 2004-11-10 17:19:06 -08:00 @@ -282,3 +282,143 @@ spin_unlock(&mm->page_table_lock); return ret; } + +/* x86_64 also uses this file */ + +#ifdef HAVE_ARCH_HUGETLB_UNMAPPED_AREA +static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file, + unsigned long addr, unsigned long len, + unsigned long pgoff, unsigned long flags) +{ + struct mm_struct *mm = current->mm; + struct vm_area_struct *vma; + unsigned long start_addr; + + start_addr = mm->free_area_cache; + +full_search: + addr = ALIGN(start_addr, HPAGE_SIZE); + + for (vma = find_vma(mm, addr); ; vma = vma->vm_next) { + /* At this point: (!vma || addr < vma->vm_end). */ + if (TASK_SIZE - len < addr) { + /* + * Start a new search - just in case we missed + * some holes. + */ + if (start_addr != TASK_UNMAPPED_BASE) { + start_addr = TASK_UNMAPPED_BASE; + goto full_search; + } + return -ENOMEM; + } + if (!vma || addr + len <= vma->vm_start) { + mm->free_area_cache = addr + len; + return addr; + } + addr = ALIGN(vma->vm_end, HPAGE_SIZE); + } +} + +static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file, + unsigned long addr0, unsigned long len, + unsigned long pgoff, unsigned long flags) +{ + struct mm_struct *mm = current->mm; + struct vm_area_struct *vma, *prev_vma; + unsigned long base = mm->mmap_base, addr = addr0; + int first_time = 1; + + /* don't allow allocations above current base */ + if (mm->free_area_cache > base) + mm->free_area_cache = base; + +try_again: + /* make sure it can fit in the remaining address space */ + if (mm->free_area_cache < len) + goto fail; + + /* either no address requested or cant fit in requested address hole */ + addr = (mm->free_area_cache - len) & HPAGE_MASK; + do { + /* + * Lookup failure means no vma is above this address, + * i.e. return with success: + */ + if (!(vma = find_vma_prev(mm, addr, &prev_vma))) + return addr; + + /* + * new region fits between prev_vma->vm_end and + * vma->vm_start, use it: + */ + if (addr + len <= vma->vm_start && + (!prev_vma || (addr >= prev_vma->vm_end))) + /* remember the address as a hint for next time */ + return (mm->free_area_cache = addr); + else + /* pull free_area_cache down to the first hole */ + if (mm->free_area_cache == vma->vm_end) + mm->free_area_cache = vma->vm_start; + + /* try just below the current vma->vm_start */ + addr = (vma->vm_start - len) & HPAGE_MASK; + } while (len <= vma->vm_start); + +fail: + /* + * if hint left us with no space for the requested + * mapping then try again: + */ + if (first_time) { + mm->free_area_cache = base; + first_time = 0; + goto try_again; + } + /* + * A failed mmap() very likely causes application failure, + * so fall back to the bottom-up function here. This scenario + * can happen with large stack limits and large mmap() + * allocations. + */ + mm->free_area_cache = TASK_UNMAPPED_BASE; + addr = hugetlb_get_unmapped_area_bottomup(file, addr0, + len, pgoff, flags); + + /* + * Restore the topdown base: + */ + mm->free_area_cache = base; + + return addr; +} + +unsigned long +hugetlb_get_unmapped_area(struct file *file, unsigned long addr, + unsigned long len, unsigned long pgoff, unsigned long flags) +{ + struct mm_struct *mm = current->mm; + struct vm_area_struct *vma; + + if (len & ~HPAGE_MASK) + return -EINVAL; + if (len > TASK_SIZE) + return -ENOMEM; + + if (addr) { + addr = ALIGN(addr, HPAGE_SIZE); + vma = find_vma(mm, addr); + if (TASK_SIZE - len >= addr && + (!vma || addr + len <= vma->vm_start)) + return addr; + } + if (mm->get_unmapped_area == arch_get_unmapped_area) + return hugetlb_get_unmapped_area_bottomup(file, addr, len, + pgoff, flags); + else + return hugetlb_get_unmapped_area_topdown(file, addr, len, + pgoff, flags); +} + +#endif /*HAVE_ARCH_HUGETLB_UNMAPPED_AREA*/ + diff -Nru a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c --- a/arch/i386/mm/pageattr.c 2004-11-10 17:19:04 -08:00 +++ b/arch/i386/mm/pageattr.c 2004-11-10 17:19:04 -08:00 @@ -208,7 +208,6 @@ */ __flush_tlb_all(); } -EXPORT_SYMBOL(kernel_map_pages); #endif EXPORT_SYMBOL(change_page_attr); diff -Nru a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c --- a/arch/i386/pci/irq.c 2004-11-10 17:19:07 -08:00 +++ b/arch/i386/pci/irq.c 2004-11-10 17:19:07 -08:00 @@ -17,6 +17,7 @@ #include #include #include +#include #include "pci.h" @@ -127,8 +128,15 @@ { unsigned char mask = 1 << (irq & 7); unsigned int port = 0x4d0 + (irq >> 3); - unsigned char val = inb(port); + unsigned char val; + static u16 eisa_irq_mask; + if (irq >= 16 || (1 << irq) & eisa_irq_mask) + return; + + eisa_irq_mask |= (1 << irq); + printk("PCI: setting IRQ %u as level-triggered\n", irq); + val = inb(port); if (!(val & mask)) { DBG(" -> edge"); outb(val | mask, port); @@ -995,13 +1003,24 @@ subsys_initcall(pcibios_irq_init); -void pcibios_penalize_isa_irq(int irq) +static void pirq_penalize_isa_irq(int irq) { /* * If any ISAPnP device reports an IRQ in its list of possible * IRQ's, we try to avoid assigning it to PCI devices. */ - pirq_penalty[irq] += 100; + if (irq < 16) + pirq_penalty[irq] += 100; +} + +void pcibios_penalize_isa_irq(int irq) +{ +#ifdef CONFIG_ACPI_PCI + if (!acpi_noirq) + acpi_penalize_isa_irq(irq); + else +#endif + pirq_penalize_isa_irq(irq); } int pirq_enable_irq(struct pci_dev *dev) diff -Nru a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig --- a/arch/ia64/configs/generic_defconfig 2004-11-10 17:19:04 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,1123 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc1 -# Tue Aug 24 15:08:24 2004 -# - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=20 -CONFIG_HOTPLUG=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Processor type and features -# -CONFIG_IA64=y -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_TIME_INTERPOLATION=y -CONFIG_EFI=y -CONFIG_IA64_GENERIC=y -# CONFIG_IA64_DIG is not set -# CONFIG_IA64_HP_ZX1 is not set -# CONFIG_IA64_SGI_SN2 is not set -# CONFIG_IA64_HP_SIM is not set -# CONFIG_ITANIUM is not set -CONFIG_MCKINLEY=y -# CONFIG_IA64_PAGE_SIZE_4KB is not set -# CONFIG_IA64_PAGE_SIZE_8KB is not set -CONFIG_IA64_PAGE_SIZE_16KB=y -# CONFIG_IA64_PAGE_SIZE_64KB is not set -CONFIG_IA64_L1_CACHE_SHIFT=7 -CONFIG_NUMA=y -CONFIG_VIRTUAL_MEM_MAP=y -CONFIG_DISCONTIGMEM=y -CONFIG_IA64_CYCLONE=y -CONFIG_IOSAPIC=y -CONFIG_FORCE_MAX_ZONEORDER=18 -CONFIG_SMP=y -CONFIG_NR_CPUS=512 -CONFIG_HOTPLUG_CPU=y -# CONFIG_PREEMPT is not set -CONFIG_HAVE_DEC_LOCK=y -CONFIG_IA32_SUPPORT=y -CONFIG_COMPAT=y -CONFIG_PERFMON=y -CONFIG_IA64_PALINFO=y - -# -# Firmware Drivers -# -CONFIG_EFI_VARS=y -CONFIG_EFI_PCDP=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=m - -# -# Power management and ACPI -# -CONFIG_PM=y -CONFIG_ACPI=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI_BOOT=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=m -CONFIG_ACPI_PROCESSOR=m -CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_NUMA=y -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_BUS=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_PCI=y -CONFIG_ACPI_SYSTEM=y - -# -# Bus options (PCI, PCMCIA) -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -# CONFIG_PCI_MSI is not set -CONFIG_PCI_LEGACY_PROC=y -CONFIG_PCI_NAMES=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=m -# CONFIG_HOTPLUG_PCI_FAKE is not set -CONFIG_HOTPLUG_PCI_ACPI=m -# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_PCIE is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set - -# -# PCMCIA/CardBus support -# -# CONFIG_PCMCIA is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=m -CONFIG_BLK_DEV_RAM_SIZE=4096 - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPCI=y -# CONFIG_IDEPCI_SHARE_IRQ is not set -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_ADMA=y -# CONFIG_BLK_DEV_AEC62XX is not set -# CONFIG_BLK_DEV_ALI15X3 is not set -# CONFIG_BLK_DEV_AMD74XX is not set -CONFIG_BLK_DEV_CMD64X=y -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_CS5530 is not set -# CONFIG_BLK_DEV_HPT34X is not set -# CONFIG_BLK_DEV_HPT366 is not set -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -# CONFIG_BLK_DEV_NS87415 is not set -# CONFIG_BLK_DEV_PDC202XX_OLD is not set -# CONFIG_BLK_DEV_PDC202XX_NEW is not set -# CONFIG_BLK_DEV_SVWKS is not set -CONFIG_BLK_DEV_SGIIOC4=y -# CONFIG_BLK_DEV_SIIMAGE is not set -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -# CONFIG_BLK_DEV_VIA82CXXX is not set -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=m -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=y -CONFIG_SCSI_FC_ATTRS=y - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_MEGARAID is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INIA100 is not set -CONFIG_SCSI_SYM53C8XX_2=y -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -CONFIG_SCSI_QLOGIC_FC=y -# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set -CONFIG_SCSI_QLOGIC_1280=y -CONFIG_SCSI_QLA2XXX=y -CONFIG_SCSI_QLA21XX=m -CONFIG_SCSI_QLA22XX=m -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -# CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_QLA6322 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=m -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -# CONFIG_MD_RAID10 is not set -CONFIG_MD_RAID5=m -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_MAX_SGE=40 -# CONFIG_FUSION_ISENSE is not set -# CONFIG_FUSION_CTL is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set -# CONFIG_NET_CLS_ROUTE is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set -CONFIG_NET_POLL_CONTROLLER=y -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_NET_VENDOR_3COM is not set - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -# CONFIG_DE2104X is not set -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -# CONFIG_TULIP_MMIO is not set -# CONFIG_TULIP_NAPI is not set -# CONFIG_DE4X5 is not set -# CONFIG_WINBOND_840 is not set -# CONFIG_DM9102 is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -# CONFIG_PCNET32 is not set -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -# CONFIG_E100_NAPI is not set -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -CONFIG_E1000=m -# CONFIG_E1000_NAPI is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SK98LIN is not set -CONFIG_TIGON3=y - -# -# Ethernet (10000 Mbit) -# -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=y - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -CONFIG_GAMEPORT=m -CONFIG_SOUND_GAMEPORT=m -# CONFIG_GAMEPORT_NS558 is not set -# CONFIG_GAMEPORT_L4 is not set -# CONFIG_GAMEPORT_EMU10K1 is not set -# CONFIG_GAMEPORT_VORTEX is not set -# CONFIG_GAMEPORT_FM801 is not set -# CONFIG_GAMEPORT_CS461x is not set -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_ROCKETPORT is not set -# CONFIG_CYCLADES is not set -# CONFIG_SYNCLINK is not set -# CONFIG_SYNCLINKMP is not set -# CONFIG_N_HDLC is not set -# CONFIG_STALDRV is not set -CONFIG_SGI_SNSC=y - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_ACPI=y -CONFIG_SERIAL_8250_NR_UARTS=6 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_MULTIPORT is not set -# CONFIG_SERIAL_8250_RSA is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_SGI_L1_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set -CONFIG_EFI_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=m -CONFIG_AGP_I460=m -CONFIG_AGP_HP_ZX1=m -CONFIG_DRM=y -CONFIG_DRM_TDFX=m -CONFIG_DRM_GAMMA=m -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_MGA=m -CONFIG_DRM_SIS=m -CONFIG_RAW_DRIVER=m -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -CONFIG_HPET_MMAP=y -CONFIG_MAX_RAW_DEVS=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_VERBOSE_PRINTK=y -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AC97_CODEC=m -# CONFIG_SND_ALI5451 is not set -# CONFIG_SND_ATIIXP is not set -# CONFIG_SND_AU8810 is not set -# CONFIG_SND_AU8820 is not set -# CONFIG_SND_AU8830 is not set -# CONFIG_SND_AZT3328 is not set -# CONFIG_SND_BT87X is not set -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_CS4281=m -CONFIG_SND_EMU10K1=m -# CONFIG_SND_KORG1212 is not set -# CONFIG_SND_MIXART is not set -# CONFIG_SND_NM256 is not set -# CONFIG_SND_RME32 is not set -# CONFIG_SND_RME96 is not set -# CONFIG_SND_RME9652 is not set -# CONFIG_SND_HDSP is not set -# CONFIG_SND_TRIDENT is not set -# CONFIG_SND_YMFPCI is not set -# CONFIG_SND_ALS4000 is not set -# CONFIG_SND_CMIPCI is not set -# CONFIG_SND_ENS1370 is not set -# CONFIG_SND_ENS1371 is not set -# CONFIG_SND_ES1938 is not set -# CONFIG_SND_ES1968 is not set -# CONFIG_SND_MAESTRO3 is not set -CONFIG_SND_FM801=m -# CONFIG_SND_FM801_TEA575X is not set -# CONFIG_SND_ICE1712 is not set -# CONFIG_SND_ICE1724 is not set -# CONFIG_SND_INTEL8X0 is not set -# CONFIG_SND_INTEL8X0M is not set -# CONFIG_SND_SONICVIBES is not set -# CONFIG_SND_VIA82XX is not set -# CONFIG_SND_VX222 is not set - -# -# ALSA USB devices -# -# CONFIG_SND_USB_AUDIO is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -# CONFIG_USB_EHCI_SPLIT_ISO is not set -# CONFIG_USB_EHCI_ROOT_HUB_TT is not set -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_BLUETOOTH_TTY is not set -# CONFIG_USB_MIDI is not set -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_RW_DETECT is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_HP8200e is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_HID_FF is not set -# CONFIG_USB_HIDDEV is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network adaptors -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_TEST is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_REISERFS_FS_XATTR is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=y -# CONFIG_XFS_RT is not set -# CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set -# CONFIG_XFS_POSIX_ACL is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -# CONFIG_ZISOFS is not set -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -# CONFIG_MSDOS_FS is not set -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp437" -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_POSIX is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -# CONFIG_NLS_ASCII is not set -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set - -# -# HP Simulator drivers -# -# CONFIG_HP_SIMETH is not set -# CONFIG_HP_SIMSERIAL is not set -# CONFIG_HP_SIMSCSI is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -CONFIG_DEBUG_KERNEL=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_INFO is not set -CONFIG_IA64_GRANULE_16MB=y -# CONFIG_IA64_GRANULE_64MB is not set -# CONFIG_IA64_PRINT_HAZARDS is not set -# CONFIG_DISABLE_VHPT is not set -# CONFIG_IA64_DEBUG_CMPXCHG is not set -# CONFIG_IA64_DEBUG_IRQ is not set -CONFIG_SYSVIPC_COMPAT=y - -# -# Security options -# -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -# CONFIG_CRYPTO_HMAC is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=m -# CONFIG_CRYPTO_SHA1 is not set -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -CONFIG_CRYPTO_DES=m -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_ARC4 is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_DEFLATE is not set -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set diff -Nru a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig --- a/arch/ia64/configs/sn2_defconfig 2004-11-10 17:19:02 -08:00 +++ b/arch/ia64/configs/sn2_defconfig 2004-11-10 17:19:02 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc2 -# Fri Sep 24 08:59:00 2004 +# Linux kernel version: 2.6.10-rc1 +# Mon Nov 1 14:35:44 2004 # # @@ -9,6 +9,7 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup @@ -22,6 +23,7 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=20 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -29,12 +31,12 @@ # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -45,6 +47,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y CONFIG_STOP_MACHINE=y @@ -84,6 +87,7 @@ CONFIG_HAVE_DEC_LOCK=y CONFIG_IA32_SUPPORT=y CONFIG_COMPAT=y +CONFIG_IA64_MCA_RECOVERY=y CONFIG_PERFMON=y CONFIG_IA64_PALINFO=y @@ -109,6 +113,7 @@ # CONFIG_ACPI_FAN is not set # CONFIG_ACPI_PROCESSOR is not set CONFIG_ACPI_NUMA=y +CONFIG_ACPI_BLACKLIST_YEAR=0 # CONFIG_ACPI_DEBUG is not set CONFIG_ACPI_BUS=y CONFIG_ACPI_POWER=y @@ -136,9 +141,13 @@ CONFIG_HOTPLUG_PCI_SGI=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set # # Device Drivers @@ -181,6 +190,16 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -199,7 +218,6 @@ # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes @@ -283,6 +301,7 @@ # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set CONFIG_SCSI_SATA=y +# CONFIG_SCSI_SATA_AHCI is not set # CONFIG_SCSI_SATA_SVW is not set # CONFIG_SCSI_ATA_PIIX is not set # CONFIG_SCSI_SATA_NV is not set @@ -290,6 +309,7 @@ # CONFIG_SCSI_SATA_SX4 is not set # CONFIG_SCSI_SATA_SIL is not set # CONFIG_SCSI_SATA_SIS is not set +# CONFIG_SCSI_SATA_ULI is not set # CONFIG_SCSI_SATA_VIA is not set CONFIG_SCSI_SATA_VITESSE=y # CONFIG_SCSI_BUSLOGIC is not set @@ -299,12 +319,14 @@ # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set CONFIG_SCSI_QLOGIC_1280=y +# CONFIG_SCSI_QLOGIC_1280_1040 is not set CONFIG_SCSI_QLA2XXX=y # CONFIG_SCSI_QLA21XX is not set CONFIG_SCSI_QLA22XX=y @@ -402,7 +424,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -632,6 +653,8 @@ # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers @@ -651,7 +674,7 @@ # CONFIG_USB_STORAGE is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=m CONFIG_USB_HIDINPUT=y @@ -718,9 +741,14 @@ # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # +# USB ATM/DSL drivers +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set @@ -758,6 +786,7 @@ # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -789,6 +818,8 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y @@ -921,9 +952,11 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_INFO=y CONFIG_IA64_GRANULE_16MB=y # CONFIG_IA64_GRANULE_64MB is not set @@ -936,6 +969,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -949,7 +983,7 @@ CONFIG_CRYPTO_SHA1=m # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WHIRLPOOL is not set +# CONFIG_CRYPTO_WP512 is not set CONFIG_CRYPTO_DES=m # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set diff -Nru a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig --- a/arch/ia64/configs/tiger_defconfig 2004-11-10 17:19:02 -08:00 +++ b/arch/ia64/configs/tiger_defconfig 2004-11-10 17:19:02 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc2 -# Tue Sep 28 09:03:25 2004 +# Linux kernel version: 2.6.10-rc1 +# Tue Nov 2 11:35:10 2004 # # @@ -9,6 +9,7 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup @@ -22,6 +23,7 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=20 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set @@ -30,12 +32,12 @@ # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -46,6 +48,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y @@ -83,6 +86,7 @@ CONFIG_HAVE_DEC_LOCK=y CONFIG_IA32_SUPPORT=y CONFIG_COMPAT=y +CONFIG_IA64_MCA_RECOVERY=y CONFIG_PERFMON=y CONFIG_IA64_PALINFO=y @@ -109,6 +113,7 @@ CONFIG_ACPI_FAN=m CONFIG_ACPI_PROCESSOR=m CONFIG_ACPI_THERMAL=m +CONFIG_ACPI_BLACKLIST_YEAR=0 # CONFIG_ACPI_DEBUG is not set CONFIG_ACPI_BUS=y CONFIG_ACPI_POWER=y @@ -136,9 +141,13 @@ # CONFIG_HOTPLUG_PCI_SHPC is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set # # Device Drivers @@ -180,6 +189,16 @@ # CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=m CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -198,7 +217,6 @@ CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes @@ -288,6 +306,7 @@ # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 @@ -299,6 +318,7 @@ CONFIG_SCSI_QLOGIC_FC=y # CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set CONFIG_SCSI_QLOGIC_1280=y +# CONFIG_SCSI_QLOGIC_1280_1040 is not set CONFIG_SCSI_QLA2XXX=y CONFIG_SCSI_QLA21XX=m CONFIG_SCSI_QLA22XX=m @@ -371,6 +391,7 @@ # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -390,7 +411,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -463,7 +483,6 @@ # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -477,6 +496,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=y # @@ -691,6 +711,8 @@ # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_SUSPEND is not set # CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers @@ -720,7 +742,7 @@ # CONFIG_USB_STORAGE_JUMPSHOT is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y @@ -781,10 +803,15 @@ # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set @@ -819,6 +846,7 @@ # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=y CONFIG_AUTOFS4_FS=y @@ -852,6 +880,8 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y @@ -983,9 +1013,11 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set CONFIG_IA64_GRANULE_16MB=y # CONFIG_IA64_GRANULE_64MB is not set @@ -998,6 +1030,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -1011,7 +1044,7 @@ # CONFIG_CRYPTO_SHA1 is not set # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WHIRLPOOL is not set +# CONFIG_CRYPTO_WP512 is not set CONFIG_CRYPTO_DES=m # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set diff -Nru a/arch/ia64/defconfig b/arch/ia64/defconfig --- a/arch/ia64/defconfig 2004-11-10 17:19:02 -08:00 +++ b/arch/ia64/defconfig 2004-11-10 17:19:02 -08:00 @@ -1,50 +1,54 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1 +# Tue Nov 2 11:47:56 2004 # # # Code maturity level options # CONFIG_EXPERIMENTAL=y -# CONFIG_CLEAN_COMPILE is not set -# CONFIG_STANDALONE is not set -CONFIG_BROKEN=y -CONFIG_BROKEN_ON_SMP=y +CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set +# CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=16 +CONFIG_LOG_BUF_SHIFT=20 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_ALL=y # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y CONFIG_MODVERSIONS=y +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y CONFIG_STOP_MACHINE=y @@ -57,9 +61,10 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_TIME_INTERPOLATION=y CONFIG_EFI=y -# CONFIG_IA64_GENERIC is not set +CONFIG_GENERIC_IOMAP=y +CONFIG_IA64_GENERIC=y # CONFIG_IA64_DIG is not set -CONFIG_IA64_HP_ZX1=y +# CONFIG_IA64_HP_ZX1 is not set # CONFIG_IA64_SGI_SN2 is not set # CONFIG_IA64_HP_SIM is not set # CONFIG_ITANIUM is not set @@ -69,18 +74,20 @@ CONFIG_IA64_PAGE_SIZE_16KB=y # CONFIG_IA64_PAGE_SIZE_64KB is not set CONFIG_IA64_L1_CACHE_SHIFT=7 -# CONFIG_NUMA is not set +CONFIG_NUMA=y CONFIG_VIRTUAL_MEM_MAP=y -# CONFIG_IA64_CYCLONE is not set +CONFIG_DISCONTIGMEM=y +CONFIG_IA64_CYCLONE=y CONFIG_IOSAPIC=y CONFIG_FORCE_MAX_ZONEORDER=18 CONFIG_SMP=y -CONFIG_NR_CPUS=16 -# CONFIG_HOTPLUG_CPU is not set +CONFIG_NR_CPUS=512 +CONFIG_HOTPLUG_CPU=y # CONFIG_PREEMPT is not set CONFIG_HAVE_DEC_LOCK=y CONFIG_IA32_SUPPORT=y CONFIG_COMPAT=y +CONFIG_IA64_MCA_RECOVERY=y CONFIG_PERFMON=y CONFIG_IA64_PALINFO=y @@ -90,7 +97,7 @@ CONFIG_EFI_VARS=y CONFIG_EFI_PCDP=y CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y +CONFIG_BINFMT_MISC=m # # Power management and ACPI @@ -103,10 +110,12 @@ # CONFIG_ACPI_BOOT=y CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_BUTTON=y -CONFIG_ACPI_FAN=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_THERMAL=y +CONFIG_ACPI_BUTTON=m +CONFIG_ACPI_FAN=m +CONFIG_ACPI_PROCESSOR=m +CONFIG_ACPI_THERMAL=m +CONFIG_ACPI_NUMA=y +CONFIG_ACPI_BLACKLIST_YEAR=0 # CONFIG_ACPI_DEBUG is not set CONFIG_ACPI_BUS=y CONFIG_ACPI_POWER=y @@ -118,19 +127,29 @@ # CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -# CONFIG_PCI_USE_VECTOR is not set +# CONFIG_PCI_MSI is not set CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y # # PCI Hotplug Support # -# CONFIG_HOTPLUG_PCI is not set +CONFIG_HOTPLUG_PCI=m +# CONFIG_HOTPLUG_PCI_FAKE is not set +CONFIG_HOTPLUG_PCI_ACPI=m +# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set +# CONFIG_HOTPLUG_PCI_CPCI is not set +# CONFIG_HOTPLUG_PCI_PCIE is not set +# CONFIG_HOTPLUG_PCI_SHPC is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set # # Device Drivers @@ -139,6 +158,7 @@ # # Generic Driver Options # +CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set @@ -164,13 +184,23 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=m CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -183,20 +213,19 @@ # # CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y +# CONFIG_IDEDISK_MULTI_MODE is not set CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=m +CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y -CONFIG_IDE_TASKFILE_IO=y +# CONFIG_IDE_TASK_IOCTL is not set # # IDE chipset support/bugfixes # -# CONFIG_IDE_GENERIC is not set +CONFIG_IDE_GENERIC=y CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y +# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_BLK_DEV_OFFBOARD is not set CONFIG_BLK_DEV_GENERIC=y # CONFIG_BLK_DEV_OPTI621 is not set @@ -204,7 +233,6 @@ # CONFIG_BLK_DEV_IDEDMA_FORCED is not set CONFIG_IDEDMA_PCI_AUTO=y # CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_ADMA=y # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set # CONFIG_BLK_DEV_AMD74XX is not set @@ -216,12 +244,13 @@ # CONFIG_BLK_DEV_HPT34X is not set # CONFIG_BLK_DEV_HPT366 is not set # CONFIG_BLK_DEV_SC1200 is not set -# CONFIG_BLK_DEV_PIIX is not set +CONFIG_BLK_DEV_PIIX=y # CONFIG_BLK_DEV_NS87415 is not set # CONFIG_BLK_DEV_PDC202XX_OLD is not set # CONFIG_BLK_DEV_PDC202XX_NEW is not set # CONFIG_BLK_DEV_SVWKS is not set -CONFIG_BLK_DEV_SIIMAGE=y +CONFIG_BLK_DEV_SGIIOC4=y +# CONFIG_BLK_DEV_SIIMAGE is not set # CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set # CONFIG_BLK_DEV_VIA82CXXX is not set @@ -241,24 +270,24 @@ # SCSI support type (disk, tape, CD-ROM) # CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=y -CONFIG_CHR_DEV_OSST=y -CONFIG_BLK_DEV_SR=y -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=y +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=m +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=m # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set # # SCSI Transport Attributes # CONFIG_SCSI_SPI_ATTRS=y -# CONFIG_SCSI_FC_ATTRS is not set +CONFIG_SCSI_FC_ATTRS=y # # SCSI low-level drivers @@ -268,13 +297,12 @@ # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set -CONFIG_SCSI_AIC7XXX_OLD=y +# CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_ADVANSYS is not set -CONFIG_SCSI_MEGARAID=y +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set # CONFIG_SCSI_SATA is not set # CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA_PIO is not set @@ -289,16 +317,16 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set # CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_PCI2000 is not set -# CONFIG_SCSI_PCI2220I is not set # CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set +CONFIG_SCSI_QLOGIC_FC=y +# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set CONFIG_SCSI_QLOGIC_1280=y +# CONFIG_SCSI_QLOGIC_1280_1040 is not set CONFIG_SCSI_QLA2XXX=y -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -# CONFIG_SCSI_QLA2300 is not set -# CONFIG_SCSI_QLA2322 is not set +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m # CONFIG_SCSI_QLA6312 is not set # CONFIG_SCSI_QLA6322 is not set # CONFIG_SCSI_DC395x is not set @@ -313,21 +341,21 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set CONFIG_MD_RAID5=m -# CONFIG_MD_RAID6 is not set +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_BLK_DEV_DM=m -# CONFIG_DM_CRYPT is not set -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m # # Fusion MPT device support # CONFIG_FUSION=y CONFIG_FUSION_MAX_SGE=40 -# CONFIG_FUSION_ISENSE is not set # CONFIG_FUSION_CTL is not set # @@ -350,7 +378,7 @@ # CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set -# CONFIG_NETLINK_DEV is not set +CONFIG_NETLINK_DEV=y CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y @@ -360,31 +388,15 @@ # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set +CONFIG_ARPD=y +CONFIG_SYN_COOKIES=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y # CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# IP: Netfilter Configuration -# -# CONFIG_IP_NF_CONNTRACK is not set -# CONFIG_IP_NF_QUEUE is not set -# CONFIG_IP_NF_IPTABLES is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set +# CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) @@ -402,7 +414,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -414,16 +425,19 @@ # Network testing # # CONFIG_NET_PKTGEN is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -CONFIG_BONDING=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set # # ARCnet devices @@ -434,7 +448,7 @@ # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y -CONFIG_MII=y +CONFIG_MII=m # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_NET_VENDOR_3COM is not set @@ -442,7 +456,15 @@ # # Tulip family network device support # -# CONFIG_NET_TULIP is not set +CONFIG_NET_TULIP=y +# CONFIG_DE2104X is not set +CONFIG_TULIP=m +# CONFIG_TULIP_MWI is not set +# CONFIG_TULIP_MMIO is not set +# CONFIG_TULIP_NAPI is not set +# CONFIG_DE4X5 is not set +# CONFIG_WINBOND_840 is not set +# CONFIG_DM9102 is not set # CONFIG_HP100 is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set @@ -451,9 +473,10 @@ # CONFIG_B44 is not set # CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set -CONFIG_EEPRO100=y +CONFIG_EEPRO100=m # CONFIG_EEPRO100_PIO is not set -# CONFIG_E100 is not set +CONFIG_E100=m +# CONFIG_E100_NAPI is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set @@ -463,7 +486,6 @@ # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -477,6 +499,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=y # @@ -505,7 +528,7 @@ # CONFIG_SLIP is not set # CONFIG_NET_FC is not set # CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set +CONFIG_NETCONSOLE=y # # ISDN subsystem @@ -529,27 +552,42 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=y +# CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # # Input I/O drivers # -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y +CONFIG_GAMEPORT=m +CONFIG_SOUND_GAMEPORT=m +# CONFIG_GAMEPORT_NS558 is not set +# CONFIG_GAMEPORT_L4 is not set +# CONFIG_GAMEPORT_EMU10K1 is not set +# CONFIG_GAMEPORT_VORTEX is not set +# CONFIG_GAMEPORT_FM801 is not set +# CONFIG_GAMEPORT_CS461x is not set CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set +CONFIG_SERIO_I8042=y # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PCIPS2 is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers # -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set @@ -560,7 +598,14 @@ CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set +CONFIG_SERIAL_NONSTANDARD=y +# CONFIG_ROCKETPORT is not set +# CONFIG_CYCLADES is not set +# CONFIG_SYNCLINK is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_N_HDLC is not set +# CONFIG_STALDRV is not set +CONFIG_SGI_SNSC=y # # Serial drivers @@ -568,28 +613,27 @@ CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_ACPI=y -CONFIG_SERIAL_8250_NR_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_NR_UARTS=6 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_MULTIPORT is not set +# CONFIG_SERIAL_8250_RSA is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_SGI_L1_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI # -CONFIG_IPMI_HANDLER=m -CONFIG_IPMI_PANIC_EVENT=y -CONFIG_IPMI_PANIC_STRING=y -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m +# CONFIG_IPMI_HANDLER is not set # # Watchdog Cards @@ -604,90 +648,26 @@ # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set CONFIG_AGP=m +CONFIG_AGP_I460=m CONFIG_AGP_HP_ZX1=m CONFIG_DRM=y -# CONFIG_DRM_TDFX is not set -# CONFIG_DRM_GAMMA is not set -# CONFIG_DRM_R128 is not set +CONFIG_DRM_TDFX=m +CONFIG_DRM_R128=m CONFIG_DRM_RADEON=m -# CONFIG_DRM_MGA is not set -# CONFIG_DRM_SIS is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set +CONFIG_DRM_MGA=m +CONFIG_DRM_SIS=m +CONFIG_RAW_DRIVER=m +CONFIG_HPET=y +# CONFIG_HPET_RTC_IRQ is not set +CONFIG_HPET_MMAP=y +CONFIG_MAX_RAW_DEVS=256 +CONFIG_MMTIMER=y # # I2C support # -CONFIG_I2C=y -# CONFIG_I2C_CHARDEV is not set - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=y -# CONFIG_I2C_ALGOPCF is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_ISA is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -# CONFIG_I2C_VOODOO3 is not set - -# -# Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set - -# -# Other I2C Chip support -# -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set +# CONFIG_I2C is not set # # Dallas's 1-wire bus @@ -711,53 +691,18 @@ # # Graphics support # -CONFIG_FB=y -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_RIVA=m -CONFIG_FB_RIVA_I2C=y -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_PM3 is not set -# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB is not set # # Console display driver support # CONFIG_VGA_CONSOLE=y -# CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y # # Sound # -CONFIG_SOUND=y +CONFIG_SOUND=m # # Advanced Linux Sound Architecture @@ -768,11 +713,12 @@ CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m CONFIG_SND_SEQUENCER=m -# CONFIG_SND_SEQ_DUMMY is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_SEQUENCER_OSS is not set -# CONFIG_SND_VERBOSE_PRINTK is not set +CONFIG_SND_SEQ_DUMMY=m +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_SEQUENCER_OSS=y +CONFIG_SND_VERBOSE_PRINTK=y # CONFIG_SND_DEBUG is not set # @@ -780,11 +726,11 @@ # CONFIG_SND_MPU401_UART=m CONFIG_SND_OPL3_LIB=m -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_VIRMIDI is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set +CONFIG_SND_DUMMY=m +CONFIG_SND_VIRMIDI=m +CONFIG_SND_MTPAV=m +CONFIG_SND_SERIAL_U16550=m +CONFIG_SND_MPU401=m # # PCI devices @@ -792,14 +738,16 @@ CONFIG_SND_AC97_CODEC=m # CONFIG_SND_ALI5451 is not set # CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set # CONFIG_SND_AU8810 is not set # CONFIG_SND_AU8820 is not set # CONFIG_SND_AU8830 is not set # CONFIG_SND_AZT3328 is not set # CONFIG_SND_BT87X is not set -# CONFIG_SND_CS46XX is not set -# CONFIG_SND_CS4281 is not set -# CONFIG_SND_EMU10K1 is not set +CONFIG_SND_CS46XX=m +CONFIG_SND_CS46XX_NEW_DSP=y +CONFIG_SND_CS4281=m +CONFIG_SND_EMU10K1=m # CONFIG_SND_KORG1212 is not set # CONFIG_SND_MIXART is not set # CONFIG_SND_NM256 is not set @@ -827,9 +775,10 @@ # CONFIG_SND_VX222 is not set # -# ALSA USB devices +# USB devices # # CONFIG_SND_USB_AUDIO is not set +# CONFIG_SND_USB_USX2Y is not set # # Open Sound System @@ -839,24 +788,28 @@ # # USB support # -CONFIG_USB=y +CONFIG_USB=m # CONFIG_USB_DEBUG is not set # # Miscellaneous USB options # CONFIG_USB_DEVICEFS=y -CONFIG_USB_BANDWIDTH=y +# CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers # -CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD=m # CONFIG_USB_EHCI_SPLIT_ISO is not set -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_UHCI_HCD=y +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +CONFIG_USB_OHCI_HCD=m +CONFIG_USB_UHCI_HCD=m # # USB Device Class drivers @@ -866,15 +819,31 @@ # CONFIG_USB_MIDI is not set # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set -# CONFIG_USB_STORAGE is not set +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_RW_DETECT is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_HP8200e is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # -CONFIG_USB_HID=y +CONFIG_USB_HID=m CONFIG_USB_HIDINPUT=y # CONFIG_HID_FF is not set -CONFIG_USB_HIDDEV=y +# CONFIG_USB_HIDDEV is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set # CONFIG_USB_AIPTEK is not set # CONFIG_USB_WACOM is not set # CONFIG_USB_KBTAB is not set @@ -930,10 +899,15 @@ # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set @@ -943,42 +917,55 @@ # CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y -# CONFIG_EXT2_FS_POSIX_ACL is not set -# CONFIG_EXT2_FS_SECURITY is not set +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set +CONFIG_REISERFS_FS=y +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y # CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=y -# CONFIG_AUTOFS4_FS is not set +CONFIG_AUTOFS4_FS=y # # CD-ROM/DVD Filesystems # -CONFIG_ISO9660_FS=y +CONFIG_ISO9660_FS=m CONFIG_JOLIET=y # CONFIG_ZISOFS is not set -CONFIG_UDF_FS=y +CONFIG_UDF_FS=m CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems # CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y +# CONFIG_MSDOS_FS is not set CONFIG_VFAT_FS=y CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +# CONFIG_NTFS_RW is not set # # Pseudo filesystems @@ -989,6 +976,8 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y @@ -1003,7 +992,6 @@ # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -1014,22 +1002,28 @@ # # Network File Systems # -CONFIG_NFS_FS=y +CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V4=y CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=y +CONFIG_NFSD=m CONFIG_NFSD_V3=y -# CONFIG_NFSD_V4 is not set -# CONFIG_NFSD_TCP is not set -CONFIG_LOCKD=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_POSIX is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1049,7 +1043,7 @@ # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set +CONFIG_SGI_PARTITION=y # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set CONFIG_EFI_PARTITION=y @@ -1060,43 +1054,43 @@ CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m # # Library routines @@ -1106,6 +1100,13 @@ # CONFIG_LIBCRC32C is not set # +# HP Simulator drivers +# +# CONFIG_HP_SIMETH is not set +# CONFIG_HP_SIMSERIAL is not set +# CONFIG_HP_SIMSCSI is not set + +# # Profiling support # # CONFIG_PROFILING is not set @@ -1113,24 +1114,26 @@ # # Kernel hacking # -CONFIG_IA64_GRANULE_16MB=y -# CONFIG_IA64_GRANULE_64MB is not set CONFIG_DEBUG_KERNEL=y -CONFIG_IA64_PRINT_HAZARDS=y -# CONFIG_DISABLE_VHPT is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_IA64_EARLY_PRINTK_VGA is not set +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_INFO is not set +CONFIG_IA64_GRANULE_16MB=y +# CONFIG_IA64_GRANULE_64MB is not set +# CONFIG_IA64_PRINT_HAZARDS is not set +# CONFIG_DISABLE_VHPT is not set # CONFIG_IA64_DEBUG_CMPXCHG is not set # CONFIG_IA64_DEBUG_IRQ is not set -CONFIG_DEBUG_INFO=y CONFIG_SYSVIPC_COMPAT=y # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -1140,11 +1143,12 @@ # CONFIG_CRYPTO_HMAC is not set # CONFIG_CRYPTO_NULL is not set # CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MD5=m # CONFIG_CRYPTO_SHA1 is not set # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set -CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=m # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set # CONFIG_CRYPTO_SERPENT is not set @@ -1153,6 +1157,7 @@ # CONFIG_CRYPTO_CAST6 is not set # CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_KHAZAD is not set # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set diff -Nru a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c --- a/arch/ia64/hp/common/sba_iommu.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ia64/hp/common/sba_iommu.c 2004-11-10 17:19:02 -08:00 @@ -479,7 +479,7 @@ * purges IOTLB entries in power-of-two sizes, so we also * allocate IOVA space in power-of-two sizes. */ - bits_wanted = 1UL << get_iovp_order(bits_wanted << PAGE_SHIFT); + bits_wanted = 1UL << get_iovp_order(bits_wanted << iovp_shift); if (likely(bits_wanted == 1)) { unsigned int bitshiftcnt; @@ -688,7 +688,7 @@ unsigned long m; /* Round up to power-of-two size: see AR2305 note above */ - bits_not_wanted = 1UL << get_iovp_order(bits_not_wanted << PAGE_SHIFT); + bits_not_wanted = 1UL << get_iovp_order(bits_not_wanted << iovp_shift); for (; bits_not_wanted > 0 ; res_ptr++) { if (unlikely(bits_not_wanted > BITS_PER_LONG)) { diff -Nru a/arch/ia64/ia32/elfcore32.h b/arch/ia64/ia32/elfcore32.h --- a/arch/ia64/ia32/elfcore32.h 2004-11-10 17:19:04 -08:00 +++ b/arch/ia64/ia32/elfcore32.h 2004-11-10 17:19:04 -08:00 @@ -9,6 +9,7 @@ #define _ELFCORE32_H_ #include +#include #define USE_ELF_CORE_DUMP 1 diff -Nru a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c --- a/arch/ia64/kernel/asm-offsets.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ia64/kernel/asm-offsets.c 2004-11-10 17:19:06 -08:00 @@ -217,6 +217,7 @@ DEFINE(IA64_TIME_INTERPOLATOR_LAST_CYCLE_OFFSET, offsetof (struct time_interpolator, last_cycle)); DEFINE(IA64_TIME_INTERPOLATOR_LAST_COUNTER_OFFSET, offsetof (struct time_interpolator, last_counter)); DEFINE(IA64_TIME_INTERPOLATOR_JITTER_OFFSET, offsetof (struct time_interpolator, jitter)); + DEFINE(IA64_TIME_INTERPOLATOR_MASK_OFFSET, offsetof (struct time_interpolator, mask)); DEFINE(IA64_TIME_SOURCE_CPU, TIME_SOURCE_CPU); DEFINE(IA64_TIME_SOURCE_MMIO64, TIME_SOURCE_MMIO64); DEFINE(IA64_TIME_SOURCE_MMIO32, TIME_SOURCE_MMIO32); diff -Nru a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c --- a/arch/ia64/kernel/cyclone.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ia64/kernel/cyclone.c 2004-11-10 17:19:04 -08:00 @@ -19,10 +19,11 @@ struct time_interpolator cyclone_interpolator = { - .source = TIME_SOURCE_MMIO32, - .shift = 32, + .source = TIME_SOURCE_MMIO64, + .shift = 16, .frequency = CYCLONE_TIMER_FREQ, .drift = -100, + .mask = (1LL << 40) - 1 }; int __init init_cyclone_clock(void) diff -Nru a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c --- a/arch/ia64/kernel/efi.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ia64/kernel/efi.c 2004-11-10 17:19:02 -08:00 @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -324,12 +325,12 @@ * [granule_addr - first_non_wb_addr) is guaranteed to * be contiguous WB memory. */ - granule_addr = md->phys_addr & ~(IA64_GRANULE_SIZE - 1); + granule_addr = GRANULEROUNDDOWN(md->phys_addr); first_non_wb_addr = max(first_non_wb_addr, granule_addr); if (first_non_wb_addr < md->phys_addr) { trim_bottom(md, granule_addr + IA64_GRANULE_SIZE); - granule_addr = md->phys_addr & ~(IA64_GRANULE_SIZE - 1); + granule_addr = GRANULEROUNDDOWN(md->phys_addr); first_non_wb_addr = max(first_non_wb_addr, granule_addr); } @@ -343,24 +344,36 @@ break; /* non-WB or hole */ } - last_granule_addr = first_non_wb_addr & ~(IA64_GRANULE_SIZE - 1); + last_granule_addr = GRANULEROUNDDOWN(first_non_wb_addr); if (last_granule_addr < md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) trim_top(md, last_granule_addr); if (is_available_memory(md)) { - if (md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT) > max_addr) { - if (md->phys_addr > max_addr) + if (md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT) >= max_addr) { + if (md->phys_addr >= max_addr) continue; md->num_pages = (max_addr - md->phys_addr) >> EFI_PAGE_SHIFT; + first_non_wb_addr = max_addr; } if (total_mem >= mem_limit) continue; - total_mem += (md->num_pages << EFI_PAGE_SHIFT); - if (total_mem > mem_limit) { - md->num_pages -= ((total_mem - mem_limit) >> EFI_PAGE_SHIFT); - max_addr = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT); + + if (total_mem + (md->num_pages << EFI_PAGE_SHIFT) > mem_limit) { + unsigned long limit_addr = md->phys_addr; + + limit_addr += mem_limit - total_mem; + limit_addr = GRANULEROUNDDOWN(limit_addr); + + if (md->phys_addr > limit_addr) + continue; + + md->num_pages = (limit_addr - md->phys_addr) >> + EFI_PAGE_SHIFT; + first_non_wb_addr = max_addr = md->phys_addr + + (md->num_pages << EFI_PAGE_SHIFT); } + total_mem += (md->num_pages << EFI_PAGE_SHIFT); if (md->num_pages == 0) continue; @@ -495,13 +508,13 @@ for (cp = saved_command_line; *cp; ) { if (memcmp(cp, "mem=", 4) == 0) { cp += 4; - mem_limit = memparse(cp, &end) - 2; + mem_limit = memparse(cp, &end); if (end != cp) break; cp = end; } else if (memcmp(cp, "max_addr=", 9) == 0) { cp += 9; - max_addr = memparse(cp, &end) - 1; + max_addr = GRANULEROUNDDOWN(memparse(cp, &end)); if (end != cp) break; cp = end; diff -Nru a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S --- a/arch/ia64/kernel/entry.S 2004-11-10 17:19:03 -08:00 +++ b/arch/ia64/kernel/entry.S 2004-11-10 17:19:03 -08:00 @@ -1527,7 +1527,7 @@ data8 sys_mq_getsetattr data8 sys_ni_syscall // reserved for kexec_load data8 sys_ni_syscall - data8 sys_setaltroot // 1270 + data8 sys_ni_syscall // 1270 data8 sys_ni_syscall data8 sys_ni_syscall data8 sys_ni_syscall diff -Nru a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S --- a/arch/ia64/kernel/fsys.S 2004-11-10 17:19:07 -08:00 +++ b/arch/ia64/kernel/fsys.S 2004-11-10 17:19:07 -08:00 @@ -177,7 +177,7 @@ // r11 = preserved: saved ar.pfs // r12 = preserved: memory stack // r13 = preserved: thread pointer - // r14 = debug pointer / usable + // r14 = address of mask / mask // r15 = preserved: system call number // r16 = preserved: current task pointer // r17 = wall to monotonic use @@ -226,7 +226,6 @@ add r10 = IA64_TIME_INTERPOLATOR_ADDRESS_OFFSET,r20 extr r3 = r21,32,32 // time_interpolator->nsec_per_cyc extr r8 = r21,0,16 // time_interpolator->source - nop.i 123 cmp.ne p6, p0 = 0, r2 // Fallback if work is scheduled (p6) br.cond.spnt.many fsys_fallback_syscall ;; @@ -257,17 +256,20 @@ add r24 = IA64_TIME_INTERPOLATOR_OFFSET_OFFSET,r20 (p15) ld8 r17 = [r19],IA64_TIMESPEC_TV_NSEC_OFFSET ld8 r9 = [r27],IA64_TIMESPEC_TV_NSEC_OFFSET - nop.i 123 + add r14 = IA64_TIME_INTERPOLATOR_MASK_OFFSET, r20 ;; ld8 r18 = [r24] // time_interpolator->offset ld8 r8 = [r27],-IA64_TIMESPEC_TV_NSEC_OFFSET // xtime.tv_nsec (p13) sub r3 = r25,r2 // Diff needed before comparison (thanks davidm) ;; + ld8 r14 = [r14] // time_interpolator->mask (p13) cmp.gt.unc p6,p7 = r3,r0 // check if it is less than last. p6,p7 cleared sub r10 = r2,r26 // current_counter - last_counter ;; (p6) sub r10 = r25,r26 // time we got was less than last_cycle (p7) mov ar.ccv = r25 // more than last_cycle. Prep for cmpxchg + ;; + and r10 = r10,r14 // Apply mask ;; setf.sig f8 = r10 nop.i 123 diff -Nru a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S --- a/arch/ia64/kernel/mca_asm.S 2004-11-10 17:19:06 -08:00 +++ b/arch/ia64/kernel/mca_asm.S 2004-11-10 17:19:06 -08:00 @@ -868,7 +868,7 @@ GLOBAL_ENTRY(ia64_monarch_init_handler) - + .prologue // stash the information the SAL passed to os SAL_TO_OS_MCA_HANDOFF_STATE_SAVE(r2) ;; @@ -907,6 +907,7 @@ adds out0=16,sp // out0 = pointer to pt_regs ;; DO_SAVE_SWITCH_STACK + .body adds out1=16,sp // out0 = pointer to switch_stack br.call.sptk.many rp=ia64_init_handler diff -Nru a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c --- a/arch/ia64/kernel/perfmon.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ia64/kernel/perfmon.c 2004-11-10 17:19:06 -08:00 @@ -1638,7 +1638,7 @@ } /* - * context is locked when coming here and interrupts are disabled + * interrupt cannot be masked when coming here */ static inline int pfm_do_fasync(int fd, struct file *filp, pfm_context_t *ctx, int on) @@ -2270,7 +2270,7 @@ * return -ENOMEM; */ if (size > task->signal->rlim[RLIMIT_MEMLOCK].rlim_cur) - return -EAGAIN; + return -ENOMEM; /* * We do the easy to undo allocations first. @@ -2295,10 +2295,6 @@ /* * partially initialize the vma for the sampling buffer - * - * The VM_DONTCOPY flag is very important as it ensures that the mapping - * will never be inherited for any child process (via fork()) which is always - * what we want. */ vma->vm_mm = mm; vma->vm_flags = VM_READ| VM_MAYREAD |VM_RESERVED; @@ -2328,6 +2324,7 @@ goto error; } vma->vm_end = vma->vm_start + size; + vma->vm_pgoff = vma->vm_start >> PAGE_SHIFT; DPRINT(("aligned size=%ld, hdr=%p mapped @0x%lx\n", size, ctx->ctx_smpl_hdr, vma->vm_start)); @@ -3060,11 +3057,12 @@ #endif } - DPRINT(("pmc[%u]=0x%lx loaded=%d access_pmu=%d all_pmcs=0x%lx used_pmds=0x%lx eventid=%ld smpl_pmds=0x%lx reset_pmds=0x%lx reloads_pmcs=0x%lx used_monitors=0x%lx ovfl_regs=0x%lx\n", + DPRINT(("pmc[%u]=0x%lx ld=%d apmu=%d flags=0x%lx all_pmcs=0x%lx used_pmds=0x%lx eventid=%ld smpl_pmds=0x%lx reset_pmds=0x%lx reloads_pmcs=0x%lx used_monitors=0x%lx ovfl_regs=0x%lx\n", cnum, value, is_loaded, can_access_pmu, + flags, ctx->ctx_all_pmcs[0], ctx->ctx_used_pmds[0], ctx->ctx_pmds[cnum].eventid, @@ -3240,8 +3238,8 @@ } } - DPRINT(("pmd[%u]=0x%lx loaded=%d access_pmu=%d, hw_value=0x%lx ctx_pmd=0x%lx short_reset=0x%lx " - "long_reset=0x%lx notify=%c used_pmds=0x%lx reset_pmds=0x%lx reload_pmds=0x%lx all_pmds=0x%lx ovfl_regs=0x%lx\n", + DPRINT(("pmd[%u]=0x%lx ld=%d apmu=%d, hw_value=0x%lx ctx_pmd=0x%lx short_reset=0x%lx " + "long_reset=0x%lx notify=%c seed=0x%lx mask=0x%lx used_pmds=0x%lx reset_pmds=0x%lx reload_pmds=0x%lx all_pmds=0x%lx ovfl_regs=0x%lx\n", cnum, value, is_loaded, @@ -3251,6 +3249,8 @@ ctx->ctx_pmds[cnum].short_reset, ctx->ctx_pmds[cnum].long_reset, PMC_OVFL_NOTIFY(ctx, cnum) ? 'Y':'N', + ctx->ctx_pmds[cnum].seed, + ctx->ctx_pmds[cnum].mask, ctx->ctx_used_pmds[0], ctx->ctx_pmds[cnum].reset_pmds[0], ctx->ctx_reload_pmds[0], @@ -3328,7 +3328,7 @@ } expert_mode = pfm_sysctl.expert_mode; - DPRINT(("loaded=%d access_pmu=%d ctx_state=%d\n", + DPRINT(("ld=%d apmu=%d ctx_state=%d\n", is_loaded, can_access_pmu, state)); @@ -3868,7 +3868,7 @@ ctx->ctx_ibrs[rnum] = dbreg.val; - DPRINT(("write ibr%u=0x%lx used_ibrs=0x%x is_loaded=%d access_pmu=%d\n", + DPRINT(("write ibr%u=0x%lx used_ibrs=0x%x ld=%d apmu=%d\n", rnum, dbreg.val, ctx->ctx_used_ibrs[0], is_loaded, can_access_pmu)); } else { CTX_USED_DBR(ctx, rnum); @@ -3879,7 +3879,7 @@ } ctx->ctx_dbrs[rnum] = dbreg.val; - DPRINT(("write dbr%u=0x%lx used_dbrs=0x%x is_loaded=%d access_pmu=%d\n", + DPRINT(("write dbr%u=0x%lx used_dbrs=0x%x ld=%d apmu=%d\n", rnum, dbreg.val, ctx->ctx_used_dbrs[0], is_loaded, can_access_pmu)); } } @@ -5851,14 +5851,6 @@ pfm_unprotect_ctx_ctxsw(ctx, flags); pfm_context_free(ctx); - return; - } - - /* - * sanity check - */ - if (ctx->ctx_last_activation != GET_ACTIVATION()) { - pfm_unprotect_ctx_ctxsw(ctx, flags); return; } diff -Nru a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c --- a/arch/ia64/kernel/process.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ia64/kernel/process.c 2004-11-10 17:19:04 -08:00 @@ -47,6 +47,8 @@ void (*ia64_mark_idle)(int); +unsigned long boot_option_idle_override = 0; +EXPORT_SYMBOL(boot_option_idle_override); void ia64_do_show_stack (struct unw_frame_info *info, void *arg) diff -Nru a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c --- a/arch/ia64/kernel/time.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ia64/kernel/time.c 2004-11-10 17:19:03 -08:00 @@ -45,7 +45,11 @@ #endif -static struct time_interpolator itc_interpolator; +static struct time_interpolator itc_interpolator = { + .shift = 16, + .mask = 0xffffffffffffffffLL, + .source = TIME_SOURCE_CPU +}; static irqreturn_t timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) @@ -186,17 +190,20 @@ itc_ratio.den = 1; /* avoid division by zero */ itc_freq = (platform_base_freq*itc_ratio.num)/itc_ratio.den; - if (platform_base_drift != -1) - itc_drift = platform_base_drift*itc_ratio.num/itc_ratio.den; - else - itc_drift = -1; local_cpu_data->itm_delta = (itc_freq + HZ/2) / HZ; printk(KERN_DEBUG "CPU %d: base freq=%lu.%03luMHz, ITC ratio=%lu/%lu, " - "ITC freq=%lu.%03luMHz+/-%ldppm\n", smp_processor_id(), + "ITC freq=%lu.%03luMHz", smp_processor_id(), platform_base_freq / 1000000, (platform_base_freq / 1000) % 1000, - itc_ratio.num, itc_ratio.den, itc_freq / 1000000, (itc_freq / 1000) % 1000, - itc_drift); + itc_ratio.num, itc_ratio.den, itc_freq / 1000000, (itc_freq / 1000) % 1000); + + if (platform_base_drift != -1) { + itc_drift = platform_base_drift*itc_ratio.num/itc_ratio.den; + printk("+/-%ldppm\n", itc_drift); + } else { + itc_drift = -1; + printk("\n"); + } local_cpu_data->proc_freq = (platform_base_freq*proc_ratio.num)/proc_ratio.den; local_cpu_data->itc_freq = itc_freq; @@ -206,9 +213,7 @@ if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) { itc_interpolator.frequency = local_cpu_data->itc_freq; - itc_interpolator.shift = 16; itc_interpolator.drift = itc_drift; - itc_interpolator.source = TIME_SOURCE_CPU; #ifdef CONFIG_SMP /* On IA64 in an SMP configuration ITCs are never accurately synchronized. * Jitter compensation requires a cmpxchg which may limit @@ -222,7 +227,6 @@ */ if (!nojitter) itc_interpolator.jitter = 1; #endif - itc_interpolator.addr = NULL; register_time_interpolator(&itc_interpolator); } diff -Nru a/arch/ia64/lib/dec_and_lock.c b/arch/ia64/lib/dec_and_lock.c --- a/arch/ia64/lib/dec_and_lock.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ia64/lib/dec_and_lock.c 2004-11-10 17:19:06 -08:00 @@ -19,7 +19,7 @@ * acquiring the spinlock first. */ int -atomic_dec_and_lock (atomic_t *refcount, spinlock_t *lock) +_atomic_dec_and_lock (atomic_t *refcount, spinlock_t *lock) { int old, new; @@ -39,4 +39,4 @@ return 0; } -EXPORT_SYMBOL(atomic_dec_and_lock); +EXPORT_SYMBOL(_atomic_dec_and_lock); diff -Nru a/arch/ia64/lib/io.c b/arch/ia64/lib/io.c --- a/arch/ia64/lib/io.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ia64/lib/io.c 2004-11-10 17:19:02 -08:00 @@ -73,6 +73,7 @@ #undef __ia64_writew #undef __ia64_writel #undef __ia64_writeq +#undef __ia64_mmiowb unsigned int __ia64_inb (unsigned long port) @@ -156,6 +157,12 @@ __ia64_readq_relaxed (void __iomem *addr) { return ___ia64_readq (addr); +} + +void +__ia64_mmiowb(void) +{ + ___ia64_mmiowb(); } #endif /* CONFIG_IA64_GENERIC */ diff -Nru a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c --- a/arch/ia64/mm/discontig.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ia64/mm/discontig.c 2004-11-10 17:19:06 -08:00 @@ -602,7 +602,7 @@ * for each piece of usable memory and will setup these values for each node. * Very similar to build_maps(). */ -static int count_node_pages(unsigned long start, unsigned long len, int node) +static __init int count_node_pages(unsigned long start, unsigned long len, int node) { unsigned long end = start + len; @@ -627,7 +627,7 @@ * paging_init() sets up the page tables for each node of the system and frees * the bootmem allocator memory for general use. */ -void paging_init(void) +void __init paging_init(void) { unsigned long max_dma; unsigned long zones_size[MAX_NR_ZONES]; diff -Nru a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c --- a/arch/ia64/pci/pci.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ia64/pci/pci.c 2004-11-10 17:19:04 -08:00 @@ -328,33 +328,65 @@ return NULL; } -void __init -pcibios_fixup_device_resources (struct pci_dev *dev, struct pci_bus *bus) +void pcibios_resource_to_bus(struct pci_dev *dev, + struct pci_bus_region *region, struct resource *res) { struct pci_controller *controller = PCI_CONTROLLER(dev); - struct pci_window *window; - int i, j; + unsigned long offset = 0; + int i; + + for (i = 0; i < controller->windows; i++) { + struct pci_window *window = &controller->window[i]; + if (!(window->resource.flags & res->flags)) + continue; + if (window->resource.start > res->start - window->offset) + continue; + if (window->resource.end < res->end - window->offset) + continue; + offset = window->offset; + break; + } + + region->start = res->start - offset; + region->end = res->end - offset; +} + +void pcibios_bus_to_resource(struct pci_dev *dev, + struct resource *res, struct pci_bus_region *region) +{ + struct pci_controller *controller = PCI_CONTROLLER(dev); + unsigned long offset = 0; + int i; + + for (i = 0; i < controller->windows; i++) { + struct pci_window *window = &controller->window[i]; + if (!(window->resource.flags & res->flags)) + continue; + if (window->resource.start > region->start) + continue; + if (window->resource.end < region->end) + continue; + offset = window->offset; + break; + } + + res->start = region->start + offset; + res->end = region->end + offset; +} + +static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) +{ + struct pci_bus_region region; + int i; int limit = (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) ? \ PCI_BRIDGE_RESOURCES : PCI_NUM_RESOURCES; for (i = 0; i < limit; i++) { - if (!dev->resource[i].start) + if (!dev->resource[i].flags) continue; - -#define contains(win, res) ((res)->start >= (win)->start && \ - (res)->end <= (win)->end) - - for (j = 0; j < controller->windows; j++) { - window = &controller->window[j]; - if (((dev->resource[i].flags & IORESOURCE_MEM && - window->resource.flags & IORESOURCE_MEM) || - (dev->resource[i].flags & IORESOURCE_IO && - window->resource.flags & IORESOURCE_IO)) && - contains(&window->resource, &dev->resource[i])) { - dev->resource[i].start += window->offset; - dev->resource[i].end += window->offset; - } - } + region.start = dev->resource[i].start; + region.end = dev->resource[i].end; + pcibios_bus_to_resource(dev, &dev->resource[i], ®ion); pci_claim_resource(dev, i); } } @@ -368,7 +400,7 @@ struct pci_dev *dev; list_for_each_entry(dev, &b->devices, bus_list) - pcibios_fixup_device_resources(dev, b); + pcibios_fixup_device_resources(dev); return; } @@ -451,21 +483,21 @@ enum pci_mmap_state mmap_state, int write_combine) { /* - * I/O space cannot be accessed via normal processor loads and stores on this - * platform. + * I/O space cannot be accessed via normal processor loads and + * stores on this platform. */ if (mmap_state == pci_mmap_io) /* - * XXX we could relax this for I/O spaces for which ACPI indicates that - * the space is 1-to-1 mapped. But at the moment, we don't support - * multiple PCI address spaces and the legacy I/O space is not 1-to-1 - * mapped, so this is moot. + * XXX we could relax this for I/O spaces for which ACPI + * indicates that the space is 1-to-1 mapped. But at the + * moment, we don't support multiple PCI address spaces and + * the legacy I/O space is not 1-to-1 mapped, so this is moot. */ return -EINVAL; /* - * Leave vm_pgoff as-is, the PCI space address is the physical address on this - * platform. + * Leave vm_pgoff as-is, the PCI space address is the physical + * address on this platform. */ vma->vm_flags |= (VM_SHM | VM_LOCKED | VM_IO); diff -Nru a/arch/ia64/sn/kernel/idle.c b/arch/ia64/sn/kernel/idle.c --- a/arch/ia64/sn/kernel/idle.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ia64/sn/kernel/idle.c 2004-11-10 17:19:07 -08:00 @@ -3,14 +3,13 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (c) 2001-2003 Silicon Graphics, Inc. All rights reserved. + * Copyright (c) 2001-2004 Silicon Graphics, Inc. All rights reserved. */ -#include #include -#include -void snidle(int state) { +void snidle(int state) +{ if (state) { if (pda->idle_flag == 0) { /* @@ -18,11 +17,6 @@ */ set_led_bits(0, LED_CPU_ACTIVITY); } - -#ifdef CONFIG_IA64_SGI_SN_SIM - if (IS_RUNNING_ON_SIMULATOR()) - SIMULATOR_SLEEP(); -#endif pda->idle_flag = 1; } else { diff -Nru a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c --- a/arch/ia64/sn/kernel/io_init.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ia64/sn/kernel/io_init.c 2004-11-10 17:19:05 -08:00 @@ -136,7 +136,7 @@ for (i = 0; i < numionodes; i++) { hubdev = (struct hubdev_info *)(NODEPDA(i)->pdinfo); - nasid = COMPACT_TO_NASID_NODEID(i); + nasid = cnodeid_to_nasid(i); status = sal_get_hubdev_info(nasid, (uint64_t) __pa(hubdev)); if (status) continue; @@ -204,10 +204,12 @@ SN_PCIDEV_INFO(dev) = kmalloc(sizeof(struct pcidev_info), GFP_KERNEL); if (SN_PCIDEV_INFO(dev) <= 0) BUG(); /* Cannot afford to run out of memory */ + memset(SN_PCIDEV_INFO(dev), 0, sizeof(struct pcidev_info)); sn_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_KERNEL); if (sn_irq_info <= 0) BUG(); /* Cannot afford to run out of memory */ + memset(sn_irq_info, 0, sizeof(struct sn_irq_info)); /* Call to retrieve pci device information needed by kernel. */ status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number, @@ -248,7 +250,7 @@ SN_PCIDEV_INFO(dev)->pdi_pcibus_info = SN_PCIBUS_BUSSOFT(dev->bus); /* Only set up IRQ stuff if this device has a host bus context */ - if (SN_PCIDEV_BUSSOFT(dev)) { + if (SN_PCIDEV_BUSSOFT(dev) && sn_irq_info->irq_irq) { SN_PCIDEV_INFO(dev)->pdi_sn_irq_info = sn_irq_info; dev->irq = SN_PCIDEV_INFO(dev)->pdi_sn_irq_info->irq_irq; sn_irq_fixup(dev, sn_irq_info); @@ -311,7 +313,7 @@ SN_PCIBUS_BUSSOFT(bus) = provider_soft; nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base); - cnode = NASID_TO_COMPACT_NODEID(nasid); + cnode = nasid_to_cnodeid(nasid); hubdev_info = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo); SN_PCIBUS_BUSSOFT(bus)->bs_xwidget_info = &(hubdev_info->hdi_xwidget_info[SN_PCIBUS_BUSSOFT(bus)->bs_xid]); diff -Nru a/arch/ia64/sn/kernel/iomv.c b/arch/ia64/sn/kernel/iomv.c --- a/arch/ia64/sn/kernel/iomv.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ia64/sn/kernel/iomv.c 2004-11-10 17:19:05 -08:00 @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -54,19 +55,16 @@ EXPORT_SYMBOL(sn_io_addr); /** - * sn_mmiob - I/O space memory barrier + * __sn_mmiowb - I/O space memory barrier * - * Acts as a memory mapped I/O barrier for platforms that queue writes to - * I/O space. This ensures that subsequent writes to I/O space arrive after - * all previous writes. For most ia64 platforms, this is a simple - * 'mf.a' instruction. For other platforms, mmiob() may have to read - * a chipset register to ensure ordering. + * See include/asm-ia64/io.h and Documentation/DocBook/deviceiobook.tmpl + * for details. * * On SN2, we wait for the PIO_WRITE_STATUS SHub register to clear. * See PV 871084 for details about the WAR about zero value. * */ -void sn_mmiob(void) +void __sn_mmiowb(void) { while ((((volatile unsigned long)(*pda->pio_write_status_addr)) & SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT_MASK) != @@ -74,4 +72,4 @@ cpu_relax(); } -EXPORT_SYMBOL(sn_mmiob); +EXPORT_SYMBOL(__sn_mmiowb); diff -Nru a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c --- a/arch/ia64/sn/kernel/irq.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ia64/sn/kernel/irq.c 2004-11-10 17:19:03 -08:00 @@ -79,7 +79,7 @@ int nasid; irq = irq & 0xff; - nasid = smp_physical_node_id(); + nasid = get_nasid(); event_occurred = HUB_L((uint64_t *) GLOBAL_MMR_ADDR(nasid, SH_EVENT_OCCURRED)); if (event_occurred & SH_EVENT_OCCURRED_UART_INT_MASK) { @@ -109,7 +109,7 @@ ivec = irq & 0xff; if (ivec == SGI_UART_VECTOR) { - nasid = smp_physical_node_id(); + nasid = get_nasid(); event_occurred = HUB_L((uint64_t *) GLOBAL_MMR_ADDR (nasid, SH_EVENT_OCCURRED)); /* If the UART bit is set here, we may have received an @@ -141,8 +141,8 @@ cpuid = first_cpu(mask); cpuphys = cpu_physical_id(cpuid); - t_nasid = cpu_physical_id_to_nasid(cpuphys); - t_slice = cpu_physical_id_to_slice(cpuphys); + t_nasid = cpuid_to_nasid(cpuid); + t_slice = cpuid_to_slice(cpuid); while (sn_irq_info) { int status; diff -Nru a/arch/ia64/sn/kernel/mca.c b/arch/ia64/sn/kernel/mca.c --- a/arch/ia64/sn/kernel/mca.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ia64/sn/kernel/mca.c 2004-11-10 17:19:03 -08:00 @@ -94,15 +94,11 @@ sn_platform_plat_specific_err_print(const u8 * sect_header, u8 ** oemdata, u64 * oemdata_size) { - sal_log_plat_specific_err_info_t *psei = - (sal_log_plat_specific_err_info_t *) sect_header; - if (!psei->valid.oem_data) - return 0; down(&sn_oemdata_mutex); sn_oemdata = oemdata; sn_oemdata_size = oemdata_size; sn_oemdata_bufsize = 0; - ia64_sn_plat_specific_err_print(print_hook, (char *)psei); + ia64_sn_plat_specific_err_print(print_hook, (char *)sect_header); up(&sn_oemdata_mutex); return 0; } @@ -110,18 +106,24 @@ /* Callback when userspace salinfo wants to decode oem data via the platform * kernel and/or prom. */ -int sn_salinfo_platform_oemdata(const u8 * sect_header, u8 ** oemdata, - u64 * oemdata_size) +int sn_salinfo_platform_oemdata(const u8 *sect_header, u8 **oemdata, u64 *oemdata_size) { - efi_guid_t guid = *(efi_guid_t *) sect_header; + efi_guid_t guid = *(efi_guid_t *)sect_header; + int valid = 0; *oemdata_size = 0; vfree(*oemdata); *oemdata = NULL; - if (efi_guidcmp(guid, SAL_PLAT_SPECIFIC_ERR_SECT_GUID) == 0 || - efi_guidcmp(guid, SAL_PLAT_MEM_DEV_ERR_SECT_GUID) == 0) - return sn_platform_plat_specific_err_print(sect_header, oemdata, - oemdata_size); - return 0; + if (efi_guidcmp(guid, SAL_PLAT_SPECIFIC_ERR_SECT_GUID) == 0) { + sal_log_plat_specific_err_info_t *psei = (sal_log_plat_specific_err_info_t *)sect_header; + valid = psei->valid.oem_data; + } else if (efi_guidcmp(guid, SAL_PLAT_MEM_DEV_ERR_SECT_GUID) == 0) { + sal_log_mem_dev_err_info_t *mdei = (sal_log_mem_dev_err_info_t *)sect_header; + valid = mdei->valid.oem_data; + } + if (valid) + return sn_platform_plat_specific_err_print(sect_header, oemdata, oemdata_size); + else + return 0; } static int __init sn_salinfo_init(void) diff -Nru a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c --- a/arch/ia64/sn/kernel/setup.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ia64/sn/kernel/setup.c 2004-11-10 17:19:03 -08:00 @@ -82,15 +82,6 @@ EXPORT_SYMBOL(physical_node_map); int numionodes; -/* - * This is the address of the RRegs in the HSpace of the global - * master. It is used by a hack in serial.c (serial_[in|out], - * printk.c (early_printk), and kdb_io.c to put console output on that - * node's Bedrock UART. It is initialized here to 0, so that - * early_printk won't try to access the UART before - * master_node_bedrock_address is properly calculated. - */ -u64 __iomem *master_node_bedrock_address; static void sn_init_pdas(char **); static void scan_for_ionodes(void); @@ -128,6 +119,19 @@ #endif /* + * Get nasid of current cpu early in boot before nodepda is initialized + */ +static int +boot_get_nasid(void) +{ + int nasid; + + if (ia64_sn_get_sapic_info(get_sapicid(), &nasid, NULL, NULL)) + BUG(); + return nasid; +} + +/* * This routine can only be used during init, since * smp_boot_data is an init data structure. * We have to use smp_boot_data.cpu_phys_id to find @@ -194,14 +198,6 @@ } } } - - if (IS_RUNNING_ON_SIMULATOR()) { - master_node_bedrock_address = (u64 __iomem *) - REMOTE_HUB(get_nasid(), SH_JUNK_BUS_UART0); - printk(KERN_DEBUG "early_sn_setup: setting " - "master_node_bedrock_address to 0x%p\n", - master_node_bedrock_address); - } } extern int platform_intr_list[]; @@ -297,7 +293,7 @@ panic("PROM version too old\n"); } - master_nasid = get_nasid(); + master_nasid = boot_get_nasid(); status = ia64_sal_freq_base(SAL_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec, @@ -312,14 +308,6 @@ platform_intr_list[ACPI_INTERRUPT_CPEI] = IA64_CPE_VECTOR; - if (IS_RUNNING_ON_SIMULATOR()) { - master_node_bedrock_address = (u64 __iomem *) - REMOTE_HUB(get_nasid(), SH_JUNK_BUS_UART0); - printk(KERN_DEBUG "sn_setup: setting " - "master_node_bedrock_address to 0x%p\n", - master_node_bedrock_address); - } - /* * we set the default root device to /dev/hda * to make simulation easy @@ -372,6 +360,8 @@ nodepdaindr[cnode] = alloc_bootmem_node(NODE_DATA(cnode), sizeof(nodepda_t)); memset(nodepdaindr[cnode], 0, sizeof(nodepda_t)); + memset(nodepdaindr[cnode]->phys_cpuid, -1, + sizeof(nodepdaindr[cnode]->phys_cpuid)); } /* @@ -422,8 +412,10 @@ int cpuid; int cpuphyid; int nasid; + int subnode; int slice; int cnode; + int i; static int wars_have_been_checked; /* @@ -434,10 +426,20 @@ return; cpuid = smp_processor_id(); - cpuphyid = ((ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff); - nasid = cpu_physical_id_to_nasid(cpuphyid); + cpuphyid = get_sapicid(); + + if (ia64_sn_get_sapic_info(cpuphyid, &nasid, &subnode, &slice)) + BUG(); + + for (i=0; i < NR_NODES; i++) { + if (nodepdaindr[i]) { + nodepdaindr[i]->phys_cpuid[cpuid].nasid = nasid; + nodepdaindr[i]->phys_cpuid[cpuid].slice = slice; + nodepdaindr[i]->phys_cpuid[cpuid].subnode = subnode; + } + } + cnode = nasid_to_cnodeid(nasid); - slice = cpu_physical_id_to_slice(cpuphyid); memset(pda, 0, sizeof(pda)); pda->p_nodepda = nodepdaindr[cnode]; @@ -574,4 +576,16 @@ } } +} + +int +nasid_slice_to_cpuid(int nasid, int slice) +{ + long cpu; + + for (cpu=0; cpu < NR_CPUS; cpu++) + if (nodepda->phys_cpuid[cpu].nasid == nasid && nodepda->phys_cpuid[cpu].slice == slice) + return cpu; + + return -1; } diff -Nru a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c --- a/arch/ia64/sn/kernel/sn2/sn2_smp.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c 2004-11-10 17:19:06 -08:00 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -136,7 +137,7 @@ ptc0 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH_PTC_0); ptc1 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH_PTC_1); - mynasid = smp_physical_node_id(); + mynasid = get_nasid(); spin_lock_irqsave(&sn2_global_ptc_lock, flags); @@ -205,6 +206,7 @@ /** * sn_send_IPI_phys - send an IPI to a Nasid and slice + * @nasid: nasid to receive the interrupt (may be outside partition) * @physid: physical cpuid to receive the interrupt. * @vector: command to send * @delivery_mode: delivery mechanism @@ -219,15 +221,12 @@ * %IA64_IPI_DM_NMI - pend an NMI * %IA64_IPI_DM_INIT - pend an INIT interrupt */ -void sn_send_IPI_phys(long physid, int vector, int delivery_mode) +void sn_send_IPI_phys(int nasid, long physid, int vector, int delivery_mode) { - long nasid, slice, val; + long val; unsigned long flags = 0; volatile long *p; - nasid = cpu_physical_id_to_nasid(physid); - slice = cpu_physical_id_to_slice(physid); - p = (long *)GLOBAL_MMR_PHYS_ADDR(nasid, SH_IPI_INT); val = (1UL << SH_IPI_INT_SEND_SHFT) | (physid << SH_IPI_INT_PID_SHFT) | @@ -268,8 +267,14 @@ void sn2_send_IPI(int cpuid, int vector, int delivery_mode, int redirect) { long physid; + int nasid; physid = cpu_physical_id(cpuid); + nasid = cpuid_to_nasid(cpuid); + + /* the following is used only when starting cpus at boot time */ + if (unlikely(nasid == -1)) + ia64_sn_get_sapic_info(physid, &nasid, NULL, NULL); - sn_send_IPI_phys(physid, vector, delivery_mode); + sn_send_IPI_phys(nasid, physid, vector, delivery_mode); } diff -Nru a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c 2004-11-10 17:19:06 -08:00 @@ -99,7 +99,7 @@ this_slot = MODULE_GET_BPOS(module_id); this_slab = geo_slab(geoid); if (rack == this_rack && slot == this_slot && slab == this_slab) - break; + break; } return cnode < numionodes ? cnode : -1; @@ -121,41 +121,35 @@ for (ordinal=0, p=objs; p != obj; p++) { if (SN_HWPERF_FOREIGN(p)) continue; - if (p->location[3] == obj->location[3]) + if (SN_HWPERF_SAME_OBJTYPE(p, obj)) ordinal++; } return ordinal; } -static struct { - char *brick_chars; - char *brick_name; -} brick_names[] = { - {"c^jbf", "node" }, - {"r", "router" }, - {NULL, "?-brick" } -}; +static const char *slabname_node = "node"; /* SHub asic */ +static const char *slabname_ionode = "ionode"; /* TIO asic */ +static const char *slabname_router = "router"; /* NL3R or NL4R */ +static const char *slabname_other = "other"; /* unknown asic */ -static char *sn_hwperf_get_brickname(struct sn_hwperf_object_info *obj, +static const char *sn_hwperf_get_slabname(struct sn_hwperf_object_info *obj, struct sn_hwperf_object_info *objs, int *ordinal) { - int i; - - for (i=0; brick_names[i].brick_chars; i++) { - if (strchr(brick_names[i].brick_chars, obj->location[3])) - break; - } + int isnode; + const char *slabname = slabname_other; - if (strcmp(brick_names[i].brick_name, "node") == 0) + if ((isnode = SN_HWPERF_IS_NODE(obj)) || SN_HWPERF_IS_IONODE(obj)) { + slabname = isnode ? slabname_node : slabname_ionode; *ordinal = sn_hwperf_obj_to_cnode(obj); + } else { *ordinal = sn_hwperf_generic_ordinal(obj, objs); - if (!brick_names[i].brick_chars) - brick_names[i].brick_name[0] = obj->location[3]; + if (SN_HWPERF_IS_ROUTER(obj)) + slabname = slabname_router; } - return brick_names[i].brick_name; + return slabname; } static int sn_topology_show(struct seq_file *s, void *d) @@ -165,7 +159,7 @@ int e; int i; int j; - const char *brickname; + const char *slabname; int ordinal; cpumask_t cpumask; char slice; @@ -191,11 +185,11 @@ obj->name[i] = '_'; } - brickname = sn_hwperf_get_brickname(obj, objs, &ordinal); - seq_printf(s, "%s %d %s %s asic %s", brickname, ordinal, obj->location, + slabname = sn_hwperf_get_slabname(obj, objs, &ordinal); + seq_printf(s, "%s %d %s %s asic %s", slabname, ordinal, obj->location, obj->sn_hwp_this_part ? "local" : "shared", obj->name); - if (strcmp(brickname, "node") != 0) + if (!SN_HWPERF_IS_NODE(obj) && !SN_HWPERF_IS_IONODE(obj)) seq_putc(s, '\n'); else { seq_printf(s, ", nasid 0x%x", cnodeid_to_nasid(ordinal)); @@ -206,7 +200,7 @@ seq_putc(s, '\n'); /* - * CPUs on this node + * CPUs on this node, if any */ cpumask = node_to_cpumask(ordinal); for_each_online_cpu(i) { @@ -278,9 +272,8 @@ */ seq_printf(s, " endpoint %s-%d, protocol %s\n", p->location, ptdata[pt].conn_port, - strcmp(obj->name, "NL3Router") == 0 || - strcmp(p->name, "NL3Router") == 0 ? - "LLP3" : "LLP4"); + (SN_HWPERF_IS_NL3ROUTER(obj) || + SN_HWPERF_IS_NL3ROUTER(p)) ? "LLP3" : "LLP4"); } vfree(ptdata); } diff -Nru a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c --- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c 2004-11-10 17:19:07 -08:00 @@ -80,7 +80,8 @@ static int coherence_id_show(struct seq_file *s, void *p) { - seq_printf(s, "%d\n", cpuid_to_coherence_id(smp_processor_id())); + seq_printf(s, "%d\n", partition_coherence_id()); + return 0; } diff -Nru a/arch/ia64/sn/kernel/sn2/timer.c b/arch/ia64/sn/kernel/sn2/timer.c --- a/arch/ia64/sn/kernel/sn2/timer.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ia64/sn/kernel/sn2/timer.c 2004-11-10 17:19:05 -08:00 @@ -22,14 +22,16 @@ extern unsigned long sn_rtc_cycles_per_second; -static struct time_interpolator sn2_interpolator; +static struct time_interpolator sn2_interpolator = { + .drift = -1, + .shift = 10, + .mask = (1LL << 55) - 1, + .source = TIME_SOURCE_MMIO64, + .addr = RTC_COUNTER_ADDR +}; void __init sn_timer_init(void) { sn2_interpolator.frequency = sn_rtc_cycles_per_second; - sn2_interpolator.drift = -1; /* unknown */ - sn2_interpolator.shift = 10; /* RTC is 54 bits maximum shift is 10 */ - sn2_interpolator.addr = RTC_COUNTER_ADDR; - sn2_interpolator.source = TIME_SOURCE_MMIO64; register_time_interpolator(&sn2_interpolator); } diff -Nru a/arch/ia64/sn/pci/pcibr/pcibr_dma.c b/arch/ia64/sn/pci/pcibr/pcibr_dma.c --- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c 2004-11-10 17:19:02 -08:00 @@ -226,10 +226,10 @@ return; nasid = NASID_GET(addr); - if (-1 == NASID_TO_COMPACT_NODEID(nasid)) + if (-1 == nasid_to_cnodeid(nasid)) return; - hubinfo = (NODEPDA(NASID_TO_COMPACT_NODEID(nasid)))->pdinfo; + hubinfo = (NODEPDA(nasid_to_cnodeid(nasid)))->pdinfo; if (!hubinfo) { BUG(); diff -Nru a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c --- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c 2004-11-10 17:19:03 -08:00 @@ -98,7 +98,7 @@ } nasid = NASID_GET(soft->pbi_buscommon.bs_base); - cnode = NASID_TO_COMPACT_NODEID(nasid); + cnode = nasid_to_cnodeid(nasid); hubdev_info = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo); if (hubdev_info->hdi_flush_nasid_list.widget_p) { diff -Nru a/arch/m32r/Makefile b/arch/m32r/Makefile --- a/arch/m32r/Makefile 2004-11-10 17:19:06 -08:00 +++ b/arch/m32r/Makefile 2004-11-10 17:19:06 -08:00 @@ -5,7 +5,6 @@ LDFLAGS := OBJCOPYFLAGS := -O binary -R .note -R .comment -S LDFLAGS_vmlinux := -e startup_32 -LDFLAGS_BLOB := --format binary --oformat elf32-m32r CFLAGS += -pipe -fno-schedule-insns CFLAGS_KERNEL += -mmodel=medium diff -Nru a/arch/m32r/boot/compressed/Makefile b/arch/m32r/boot/compressed/Makefile --- a/arch/m32r/boot/compressed/Makefile 2004-11-10 17:19:02 -08:00 +++ b/arch/m32r/boot/compressed/Makefile 2004-11-10 17:19:02 -08:00 @@ -28,9 +28,6 @@ $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE $(call if_changed,gzip) -$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.S FORCE - $(CPP) $(EXTRA_AFLAGS) -C -P -I include $< >$@ - LDFLAGS_piggy.o := -r --format binary --oformat elf32-m32r-linux -T OBJCOPYFLAGS += -R .empty_zero_page diff -Nru a/arch/m32r/kernel/io_mappi.c b/arch/m32r/kernel/io_mappi.c --- a/arch/m32r/kernel/io_mappi.c 2004-11-10 17:19:03 -08:00 +++ b/arch/m32r/kernel/io_mappi.c 2004-11-10 17:19:03 -08:00 @@ -15,7 +15,7 @@ #include #include -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) #include #define M32R_PCC_IOMAP_SIZE 0x1000 @@ -27,7 +27,7 @@ extern void pcc_ioread(int, unsigned long, void *, size_t, size_t, int); extern void pcc_iowrite(int, unsigned long, void *, size_t, size_t, int); -#endif /* CONFIG_PCMCIA && CONFIG_M32RPCC */ +#endif /* CONFIG_PCMCIA && CONFIG_M32R_PCC */ #define PORT2ADDR(port) _port2addr(port) @@ -80,7 +80,7 @@ if (port >= 0x300 && port < 0x320) return _ne_inb(PORT2ADDR_NE(port)); else -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { unsigned char b; pcc_ioread(0, port, &b, sizeof(b), 1, 0); @@ -100,7 +100,7 @@ if (port >= 0x300 && port < 0x320) return _ne_inw(PORT2ADDR_NE(port)); else -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { unsigned short w; pcc_ioread(0, port, &w, sizeof(w), 1, 0); @@ -116,7 +116,7 @@ unsigned long _inl(unsigned long port) { -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { unsigned long l; pcc_ioread(0, port, &l, sizeof(l), 1, 0); @@ -137,7 +137,7 @@ if (port >= 0x300 && port < 0x320) v = _ne_inb(PORT2ADDR_NE(port)); else -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { unsigned char b; pcc_ioread(0, port, &b, sizeof(b), 1, 0); @@ -161,7 +161,7 @@ if (port >= 0x300 && port < 0x320) v = _ne_inw(PORT2ADDR_NE(port)); else -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { unsigned short w; pcc_ioread(0, port, &w, sizeof(w), 1, 0); @@ -192,7 +192,7 @@ if (port >= 0x300 && port < 0x320) _ne_outb(b, PORT2ADDR_NE(port)); else -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { pcc_iowrite(0, port, &b, sizeof(b), 1, 0); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { @@ -207,7 +207,7 @@ if (port >= 0x300 && port < 0x320) _ne_outw(w, PORT2ADDR_NE(port)); else -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { pcc_iowrite(0, port, &w, sizeof(w), 1, 0); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { @@ -219,7 +219,7 @@ void _outl(unsigned long l, unsigned long port) { -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { pcc_iowrite(0, port, &l, sizeof(l), 1, 0); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { @@ -234,7 +234,7 @@ if (port >= 0x300 && port < 0x320) _ne_outb(b, PORT2ADDR_NE(port)); else -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { pcc_iowrite(0, port, &b, sizeof(b), 1, 0); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { @@ -251,7 +251,7 @@ if (port >= 0x300 && port < 0x320) _ne_outw(w, PORT2ADDR_NE(port)); else -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { pcc_iowrite(0, port, &w, sizeof(w), 1, 0); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { @@ -277,7 +277,7 @@ if (port >= 0x300 && port < 0x320){ portp = PORT2ADDR_NE(port); while(count--) *buf++ = *(volatile unsigned char *)portp; -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { pcc_ioread(0, port, (void *)addr, sizeof(unsigned char), count, 1); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { @@ -297,7 +297,7 @@ if (port >= 0x300 && port < 0x320) { portp = PORT2ADDR_NE(port); while (count--) *buf++ = _ne_inw(portp); -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { pcc_ioread(0, port, (void *)addr, sizeof(unsigned short), count, 1); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { @@ -326,7 +326,7 @@ if (port >= 0x300 && port < 0x320) { portp = PORT2ADDR_NE(port); while (count--) _ne_outb(*buf++, portp); -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { pcc_iowrite(0, port, (void *)addr, sizeof(unsigned char), count, 1); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { @@ -346,7 +346,7 @@ if (port >= 0x300 && port < 0x320) { portp = PORT2ADDR_NE(port); while (count--) _ne_outw(*buf++, portp); -#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32RPCC) +#if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_PCC) } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { pcc_iowrite(0, port, (void *)addr, sizeof(unsigned short), count, 1); } else if (port >= M32R_PCC_IOSTART1 && port <= M32R_PCC_IOEND1) { diff -Nru a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c --- a/arch/m32r/kernel/setup_mappi.c 2004-11-10 17:19:05 -08:00 +++ b/arch/m32r/kernel/setup_mappi.c 2004-11-10 17:19:05 -08:00 @@ -140,7 +140,7 @@ disable_mappi_irq(M32R_IRQ_SIO1_S); #endif /* CONFIG_SERIAL_M32R_SIO */ -#if defined(CONFIG_M32RPCC) +#if defined(CONFIG_M32R_PCC) /* INT1 : pccard0 interrupt */ irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; irq_desc[M32R_IRQ_INT1].handler = &mappi_irq_type; diff -Nru a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c --- a/arch/m32r/kernel/smpboot.c 2004-11-10 17:19:07 -08:00 +++ b/arch/m32r/kernel/smpboot.c 2004-11-10 17:19:07 -08:00 @@ -433,7 +433,7 @@ cpu_init(); smp_callin(); while (!cpu_isset(smp_processor_id(), smp_commenced_mask)) - rep_nop(); + cpu_relax(); smp_online(); @@ -482,7 +482,7 @@ /* Has the boot CPU finished it's STARTUP sequence ? */ if (cpu_isset(cpu_id, cpu_callout_map)) break; - rep_nop(); + cpu_relax(); } if (!time_before(jiffies, timeout)) { diff -Nru a/arch/m32r/lib/delay.c b/arch/m32r/lib/delay.c --- a/arch/m32r/lib/delay.c 2004-11-10 17:19:07 -08:00 +++ b/arch/m32r/lib/delay.c 2004-11-10 17:19:07 -08:00 @@ -51,7 +51,7 @@ "addi %0, #-1 \n\t" "bgtz %0, 1b \n\t" " .fillinsn \n\t" - "2:i \n\t" + "2: \n\t" : "+r" (loops) : "r" (0) ); diff -Nru a/arch/m32r/lib/memset.S b/arch/m32r/lib/memset.S --- a/arch/m32r/lib/memset.S 2004-11-10 17:19:07 -08:00 +++ b/arch/m32r/lib/memset.S 2004-11-10 17:19:07 -08:00 @@ -70,16 +70,18 @@ st r1, @+r4 bnc qword_set_loop || cmpz r2 jc r14 -word_set_wrap: +set_remainder: cmpui r2, #4 - bc byte_set + bc byte_set_wrap1 addi r2, #-4 bra word_set_loop byte_set_wrap: addi r2, #4 - addi r4, #4 || cmpz r2 + cmpz r2 jc r14 +byte_set_wrap1: + addi r4, #4 #if defined(CONFIG_ISA_M32R2) byte_set: addi r2, #-1 || stb r1, @r4+ @@ -153,18 +155,19 @@ st r1, @+r4 st r1, @+r4 bnc qword_set_loop - bnez r2, word_set_wrap + bnez r2, set_remainder jmp r14 -word_set_wrap: +set_remainder: cmpui r2, #4 - bc byte_set + bc byte_set_wrap1 addi r2, #-4 bra word_set_loop byte_set_wrap: addi r2, #4 - addi r4, #4 beqz r2, end_memset +byte_set_wrap1: + addi r4, #4 byte_set: addi r2, #-1 stb r1, @r4 diff -Nru a/arch/m68k/Kconfig b/arch/m68k/Kconfig --- a/arch/m68k/Kconfig 2004-11-10 17:19:05 -08:00 +++ b/arch/m68k/Kconfig 2004-11-10 17:19:05 -08:00 @@ -185,17 +185,19 @@ drivers for SCSI, Ethernet and serial ports later on. config HP300 - bool "HP9000/300 support" + bool "HP9000/300 and HP9000/400 support" depends on !MMU_SUN3 help - This option enables support for the HP9000/300 series of - workstations. Support for these machines is still very experimental. - If you plan to try to use the kernel on such a machine say Y here. + This option enables support for the HP9000/300 and HP9000/400 series + of workstations. Support for these machines is still somewhat + experimental. If you plan to try to use the kernel on such a machine + say Y here. Everybody else says N. config DIO bool "DIO bus support" depends on HP300 + default y help Say Y here to enable support for the "DIO" expansion bus used in HP300 machines. If you are using such a system you almost certainly @@ -582,11 +584,18 @@ config HPDCA tristate "HP DCA serial support" - depends on DIO + depends on DIO && SERIAL_8250 help If you want to use the internal "DCA" serial ports on an HP300 machine, say Y here. +config HPAPCI + tristate "HP APCI serial support" + depends on HP300 && SERIAL_8250 && EXPERIMENTAL + help + If you want to use the internal "APCI" serial ports on an HP400 + machine, say Y here. + config MVME147_SCC bool "SCC support for MVME147 serial ports" depends on MVME147 @@ -623,7 +632,7 @@ config SERIAL_CONSOLE bool "Support for serial port console" - depends on (AMIGA || ATARI || MAC || HP300 || SUN3 || SUN3X || VME || APOLLO) && (ATARI_MFPSER=y || ATARI_SCC=y || ATARI_MIDI=y || MAC_SCC=y || AMIGA_BUILTIN_SERIAL=y || GVPIOEXT=y || MULTIFACE_III_TTY=y || HPDCA=y || SERIAL=y || MVME147_SCC || SERIAL167 || MVME162_SCC || BVME6000_SCC || DN_SERIAL) + depends on (AMIGA || ATARI || MAC || SUN3 || SUN3X || VME || APOLLO) && (ATARI_MFPSER=y || ATARI_SCC=y || ATARI_MIDI=y || MAC_SCC=y || AMIGA_BUILTIN_SERIAL=y || GVPIOEXT=y || MULTIFACE_III_TTY=y || SERIAL=y || MVME147_SCC || SERIAL167 || MVME162_SCC || BVME6000_SCC || DN_SERIAL) ---help--- If you say Y here, it will be possible to use a serial port as the system console (the system console is the device which receives all diff -Nru a/arch/m68k/Makefile b/arch/m68k/Makefile --- a/arch/m68k/Makefile 2004-11-10 17:19:06 -08:00 +++ b/arch/m68k/Makefile 2004-11-10 17:19:06 -08:00 @@ -28,7 +28,7 @@ LDFLAGS_vmlinux = -N endif -CHECKFLAGS += -D__mc68000__ -I$(shell $(CC) -print-file-name=include) +CHECKFLAGS += -D__mc68000__ # without -fno-strength-reduce the 53c7xx.c driver fails ;-( CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 diff -Nru a/arch/m68k/atari/hades-pci.c b/arch/m68k/atari/hades-pci.c --- a/arch/m68k/atari/hades-pci.c 2004-11-10 17:19:04 -08:00 +++ b/arch/m68k/atari/hades-pci.c 2004-11-10 17:19:04 -08:00 @@ -311,7 +311,7 @@ * Go through all devices, fixing up irqs as we see fit: */ - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) + while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { if (dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) { diff -Nru a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68k/configs/amiga_defconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,929 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-m68k +# Thu Oct 28 21:22:56 2004 +# +CONFIG_M68K=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="-amiga" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform dependent setup +# +# CONFIG_SUN3 is not set +CONFIG_AMIGA=y +# CONFIG_ATARI is not set +# CONFIG_MAC is not set +# CONFIG_APOLLO is not set +# CONFIG_VME is not set +# CONFIG_HP300 is not set +# CONFIG_SUN3X is not set +# CONFIG_Q40 is not set + +# +# Processor type +# +CONFIG_M68020=y +CONFIG_M68030=y +CONFIG_M68040=y +CONFIG_M68060=y +CONFIG_MMU_MOTOROLA=y +CONFIG_M68KFPU_EMU=y +CONFIG_M68KFPU_EMU_EXTRAPREC=y +# CONFIG_M68KFPU_EMU_ONLY is not set +# CONFIG_ADVANCED is not set + +# +# General setup +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m +CONFIG_ZORRO=y +CONFIG_AMIGA_PCMCIA=y +# CONFIG_HEARTBEAT is not set +CONFIG_PROC_HARDWARE=y +CONFIG_ISA=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_ZORRO_NAMES=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +CONFIG_PARPORT=m +# CONFIG_PARPORT_PC is not set +CONFIG_PARPORT_AMIGA=m +CONFIG_PARPORT_MFC3=m +# CONFIG_PARPORT_OTHER is not set +CONFIG_PARPORT_1284=y + +# +# Plug and Play support +# +# CONFIG_PNP is not set + +# +# Block devices +# +CONFIG_AMIGA_FLOPPY=y +CONFIG_AMIGA_Z2RAM=y +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECD=y +CONFIG_BLK_DEV_IDETAPE=m +CONFIG_BLK_DEV_IDEFLOPPY=m +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_IDE_TASK_IOCTL is not set +# CONFIG_IDE_TASKFILE_IO is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_IDE_ARM is not set +CONFIG_BLK_DEV_GAYLE=y +CONFIG_BLK_DEV_IDEDOUBLER=y +CONFIG_BLK_DEV_BUDDHA=y +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +CONFIG_CHR_DEV_OSST=m +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_AHA152X is not set +# CONFIG_SCSI_AHA1542 is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_IN2000 is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set +# CONFIG_SCSI_PPA is not set +# CONFIG_SCSI_IMM is not set +# CONFIG_SCSI_NCR53C406A is not set +# CONFIG_SCSI_PAS16 is not set +# CONFIG_SCSI_PSI240I is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_T128 is not set +# CONFIG_SCSI_U14_34F is not set +# CONFIG_SCSI_DEBUG is not set +CONFIG_A3000_SCSI=y +CONFIG_A2091_SCSI=y +CONFIG_GVP11_SCSI=y +CONFIG_CYBERSTORM_SCSI=y +CONFIG_CYBERSTORMII_SCSI=y +CONFIG_BLZ2060_SCSI=y +CONFIG_BLZ1230_SCSI=y +CONFIG_FASTLANE_SCSI=y +CONFIG_OKTAGON_SCSI=y + +# +# Old CD-ROM drivers (not SCSI, not IDE) +# +# CONFIG_CD_NO_IDESCSI is not set + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +CONFIG_NET_KEY=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_LOCAL=y +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m +CONFIG_IP_NF_COMPAT_IPFWADM=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_LIMIT=m +CONFIG_IP6_NF_MATCH_MAC=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_MARK=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AHESP=m +CONFIG_IP6_NF_MATCH_LENGTH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_MARK=m +CONFIG_IP6_NF_RAW=m +CONFIG_XFRM=y +CONFIG_XFRM_USER=m + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +CONFIG_IPX=m +# CONFIG_IPX_INTERN is not set +CONFIG_ATALK=m +# CONFIG_DEV_APPLETALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set +CONFIG_EQUALIZER=m +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +CONFIG_ARIADNE=m +CONFIG_A2065=m +CONFIG_HYDRA=m +CONFIG_ZORRO8390=m +CONFIG_APNE=m +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_LANCE is not set +# CONFIG_NET_VENDOR_SMC is not set +# CONFIG_NET_VENDOR_RACAL is not set +# CONFIG_AT1700 is not set +# CONFIG_DEPCA is not set +# CONFIG_HP100 is not set +# CONFIG_NET_ISA is not set +# CONFIG_NET_PCI is not set +# CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PLIP=m +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_SHAPER=m +CONFIG_NETCONSOLE=m + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PARKBD is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_KEYBOARD_AMIGA=y +CONFIG_INPUT_MOUSE=y +# CONFIG_MOUSE_PS2 is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_INPORT is not set +# CONFIG_MOUSE_LOGIBM is not set +# CONFIG_MOUSE_PC110PAD is not set +CONFIG_MOUSE_AMIGA=y +# CONFIG_MOUSE_VSXXXAA is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDDLER is not set +# CONFIG_JOYSTICK_DB9 is not set +# CONFIG_JOYSTICK_GAMECON is not set +# CONFIG_JOYSTICK_TURBOGRAFX is not set +CONFIG_JOYSTICK_AMIGA=m +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set +CONFIG_A2232=m + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +CONFIG_PRINTER=m +# CONFIG_LP_CONSOLE is not set +# CONFIG_PPDEV is not set +# CONFIG_TIPAR is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_GEN_RTC=m +CONFIG_GEN_RTC_X=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_CIRRUS=m +CONFIG_FB_AMIGA=y +CONFIG_FB_AMIGA_OCS=y +CONFIG_FB_AMIGA_ECS=y +CONFIG_FB_AMIGA_AGA=y +CONFIG_FB_FM2=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +CONFIG_FONT_PEARL_8x8=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +CONFIG_SOUND=m +CONFIG_DMASOUND_PAULA=m +CONFIG_DMASOUND=m + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Character devices +# +CONFIG_AMIGA_BUILTIN_SERIAL=y +# CONFIG_WHIPPET_SERIAL is not set +CONFIG_MULTIFACE_III_TTY=m +# CONFIG_SERIAL_CONSOLE is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=y +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +CONFIG_HPFS_FS=m +# CONFIG_QNX4FS_FS is not set +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +# CONFIG_CIFS is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +CONFIG_NCPFS_NFS_NS=y +CONFIG_NCPFS_OS2_NS=y +# CONFIG_NCPFS_SMALLDOS is not set +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_AMIGA_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_TEST=m + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC32=m +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68k/configs/apollo_defconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,787 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-m68k +# Thu Oct 28 21:22:58 2004 +# +CONFIG_M68K=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="-apollo" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform dependent setup +# +# CONFIG_SUN3 is not set +# CONFIG_AMIGA is not set +# CONFIG_ATARI is not set +# CONFIG_MAC is not set +CONFIG_APOLLO=y +# CONFIG_VME is not set +# CONFIG_HP300 is not set +# CONFIG_SUN3X is not set +# CONFIG_Q40 is not set + +# +# Processor type +# +CONFIG_M68020=y +CONFIG_M68030=y +CONFIG_M68040=y +CONFIG_M68060=y +CONFIG_MMU_MOTOROLA=y +CONFIG_M68KFPU_EMU=y +CONFIG_M68KFPU_EMU_EXTRAPREC=y +# CONFIG_M68KFPU_EMU_ONLY is not set +# CONFIG_ADVANCED is not set + +# +# General setup +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m +CONFIG_HEARTBEAT=y +CONFIG_PROC_HARDWARE=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +CONFIG_NET_KEY=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_LOCAL=y +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m +CONFIG_IP_NF_COMPAT_IPFWADM=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_LIMIT=m +CONFIG_IP6_NF_MATCH_MAC=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_MARK=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AHESP=m +CONFIG_IP6_NF_MATCH_LENGTH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_MARK=m +CONFIG_IP6_NF_RAW=m +CONFIG_XFRM=y +CONFIG_XFRM_USER=m + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +CONFIG_IPX=m +# CONFIG_IPX_INTERN is not set +CONFIG_ATALK=m +# CONFIG_DEV_APPLETALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set +CONFIG_EQUALIZER=m +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +CONFIG_APOLLO_ELPLUS=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_SHAPER=m +CONFIG_NETCONSOLE=m + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_SERIAL=m +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_GEN_RTC=y +CONFIG_GEN_RTC_X=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Character devices +# +CONFIG_DN_SERIAL=y +CONFIG_SERIAL_CONSOLE=y + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +CONFIG_HPFS_FS=m +# CONFIG_QNX4FS_FS is not set +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +# CONFIG_CIFS is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +CONFIG_NCPFS_NFS_NS=y +CONFIG_NCPFS_OS2_NS=y +# CONFIG_NCPFS_SMALLDOS is not set +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_TEST=m + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC32=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68k/configs/atari_defconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,840 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-m68k +# Thu Oct 28 21:23:00 2004 +# +CONFIG_M68K=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="-atari" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform dependent setup +# +# CONFIG_SUN3 is not set +# CONFIG_AMIGA is not set +CONFIG_ATARI=y +# CONFIG_MAC is not set +# CONFIG_APOLLO is not set +# CONFIG_VME is not set +# CONFIG_HP300 is not set +# CONFIG_SUN3X is not set +# CONFIG_Q40 is not set + +# +# Processor type +# +CONFIG_M68020=y +CONFIG_M68030=y +CONFIG_M68040=y +CONFIG_M68060=y +CONFIG_MMU_MOTOROLA=y +CONFIG_M68KFPU_EMU=y +CONFIG_M68KFPU_EMU_EXTRAPREC=y +# CONFIG_M68KFPU_EMU_ONLY is not set +# CONFIG_ADVANCED is not set + +# +# General setup +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m +CONFIG_STRAM_PROC=y +CONFIG_HEARTBEAT=y +CONFIG_PROC_HARDWARE=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +CONFIG_PARPORT=m +# CONFIG_PARPORT_PC is not set +CONFIG_PARPORT_ATARI=m +# CONFIG_PARPORT_OTHER is not set +CONFIG_PARPORT_1284=y + +# +# Plug and Play support +# + +# +# Block devices +# +CONFIG_ATARI_FLOPPY=y +# CONFIG_PARIDE is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECD=y +CONFIG_BLK_DEV_IDETAPE=m +CONFIG_BLK_DEV_IDEFLOPPY=m +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_IDE_TASK_IOCTL is not set +# CONFIG_IDE_TASKFILE_IO is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_IDE_ARM is not set +CONFIG_BLK_DEV_FALCON_IDE=y +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_PPA is not set +# CONFIG_SCSI_IMM is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +CONFIG_NET_KEY=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_LOCAL=y +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m +CONFIG_IP_NF_COMPAT_IPFWADM=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_LIMIT=m +CONFIG_IP6_NF_MATCH_MAC=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_MARK=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AHESP=m +CONFIG_IP6_NF_MATCH_LENGTH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_MARK=m +CONFIG_IP6_NF_RAW=m +CONFIG_XFRM=y +CONFIG_XFRM_USER=m + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +CONFIG_IPX=m +# CONFIG_IPX_INTERN is not set +CONFIG_ATALK=m +# CONFIG_DEV_APPLETALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set +CONFIG_EQUALIZER=m +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set +CONFIG_ATARILANCE=m + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PLIP is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_SHAPER=m +CONFIG_NETCONSOLE=m + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PARKBD is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +CONFIG_INPUT_M68K_BEEP=m +CONFIG_INPUT_UINPUT=m + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +CONFIG_PRINTER=m +# CONFIG_LP_CONSOLE is not set +# CONFIG_PPDEV is not set +# CONFIG_TIPAR is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_NVRAM=y +CONFIG_GEN_RTC=y +CONFIG_GEN_RTC_X=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_ATY is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +# CONFIG_LOGO is not set + +# +# Sound +# +CONFIG_SOUND=m +CONFIG_DMASOUND_ATARI=m +CONFIG_DMASOUND=m + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Character devices +# +CONFIG_ATARI_MFPSER=m +CONFIG_ATARI_SCC=y +CONFIG_ATARI_SCC_DMA=y +CONFIG_ATARI_MIDI=m +CONFIG_ATARI_DSP56K=m +# CONFIG_SERIAL_CONSOLE is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_PROC_INFO=y +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_XFS_FS=m +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +CONFIG_HPFS_FS=m +# CONFIG_QNX4FS_FS is not set +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V4 is not set +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=m +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +# CONFIG_CIFS is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +CONFIG_NCPFS_NFS_NS=y +CONFIG_NCPFS_OS2_NS=y +# CONFIG_NCPFS_SMALLDOS is not set +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_ATARI_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_TEST=m + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC32=m +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68k/configs/bvme6000_defconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,786 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-m68k +# Thu Oct 28 21:23:01 2004 +# +CONFIG_M68K=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="-bvme6000" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform dependent setup +# +# CONFIG_SUN3 is not set +# CONFIG_AMIGA is not set +# CONFIG_ATARI is not set +# CONFIG_MAC is not set +# CONFIG_APOLLO is not set +CONFIG_VME=y +# CONFIG_MVME147 is not set +# CONFIG_MVME16x is not set +CONFIG_BVME6000=y +# CONFIG_HP300 is not set +# CONFIG_SUN3X is not set +# CONFIG_Q40 is not set + +# +# Processor type +# +# CONFIG_M68020 is not set +# CONFIG_M68030 is not set +CONFIG_M68040=y +CONFIG_M68060=y +CONFIG_MMU_MOTOROLA=y +# CONFIG_M68KFPU_EMU is not set +# CONFIG_ADVANCED is not set + +# +# General setup +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m +CONFIG_PROC_HARDWARE=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +CONFIG_NET_KEY=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_LOCAL=y +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m +CONFIG_IP_NF_COMPAT_IPFWADM=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_LIMIT=m +CONFIG_IP6_NF_MATCH_MAC=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_MARK=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AHESP=m +CONFIG_IP6_NF_MATCH_LENGTH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_MARK=m +CONFIG_IP6_NF_RAW=m +CONFIG_XFRM=y +CONFIG_XFRM_USER=m + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +CONFIG_ATALK=m +# CONFIG_DEV_APPLETALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set +CONFIG_EQUALIZER=m +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +CONFIG_BVME6000_NET=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_SHAPER=m +CONFIG_NETCONSOLE=m + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_SERIAL=m +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_GEN_RTC=m +CONFIG_GEN_RTC_X=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Character devices +# +CONFIG_BVME6000_SCC=y +CONFIG_SERIAL_CONSOLE=y + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +CONFIG_HPFS_FS=m +# CONFIG_QNX4FS_FS is not set +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +# CONFIG_CIFS is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +CONFIG_NCPFS_NFS_NS=y +CONFIG_NCPFS_OS2_NS=y +# CONFIG_NCPFS_SMALLDOS is not set +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_TEST=m + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC32=m +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68k/configs/hp300_defconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,786 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-m68k +# Thu Oct 28 21:23:04 2004 +# +CONFIG_M68K=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="-hp300" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform dependent setup +# +# CONFIG_SUN3 is not set +# CONFIG_AMIGA is not set +# CONFIG_ATARI is not set +# CONFIG_MAC is not set +# CONFIG_APOLLO is not set +# CONFIG_VME is not set +CONFIG_HP300=y +# CONFIG_DIO is not set +# CONFIG_SUN3X is not set +# CONFIG_Q40 is not set + +# +# Processor type +# +CONFIG_M68020=y +CONFIG_M68030=y +CONFIG_M68040=y +CONFIG_M68060=y +CONFIG_MMU_MOTOROLA=y +CONFIG_M68KFPU_EMU=y +CONFIG_M68KFPU_EMU_EXTRAPREC=y +# CONFIG_M68KFPU_EMU_ONLY is not set +# CONFIG_ADVANCED is not set + +# +# General setup +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m +CONFIG_HEARTBEAT=y +CONFIG_PROC_HARDWARE=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +CONFIG_NET_KEY=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_LOCAL=y +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m +CONFIG_IP_NF_COMPAT_IPFWADM=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_LIMIT=m +CONFIG_IP6_NF_MATCH_MAC=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_MARK=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AHESP=m +CONFIG_IP6_NF_MATCH_LENGTH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_MARK=m +CONFIG_IP6_NF_RAW=m +CONFIG_XFRM=y +CONFIG_XFRM_USER=m + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +CONFIG_IPX=m +# CONFIG_IPX_INTERN is not set +CONFIG_ATALK=m +# CONFIG_DEV_APPLETALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set +CONFIG_EQUALIZER=m +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +# CONFIG_HPLANCE is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_SHAPER=m +CONFIG_NETCONSOLE=m + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_SERIAL=m +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_GEN_RTC=y +CONFIG_GEN_RTC_X=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Character devices +# + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +CONFIG_HPFS_FS=m +# CONFIG_QNX4FS_FS is not set +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +# CONFIG_CIFS is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +CONFIG_NCPFS_NFS_NS=y +CONFIG_NCPFS_OS2_NS=y +# CONFIG_NCPFS_SMALLDOS is not set +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_TEST=m + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC32=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68k/configs/mac_defconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,865 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-m68k +# Thu Oct 28 21:23:06 2004 +# +CONFIG_M68K=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="-mac" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform dependent setup +# +# CONFIG_SUN3 is not set +# CONFIG_AMIGA is not set +# CONFIG_ATARI is not set +CONFIG_MAC=y +CONFIG_NUBUS=y +CONFIG_M68K_L2_CACHE=y +# CONFIG_APOLLO is not set +# CONFIG_VME is not set +# CONFIG_HP300 is not set +# CONFIG_SUN3X is not set +# CONFIG_Q40 is not set + +# +# Processor type +# +CONFIG_M68020=y +CONFIG_M68030=y +CONFIG_M68040=y +# CONFIG_M68060 is not set +CONFIG_MMU_MOTOROLA=y +CONFIG_M68KFPU_EMU=y +CONFIG_M68KFPU_EMU_EXTRAPREC=y +# CONFIG_M68KFPU_EMU_ONLY is not set +# CONFIG_ADVANCED is not set + +# +# General setup +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m +# CONFIG_HEARTBEAT is not set +CONFIG_PROC_HARDWARE=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECD=y +CONFIG_BLK_DEV_IDETAPE=m +CONFIG_BLK_DEV_IDEFLOPPY=m +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_IDE_TASK_IOCTL is not set +# CONFIG_IDE_TASKFILE_IO is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_IDE_ARM is not set +CONFIG_BLK_DEV_MAC_IDE=y +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +CONFIG_CHR_DEV_OSST=m +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DEBUG is not set +CONFIG_MAC_SCSI=y +CONFIG_SCSI_MAC_ESP=y + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Macintosh device drivers +# +CONFIG_ADB=y +CONFIG_ADB_MACII=y +CONFIG_ADB_MACIISI=y +CONFIG_ADB_IOP=y +CONFIG_ADB_PMU68K=y +CONFIG_ADB_CUDA=y +CONFIG_INPUT_ADBHID=y +CONFIG_MAC_EMUMOUSEBTN=y + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +CONFIG_NET_KEY=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_LOCAL=y +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m +CONFIG_IP_NF_COMPAT_IPFWADM=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_LIMIT=m +CONFIG_IP6_NF_MATCH_MAC=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_MARK=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AHESP=m +CONFIG_IP6_NF_MATCH_LENGTH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_MARK=m +CONFIG_IP6_NF_RAW=m +CONFIG_XFRM=y +CONFIG_XFRM_USER=m + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +CONFIG_IPX=m +# CONFIG_IPX_INTERN is not set +CONFIG_ATALK=m +CONFIG_DEV_APPLETALK=y +CONFIG_IPDDP=m +CONFIG_IPDDP_ENCAP=y +CONFIG_IPDDP_DECAP=y +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set +CONFIG_EQUALIZER=m +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +# CONFIG_MII is not set +CONFIG_MAC8390=y +CONFIG_MAC89x0=y +CONFIG_MACSONIC=y +CONFIG_MACMACE=y +# CONFIG_NET_VENDOR_SMC is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +# CONFIG_PPP_ASYNC is not set +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_SHAPER=m +CONFIG_NETCONSOLE=m + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_SERIAL=m +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_GEN_RTC=m +CONFIG_GEN_RTC_X=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_VALKYRIE=y +CONFIG_FB_MAC=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +CONFIG_FONT_6x11=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_LOGO_MAC_CLUT224=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Character devices +# +CONFIG_MAC_SCC=y +CONFIG_MAC_HID=y +CONFIG_MAC_ADBKEYCODES=y +CONFIG_SERIAL_CONSOLE=y + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=m +CONFIG_HFS_FS=y +CONFIG_HFSPLUS_FS=y +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +CONFIG_HPFS_FS=m +# CONFIG_QNX4FS_FS is not set +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +# CONFIG_CIFS is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +CONFIG_NCPFS_NFS_NS=y +CONFIG_NCPFS_OS2_NS=y +# CONFIG_NCPFS_SMALLDOS is not set +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_LDM_PARTITION=y +CONFIG_LDM_DEBUG=y +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +CONFIG_SUN_PARTITION=y +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_TEST=m + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC32=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68k/configs/mvme147_defconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,804 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-m68k +# Thu Oct 28 21:23:08 2004 +# +CONFIG_M68K=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="-mvme147" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform dependent setup +# +# CONFIG_SUN3 is not set +# CONFIG_AMIGA is not set +# CONFIG_ATARI is not set +# CONFIG_MAC is not set +# CONFIG_APOLLO is not set +CONFIG_VME=y +CONFIG_MVME147=y +# CONFIG_MVME16x is not set +# CONFIG_BVME6000 is not set +# CONFIG_HP300 is not set +# CONFIG_SUN3X is not set +# CONFIG_Q40 is not set + +# +# Processor type +# +# CONFIG_M68020 is not set +CONFIG_M68030=y +# CONFIG_M68040 is not set +# CONFIG_M68060 is not set +CONFIG_MMU_MOTOROLA=y +# CONFIG_M68KFPU_EMU is not set +# CONFIG_ADVANCED is not set + +# +# General setup +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m +CONFIG_PROC_HARDWARE=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DEBUG is not set +CONFIG_MVME147_SCSI=y + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +CONFIG_NET_KEY=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_LOCAL=y +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m +CONFIG_IP_NF_COMPAT_IPFWADM=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_LIMIT=m +CONFIG_IP6_NF_MATCH_MAC=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_MARK=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AHESP=m +CONFIG_IP6_NF_MATCH_LENGTH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_MARK=m +CONFIG_IP6_NF_RAW=m +CONFIG_XFRM=y +CONFIG_XFRM_USER=m + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +CONFIG_IPX=m +# CONFIG_IPX_INTERN is not set +CONFIG_ATALK=m +# CONFIG_DEV_APPLETALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set +CONFIG_EQUALIZER=m +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +CONFIG_MVME147_NET=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_SHAPER=m +CONFIG_NETCONSOLE=m + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_SERIAL=m +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_GEN_RTC=m +CONFIG_GEN_RTC_X=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Character devices +# +CONFIG_MVME147_SCC=y +CONFIG_SERIAL_CONSOLE=y + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +CONFIG_DEVFS_FS=y +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +CONFIG_HPFS_FS=m +# CONFIG_QNX4FS_FS is not set +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +# CONFIG_CIFS is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_TEST=m + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC32=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68k/configs/mvme16x_defconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,803 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-m68k +# Thu Oct 28 21:23:09 2004 +# +CONFIG_M68K=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="-mvme16x" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform dependent setup +# +# CONFIG_SUN3 is not set +# CONFIG_AMIGA is not set +# CONFIG_ATARI is not set +# CONFIG_MAC is not set +# CONFIG_APOLLO is not set +CONFIG_VME=y +# CONFIG_MVME147 is not set +CONFIG_MVME16x=y +# CONFIG_BVME6000 is not set +# CONFIG_HP300 is not set +# CONFIG_SUN3X is not set +# CONFIG_Q40 is not set + +# +# Processor type +# +# CONFIG_M68020 is not set +# CONFIG_M68030 is not set +CONFIG_M68040=y +CONFIG_M68060=y +CONFIG_MMU_MOTOROLA=y +# CONFIG_M68KFPU_EMU is not set +# CONFIG_ADVANCED is not set + +# +# General setup +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m +CONFIG_PROC_HARDWARE=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +CONFIG_NET_KEY=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_LOCAL=y +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m +CONFIG_IP_NF_COMPAT_IPFWADM=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_LIMIT=m +CONFIG_IP6_NF_MATCH_MAC=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_MARK=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AHESP=m +CONFIG_IP6_NF_MATCH_LENGTH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_MARK=m +CONFIG_IP6_NF_RAW=m +CONFIG_XFRM=y +CONFIG_XFRM_USER=m + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +CONFIG_IPX=m +# CONFIG_IPX_INTERN is not set +CONFIG_ATALK=m +# CONFIG_DEV_APPLETALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set +CONFIG_EQUALIZER=m +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +CONFIG_MVME16x_NET=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_SHAPER=m +CONFIG_NETCONSOLE=m + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_SERIAL=m +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_GEN_RTC=m +CONFIG_GEN_RTC_X=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Character devices +# +CONFIG_MVME162_SCC=y +CONFIG_SERIAL_CONSOLE=y + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +CONFIG_DEVFS_FS=y +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +CONFIG_HPFS_FS=m +# CONFIG_QNX4FS_FS is not set +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +# CONFIG_CIFS is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_TEST=m + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC32=m +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68k/configs/q40_defconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,878 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-m68k +# Thu Oct 28 21:23:11 2004 +# +CONFIG_M68K=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="-q40" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform dependent setup +# +# CONFIG_SUN3 is not set +# CONFIG_AMIGA is not set +# CONFIG_ATARI is not set +# CONFIG_MAC is not set +# CONFIG_APOLLO is not set +# CONFIG_VME is not set +# CONFIG_HP300 is not set +# CONFIG_SUN3X is not set +CONFIG_Q40=y + +# +# Processor type +# +# CONFIG_M68020 is not set +# CONFIG_M68030 is not set +CONFIG_M68040=y +CONFIG_M68060=y +CONFIG_MMU_MOTOROLA=y +CONFIG_M68KFPU_EMU=y +CONFIG_M68KFPU_EMU_EXTRAPREC=y +# CONFIG_M68KFPU_EMU_ONLY is not set +# CONFIG_ADVANCED is not set + +# +# General setup +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m +# CONFIG_HEARTBEAT is not set +CONFIG_PROC_HARDWARE=y +CONFIG_ISA=y +CONFIG_GENERIC_ISA_DMA=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# +# CONFIG_PNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECD=y +CONFIG_BLK_DEV_IDETAPE=m +CONFIG_BLK_DEV_IDEFLOPPY=m +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_IDE_TASK_IOCTL is not set +# CONFIG_IDE_TASKFILE_IO is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_IDE_ARM is not set +CONFIG_BLK_DEV_Q40IDE=y +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_AHA152X is not set +# CONFIG_SCSI_AHA1542 is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_IN2000 is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set +# CONFIG_SCSI_NCR53C406A is not set +# CONFIG_SCSI_PAS16 is not set +# CONFIG_SCSI_PSI240I is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_T128 is not set +# CONFIG_SCSI_U14_34F is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Old CD-ROM drivers (not SCSI, not IDE) +# +# CONFIG_CD_NO_IDESCSI is not set + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +CONFIG_NET_KEY=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_LOCAL=y +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m +CONFIG_IP_NF_COMPAT_IPFWADM=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_LIMIT=m +CONFIG_IP6_NF_MATCH_MAC=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_MARK=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AHESP=m +CONFIG_IP6_NF_MATCH_LENGTH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_MARK=m +CONFIG_IP6_NF_RAW=m +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +CONFIG_IPX=m +# CONFIG_IPX_INTERN is not set +CONFIG_ATALK=m +# CONFIG_DEV_APPLETALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set +CONFIG_EQUALIZER=m +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_LANCE is not set +# CONFIG_NET_VENDOR_SMC is not set +# CONFIG_NET_VENDOR_RACAL is not set +# CONFIG_AT1700 is not set +# CONFIG_DEPCA is not set +# CONFIG_HP100 is not set +# CONFIG_NET_ISA is not set +CONFIG_NE2000=m +# CONFIG_NET_PCI is not set +# CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_SHAPER=m +CONFIG_NETCONSOLE=m + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=m +# CONFIG_SERIO_I8042 is not set +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_CT82C710 is not set +CONFIG_SERIO_Q40KBD=m +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_SERIAL=m +# CONFIG_MOUSE_INPORT is not set +# CONFIG_MOUSE_LOGIBM is not set +# CONFIG_MOUSE_PC110PAD is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_GEN_RTC=m +CONFIG_GEN_RTC_X=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_Q40=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +CONFIG_SOUND=y +CONFIG_DMASOUND_Q40=y +CONFIG_DMASOUND=y + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Character devices +# + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +CONFIG_HPFS_FS=m +# CONFIG_QNX4FS_FS is not set +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +CONFIG_UFS_FS_WRITE=y + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +# CONFIG_CIFS is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_TEST=m + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC32=m +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68k/configs/sun3_defconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,791 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-m68k +# Thu Oct 28 21:23:13 2004 +# +CONFIG_M68K=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="-sun3" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform dependent setup +# +CONFIG_SUN3=y + +# +# Processor type +# +CONFIG_M68020=y +CONFIG_MMU_SUN3=y +CONFIG_M68KFPU_EMU=y +CONFIG_M68KFPU_EMU_EXTRAPREC=y +# CONFIG_M68KFPU_EMU_ONLY is not set +# CONFIG_ADVANCED is not set + +# +# General setup +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m +CONFIG_PROC_HARDWARE=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DEBUG is not set +CONFIG_SUN3_SCSI=y + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +CONFIG_NET_KEY=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_LOCAL=y +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m +CONFIG_IP_NF_COMPAT_IPFWADM=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_LIMIT=m +CONFIG_IP6_NF_MATCH_MAC=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_MARK=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AHESP=m +CONFIG_IP6_NF_MATCH_LENGTH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_MARK=m +CONFIG_IP6_NF_RAW=m +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +CONFIG_IPX=m +# CONFIG_IPX_INTERN is not set +CONFIG_ATALK=m +# CONFIG_DEV_APPLETALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set +CONFIG_EQUALIZER=m +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +CONFIG_SUN3LANCE=y +CONFIG_SUN3_82586=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_SHAPER=m +CONFIG_NETCONSOLE=m + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_SUNKBD=y +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_SERIAL=m +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_GEN_RTC=y +CONFIG_GEN_RTC_X=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Character devices +# + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +CONFIG_HPFS_FS=m +# CONFIG_QNX4FS_FS is not set +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +CONFIG_UFS_FS_WRITE=y + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +# CONFIG_CIFS is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_TEST=m + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC32=m +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68k/configs/sun3x_defconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,801 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-m68k +# Thu Oct 28 21:23:15 2004 +# +CONFIG_M68K=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="-sun3x" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform dependent setup +# +# CONFIG_SUN3 is not set +# CONFIG_AMIGA is not set +# CONFIG_ATARI is not set +# CONFIG_MAC is not set +# CONFIG_APOLLO is not set +# CONFIG_VME is not set +# CONFIG_HP300 is not set +CONFIG_SUN3X=y +# CONFIG_Q40 is not set + +# +# Processor type +# +# CONFIG_M68020 is not set +CONFIG_M68030=y +# CONFIG_M68040 is not set +# CONFIG_M68060 is not set +CONFIG_MMU_MOTOROLA=y +CONFIG_M68KFPU_EMU=y +CONFIG_M68KFPU_EMU_EXTRAPREC=y +# CONFIG_M68KFPU_EMU_ONLY is not set +# CONFIG_ADVANCED is not set + +# +# General setup +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m +CONFIG_PROC_HARDWARE=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DEBUG is not set +CONFIG_SUN3X_ESP=y + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +CONFIG_NET_KEY=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=m + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_TUNNEL=m +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_LOCAL=y +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m +CONFIG_IP_NF_COMPAT_IPFWADM=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_LIMIT=m +CONFIG_IP6_NF_MATCH_MAC=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_MARK=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AHESP=m +CONFIG_IP6_NF_MATCH_LENGTH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_MARK=m +CONFIG_IP6_NF_RAW=m +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +CONFIG_IPX=m +# CONFIG_IPX_INTERN is not set +CONFIG_ATALK=m +# CONFIG_DEV_APPLETALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set +CONFIG_EQUALIZER=m +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +CONFIG_SUN3LANCE=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +CONFIG_SHAPER=m +CONFIG_NETCONSOLE=m + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_SUNKBD=y +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_SERIAL=m +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_GEN_RTC=y +CONFIG_GEN_RTC_X=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Character devices +# + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +CONFIG_HPFS_FS=m +# CONFIG_QNX4FS_FS is not set +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +CONFIG_UFS_FS_WRITE=y + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +# CONFIG_CIFS is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_TEST=m + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC32=m +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/m68k/defconfig b/arch/m68k/defconfig --- a/arch/m68k/defconfig 2004-11-10 17:19:02 -08:00 +++ b/arch/m68k/defconfig 2004-11-10 17:19:02 -08:00 @@ -1,28 +1,62 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-m68k +# Thu Oct 28 21:23:03 2004 # +CONFIG_M68K=y +CONFIG_MMU=y CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +# CONFIG_MODULES is not set # # Platform dependent setup # -# CONFIG_ISA is not set -# CONFIG_PCMCIA is not set +# CONFIG_SUN3 is not set CONFIG_AMIGA=y # CONFIG_ATARI is not set -# CONFIG_HADES is not set -# CONFIG_PCI is not set # CONFIG_MAC is not set # CONFIG_APOLLO is not set # CONFIG_VME is not set # CONFIG_HP300 is not set # CONFIG_SUN3X is not set -# CONFIG_SUN3 is not set # CONFIG_Q40 is not set # @@ -32,84 +66,165 @@ CONFIG_M68030=y CONFIG_M68040=y # CONFIG_M68060 is not set +CONFIG_MMU_MOTOROLA=y # CONFIG_M68KFPU_EMU is not set # CONFIG_ADVANCED is not set # # General setup # -CONFIG_NET=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=y CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set CONFIG_ZORRO=y # CONFIG_AMIGA_PCMCIA is not set # CONFIG_HEARTBEAT is not set CONFIG_PROC_HARDWARE=y +# CONFIG_ZORRO_NAMES is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# # CONFIG_PARPORT is not set -# CONFIG_PRINTER is not set # -# Loadable module support +# Plug and Play support # -# CONFIG_MODULES is not set # # Block devices # -# CONFIG_BLK_DEV_FD is not set CONFIG_AMIGA_FLOPPY=y # CONFIG_AMIGA_Z2RAM is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_MD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y # +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=y +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +# CONFIG_CHR_DEV_SG is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DEBUG is not set +CONFIG_A3000_SCSI=y +CONFIG_A2091_SCSI=y +CONFIG_GVP11_SCSI=y +# CONFIG_CYBERSTORM_SCSI is not set +# CONFIG_CYBERSTORMII_SCSI is not set +# CONFIG_BLZ2060_SCSI is not set +# CONFIG_BLZ1230_SCSI is not set +# CONFIG_FASTLANE_SCSI is not set +# CONFIG_OKTAGON_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# # Networking options # CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set -# CONFIG_NETLINK is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set +# CONFIG_NETLINK_DEV is not set CONFIG_UNIX=y +# CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set -# CONFIG_IP_ROUTER is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set -# CONFIG_IP_ALIAS is not set +# CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set - -# -# (it is safe to leave these untouched) -# -# CONFIG_SKB_LARGE is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set # CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set -# CONFIG_ATM is not set +# CONFIG_NETFILTER is not set # +# SCTP Configuration (EXPERIMENTAL) # -# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set -# CONFIG_DECNET is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_BRIDGE is not set -# CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_HW_FLOWCONTROL is not set @@ -118,150 +233,310 @@ # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # -# ATA/IDE/MFM/RLL support +# Network testing # -# CONFIG_IDE is not set -# CONFIG_BLK_DEV_HD is not set +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # -# SCSI support +# Ethernet (10 or 100Mbit) # -CONFIG_SCSI=y +# CONFIG_NET_ETHERNET is not set # -# SCSI support type (disk, tape, CD-ROM) +# Ethernet (1000 Mbit) # -CONFIG_BLK_DEV_SD=y -CONFIG_SD_EXTRA_DEVS=40 -CONFIG_CHR_DEV_ST=y -CONFIG_ST_EXTRA_DEVS=2 -CONFIG_BLK_DEV_SR=y -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_SR_EXTRA_DEVS=2 -# CONFIG_CHR_DEV_SG is not set # -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# Ethernet (10000 Mbit) # -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -# CONFIG_SCSI_LOGGING is not set # -# SCSI low-level drivers +# Token Ring devices # -CONFIG_A3000_SCSI=y -# CONFIG_A4000T_SCSI is not set -CONFIG_A2091_SCSI=y -CONFIG_GVP11_SCSI=y -# CONFIG_CYBERSTORM_SCSI is not set -# CONFIG_CYBERSTORMII_SCSI is not set -# CONFIG_BLZ2060_SCSI is not set -# CONFIG_BLZ1230_SCSI is not set -# CONFIG_FASTLANE_SCSI is not set -# CONFIG_A4091_SCSI is not set -# CONFIG_WARPENGINE_SCSI is not set -# CONFIG_BLZ603EPLUS_SCSI is not set -# CONFIG_OKTAGON_SCSI is not set # -# Network device support +# Wireless LAN (non-hamradio) # -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_SLIP is not set +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set # CONFIG_PPP is not set -# CONFIG_EQUALIZER is not set -# CONFIG_ARIADNE is not set -# CONFIG_ZORRO8390 is not set -# CONFIG_A2065 is not set -# CONFIG_HYDRA is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_AMIGA is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_AMIGA is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set # # Character devices # CONFIG_VT=y CONFIG_VT_CONSOLE=y -CONFIG_BUSMOUSE=y -CONFIG_AMIGA_BUILTIN_SERIAL=y -# CONFIG_GVPIOEXT is not set -# CONFIG_GVPIOEXT_LP is not set -# CONFIG_GVPIOEXT_PLIP is not set -# CONFIG_MULTIFACE_III_TTY is not set -# CONFIG_SUN3X_ZS is not set -# CONFIG_SUN_KEYBOARD is not set -# CONFIG_SUN_MOUSE is not set -# CONFIG_SBUS is not set -# CONFIG_SERIAL_CONSOLE is not set -# CONFIG_USERIAL is not set -# CONFIG_WATCHDOG is not set +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_A2232 is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # -# Sound support +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_CIRRUS is not set +CONFIG_FB_AMIGA=y +CONFIG_FB_AMIGA_OCS=y +CONFIG_FB_AMIGA_ECS=y +CONFIG_FB_AMIGA_AGA=y +# CONFIG_FB_FM2 is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set + +# +# Sound # # CONFIG_SOUND is not set # +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Character devices +# +CONFIG_AMIGA_BUILTIN_SERIAL=y +# CONFIG_MULTIFACE_III_TTY is not set +# CONFIG_GVPIOEXT is not set +# CONFIG_SERIAL_CONSOLE is not set + +# # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +# CONFIG_VFAT_FS is not set +CONFIG_FAT_DEFAULT_CODEPAGE=437 +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -CONFIG_MINIX_FS=y -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set +# CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set # CONFIG_UFS_FS is not set # # Network File Systems # -# CONFIG_CODA_FS is not set CONFIG_NFS_FS=y -# CONFIG_ROOT_NFS is not set +# CONFIG_NFS_V3 is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set -CONFIG_SUNRPC=y CONFIG_LOCKD=y +# CONFIG_EXPORTFS is not set +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_AMIGA_PARTITION=y -CONFIG_NLS=y # # Native Language Support # +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set @@ -277,7 +552,15 @@ # CONFIG_NLS_CODEPAGE_865 is not set # CONFIG_NLS_CODEPAGE_866 is not set # CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -285,44 +568,32 @@ # CONFIG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set # CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set # -# Console drivers +# Kernel hacking # -CONFIG_FB=y +# CONFIG_DEBUG_KERNEL is not set # -# Frame-buffer support +# Security options # -CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FB_CLGEN is not set -# CONFIG_FB_PM2 is not set -CONFIG_FB_AMIGA=y -CONFIG_FB_AMIGA_OCS=y -CONFIG_FB_AMIGA_ECS=y -CONFIG_FB_AMIGA_AGA=y -# CONFIG_FB_CYBER is not set -# CONFIG_FB_VIRGE is not set -# CONFIG_FB_RETINAZ3 is not set -# CONFIG_FB_FM2 is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FBCON_ADVANCED is not set -CONFIG_FBCON_MFB=y -CONFIG_FBCON_AFB=y -CONFIG_FBCON_ILBM=y -# CONFIG_FBCON_FONTWIDTH8_ONLY is not set -# CONFIG_FBCON_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_FONT_PEARL_8x8=y +# CONFIG_SECURITY is not set # -# Kernel hacking +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines # -# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/m68k/hp300/config.c b/arch/m68k/hp300/config.c --- a/arch/m68k/hp300/config.c 2004-11-10 17:19:02 -08:00 +++ b/arch/m68k/hp300/config.c 2004-11-10 17:19:02 -08:00 @@ -8,55 +8,272 @@ */ #include -#include -#include -#include -#include -#include -#include +#include #include +#include +#include +#include + +#include #include #include -#include /* hwreg_present() */ +#include /* readb() and writeb() */ +#include +#include #include "ints.h" #include "time.h" +unsigned long hp300_model; +unsigned long hp300_uart_scode = -1; +unsigned char ledstate; + +static char s_hp330[] __initdata = "330"; +static char s_hp340[] __initdata = "340"; +static char s_hp345[] __initdata = "345"; +static char s_hp360[] __initdata = "360"; +static char s_hp370[] __initdata = "370"; +static char s_hp375[] __initdata = "375"; +static char s_hp380[] __initdata = "380"; +static char s_hp385[] __initdata = "385"; +static char s_hp400[] __initdata = "400"; +static char s_hp425t[] __initdata = "425t"; +static char s_hp425s[] __initdata = "425s"; +static char s_hp425e[] __initdata = "425e"; +static char s_hp433t[] __initdata = "433t"; +static char s_hp433s[] __initdata = "433s"; +static char *hp300_models[] __initdata = { + [HP_320] = NULL, + [HP_330] = s_hp330, + [HP_340] = s_hp340, + [HP_345] = s_hp345, + [HP_350] = NULL, + [HP_360] = s_hp360, + [HP_370] = s_hp370, + [HP_375] = s_hp375, + [HP_380] = s_hp380, + [HP_385] = s_hp385, + [HP_400] = s_hp400, + [HP_425T] = s_hp425t, + [HP_425S] = s_hp425s, + [HP_425E] = s_hp425e, + [HP_433T] = s_hp433t, + [HP_433S] = s_hp433s, +}; + +static char hp300_model_name[13] = "HP9000/"; + extern void hp300_reset(void); extern irqreturn_t (*hp300_default_handler[])(int, void *, struct pt_regs *); extern int show_hp300_interrupts(struct seq_file *, void *); +#ifdef CONFIG_SERIAL_8250_CONSOLE +extern int hp300_setup_serial_console(void) __init; +#endif + +int __init hp300_parse_bootinfo(const struct bi_record *record) +{ + int unknown = 0; + const unsigned long *data = record->data; + + switch (record->tag) { + case BI_HP300_MODEL: + hp300_model = *data; + break; + + case BI_HP300_UART_SCODE: + hp300_uart_scode = *data; + break; + + case BI_HP300_UART_ADDR: + /* serial port address: ignored here */ + break; + + default: + unknown = 1; + } + + return unknown; +} #ifdef CONFIG_HEARTBEAT static void hp300_pulse(int x) { - if (x) - blinken_leds(0xfe); - else - blinken_leds(0xff); + if (x) + blinken_leds(0x10, 0); + else + blinken_leds(0, 0x10); } #endif static void hp300_get_model(char *model) { - strcpy(model, "HP9000/300"); + strcpy(model, hp300_model_name); +} + +#define RTCBASE 0xf0420000 +#define RTC_DATA 0x1 +#define RTC_CMD 0x3 + +#define RTC_BUSY 0x02 +#define RTC_DATA_RDY 0x01 + +#define rtc_busy() (in_8(RTCBASE + RTC_CMD) & RTC_BUSY) +#define rtc_data_available() (in_8(RTCBASE + RTC_CMD) & RTC_DATA_RDY) +#define rtc_status() (in_8(RTCBASE + RTC_CMD)) +#define rtc_command(x) out_8(RTCBASE + RTC_CMD, (x)) +#define rtc_read_data() (in_8(RTCBASE + RTC_DATA)) +#define rtc_write_data(x) out_8(RTCBASE + RTC_DATA, (x)) + +#define RTC_SETREG 0xe0 +#define RTC_WRITEREG 0xc2 +#define RTC_READREG 0xc3 + +#define RTC_REG_SEC2 0 +#define RTC_REG_SEC1 1 +#define RTC_REG_MIN2 2 +#define RTC_REG_MIN1 3 +#define RTC_REG_HOUR2 4 +#define RTC_REG_HOUR1 5 +#define RTC_REG_WDAY 6 +#define RTC_REG_DAY2 7 +#define RTC_REG_DAY1 8 +#define RTC_REG_MON2 9 +#define RTC_REG_MON1 10 +#define RTC_REG_YEAR2 11 +#define RTC_REG_YEAR1 12 + +#define RTC_HOUR1_24HMODE 0x8 + +#define RTC_STAT_MASK 0xf0 +#define RTC_STAT_RDY 0x40 + +static inline unsigned char hp300_rtc_read(unsigned char reg) +{ + unsigned char s, ret; + unsigned long flags; + + local_irq_save(flags); + + while (rtc_busy()); + rtc_command(RTC_SETREG); + while (rtc_busy()); + rtc_write_data(reg); + while (rtc_busy()); + rtc_command(RTC_READREG); + + do { + while (!rtc_data_available()); + s = rtc_status(); + ret = rtc_read_data(); + } while ((s & RTC_STAT_MASK) != RTC_STAT_RDY); + + local_irq_restore(flags); + + return ret; +} + +static inline unsigned char hp300_rtc_write(unsigned char reg, + unsigned char val) +{ + unsigned char s, ret; + unsigned long flags; + + local_irq_save(flags); + + while (rtc_busy()); + rtc_command(RTC_SETREG); + while (rtc_busy()); + rtc_write_data((val << 4) | reg); + while (rtc_busy()); + rtc_command(RTC_WRITEREG); + while (rtc_busy()); + rtc_command(RTC_READREG); + + do { + while (!rtc_data_available()); + s = rtc_status(); + ret = rtc_read_data(); + } while ((s & RTC_STAT_MASK) != RTC_STAT_RDY); + + local_irq_restore(flags); + + return ret; +} + +static int hp300_hwclk(int op, struct rtc_time *t) +{ + if (!op) { /* read */ + t->tm_sec = hp300_rtc_read(RTC_REG_SEC1) * 10 + + hp300_rtc_read(RTC_REG_SEC2); + t->tm_min = hp300_rtc_read(RTC_REG_MIN1) * 10 + + hp300_rtc_read(RTC_REG_MIN2); + t->tm_hour = (hp300_rtc_read(RTC_REG_HOUR1) & 3) * 10 + + hp300_rtc_read(RTC_REG_HOUR2); + t->tm_wday = -1; + t->tm_mday = hp300_rtc_read(RTC_REG_DAY1) * 10 + + hp300_rtc_read(RTC_REG_DAY2); + t->tm_mon = hp300_rtc_read(RTC_REG_MON1) * 10 + + hp300_rtc_read(RTC_REG_MON2) - 1; + t->tm_year = hp300_rtc_read(RTC_REG_YEAR1) * 10 + + hp300_rtc_read(RTC_REG_YEAR2); + if (t->tm_year <= 69) + t->tm_year += 100; + } else { + hp300_rtc_write(RTC_REG_SEC1, t->tm_sec / 10); + hp300_rtc_write(RTC_REG_SEC2, t->tm_sec % 10); + hp300_rtc_write(RTC_REG_MIN1, t->tm_min / 10); + hp300_rtc_write(RTC_REG_MIN2, t->tm_min % 10); + hp300_rtc_write(RTC_REG_HOUR1, + ((t->tm_hour / 10) & 3) | RTC_HOUR1_24HMODE); + hp300_rtc_write(RTC_REG_HOUR2, t->tm_hour % 10); + hp300_rtc_write(RTC_REG_DAY1, t->tm_mday / 10); + hp300_rtc_write(RTC_REG_DAY2, t->tm_mday % 10); + hp300_rtc_write(RTC_REG_MON1, (t->tm_mon + 1) / 10); + hp300_rtc_write(RTC_REG_MON2, (t->tm_mon + 1) % 10); + if (t->tm_year >= 100) + t->tm_year -= 100; + hp300_rtc_write(RTC_REG_YEAR1, t->tm_year / 10); + hp300_rtc_write(RTC_REG_YEAR2, t->tm_year % 10); + } + + return 0; +} + +static unsigned int hp300_get_ss(void) +{ + return hp300_rtc_read(RTC_REG_SEC1) * 10 + + hp300_rtc_read(RTC_REG_SEC2); } void __init config_hp300(void) { - mach_sched_init = hp300_sched_init; - mach_init_IRQ = hp300_init_IRQ; - mach_request_irq = hp300_request_irq; - mach_free_irq = hp300_free_irq; - mach_get_model = hp300_get_model; - mach_get_irq_list = show_hp300_interrupts; - mach_gettimeoffset = hp300_gettimeoffset; - mach_default_handler = &hp300_default_handler; - mach_reset = hp300_reset; + mach_sched_init = hp300_sched_init; + mach_init_IRQ = hp300_init_IRQ; + mach_request_irq = hp300_request_irq; + mach_free_irq = hp300_free_irq; + mach_get_model = hp300_get_model; + mach_get_irq_list = show_hp300_interrupts; + mach_gettimeoffset = hp300_gettimeoffset; + mach_default_handler = &hp300_default_handler; + mach_hwclk = hp300_hwclk; + mach_get_ss = hp300_get_ss; + mach_reset = hp300_reset; #ifdef CONFIG_HEARTBEAT - mach_heartbeat = hp300_pulse; + mach_heartbeat = hp300_pulse; #endif #ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; + conswitchp = &dummy_con; +#endif + mach_max_dma_address = 0xffffffff; + + if (hp300_model >= HP_330 && hp300_model <= HP_433S && hp300_model != HP_350) { + printk(KERN_INFO "Detected HP9000 model %s\n", hp300_models[hp300_model-HP_320]); + strcat(hp300_model_name, hp300_models[hp300_model-HP_320]); + } + else { + panic("Unknown HP9000 Model"); + } +#ifdef CONFIG_SERIAL_8250_CONSOLE + hp300_setup_serial_console(); #endif - mach_max_dma_address = 0xffffffff; } diff -Nru a/arch/m68k/hp300/ints.c b/arch/m68k/hp300/ints.c --- a/arch/m68k/hp300/ints.c 2004-11-10 17:19:05 -08:00 +++ b/arch/m68k/hp300/ints.c 2004-11-10 17:19:05 -08:00 @@ -57,14 +57,21 @@ return IRQ_HANDLED; } +static irqreturn_t hp300_badint(int irq, void *dev_id, struct pt_regs *fp) +{ + num_spurious += 1; + return IRQ_NONE; +} + irqreturn_t (*hp300_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = { - [0] = hp300_int_handler, + [0] = hp300_badint, [1] = hp300_int_handler, [2] = hp300_int_handler, [3] = hp300_int_handler, [4] = hp300_int_handler, [5] = hp300_int_handler, [6] = hp300_int_handler, + [7] = hp300_int_handler }; /* dev_id had better be unique to each handler because it's the only way we have diff -Nru a/arch/m68k/hp300/reboot.S b/arch/m68k/hp300/reboot.S --- a/arch/m68k/hp300/reboot.S 2004-11-10 17:19:03 -08:00 +++ b/arch/m68k/hp300/reboot.S 2004-11-10 17:19:03 -08:00 @@ -13,23 +13,4 @@ .globl hp300_reset hp300_reset: - .chip 68030 - oriw #0x0700,%sr /* cli() */ - movel hp300_phys_ram_base, %d1 - movel #0, %d0 - movec %d0, %vbr /* reset vector table */ - lea zero, %a0 - lea 1f, %a1 - add %d1, %a0 - add %d1, %a1 - pmove %tc, %a0@ - bclr #7, %a0@ - pmove %a0@, %tc /* goodbye MMU */ - jmp %a1@ -1: movel #0x808, %d0 - movec %d0, %cacr /* cache off */ - moveb #0, 0x1ffff - movel #0x1a4, %a0 - jmp %a0@ - -zero: .quad 0 + jmp hp300_reset diff -Nru a/arch/m68k/hp300/time.c b/arch/m68k/hp300/time.c --- a/arch/m68k/hp300/time.c 2004-11-10 17:19:06 -08:00 +++ b/arch/m68k/hp300/time.c 2004-11-10 17:19:06 -08:00 @@ -17,6 +17,7 @@ #include #include #include +#include #include "ints.h" /* Clock hardware definitions */ @@ -38,11 +39,13 @@ static irqreturn_t hp300_tick(int irq, void *dev_id, struct pt_regs *regs) { - unsigned long tmp; - irqreturn_t (*vector)(int, void *, struct pt_regs *) = dev_id; - in_8(CLOCKBASE + CLKSR); - asm volatile ("movpw %1@(5),%0" : "=d" (tmp) : "a" (CLOCKBASE)); - return vector(irq, NULL, regs); + unsigned long tmp; + irqreturn_t (*vector)(int, void *, struct pt_regs *) = dev_id; + in_8(CLOCKBASE + CLKSR); + asm volatile ("movpw %1@(5),%0" : "=d" (tmp) : "a" (CLOCKBASE)); + /* Turn off the network and SCSI leds */ + blinken_leds(0, 0xe0); + return vector(irq, NULL, regs); } unsigned long hp300_gettimeoffset(void) diff -Nru a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S --- a/arch/m68k/kernel/entry.S 2004-11-10 17:19:02 -08:00 +++ b/arch/m68k/kernel/entry.S 2004-11-10 17:19:02 -08:00 @@ -663,3 +663,47 @@ .long sys_lremovexattr .long sys_fremovexattr .long sys_futex /* 235 */ + .long sys_sendfile64 + .long sys_mincore + .long sys_madvise + .long sys_fcntl64 + .long sys_readahead /* 240 */ + .long sys_io_setup + .long sys_io_destroy + .long sys_io_getevents + .long sys_io_submit + .long sys_io_cancel /* 245 */ + .long sys_fadvise64 + .long sys_exit_group + .long sys_lookup_dcookie + .long sys_epoll_create + .long sys_epoll_ctl /* 250 */ + .long sys_epoll_wait + .long sys_remap_file_pages + .long sys_set_tid_address + .long sys_timer_create + .long sys_timer_settime /* 255 */ + .long sys_timer_gettime + .long sys_timer_getoverrun + .long sys_timer_delete + .long sys_clock_settime + .long sys_clock_gettime /* 260 */ + .long sys_clock_getres + .long sys_clock_nanosleep + .long sys_statfs64 + .long sys_fstatfs64 + .long sys_tgkill /* 265 */ + .long sys_utimes + .long sys_fadvise64_64 + .long sys_mbind + .long sys_get_mempolicy + .long sys_set_mempolicy /* 270 */ + .long sys_mq_open + .long sys_mq_unlink + .long sys_mq_timedsend + .long sys_mq_timedreceive + .long sys_mq_notify /* 275 */ + .long sys_mq_getsetattr + .long sys_waitid + .long sys_ni_syscall /* for sys_vserver */ + diff -Nru a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S --- a/arch/m68k/kernel/head.S 2004-11-10 17:19:07 -08:00 +++ b/arch/m68k/kernel/head.S 2004-11-10 17:19:07 -08:00 @@ -24,6 +24,7 @@ ** 1998/08/30 David Kilzer: Added support for font_desc structures ** for linux-2.1.115 ** 9/02/11 Richard Zidlicky: added Q40 support (initial vesion 99/01/01) +** 2004/05/13 Kars de Jong: Finalised HP300 support ** ** This file is subject to the terms and conditions of the GNU General Public ** License. See the file README.legal in the main directory of this archive @@ -313,9 +314,6 @@ #ifdef CONFIG_Q40 .globl q40_mem_cptr #endif -#ifdef CONFIG_HP300 -.globl hp300_phys_ram_base -#endif CPUTYPE_040 = 1 /* indicates an 040 */ CPUTYPE_060 = 2 /* indicates an 060 */ @@ -467,7 +465,7 @@ func_define mmu_get_page_table_entry,2 func_define mmu_print func_define get_new_page -#ifdef CONFIG_HP300 +#if defined(CONFIG_HP300) || defined(CONFIG_APOLLO) func_define set_leds #endif @@ -594,6 +592,7 @@ .long MACH_BVME6000, BVME6000_BOOTI_VERSION .long MACH_MAC, MAC_BOOTI_VERSION .long MACH_Q40, Q40_BOOTI_VERSION + .long MACH_HP300, HP300_BOOTI_VERSION .long 0 1: jra __start @@ -605,65 +604,6 @@ jra __start __INIT ENTRY(__start) - -#ifdef CONFIG_HP300 -/* This is a hack. The HP NetBSD bootloader loads us at an arbitrary - address (apparently 0xff002000 in practice) which is not good if we need - to be able to map this to VA 0x1000. We could do it with pagetables but - a better solution seems to be to relocate the kernel in physical memory - before we start. - - So, we copy the entire kernel image (code+data+bss) down to the 16MB - boundary that marks the start of RAM. This is slightly tricky because - we must not overwrite the copying code itself. :-) */ - -/* 15/5/98. The start address of physical RAM changes depending on how much - RAM is present. This is actually a blessing in disguise as it provides - a way for us to work out the RAM size rather than hardwiring it. */ - - lea %pc@(_start),%a0 - movel %a0,%d6 - and #0xffff0000, %d6 - lea %pc@(hp300_phys_ram_base),%a0 - movel %d6, %a0@ - movel %pc@(L(custom)),%a3 - moveb #0xfe,%d7 - moveb %d7,%a3@(0x1ffff) - lea %pc@(Lcopystart),%a0 - lea %pc@(Lcopyend),%a1 - movel %d6,%a2 /* Start of physical RAM */ -1: moveb %a0@+,%d0 - moveb %d0,%a2@+ - cmpl %a0,%a1 - jbne 1b - movel %d6,%a2 - moveb #0xfd,%d7 - moveb %d7,%a3@(0x1ffff) - lea %pc@(_stext),%a0 - lea %pc@(_end),%a1 - jmp %a2@ - -Lcopystart: - moveb #0xf7,%d7 - moveb %d7,%a3@(0x1ffff) - movel %d6,%a2 /* Start of kernel */ - add #0x1000,%a2 -1: moveb %a0@+,%d0 - moveb %d0,%a2@+ - cmpl %a0,%a1 - jbne 1b - moveb #0,%d7 - moveb %d7,%a3@(0x1ffff) - movel %d6,%a0 - addl #Lstart1,%a0 - jmp %a0@ -Lcopyend: - -Lstart1: - moveb #0x3f,%d7 - moveb %d7,%a3@(0x1ffff) -#endif /* CONFIG_HP300 */ - /* * Setup initial stack pointer */ @@ -672,8 +612,6 @@ /* * Record the CPU and machine type. */ - -#ifndef CONFIG_HP300 get_bi_record BI_MACHTYPE lea %pc@(m68k_machtype),%a1 movel %a0@,%a1@ @@ -689,23 +627,8 @@ get_bi_record BI_CPUTYPE lea %pc@(m68k_cputype),%a1 movel %a0@,%a1@ -#else /* CONFIG_HP300 */ - /* FIXME HP300 doesn't use bootinfo yet */ - movel #MACH_HP300,%d4 - lea %pc@(m68k_machtype),%a0 - movel %d4,%a0@ - movel #FPU_68881,%d0 - lea %pc@(m68k_fputype),%a0 - movel %d0,%a0@ - movel #MMU_68030,%d0 - lea %pc@(m68k_mmutype),%a0 - movel %d0,%a0@ - movel #CPU_68030,%d0 - lea %pc@(m68k_cputype),%a0 - movel %d0,%a0@ - leds(0x1) -#endif /* CONFIG_HP300 */ + leds 0x1 #ifdef CONFIG_MAC /* @@ -956,6 +879,26 @@ #endif +#ifdef CONFIG_HP300 + is_not_hp300(L(nothp)) + + /* Get the address of the UART for serial debugging */ + get_bi_record BI_HP300_UART_ADDR + tstl %d0 + jbmi 1f + movel %a0@,%d3 + lea %pc@(L(uartbase)),%a0 + movel %d3,%a0@ + get_bi_record BI_HP300_UART_SCODE + tstl %d0 + jbmi 1f + movel %a0@,%d3 + lea %pc@(L(uart_scode)),%a0 + movel %d3,%a0@ +1: +L(nothp): +#endif + /* * Initialize serial port */ @@ -979,9 +922,7 @@ putc '\n' putc 'A' -#ifdef CONFIG_HP300 - leds(0x2) -#endif /* CONFIG_HP300 */ + leds 0x2 dputn %pc@(L(cputype)) dputn %pc@(m68k_supervisor_cachemode) dputn %pc@(m68k_pgtable_cachemode) @@ -1124,16 +1065,30 @@ #ifdef CONFIG_HP300 is_not_hp300(L(nothp300)) -/* On the HP300, we map the ROM, INTIO and DIO regions (phys. 0x00xxxxxx) - by mapping 32MB from 0xf0xxxxxx -> 0x00xxxxxx) using an 030 early - termination page descriptor. The ROM mapping is needed because the LEDs - are mapped there too. */ + /* On the HP300, we map the ROM, INTIO and DIO regions (phys. 0x00xxxxxx) + * by mapping 32MB (on 020/030) or 16 MB (on 040) from 0xf0xxxxxx -> 0x00xxxxxx). + * The ROM mapping is needed because the LEDs are mapped there too. + */ + + is_040(1f) + /* + * 030: Map the 32Meg range physical 0x0 upto logical 0xf000.0000 + */ mmu_map #0xf0000000,#0,#0x02000000,#_PAGE_NOCACHE030 -L(nothp300): + jbra L(mmu_init_done) -#endif +1: + /* + * 040: Map the 16Meg range physical 0x0 upto logical 0xf000.0000 + */ + mmu_map #0xf0000000,#0,#0x01000000,#_PAGE_NOCACHE_S + + jbra L(mmu_init_done) + +L(nothp300): +#endif /* CONFIG_HP300 */ #ifdef CONFIG_MVME147 @@ -1480,15 +1435,23 @@ #ifdef CONFIG_HP300 is_not_hp300(1f) /* - * Fix up the custom register to point to the new location of the LEDs. + * Fix up the iobase register to point to the new location of the LEDs. */ - movel #0xf0000000,L(custom) + movel #0xf0000000,L(iobase) /* * Energise the FPU and caches. */ + is_040(1f) movel #0x60,0xf05f400c -1: + jbra 2f + + /* + * 040: slightly different, apparently. + */ +1: movew #0,0xf05f400e + movew #0x64,0xf05f400e +2: #endif #ifdef CONFIG_SUN3X @@ -1585,7 +1548,6 @@ movel ARG1,%d0 lea %pc@(_end),%a0 -#ifndef CONFIG_HP300 1: tstw %a0@(BIR_TAG) jeq 3f cmpw %a0@(BIR_TAG),%d0 @@ -1599,7 +1561,6 @@ 3: moveq #-1,%d0 lea %a0@(BIR_SIZE),%a0 4: -#endif /* CONFIG_HP300 */ func_return get_bi_record @@ -3013,6 +2974,10 @@ /* We count on the PROM initializing SIO1 */ #endif +#ifdef CONFIG_HP300 +/* We count on the boot loader initialising the UART */ +#endif + L(serial_init_done): func_return serial_init @@ -3205,9 +3170,31 @@ 1: moveb %a1@(LSRB0),%d0 andb #0x4,%d0 beq 1b + jbra L(serial_putc_done) 2: #endif +#ifdef CONFIG_HP300 + is_not_hp300(3f) + movl %pc@(L(iobase)),%a1 + addl %pc@(L(uartbase)),%a1 + movel %pc@(L(uart_scode)),%d1 /* Check the scode */ + jmi 3f /* Unset? Exit */ + cmpi #256,%d1 /* APCI scode? */ + jeq 2f +1: moveb %a1@(DCALSR),%d1 /* Output to DCA */ + andb #0x20,%d1 + beq 1b + moveb %d0,%a1@(DCADATA) + jbra L(serial_putc_done) +2: moveb %a1@(APCILSR),%d1 /* Output to APCI */ + andb #0x20,%d1 + beq 2b + moveb %d0,%a1@(APCIDATA) + jbra L(serial_putc_done) +3: +#endif + L(serial_putc_done): func_return serial_putc @@ -3295,7 +3282,7 @@ movel ARG1,%d0 #ifdef CONFIG_HP300 is_not_hp300(1f) - movel %pc@(L(custom)),%a0 + movel %pc@(L(iobase)),%a0 moveb %d0,%a0@(0x1ffff) jra 2f #endif @@ -3829,10 +3816,6 @@ __INITDATA .align 4 -#ifdef CONFIG_HP300 -hp300_phys_ram_base: -#endif - #if defined(CONFIG_ATARI) || defined(CONFIG_AMIGA) || \ defined(CONFIG_HP300) || defined(CONFIG_APOLLO) L(custom): @@ -3922,6 +3905,17 @@ LSRB0 = 0x10412 LTHRB0 = 0x10416 LCPUCTRL = 0x10100 +#endif + +#if defined(CONFIG_HP300) +DCADATA = 0x11 +DCALSR = 0x1b +APCIDATA = 0x00 +APCILSR = 0x14 +L(uartbase): + .long 0 +L(uart_scode): + .long -1 #endif __FINIT diff -Nru a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c --- a/arch/m68k/kernel/setup.c 2004-11-10 17:19:06 -08:00 +++ b/arch/m68k/kernel/setup.c 2004-11-10 17:19:06 -08:00 @@ -109,6 +109,7 @@ extern int bvme6000_parse_bootinfo(const struct bi_record *); extern int mvme16x_parse_bootinfo(const struct bi_record *); extern int mvme147_parse_bootinfo(const struct bi_record *); +extern int hp300_parse_bootinfo(const struct bi_record *); extern void config_amiga(void); extern void config_atari(void); @@ -175,6 +176,8 @@ unknown = mvme16x_parse_bootinfo(record); else if (MACH_IS_MVME147) unknown = mvme147_parse_bootinfo(record); + else if (MACH_IS_HP300) + unknown = hp300_parse_bootinfo(record); else unknown = 1; } @@ -204,20 +207,8 @@ int i; char *p, *q; - if (!MACH_IS_HP300) { - /* The bootinfo is located right after the kernel bss */ - m68k_parse_bootinfo((const struct bi_record *)&_end); - } else { - /* FIXME HP300 doesn't use bootinfo yet */ - extern unsigned long hp300_phys_ram_base; - unsigned long hp300_mem_size = 0xffffffff-hp300_phys_ram_base; - m68k_cputype = CPU_68030; - m68k_fputype = FPU_68882; - m68k_memory[0].addr = hp300_phys_ram_base; - /* 0.5M fudge factor */ - m68k_memory[0].size = hp300_mem_size-512*1024; - m68k_num_memory++; - } + /* The bootinfo is located right after the kernel bss */ + m68k_parse_bootinfo((const struct bi_record *)&_end); if (CPU_IS_040) m68k_is040or060 = 4; @@ -550,7 +541,5 @@ "emulation project\n" ); panic( "no FPU" ); } - -#endif /* CONFIG_SUN3 */ - +#endif /* !CONFIG_M68KFPU_EMU */ } diff -Nru a/arch/m68k/mm/sun3mmu.c b/arch/m68k/mm/sun3mmu.c --- a/arch/m68k/mm/sun3mmu.c 2004-11-10 17:19:03 -08:00 +++ b/arch/m68k/mm/sun3mmu.c 2004-11-10 17:19:03 -08:00 @@ -7,7 +7,6 @@ * */ -#include #include #include #include diff -Nru a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c --- a/arch/m68k/q40/config.c 2004-11-10 17:19:04 -08:00 +++ b/arch/m68k/q40/config.c 2004-11-10 17:19:04 -08:00 @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff -Nru a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c --- a/arch/m68k/q40/q40ints.c 2004-11-10 17:19:06 -08:00 +++ b/arch/m68k/q40/q40ints.c 2004-11-10 17:19:06 -08:00 @@ -11,7 +11,6 @@ * */ -#include #include #include #include diff -Nru a/arch/m68k/sun3/Makefile b/arch/m68k/sun3/Makefile --- a/arch/m68k/sun3/Makefile 2004-11-10 17:19:07 -08:00 +++ b/arch/m68k/sun3/Makefile 2004-11-10 17:19:07 -08:00 @@ -4,5 +4,4 @@ obj-y := sun3_ksyms.o sun3ints.o sun3dvma.o sbus.o idprom.o -obj-$(CONFIG_SUN3) += config.o mmu_emu.o leds.o dvma.o \ - intersil.o +obj-$(CONFIG_SUN3) += config.o mmu_emu.o leds.o dvma.o intersil.o diff -Nru a/arch/m68k/sun3/mmu_emu.c b/arch/m68k/sun3/mmu_emu.c --- a/arch/m68k/sun3/mmu_emu.c 2004-11-10 17:19:05 -08:00 +++ b/arch/m68k/sun3/mmu_emu.c 2004-11-10 17:19:05 -08:00 @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -46,6 +47,8 @@ */ unsigned long vmalloc_end; +EXPORT_SYMBOL(vmalloc_end); + unsigned long pmeg_vaddr[PMEGS_NUM]; unsigned char pmeg_alloc[PMEGS_NUM]; unsigned char pmeg_ctx[PMEGS_NUM]; diff -Nru a/arch/m68k/sun3/sun3dvma.c b/arch/m68k/sun3/sun3dvma.c --- a/arch/m68k/sun3/sun3dvma.c 2004-11-10 17:19:07 -08:00 +++ b/arch/m68k/sun3/sun3dvma.c 2004-11-10 17:19:07 -08:00 @@ -6,6 +6,7 @@ * Contains common routines for sun3/sun3x DVMA management. */ +#include #include #include #include diff -Nru a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c --- a/arch/m68k/sun3/sun3ints.c 2004-11-10 17:19:07 -08:00 +++ b/arch/m68k/sun3/sun3ints.c 2004-11-10 17:19:07 -08:00 @@ -6,6 +6,7 @@ * for more details. */ +#include #include #include #include diff -Nru a/arch/m68k/sun3x/config.c b/arch/m68k/sun3x/config.c --- a/arch/m68k/sun3x/config.c 2004-11-10 17:19:02 -08:00 +++ b/arch/m68k/sun3x/config.c 2004-11-10 17:19:02 -08:00 @@ -6,6 +6,7 @@ * based on code from Oliver Jowett */ +#include #include #include #include @@ -70,7 +71,7 @@ mach_get_model = sun3_get_model; mach_get_hardware_list = sun3x_get_hardware_list; -#if defined(CONFIG_DUMMY_CONSOLE) +#ifdef CONFIG_DUMMY_CONSOLE conswitchp = &dummy_con; #endif diff -Nru a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig --- a/arch/m68knommu/Kconfig 2004-11-10 17:19:05 -08:00 +++ b/arch/m68knommu/Kconfig 2004-11-10 17:19:05 -08:00 @@ -72,15 +72,20 @@ help Motorola ColdFire 5249 processor support. +config M527x + bool "MCF527x" + help + Freescale (Motorola) ColdFire 5270/5271/5274/5275 processor support. + config M5272 bool "MCF5272" help Motorola ColdFire 5272 processor support. -config M5282 - bool "MCF5282" +config M528x + bool "MCF528x" help - Motorola ColdFire 5282 processor support. + Motorola ColdFire 5280/5282 processor support. config M5307 bool "MCF5307" @@ -96,7 +101,7 @@ config COLDFIRE bool - depends on (M5206 || M5206e || M5249 || M5272 || M5282 || M5307 || M5407) + depends on (M5206 || M5206e || M5249 || M527x || M5272 || M528x || M5307 || M5407) default y choice @@ -117,82 +122,97 @@ config CLOCK_11MHz bool "11MHz" help - Select an 11MHz CPU clock frequency. + Select a 11MHz CPU clock frequency. config CLOCK_16MHz bool "16MHz" help - Select an 16MHz CPU clock frequency. + Select a 16MHz CPU clock frequency. config CLOCK_20MHz bool "20MHz" help - Select an 20MHz CPU clock frequency. + Select a 20MHz CPU clock frequency. config CLOCK_24MHz bool "24MHz" help - Select an 24MHz CPU clock frequency. + Select a 24MHz CPU clock frequency. config CLOCK_25MHz bool "25MHz" help - Select an 25MHz CPU clock frequency. + Select a 25MHz CPU clock frequency. config CLOCK_33MHz bool "33MHz" help - Select an 33MHz CPU clock frequency. + Select a 33MHz CPU clock frequency. config CLOCK_40MHz bool "40MHz" help - Select an 40MHz CPU clock frequency. + Select a 40MHz CPU clock frequency. config CLOCK_45MHz bool "45MHz" help - Select an 45MHz CPU clock frequency. + Select a 45MHz CPU clock frequency. config CLOCK_48MHz bool "48MHz" help - Select an 48MHz CPU clock frequency. + Select a 48MHz CPU clock frequency. config CLOCK_50MHz bool "50MHz" help - Select an 50MHz CPU clock frequency. + Select a 50MHz CPU clock frequency. config CLOCK_54MHz bool "54MHz" help - Select an 54MHz CPU clock frequency. + Select a 54MHz CPU clock frequency. config CLOCK_60MHz bool "60MHz" help - Select an 60MHz CPU clock frequency. + Select a 60MHz CPU clock frequency. config CLOCK_64MHz bool "64MHz" help - Select an 64MHz CPU clock frequency. + Select a 64MHz CPU clock frequency. config CLOCK_66MHz bool "66MHz" help - Select an 66MHz CPU clock frequency. + Select a 66MHz CPU clock frequency. config CLOCK_70MHz bool "70MHz" help - Select an 70MHz CPU clock frequency. + Select a 70MHz CPU clock frequency. + +config CLOCK_100MHz + bool "100MHz" + help + Select a 100MHz CPU clock frequency. config CLOCK_140MHz bool "140MHz" help - Select an 140MHz CPU clock frequency. + Select a 140MHz CPU clock frequency. + +config CLOCK_150MHz + bool "150MHz" + help + Select a 150MHz CPU clock frequency. + +config CLOCK_166MHz + bool "166MHz" + help + Select a 166MHz CPU clock frequency. endchoice @@ -284,6 +304,18 @@ help Support for the Motorola M5249C3 board. +config M5271EVB + bool "Freescale (Motorola) M5271EVB board support" + depends on M527x + help + Support for the Freescale (Motorola) M5271EVB board. + +config M5275EVB + bool "Freescale (Motorola) M5275EVB board support" + depends on M527x + help + Support for the Freescale (Motorola) M5275EVB board. + config M5272C3 bool "Motorola M5272C3 board support" depends on M5272 @@ -296,15 +328,21 @@ help Support for the senTec COBRA5272 board. -config M5282C3 - bool "Motorola M5282C3 board support" - depends on M5282 +config M5275EVB + bool "Freescale (Motorola) M5275EVB board support" + depends on M527x + help + Support for the Freescale (Motorola) M5275EVB board. + +config M5282EVB + bool "Motorola M5282EVB board support" + depends on M528x help - Support for the Motorola M5282C3 board. + Support for the Motorola M5282EVB board. config COBRA5282 bool "senTec COBRA5282 board support" - depends on M5282 + depends on M528x help Support for the senTec COBRA5282 board. @@ -344,6 +382,18 @@ help Support for the Feith Cleopatra boards. +config CANCam + bool "Feith CANCam board support" + depends on M5272 + help + Support for the Feith CANCam board. + +config SCALES + bool "Feith SCALES board support" + depends on M5272 + help + Support for the Feith SCALES board. + config NETtel bool "SecureEdge/NETtel board support" depends on (M5206e || M5272 || M5307) @@ -356,6 +406,12 @@ help Special additional support for SnapGear router boards. +config CPU16B + bool "Sneha Technologies S.L. Sarasvati board support" + depends on M5272 + help + Support for the SNEHA CPU16B board. + config ROMFS_FROM_ROM bool " ROMFS image not RAM resident" depends on (NETtel || SNAPGEAR) @@ -376,13 +432,23 @@ config MOTOROLA bool default y - depends on (M5206eC3 || M5249C3 || M5272C3 || M5282C3 || M5307C3 || M5407C3) + depends on (M5206eC3 || M5249C3 || M5271EVB || M5272C3 || M5275EVB || M5282EVB || M5307C3 || M5407C3) + +config HW_FEITH + bool + default y + depends on (CLEOPATRA || CANCam || SCALES) config senTec bool default y depends on (COBRA5272 || COBRA5282) +config SNEHA + bool + default y + depends on CPU16B + config LARGE_ALLOCS bool "Allow allocating large blocks (> 1MB) of memory" help diff -Nru a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile --- a/arch/m68knommu/Makefile 2004-11-10 17:19:05 -08:00 +++ b/arch/m68knommu/Makefile 2004-11-10 17:19:05 -08:00 @@ -15,8 +15,9 @@ platform-$(CONFIG_M5206) := 5206 platform-$(CONFIG_M5206e) := 5206e platform-$(CONFIG_M5249) := 5249 +platform-$(CONFIG_M527x) := 527x platform-$(CONFIG_M5272) := 5272 -platform-$(CONFIG_M5282) := 5282 +platform-$(CONFIG_M528x) := 528x platform-$(CONFIG_M5307) := 5307 platform-$(CONFIG_M5407) := 5407 PLATFORM := $(platform-y) @@ -28,12 +29,16 @@ board-$(CONFIG_DRAGEN2) := de2 board-$(CONFIG_ARNEWSH) := ARNEWSH board-$(CONFIG_MOTOROLA) := MOTOROLA +board-$(CONFIG_M5271EVB) := M5271EVB +board-$(CONFIG_M5275EVB) := M5275EVB +board-$(CONFIG_M5282EVB) := M5282EVB board-$(CONFIG_ELITE) := eLITE board-$(CONFIG_eLIA) := eLIA board-$(CONFIG_NETtel) := NETtel board-$(CONFIG_SECUREEDGEMP3) := MP3 board-$(CONFIG_CLEOPATRA) := CLEOPATRA -board-$(CONFIG_senTec) := senTec +board-$(CONFIG_senTec) := senTec +board-$(CONFIG_SNEHA) := SNEHA BOARD := $(board-y) model-$(CONFIG_RAMKERNEL) := ram @@ -50,8 +55,9 @@ cpuclass-$(CONFIG_M5206) := 5307 cpuclass-$(CONFIG_M5206e) := 5307 cpuclass-$(CONFIG_M5249) := 5307 +cpuclass-$(CONFIG_M527x) := 5307 cpuclass-$(CONFIG_M5272) := 5307 -cpuclass-$(CONFIG_M5282) := 5307 +cpuclass-$(CONFIG_M528x) := 5307 cpuclass-$(CONFIG_M5407) := 5307 cpuclass-$(CONFIG_M68EZ328) := 68328 cpuclass-$(CONFIG_M68VZ328) := 68328 @@ -69,8 +75,9 @@ cflags-$(CONFIG_M5206) := -m5200 -Wa,-S -Wa,-m5200 cflags-$(CONFIG_M5206e) := -m5200 -Wa,-S -Wa,-m5200 cflags-$(CONFIG_M5249) := -m5200 -Wa,-S -Wa,-m5200 +cflags-$(CONFIG_M527x) := -m5307 -Wa,-S -Wa,-m5307 cflags-$(CONFIG_M5272) := -m5307 -Wa,-S -Wa,-m5307 -cflags-$(CONFIG_M5282) := -m5307 -Wa,-S -Wa,-m5307 +cflags-$(CONFIG_M528x) := -m5307 -Wa,-S -Wa,-m5307 cflags-$(CONFIG_M5307) := -m5307 -Wa,-S -Wa,-m5307 cflags-$(CONFIG_M5407) := -m5200 -Wa,-S -Wa,-m5200 cflags-$(CONFIG_M68328) := -m68000 @@ -82,7 +89,7 @@ CFLAGS += $(cflags-y) CFLAGS += -fno-builtin -CFLAGS += -O2 -g +CFLAGS += -O1 -g CFLAGS += -D__linux__ CFLAGS += -DUTS_SYSNAME=\"uClinux\" diff -Nru a/arch/m68knommu/defconfig b/arch/m68knommu/defconfig --- a/arch/m68knommu/defconfig 2004-11-10 17:19:05 -08:00 +++ b/arch/m68knommu/defconfig 2004-11-10 17:19:05 -08:00 @@ -35,8 +35,9 @@ # CONFIG_M5206 is not set # CONFIG_M5206e is not set # CONFIG_M5249 is not set +# CONFIG_M527x is not set CONFIG_M5272=y -# CONFIG_M5282 is not set +# CONFIG_M528x is not set # CONFIG_M5307 is not set # CONFIG_M5407 is not set CONFIG_COLDFIRE=y @@ -55,7 +56,10 @@ # CONFIG_CLOCK_60MHz is not set CONFIG_CLOCK_66MHz=y # CONFIG_CLOCK_70MHz is not set +# CONFIG_CLOCK_100MHz is not set # CONFIG_CLOCK_140MHz is not set +# CONFIG_CLOCK_150MHz is not set +# CONFIG_CLOCK_166MHz is not set # # Platform diff -Nru a/arch/m68knommu/kernel/module.c b/arch/m68knommu/kernel/module.c --- a/arch/m68knommu/kernel/module.c 2004-11-10 17:19:03 -08:00 +++ b/arch/m68knommu/kernel/module.c 2004-11-10 17:19:03 -08:00 @@ -82,9 +82,38 @@ unsigned int relsec, struct module *me) { - printk(KERN_ERR "module %s: ADD RELOCATION unsupported\n", - me->name); - return -ENOEXEC; + unsigned int i; + Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; + Elf32_Sym *sym; + uint32_t *location; + + DEBUGP("Applying relocate_add section %u to %u\n", relsec, + sechdrs[relsec].sh_info); + for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { + /* This is where to make the change */ + location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr + + rel[i].r_offset; + /* This is the symbol it is referring to. Note that all + undefined symbols have been resolved. */ + sym = (Elf32_Sym *)sechdrs[symindex].sh_addr + + ELF32_R_SYM(rel[i].r_info); + + switch (ELF32_R_TYPE(rel[i].r_info)) { + case R_68K_32: + /* We add the value into the location given */ + *location = rel[i].r_addend + sym->st_value; + break; + case R_68K_PC32: + /* Add the value, subtract its postition */ + *location = rel[i].r_addend + sym->st_value - (uint32_t)location; + break; + default: + printk(KERN_ERR "module %s: Unknown relocation: %u\n", + me->name, ELF32_R_TYPE(rel[i].r_info)); + return -ENOEXEC; + } + } + return 0; } int module_finalize(const Elf_Ehdr *hdr, diff -Nru a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c --- a/arch/m68knommu/kernel/setup.c 2004-11-10 17:19:05 -08:00 +++ b/arch/m68knommu/kernel/setup.c 2004-11-10 17:19:05 -08:00 @@ -1,7 +1,7 @@ /* * linux/arch/m68knommu/kernel/setup.c * - * Copyright (C) 1999-2002 Greg Ungerer (gerg@snapgear.com) + * Copyright (C) 1999-2004 Greg Ungerer (gerg@snapgear.com) * Copyright (C) 1998,1999 D. Jeff Dionne * Copyleft ()) 2000 James D. Schettine {james@telos-systems.com} * Copyright (C) 1998 Kenneth Albanowski @@ -106,11 +106,14 @@ #if defined(CONFIG_M5249) #define CPU "COLDFIRE(m5249)" #endif +#if defined(CONFIG_M527x) + #define CPU "COLDFIRE(m5270/5271/5274/5275)" +#endif #if defined(CONFIG_M5272) #define CPU "COLDFIRE(m5272)" #endif -#if defined(CONFIG_M5282) - #define CPU "COLDFIRE(m5282)" +#if defined(CONFIG_M528x) + #define CPU "COLDFIRE(m5280/5282)" #endif #if defined(CONFIG_M5307) #define CPU "COLDFIRE(m5307)" diff -Nru a/arch/m68knommu/kernel/signal.c b/arch/m68knommu/kernel/signal.c --- a/arch/m68knommu/kernel/signal.c 2004-11-10 17:19:05 -08:00 +++ b/arch/m68knommu/kernel/signal.c 2004-11-10 17:19:05 -08:00 @@ -745,147 +745,44 @@ * Note that 'init' is a special process: it doesn't get signals it doesn't * want to handle. Thus you cannot kill init even with a SIGKILL even by * mistake. - * - * Note that we go through the signals twice: once to check the signals - * that the kernel can handle, and then we build all the user-level signal - * handling stack-frames in one go after that. */ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) { + struct k_sigaction ka; siginfo_t info; - struct k_sigaction *ka; + int signr; - current->thread.esp0 = (unsigned long) regs; + /* + * We want the common case to go fast, which + * is why we may in certain cases get here from + * kernel mode. Just return without doing anything + * if so. + */ + if (!user_mode(regs)) + return 1; if (!oldset) oldset = ¤t->blocked; - for (;;) { - int signr; - - signr = get_signal_to_deliver(&info, regs, NULL); - - if (!signr) - break; - - if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { - current->exit_code = signr; - current->state = TASK_STOPPED; - regs->sr &= ~PS_T; - - /* Did we come from a system call? */ - if (regs->orig_d0 >= 0) { - /* Restart the system call the same way as - if the process were not traced. */ - struct k_sigaction *ka = - ¤t->sighand->action[signr-1]; - int has_handler = - (ka->sa.sa_handler != SIG_IGN && - ka->sa.sa_handler != SIG_DFL); - handle_restart(regs, ka, has_handler); - } - notify_parent(current, SIGCHLD); - schedule(); - - /* We're back. Did the debugger cancel the sig? */ - if (!(signr = current->exit_code)) { - discard_frame: - continue; - } - current->exit_code = 0; - - /* The debugger continued. Ignore SIGSTOP. */ - if (signr == SIGSTOP) - goto discard_frame; - - /* Update the siginfo structure. Is this good? */ - if (signr != info.si_signo) { - info.si_signo = signr; - info.si_errno = 0; - info.si_code = SI_USER; - info.si_pid = current->parent->pid; - info.si_uid = current->parent->uid; - } - - /* If the (new) signal is now blocked, requeue it. */ - if (sigismember(¤t->blocked, signr)) { - send_sig_info(signr, &info, current); - continue; - } - } - - ka = ¤t->sighand->action[signr-1]; - if (ka->sa.sa_handler == SIG_IGN) { - if (signr != SIGCHLD) - continue; - /* Check for SIGCHLD: it's special. */ - while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0) - /* nothing */; - continue; - } - - if (ka->sa.sa_handler == SIG_DFL) { - int exit_code = signr; - - if (current->pid == 1) - continue; - - switch (signr) { - case SIGCONT: case SIGCHLD: - case SIGWINCH: case SIGURG: - continue; - - case SIGTSTP: case SIGTTIN: case SIGTTOU: - if (is_orphaned_pgrp(process_group(current))) - continue; - /* FALLTHRU */ - - case SIGSTOP: - current->state = TASK_STOPPED; - current->exit_code = signr; - if (!(current->parent->sighand->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP)) - notify_parent(current, SIGCHLD); - schedule(); - continue; - - case SIGQUIT: case SIGILL: case SIGTRAP: - case SIGIOT: case SIGFPE: case SIGSEGV: - case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ: - if (do_coredump(signr, exit_code, regs)) - exit_code |= 0x80; - /* FALLTHRU */ - - default: - sigaddset(¤t->pending.signal, signr); - recalc_sigpending(); - current->flags |= PF_SIGNALED; - do_exit(exit_code); - /* NOTREACHED */ - } - } - + signr = get_signal_to_deliver(&info, &ka, regs, NULL); + if (signr > 0) { /* Whee! Actually deliver the signal. */ - handle_signal(signr, ka, &info, oldset, regs); + handle_signal(signr, &ka, &info, oldset, regs); return 1; } /* Did we come from a system call? */ - if (regs->orig_d0 >= 0) + if (regs->orig_d0 >= 0) { /* Restart the system call - no handlers present */ - handle_restart(regs, NULL, 0); - - /* If we are about to discard some frame stuff we must copy - over the remaining frame. */ - if (regs->stkadj) { - struct pt_regs *tregs = - (struct pt_regs *) ((ulong) regs + regs->stkadj); - - /* This must be copied with decreasing addresses to - handle overlaps. */ - tregs->vector = 0; - tregs->format = 0; - tregs->pc = regs->pc; - tregs->sr = regs->sr; + if (regs->d0 == -ERESTARTNOHAND + || regs->d0 == -ERESTARTSYS + || regs->d0 == -ERESTARTNOINTR) { + regs->d0 = regs->orig_d0; + regs->pc -= 2; + } else if (regs->d0 == -ERESTART_RESTARTBLOCK) { + regs->d0 = __NR_restart_syscall; + regs->pc -= 2; + } } return 0; } diff -Nru a/arch/m68knommu/kernel/syscalltable.S b/arch/m68knommu/kernel/syscalltable.S --- a/arch/m68knommu/kernel/syscalltable.S 2004-11-10 17:19:02 -08:00 +++ b/arch/m68knommu/kernel/syscalltable.S 2004-11-10 17:19:02 -08:00 @@ -185,7 +185,7 @@ .long sys_ni_syscall /* sys_mremap */ .long sys_setresuid16 .long sys_getresuid16 /* 165 */ - .long sys_ni_syscall /* for vm86 */ + .long sys_getpagesize /* sys_getpagesize */ .long sys_ni_syscall /* old "query_module" */ .long sys_poll .long sys_ni_syscall /* sys_nfsservctl */ @@ -237,42 +237,70 @@ .long sys_setfsuid /* 215 */ .long sys_setfsgid .long sys_pivot_root - .long sys_ni_syscall /* sys_mincore */ - .long sys_ni_syscall /* sys_madvise */ - .long sys_getdents64 /* 220 */ - .long sys_fcntl64 - .long sys_ni_syscall /* reserved for TUX */ .long sys_ni_syscall + .long sys_ni_syscall + .long sys_getdents64 /* 220 */ .long sys_gettid - .long sys_ni_syscall /* 225 */ /* sys_readahead */ + .long sys_tkill .long sys_setxattr .long sys_lsetxattr - .long sys_fsetxattr + .long sys_fsetxattr /* 225 */ .long sys_getxattr - .long sys_lgetxattr /* 230 */ + .long sys_lgetxattr .long sys_fgetxattr .long sys_listxattr - .long sys_llistxattr + .long sys_llistxattr /* 230 */ .long sys_flistxattr - .long sys_removexattr /* 235 */ + .long sys_removexattr .long sys_lremovexattr .long sys_fremovexattr - .long sys_tkill + .long sys_futex /* 235 */ .long sys_sendfile64 - .long sys_futex /* 240 */ - .long sys_sched_setaffinity - .long sys_sched_getaffinity - .long sys_ni_syscall /* sys_set_thread_area */ - .long sys_ni_syscall /* sys_get_thread_area */ - .long sys_io_setup /* 245 */ + .long sys_ni_syscall /* sys_mincore */ + .long sys_ni_syscall /* sys_madvise */ + .long sys_fcntl64 + .long sys_readahead /* 240 */ + .long sys_io_setup .long sys_io_destroy .long sys_io_getevents .long sys_io_submit - .long sys_io_cancel - .long sys_ni_syscall /* 250 */ /* sys_alloc_hugepages */ - .long sys_ni_syscall /* sys_freec_hugepages */ + .long sys_io_cancel /* 245 */ + .long sys_fadvise64 .long sys_exit_group .long sys_lookup_dcookie + .long sys_epoll_create + .long sys_epoll_ctl /* 250 */ + .long sys_epoll_wait + .long sys_ni_syscall /* sys_remap_file_pages */ + .long sys_set_tid_address + .long sys_timer_create + .long sys_timer_settime /* 255 */ + .long sys_timer_gettime + .long sys_timer_getoverrun + .long sys_timer_delete + .long sys_clock_settime + .long sys_clock_gettime /* 260 */ + .long sys_clock_getres + .long sys_clock_nanosleep + .long sys_statfs64 + .long sys_fstatfs64 + .long sys_tgkill /* 265 */ + .long sys_utimes + .long sys_fadvise64_64 + .long sys_mbind + .long sys_get_mempolicy + .long sys_set_mempolicy /* 270 */ + .long sys_mq_open + .long sys_mq_unlink + .long sys_mq_timedsend + .long sys_mq_timedreceive + .long sys_mq_notify /* 275 */ + .long sys_mq_getsetattr + .long sys_waitid + .long sys_ni_syscall /* sys_setaltroot */ + .long sys_ni_syscall /* sys_add_key */ + .long sys_ni_syscall /* 280 */ /* sys_request_key */ + .long sys_ni_syscall /* sys_keyctl */ .rept NR_syscalls-(.-sys_call_table)/4 .long sys_ni_syscall diff -Nru a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S --- a/arch/m68knommu/kernel/vmlinux.lds.S 2004-11-10 17:19:04 -08:00 +++ b/arch/m68knommu/kernel/vmlinux.lds.S 2004-11-10 17:19:04 -08:00 @@ -1,7 +1,7 @@ /* * vmlinux.lds.S -- master linker script for m68knommu arch * - * (C) Copyright 2002-2003, Greg Ungerer + * (C) Copyright 2002-2004, Greg Ungerer * * This ends up looking compilcated, because of the number of * address variations for ram and rom/flash layouts. The real @@ -117,7 +117,8 @@ */ #if defined(CONFIG_M5206eC3) || defined(CONFIG_M5249C3) || \ defined(CONFIG_M5272C3) || defined(CONFIG_M5307C3) || \ - defined(CONFIG_ARN5307) || defined(CONFIG_M5407C3) + defined(CONFIG_ARN5307) || defined(CONFIG_M5407C3) || \ + defined(CONFIG_M5271EVB) || defined(CONFIG_M5275EVB) #define RAM_START 0x20000 #define RAM_LENGTH 0x3e0000 #endif @@ -132,14 +133,14 @@ #define RAM_LENGTH 0xfe0000 #endif -#if defined(CONFIG_M5282C3) +#if defined(CONFIG_M5282EVB) #define RAM_START 0x10000 #define RAM_LENGTH 0x3f0000 #endif /* * The senTec COBRA5282 board has the same - * memory layout as the M5282C3. + * memory layout as the M5282EVB. */ #if defined(CONFIG_COBRA5282) #define RAM_START 0x10000 @@ -153,11 +154,22 @@ */ #if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \ defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \ - defined(CONFIG_CLEOPATRA) + defined(CONFIG_HW_FEITH) #define RAM_START 0x400 #define RAM_LENGTH 0x3ffc00 #endif +/* + * Sneha Boards mimimun memmory + * The end of RAM will vary depending on how much ram is fitted, + * but this isn't important here, we assume at least 4MiB. + */ +#if defined(CONFIG_CPU16B) +#define RAM_START 0x20000 +#define RAM_LENGTH 0x3e0000 +#endif + + #if defined(CONFIG_RAMKERNEL) #define TEXT ram #define DATA ram @@ -247,6 +259,11 @@ /* Kernel symbol table: strings */ *(__ksymtab_strings) + /* Built-in module parameters */ + __start___param = .; + *(__param) + __stop___param = .; + . = ALIGN(4) ; _etext = . ; } > TEXT @@ -303,7 +320,7 @@ __initramfs_start = .; *(.init.ramfs) __initramfs_end = .; - . = ALIGN(4); + . = ALIGN(4096); __init_end = .; } > INIT diff -Nru a/arch/m68knommu/lib/Makefile b/arch/m68knommu/lib/Makefile --- a/arch/m68knommu/lib/Makefile 2004-11-10 17:19:03 -08:00 +++ b/arch/m68knommu/lib/Makefile 2004-11-10 17:19:03 -08:00 @@ -4,4 +4,4 @@ lib-y := ashldi3.o ashrdi3.o lshrdi3.o \ muldi3.o mulsi3.o divsi3.o udivsi3.o modsi3.o umodsi3.o \ - checksum.o semaphore.o memcpy.o memset.o + checksum.o semaphore.o memcpy.o memset.o delay.o diff -Nru a/arch/m68knommu/lib/delay.c b/arch/m68knommu/lib/delay.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/lib/delay.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,18 @@ +/* + * arch/m68knommu/lib/delay.c + * + * (C) Copyright 2004, Greg Ungerer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include + +void udelay(unsigned long usecs) +{ + _udelay(usecs); +} + diff -Nru a/arch/m68knommu/mm/init.c b/arch/m68knommu/mm/init.c --- a/arch/m68knommu/mm/init.c 2004-11-10 17:19:05 -08:00 +++ b/arch/m68knommu/mm/init.c 2004-11-10 17:19:05 -08:00 @@ -38,7 +38,6 @@ #include #include #include -#include #undef DEBUG diff -Nru a/arch/m68knommu/mm/memory.c b/arch/m68knommu/mm/memory.c --- a/arch/m68knommu/mm/memory.c 2004-11-10 17:19:06 -08:00 +++ b/arch/m68knommu/mm/memory.c 2004-11-10 17:19:06 -08:00 @@ -24,7 +24,6 @@ #include #include #include -#include #include /* diff -Nru a/arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S b/arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S --- a/arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S 2004-11-10 17:19:03 -08:00 +++ b/arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S 2004-11-10 17:19:03 -08:00 @@ -21,7 +21,6 @@ */ #define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ #define VBR_BASE MEM_BASE /* Vector address */ /*****************************************************************************/ @@ -78,9 +77,36 @@ /* - * Set to 4 meg for the Cadre III board (m5206e). + * SDRAM size for the Cadre III board (m5206e). */ +#if defined(CONFIG_RAMAUTO) + movea.l #0x00000000,%a0 + move.l MCF_MBAR+MCFSIM_DCMR0,%d0 + and.l #0x00fe0000, %d0 + beq noaddr1 + add.l #0x00020000,%d0 + move.l %d0,%a0 +noaddr1: + move.l MCF_MBAR+MCFSIM_DCMR1,%d0 + and.l #0x00fe0000, %d0 + beq noaddr2 + add.l #0x00020000,%d0 + add.l %d0,%a0 +noaddr2: + +#else + +#if defined(CONFIG_RAM32MB) +#define MEM_SIZE 0x02000000 /* Memory size 32Mb */ +#elif defined(CONFIG_RAM16MB) +#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ +#elif defined(CONFIG_RAM8MB) +#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ +#else +#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ +#endif move.l #MEM_SIZE, %a0 +#endif move.l %a0, %d0 /* Mem end addr is in a0 */ move.l %d0, %sp /* Set up initial stack ptr */ diff -Nru a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c --- a/arch/m68knommu/platform/5206e/config.c 2004-11-10 17:19:03 -08:00 +++ b/arch/m68knommu/platform/5206e/config.c 2004-11-10 17:19:03 -08:00 @@ -22,7 +22,6 @@ #include #include #include -#include /***************************************************************************/ diff -Nru a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c --- a/arch/m68knommu/platform/5249/config.c 2004-11-10 17:19:05 -08:00 +++ b/arch/m68knommu/platform/5249/config.c 2004-11-10 17:19:05 -08:00 @@ -21,7 +21,6 @@ #include #include #include -#include /***************************************************************************/ diff -Nru a/arch/m68knommu/platform/5272/CANCam/crt0_ram.S b/arch/m68knommu/platform/5272/CANCam/crt0_ram.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/platform/5272/CANCam/crt0_ram.S 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,154 @@ +/*****************************************************************************/ + +/* + * crt0_ram.S -- startup code for Feith CANCan board. + * + * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com). + * (C) Copyright 2000, Lineo (www.lineo.com). + */ + +/*****************************************************************************/ + +#include +#include +#include +#include +#include +#include + +/*****************************************************************************/ + +/* + * Feith ColdFire CANCam, chip select and memory setup. + */ + +#define MEM_BASE 0x00000000 /* Memory base at address 0 */ +#define VBR_BASE MEM_BASE /* Vector address */ +#define MEM_SIZE 0x04000000 /* Memory size 64Mb */ + + +/*****************************************************************************/ + +.global _start +.global _rambase +.global _ramvec +.global _ramstart +.global _ramend + +/*****************************************************************************/ + +.data + +/* + * Set up the usable of RAM stuff. Size of RAM is determined then + * an initial stack set up at the end. + */ +_rambase: +.long 0 +_ramvec: +.long 0 +_ramstart: +.long 0 +_ramend: +.long 0 + +/*****************************************************************************/ + +.text + +/* + * This is the codes first entry point. This is where it all + * begins... + */ + +_start: + nop /* Filler */ + move.w #0x2700, %sr /* No interrupts */ + + /* + * Setup VBR here, otherwise buserror remap will not work. + * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) + * + * bkr@cut.de 19990306 + * + * Note: this is because dBUG points VBR to ROM, making vectors read + * only, so the bus trap can't be changed. (RS) + */ + move.l #VBR_BASE, %a7 /* Note VBR can't be read */ + movec %a7, %VBR + move.l %a7, _ramvec /* Set up vector addr */ + move.l %a7, _rambase /* Set up base RAM addr */ + + + /* + * Set memory size. + */ + move.l #MEM_SIZE, %a0 + + move.l %a0, %d0 /* Mem end addr is in a0 */ + move.l %d0, %sp /* Set up initial stack ptr */ + move.l %d0, _ramend /* Set end ram addr */ + + /* + * Enable CPU internal cache. + */ + move.l #0x01000000, %d0 /* Invalidate cache cmd */ + movec %d0, %CACR /* Invalidate cache */ + move.l #0x80000100, %d0 /* Setup cache mask */ + movec %d0, %CACR /* Enable cache */ + nop + +#ifdef CONFIG_ROMFS_FS + /* + * Move ROM filesystem above bss :-) + */ + lea.l _sbss, %a0 /* Get start of bss */ + lea.l _ebss, %a1 /* Set up destination */ + move.l %a0, %a2 /* Copy of bss start */ + + move.l 8(%a0), %d0 /* Get size of ROMFS */ + addq.l #8, %d0 /* Allow for rounding */ + and.l #0xfffffffc, %d0 /* Whole words */ + + add.l %d0, %a0 /* Copy from end */ + add.l %d0, %a1 /* Copy from end */ + move.l %a1, _ramstart /* Set start of ram */ + +_copy_romfs: + move.l -(%a0), %d0 /* Copy dword */ + move.l %d0, -(%a1) + cmp.l %a0, %a2 /* Check if at end */ + bne _copy_romfs + +#else /* CONFIG_ROMFS_FS */ + lea.l _ebss, %a1 + move.l %a1, _ramstart +#endif /* CONFIG_ROMFS_FS */ + + + /* + * Zero out the bss region. + */ + lea.l _sbss, %a0 /* Get start of bss */ + lea.l _ebss, %a1 /* Get end of bss */ + clr.l %d0 /* Set value */ +_clear_bss: + move.l %d0, (%a0)+ /* Clear each word */ + cmp.l %a0, %a1 /* Check if at end */ + bne _clear_bss + + /* + * Load the current thread pointer and stack. + */ + lea init_thread_union, %a0 + lea 0x2000(%a0), %sp + + /* + * Assember start up done, start code proper. + */ + jsr start_kernel /* Start Linux kernel */ + +_exit: + jmp _exit /* Should never get here */ + +/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c --- a/arch/m68knommu/platform/5272/config.c 2004-11-10 17:19:03 -08:00 +++ b/arch/m68knommu/platform/5272/config.c 2004-11-10 17:19:03 -08:00 @@ -23,7 +23,6 @@ #include #include #include -#include /***************************************************************************/ @@ -110,13 +109,17 @@ #if defined(CONFIG_BOOTPARAM) strncpy(commandp, CONFIG_BOOTPARAM_STRING, size); commandp[size-1] = 0; -#elif defined(CONFIG_NETtel) +#elif defined(CONFIG_NETtel) || defined(CONFIG_SCALES) /* Copy command line from FLASH to local buffer... */ memcpy(commandp, (char *) 0xf0004000, size); commandp[size-1] = 0; #elif defined(CONFIG_MTD_KeyTechnology) /* Copy command line from FLASH to local buffer... */ memcpy(commandp, (char *) 0xffe06000, size); + commandp[size-1] = 0; +#elif defined(CONFIG_CANCam) + /* Copy command line from FLASH to local buffer... */ + memcpy(commandp, (char *) 0xf0010000, size); commandp[size-1] = 0; #else memset(commandp, 0, size); diff -Nru a/arch/m68knommu/platform/527x/M5271EVB/crt0_ram.S b/arch/m68knommu/platform/527x/M5271EVB/crt0_ram.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/platform/527x/M5271EVB/crt0_ram.S 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,166 @@ +/*****************************************************************************/ + +/* + * crt0_ram.S -- startup code for MCF527x ColdFire based Freescale boards. + * + * (C) Copyright 2003-2004, Greg Ungerer (gerg@snapgear.com). + */ + +/*****************************************************************************/ + +#include +#include +#include +#include +#include +#include + +/*****************************************************************************/ + +/* + * Freescale M5271EVB ColdFire eval board, chip select and memory setup. + */ + +#define MEM_BASE 0x00000000 /* Memory base at address 0 */ +#define VBR_BASE MEM_BASE /* Vector address */ + +#if defined(CONFIG_RAM4MB) +#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ +#elif defined(CONFIG_RAM8MB) +#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ +#else +#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ +#endif + +/*****************************************************************************/ + +.global _start +.global _rambase +.global _ramvec +.global _ramstart +.global _ramend + +/*****************************************************************************/ + +.data + +/* + * Set up the usable of RAM stuff. Size of RAM is determined then + * an initial stack set up at the end. + */ +_rambase: +.long 0 +_ramvec: +.long 0 +_ramstart: +.long 0 +_ramend: +.long 0 + +/*****************************************************************************/ + +.text + +/* + * This is the codes first entry point. This is where it all + * begins... + */ + +_start: + nop /* Filler */ + move.w #0x2700, %sr /* No interrupts */ + + /* + * Setup VBR here, otherwise buserror remap will not work. + * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) + * + * bkr@cut.de 19990306 + * + * Note: this is because dBUG points VBR to ROM, making vectors read + * only, so the bus trap can't be changed. (RS) + */ + move.l #VBR_BASE, %a7 /* Note VBR can't be read */ + movec %a7, %VBR + move.l %a7, _ramvec /* Set up vector addr */ + move.l %a7, _rambase /* Set up base RAM addr */ + + + /* + * Set memory size. + */ + move.l #MEM_SIZE, %a0 + + move.l %a0, %d0 /* Mem end addr is in a0 */ + move.l %d0, %sp /* Set up initial stack ptr */ + move.l %d0, _ramend /* Set end ram addr */ + + /* + * Enable CPU internal cache. + */ + move.l #0x01400000, %d0 + movec %d0, %CACR /* Invalidate cache */ + nop + + move.l #0x0000c000, %d0 /* Set SDRAM cached only */ + movec %d0, %ACR0 + move.l #0x00000000, %d0 /* No other regions cached */ + movec %d0, %ACR1 + + move.l #0x80400100, %d0 /* Configure cache */ + movec %d0, %CACR /* Enable cache */ + nop + + +#ifdef CONFIG_ROMFS_FS + /* + * Move ROM filesystem above bss :-) + */ + lea.l _sbss, %a0 /* Get start of bss */ + lea.l _ebss, %a1 /* Set up destination */ + move.l %a0, %a2 /* Copy of bss start */ + + move.l 8(%a0), %d0 /* Get size of ROMFS */ + addq.l #8, %d0 /* Allow for rounding */ + and.l #0xfffffffc, %d0 /* Whole words */ + + add.l %d0, %a0 /* Copy from end */ + add.l %d0, %a1 /* Copy from end */ + move.l %a1, _ramstart /* Set start of ram */ + +_copy_romfs: + move.l -(%a0), %d0 /* Copy dword */ + move.l %d0, -(%a1) + cmp.l %a0, %a2 /* Check if at end */ + bne _copy_romfs +#else /* CONFIG_ROMFS_FS */ + lea.l _ebss, %a1 + move.l %a1, _ramstart +#endif /* CONFIG_ROMFS_FS */ + + + /* + * Zero out the bss region. + */ + lea.l _sbss, %a0 /* Get start of bss */ + lea.l _ebss, %a1 /* Get end of bss */ + clr.l %d0 /* Set value */ +_clear_bss: + move.l %d0, (%a0)+ /* Clear each word */ + cmp.l %a0, %a1 /* Check if at end */ + bne _clear_bss + + /* + * Load the current thread pointer and stack. + */ + lea init_thread_union, %a0 + lea 0x2000(%a0), %sp + + /* + * Assember start up done, start code proper. + */ + jsr start_kernel /* Start Linux kernel */ + +_exit: + jmp _exit /* Should never get here */ + +/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/527x/M5275EVB/crt0_ram.S b/arch/m68knommu/platform/527x/M5275EVB/crt0_ram.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/platform/527x/M5275EVB/crt0_ram.S 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,166 @@ +/*****************************************************************************/ + +/* + * crt0_ram.S -- startup code for MCF527x ColdFire based Freescale boards. + * + * (C) Copyright 2003-2004, Greg Ungerer (gerg@snapgear.com). + */ + +/*****************************************************************************/ + +#include +#include +#include +#include +#include +#include + +/*****************************************************************************/ + +/* + * Freescale M5275EVB ColdFire eval board, chip select and memory setup. + */ + +#define MEM_BASE 0x00000000 /* Memory base at address 0 */ +#define VBR_BASE MEM_BASE /* Vector address */ + +#if defined(CONFIG_RAM4MB) +#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ +#elif defined(CONFIG_RAM8MB) +#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ +#else +#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ +#endif + +/*****************************************************************************/ + +.global _start +.global _rambase +.global _ramvec +.global _ramstart +.global _ramend + +/*****************************************************************************/ + +.data + +/* + * Set up the usable of RAM stuff. Size of RAM is determined then + * an initial stack set up at the end. + */ +_rambase: +.long 0 +_ramvec: +.long 0 +_ramstart: +.long 0 +_ramend: +.long 0 + +/*****************************************************************************/ + +.text + +/* + * This is the codes first entry point. This is where it all + * begins... + */ + +_start: + nop /* Filler */ + move.w #0x2700, %sr /* No interrupts */ + + /* + * Setup VBR here, otherwise buserror remap will not work. + * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) + * + * bkr@cut.de 19990306 + * + * Note: this is because dBUG points VBR to ROM, making vectors read + * only, so the bus trap can't be changed. (RS) + */ + move.l #VBR_BASE, %a7 /* Note VBR can't be read */ + movec %a7, %VBR + move.l %a7, _ramvec /* Set up vector addr */ + move.l %a7, _rambase /* Set up base RAM addr */ + + + /* + * Set memory size. + */ + move.l #MEM_SIZE, %a0 + + move.l %a0, %d0 /* Mem end addr is in a0 */ + move.l %d0, %sp /* Set up initial stack ptr */ + move.l %d0, _ramend /* Set end ram addr */ + + /* + * Enable CPU internal cache. + */ + move.l #0x01400000, %d0 + movec %d0, %CACR /* Invalidate cache */ + nop + + move.l #0x0000c000, %d0 /* Set SDRAM cached only */ + movec %d0, %ACR0 + move.l #0x00000000, %d0 /* No other regions cached */ + movec %d0, %ACR1 + + move.l #0x80400100, %d0 /* Configure cache */ + movec %d0, %CACR /* Enable cache */ + nop + + +#ifdef CONFIG_ROMFS_FS + /* + * Move ROM filesystem above bss :-) + */ + lea.l _sbss, %a0 /* Get start of bss */ + lea.l _ebss, %a1 /* Set up destination */ + move.l %a0, %a2 /* Copy of bss start */ + + move.l 8(%a0), %d0 /* Get size of ROMFS */ + addq.l #8, %d0 /* Allow for rounding */ + and.l #0xfffffffc, %d0 /* Whole words */ + + add.l %d0, %a0 /* Copy from end */ + add.l %d0, %a1 /* Copy from end */ + move.l %a1, _ramstart /* Set start of ram */ + +_copy_romfs: + move.l -(%a0), %d0 /* Copy dword */ + move.l %d0, -(%a1) + cmp.l %a0, %a2 /* Check if at end */ + bne _copy_romfs +#else /* CONFIG_ROMFS_FS */ + lea.l _ebss, %a1 + move.l %a1, _ramstart +#endif /* CONFIG_ROMFS_FS */ + + + /* + * Zero out the bss region. + */ + lea.l _sbss, %a0 /* Get start of bss */ + lea.l _ebss, %a1 /* Get end of bss */ + clr.l %d0 /* Set value */ +_clear_bss: + move.l %d0, (%a0)+ /* Clear each word */ + cmp.l %a0, %a1 /* Check if at end */ + bne _clear_bss + + /* + * Load the current thread pointer and stack. + */ + lea init_thread_union, %a0 + lea 0x2000(%a0), %sp + + /* + * Assember start up done, start code proper. + */ + jsr start_kernel /* Start Linux kernel */ + +_exit: + jmp _exit /* Should never get here */ + +/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/527x/Makefile b/arch/m68knommu/platform/527x/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/platform/527x/Makefile 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,21 @@ +# +# Makefile for the linux kernel. +# + +# +# If you want to play with the HW breakpoints then you will +# need to add define this, which will give you a stack backtrace +# on the console port whenever a DBG interrupt occurs. You have to +# set up you HW breakpoints to trigger a DBG interrupt: +# +# EXTRA_CFLAGS += -DTRAP_DBG_INTERRUPT +# EXTRA_AFLAGS += -DTRAP_DBG_INTERRUPT +# + +ifdef CONFIG_FULLDEBUG +AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +endif + +obj-y := config.o + +extra-y := $(BOARD)/crt0_$(MODEL).o diff -Nru a/arch/m68knommu/platform/527x/config.c b/arch/m68knommu/platform/527x/config.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/platform/527x/config.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,82 @@ +/***************************************************************************/ + +/* + * linux/arch/m68knommu/platform/527x/config.c + * + * Sub-architcture dependant initialization code for the Freescale + * 5270/5271 CPUs. + * + * Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com) + * Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com) + */ + +/***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/***************************************************************************/ + +void coldfire_pit_tick(void); +void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); +unsigned long coldfire_pit_offset(void); +void coldfire_trap_init(void); +void coldfire_reset(void); + +/***************************************************************************/ + +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { + MCF_MBAR + MCFDMA_BASE0, +}; + +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; + +/***************************************************************************/ + +void mcf_disableall(void) +{ + *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff; + *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL)) = 0xffffffff; +} + +/***************************************************************************/ + +void mcf_autovector(unsigned int vec) +{ + /* Everything is auto-vectored on the 5272 */ +} + +/***************************************************************************/ + +void config_BSP(char *commandp, int size) +{ + mcf_disableall(); + +#ifdef CONFIG_BOOTPARAM + strncpy(commandp, CONFIG_BOOTPARAM_STRING, size); + commandp[size-1] = 0; +#else + memset(commandp, 0, size); +#endif + + mach_sched_init = coldfire_pit_init; + mach_tick = coldfire_pit_tick; + mach_gettimeoffset = coldfire_pit_offset; + mach_trap_init = coldfire_trap_init; + mach_reset = coldfire_reset; +} + +/***************************************************************************/ diff -Nru a/arch/m68knommu/platform/5282/MOTOROLA/crt0_ram.S b/arch/m68knommu/platform/5282/MOTOROLA/crt0_ram.S --- a/arch/m68knommu/platform/5282/MOTOROLA/crt0_ram.S 2004-11-10 17:19:07 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,171 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for MCF5282 ColdFire based MOTOROLA boards. - * - * (C) Copyright 2003, Greg Ungerer (gerg@snapgear.com). - */ - -/*****************************************************************************/ - -#include -#include -#include -#include -#include -#include - -/*****************************************************************************/ - -/* - * Motorola M5282C3 ColdFire eval board, chip select and memory setup. - */ - -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ - -#if defined(CONFIG_RAM16MB) -#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ -#elif defined(CONFIG_RAM8MB) -#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ -#else -#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ -#endif - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * Set memory size. - */ - move.l #MEM_SIZE, %a0 - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - /* - * Enable CPU internal cache. - * - * Cache is totally broken in first 5282 silicon. - * No point enabling it for now. - */ -#if 0 - move.l #0x01000000, %d0 - movec %d0, %CACR /* Invalidate cache */ - nop - - move.l #0x0000c000, %d0 /* Set SDRAM cached only */ - movec %d0, %ACR0 - move.l #0x00000000, %d0 /* No other regions cached */ - movec %d0, %ACR1 - - move.l #0x00000000, %d0 /* Setup cache mask */ - movec %d0, %CACR /* Enable cache */ - nop -#endif - - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current thread pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/5282/Makefile b/arch/m68knommu/platform/5282/Makefile --- a/arch/m68knommu/platform/5282/Makefile 2004-11-10 17:19:07 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,21 +0,0 @@ -# -# Makefile for the linux kernel. -# - -# -# If you want to play with the HW breakpoints then you will -# need to add define this, which will give you a stack backtrace -# on the console port whenever a DBG interrupt occurs. You have to -# set up you HW breakpoints to trigger a DBG interrupt: -# -# EXTRA_CFLAGS += -DTRAP_DBG_INTERRUPT -# EXTRA_AFLAGS += -DTRAP_DBG_INTERRUPT -# - -ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 -endif - -obj-y := config.o pit.o - -extra-y := $(BOARD)/crt0_$(MODEL).o diff -Nru a/arch/m68knommu/platform/5282/config.c b/arch/m68knommu/platform/5282/config.c --- a/arch/m68knommu/platform/5282/config.c 2004-11-10 17:19:02 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,82 +0,0 @@ -/***************************************************************************/ - -/* - * linux/arch/m68knommu/platform/5282/config.c - * - * Sub-architcture dependant initialization code for the Motorola - * 5282 CPU. - * - * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com) - * Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com) - */ - -/***************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/***************************************************************************/ - -void coldfire_pit_tick(void); -void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); -unsigned long coldfire_pit_offset(void); -void coldfire_trap_init(void); -void coldfire_reset(void); - -/***************************************************************************/ - -/* - * DMA channel base address table. - */ -unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { - MCF_MBAR + MCFDMA_BASE0, -}; - -unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; - -/***************************************************************************/ - -void mcf_disableall(void) -{ - *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff; - *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL)) = 0xffffffff; -} - -/***************************************************************************/ - -void mcf_autovector(unsigned int vec) -{ - /* Everything is auto-vectored on the 5272 */ -} - -/***************************************************************************/ - -void config_BSP(char *commandp, int size) -{ - mcf_disableall(); - -#ifdef CONFIG_BOOTPARAM - strncpy(commandp, CONFIG_BOOTPARAM_STRING, size); - commandp[size-1] = 0; -#else - memset(commandp, 0, size); -#endif - - mach_sched_init = coldfire_pit_init; - mach_tick = coldfire_pit_tick; - mach_gettimeoffset = coldfire_pit_offset; - mach_trap_init = coldfire_trap_init; - mach_reset = coldfire_reset; -} - -/***************************************************************************/ diff -Nru a/arch/m68knommu/platform/5282/pit.c b/arch/m68knommu/platform/5282/pit.c --- a/arch/m68knommu/platform/5282/pit.c 2004-11-10 17:19:06 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,87 +0,0 @@ -/***************************************************************************/ - -/* - * pit.c -- Motorola ColdFire PIT timer. Currently this type of - * hardware timer only exists in the Motorola ColdFire - * 5282 CPU. - * - * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com) - * Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com) - * - */ - -/***************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/***************************************************************************/ - -void coldfire_pit_tick(void) -{ - volatile struct mcfpit *tp; - - /* Reset the ColdFire timer */ - tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); - tp->pcsr |= MCFPIT_PCSR_PIF; -} - -/***************************************************************************/ - -void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)) -{ - volatile unsigned char *icrp; - volatile unsigned long *imrp; - volatile struct mcfpit *tp; - - request_irq(64+55, handler, SA_INTERRUPT, "ColdFire Timer", NULL); - - icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + - MCFINTC_ICR0 + MCFINT_PIT1); - *icrp = 0x2b; /* PIT1 with level 5, priority 3 */ - - imrp = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH); - *imrp &= ~(1 << (55 - 32)); - - /* Set up PIT timer 1 as poll clock */ - tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); - tp->pcsr = MCFPIT_PCSR_DISABLE; - - tp->pmr = ((MCF_CLK / 2) / 64) / HZ; - tp->pcsr = MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | MCFPIT_PCSR_OVW | - MCFPIT_PCSR_RLD | MCFPIT_PCSR_CLK64; -} - -/***************************************************************************/ - -unsigned long coldfire_pit_offset(void) -{ - volatile struct mcfpit *tp; - volatile unsigned long *ipr; - unsigned long pmr, pcntr, offset; - - tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); - ipr = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IPRH); - - pmr = tp->pmr; - pcntr = tp->pcntr; - - /* - * If we are still in the first half of the upcount and a - * timer interupt is pending, then add on a ticks worth of time. - */ - offset = ((pcntr * (1000000 / HZ)) / pmr); - if ((offset < (1000000 / HZ / 2)) && (*ipr & (1 << (55 - 32)))) - offset += 1000000 / HZ; - return offset; -} - -/***************************************************************************/ diff -Nru a/arch/m68knommu/platform/528x/M5282EVB/crt0_ram.S b/arch/m68knommu/platform/528x/M5282EVB/crt0_ram.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/platform/528x/M5282EVB/crt0_ram.S 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,171 @@ +/*****************************************************************************/ + +/* + * crt0_ram.S -- startup code for M5282EVB ColdFire based MOTOROLA boards. + * + * (C) Copyright 2003, Greg Ungerer (gerg@snapgear.com). + */ + +/*****************************************************************************/ + +#include +#include +#include +#include +#include +#include + +/*****************************************************************************/ + +/* + * Motorola M5282EVB ColdFire eval board, chip select and memory setup. + */ + +#define MEM_BASE 0x00000000 /* Memory base at address 0 */ +#define VBR_BASE MEM_BASE /* Vector address */ + +#if defined(CONFIG_RAM16MB) +#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ +#elif defined(CONFIG_RAM8MB) +#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ +#else +#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ +#endif + +/*****************************************************************************/ + +.global _start +.global _rambase +.global _ramvec +.global _ramstart +.global _ramend + +/*****************************************************************************/ + +.data + +/* + * Set up the usable of RAM stuff. Size of RAM is determined then + * an initial stack set up at the end. + */ +_rambase: +.long 0 +_ramvec: +.long 0 +_ramstart: +.long 0 +_ramend: +.long 0 + +/*****************************************************************************/ + +.text + +/* + * This is the codes first entry point. This is where it all + * begins... + */ + +_start: + nop /* Filler */ + move.w #0x2700, %sr /* No interrupts */ + + /* + * Setup VBR here, otherwise buserror remap will not work. + * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) + * + * bkr@cut.de 19990306 + * + * Note: this is because dBUG points VBR to ROM, making vectors read + * only, so the bus trap can't be changed. (RS) + */ + move.l #VBR_BASE, %a7 /* Note VBR can't be read */ + movec %a7, %VBR + move.l %a7, _ramvec /* Set up vector addr */ + move.l %a7, _rambase /* Set up base RAM addr */ + + + /* + * Set memory size. + */ + move.l #MEM_SIZE, %a0 + + move.l %a0, %d0 /* Mem end addr is in a0 */ + move.l %d0, %sp /* Set up initial stack ptr */ + move.l %d0, _ramend /* Set end ram addr */ + + /* + * Enable CPU internal cache. + * + * Cache is totally broken in first 5282 silicon. + * No point enabling it for now. + */ +#if 0 + move.l #0x01000000, %d0 + movec %d0, %CACR /* Invalidate cache */ + nop + + move.l #0x0000c000, %d0 /* Set SDRAM cached only */ + movec %d0, %ACR0 + move.l #0x00000000, %d0 /* No other regions cached */ + movec %d0, %ACR1 + + move.l #0x00000000, %d0 /* Setup cache mask */ + movec %d0, %CACR /* Enable cache */ + nop +#endif + + +#ifdef CONFIG_ROMFS_FS + /* + * Move ROM filesystem above bss :-) + */ + lea.l _sbss, %a0 /* Get start of bss */ + lea.l _ebss, %a1 /* Set up destination */ + move.l %a0, %a2 /* Copy of bss start */ + + move.l 8(%a0), %d0 /* Get size of ROMFS */ + addq.l #8, %d0 /* Allow for rounding */ + and.l #0xfffffffc, %d0 /* Whole words */ + + add.l %d0, %a0 /* Copy from end */ + add.l %d0, %a1 /* Copy from end */ + move.l %a1, _ramstart /* Set start of ram */ + +_copy_romfs: + move.l -(%a0), %d0 /* Copy dword */ + move.l %d0, -(%a1) + cmp.l %a0, %a2 /* Check if at end */ + bne _copy_romfs +#else /* CONFIG_ROMFS_FS */ + lea.l _ebss, %a1 + move.l %a1, _ramstart +#endif /* CONFIG_ROMFS_FS */ + + + /* + * Zero out the bss region. + */ + lea.l _sbss, %a0 /* Get start of bss */ + lea.l _ebss, %a1 /* Get end of bss */ + clr.l %d0 /* Set value */ +_clear_bss: + move.l %d0, (%a0)+ /* Clear each word */ + cmp.l %a0, %a1 /* Check if at end */ + bne _clear_bss + + /* + * Load the current thread pointer and stack. + */ + lea init_thread_union, %a0 + lea 0x2000(%a0), %sp + + /* + * Assember start up done, start code proper. + */ + jsr start_kernel /* Start Linux kernel */ + +_exit: + jmp _exit /* Should never get here */ + +/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/528x/Makefile b/arch/m68knommu/platform/528x/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/platform/528x/Makefile 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,21 @@ +# +# Makefile for the linux kernel. +# + +# +# If you want to play with the HW breakpoints then you will +# need to add define this, which will give you a stack backtrace +# on the console port whenever a DBG interrupt occurs. You have to +# set up you HW breakpoints to trigger a DBG interrupt: +# +# EXTRA_CFLAGS += -DTRAP_DBG_INTERRUPT +# EXTRA_AFLAGS += -DTRAP_DBG_INTERRUPT +# + +ifdef CONFIG_FULLDEBUG +AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 +endif + +obj-y := config.o + +extra-y := $(BOARD)/crt0_$(MODEL).o diff -Nru a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/platform/528x/config.c 2004-11-10 17:19:02 -08:00 @@ -0,0 +1,82 @@ +/***************************************************************************/ + +/* + * linux/arch/m68knommu/platform/528x/config.c + * + * Sub-architcture dependant initialization code for the Motorola + * 5280 and 5282 CPUs. + * + * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com) + * Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com) + */ + +/***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/***************************************************************************/ + +void coldfire_pit_tick(void); +void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); +unsigned long coldfire_pit_offset(void); +void coldfire_trap_init(void); +void coldfire_reset(void); + +/***************************************************************************/ + +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { + MCF_MBAR + MCFDMA_BASE0, +}; + +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; + +/***************************************************************************/ + +void mcf_disableall(void) +{ + *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff; + *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL)) = 0xffffffff; +} + +/***************************************************************************/ + +void mcf_autovector(unsigned int vec) +{ + /* Everything is auto-vectored on the 5272 */ +} + +/***************************************************************************/ + +void config_BSP(char *commandp, int size) +{ + mcf_disableall(); + +#ifdef CONFIG_BOOTPARAM + strncpy(commandp, CONFIG_BOOTPARAM_STRING, size); + commandp[size-1] = 0; +#else + memset(commandp, 0, size); +#endif + + mach_sched_init = coldfire_pit_init; + mach_tick = coldfire_pit_tick; + mach_gettimeoffset = coldfire_pit_offset; + mach_trap_init = coldfire_trap_init; + mach_reset = coldfire_reset; +} + +/***************************************************************************/ diff -Nru a/arch/m68knommu/platform/5307/Makefile b/arch/m68knommu/platform/5307/Makefile --- a/arch/m68knommu/platform/5307/Makefile 2004-11-10 17:19:06 -08:00 +++ b/arch/m68knommu/platform/5307/Makefile 2004-11-10 17:19:06 -08:00 @@ -20,8 +20,10 @@ obj-$(CONFIG_M5206) += timers.o obj-$(CONFIG_M5206e) += timers.o obj-$(CONFIG_M5249) += timers.o +obj-$(CONFIG_M527x) += pit.o obj-$(CONFIG_M5272) += timers.o obj-$(CONFIG_M5307) += config.o timers.o +obj-$(CONFIG_M528x) += pit.o obj-$(CONFIG_M5407) += timers.o ifeq ($(CONFIG_M5307),y) diff -Nru a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c --- a/arch/m68knommu/platform/5307/config.c 2004-11-10 17:19:02 -08:00 +++ b/arch/m68knommu/platform/5307/config.c 2004-11-10 17:19:02 -08:00 @@ -23,7 +23,6 @@ #include #include #include -#include #include /***************************************************************************/ diff -Nru a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/platform/5307/pit.c 2004-11-10 17:19:06 -08:00 @@ -0,0 +1,88 @@ +/***************************************************************************/ + +/* + * pit.c -- Motorola ColdFire PIT timer. Currently this type of + * hardware timer only exists in the Motorola ColdFire + * 5270/5271 and 5282 CPUs. + * + * Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com) + * Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com) + * + */ + +/***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/***************************************************************************/ + +void coldfire_pit_tick(void) +{ + volatile struct mcfpit *tp; + + /* Reset the ColdFire timer */ + tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); + tp->pcsr |= MCFPIT_PCSR_PIF; +} + +/***************************************************************************/ + +void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)) +{ + volatile unsigned char *icrp; + volatile unsigned long *imrp; + volatile struct mcfpit *tp; + + request_irq(MCFINT_VECBASE + MCFINT_PIT1, handler, SA_INTERRUPT, + "ColdFire Timer", NULL); + + icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + + MCFINTC_ICR0 + MCFINT_PIT1); + *icrp = 0x2b; /* PIT1 with level 5, priority 3 */ + + imrp = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH); + *imrp &= ~(1 << (MCFINT_PIT1 - 32)); + + /* Set up PIT timer 1 as poll clock */ + tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); + tp->pcsr = MCFPIT_PCSR_DISABLE; + + tp->pmr = ((MCF_CLK / 2) / 64) / HZ; + tp->pcsr = MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | MCFPIT_PCSR_OVW | + MCFPIT_PCSR_RLD | MCFPIT_PCSR_CLK64; +} + +/***************************************************************************/ + +unsigned long coldfire_pit_offset(void) +{ + volatile struct mcfpit *tp; + volatile unsigned long *ipr; + unsigned long pmr, pcntr, offset; + + tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); + ipr = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IPRH); + + pmr = *(&tp->pmr); + pcntr = *(&tp->pcntr); + + /* + * If we are still in the first half of the upcount and a + * timer interupt is pending, then add on a ticks worth of time. + */ + offset = ((pmr - pcntr) * (1000000 / HZ)) / pmr; + if ((offset < (1000000 / HZ / 2)) && (*ipr & (1 << (MCFINT_PIT1 - 32)))) + offset += 1000000 / HZ; + return offset; +} + +/***************************************************************************/ diff -Nru a/arch/m68knommu/platform/5307/vectors.c b/arch/m68knommu/platform/5307/vectors.c --- a/arch/m68knommu/platform/5307/vectors.c 2004-11-10 17:19:06 -08:00 +++ b/arch/m68knommu/platform/5307/vectors.c 2004-11-10 17:19:06 -08:00 @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -22,7 +23,6 @@ #include #include #include -#include #include /***************************************************************************/ diff -Nru a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c --- a/arch/m68knommu/platform/5407/config.c 2004-11-10 17:19:05 -08:00 +++ b/arch/m68knommu/platform/5407/config.c 2004-11-10 17:19:05 -08:00 @@ -23,7 +23,6 @@ #include #include #include -#include /***************************************************************************/ diff -Nru a/arch/mips/lib/dec_and_lock.c b/arch/mips/lib/dec_and_lock.c --- a/arch/mips/lib/dec_and_lock.c 2004-11-10 17:19:02 -08:00 +++ b/arch/mips/lib/dec_and_lock.c 2004-11-10 17:19:02 -08:00 @@ -28,7 +28,7 @@ */ #ifndef ATOMIC_DEC_AND_LOCK -int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) +int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) { int counter; int newcount; @@ -51,5 +51,5 @@ return 0; } -EXPORT_SYMBOL(atomic_dec_and_lock); +EXPORT_SYMBOL(_atomic_dec_and_lock); #endif /* ATOMIC_DEC_AND_LOCK */ diff -Nru a/arch/parisc/Makefile b/arch/parisc/Makefile --- a/arch/parisc/Makefile 2004-11-10 17:19:06 -08:00 +++ b/arch/parisc/Makefile 2004-11-10 17:19:06 -08:00 @@ -37,8 +37,10 @@ # are not in gcc 3.2. cflags-y += -mno-space-regs -mfast-indirect-calls -# No fixed-point multiply -cflags-y += -mdisable-fpregs +# Currently we save and restore fpregs on all kernel entry/interruption paths. +# If that gets optimized, we might need to disable the use of fpregs in the +# kernel. +#cflags-y += -mdisable-fpregs # Without this, "ld -r" results in .text sections that are too big # (> 0x40000) for branches to reach stubs. @@ -52,7 +54,6 @@ cflags-$(CONFIG_PA8X00) += -march=2.0 -mschedule=8000 head-y := arch/parisc/kernel/head.o -head-$(CONFIG_PARISC64) := arch/parisc/kernel/head64.o CFLAGS += $(cflags-y) @@ -86,6 +87,12 @@ # Shorthands for known targets not supported by parisc, use palo as default Image zImage bzImage: palo +kernel_install: vmlinux + sh $(src)/arch/parisc/install.sh \ + $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)" + +install: kernel_install modules_install + prepare: include/asm-parisc/offsets.h arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \ @@ -100,4 +107,8 @@ define archhelp @echo '* vmlinux - Uncompressed kernel image (./vmlinux)' @echo ' palo - Bootable image (./lifimage)' + @echo ' install - Install kernel using' + @echo ' (your) ~/bin/installkernel or' + @echo ' (distribution) /sbin/installkernel or' + @echo ' copy to $$(INSTALL_PATH)' endef diff -Nru a/arch/parisc/configs/a500_defconfig b/arch/parisc/configs/a500_defconfig --- a/arch/parisc/configs/a500_defconfig 2004-11-10 17:19:03 -08:00 +++ b/arch/parisc/configs/a500_defconfig 2004-11-10 17:19:03 -08:00 @@ -11,7 +11,6 @@ # CONFIG_EXPERIMENTAL=y # CONFIG_CLEAN_COMPILE is not set -# CONFIG_STANDALONE is not set CONFIG_BROKEN=y CONFIG_BROKEN_ON_SMP=y @@ -31,6 +30,7 @@ CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -48,6 +48,7 @@ CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set CONFIG_KMOD=y +CONFIG_STOP_MACHINE=y # # Processor type and features @@ -61,9 +62,12 @@ CONFIG_PREFETCH=y CONFIG_PARISC64=y CONFIG_64BIT=y -# CONFIG_SMP is not set +CONFIG_SMP=y +CONFIG_HOTPLUG_CPU=y +# CONFIG_DISCONTIGMEM is not set # CONFIG_PREEMPT is not set CONFIG_COMPAT=y +CONFIG_NR_CPUS=4 # # Bus options (PCI, PCMCIA, EISA, GSC, ISA) @@ -86,6 +90,7 @@ CONFIG_PCMCIA_DEBUG=y CONFIG_YENTA=m CONFIG_CARDBUS=y +# CONFIG_PD6729 is not set # CONFIG_I82092 is not set # CONFIG_TCIC is not set @@ -107,6 +112,8 @@ # # Generic Driver Options # +# CONFIG_STANDALONE is not set +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set CONFIG_DEBUG_DRIVER=y @@ -135,7 +142,7 @@ CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=6144 CONFIG_BLK_DEV_INITRD=y @@ -165,7 +172,6 @@ # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_REPORT_LUNS=y # CONFIG_SCSI_CONSTANTS is not set # CONFIG_SCSI_LOGGING is not set @@ -179,6 +185,7 @@ # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set @@ -353,6 +360,8 @@ # CONFIG_IP_NF_COMPAT_IPFWADM is not set CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_RAW=m +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_REALM is not set CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -379,6 +388,7 @@ # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -452,6 +462,7 @@ # CONFIG_SUNDANCE is not set CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y +# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -501,7 +512,6 @@ # # Wireless 802.11b ISA/PCI cards support # -# CONFIG_AIRO is not set CONFIG_HERMES=m CONFIG_PLX_HERMES=m CONFIG_TMD_HERMES=m @@ -644,7 +654,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set # CONFIG_AGP is not set # CONFIG_DRM is not set @@ -661,6 +670,11 @@ # CONFIG_I2C is not set # +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# # Misc devices # @@ -734,6 +748,7 @@ CONFIG_JOLIET=y # CONFIG_ZISOFS is not set CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems @@ -741,6 +756,8 @@ CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -795,6 +812,9 @@ CONFIG_SMB_NLS_DEFAULT=y CONFIG_SMB_NLS_REMOTE="cp437" CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_POSIX is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -833,6 +853,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_2=m CONFIG_NLS_ISO8859_3=m @@ -860,6 +881,8 @@ CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_RWLOCK is not set # CONFIG_FRAME_POINTER is not set # CONFIG_DEBUG_INFO is not set @@ -886,7 +909,9 @@ CONFIG_CRYPTO_AES=m CONFIG_CRYPTO_CAST5=m CONFIG_CRYPTO_CAST6=m +# CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_KHAZAD is not set CONFIG_CRYPTO_DEFLATE=m # CONFIG_CRYPTO_MICHAEL_MIC is not set CONFIG_CRYPTO_CRC32C=m @@ -895,6 +920,7 @@ # # Library routines # +CONFIG_CRC_CCITT=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m diff -Nru a/arch/parisc/install.sh b/arch/parisc/install.sh --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/parisc/install.sh 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,38 @@ +#!/bin/sh +# +# arch/parisc/install.sh, derived from arch/i386/boot/install.sh +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 1995 by Linus Torvalds +# +# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin +# +# "make install" script for i386 architecture +# +# Arguments: +# $1 - kernel version +# $2 - kernel image file +# $3 - kernel map file +# $4 - default install path (blank if root directory) +# + +# User may have a custom install script + +if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi +if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi + +# Default install + +if [ -f $4/vmlinux ]; then + mv $4/vmlinux $4/vmlinux.old +fi + +if [ -f $4/System.map ]; then + mv $4/System.map $4/System.old +fi + +cat $2 > $4/vmlinux +cp $3 $4/System.map diff -Nru a/arch/parisc/kernel/Makefile b/arch/parisc/kernel/Makefile --- a/arch/parisc/kernel/Makefile 2004-11-10 17:19:03 -08:00 +++ b/arch/parisc/kernel/Makefile 2004-11-10 17:19:03 -08:00 @@ -2,9 +2,7 @@ # Makefile for arch/parisc/kernel # -head-y := head.o -head-$(CONFIG_PARISC64) := head64.o -extra-y := init_task.o $(head-y) vmlinux.lds +extra-y := init_task.o head.o vmlinux.lds AFLAGS_entry.o := -traditional AFLAGS_pacache.o := -traditional @@ -14,7 +12,8 @@ pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \ ptrace.o hardware.o inventory.o drivers.o semaphore.o \ signal.o hpmc.o real2.o parisc_ksyms.o unaligned.o \ - process.o processor.o pdc_cons.o pdc_chassis.o unwind.o + process.o processor.o pdc_cons.o pdc_chassis.o unwind.o \ + topology.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_PA11) += pci-dma.o diff -Nru a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c --- a/arch/parisc/kernel/asm-offsets.c 2004-11-10 17:19:02 -08:00 +++ b/arch/parisc/kernel/asm-offsets.c 2004-11-10 17:19:02 -08:00 @@ -38,6 +38,7 @@ #include #include #include +#include #define DEFINE(sym, val) \ asm volatile("\n->" #sym " %0 " #val : : "i" (val)) @@ -291,5 +292,8 @@ DEFINE(ASM_PT_INITIAL, PT_INITIAL); DEFINE(ASM_PAGE_SIZE, PAGE_SIZE); BLANK(); + DEFINE(EXCDATA_IP, offsetof(struct exception_data, fault_ip)); + DEFINE(EXCDATA_SPACE, offsetof(struct exception_data, fault_space)); + DEFINE(EXCDATA_ADDR, offsetof(struct exception_data, fault_addr)); return 0; } diff -Nru a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c --- a/arch/parisc/kernel/cache.c 2004-11-10 17:19:04 -08:00 +++ b/arch/parisc/kernel/cache.c 2004-11-10 17:19:04 -08:00 @@ -33,6 +33,17 @@ int icache_stride; EXPORT_SYMBOL(dcache_stride); + +#if defined(CONFIG_SMP) +/* On some machines (e.g. ones with the Merced bus), there can be + * only a single PxTLB broadcast at a time; this must be guaranteed + * by software. We put a spinlock around all TLB flushes to + * ensure this. + */ +spinlock_t pa_tlb_lock = SPIN_LOCK_UNLOCKED; +EXPORT_SYMBOL(pa_tlb_lock); +#endif + struct pdc_cache_info cache_info; #ifndef CONFIG_PA20 static struct pdc_btlb_info btlb_info; @@ -306,3 +317,13 @@ EXPORT_SYMBOL(flush_kernel_dcache_page); EXPORT_SYMBOL(flush_data_cache_local); EXPORT_SYMBOL(flush_kernel_icache_range_asm); + +void clear_user_page_asm(void *page, unsigned long vaddr) +{ + /* This function is implemented in assembly in pacache.S */ + extern void __clear_user_page_asm(void *page, unsigned long vaddr); + + purge_tlb_start(); + __clear_user_page_asm(page, vaddr); + purge_tlb_end(); +} diff -Nru a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S --- a/arch/parisc/kernel/entry.S 2004-11-10 17:19:03 -08:00 +++ b/arch/parisc/kernel/entry.S 2004-11-10 17:19:03 -08:00 @@ -440,8 +440,17 @@ mfctl %cr25,\reg .endm - /* Only allow faults on different spaces from the - * currently active one if we're the kernel */ + /* + space_check(spc,tmp,fault) + + spc - The space we saw the fault with. + tmp - The place to store the current space. + fault - Function to call on failure. + + Only allow faults on different spaces from the + currently active one if we're the kernel + + */ .macro space_check spc,tmp,fault mfsp %sr7,\tmp or,COND(<>) %r0,\spc,%r0 /* user may execute gateway page @@ -774,7 +783,7 @@ #ifdef __LP64__ ldo -16(%r30),%r29 /* Reference param save area */ #endif - bl do_fork, %r2 + BL do_fork, %r2 copy %r1, %r24 /* pt_regs */ /* Parent Returns here */ @@ -827,7 +836,7 @@ #ifdef __LP64__ ldo -16(%r30),%r29 /* Reference param save area */ #endif - bl sys_execve, %r2 + BL sys_execve, %r2 copy %r16, %r26 cmpib,=,n 0,%r28,intr_return /* forward */ @@ -939,6 +948,7 @@ STREG %r19,PT_SR7(%r16) intr_return: + /* NOTE: Need to enable interrupts incase we schedule. */ ssm PSW_SM_I, %r0 /* Check for software interrupts */ @@ -982,6 +992,8 @@ ldo PT_FR31(%r29),%r1 rest_fp %r1 rest_general %r29 + + /* Create a "relied upon translation" PA 2.0 Arch. F-5 */ ssm 0,%r0 nop nop @@ -992,8 +1004,15 @@ nop tophys_r1 %r29 rsm (PSW_SM_Q|PSW_SM_P|PSW_SM_D|PSW_SM_I),%r0 + + /* Restore space id's and special cr's from PT_REGS + * structure pointed to by r29 */ rest_specials %r29 + + /* Important: Note that rest_stack restores r29 + * last (we are using it)! It also restores r1 and r30. */ rest_stack + rfi nop nop @@ -1036,7 +1055,14 @@ .import do_signal,code intr_do_signal: - /* Only do signals if we are returning to user space */ + /* + This check is critical to having LWS + working. The IASQ is zero on the gateway + page and we cannot deliver any signals until + we get off the gateway page. + + Only do signals if we are returning to user space + */ LDREG PT_IASQ0(%r16), %r20 CMPIB= 0,%r20,intr_restore /* backward */ nop @@ -1050,7 +1076,7 @@ ldo -16(%r30),%r29 /* Reference param save area */ #endif - bl do_signal,%r2 + BL do_signal,%r2 copy %r0, %r26 /* sigset_t *oldset = NULL */ b intr_restore @@ -1443,15 +1469,20 @@ * of the instruction. Since we don't insert a translation * we can get a lot of faults during a flush loop, so it makes * sense to try to do it here with minimum overhead. We only - * emulate fdc,fic & pdc instructions whose base and index - * registers are not shadowed. We defer everything else to the - * "slow" path. + * emulate fdc,fic,pdc,probew,prober instructions whose base + * and index registers are not shadowed. We defer everything + * else to the "slow" path. */ mfctl %cr19,%r9 /* Get iir */ + + /* PA 2.0 Arch Ref. Book pg 382 has a good description of the insn bits. + Checks for fdc,fdce,pdc,"fic,4f",prober,probeir,probew, probeiw */ + + /* Checks for fdc,fdce,pdc,"fic,4f" only */ ldi 0x280,%r16 and %r9,%r16,%r17 - cmpb,<>,n %r16,%r17,nadtlb_fault /* Not fdc,fic,pdc */ + cmpb,<>,n %r16,%r17,nadtlb_probe_check bb,>=,n %r9,26,nadtlb_nullify /* m bit not set, just nullify */ BL get_register,%r25 extrw,u %r9,15,5,%r8 /* Get index register # */ @@ -1472,6 +1503,32 @@ rfir nop + /* + When there is no translation for the probe address then we + must nullify the insn and return zero in the target regsiter. + This will indicate to the calling code that it does not have + write/read privileges to this address. + + This should technically work for prober and probew in PA 1.1, + and also probe,r and probe,w in PA 2.0 + + WARNING: USE ONLY NON-SHADOW REGISTERS WITH PROBE INSN! + THE SLOW-PATH EMULATION HAS NOT BEEN WRITTEN YET. + + */ +nadtlb_probe_check: + ldi 0x80,%r16 + and %r9,%r16,%r17 + cmpb,<>,n %r16,%r17,nadtlb_fault /* Must be probe,[rw]*/ + BL get_register,%r25 /* Find the target register */ + extrw,u %r9,31,5,%r8 /* Get target register */ + CMPIB=,n -1,%r1,nadtlb_fault /* have to use slow path */ + BL set_register,%r25 + copy %r0,%r1 /* Write zero to target register */ + b nadtlb_nullify /* Nullify return insn */ + nop + + #ifdef __LP64__ itlb_miss_20w: @@ -1762,7 +1819,7 @@ LDREG PT_GR30(%r1),%r25 copy %r1,%r24 - bl sys_clone,%r2 + BL sys_clone,%r2 ldi SIGCHLD,%r26 LDREG -RP_OFFSET-FRAME_SIZE(%r30),%r2 @@ -1782,7 +1839,7 @@ /* Set the return value for the child */ child_return: - bl schedule_tail, %r2 + BL schedule_tail, %r2 nop LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE-FRAME_SIZE(%r30), %r1 @@ -1807,7 +1864,7 @@ STREG %r2,PT_GR19(%r1) /* save for child */ STREG %r30,PT_GR21(%r1) - bl sys_clone,%r2 + BL sys_clone,%r2 copy %r1,%r24 b wrapper_exit @@ -1830,7 +1887,7 @@ STREG %r2,PT_GR19(%r1) /* save for child */ STREG %r30,PT_GR21(%r1) - bl sys_vfork,%r2 + BL sys_vfork,%r2 copy %r1,%r26 b wrapper_exit @@ -1893,10 +1950,10 @@ STREG %r2, -RP_OFFSET(%r30) #ifdef __LP64__ ldo FRAME_SIZE(%r30), %r30 - bl sys_rt_sigreturn,%r2 + BL sys_rt_sigreturn,%r2 ldo -16(%r30),%r29 /* Reference param save area */ #else - bl sys_rt_sigreturn,%r2 + BL sys_rt_sigreturn,%r2 ldo FRAME_SIZE(%r30), %r30 #endif @@ -1924,7 +1981,7 @@ STREG %r2, -RP_OFFSET(%r30) #ifdef __LP64__ ldo FRAME_SIZE(%r30), %r30 - bl do_sigaltstack,%r2 + b,l do_sigaltstack,%r2 ldo -16(%r30),%r29 /* Reference param save area */ #else bl do_sigaltstack,%r2 @@ -1944,7 +2001,7 @@ LDREG TASK_PT_GR30(%r24),%r24 STREG %r2, -RP_OFFSET(%r30) ldo FRAME_SIZE(%r30), %r30 - bl do_sigaltstack32,%r2 + b,l do_sigaltstack32,%r2 ldo -16(%r30),%r29 /* Reference param save area */ ldo -FRAME_SIZE(%r30), %r30 @@ -1962,7 +2019,7 @@ STREG %r2, -RP_OFFSET(%r30) #ifdef __LP64__ ldo FRAME_SIZE(%r30), %r30 - bl sys_rt_sigsuspend,%r2 + b,l sys_rt_sigsuspend,%r2 ldo -16(%r30),%r29 /* Reference param save area */ #else bl sys_rt_sigsuspend,%r2 @@ -1981,9 +2038,11 @@ .export syscall_exit syscall_exit: + /* NOTE: HP-UX syscalls also come through here - after hpux_syscall_exit fixes up return - values. */ + * after hpux_syscall_exit fixes up return + * values. */ + /* NOTE: Not all syscalls exit this way. rt_sigreturn will exit * via syscall_exit_rfi if the signal was received while the process * was running. @@ -2082,11 +2141,15 @@ LDREG TASK_PT_GR29(%r1),%r29 LDREG TASK_PT_GR31(%r1),%r31 /* restore syscall rp */ + /* NOTE: We use rsm/ssm pair to make this operation atomic */ rsm PSW_SM_I, %r0 LDREG TASK_PT_GR30(%r1),%r30 /* restore user sp */ mfsp %sr3,%r1 /* Get users space id */ mtsp %r1,%sr7 /* Restore sr7 */ ssm PSW_SM_I, %r0 + + /* Set sr2 to zero for userspace syscalls to work. */ + mtsp %r0,%sr2 mtsp %r1,%sr4 /* Restore sr4 */ mtsp %r1,%sr5 /* Restore sr5 */ mtsp %r1,%sr6 /* Restore sr6 */ @@ -2154,12 +2217,18 @@ bb,< %r2,30,pt_regs_ok /* Branch if D set */ ldo TASK_REGS(%r1),%r25 reg_save %r25 /* Save r3 to r18 */ + + /* Save the current sr */ mfsp %sr0,%r2 STREG %r2,TASK_PT_SR0(%r1) + + /* Save the scratch sr */ mfsp %sr1,%r2 STREG %r2,TASK_PT_SR1(%r1) - mfsp %sr2,%r2 - STREG %r2,TASK_PT_SR2(%r1) + + /* sr2 should be set to zero for userspace syscalls */ + STREG %r0,TASK_PT_SR2(%r1) + pt_regs_ok: LDREG TASK_PT_GR31(%r1),%r2 depi 3,31,2,%r2 /* ensure return to user mode. */ @@ -2174,12 +2243,15 @@ syscall_do_softirq: bl do_softirq,%r2 nop + /* NOTE: We enable I-bit incase we schedule later, + * and we might be going back to userspace if we were + * traced. */ b syscall_check_resched ssm PSW_SM_I, %r0 /* do_softirq returns with I bit off */ .import schedule,code syscall_do_resched: - bl schedule,%r2 + BL schedule,%r2 #ifdef __LP64__ ldo -16(%r30),%r29 /* Reference param save area */ #else @@ -2203,7 +2275,7 @@ #ifdef __LP64__ ldo -16(%r30),%r29 /* Reference param save area */ #endif - bl do_signal,%r2 + BL do_signal,%r2 copy %r0, %r26 /* sigset_t *oldset = NULL */ LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 diff -Nru a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c --- a/arch/parisc/kernel/firmware.c 2004-11-10 17:19:02 -08:00 +++ b/arch/parisc/kernel/firmware.c 2004-11-10 17:19:02 -08:00 @@ -1276,7 +1276,7 @@ long real64_call(unsigned long fn, ...) { va_list args; - extern struct wide_stack real64_stack __attribute__ ((alias ("real_stack"))); + extern struct wide_stack real64_stack; extern unsigned long real64_call_asm(unsigned long *, unsigned long *, unsigned long); diff -Nru a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S --- a/arch/parisc/kernel/head.S 2004-11-10 17:19:06 -08:00 +++ b/arch/parisc/kernel/head.S 2004-11-10 17:19:06 -08:00 @@ -1,12 +1,13 @@ -/* - * - * This file is subject to the terms and conditions of the GNU General Public +/* This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 1999 by Helge Deller * Copyright 1999 SuSE GmbH (Philipp Rumpf) * Copyright 1999 Philipp Rumpf (prumpf@tux.org) + * Copyright 2000 Hewlett Packard (Paul Bame, bame@puffin.external.hp.com) + * Copyright (C) 2001 Grant Grundler (Hewlett Packard) + * Copyright (C) 2004 Kyle McMartin * * Initial Version 04-23-1999 by Helge Deller */ @@ -15,12 +16,12 @@ #include #include - +#include + #include #include - - .level 1.1 + .level LEVEL .data @@ -32,12 +33,13 @@ .word 0 /* arg3 */ .text - .align 4 + .align 4 .import init_thread_union,data + .import fault_vector_20,code /* IVA parisc 2.0 32 bit */ +#ifndef __LP64__ + .import fault_vector_11,code /* IVA parisc 1.1 32 bit */ .import $global$ /* forward declaration */ - .import fault_vector_11,code /* IVA parisc 1.1 32 bit */ - .import fault_vector_20,code /* IVA parisc 2.0 32 bit */ - +#endif /*!LP64*/ .export stext .export _stext,data /* Kernel want it this way! */ _stext: @@ -56,72 +58,84 @@ .import __bss_start,data .import __bss_stop,data - ldil L%PA(__bss_start),%r3 - ldo R%PA(__bss_start)(%r3),%r3 - ldil L%PA(__bss_stop),%r4 - ldo R%PA(__bss_stop)(%r4),%r4 + load32 PA(__bss_start),%r3 + load32 PA(__bss_stop),%r4 $bss_loop: cmpb,<<,n %r3,%r4,$bss_loop stw,ma %r0,4(%r3) /* Save away the arguments the boot loader passed in (32 bit args) */ - - ldil L%PA(boot_args),%r1 - ldo R%PA(boot_args)(%r1),%r1 + load32 PA(boot_args),%r1 stw,ma %arg0,4(%r1) stw,ma %arg1,4(%r1) stw,ma %arg2,4(%r1) stw,ma %arg3,4(%r1) /* Initialize startup VM. Just map first 8 MB of memory */ - ldil L%PA(pg0),%r1 - ldo R%PA(pg0)(%r1),%r1 - shr %r1,PxD_VALUE_SHIFT,%r3 - ldo (PxD_FLAG_PRESENT+PxD_FLAG_VALID)(%r3),%r3 + load32 PA(pg0),%r1 - ldil L%PA(swapper_pg_dir),%r4 - ldo R%PA(swapper_pg_dir)(%r4),%r4 +#ifdef __LP64__ + load32 PA(pmd0),%r5 + shrd %r5,PxD_VALUE_SHIFT,%r3 +#else + shr %r1,PxD_VALUE_SHIFT,%r3 +#endif + ldo (PxD_FLAG_PRESENT+PxD_FLAG_VALID)(%r3),%r3 + + load32 PA(swapper_pg_dir),%r4 mtctl %r4,%cr24 /* Initialize kernel root pointer */ mtctl %r4,%cr25 /* Initialize user root pointer */ + +#ifdef __LP64__ + stw %r3,ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4) + shrd %r1,PxD_VALUE_SHIFT,%r3 + ldo (PxD_FLAG_PRESENT+PxD_FLAG_VALID)(%r3),%r3 + ldo ASM_PMD_ENTRY*ASM_PMD_ENTRY_SIZE(%r5),%r5 +#else + ldo ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4),%r4 +#endif ldi ASM_PT_INITIAL,%r1 - ldo ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4),%r4 + 1: +#ifdef __LP64__ + stw %r3,0(%r5) +#else stw %r3,0(%r4) +#endif + ldo (ASM_PAGE_SIZE >> PxD_VALUE_SHIFT)(%r3),%r3 addib,> -1,%r1,1b + +#ifdef __LP64__ + ldo ASM_PMD_ENTRY_SIZE(%r5),%r5 +#else ldo ASM_PGD_ENTRY_SIZE(%r4),%r4 +#endif ldo _PAGE_KERNEL(%r0),%r3 /* Hardwired 0 phys addr start */ - ldil L%PA(pg0),%r1 - ldo R%PA(pg0)(%r1),%r1 + load32 PA(pg0),%r1 + $pgt_fill_loop: - stwm %r3,ASM_PTE_ENTRY_SIZE(%r1) + STREGM %r3,ASM_PTE_ENTRY_SIZE(%r1) ldo ASM_PAGE_SIZE(%r3),%r3 bb,>= %r3,31-KERNEL_INITIAL_ORDER,$pgt_fill_loop nop - /* Load the return address...er...crash 'n burn */ copy %r0,%r2 /* And the RFI Target address too */ - ldil L%start_kernel,%r11 - ldo R%start_kernel(%r11),%r11 + load32 start_kernel,%r11 /* And the initial task pointer */ - - ldil L%init_thread_union,%r6 - ldo R%init_thread_union(%r6),%r6 + load32 init_thread_union,%r6 mtctl %r6,%cr30 /* And the stack pointer too */ - ldo THREAD_SZ_ALGN(%r6),%sp /* And the interrupt stack */ - - ldil L%interrupt_stack,%r6 - ldo R%interrupt_stack(%r6),%r6 + load32 interrupt_stack,%r6 mtctl %r6,%cr31 #ifdef CONFIG_SMP @@ -130,8 +144,7 @@ ** it's just way easier to deal with here because ** of 64-bit function ptrs and the address is local to this file. */ - ldil L%PA(smp_slave_stext),%r10 - ldo R%PA(smp_slave_stext)(%r10),%r10 + load32 PA(smp_slave_stext),%r10 stw %r10,0x10(%r0) /* MEM_RENDEZ */ stw %r0,0x28(%r0) /* MEM_RENDEZ_HI - assume addr < 4GB */ @@ -141,10 +154,16 @@ /* ** Code Common to both Monarch and Slave processors. ** Entry: + ** + ** 1.1: ** %r11 must contain RFI target address. ** %r25/%r26 args to pass to target function ** %r2 in case rfi target decides it didn't like something ** + ** 2.0w: + ** %r3 PDCE_PROC address + ** %r11 RFI target address + ** ** Caller must init: SR4-7, %sp, %r10, %cr24/25, */ common_stext: @@ -154,8 +173,50 @@ /* Clear PDC entry point - we won't use it */ stw %r0,0x10(%r0) /* MEM_RENDEZ */ stw %r0,0x28(%r0) /* MEM_RENDEZ_HI */ -#endif +#endif /*CONFIG_SMP*/ + +#ifdef __LP64__ + tophys_r1 %sp + /* Save the rfi target address */ + ldd TI_TASK-THREAD_SZ_ALGN(%sp), %r10 + tophys_r1 %r10 + std %r11, TASK_PT_GR11(%r10) + /* Switch to wide mode Superdome doesn't support narrow PDC + ** calls. + */ +1: mfia %rp /* clear upper part of pcoq */ + ldo 2f-1b(%rp),%rp + depdi 0,31,32,%rp + bv (%rp) + ssm PSW_SM_W,%r0 + + /* Set Wide mode as the "Default" (eg for traps) + ** First trap occurs *right* after (or part of) rfi for slave CPUs. + ** Someday, palo might not do this for the Monarch either. + */ +2: +#define MEM_PDC_LO 0x388 +#define MEM_PDC_HI 0x35C + ldw MEM_PDC_LO(%r0),%r3 + ldw MEM_PDC_HI(%r0),%r6 + depd %r6, 31, 32, %r3 /* move to upper word */ + + ldo PDC_PSW(%r0),%arg0 /* 21 */ + ldo PDC_PSW_SET_DEFAULTS(%r0),%arg1 /* 2 */ + ldo PDC_PSW_WIDE_BIT(%r0),%arg2 /* 2 */ + load32 PA(stext_pdc_ret), %rp + bv (%r3) + copy %r0,%arg3 + +stext_pdc_ret: + /* restore rfi target address*/ + ldd TI_TASK-THREAD_SZ_ALGN(%sp), %r10 + tophys_r1 %r10 + ldd TASK_PT_GR11(%r10), %r11 + tovirt_r1 %sp +#endif + /* PARANOID: clear user scratch/user space SR's */ mtsp %r0,%sr0 mtsp %r0,%sr1 @@ -168,17 +229,18 @@ mtctl %r0,%cr12 mtctl %r0,%cr13 + /* Prepare to RFI! Man all the cannons! */ + /* Initialize the global data pointer */ - ldil L%$global$,%dp - ldo R%$global$(%dp),%dp + loadgp - /* - * Set up our interrupt table. HPMCs might not work after this! + /* Set up our interrupt table. HPMCs might not work after this! * * We need to install the correct iva for PA1.1 or PA2.0. The * following short sequence of instructions can determine this * (without being illegal on a PA1.1 machine). */ +#ifndef __LP64__ ldi 32,%r10 mtctl %r10,%cr11 .level 2.0 @@ -190,14 +252,39 @@ ldo R%PA(fault_vector_11)(%r10),%r10 $is_pa20: - ldil L%PA(fault_vector_20),%r10 - ldo R%PA(fault_vector_20)(%r10),%r10 + .level LEVEL /* restore 1.1 || 2.0w */ +#endif /*!LP64*/ + load32 PA(fault_vector_20),%r10 $install_iva: mtctl %r10,%cr14 - /* Disable Q bit so we can load the iia queue */ - rsm PSW_SM_Q,%r0 +#ifdef __LP64__ + b aligned_rfi + nop + + .align 256 +aligned_rfi: + ssm 0,0 + nop /* 1 */ + nop /* 2 */ + nop /* 3 */ + nop /* 4 */ + nop /* 5 */ + nop /* 6 */ + nop /* 7 */ + nop /* 8 */ +#endif + +#ifdef __LP64__ /* move to psw.h? */ +#define PSW_BITS PSW_Q+PSW_I+PSW_D+PSW_P+PSW_R +#else +#define PSW_BITS PSW_SM_Q +#endif + +$rfi: + /* turn off troublesome PSW bits */ + rsm PSW_BITS,%r0 /* kernel PSW: * - no interruptions except HPMC and TOC (which are handled by PDC) @@ -205,8 +292,7 @@ * - big-endian * - virtually mapped */ - ldil L%KERNEL_PSW,%r10 - ldo R%KERNEL_PSW(%r10),%r10 + load32 KERNEL_PSW,%r10 mtctl %r10,%ipsw /* Set the space pointers for the post-RFI world @@ -232,6 +318,7 @@ .import smp_init_current_idle_task,data .import smp_callin,code +#ifndef __LP64__ smp_callin_rtn: .proc .callinfo @@ -239,9 +326,9 @@ nop nop .procend +#endif /*!LP64*/ /*************************************************************************** -* * smp_slave_stext is executed by all non-monarch Processors when the Monarch * pokes the slave CPUs in smp.c:smp_boot_cpus(). * @@ -249,8 +336,6 @@ * mode. Once all available/eligible CPUs are in virtual mode, all are * released and start out by executing their own idle task. *****************************************************************************/ - - smp_slave_stext: .proc .callinfo @@ -264,28 +349,28 @@ mtsp %r0,%sr7 /* Initialize the SP - monarch sets up smp_init_current_idle_task */ - ldil L%PA(smp_init_current_idle_task),%sp - ldo R%PA(smp_init_current_idle_task)(%sp),%sp - ldw 0(%sp),%sp /* load task address */ + load32 PA(smp_init_current_idle_task),%sp + LDREG 0(%sp),%sp /* load task address */ tophys_r1 %sp - ldw TASK_THREAD_INFO(%sp), %sp + LDREG TASK_THREAD_INFO(%sp),%sp mtctl %sp,%cr30 /* store in cr30 */ - addil L%THREAD_SZ_ALGN,%sp /* stack is above task */ - ldo R%THREAD_SZ_ALGN(%r1),%sp + ldo THREAD_SZ_ALGN(%sp),%sp /* point CPU to kernel page tables */ - ldil L%PA(swapper_pg_dir),%r4 - ldo R%PA(swapper_pg_dir)(%r4),%r4 + load32 PA(swapper_pg_dir),%r4 mtctl %r4,%cr24 /* Initialize kernel root pointer */ mtctl %r4,%cr25 /* Initialize user root pointer */ +#ifdef __LP64__ + /* Setup PDCE_PROC entry */ + copy %arg0,%r3 +#else /* Load RFI *return* address in case smp_callin bails */ - ldil L%smp_callin_rtn,%r2 - ldo R%smp_callin_rtn(%r2),%r2 - + load32 smp_callin_rtn,%r2 +#endif + /* Load RFI target address. */ - ldil L%smp_callin,%r11 - ldo R%smp_callin(%r11),%r11 + load32 smp_callin,%r11 /* ok...common code can handle the rest */ b common_stext @@ -293,7 +378,7 @@ .procend #endif /* CONFIG_SMP */ - +#ifndef __LP64__ .data .align 4 @@ -303,3 +388,4 @@ .size $global$,4 $global$: .word 0 +#endif /*!LP64*/ diff -Nru a/arch/parisc/kernel/head64.S b/arch/parisc/kernel/head64.S --- a/arch/parisc/kernel/head64.S 2004-11-10 17:19:02 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,327 +0,0 @@ -/* - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 1999 by Helge Deller - * Copyright 1999 SuSE GmbH (Philipp Rumpf) - * Copyright 1999 Philipp Rumpf (prumpf@tux.org) - * Copyright 2000 Hewlett Packard (Paul Bame, bame@puffin.external.hp.com) - * Copyright (C) 2001 Grant Grundler (Hewlett Packard) - * - * Initial Version 04-23-1999 by Helge Deller - */ - - -#include /* for CONFIG_SMP */ - -#include -#include - -#include -#include -#include /* for PDC_PSW defines */ - - - .level 2.0w - - .data - - .export boot_args -boot_args: - .word 0 /* arg0 */ - .word 0 /* arg1 */ - .word 0 /* arg2 */ - .word 0 /* arg3 */ - - .text - .align 4 - - .export stext - .export _stext,data /* Kernel want it this way! */ -_stext: -stext: - .proc - .callinfo - - /* Make sure sr4-sr7 are set to zero for the kernel address space */ - mtsp %r0,%sr4 - mtsp %r0,%sr5 - mtsp %r0,%sr6 - mtsp %r0,%sr7 - - /* Clear BSS (shouldn't the boot loader do this?) */ - - .import __bss_start,data - .import __bss_stop,data - - ldil L%PA(__bss_start),%r3 - ldo R%PA(__bss_start)(%r3),%r3 - ldil L%PA(__bss_stop),%r4 - ldo R%PA(__bss_stop)(%r4),%r4 -$bss_loop: - cmpb,<<,n %r3,%r4,$bss_loop - stb,ma %r0,1(%r3) - - /* Save away the arguments the boot loader passed in (32 bit args) */ - - ldil L%PA(boot_args),%r1 - ldo R%PA(boot_args)(%r1),%r1 - stw,ma %arg0,4(%r1) - stw,ma %arg1,4(%r1) - stw,ma %arg2,4(%r1) - stw,ma %arg3,4(%r1) - - /* Initialize startup VM. Just map first 8 MB of memory */ - - ldil L%PA(pg0),%r1 - ldo R%PA(pg0)(%r1),%r1 - - ldil L%PA(pmd0),%r5 - ldo R%PA(pmd0)(%r5),%r5 - shrd %r5,PxD_VALUE_SHIFT,%r3 - ldo (PxD_FLAG_PRESENT+PxD_FLAG_VALID)(%r3),%r3 - - ldil L%PA(swapper_pg_dir),%r4 - ldo R%PA(swapper_pg_dir)(%r4),%r4 - - mtctl %r4,%cr24 /* Initialize kernel root pointer */ - mtctl %r4,%cr25 /* Initialize user root pointer */ - - stw %r3,ASM_PGD_ENTRY*ASM_PGD_ENTRY_SIZE(%r4) - - shrd %r1,PxD_VALUE_SHIFT,%r3 - ldo (PxD_FLAG_PRESENT+PxD_FLAG_VALID)(%r3),%r3 - ldo ASM_PMD_ENTRY*ASM_PMD_ENTRY_SIZE(%r5),%r5 - ldi ASM_PT_INITIAL,%r1 -1: - stw %r3,0(%r5) - ldo (ASM_PAGE_SIZE >> PxD_VALUE_SHIFT)(%r3),%r3 - addib,> -1,%r1,1b - ldo ASM_PMD_ENTRY_SIZE(%r5),%r5 - - ldo _PAGE_KERNEL(%r0),%r3 /* Hardwired 0 phys addr start */ - ldil L%PA(pg0),%r1 - ldo R%PA(pg0)(%r1),%r1 - -$pgt_fill_loop: - std,ma %r3,ASM_PTE_ENTRY_SIZE(%r1) - ldo ASM_PAGE_SIZE(%r3),%r3 - bb,>= %r3,31-KERNEL_INITIAL_ORDER,$pgt_fill_loop - nop - - /* And the RFI Target address too */ - load32 start_kernel, %r11 - - /* And the stack pointer too */ - load32 PA(init_thread_union+THREAD_SZ_ALGN),%sp - - /* And the initial task pointer */ - - load32 init_thread_union,%r6 - mtctl %r6,%cr30 - - /* And the interrupt stack */ - - load32 interrupt_stack,%r6 - mtctl %r6,%cr31 - - /* Act like PDC just called us - that's how slave CPUs enter */ -#define MEM_PDC_LO 0x388 -#define MEM_PDC_HI 0x35C - ldw MEM_PDC_LO(%r0),%r3 - ldw MEM_PDC_HI(%r0),%r6 - depd %r6, 31, 32, %r3 /* move to upper word */ - -#ifdef CONFIG_SMP - /* Set the smp rendevous address into page zero. - ** It would be safer to do this in init_smp_config() but - ** it's just way easier to deal with here because - ** of 64-bit function ptrs and the address is local to this file. - */ - ldil L%PA(smp_slave_stext),%r10 - ldo R%PA(smp_slave_stext)(%r10),%r10 - stw %r10,0x10(%r0) /* MEM_RENDEZ */ - stw %r0,0x28(%r0) /* MEM_RENDEZ_HI - assume addr < 4GB */ - - /* FALLTHROUGH */ - .procend - - /* - ** Code Common to both Monarch and Slave processors. - ** Entry: - ** %r3 PDCE_PROC address - ** %r11 RFI target address. - ** - ** Caller must init: SR4-7, %sp, %r10, %cr24/25, - */ -common_stext: - .proc - .callinfo -#else /* CONFIG_SMP */ - /* Clear PDC's CPU handoff address - we won't use it */ - stw %r0,0x10(%r0) /* MEM_RENDEZ */ - stw %r0,0x28(%r0) /* MEM_RENDEZ_HI */ -#endif /* CONFIG_SMP */ - - /* Save the rfi target address */ - ldd TI_TASK-THREAD_SZ_ALGN(%sp), %r10 - tophys_r1 %r10 - std %r11, TASK_PT_GR11(%r10) - - /* Switch to wide mode; Superdome doesn't support narrow PDC - ** calls. - */ -1: mfia %rp /* clear upper part of pcoq */ - ldo 2f-1b(%rp),%rp - depdi 0,31,32,%rp - bv (%rp) - ssm PSW_SM_W,%r0 -2: - - /* Set Wide mode as the "Default" (eg for traps) - ** First trap occurs *right* after (or part of) rfi for slave CPUs. - ** Someday, palo might not do this for the Monarch either. - */ - - ldo PDC_PSW(%r0),%arg0 /* 21 */ - ldo PDC_PSW_SET_DEFAULTS(%r0),%arg1 /* 2 */ - ldo PDC_PSW_WIDE_BIT(%r0),%arg2 /* 2 */ - - load32 PA(stext_pdc_ret), %rp - - bv (%r3) - copy %r0,%arg3 - -stext_pdc_ret: - /* restore rfi target address*/ - ldd TI_TASK-THREAD_SZ_ALGN(%sp), %r10 - tophys_r1 %r10 - ldd TASK_PT_GR11(%r10), %r11 - - /* PARANOID: clear user scratch/user space SR's */ - mtsp %r0,%sr0 - mtsp %r0,%sr1 - mtsp %r0,%sr2 - mtsp %r0,%sr3 - - /* Initialize Protection Registers */ - mtctl %r0,%cr8 - mtctl %r0,%cr9 - mtctl %r0,%cr12 - mtctl %r0,%cr13 - - /* Prepare to RFI! Man all the cannons! */ - tovirt_r1 %sp - - /* Initialize the global data pointer */ - load32 __gp,%dp - - /* Set up our interrupt table. HPMCs might not work after this! */ - ldil L%PA(fault_vector_20),%r10 - ldo R%PA(fault_vector_20)(%r10),%r10 - mtctl %r10,%cr14 - - b aligned_rfi - nop - - /* the magic spell */ - .align 256 -aligned_rfi: - ssm 0,0 - nop /* 1 */ - nop /* 2 */ - nop /* 3 */ - nop /* 4 */ - nop /* 5 */ - nop /* 6 */ - nop /* 7 */ - nop /* 8 */ - - /* turn off troublesome PSW bits */ - rsm PSW_Q+PSW_I+PSW_D+PSW_P+PSW_R, %r0 - - /* kernel PSW: - * - no interruptions except HPMC and TOC (which are handled by PDC) - * - Q bit set (IODC / PDC interruptions) - * - big-endian - * - virtually mapped - */ - load32 KERNEL_PSW,%r10 - mtctl %r10,%ipsw - - /* Set the space pointers for the post-RFI world - ** Clear the two-level IIA Space Queue, effectively setting - ** Kernel space. - */ - mtctl %r0,%cr17 /* Clear IIASQ tail */ - mtctl %r0,%cr17 /* Clear IIASQ head */ - - /* Load RFI target into PC queue */ - mtctl %r11,%cr18 /* IIAOQ head */ - ldo 4(%r11),%r11 - mtctl %r11,%cr18 /* IIAOQ tail */ - - /* Jump to hyperspace */ - rfi - nop - - .procend - - -#ifdef CONFIG_SMP - - .import smp_init_current_idle_task,data - .import smp_callin,code - -/*************************************************************************** -* -* smp_slave_stext is executed by all non-monarch Processors when the Monarch -* pokes the slave CPUs in smp.c:smp_boot_cpus(). -* -* Once here, registers values are initialized in order to branch to virtual -* mode. Once all available/eligible CPUs are in virtual mode, all are -* released and start out by executing their own idle task. -*****************************************************************************/ - - -smp_slave_stext: - .proc - .callinfo - - /* - ** Initialize Space registers - */ - mtsp %r0,%sr4 - mtsp %r0,%sr5 - mtsp %r0,%sr6 - mtsp %r0,%sr7 - - /* Initialize the SP - monarch sets up smp_init_current_idle_task */ - load32 PA(smp_init_current_idle_task),%sp - ldd 0(%sp),%sp /* load task address */ - tophys_r1 %sp - ldd TASK_THREAD_INFO(%sp), %sp - mtctl %sp,%cr30 /* store in cr30 */ - ldo THREAD_SZ_ALGN(%sp),%sp - tophys_r1 %sp - - /* point CPU to kernel page tables */ - load32 PA(swapper_pg_dir),%r4 - mtctl %r4,%cr24 /* Initialize kernel root pointer */ - mtctl %r4,%cr25 /* Initialize user root pointer */ - - /* Setup PDCE_PROC entry */ - copy %arg0,%r3 - - /* Load RFI target address. */ - load32 smp_callin, %r11 - - /* ok...common code can handle the rest */ - b common_stext - nop - - .procend -#endif /* CONFIG_SMP */ - diff -Nru a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S --- a/arch/parisc/kernel/pacache.S 2004-11-10 17:19:03 -08:00 +++ b/arch/parisc/kernel/pacache.S 2004-11-10 17:19:03 -08:00 @@ -68,7 +68,7 @@ * consolidated. */ - rsm PSW_SM_I,%r19 /* relied upon translation! */ + rsm PSW_SM_I,%r19 /* relied upon translation! PA 2.0 Arch. F-5 */ nop nop nop @@ -475,9 +475,9 @@ .procend #endif - .export clear_user_page_asm,code + .export __clear_user_page_asm,code -clear_user_page_asm: +__clear_user_page_asm: .proc .callinfo NO_CALLS .entry diff -Nru a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c --- a/arch/parisc/kernel/parisc_ksyms.c 2004-11-10 17:19:07 -08:00 +++ b/arch/parisc/kernel/parisc_ksyms.c 2004-11-10 17:19:07 -08:00 @@ -32,7 +32,6 @@ #include EXPORT_SYMBOL(memchr); EXPORT_SYMBOL(memcmp); -EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memmove); EXPORT_SYMBOL(memscan); EXPORT_SYMBOL(memset); @@ -65,12 +64,19 @@ #endif #include -EXPORT_SYMBOL(lcopy_to_user); -EXPORT_SYMBOL(lcopy_from_user); -EXPORT_SYMBOL(lcopy_in_user); EXPORT_SYMBOL(lstrncpy_from_user); EXPORT_SYMBOL(lclear_user); EXPORT_SYMBOL(lstrnlen_user); + +/* Global fixups */ +extern void fixup_get_user_skip_1(void); +extern void fixup_get_user_skip_2(void); +extern void fixup_put_user_skip_1(void); +extern void fixup_put_user_skip_2(void); +EXPORT_SYMBOL(fixup_get_user_skip_1); +EXPORT_SYMBOL(fixup_get_user_skip_2); +EXPORT_SYMBOL(fixup_put_user_skip_1); +EXPORT_SYMBOL(fixup_put_user_skip_2); #ifndef __LP64__ /* Needed so insmod can set dp value */ diff -Nru a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c --- a/arch/parisc/kernel/pci-dma.c 2004-11-10 17:19:06 -08:00 +++ b/arch/parisc/kernel/pci-dma.c 2004-11-10 17:19:06 -08:00 @@ -104,7 +104,9 @@ if (!pte_none(*pte)) printk(KERN_ERR "map_pte_uncached: page already exists\n"); set_pte(pte, __mk_pte(*paddr_ptr, PAGE_KERNEL_UNC)); + purge_tlb_start(); pdtlb_kernel(orig_vaddr); + purge_tlb_end(); vaddr += PAGE_SIZE; orig_vaddr += PAGE_SIZE; (*paddr_ptr) += PAGE_SIZE; @@ -179,7 +181,9 @@ do { pte_t page = *pte; pte_clear(pte); + purge_tlb_start(); pdtlb_kernel(orig_vaddr); + purge_tlb_end(); vaddr += PAGE_SIZE; orig_vaddr += PAGE_SIZE; pte++; diff -Nru a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c --- a/arch/parisc/kernel/pdc_cons.c 2004-11-10 17:19:07 -08:00 +++ b/arch/parisc/kernel/pdc_cons.c 2004-11-10 17:19:07 -08:00 @@ -71,6 +71,19 @@ pdc_iodc_outc(c); } +void pdc_printf(const char *fmt, ...) +{ + va_list args; + char buf[1024]; + int i, len; + + va_start(args, fmt); + len = vscnprintf(buf, sizeof(buf), fmt, args); + va_end(args); + + for (i = 0; i < len; i++) + pdc_iodc_outc(buf[i]); +} int pdc_console_poll_key(struct console *co) { diff -Nru a/arch/parisc/kernel/perf_asm.S b/arch/parisc/kernel/perf_asm.S --- a/arch/parisc/kernel/perf_asm.S 2004-11-10 17:19:06 -08:00 +++ b/arch/parisc/kernel/perf_asm.S 2004-11-10 17:19:06 -08:00 @@ -1,18 +1,19 @@ /* low-level asm for "intrigue" (PA8500-8700 CPU perf counters) - * + * * Copyright (C) 2001 Randolph Chung - * + * Copyright (C) 2001 Hewlett-Packard (Grant Grundler) + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -48,7 +49,7 @@ .proc .callinfo frame=0,NO_CALLS .entry - + ldi 0x20,%r25 ; load up perfmon bit mfctl ccr,%r26 ; get coprocessor register or %r25,%r26,%r26 ; set bit @@ -87,35 +88,35 @@ .exit .procend -;************************************************************************ -;* * -;* Name: perf_rdr_shift_in_W * -;* * -;* Description: * -;* This routine shifts data in from the RDR in arg0 and returns * -;* the result in ret0. If the RDR is <= 64 bits in length, it * -;* is shifted shifted backup immediately. This is to compensate * -;* for RDR10 which has bits that preclude PDC stack operations * -;* when they are in the wrong state. * -;* * -;* Arguments: * -;* arg0 : rdr to be read * -;* arg1 : bit length of rdr * -;* * -;* Returns: * -;* ret0 = next 64 bits of rdr data from staging register * -;* * -;* Register usage: * -;* arg0 : rdr to be read * -;* arg1 : bit length of rdr * -;* %r24 - original DR2 value * -;* %r1 - scratch * -;* %r29 - scratch * -;* * -;* Returns: * -;* ret0 = RDR data (right justified) * -;* * -;************************************************************************ +;*********************************************************************** +;* +;* Name: perf_rdr_shift_in_W +;* +;* Description: +;* This routine shifts data in from the RDR in arg0 and returns +;* the result in ret0. If the RDR is <= 64 bits in length, it +;* is shifted shifted backup immediately. This is to compensate +;* for RDR10 which has bits that preclude PDC stack operations +;* when they are in the wrong state. +;* +;* Arguments: +;* arg0 : rdr to be read +;* arg1 : bit length of rdr +;* +;* Returns: +;* ret0 = next 64 bits of rdr data from staging register +;* +;* Register usage: +;* arg0 : rdr to be read +;* arg1 : bit length of rdr +;* %r24 - original DR2 value +;* %r1 - scratch +;* %r29 - scratch +;* +;* Returns: +;* ret0 = RDR data (right justified) +;* +;*********************************************************************** .export perf_rdr_shift_in_W,code perf_rdr_shift_in_W: @@ -138,7 +139,7 @@ nop nop nop - nop + nop ; ; Cacheline start (32-byte cacheline) @@ -146,11 +147,11 @@ nop nop nop - extrd,u arg1,63,6,%r1 ; setup shift amount based on bits to move + extrd,u arg1,63,6,%r1 ; setup shift amount by bits to move mtsar %r1 shladd arg0,2,%r0,%r1 ; %r1 = 4 * RDR number - blr %r1,%r0 ; branch to 8-instruction sequence + blr %r1,%r0 ; branch to 8-instruction sequence nop ; @@ -160,19 +161,19 @@ ; ; RDR 0 sequence ; - SFDIAG (0) + SFDIAG (0) ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 - MTDIAG_1 (1) ; mtdiag %dr1, %r1 + MTDIAG_1 (1) ; mtdiag %dr1, %r1 STDIAG (0) ssm 0,0 b,n perf_rdr_shift_in_W_leave - + ; ; RDR 1 sequence ; - sync + sync ssm 0,0 SFDIAG (1) ssm 0,0 @@ -180,11 +181,11 @@ ssm 0,0 b,n perf_rdr_shift_in_W_leave nop - + ; ; RDR 2 read sequence ; - SFDIAG (2) + SFDIAG (2) ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 @@ -192,7 +193,7 @@ STDIAG (2) ssm 0,0 b,n perf_rdr_shift_in_W_leave - + ; ; RDR 3 read sequence ; @@ -208,39 +209,39 @@ ; ; RDR 4 read sequence ; - sync - ssm 0,0 + sync + ssm 0,0 SFDIAG (4) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 5 read sequence ; - sync - ssm 0,0 + sync + ssm 0,0 SFDIAG (5) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 6 read sequence ; - sync - ssm 0,0 + sync + ssm 0,0 SFDIAG (6) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 7 read sequence ; @@ -281,26 +282,26 @@ ; RDR 10 read sequence ; SFDIAG (10) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (10) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_W_leave - + ; ; RDR 11 read sequence ; SFDIAG (11) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (11) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_W_leave - + ; ; RDR 12 read sequence ; @@ -317,77 +318,77 @@ ; RDR 13 read sequence ; sync - ssm 0,0 + ssm 0,0 SFDIAG (13) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 14 read sequence ; - SFDIAG (14) - ssm 0,0 + SFDIAG (14) + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (14) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_W_leave - + ; ; RDR 15 read sequence ; - sync ; RDR 15 read sequence - ssm 0,0 + sync + ssm 0,0 SFDIAG (15) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_W_leave nop - + ; ; RDR 16 read sequence ; - sync ; RDR 16 read sequence - ssm 0,0 + sync + ssm 0,0 SFDIAG (16) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 17 read sequence ; - SFDIAG (17) - ssm 0,0 + SFDIAG (17) + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (17) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_W_leave - + ; ; RDR 18 read sequence ; - SFDIAG (18) - ssm 0,0 + SFDIAG (18) + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (18) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_W_leave - -; -; RDR 19 read sequence -; + + ; + ; RDR 19 read sequence + ; b,n perf_rdr_shift_in_W_leave nop nop @@ -401,144 +402,144 @@ ; RDR 20 read sequence ; sync - ssm 0,0 + ssm 0,0 SFDIAG (20) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 21 read sequence ; sync - ssm 0,0 + ssm 0,0 SFDIAG (21) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 22 read sequence ; sync - ssm 0,0 + ssm 0,0 SFDIAG (22) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 23 read sequence ; - sync - ssm 0,0 + sync + ssm 0,0 SFDIAG (23) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 24 read sequence ; - sync - ssm 0,0 + sync + ssm 0,0 SFDIAG (24) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 25 read sequence ; sync - ssm 0,0 + ssm 0,0 SFDIAG (25) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 26 read sequence ; - SFDIAG (26) - ssm 0,0 + SFDIAG (26) + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (26) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_W_leave - + ; ; RDR 27 read sequence ; SFDIAG (27) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (27) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_W_leave - + ; ; RDR 28 read sequence ; - sync - ssm 0,0 + sync + ssm 0,0 SFDIAG (28) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 29 read sequence ; - sync - ssm 0,0 + sync + ssm 0,0 SFDIAG (29) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_W_leave - ssm 0,0 + ssm 0,0 nop - + ; ; RDR 30 read sequence ; SFDIAG (30) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (30) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_W_leave - + ; ; RDR 31 read sequence ; - sync - ssm 0,0 + sync + ssm 0,0 SFDIAG (31) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) nop - ssm 0,0 + ssm 0,0 nop ; @@ -552,28 +553,28 @@ .procend -;************************************************************************ -;* * -;* Name: perf_rdr_shift_out_W * -;* * -;* Description: * -;* This routine moves data to the RDR's. The double-word that * -;* arg1 points to is loaded and moved into the staging register. * -;* Then the STDIAG instruction for the RDR # in arg0 is called * -;* to move the data to the RDR. * -;* * -;* Arguments: * -;* arg0 = rdr number * -;* arg1 = 64-bit value to write * -;* %r24 - DR2 | DR2_SLOW_RET * -;* %r23 - original DR2 value * -;* * -;* Returns: * -;* None * -;* * -;* Register usage: * -;* * -;************************************************************************ +;*********************************************************************** +;* +;* Name: perf_rdr_shift_out_W +;* +;* Description: +;* This routine moves data to the RDR's. The double-word that +;* arg1 points to is loaded and moved into the staging register. +;* Then the STDIAG instruction for the RDR # in arg0 is called +;* to move the data to the RDR. +;* +;* Arguments: +;* arg0 = rdr number +;* arg1 = 64-bit value to write +;* %r24 - DR2 | DR2_SLOW_RET +;* %r23 - original DR2 value +;* +;* Returns: +;* None +;* +;* Register usage: +;* +;*********************************************************************** .export perf_rdr_shift_out_W,code perf_rdr_shift_out_W: @@ -587,24 +588,23 @@ depdi,z 1,DR2_SLOW_RET,1,%r24 MFDIAG_2 (23) - or %r24,%r23,%r24 - MTDIAG_2 (24) ; set DR2_SLOW_RET - - MTDIAG_1 (25) ; data to the staging register + or %r24,%r23,%r24 + MTDIAG_2 (24) ; set DR2_SLOW_RET + MTDIAG_1 (25) ; data to the staging register shladd arg0,2,%r0,%r1 ; %r1 = 4 * RDR number - blr %r1,%r0 ; branch to 8-instruction sequence + blr %r1,%r0 ; branch to 8-instruction sequence nop ; ; RDR 0 write sequence ; sync ; RDR 0 write sequence - ssm 0,0 + ssm 0,0 STDIAG (0) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_W_leave nop - ssm 0,0 + ssm 0,0 nop ; @@ -718,7 +718,7 @@ ; ; RDR 10 write sequence ; - sync + sync ssm 0,0 STDIAG (10) STDIAG (26) @@ -862,7 +862,7 @@ ; ; RDR 22 write sequence ; - sync + sync ssm 0,0 STDIAG (22) ssm 0,0 @@ -910,7 +910,7 @@ ; ; RDR 26 write sequence ; - sync + sync ssm 0,0 STDIAG (10) STDIAG (26) @@ -958,7 +958,7 @@ ; ; RDR 30 write sequence ; - sync + sync ssm 0,0 STDIAG (30) ssm 0,0 @@ -970,7 +970,7 @@ ; ; RDR 31 write sequence ; - sync + sync ssm 0,0 STDIAG (31) ssm 0,0 @@ -986,34 +986,32 @@ .procend -;**************************** CHRIS *********************************** - -;************************************************************************ -;* * -;* Name: rdr_shift_in_U * -;* * -;* Description: * -;* This routine shifts data in from the RDR in arg0 and returns * -;* the result in ret0. If the RDR is <= 64 bits in length, it * -;* is shifted shifted backup immediately. This is to compensate * -;* for RDR10 which has bits that preclude PDC stack operations * -;* when they are in the wrong state. * -;* * -;* Arguments: * -;* arg0 : rdr to be read * -;* arg1 : bit length of rdr * -;* * -;* Returns: * -;* ret0 = next 64 bits of rdr data from staging register * -;* * -;* Register usage: * -;* arg0 : rdr to be read * -;* arg1 : bit length of rdr * -;* %r24 - original DR2 value * -;* %r23 - DR2 | DR2_SLOW_RET * -;* %r1 - scratch * -;* * -;************************************************************************ +;*********************************************************************** +;* +;* Name: rdr_shift_in_U +;* +;* Description: +;* This routine shifts data in from the RDR in arg0 and returns +;* the result in ret0. If the RDR is <= 64 bits in length, it +;* is shifted shifted backup immediately. This is to compensate +;* for RDR10 which has bits that preclude PDC stack operations +;* when they are in the wrong state. +;* +;* Arguments: +;* arg0 : rdr to be read +;* arg1 : bit length of rdr +;* +;* Returns: +;* ret0 = next 64 bits of rdr data from staging register +;* +;* Register usage: +;* arg0 : rdr to be read +;* arg1 : bit length of rdr +;* %r24 - original DR2 value +;* %r23 - DR2 | DR2_SLOW_RET +;* %r1 - scratch +;* +;*********************************************************************** .export perf_rdr_shift_in_U,code perf_rdr_shift_in_U: @@ -1053,75 +1051,75 @@ ; Start of next 32-byte cacheline ; SFDIAG (0) ; RDR 0 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (0) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave - + SFDIAG (1) ; RDR 1 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (1) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave - + sync ; RDR 2 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (4) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop - + sync ; RDR 3 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (3) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop sync ; RDR 4 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (4) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop - + sync ; RDR 5 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (5) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop - + sync ; RDR 6 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (6) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop - + sync ; RDR 7 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (7) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop b,n perf_rdr_shift_in_U_leave @@ -1134,95 +1132,95 @@ nop SFDIAG (9) ; RDR 9 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (9) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave SFDIAG (10) ; RDR 10 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (10) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave - + SFDIAG (11) ; RDR 11 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (11) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave - + SFDIAG (12) ; RDR 12 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (12) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave SFDIAG (13) ; RDR 13 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (13) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave - + SFDIAG (14) ; RDR 14 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (14) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave - + SFDIAG (15) ; RDR 15 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (15) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave - + sync ; RDR 16 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (16) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop - + SFDIAG (17) ; RDR 17 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (17) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave - + SFDIAG (18) ; RDR 18 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (18) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave - + b,n perf_rdr_shift_in_U_leave nop nop @@ -1233,86 +1231,86 @@ nop sync ; RDR 20 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (20) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop - + sync ; RDR 21 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (21) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop - + sync ; RDR 22 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (22) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop - + sync ; RDR 23 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (23) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop - + sync ; RDR 24 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (24) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop - + sync ; RDR 25 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (25) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop - + SFDIAG (26) ; RDR 26 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (26) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave - + SFDIAG (27) ; RDR 27 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (27) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave - + sync ; RDR 28 read sequence - ssm 0,0 + ssm 0,0 SFDIAG (28) - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) b,n perf_rdr_shift_in_U_leave - ssm 0,0 + ssm 0,0 nop - + b,n perf_rdr_shift_in_U_leave nop nop @@ -1321,23 +1319,23 @@ nop nop nop - + SFDIAG (30) ; RDR 30 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (30) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave - + SFDIAG (31) ; RDR 31 read sequence - ssm 0,0 + ssm 0,0 MFDIAG_1 (28) shrpd ret0,%r0,%sar,%r1 MTDIAG_1 (1) STDIAG (31) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_in_U_leave nop @@ -1347,30 +1345,30 @@ MTDIAG_2 (24) ; restore DR2 .procend -;************************************************************************ -;* * -;* Name: rdr_shift_out_U * -;* * -;* Description: * -;* This routine moves data to the RDR's. The double-word that * -;* arg1 points to is loaded and moved into the staging register. * -;* Then the STDIAG instruction for the RDR # in arg0 is called * -;* to move the data to the RDR. * -;* * -;* Arguments: * -;* arg0 = rdr target * -;* arg1 = buffer pointer * -;* * -;* Returns: * -;* None * -;* * -;* Register usage: * -;* arg0 = rdr target * -;* arg1 = buffer pointer * -;* %r24 - DR2 | DR2_SLOW_RET * -;* %r23 - original DR2 value * -;* * -;************************************************************************ +;*********************************************************************** +;* +;* Name: rdr_shift_out_U +;* +;* Description: +;* This routine moves data to the RDR's. The double-word that +;* arg1 points to is loaded and moved into the staging register. +;* Then the STDIAG instruction for the RDR # in arg0 is called +;* to move the data to the RDR. +;* +;* Arguments: +;* arg0 = rdr target +;* arg1 = buffer pointer +;* +;* Returns: +;* None +;* +;* Register usage: +;* arg0 = rdr target +;* arg1 = buffer pointer +;* %r24 - DR2 | DR2_SLOW_RET +;* %r23 - original DR2 value +;* +;*********************************************************************** .export perf_rdr_shift_out_U,code perf_rdr_shift_out_U: @@ -1386,11 +1384,11 @@ depdi,z 1,DR2_SLOW_RET,1,%r24 MFDIAG_2 (23) or %r24,%r23,%r24 - MTDIAG_2 (24) ; set DR2_SLOW_RET + MTDIAG_2 (24) ; set DR2_SLOW_RET - MTDIAG_1 (25) ; data to the staging register - shladd arg0,2,%r0,%r1 ; %r1 = 4 * RDR number - blr %r1,%r0 ; branch to 8-instruction sequence + MTDIAG_1 (25) ; data to the staging register + shladd arg0,2,%r0,%r1 ; %r1 = 4 * RDR number + blr %r1,%r0 ; branch to 8-instruction sequence nop ; @@ -1398,291 +1396,291 @@ ; sync ; RDR 0 write sequence - ssm 0,0 + ssm 0,0 STDIAG (0) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 1 write sequence - ssm 0,0 + ssm 0,0 STDIAG (1) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 2 write sequence - ssm 0,0 + ssm 0,0 STDIAG (2) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 3 write sequence - ssm 0,0 + ssm 0,0 STDIAG (3) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 4 write sequence - ssm 0,0 + ssm 0,0 STDIAG (4) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 5 write sequence - ssm 0,0 + ssm 0,0 STDIAG (5) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 6 write sequence - ssm 0,0 + ssm 0,0 STDIAG (6) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 7 write sequence - ssm 0,0 + ssm 0,0 STDIAG (7) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 8 write sequence - ssm 0,0 + ssm 0,0 STDIAG (8) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 9 write sequence - ssm 0,0 + ssm 0,0 STDIAG (9) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 10 write sequence - ssm 0,0 + ssm 0,0 STDIAG (10) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 11 write sequence - ssm 0,0 + ssm 0,0 STDIAG (11) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 12 write sequence - ssm 0,0 + ssm 0,0 STDIAG (12) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 13 write sequence - ssm 0,0 + ssm 0,0 STDIAG (13) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 14 write sequence - ssm 0,0 + ssm 0,0 STDIAG (14) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 15 write sequence - ssm 0,0 + ssm 0,0 STDIAG (15) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 16 write sequence - ssm 0,0 + ssm 0,0 STDIAG (16) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 17 write sequence - ssm 0,0 + ssm 0,0 STDIAG (17) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 18 write sequence - ssm 0,0 + ssm 0,0 STDIAG (18) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 19 write sequence - ssm 0,0 + ssm 0,0 STDIAG (19) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 20 write sequence - ssm 0,0 + ssm 0,0 STDIAG (20) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 21 write sequence - ssm 0,0 + ssm 0,0 STDIAG (21) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 22 write sequence - ssm 0,0 + ssm 0,0 STDIAG (22) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 23 write sequence - ssm 0,0 + ssm 0,0 STDIAG (23) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 24 write sequence - ssm 0,0 + ssm 0,0 STDIAG (24) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 25 write sequence - ssm 0,0 + ssm 0,0 STDIAG (25) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 26 write sequence - ssm 0,0 + ssm 0,0 STDIAG (26) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 27 write sequence - ssm 0,0 + ssm 0,0 STDIAG (27) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 28 write sequence - ssm 0,0 + ssm 0,0 STDIAG (28) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 29 write sequence - ssm 0,0 + ssm 0,0 STDIAG (29) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 30 write sequence - ssm 0,0 + ssm 0,0 STDIAG (30) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop sync ; RDR 31 write sequence - ssm 0,0 + ssm 0,0 STDIAG (31) - ssm 0,0 + ssm 0,0 b,n perf_rdr_shift_out_U_leave nop - ssm 0,0 + ssm 0,0 nop perf_rdr_shift_out_U_leave: diff -Nru a/arch/parisc/kernel/perf_images.h b/arch/parisc/kernel/perf_images.h --- a/arch/parisc/kernel/perf_images.h 2004-11-10 17:19:02 -08:00 +++ b/arch/parisc/kernel/perf_images.h 2004-11-10 17:19:02 -08:00 @@ -2,6 +2,7 @@ * Imagine for use with the Onyx (PCX-U) CPU interface * * Copyright (C) 2001 Randolph Chung + * Copyright (C) 2001 Hewlett-Packard (Grant Grundler) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c --- a/arch/parisc/kernel/ptrace.c 2004-11-10 17:19:02 -08:00 +++ b/arch/parisc/kernel/ptrace.c 2004-11-10 17:19:02 -08:00 @@ -379,6 +379,10 @@ ret = ptrace_detach(child, data); goto out_tsk; + case PTRACE_GETEVENTMSG: + ret = put_user(child->ptrace_message, (unsigned int __user *) data); + goto out_tsk; + default: ret = ptrace_request(child, request, addr, data); goto out_tsk; diff -Nru a/arch/parisc/kernel/real2.S b/arch/parisc/kernel/real2.S --- a/arch/parisc/kernel/real2.S 2004-11-10 17:19:04 -08:00 +++ b/arch/parisc/kernel/real2.S 2004-11-10 17:19:04 -08:00 @@ -149,7 +149,7 @@ rfi_virt2real: /* switch to real mode... */ ssm 0,0 /* See "relied upon translation" */ - nop /* comment in interruption.S */ + nop /* PA 2.0 Arch. F-5 */ nop nop nop @@ -186,7 +186,7 @@ .align 128 rfi_real2virt: ssm 0,0 /* See "relied upon translation" */ - nop /* comment in interruption.S */ + nop /* PA 2.0 Arch. F-5 */ nop nop nop diff -Nru a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c --- a/arch/parisc/kernel/signal.c 2004-11-10 17:19:07 -08:00 +++ b/arch/parisc/kernel/signal.c 2004-11-10 17:19:07 -08:00 @@ -494,11 +494,9 @@ */ static long -handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, - struct pt_regs *regs, int in_syscall) +handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, + sigset_t *oldset, struct pt_regs *regs, int in_syscall) { - struct k_sigaction *ka = ¤t->sighand->action[sig-1]; - DBG(1,"handle_signal: sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p\n", sig, ka, info, oldset, regs); @@ -506,9 +504,6 @@ if (!setup_rt_frame(sig, ka, info, oldset, regs, in_syscall)) return 0; - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; - if (!(ka->sa.sa_flags & SA_NODEFER)) { spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); @@ -535,7 +530,7 @@ do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall) { siginfo_t info; - struct k_sigaction *ka; + struct k_sigaction ka; int signr; DBG(1,"\ndo_signal: oldset=0x%p, regs=0x%p, sr7 %#lx, in_syscall=%d\n", @@ -553,10 +548,15 @@ oldset->sig[0], oldset->sig[1]); - signr = get_signal_to_deliver(&info, regs, NULL); - DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]); + /* May need to force signal if handle_signal failed to deliver */ + while (1) { + + signr = get_signal_to_deliver(&info, &ka, regs, NULL); + DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]); - if (signr > 0) { + if (signr <= 0) + break; + /* Restart a system call if necessary. */ if (in_syscall) { /* Check the return code */ @@ -569,8 +569,7 @@ break; case -ERESTARTSYS: - ka = ¤t->sighand->action[signr-1]; - if (!(ka->sa.sa_flags & SA_RESTART)) { + if (!(ka.sa.sa_flags & SA_RESTART)) { DBG(1,"ERESTARTSYS: putting -EINTR\n"); regs->gr[28] = -EINTR; break; @@ -578,8 +577,7 @@ /* fallthrough */ case -ERESTARTNOINTR: /* A syscall is just a branch, so all - we have to do is fiddle the return - pointer. */ + we have to do is fiddle the return pointer. */ regs->gr[31] -= 8; /* delayed branching */ /* Preserve original r28. */ regs->gr[28] = regs->orig_r28; @@ -589,12 +587,13 @@ /* Whee! Actually deliver the signal. If the delivery failed, we need to continue to iterate in this loop so we can deliver the SIGSEGV... */ - if (handle_signal(signr, &info, oldset, regs, in_syscall)) { + if (handle_signal(signr, &info, &ka, oldset, regs, in_syscall)) { DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n", regs->gr[28]); return 1; } } + /* end of while(1) looping forever if we can't force a signal */ /* Did we come from a system call? */ if (in_syscall) { diff -Nru a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c --- a/arch/parisc/kernel/smp.c 2004-11-10 17:19:07 -08:00 +++ b/arch/parisc/kernel/smp.c 2004-11-10 17:19:07 -08:00 @@ -333,6 +333,7 @@ struct smp_call_struct data; unsigned long timeout; static spinlock_t lock = SPIN_LOCK_UNLOCKED; + int retries = 0; if (num_online_cpus() < 2) return 0; @@ -365,21 +366,22 @@ /* Send a message to all other CPUs and wait for them to respond */ send_IPI_allbutself(IPI_CALL_FUNC); + retry: /* Wait for response */ timeout = jiffies + HZ; while ( (atomic_read (&data.unstarted_count) > 0) && time_before (jiffies, timeout) ) barrier (); + if (atomic_read (&data.unstarted_count) > 0) { + printk(KERN_CRIT "SMP CALL FUNCTION TIMED OUT! (cpu=%d), try %d\n", + smp_processor_id(), ++retries); + goto retry; + } /* We either got one or timed out. Release the lock */ mb(); smp_call_function_data = NULL; - if (atomic_read (&data.unstarted_count) > 0) { - printk(KERN_CRIT "SMP CALL FUNCTION TIMED OUT! (cpu=%d)\n", - smp_processor_id()); - return -ETIMEDOUT; - } while (wait && atomic_read (&data.unfinished_count) > 0) barrier (); diff -Nru a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c --- a/arch/parisc/kernel/sys_parisc.c 2004-11-10 17:19:06 -08:00 +++ b/arch/parisc/kernel/sys_parisc.c 2004-11-10 17:19:06 -08:00 @@ -234,6 +234,14 @@ return sys_readahead(fd, (loff_t)high << 32 | low, count); } +asmlinkage long parisc_fadvise64_64(int fd, + unsigned int high_off, unsigned int low_off, + unsigned int high_len, unsigned int low_len, int advice) +{ + return sys_fadvise64_64(fd, (loff_t)high_off << 32 | low_off, + (loff_t)high_len << 32 | low_len, advice); +} + asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr, unsigned long len, int prot, int flag) { return -ENOMEM; diff -Nru a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S --- a/arch/parisc/kernel/syscall.S 2004-11-10 17:19:07 -08:00 +++ b/arch/parisc/kernel/syscall.S 2004-11-10 17:19:07 -08:00 @@ -16,11 +16,32 @@ #include #include + /* We fill the empty parts of the gateway page with + * something that will kill the kernel or a + * userspace application. + */ +#define KILL_INSN break 0,0 + +#include /* for CONFIG_SMP */ + #ifdef __LP64__ .level 2.0w #else .level 1.1 #endif + +#ifndef __LP64__ + .macro fixup_branch,lbl + b \lbl + .endm +#else + .macro fixup_branch,lbl + ldil L%\lbl, %r1 + ldo R%\lbl(%r1), %r1 + bv,n %r0(%r1) + .endm +#endif + .text .import syscall_exit,code @@ -38,21 +59,41 @@ .align 4096 linux_gateway_page: - .rept 56 - break 0,0 + /* ADDRESS 0x00 to 0xb0 = 176 bytes / 4 bytes per insn = 44 insns */ + .rept 44 + KILL_INSN + .endr + + /* ADDRESS 0xb0 to 0xb4, lws uses 1 insns for entry */ + /* Light-weight-syscall entry must always be located at 0xb0 */ + /* WARNING: Keep this number updated with table size changes */ +#define __NR_lws_entries (2) + +lws_entry: + /* Unconditional branch to lws_start, located on the + same gateway page */ + b,n lws_start + + /* Fill from 0xb4 to 0xe0 */ + .rept 11 + KILL_INSN .endr + /* This function MUST be located at 0xe0 for glibc's threading + mechanism to work. DO NOT MOVE THIS CODE EVER! */ set_thread_pointer: gate .+8, %r0 /* increase privilege */ depi 3, 31, 2, %r31 /* Ensure we return into user mode. */ be 0(%sr7,%r31) /* return to user space */ mtctl %r26, %cr27 /* move arg0 to the control register */ + /* Increase the chance of trapping if random jumps occur to this + address, fill from 0xf0 to 0x100 */ .rept 4 - break 0,0 + KILL_INSN .endr -/* This address must remain fixed, or user binaries go splat. */ +/* This address must remain fixed at 0x100 for glibc's syscalls to work */ .align 256 linux_gateway_entry: gate .+8, %r0 /* become privileged */ @@ -157,6 +198,7 @@ /* Are we being ptraced? */ mfctl %cr30, %r1 + LDREG TI_TASK(%r1),%r1 LDREG TASK_PTRACE(%r1), %r1 bb,<,n %r1,31,.Ltracesys @@ -177,11 +219,8 @@ comiclr,>>= __NR_Linux_syscalls, %r20, %r0 b,n .Lsyscall_nosys -#ifdef __LP64__ - ldd,s %r20(%r19), %r19 -#else - ldwx,s %r20(%r19), %r19 -#endif + LDREGX %r20(%r19), %r19 + /* If this is a sys_rt_sigreturn call, and the signal was received * when not in_syscall, then we want to return via syscall_exit_rfi, * not syscall_exit. Signal no. in r20, in_syscall in r25 (see @@ -291,11 +330,8 @@ comiclr,>>= __NR_Linux_syscalls, %r20, %r0 b,n .Lsyscall_nosys -#ifdef __LP64__ - ldd,s %r20(%r19), %r19 -#else - ldwx,s %r20(%r19), %r19 -#endif + LDREGX %r20(%r19), %r19 + /* If this is a sys_rt_sigreturn call, and the signal was received * when not in_syscall, then we want to return via syscall_exit_rfi, * not syscall_exit. Signal no. in r20, in_syscall in r25 (see @@ -344,12 +380,292 @@ ldil L%syscall_exit_rfi,%r1 be,n R%syscall_exit_rfi(%sr7,%r1) + + /********************************************************* + Light-weight-syscall code + + r20 - lws number + r26,r25,r24,r23,r22 - Input registers + r28 - Function return register + r21 - Error code. + + Scracth: Any of the above that aren't being + currently used, including r1. + + Return pointer: r31 (Not usable) + + Error codes returned by entry path: + + ENOSYS - r20 was an invalid LWS number. + + *********************************************************/ +lws_start: + /* Gate and ensure we return to userspace */ + gate .+8, %r0 + depi 3, 31, 2, %r31 /* Ensure we return to userspace */ + +#ifdef __LP64__ + /* FIXME: If we are a 64-bit kernel just + * turn this on unconditionally. + */ + ssm PSW_SM_W, %r1 + extrd,u %r1,PSW_W_BIT,1,%r1 + /* sp must be aligned on 4, so deposit the W bit setting into + * the bottom of sp temporarily */ + or,ev %r1,%r30,%r30 + + /* Clip LWS number to a 32-bit value always */ + depdi 0, 31, 32, %r20 +#endif + + /* Is the lws entry number valid? */ + comiclr,>>= __NR_lws_entries, %r20, %r0 + b,n lws_exit_nosys + + /* WARNING: Trashing sr2 and sr3 */ + mfsp %sr7,%r1 /* get userspace into sr3 */ + mtsp %r1,%sr3 + mtsp %r0,%sr2 /* get kernel space into sr2 */ + + /* Load table start */ + ldil L%lws_table, %r1 + ldo R%lws_table(%r1), %r28 /* Scratch use of r28 */ + LDREGX %r20(%sr2,r28), %r21 /* Scratch use of r21 */ + + /* Jump to lws, lws table pointers already relocated */ + be,n 0(%sr2,%r21) + +lws_exit_nosys: + ldo -ENOSYS(%r0),%r21 /* set errno */ + /* Fall through: Return to userspace */ + +lws_exit: +#ifdef __LP64__ + /* decide whether to reset the wide mode bit + * + * For a syscall, the W bit is stored in the lowest bit + * of sp. Extract it and reset W if it is zero */ + extrd,u,*<> %r30,63,1,%r1 + rsm PSW_SM_W, %r0 + /* now reset the lowest bit of sp if it was set */ + xor %r30,%r1,%r30 +#endif + be,n 0(%sr3, %r31) + + + + /*************************************************** + Implementing CAS as an atomic operation: + + %r26 - Address to examine + %r25 - Old value to check (old) + %r24 - New value to set (new) + %r28 - Return prev through this register. + %r21 - Kernel error code + + If debugging is DISabled: + + %r21 has the following meanings: + + EAGAIN - CAS is busy, ldcw failed, try again. + EFAULT - Read or write failed. + + If debugging is enabled: + + EDEADLOCK - CAS called recursively. + EAGAIN && r28 == 1 - CAS is busy. Lock contended. + EAGAIN && r28 == 2 - CAS is busy. ldcw failed. + EFAULT - Read or write failed. + + Scratch: r20, r28, r1 + + ****************************************************/ + + /* Do not enable LWS debugging */ +#define ENABLE_LWS_DEBUG 0 + + /* ELF64 Process entry path */ +lws_compare_and_swap64: +#ifdef __LP64__ + b,n lws_compare_and_swap +#else + /* If we are not a 64-bit kernel, then we don't + * implement having 64-bit input registers + */ + b,n lws_exit_nosys +#endif + + /* ELF32 Process entry path */ +lws_compare_and_swap32: +#ifdef __LP64__ + /* Clip all the input registers */ + depdi 0, 31, 32, %r26 + depdi 0, 31, 32, %r25 + depdi 0, 31, 32, %r24 +#endif + +lws_compare_and_swap: +#ifdef CONFIG_SMP + /* Load start of lock table */ + ldil L%lws_lock_start, %r20 + ldo R%lws_lock_start(%r20), %r28 + + /* Extract four bits from r26 and hash lock (Bits 4-7) */ + extru %r26, 27, 4, %r20 + + /* Find lock to use, the hash is either one of 0 to + 15, multiplied by 16 (keep it 16-byte aligned) + and add to the lock table offset. */ + shlw %r20, 4, %r20 + add %r20, %r28, %r20 + +# ifdef ENABLE_LWS_DEBUG + /* + DEBUG, check for deadlock! + If the thread register values are the same + then we were the one that locked it last and + this is a recurisve call that will deadlock. + We *must* giveup this call and fail. + */ + ldw 4(%sr2,%r20), %r28 /* Load thread register */ + mfctl %cr27, %r21 /* Get current thread register */ + cmpb,<>,n %r21, %r28, cas_lock /* Called recursive? */ + b lws_exit /* Return error! */ + ldo -EDEADLOCK(%r0), %r21 +cas_lock: + cmpb,=,n %r0, %r28, cas_nocontend /* Is nobody using it? */ + ldo 1(%r0), %r28 /* 1st case */ + b lws_exit /* Contended... */ + ldo -EAGAIN(%r0), %r21 /* Spin in userspace */ +cas_nocontend: +# endif +/* ENABLE_LWS_DEBUG */ + + ldcw 0(%sr2,%r20), %r28 /* Try to acquire the lock */ + cmpb,<>,n %r0, %r28, cas_action /* Did we get it? */ +cas_wouldblock: + ldo 2(%r0), %r28 /* 2nd case */ + b lws_exit /* Contended... */ + ldo -EAGAIN(%r0), %r21 /* Spin in userspace */ +#endif +/* CONFIG_SMP */ + + /* + prev = *addr; + if ( prev == old ) + *addr = new; + return prev; + */ + + /* NOTES: + This all works becuse intr_do_signal + and schedule both check the return iasq + and see that we are on the kernel page + so this process is never scheduled off + or is ever sent any signal of any sort, + thus it is wholly atomic from usrspaces + perspective + */ +cas_action: +#if defined CONFIG_SMP && defined ENABLE_LWS_DEBUG + /* DEBUG */ + mfctl %cr27, %r1 + stw %r1, 4(%sr2,%r20) +#endif + /* The load and store could fail */ +1: ldw 0(%sr3,%r26), %r28 + sub,<> %r28, %r25, %r0 +2: stw %r24, 0(%sr3,%r26) +#ifdef CONFIG_SMP + /* Free lock */ + stw %r20, 0(%sr2,%r20) +# ifdef ENABLE_LWS_DEBUG + /* Clear thread register indicator */ + stw %r0, 4(%sr2,%r20) +# endif +#endif + /* Return to userspace, set no error */ + b lws_exit + copy %r0, %r21 + +3: + /* Error occured on load or store */ +#ifdef CONFIG_SMP + /* Free lock */ + stw %r20, 0(%sr2,%r20) +# ifdef ENABLE_LWS_DEBUG + stw %r0, 4(%sr2,%r20) +# endif +#endif + b lws_exit + ldo -EFAULT(%r0),%r21 /* set errno */ + nop + nop + nop + nop + + /* Two exception table entries, one for the load, + the other for the store. Either return -EFAULT. + Each of the entries must be relocated. */ + .section __ex_table,"aw" +#ifdef __LP64__ + /* Pad the address calculation */ + .word 0,(2b - linux_gateway_page) + .word 0,(3b - linux_gateway_page) +#else + .word (2b - linux_gateway_page) + .word (3b - linux_gateway_page) +#endif + .previous + + .section __ex_table,"aw" +#ifdef __LP64__ + /* Pad the address calculation */ + .word 0,(1b - linux_gateway_page) + .word 0,(3b - linux_gateway_page) +#else + .word (1b - linux_gateway_page) + .word (3b - linux_gateway_page) +#endif + .previous + +end_compare_and_swap: + + /* Make sure nothing else is placed on this page */ + .align 4096 + .export end_linux_gateway_page +end_linux_gateway_page: + + /* Relocate symbols assuming linux_gateway_page is mapped + to virtual address 0x0 */ +#ifdef __LP64__ + /* FIXME: The code will always be on the gateay page + and thus it will be on the first 4k, the + assembler seems to think that the final + subtraction result is only a word in + length, so we pad the value. + */ +#define LWS_ENTRY(_name_) .word 0,(lws_##_name_ - linux_gateway_page) +#else +#define LWS_ENTRY(_name_) .word (lws_##_name_ - linux_gateway_page) +#endif + + .align 4096 + /* Light-weight-syscall table */ + /* Start of lws table. */ + .export lws_table +.Llws_table: +lws_table: + LWS_ENTRY(compare_and_swap32) /* 0 - ELF32 Atomic compare and swap */ + LWS_ENTRY(compare_and_swap64) /* 1 - ELF64 Atomic compare and swap */ + /* End of lws table */ + .align 4096 .export sys_call_table .Lsys_call_table: sys_call_table: #include "syscall_table.S" -.end + #ifdef __LP64__ .align 4096 .export sys_call_table64 @@ -359,10 +675,29 @@ #include "syscall_table.S" #endif +#ifdef CONFIG_SMP + /* + All light-weight-syscall atomic operations + will use this set of locks + */ + .section .data + .align 4096 + .export lws_lock_start +.Llws_lock_start: +lws_lock_start: + /* lws locks */ + .align 16 + .rept 16 + /* Keep locks aligned at 16-bytes */ + .word 1 + .word 0 + .word 0 + .word 0 + .endr + .previous +#endif +/* CONFIG_SMP for lws_lock_start */ - /* Make sure nothing else is placed on this page */ +.end - .align 4096 - .export end_linux_gateway_page -end_linux_gateway_page: diff -Nru a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S --- a/arch/parisc/kernel/syscall_table.S 2004-11-10 17:19:02 -08:00 +++ b/arch/parisc/kernel/syscall_table.S 2004-11-10 17:19:02 -08:00 @@ -1,6 +1,6 @@ /* System Call Table * - * Copyright (C) 1999-2003 Matthew Wilcox + * Copyright (C) 1999-2004 Matthew Wilcox * Copyright (C) 2000-2001 John Marvin * Copyright (C) 2000 Alan Modra * Copyright (C) 2000-2003 Paul Bame @@ -308,19 +308,18 @@ ENTRY_OURS(ftruncate64) /* 200 */ ENTRY_SAME(getdents64) ENTRY_COMP(fcntl64) - ENTRY_SAME(ni_syscall) - ENTRY_SAME(ni_syscall) - ENTRY_SAME(ni_syscall) /* 205 */ - ENTRY_SAME(gettid) - ENTRY_OURS(readahead) - ENTRY_SAME(ni_syscall) /* tkill */ - + ENTRY_SAME(ni_syscall) /* attrctl -- dead */ + ENTRY_SAME(ni_syscall) /* acl_get -- dead */ + ENTRY_SAME(ni_syscall) /* 205 (acl_set -- dead) */ + ENTRY_SAME(gettid) + ENTRY_OURS(readahead) + ENTRY_SAME(tkill) ENTRY_SAME(sendfile64) ENTRY_COMP(futex) /* 210 */ ENTRY_COMP(sched_setaffinity) ENTRY_COMP(sched_getaffinity) - ENTRY_SAME(ni_syscall) - ENTRY_SAME(ni_syscall) + ENTRY_SAME(ni_syscall) /* set_thread_area */ + ENTRY_SAME(ni_syscall) /* get_thread_area */ ENTRY_SAME(io_setup) /* 215 */ ENTRY_SAME(io_destroy) ENTRY_SAME(io_getevents) @@ -334,12 +333,40 @@ ENTRY_SAME(epoll_ctl) /* 225 */ ENTRY_SAME(epoll_wait) ENTRY_SAME(remap_file_pages) - ENTRY_SAME(semtimedop) - ENTRY_SAME(mq_open) - ENTRY_SAME(mq_unlink) /* 230 */ - ENTRY_SAME(mq_timedsend) - ENTRY_SAME(mq_timedreceive) - ENTRY_SAME(mq_notify) - ENTRY_SAME(mq_getsetattr) - /* Nothing yet */ /* 235 */ + ENTRY_SAME(semtimedop) + ENTRY_SAME(mq_open) + ENTRY_SAME(mq_unlink) /* 230 */ + ENTRY_SAME(mq_timedsend) + ENTRY_SAME(mq_timedreceive) + ENTRY_SAME(mq_notify) + ENTRY_SAME(mq_getsetattr) + ENTRY_COMP(waitid) /* 235 */ + ENTRY_OURS(fadvise64_64) + ENTRY_SAME(set_tid_address) + ENTRY_SAME(setxattr) + ENTRY_SAME(lsetxattr) + ENTRY_SAME(fsetxattr) /* 240 */ + ENTRY_SAME(getxattr) + ENTRY_SAME(lgetxattr) + ENTRY_SAME(fgetxattr) + ENTRY_SAME(listxattr) + ENTRY_SAME(llistxattr) /* 245 */ + ENTRY_SAME(flistxattr) + ENTRY_SAME(removexattr) + ENTRY_SAME(lremovexattr) + ENTRY_SAME(fremovexattr) + ENTRY_COMP(timer_create) /* 250 */ + ENTRY_COMP(timer_settime) + ENTRY_COMP(timer_gettime) + ENTRY_SAME(timer_getoverrun) + ENTRY_SAME(timer_delete) + ENTRY_COMP(clock_settime) /* 255 */ + ENTRY_COMP(clock_gettime) + ENTRY_COMP(clock_getres) + ENTRY_COMP(clock_nanosleep) + ENTRY_SAME(tgkill) + ENTRY_COMP(mbind) /* 260 */ + ENTRY_COMP(get_mempolicy) + ENTRY_COMP(set_mempolicy) + /* Nothing yet */ diff -Nru a/arch/parisc/kernel/topology.c b/arch/parisc/kernel/topology.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/parisc/kernel/topology.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,37 @@ +/* + * arch/parisc/kernel/topology.c - Populate driverfs with topology information + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or + * NON INFRINGEMENT. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include + +static struct cpu cpu_devices[NR_CPUS]; + +static int __init topology_init(void) +{ + struct node *parent = NULL; + int num; + + for_each_present_cpu(num) { + register_cpu(&cpu_devices[num], num, parent); + } + return 0; +} + +subsys_initcall(topology_init); diff -Nru a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c --- a/arch/parisc/kernel/traps.c 2004-11-10 17:19:07 -08:00 +++ b/arch/parisc/kernel/traps.c 2004-11-10 17:19:07 -08:00 @@ -135,32 +135,19 @@ EXPORT_SYMBOL(dump_stack); -void show_stack(struct task_struct *task, unsigned long *s) +static void do_show_stack(struct unwind_frame_info *info) { int i = 1; - struct unwind_frame_info info; - - if (!task) { - unsigned long sp, ip, rp; - -HERE: - asm volatile ("copy %%r30, %0" : "=r"(sp)); - ip = (unsigned long)&&HERE; - rp = (unsigned long)__builtin_return_address(0); - unwind_frame_init(&info, current, sp, ip, rp); - } else { - unwind_frame_init_from_blocked_task(&info, task); - } printk("Backtrace:\n"); while (i <= 16) { - if (unwind_once(&info) < 0 || info.ip == 0) + if (unwind_once(info) < 0 || info->ip == 0) break; - if (__kernel_text_address(info.ip)) { - printk(" [<" RFMT ">] ", info.ip); + if (__kernel_text_address(info->ip)) { + printk(" [<" RFMT ">] ", info->ip); #ifdef CONFIG_KALLSYMS - print_symbol("%s\n", info.ip); + print_symbol("%s\n", info->ip); #else if ((i & 0x03) == 0) printk("\n"); @@ -171,6 +158,25 @@ printk("\n"); } +void show_stack(struct task_struct *task, unsigned long *s) +{ + struct unwind_frame_info info; + + if (!task) { + unsigned long sp, ip, rp; + +HERE: + asm volatile ("copy %%r30, %0" : "=r"(sp)); + ip = (unsigned long)&&HERE; + rp = (unsigned long)__builtin_return_address(0); + unwind_frame_init(&info, current, sp, ip, rp); + } else { + unwind_frame_init_from_blocked_task(&info, task); + } + + do_show_stack(&info); +} + void die_if_kernel(char *str, struct pt_regs *regs, long err) { if (user_mode(regs)) { @@ -373,9 +379,9 @@ /* - * This routine handles page faults. It determines the address, - * and the problem, and then passes it off to one of the appropriate - * routines. + * This routine is called as a last resort when everything else + * has gone clearly wrong. We get called for faults in kernel space, + * and HPMC's. */ void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long offset) { @@ -407,7 +413,12 @@ } - show_stack(NULL, (unsigned long *)regs->gr[30]); + { + /* show_stack(NULL, (unsigned long *)regs->gr[30]); */ + struct unwind_frame_info info; + unwind_frame_init(&info, current, regs->gr[30], regs->iaoq[0], regs->gr[2]); + do_show_stack(&info); + } printk("\n"); printk(KERN_CRIT "%s: Code=%d regs=%p (Addr=" RFMT ")\n", @@ -421,9 +432,16 @@ * system will shut down immediately right here. */ pdc_soft_power_button(0); - /* Gutter the processor! */ - for(;;) - ; + /* Call kernel panic() so reboot timeouts work properly + * FIXME: This function should be on the list of + * panic notifiers, and we should call panic + * directly from the location that we wish. + * e.g. We should not call panic from + * parisc_terminate, but rather the oter way around. + * This hack works, prints the panic message twice, + * and it enables reboot timers! + */ + panic(msg); } void handle_interruption(int code, struct pt_regs *regs) @@ -437,6 +455,36 @@ else local_irq_enable(); + /* Security check: + * If the priority level is still user, and the + * faulting space is not equal to the active space + * then the user is attempting something in a space + * that does not belong to them. Kill the process. + * + * This is normally the situation when the user + * attempts to jump into the kernel space at the + * wrong offset, be it at the gateway page or a + * random location. + * + * We cannot normally signal the process because it + * could *be* on the gateway page, and processes + * executing on the gateway page can't have signals + * delivered. + * + * We merely readjust the address into the users + * space, at a destination address of zero, and + * allow processing to continue. + */ + if (((unsigned long)regs->iaoq[0] & 3) && + ((unsigned long)regs->iasq[0] != (unsigned long)regs->sr[7])) { + /* Kill the user process later */ + regs->iaoq[0] = 0 | 3; + regs->iaoq[1] = regs->iaoq[0] + 4; + regs->iasq[0] = regs->iasq[0] = regs->sr[7]; + regs->gr[0] &= ~PSW_B; + return; + } + #if 0 printk(KERN_CRIT "Interruption # %d\n", code); #endif @@ -461,7 +509,7 @@ case 3: /* Recovery counter trap */ regs->gr[0] &= ~PSW_R; - if (regs->iasq[0]) + if (user_space(regs)) handle_gdb_break(regs, TRAP_TRACE); /* else this must be the start of a syscall - just let it run */ return; @@ -542,12 +590,12 @@ /* Set to zero, and let the userspace app figure it out from the insn pointed to by si_addr */ si.si_code = 0; - si.si_addr = (void *) regs->iaoq[0]; + si.si_addr = (void __user *) regs->iaoq[0]; force_sig_info(SIGFPE, &si, current); return; - } else - /* The kernel doesn't want to handle condition codes */ - break; + } + /* The kernel doesn't want to handle condition codes */ + break; case 14: /* Assist Exception Trap, i.e. floating point exception. */ @@ -565,9 +613,16 @@ /* Fall through */ case 17: /* Non-access data TLB miss fault/Non-access data page fault */ - /* TODO: Still need to add slow path emulation code here */ - /* TODO: Understand what is meant by the TODO listed - above this one. (Carlos) */ + /* FIXME: + Still need to add slow path emulation code here! + If the insn used a non-shadow register, then the tlb + handlers could not have their side-effect (e.g. probe + writing to a target register) emulated since rfir would + erase the changes to said register. Instead we have to + setup everything, call this function we are in, and emulate + by hand. Technically we need to emulate: + fdc,fdce,pdc,"fic,4f",prober,probeir,probew, probeiw + */ fault_address = regs->ior; fault_space = regs->isr; break; @@ -598,7 +653,7 @@ case 25: /* Taken branch trap */ regs->gr[0] &= ~PSW_T; - if (regs->iasq[0]) + if (user_space(regs)) handle_gdb_break(regs, TRAP_BRANCH); /* else this must be the start of a syscall - just let it * run. diff -Nru a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c --- a/arch/parisc/kernel/unaligned.c 2004-11-10 17:19:03 -08:00 +++ b/arch/parisc/kernel/unaligned.c 2004-11-10 17:19:03 -08:00 @@ -23,6 +23,7 @@ #include #include #include +#include /* #define DEBUG_UNALIGNED 1 */ @@ -38,6 +39,11 @@ #define RFMT "%08lx" #endif +#define FIXUP_BRANCH(lbl) \ + "\tldil L%%" #lbl ", %%r1\n" \ + "\tldo R%%" #lbl "(%%r1), %%r1\n" \ + "\tbv,n %%r0(%%r1)\n" + /* 1111 1100 0000 0000 0001 0011 1100 0000 */ #define OPCODE1(a,b,c) ((a)<<26|(b)<<12|(c)<<6) #define OPCODE2(a,b) ((a)<<26|(b)<<1) @@ -134,15 +140,19 @@ "1: ldbs 0(%%sr1,%3), %%r20\n" "2: ldbs 1(%%sr1,%3), %0\n" " depw %%r20, 23, 24, %0\n" -" cmpclr,= %%r0, %%r0, %1\n" -"3: ldo -2(%%r0), %1\n" -" .section __ex_table,\"a\"\n" +" copy %%r0, %1\n" +"3: \n" +" .section .fixup,\"ax\"\n" +"4: ldi -2, %1\n" + FIXUP_BRANCH(3b) +" .previous\n" +" .section __ex_table,\"aw\"\n" #ifdef __LP64__ -" .dword 1b,(3b-1b)\n" -" .dword 2b,(3b-2b)\n" +" .dword 1b,4b\n" +" .dword 2b,4b\n" #else -" .word 1b,(3b-1b)\n" -" .word 2b,(3b-2b)\n" +" .word 1b,4b\n" +" .word 2b,4b\n" #endif " .previous\n" : "=r" (val), "=r" (ret) @@ -175,15 +185,19 @@ " subi 32,%%r19,%%r19\n" " mtctl %%r19,11\n" " vshd %0,%%r20,%0\n" -" cmpclr,= %%r0, %%r0, %1\n" -"3: ldo -2(%%r0), %1\n" -" .section __ex_table,\"a\"\n" +" copy %%r0, %1\n" +"3: \n" +" .section .fixup,\"ax\"\n" +"4: ldi -2, %1\n" + FIXUP_BRANCH(3b) +" .previous\n" +" .section __ex_table,\"aw\"\n" #ifdef __LP64__ -" .dword 1b,(3b-1b)\n" -" .dword 2b,(3b-2b)\n" +" .dword 1b,4b\n" +" .dword 2b,4b\n" #else -" .word 1b,(3b-1b)\n" -" .word 2b,(3b-2b)\n" +" .word 1b,4b\n" +" .word 2b,4b\n" #endif " .previous\n" : "=r" (val), "=r" (ret) @@ -222,15 +236,19 @@ " subi 64,%%r19,%%r19\n" " mtsar %%r19\n" " shrpd %0,%%r20,%%sar,%0\n" -" cmpclr,= %%r0, %%r0, %1\n" -"3: ldo -2(%%r0), %1\n" -" .section __ex_table,\"a\"\n" +" copy %%r0, %1\n" +"3: \n" +" .section .fixup,\"ax\"\n" +"4: ldi -2, %1\n" + FIXUP_BRANCH(3b) +" .previous\n" +" .section __ex_table,\"aw\"\n" #ifdef __LP64__ -" .dword 1b,(3b-1b)\n" -" .dword 2b,(3b-2b)\n" +" .dword 1b,4b\n" +" .dword 2b,4b\n" #else -" .word 1b,(3b-1b)\n" -" .word 2b,(3b-2b)\n" +" .word 1b,4b\n" +" .word 2b,4b\n" #endif " .previous\n" : "=r" (val), "=r" (ret) @@ -250,17 +268,21 @@ " mtsar %%r19\n" " vshd %0,%1,%0\n" " vshd %1,%%r20,%1\n" -" cmpclr,= %%r0, %%r0, %2\n" -"4: ldo -2(%%r0), %2\n" -" .section __ex_table,\"a\"\n" +" copy %%r0, %2\n" +"4: \n" +" .section .fixup,\"ax\"\n" +"5: ldi -2, %2\n" + FIXUP_BRANCH(4b) +" .previous\n" +" .section __ex_table,\"aw\"\n" #ifdef __LP64__ -" .dword 1b,(4b-1b)\n" -" .dword 2b,(4b-2b)\n" -" .dword 3b,(4b-3b)\n" -#else -" .word 1b,(4b-1b)\n" -" .word 2b,(4b-2b)\n" -" .word 3b,(4b-3b)\n" +" .dword 1b,5b\n" +" .dword 2b,5b\n" +" .dword 3b,5b\n" +#else +" .word 1b,5b\n" +" .word 2b,5b\n" +" .word 3b,5b\n" #endif " .previous\n" : "=r" (valh), "=r" (vall), "=r" (ret) @@ -296,15 +318,19 @@ " extrw,u %1, 23, 8, %%r19\n" "1: stb %1, 1(%%sr1, %2)\n" "2: stb %%r19, 0(%%sr1, %2)\n" -" cmpclr,= %%r0, %%r0, %0\n" -"3: ldo -2(%%r0), %0\n" -" .section __ex_table,\"a\"\n" +" copy %%r0, %0\n" +"3: \n" +" .section .fixup,\"ax\"\n" +"4: ldi -2, %0\n" + FIXUP_BRANCH(3b) +" .previous\n" +" .section __ex_table,\"aw\"\n" #ifdef __LP64__ -" .dword 1b,(3b-1b)\n" -" .dword 2b,(3b-2b)\n" +" .dword 1b,4b\n" +" .dword 2b,4b\n" #else -" .word 1b,(3b-1b)\n" -" .word 2b,(3b-2b)\n" +" .word 1b,4b\n" +" .word 2b,4b\n" #endif " .previous\n" : "=r" (ret) @@ -346,15 +372,19 @@ " or %%r1, %%r21, %%r21\n" " stw %%r20,0(%%sr1,%2)\n" " stw %%r21,4(%%sr1,%2)\n" -" cmpclr,= %%r0, %%r0, %0\n" -"3: ldo -2(%%r0), %0\n" -" .section __ex_table,\"a\"\n" +" copy %%r0, %0\n" +"3: \n" +" .section .fixup,\"ax\"\n" +"4: ldi -2, %0\n" + FIXUP_BRANCH(3b) +" .previous\n" +" .section __ex_table,\"aw\"\n" #ifdef __LP64__ -" .dword 1b,(3b-1b)\n" -" .dword 2b,(3b-2b)\n" +" .dword 1b,4b\n" +" .dword 2b,4b\n" #else -" .word 1b,(3b-1b)\n" -" .word 2b,(3b-2b)\n" +" .word 1b,4b\n" +" .word 2b,4b\n" #endif " .previous\n" : "=r" (ret) @@ -399,19 +429,23 @@ " or %%r1, %%r21, %%r21\n" "3: std %%r20,0(%%sr1,%2)\n" "4: std %%r21,8(%%sr1,%2)\n" -" cmpclr,= %%r0, %%r0, %0\n" -"5: ldo -2(%%r0), %0\n" -" .section __ex_table,\"a\"\n" +" copy %%r0, %0\n" +"5: \n" +" .section .fixup,\"ax\"\n" +"6: ldi -2, %0\n" + FIXUP_BRANCH(5b) +" .previous\n" +" .section __ex_table,\"aw\"\n" #ifdef __LP64__ -" .dword 1b,(5b-1b)\n" -" .dword 2b,(5b-2b)\n" -" .dword 3b,(5b-3b)\n" -" .dword 4b,(5b-4b)\n" -#else -" .word 1b,(5b-1b)\n" -" .word 2b,(5b-2b)\n" -" .word 3b,(5b-3b)\n" -" .word 4b,(5b-4b)\n" +" .dword 1b,6b\n" +" .dword 2b,6b\n" +" .dword 3b,6b\n" +" .dword 4b,6b\n" +#else +" .word 1b,6b\n" +" .word 2b,6b\n" +" .word 3b,6b\n" +" .word 4b,6b\n" #endif " .previous\n" : "=r" (ret) @@ -438,21 +472,25 @@ "3: stw %1,0(%%sr1,%1)\n" "4: stw %%r1,4(%%sr1,%3)\n" "5: stw %2,8(%%sr1,%3)\n" -" cmpclr,= %%r0, %%r0, %0\n" -"6: ldo -2(%%r0), %0\n" -" .section __ex_table,\"a\"\n" +" copy %%r0, %0\n" +"6: \n" +" .section .fixup,\"ax\"\n" +"7: ldi -2, %0\n" + FIXUP_BRANCH(6b) +" .previous\n" +" .section __ex_table,\"aw\"\n" #ifdef __LP64__ -" .dword 1b,(6b-1b)\n" -" .dword 2b,(6b-2b)\n" -" .dword 3b,(6b-3b)\n" -" .dword 4b,(6b-4b)\n" -" .dword 5b,(6b-5b)\n" -#else -" .word 1b,(6b-1b)\n" -" .word 2b,(6b-2b)\n" -" .word 3b,(6b-3b)\n" -" .word 4b,(6b-4b)\n" -" .word 5b,(6b-5b)\n" +" .dword 1b,7b\n" +" .dword 2b,7b\n" +" .dword 3b,7b\n" +" .dword 4b,7b\n" +" .dword 5b,7b\n" +#else +" .word 1b,7b\n" +" .word 2b,7b\n" +" .word 3b,7b\n" +" .word 4b,7b\n" +" .word 5b,7b\n" #endif " .previous\n" : "=r" (ret) @@ -492,7 +530,6 @@ show_regs(regs); #endif } - if (!unaligned_enabled) goto force_sigbus; } @@ -555,16 +592,6 @@ newbase += IM14(regs->iir&~4); } break; - } - - if (regs->isr != regs->sr[7]) - { - printk(KERN_CRIT "isr verification failed (isr: " RFMT ", sr7: " RFMT "\n", - regs->isr, regs->sr[7]); - - /* don't kill him though, since he has appropriate access to the page, or we - * would never have gotten here. - */ } /* TODO: make this cleaner... */ diff -Nru a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c --- a/arch/parisc/kernel/unwind.c 2004-11-10 17:19:02 -08:00 +++ b/arch/parisc/kernel/unwind.c 2004-11-10 17:19:02 -08:00 @@ -12,8 +12,10 @@ #include #include #include +#include #include +#include #include @@ -40,25 +42,27 @@ static inline const struct unwind_table_entry * find_unwind_entry_in_table(const struct unwind_table *table, unsigned long addr) { - const struct unwind_table_entry *e = 0; + const struct unwind_table_entry *e = NULL; unsigned long lo, hi, mid; - for (lo = 0, hi = table->length; lo < hi; ) - { - mid = (lo + hi) / 2; + lo = 0; + hi = table->length - 1; + + while (lo <= hi) { + mid = (hi - lo) / 2 + lo; e = &table->table[mid]; if (addr < e->region_start) - hi = mid; + hi = mid - 1; else if (addr > e->region_end) lo = mid + 1; else - break; + return e; } - return e; + return NULL; } -static inline const struct unwind_table_entry * +static const struct unwind_table_entry * find_unwind_entry(unsigned long addr) { struct unwind_table *table = unwind_tables; @@ -68,8 +72,7 @@ addr <= kernel_unwind_table.end) e = find_unwind_entry_in_table(&kernel_unwind_table, addr); else - for (; table; table = table->next) - { + for (; table; table = table->next) { if (addr >= table->start && addr <= table->end) e = find_unwind_entry_in_table(table, addr); @@ -99,6 +102,11 @@ table->next = NULL; for (; start <= end; start++) { + if (start < end && + start->region_end > (start+1)->region_start) { + printk("WARNING: Out of order unwind entry! %p and %p\n", start, start+1); + } + start->region_start += base_addr; start->region_end += base_addr; } @@ -114,7 +122,7 @@ table = kmalloc(sizeof(struct unwind_table), GFP_USER); if (table == NULL) - return 0; + return NULL; unwind_table_init(table, name, base_addr, gp, start, end); spin_lock_irqsave(&unwind_lock, flags); if (unwind_tables) @@ -170,12 +178,40 @@ int looking_for_rp, rpoffset = 0; e = find_unwind_entry(info->ip); - if (!e) { + if (e == NULL) { unsigned long sp; extern char _stext[], _etext[]; dbg("Cannot find unwind entry for 0x%lx; forced unwinding\n", info->ip); +#ifdef CONFIG_KALLSYMS + /* Handle some frequent special cases.... */ + { + char symname[KSYM_NAME_LEN+1]; + char *modname; + unsigned long symsize, offset; + + kallsyms_lookup(info->ip, &symsize, &offset, + &modname, symname); + + dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname); + + if (strcmp(symname, "_switch_to_ret") == 0) { + info->prev_sp = info->sp - CALLEE_SAVE_FRAME_SIZE; + info->prev_ip = *(unsigned long *)(info->prev_sp - RP_OFFSET); + dbg("_switch_to_ret @ %lx - setting " + "prev_sp=%lx prev_ip=%lx\n", + info->ip, info->prev_sp, + info->prev_ip); + return; + } else if (strcmp(symname, "ret_from_kernel_thread") == 0 || + strcmp(symname, "syscall_exit") == 0) { + info->prev_ip = info->prev_sp = 0; + return; + } + } +#endif + /* Since we are doing the unwinding blind, we don't know if we are adjusting the stack correctly or extracting the rp correctly. The rp is checked to see if it belongs to the @@ -185,30 +221,33 @@ modules. */ sp = info->sp & ~63; do { - info->prev_sp = sp - 64; - - /* FIXME: what happens if we unwind too far so that - sp no longer falls in a mapped kernel page? */ -#ifndef __LP64__ - info->prev_ip = *(unsigned long *)(info->prev_sp - 20); -#else - info->prev_ip = *(unsigned long *)(info->prev_sp - 16); -#endif + unsigned long tmp; + info->prev_sp = sp - 64; + info->prev_ip = 0; + if (get_user(tmp, (unsigned long *)(info->prev_sp - RP_OFFSET))) + break; + info->prev_ip = tmp; sp = info->prev_sp; } while (info->prev_ip < (unsigned long)_stext || info->prev_ip > (unsigned long)_etext); - dbg("analyzing func @ %lx with no unwind info, setting prev_sp=%lx prev_ip=%lx\n", info->ip, info->prev_sp, info->prev_ip); - } else { + info->rp = 0; - dbg("e->start = 0x%x, e->end = 0x%x, Save_SP = %d, Save_RP = %d size = %u\n", - e->region_start, e->region_end, e->Save_SP, e->Save_RP, e->Total_frame_size); + dbg("analyzing func @ %lx with no unwind info, setting " + "prev_sp=%lx prev_ip=%lx\n", info->ip, + info->prev_sp, info->prev_ip); + } else { + dbg("e->start = 0x%x, e->end = 0x%x, Save_SP = %d, " + "Save_RP = %d size = %u\n", e->region_start, + e->region_end, e->Save_SP, e->Save_RP, + e->Total_frame_size); looking_for_rp = e->Save_RP; for (npc = e->region_start; - (frame_size < (e->Total_frame_size << 3) || looking_for_rp) && + (frame_size < (e->Total_frame_size << 3) || + looking_for_rp) && npc < info->ip; npc += 4) { @@ -219,22 +258,28 @@ /* ldo X(sp), sp, or stwm X,D(sp) */ frame_size += (insn & 0x1 ? -1 << 13 : 0) | ((insn & 0x3fff) >> 1); - dbg("analyzing func @ %lx, insn=%08x @ %lx, frame_size = %ld\n", info->ip, insn, npc, frame_size); - } else if ((insn & 0xffe00008) == 0x7ec00008) { + dbg("analyzing func @ %lx, insn=%08x @ " + "%lx, frame_size = %ld\n", info->ip, + insn, npc, frame_size); + } else if ((insn & 0xffe00008) == 0x73c00008) { /* std,ma X,D(sp) */ frame_size += (insn & 0x1 ? -1 << 13 : 0) | (((insn >> 4) & 0x3ff) << 3); - dbg("analyzing func @ %lx, insn=%08x @ %lx, frame_size = %ld\n", info->ip, insn, npc, frame_size); + dbg("analyzing func @ %lx, insn=%08x @ " + "%lx, frame_size = %ld\n", info->ip, + insn, npc, frame_size); } else if (insn == 0x6bc23fd9) { /* stw rp,-20(sp) */ rpoffset = 20; looking_for_rp = 0; - dbg("analyzing func @ %lx, insn=stw rp,-20(sp) @ %lx\n", info->ip, npc); + dbg("analyzing func @ %lx, insn=stw rp," + "-20(sp) @ %lx\n", info->ip, npc); } else if (insn == 0x0fc212c1) { /* std rp,-16(sr0,sp) */ rpoffset = 16; looking_for_rp = 0; - dbg("analyzing func @ %lx, insn=std rp,-16(sp) @ %lx\n", info->ip, npc); + dbg("analyzing func @ %lx, insn=std rp," + "-16(sp) @ %lx\n", info->ip, npc); } } @@ -244,7 +289,9 @@ info->prev_ip = info->rp; info->rp = 0; - dbg("analyzing func @ %lx, setting prev_sp=%lx prev_ip=%lx\n", info->ip, info->prev_sp, info->prev_ip); + dbg("analyzing func @ %lx, setting prev_sp=%lx " + "prev_ip=%lx npc=%lx\n", info->ip, info->prev_sp, + info->prev_ip, npc); } } @@ -257,7 +304,8 @@ info->ip = ip; info->rp = rp; - dbg("(%d) Start unwind from sp=%08lx ip=%08lx\n", t ? (int)t->pid : 0, info->sp, info->ip); + dbg("(%d) Start unwind from sp=%08lx ip=%08lx\n", + t ? (int)t->pid : -1, info->sp, info->ip); } void unwind_frame_init_from_blocked_task(struct unwind_frame_info *info, struct task_struct *t) @@ -285,7 +333,9 @@ next_frame->prev_sp = 0; next_frame->prev_ip = 0; - dbg("(%d) Continue unwind to sp=%08lx ip=%08lx\n", (int)next_frame->t->pid, next_frame->sp, next_frame->ip); + dbg("(%d) Continue unwind to sp=%08lx ip=%08lx\n", + next_frame->t ? (int)next_frame->t->pid : -1, + next_frame->sp, next_frame->ip); return 0; } diff -Nru a/arch/parisc/lib/Makefile b/arch/parisc/lib/Makefile --- a/arch/parisc/lib/Makefile 2004-11-10 17:19:04 -08:00 +++ b/arch/parisc/lib/Makefile 2004-11-10 17:19:04 -08:00 @@ -2,6 +2,6 @@ # Makefile for parisc-specific library files # -lib-y := lusercopy.o bitops.o checksum.o io.o memset.o +lib-y := lusercopy.o bitops.o checksum.o io.o memset.o fixup.o memcpy.o lib-$(CONFIG_SMP) += debuglocks.o diff -Nru a/arch/parisc/lib/bitops.c b/arch/parisc/lib/bitops.c --- a/arch/parisc/lib/bitops.c 2004-11-10 17:19:02 -08:00 +++ b/arch/parisc/lib/bitops.c 2004-11-10 17:19:02 -08:00 @@ -13,8 +13,8 @@ #include #ifdef CONFIG_SMP -atomic_lock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = { - [0 ... (ATOMIC_HASH_SIZE-1)] = (atomic_lock_t) { { 1, 1, 1, 1 } } +spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = { + [0 ... (ATOMIC_HASH_SIZE-1)] = SPIN_LOCK_UNLOCKED }; #endif @@ -23,10 +23,10 @@ { unsigned long temp, flags; - atomic_spin_lock_irqsave(ATOMIC_HASH(ptr), flags); + _atomic_spin_lock_irqsave(ptr, flags); temp = *ptr; *ptr = x; - atomic_spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags); + _atomic_spin_unlock_irqrestore(ptr, flags); return temp; } #endif @@ -36,10 +36,10 @@ unsigned long flags; long temp; - atomic_spin_lock_irqsave(ATOMIC_HASH(ptr), flags); + _atomic_spin_lock_irqsave(ptr, flags); temp = (long) *ptr; /* XXX - sign extension wanted? */ *ptr = x; - atomic_spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags); + _atomic_spin_unlock_irqrestore(ptr, flags); return (unsigned long)temp; } @@ -49,10 +49,10 @@ unsigned long flags; long temp; - atomic_spin_lock_irqsave(ATOMIC_HASH(ptr), flags); + _atomic_spin_lock_irqsave(ptr, flags); temp = (long) *ptr; /* XXX - sign extension wanted? */ *ptr = x; - atomic_spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags); + _atomic_spin_unlock_irqrestore(ptr, flags); return (unsigned long)temp; } @@ -63,10 +63,10 @@ unsigned long flags; unsigned long prev; - atomic_spin_lock_irqsave(ATOMIC_HASH(ptr), flags); + _atomic_spin_lock_irqsave(ptr, flags); if ((prev = *ptr) == old) *ptr = new; - atomic_spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags); + _atomic_spin_unlock_irqrestore(ptr, flags); return prev; } #endif @@ -76,9 +76,9 @@ unsigned long flags; unsigned int prev; - atomic_spin_lock_irqsave(ATOMIC_HASH(ptr), flags); + _atomic_spin_lock_irqsave(ptr, flags); if ((prev = *ptr) == old) *ptr = new; - atomic_spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags); + _atomic_spin_unlock_irqrestore(ptr, flags); return (unsigned long)prev; } diff -Nru a/arch/parisc/lib/checksum.c b/arch/parisc/lib/checksum.c --- a/arch/parisc/lib/checksum.c 2004-11-10 17:19:05 -08:00 +++ b/arch/parisc/lib/checksum.c 2004-11-10 17:19:05 -08:00 @@ -24,6 +24,13 @@ #include #include +#define addc(_t,_r) \ + __asm__ __volatile__ ( \ +" add %0, %1, %0\n" \ +" addc %0, %%r0, %0\n" \ + : "=r"(_t) \ + : "r"(_r), "0"(_t)); + static inline unsigned short from32to16(unsigned int x) { /* 32 bits --> 16 bits + carry */ @@ -56,16 +63,25 @@ } count >>= 1; /* nr of 32-bit words.. */ if (count) { - unsigned int carry = 0; - do { + while (count >= 4) { + unsigned int r1, r2, r3, r4; + r1 = *(unsigned int *)(buff + 0); + r2 = *(unsigned int *)(buff + 4); + r3 = *(unsigned int *)(buff + 8); + r4 = *(unsigned int *)(buff + 12); + addc(result, r1); + addc(result, r2); + addc(result, r3); + addc(result, r4); + count -= 4; + buff += 16; + } + while (count) { unsigned int w = *(unsigned int *) buff; count--; buff += 4; - result += carry; - result += w; - carry = (w > result); - } while (count); - result += carry; + addc(result, w); + } result = (result & 0xffff) + (result >> 16); } if (len & 2) { @@ -77,7 +93,7 @@ result += le16_to_cpu(*buff); result = from32to16(result); if (odd) - result = ((result >> 8) & 0xff) | ((result & 0xff) << 8); + result = swab16(result); out: return result; } @@ -88,12 +104,8 @@ unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum) { unsigned int result = do_csum(buff, len); - - /* add in old sum, and carry.. */ - result += sum; - if(sum > result) - result += 1; - return result; + addc(result, sum); + return from32to16(result); } EXPORT_SYMBOL(csum_partial); diff -Nru a/arch/parisc/lib/debuglocks.c b/arch/parisc/lib/debuglocks.c --- a/arch/parisc/lib/debuglocks.c 2004-11-10 17:19:05 -08:00 +++ b/arch/parisc/lib/debuglocks.c 2004-11-10 17:19:05 -08:00 @@ -18,6 +18,11 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * We use pdc_printf() throughout the file for all output messages, to avoid + * losing messages because of disabled interrupts. Since we're using these + * messages for debugging purposes, it makes sense not to send them to the + * linux console. */ @@ -27,12 +32,15 @@ #include #include /* in_interrupt() */ #include +#include /* in_interrupt() */ +#include #undef INIT_STUCK #define INIT_STUCK 1L << 30 #ifdef CONFIG_DEBUG_SPINLOCK + void _dbg_spin_lock(spinlock_t * lock, const char *base_file, int line_no) { volatile unsigned int *a; @@ -59,12 +67,14 @@ * __ldcw() returns 1 if we get the lock; otherwise we * spin until the value of the lock changes, or we time out. */ + mb(); a = __ldcw_align(lock); while (stuck && (__ldcw(a) == 0)) while ((*a == 0) && --stuck); + mb(); if (unlikely(stuck <= 0)) { - printk(KERN_WARNING + pdc_printf( "%s:%d: spin_lock(%s/%p) stuck in %s at %p(%d)" " owned by %s:%d in %s at %p(%d)\n", base_file, line_no, lock->module, lock, @@ -84,7 +94,7 @@ lock->bline = line_no; if (unlikely(printed)) { - printk(KERN_WARNING + pdc_printf( "%s:%d: spin_lock grabbed in %s at %p(%d) %ld ticks\n", base_file, line_no, current->comm, inline_pc, cpu, jiffies - started); @@ -94,21 +104,28 @@ void _dbg_spin_unlock(spinlock_t * lock, const char *base_file, int line_no) { CHECK_LOCK(lock); - volatile unsigned int *a = __ldcw_align(lock); + volatile unsigned int *a; + mb(); + a = __ldcw_align(lock); if (unlikely((*a != 0) && lock->babble)) { lock->babble--; - printk(KERN_WARNING + pdc_printf( "%s:%d: spin_unlock(%s:%p) not locked\n", base_file, line_no, lock->module, lock); } *a = 1; + mb(); } int _dbg_spin_trylock(spinlock_t * lock, const char *base_file, int line_no) { int ret; - volatile unsigned int *a = __ldcw_align(lock); - if ((ret = (__ldcw(a) != 0))) { + volatile unsigned int *a; + mb(); + a = __ldcw_align(lock); + ret = (__ldcw(a) != 0); + mb(); + if (ret) { lock->oncpu = smp_processor_id(); lock->previous = __builtin_return_address(0); lock->task = current; @@ -150,7 +167,7 @@ int cpu = smp_processor_id(); if(unlikely(in_interrupt())) { /* acquiring write lock in interrupt context, bad idea */ - printk(KERN_WARNING "write_lock caller: %s:%d, IRQs enabled,\n", bfile, bline); + pdc_printf("write_lock caller: %s:%d, IRQs enabled,\n", bfile, bline); BUG(); } @@ -167,7 +184,7 @@ stuck--; if ((unlikely(stuck <= 0)) && (rw->counter < 0)) { - printk(KERN_WARNING + pdc_printf( "%s:%d: write_lock stuck on writer" " in %s at %p(%d) %ld ticks\n", bfile, bline, current->comm, inline_pc, @@ -176,7 +193,7 @@ printed = 1; } else if (unlikely(stuck <= 0)) { - printk(KERN_WARNING + pdc_printf( "%s:%d: write_lock stuck on reader" " in %s at %p(%d) %ld ticks\n", bfile, bline, current->comm, inline_pc, @@ -194,13 +211,47 @@ rw->counter = -1; /* remember we are locked */ if (unlikely(printed)) { - printk(KERN_WARNING + pdc_printf( "%s:%d: write_lock grabbed in %s at %p(%d) %ld ticks\n", bfile, bline, current->comm, inline_pc, cpu, jiffies - started); } } +int _dbg_write_trylock(rwlock_t *rw, const char *bfile, int bline) +{ +#if 0 + void *inline_pc = __builtin_return_address(0); + int cpu = smp_processor_id(); +#endif + + if(unlikely(in_interrupt())) { /* acquiring write lock in interrupt context, bad idea */ + pdc_printf("write_lock caller: %s:%d, IRQs enabled,\n", bfile, bline); + BUG(); + } + + /* Note: if interrupts are disabled (which is most likely), the printk + will never show on the console. We might need a polling method to flush + the dmesg buffer anyhow. */ + + _raw_spin_lock(&rw->lock); + + if(rw->counter != 0) { + /* this basically never happens */ + _raw_spin_unlock(&rw->lock); + + + return 0; + } + + /* got it. now leave without unlocking */ + rw->counter = -1; /* remember we are locked */ +#if 0 + pdc_printf("%s:%d: try write_lock grabbed in %s at %p(%d)\n", + bfile, bline, current->comm, inline_pc, cpu); +#endif +} + void _dbg_read_lock(rwlock_t * rw, const char *bfile, int bline) { #if 0 @@ -215,7 +266,7 @@ rw->counter++; #if 0 - printk(KERN_WARNING + pdc_printf( "%s:%d: read_lock grabbed in %s at %p(%d) %ld ticks\n", bfile, bline, current->comm, inline_pc, cpu, jiffies - started); diff -Nru a/arch/parisc/lib/fixup.S b/arch/parisc/lib/fixup.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/parisc/lib/fixup.S 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,89 @@ +/* + * Linux/PA-RISC Project (http://www.parisc-linux.org/) + * + * Copyright (C) 2004 Randolph Chung + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Fixup routines for kernel exception handling. + */ +#include +#include +#include +#include + +#ifdef CONFIG_SMP + .macro get_fault_ip t1 t2 + addil LT%__per_cpu_offset,%r27 + LDREG RT%__per_cpu_offset(%r1),\t1 + /* t2 = smp_processor_id() */ + mfctl 30,\t2 + ldw TI_CPU(\t2),\t2 +#ifdef __LP64__ + extrd,u \t2,63,32,\t2 +#endif + /* t2 = &__per_cpu_offset[smp_processor_id()]; */ + LDREG,s \t2(\t1),\t2 + addil LT%per_cpu__exception_data,%r27 + LDREG RT%per_cpu__exception_data(%r1),\t1 + /* t1 = &__get_cpu_var(exception_data) */ + add,l \t1,\t2,\t1 + /* t1 = t1->fault_ip */ + LDREG EXCDATA_IP(\t1), \t1 + .endm +#else + .macro get_fault_ip t1 t2 + /* t1 = &__get_cpu_var(exception_data) */ + addil LT%per_cpu__exception_data,%r27 + LDREG RT%per_cpu__exception_data(%r1),\t2 + /* t1 = t2->fault_ip */ + LDREG EXCDATA_IP(\t2), \t1 + .endm +#endif + + .text + .section .fixup, "ax" + + /* get_user() fixups, store -EFAULT in r8, and 0 in r9 */ + .export fixup_get_user_skip_1 +fixup_get_user_skip_1: + get_fault_ip %r1,%r8 + ldo 4(%r1), %r1 + ldi -EFAULT, %r8 + bv %r0(%r1) + copy %r0, %r9 + + .export fixup_get_user_skip_2 +fixup_get_user_skip_2: + get_fault_ip %r1,%r8 + ldo 8(%r1), %r1 + ldi -EFAULT, %r8 + bv %r0(%r1) + copy %r0, %r9 + + /* put_user() fixups, store -EFAULT in r8 */ + .export fixup_put_user_skip_1 +fixup_put_user_skip_1: + get_fault_ip %r1,%r8 + ldo 4(%r1), %r1 + bv %r0(%r1) + ldi -EFAULT, %r8 + + .export fixup_put_user_skip_2 +fixup_put_user_skip_2: + get_fault_ip %r1,%r8 + ldo 8(%r1), %r1 + bv %r0(%r1) + ldi -EFAULT, %r8 diff -Nru a/arch/parisc/lib/lusercopy.S b/arch/parisc/lib/lusercopy.S --- a/arch/parisc/lib/lusercopy.S 2004-11-10 17:19:02 -08:00 +++ b/arch/parisc/lib/lusercopy.S 2004-11-10 17:19:02 -08:00 @@ -53,124 +53,11 @@ mtsp %r1,%sr1 .endm - /* - * unsigned long - * lcopy_to_user(void *to, const void *from, unsigned long n) - * - * Returns 0 for success. - * otherwise, returns number of bytes not transferred. - */ - - .export lcopy_to_user,code -lcopy_to_user: - .proc - .callinfo NO_CALLS - .entry - comib,=,n 0,%r24,$lctu_done - get_sr -$lctu_loop: - ldbs,ma 1(%r25),%r1 - addib,<> -1,%r24,$lctu_loop -1: stbs,ma %r1,1(%sr1,%r26) -$lctu_done: - bv %r0(%r2) - copy %r24,%r28 - .exit - -2: b $lctu_done - ldo 1(%r24),%r24 - - .section __ex_table,"a" -#ifdef __LP64__ - .dword 1b,(2b-1b) -#else - .word 1b,(2b-1b) -#endif - .previous - - .procend - - /* - * unsigned long - * lcopy_from_user(void *to, const void *from, unsigned long n) - * - * Returns 0 for success. - * otherwise, returns number of bytes not transferred. - * - * NOTE: This routine will also zero any bytes in the - * destination that were not copied due to a fault. - * - */ - - .export lcopy_from_user,code -lcopy_from_user: - .proc - .callinfo NO_CALLS - .entry - comib,=,n 0,%r24,$lcfu_done - get_sr -$lcfu_loop: -1: ldbs,ma 1(%sr1,%r25),%r1 - addib,<> -1,%r24,$lcfu_loop - stbs,ma %r1,1(%r26) -$lcfu_done: - bv %r0(%r2) - copy %r24,%r28 - .exit - -2: copy %r24,%r23 -$lcfu_zero_loop: - addib,<> -1,%r23,$lcfu_zero_loop - stbs,ma %r0,1(%r26) - b $lcfu_done - nop - - .section __ex_table,"a" -#ifdef __LP64__ - .dword 1b,(2b-1b) -#else - .word 1b,(2b-1b) -#endif - .previous - - .procend - - /* - * unsigned long - * lcopy_in_user(void *to, const void *from, unsigned long n) - * - * Returns 0 for success. - * otherwise, returns number of bytes not transferred. - */ - - .export lcopy_in_user,code -lcopy_in_user: - .proc - .callinfo NO_CALLS - .entry - comib,=,n 0,%r24,$lciu_done - get_sr -$lciu_loop: - ldbs,ma 1(%sr1,%r25),%r1 - addib,<> -1,%r24,$lciu_loop -1: stbs,ma %r1,1(%sr1,%r26) -$lciu_done: - bv %r0(%r2) - copy %r24,%r28 - .exit - -2: b $lciu_done - ldo 1(%r24),%r24 - - .section __ex_table,"a" -#ifdef __LP64__ - .dword 1b,(2b-1b) -#else - .word 1b,(2b-1b) -#endif - .previous - - .procend + .macro fixup_branch lbl + ldil L%\lbl, %r1 + ldo R%\lbl(%r1), %r1 + bv %r0(%r1) + .endm /* * long lstrncpy_from_user(char *dst, const char *src, long n) @@ -201,16 +88,18 @@ nop .exit -3: b $lsfu_exit + .section .fixup,"ax" +3: fixup_branch $lsfu_exit ldi -EFAULT,%r28 + .previous - .section __ex_table,"a" + .section __ex_table,"aw" #ifdef __LP64__ - .dword 1b,(3b-1b) - .dword 2b,(3b-2b) + .dword 1b,3b + .dword 2b,3b #else - .word 1b,(3b-1b) - .word 2b,(3b-2b) + .word 1b,3b + .word 2b,3b #endif .previous @@ -239,14 +128,16 @@ copy %r25,%r28 .exit -2: b $lclu_done + .section .fixup,"ax" +2: fixup_branch $lclu_done ldo 1(%r25),%r25 + .previous - .section __ex_table,"a" + .section __ex_table,"aw" #ifdef __LP64__ - .dword 1b,(2b-1b) + .dword 1b,2b #else - .word 1b,(2b-1b) + .word 1b,2b #endif .previous @@ -282,16 +173,18 @@ b $lslen_done ldo 1(%r26),%r26 /* special case for N == 0 */ -3: b $lslen_done + .section .fixup,"ax" +3: fixup_branch $lslen_done copy %r24,%r26 /* reset r26 so 0 is returned on fault */ + .previous - .section __ex_table,"a" + .section __ex_table,"aw" #ifdef __LP64__ - .dword 1b,(3b-1b) - .dword 2b,(3b-2b) + .dword 1b,3b + .dword 2b,3b #else - .word 1b,(3b-1b) - .word 2b,(3b-2b) + .word 1b,3b + .word 2b,3b #endif .previous diff -Nru a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/parisc/lib/memcpy.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,530 @@ +/* + * Optimized memory copy routines. + * + * Copyright (C) 2004 Randolph Chung + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Portions derived from the GNU C Library + * Copyright (C) 1991, 1997, 2003 Free Software Foundation, Inc. + * + * Several strategies are tried to try to get the best performance for various + * conditions. In the optimal case, we copy 64-bytes in an unrolled loop using + * fp regs. This is followed by loops that copy 32- or 16-bytes at a time using + * general registers. Unaligned copies are handled either by aligning the + * destination and then using shift-and-write method, or in a few cases by + * falling back to a byte-at-a-time copy. + * + * I chose to implement this in C because it is easier to maintain and debug, + * and in my experiments it appears that the C code generated by gcc (3.3/3.4 + * at the time of writing) is fairly optimal. Unfortunately some of the + * semantics of the copy routine (exception handling) is difficult to express + * in C, so we have to play some tricks to get it to work. + * + * All the loads and stores are done via explicit asm() code in order to use + * the right space registers. + * + * Testing with various alignments and buffer sizes shows that this code is + * often >10x faster than a simple byte-at-a-time copy, even for strangely + * aligned operands. It is interesting to note that the glibc version + * of memcpy (written in C) is actually quite fast already. This routine is + * able to beat it by 30-40% for aligned copies because of the loop unrolling, + * but in some cases the glibc version is still slightly faster. This lends + * more credibility that gcc can generate very good code as long as we are + * careful. + * + * TODO: + * - cache prefetching needs more experimentation to get optimal settings + * - try not to use the post-increment address modifiers; they create additional + * interlocks + * - replace byte-copy loops with stybs sequences + */ + +#ifdef __KERNEL__ +#include +#include +#include +#include +#define s_space "%%sr1" +#define d_space "%%sr2" +#else +#include "memcpy.h" +#define s_space "%%sr0" +#define d_space "%%sr0" +#define pa_memcpy new2_copy +#endif + +DECLARE_PER_CPU(struct exception_data, exception_data); + +#define preserve_branch(label) do { \ + volatile int dummy; \ + /* The following branch is never taken, it's just here to */ \ + /* prevent gcc from optimizing away our exception code. */ \ + if (unlikely(dummy != dummy)) \ + goto label; \ +} while (0) + +#define get_user_space() (segment_eq(get_fs(), KERNEL_DS) ? 0 : mfsp(3)) +#define get_kernel_space() (0) + +#define MERGE(w0, sh_1, w1, sh_2) ({ \ + unsigned int _r; \ + asm volatile ( \ + "mtsar %3\n" \ + "shrpw %1, %2, %%sar, %0\n" \ + : "=r"(_r) \ + : "r"(w0), "r"(w1), "r"(sh_2) \ + ); \ + _r; \ +}) +#define THRESHOLD 16 + +#ifdef DEBUG_MEMCPY +#define DPRINTF(fmt, args...) do { printk(KERN_DEBUG "%s:%d:%s ", __FILE__, __LINE__, __FUNCTION__ ); printk(KERN_DEBUG fmt, ##args ); } while (0) +#else +#define DPRINTF(fmt, args...) +#endif + +#ifndef __LP64__ +#define EXC_WORD ".word" +#else +#define EXC_WORD ".dword" +#endif + +#define def_load_ai_insn(_insn,_sz,_tt,_s,_a,_t,_e) \ + __asm__ __volatile__ ( \ + "1:\t" #_insn ",ma " #_sz "(" _s ",%1), %0\n" \ + "\t.section __ex_table,\"aw\"\n" \ + "\t" EXC_WORD "\t1b\n" \ + "\t" EXC_WORD "\t" #_e "\n" \ + "\t.previous\n" \ + : _tt(_t), "+r"(_a) \ + : "1"(_a) \ + : "r8") + +#define def_store_ai_insn(_insn,_sz,_tt,_s,_a,_t,_e) \ + __asm__ __volatile__ ( \ + "1:\t" #_insn ",ma %1, " #_sz "(" _s ",%0)\n" \ + "\t.section __ex_table,\"aw\"\n" \ + "\t" EXC_WORD "\t1b\n" \ + "\t" EXC_WORD "\t" #_e "\n" \ + "\t.previous\n" \ + : "+r"(_a) \ + : _tt(_t), "0"(_a) \ + : "r8") + +#define ldbma(_s, _a, _t, _e) def_load_ai_insn(ldbs,1,"=r",_s,_a,_t,_e) +#define stbma(_s, _t, _a, _e) def_store_ai_insn(stbs,1,"r",_s,_a,_t,_e) +#define ldwma(_s, _a, _t, _e) def_load_ai_insn(ldw,4,"=r",_s,_a,_t,_e) +#define stwma(_s, _t, _a, _e) def_store_ai_insn(stw,4,"r",_s,_a,_t,_e) +#define flddma(_s, _a, _t, _e) def_load_ai_insn(fldd,8,"=f",_s,_a,_t,_e) +#define fstdma(_s, _t, _a, _e) def_store_ai_insn(fstd,8,"f",_s,_a,_t,_e) + +#define def_load_insn(_insn,_tt,_s,_o,_a,_t,_e) \ + __asm__ __volatile__ ( \ + "1:\t" #_insn " " #_o "(" _s ",%1), %0\n" \ + "\t.section __ex_table,\"aw\"\n" \ + "\t" EXC_WORD "\t1b\n" \ + "\t" EXC_WORD "\t" #_e "\n" \ + "\t.previous\n" \ + : _tt(_t) \ + : "r"(_a) \ + : "r8") + +#define def_store_insn(_insn,_tt,_s,_t,_o,_a,_e) \ + __asm__ __volatile__ ( \ + "1:\t" #_insn " %0, " #_o "(" _s ",%1)\n" \ + "\t.section __ex_table,\"aw\"\n" \ + "\t" EXC_WORD "\t1b\n" \ + "\t" EXC_WORD "\t" #_e "\n" \ + "\t.previous\n" \ + : \ + : _tt(_t), "r"(_a) \ + : "r8") + +#define ldw(_s,_o,_a,_t,_e) def_load_insn(ldw,"=r",_s,_o,_a,_t,_e) +#define stw(_s,_t,_o,_a,_e) def_store_insn(stw,"r",_s,_t,_o,_a,_e) + +#ifdef CONFIG_PREFETCH +extern inline void prefetch_src(const void *addr) +{ + __asm__("ldw 0(" s_space ",%0), %%r0" : : "r" (addr)); +} + +extern inline void prefetch_dst(const void *addr) +{ + __asm__("ldd 0(" d_space ",%0), %%r0" : : "r" (addr)); +} +#else +#define prefetch_src(addr) +#define prefetch_dst(addr) +#endif + +/* Copy from a not-aligned src to an aligned dst, using shifts. Handles 4 words + * per loop. This code is derived from glibc. + */ +static inline unsigned long copy_dstaligned(unsigned long dst, unsigned long src, unsigned long len, unsigned long o_dst, unsigned long o_src, unsigned long o_len) +{ + /* gcc complains that a2 and a3 may be uninitialized, but actually + * they cannot be. Initialize a2/a3 to shut gcc up. + */ + register unsigned int a0, a1, a2 = 0, a3 = 0; + int sh_1, sh_2; + struct exception_data *d; + + /* prefetch_src((const void *)src); */ + + /* Calculate how to shift a word read at the memory operation + aligned srcp to make it aligned for copy. */ + sh_1 = 8 * (src % sizeof(unsigned int)); + sh_2 = 8 * sizeof(unsigned int) - sh_1; + + /* Make src aligned by rounding it down. */ + src &= -sizeof(unsigned int); + + switch (len % 4) + { + case 2: + /* a1 = ((unsigned int *) src)[0]; + a2 = ((unsigned int *) src)[1]; */ + ldw(s_space, 0, src, a1, cda_ldw_exc); + ldw(s_space, 4, src, a2, cda_ldw_exc); + src -= 1 * sizeof(unsigned int); + dst -= 3 * sizeof(unsigned int); + len += 2; + goto do1; + case 3: + /* a0 = ((unsigned int *) src)[0]; + a1 = ((unsigned int *) src)[1]; */ + ldw(s_space, 0, src, a0, cda_ldw_exc); + ldw(s_space, 4, src, a1, cda_ldw_exc); + src -= 0 * sizeof(unsigned int); + dst -= 2 * sizeof(unsigned int); + len += 1; + goto do2; + case 0: + if (len == 0) + return 0; + /* a3 = ((unsigned int *) src)[0]; + a0 = ((unsigned int *) src)[1]; */ + ldw(s_space, 0, src, a3, cda_ldw_exc); + ldw(s_space, 4, src, a0, cda_ldw_exc); + src -=-1 * sizeof(unsigned int); + dst -= 1 * sizeof(unsigned int); + len += 0; + goto do3; + case 1: + /* a2 = ((unsigned int *) src)[0]; + a3 = ((unsigned int *) src)[1]; */ + ldw(s_space, 0, src, a2, cda_ldw_exc); + ldw(s_space, 4, src, a3, cda_ldw_exc); + src -=-2 * sizeof(unsigned int); + dst -= 0 * sizeof(unsigned int); + len -= 1; + if (len == 0) + goto do0; + goto do4; /* No-op. */ + } + + do + { + /* prefetch_src((const void *)(src + 4 * sizeof(unsigned int))); */ +do4: + /* a0 = ((unsigned int *) src)[0]; */ + ldw(s_space, 0, src, a0, cda_ldw_exc); + /* ((unsigned int *) dst)[0] = MERGE (a2, sh_1, a3, sh_2); */ + stw(d_space, MERGE (a2, sh_1, a3, sh_2), 0, dst, cda_stw_exc); +do3: + /* a1 = ((unsigned int *) src)[1]; */ + ldw(s_space, 4, src, a1, cda_ldw_exc); + /* ((unsigned int *) dst)[1] = MERGE (a3, sh_1, a0, sh_2); */ + stw(d_space, MERGE (a3, sh_1, a0, sh_2), 4, dst, cda_stw_exc); +do2: + /* a2 = ((unsigned int *) src)[2]; */ + ldw(s_space, 8, src, a2, cda_ldw_exc); + /* ((unsigned int *) dst)[2] = MERGE (a0, sh_1, a1, sh_2); */ + stw(d_space, MERGE (a0, sh_1, a1, sh_2), 8, dst, cda_stw_exc); +do1: + /* a3 = ((unsigned int *) src)[3]; */ + ldw(s_space, 12, src, a3, cda_ldw_exc); + /* ((unsigned int *) dst)[3] = MERGE (a1, sh_1, a2, sh_2); */ + stw(d_space, MERGE (a1, sh_1, a2, sh_2), 12, dst, cda_stw_exc); + + src += 4 * sizeof(unsigned int); + dst += 4 * sizeof(unsigned int); + len -= 4; + } + while (len != 0); + +do0: + /* ((unsigned int *) dst)[0] = MERGE (a2, sh_1, a3, sh_2); */ + stw(d_space, MERGE (a2, sh_1, a3, sh_2), 0, dst, cda_stw_exc); + + preserve_branch(handle_load_error); + preserve_branch(handle_store_error); + + return 0; + +handle_load_error: + __asm__ __volatile__ ("cda_ldw_exc:\n"); + d = &__get_cpu_var(exception_data); + DPRINTF("cda_ldw_exc: o_len=%lu fault_addr=%lu o_src=%lu ret=%lu\n", + o_len, d->fault_addr, o_src, o_len - d->fault_addr + o_src); + return o_len * 4 - d->fault_addr + o_src; + +handle_store_error: + __asm__ __volatile__ ("cda_stw_exc:\n"); + d = &__get_cpu_var(exception_data); + DPRINTF("cda_stw_exc: o_len=%lu fault_addr=%lu o_dst=%lu ret=%lu\n", + o_len, d->fault_addr, o_dst, o_len - d->fault_addr + o_dst); + return o_len * 4 - d->fault_addr + o_dst; +} + + +/* Returns 0 for success, otherwise, returns number of bytes not transferred. */ +unsigned long pa_memcpy(void *dstp, const void *srcp, unsigned long len) +{ + register unsigned long src, dst, t1, t2, t3; + register char *pcs, *pcd; + register unsigned int *pws, *pwd; + register double *pds, *pdd; + unsigned long ret = 0; + unsigned long o_dst, o_src, o_len; + struct exception_data *d; + + src = (unsigned long)srcp; + dst = (unsigned long)dstp; + pcs = (unsigned char *)srcp; + pcd = (unsigned char *)dstp; + + o_dst = dst; o_src = src; o_len = len; + + /* prefetch_src((const void *)srcp); */ + + if (len < THRESHOLD) + goto byte_copy; + + /* Check alignment */ + t1 = (src ^ dst); + if (unlikely(t1 & (sizeof(double)-1))) + goto unaligned_copy; + + /* src and dst have same alignment. */ + + /* Copy bytes till we are double-aligned. */ + t2 = src & (sizeof(double) - 1); + if (unlikely(t2 != 0)) { + t2 = sizeof(double) - t2; + while (t2 && len) { + /* *pcd++ = *pcs++; */ + ldbma(s_space, pcs, t3, pmc_load_exc); + len--; + stbma(d_space, t3, pcd, pmc_store_exc); + t2--; + } + } + + pds = (double *)pcs; + pdd = (double *)pcd; + + /* Copy 8 doubles at a time */ + while (len >= 8*sizeof(double)) { + register double r1, r2, r3, r4, r5, r6, r7, r8; + /* prefetch_src((char *)pds + L1_CACHE_BYTES); */ + flddma(s_space, pds, r1, pmc_load_exc); + flddma(s_space, pds, r2, pmc_load_exc); + flddma(s_space, pds, r3, pmc_load_exc); + flddma(s_space, pds, r4, pmc_load_exc); + fstdma(d_space, r1, pdd, pmc_store_exc); + fstdma(d_space, r2, pdd, pmc_store_exc); + fstdma(d_space, r3, pdd, pmc_store_exc); + fstdma(d_space, r4, pdd, pmc_store_exc); + +#if 0 + if (L1_CACHE_BYTES <= 32) + prefetch_src((char *)pds + L1_CACHE_BYTES); +#endif + flddma(s_space, pds, r5, pmc_load_exc); + flddma(s_space, pds, r6, pmc_load_exc); + flddma(s_space, pds, r7, pmc_load_exc); + flddma(s_space, pds, r8, pmc_load_exc); + fstdma(d_space, r5, pdd, pmc_store_exc); + fstdma(d_space, r6, pdd, pmc_store_exc); + fstdma(d_space, r7, pdd, pmc_store_exc); + fstdma(d_space, r8, pdd, pmc_store_exc); + len -= 8*sizeof(double); + } + + pws = (unsigned int *)pds; + pwd = (unsigned int *)pdd; + +word_copy: + while (len >= 8*sizeof(unsigned int)) { + register unsigned int r1,r2,r3,r4,r5,r6,r7,r8; + /* prefetch_src((char *)pws + L1_CACHE_BYTES); */ + ldwma(s_space, pws, r1, pmc_load_exc); + ldwma(s_space, pws, r2, pmc_load_exc); + ldwma(s_space, pws, r3, pmc_load_exc); + ldwma(s_space, pws, r4, pmc_load_exc); + stwma(d_space, r1, pwd, pmc_store_exc); + stwma(d_space, r2, pwd, pmc_store_exc); + stwma(d_space, r3, pwd, pmc_store_exc); + stwma(d_space, r4, pwd, pmc_store_exc); + + ldwma(s_space, pws, r5, pmc_load_exc); + ldwma(s_space, pws, r6, pmc_load_exc); + ldwma(s_space, pws, r7, pmc_load_exc); + ldwma(s_space, pws, r8, pmc_load_exc); + stwma(d_space, r5, pwd, pmc_store_exc); + stwma(d_space, r6, pwd, pmc_store_exc); + stwma(d_space, r7, pwd, pmc_store_exc); + stwma(d_space, r8, pwd, pmc_store_exc); + len -= 8*sizeof(unsigned int); + } + + while (len >= 4*sizeof(unsigned int)) { + register unsigned int r1,r2,r3,r4; + ldwma(s_space, pws, r1, pmc_load_exc); + ldwma(s_space, pws, r2, pmc_load_exc); + ldwma(s_space, pws, r3, pmc_load_exc); + ldwma(s_space, pws, r4, pmc_load_exc); + stwma(d_space, r1, pwd, pmc_store_exc); + stwma(d_space, r2, pwd, pmc_store_exc); + stwma(d_space, r3, pwd, pmc_store_exc); + stwma(d_space, r4, pwd, pmc_store_exc); + len -= 4*sizeof(unsigned int); + } + + pcs = (unsigned char *)pws; + pcd = (unsigned char *)pwd; + +byte_copy: + while (len) { + /* *pcd++ = *pcs++; */ + ldbma(s_space, pcs, t3, pmc_load_exc); + stbma(d_space, t3, pcd, pmc_store_exc); + len--; + } + + return 0; + +unaligned_copy: + /* possibly we are aligned on a word, but not on a double... */ + if (likely(t1 & (sizeof(unsigned int)-1)) == 0) { + t2 = src & (sizeof(unsigned int) - 1); + + if (unlikely(t2 != 0)) { + t2 = sizeof(unsigned int) - t2; + while (t2) { + /* *pcd++ = *pcs++; */ + ldbma(s_space, pcs, t3, pmc_load_exc); + stbma(d_space, t3, pcd, pmc_store_exc); + len--; + t2--; + } + } + + pws = (unsigned int *)pcs; + pwd = (unsigned int *)pcd; + goto word_copy; + } + + /* Align the destination. */ + if (unlikely((dst & (sizeof(unsigned int) - 1)) != 0)) { + t2 = sizeof(unsigned int) - (dst & (sizeof(unsigned int) - 1)); + while (t2) { + /* *pcd++ = *pcs++; */ + ldbma(s_space, pcs, t3, pmc_load_exc); + stbma(d_space, t3, pcd, pmc_store_exc); + len--; + t2--; + } + dst = (unsigned long)pcd; + src = (unsigned long)pcs; + } + + ret = copy_dstaligned(dst, src, len / sizeof(unsigned int), + o_dst, o_src, o_len); + if (ret) + return ret; + + pcs += (len & -sizeof(unsigned int)); + pcd += (len & -sizeof(unsigned int)); + len %= sizeof(unsigned int); + + preserve_branch(handle_load_error); + preserve_branch(handle_store_error); + + goto byte_copy; + +handle_load_error: + __asm__ __volatile__ ("pmc_load_exc:\n"); + d = &__get_cpu_var(exception_data); + DPRINTF("pmc_load_exc: o_len=%lu fault_addr=%lu o_src=%lu ret=%lu\n", + o_len, d->fault_addr, o_src, o_len - d->fault_addr + o_src); + return o_len - d->fault_addr + o_src; + +handle_store_error: + __asm__ __volatile__ ("pmc_store_exc:\n"); + d = &__get_cpu_var(exception_data); + DPRINTF("pmc_store_exc: o_len=%lu fault_addr=%lu o_dst=%lu ret=%lu\n", + o_len, d->fault_addr, o_dst, o_len - d->fault_addr + o_dst); + return o_len - d->fault_addr + o_dst; +} + +#ifdef __KERNEL__ +unsigned long copy_to_user(void __user *dst, const void *src, unsigned long len) +{ + mtsp(get_kernel_space(), 1); + mtsp(get_user_space(), 2); + return pa_memcpy((void __force *)dst, src, len); +} + +unsigned long copy_from_user(void *dst, const void __user *src, unsigned long len) +{ + mtsp(get_user_space(), 1); + mtsp(get_kernel_space(), 2); + return pa_memcpy(dst, (void __force *)src, len); +} + +unsigned long copy_in_user(void __user *dst, const void __user *src, unsigned long len) +{ + mtsp(get_user_space(), 1); + mtsp(get_user_space(), 2); + return pa_memcpy((void __force *)dst, (void __force *)src, len); +} + + +void * memcpy(void * dst,const void *src, size_t count) +{ + mtsp(get_kernel_space(), 1); + mtsp(get_kernel_space(), 2); + pa_memcpy(dst, src, count); + return dst; +} + +void bcopy(const void * srcp, void * destp, size_t count) +{ + mtsp(get_kernel_space(), 1); + mtsp(get_kernel_space(), 2); + pa_memcpy(destp, srcp, count); +} + +EXPORT_SYMBOL(copy_to_user); +EXPORT_SYMBOL(copy_from_user); +EXPORT_SYMBOL(copy_in_user); +EXPORT_SYMBOL(memcpy); +EXPORT_SYMBOL(bcopy); +#endif diff -Nru a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c --- a/arch/parisc/mm/fault.c 2004-11-10 17:19:06 -08:00 +++ b/arch/parisc/mm/fault.c 2004-11-10 17:19:06 -08:00 @@ -36,6 +36,9 @@ #define BITSSET 0x1c0 /* for identifying LDCW */ + +DEFINE_PER_CPU(struct exception_data, exception_data); + /* * parisc_acctyp(unsigned int inst) -- * Given a PA-RISC memory access instruction, determine if the @@ -230,17 +233,17 @@ no_context: if (!user_mode(regs)) { - fix = search_exception_tables(regs->iaoq[0]); if (fix) { + struct exception_data *d; - if (fix->skip & 1) - regs->gr[8] = -EFAULT; - if (fix->skip & 2) - regs->gr[9] = 0; + d = &__get_cpu_var(exception_data); + d->fault_ip = regs->iaoq[0]; + d->fault_space = regs->isr; + d->fault_addr = regs->ior; - regs->iaoq[0] += ((fix->skip) & ~3); + regs->iaoq[0] = ((fix->fixup) & ~3); /* * NOTE: In some cases the faulting instruction diff -Nru a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c --- a/arch/parisc/mm/init.c 2004-11-10 17:19:04 -08:00 +++ b/arch/parisc/mm/init.c 2004-11-10 17:19:04 -08:00 @@ -20,6 +20,7 @@ #include #include #include +#include /* for node_online_map */ #include #include @@ -750,7 +751,7 @@ #if PTRS_PER_PMD == 1 pmd = (pmd_t *)__pa(pg_dir); #else - pmd = (pmd_t *) (PAGE_MASK & pgd_val(*pg_dir)); + pmd = (pmd_t *) pgd_address(*pg_dir); /* * pmd is physical at this point @@ -761,7 +762,7 @@ pmd = (pmd_t *) __pa(pmd); } - pgd_val(*pg_dir) = _PAGE_TABLE | (unsigned long) pmd; + __pgd_val_set(*pg_dir, PxD_FLAG_PRESENT | PxD_FLAG_VALID | (unsigned long) pmd); #endif /* now change pmd to kernel virtual addresses */ @@ -771,11 +772,11 @@ * pg_table is physical at this point */ - pg_table = (pte_t *) (PAGE_MASK & pmd_val(*pmd)); + pg_table = (pte_t *) pmd_address(*pmd); if (!pg_table) pg_table = (pte_t *) __pa(get_zeroed_page(GFP_KERNEL)); - pmd_val(*pmd) = _PAGE_TABLE | (unsigned long) pg_table; + __pmd_val_set(*pmd, PxD_FLAG_PRESENT | PxD_FLAG_VALID | (unsigned long) pg_table); /* now change pg_table to kernel virtual addresses */ @@ -804,19 +805,21 @@ ZONE_DMA zone. */ zones_size[ZONE_DMA] = pmem_ranges[i].pages; - free_area_init_node(i, NODE_DATA(i), zones_size, - pmem_ranges[i].start_pfn, 0); - #ifdef CONFIG_DISCONTIGMEM + /* Need to initialize the pfnnid_map before we can initialize + the zone */ { int j; - for (j = (node_start_pfn(i) >> PFNNID_SHIFT); - j <= (node_end_pfn(i) >> PFNNID_SHIFT); + for (j = (pmem_ranges[i].start_pfn >> PFNNID_SHIFT); + j <= ((pmem_ranges[i].start_pfn + pmem_ranges[i].pages) >> PFNNID_SHIFT); j++) { pfnnid_map[j] = i; } } #endif + + free_area_init_node(i, NODE_DATA(i), zones_size, + pmem_ranges[i].start_pfn, NULL); } } diff -Nru a/arch/ppc/8xx_io/Kconfig b/arch/ppc/8xx_io/Kconfig --- a/arch/ppc/8xx_io/Kconfig 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc/8xx_io/Kconfig 2004-11-10 17:19:05 -08:00 @@ -74,37 +74,6 @@ Allocate large buffers for MPC8xx Etherenet. Increases throughput and decreases the likelihood of dropped packets, but costs memory. -config SMC2_UART - bool "Use SMC2 for UART" - help - If you would like to use SMC2 as a serial port, say Y here. - - If in doubt, say Y here. - -config ALTSMC2 - bool "Use Alternate SMC2 I/O (823/850)" - depends on SMC2_UART - help - If you have an MPC823 or MPC850 and would like to use the alternate - SMC2 for I/O, say Y here. - - If in doubt, say N here. - -config CONS_SMC2 - bool "Use SMC2 for Console" - depends on SMC2_UART - help - If you are going to have a serial console on your device and are - using SMC2 for your serial port, say Y here, else say N. - -config USE_SCC_IO - bool "Enable SCC2 and SCC3 for UART" - help - If your MPC8xx board has other SCC ports that you would like to use - for for a serial port, say Y here. - - If in doubt, say N here. - config HTDMSOUND bool "Embedded Planet HIOX Audio" depends on SOUND=y @@ -134,13 +103,36 @@ If in doubt, say N here. -config UCODE_PATCH - bool "I2C/SPI Microcode Patch" +choice + prompt "Microcode patch selection" + default NO_UCODE_PATCH + help + Help not implemented yet, coming soon. + +config NO_UCODE_PATCH + bool "None" + +config USB_SOF_UCODE_PATCH + bool "USB SOF patch" + help + Help not implemented yet, coming soon. + +config I2C_SPI_UCODE_PATCH + bool "I2C/SPI relocation patch" + help + Help not implemented yet, coming soon. + +config I2C_SPI_SMC1_UCODE_PATCH + bool "I2C/SPI/SMC1 relocation patch" help - Motorola releases microcode updates for their 8xx CPM modules. The - microcode update file has updates for IIC, SMC and USB. Currently only - the USB update is available by default, if the MPC8xx USB option is - enabled. If in doubt, say 'N' here. + Help not implemented yet, coming soon. + +endchoice + +config UCODE_PATCH + bool + default y + depends on !NO_UCODE_PATCH endmenu diff -Nru a/arch/ppc/8xx_io/Makefile b/arch/ppc/8xx_io/Makefile --- a/arch/ppc/8xx_io/Makefile 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc/8xx_io/Makefile 2004-11-10 17:19:07 -08:00 @@ -2,7 +2,7 @@ # Makefile for the linux MPC8xx ppc-specific parts of comm processor # -obj-y := commproc.o uart.o +obj-y := commproc.o obj-$(CONFIG_FEC_ENET) += fec.o obj-$(CONFIG_SCC_ENET) += enet.o diff -Nru a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c --- a/arch/ppc/8xx_io/commproc.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc/8xx_io/commproc.c 2004-11-10 17:19:04 -08:00 @@ -23,18 +23,20 @@ #include #include #include +#include #include #include #include #include +#include #include -#include #include #include #include #include #include #include +#include #include extern int get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep); @@ -51,68 +53,69 @@ void *dev_id; }; static struct cpm_action cpm_vecs[CPMVEC_NR]; -static void cpm_interrupt(int irq, void * dev, struct pt_regs * regs); -static void cpm_error_interrupt(void *, struct pt_regs * regs); +static irqreturn_t cpm_interrupt(int irq, void * dev, struct pt_regs * regs); +static irqreturn_t cpm_error_interrupt(int irq, void *dev, struct pt_regs * regs); static void alloc_host_memory(void); +/* Define a table of names to identify CPM interrupt handlers in + * /proc/interrupts. + */ +const char *cpm_int_name[] = + { "error", "PC4", "PC5", "SMC2", + "SMC1", "SPI", "PC6", "Timer 4", + "", "PC7", "PC8", "PC9", + "Timer 3", "", "PC10", "PC11", + "I2C", "RISC Timer", "Timer 2", "", + "IDMA2", "IDMA1", "SDMA error", "PC12", + "PC13", "Timer 1", "PC14", "SCC4", + "SCC3", "SCC2", "SCC1", "PC15" + }; -#if 1 -void -m8xx_cpm_reset(void) +static void +cpm_mask_irq(unsigned int irq) { - volatile immap_t *imp; - volatile cpm8xx_t *commproc; - - imp = (immap_t *)IMAP_ADDR; - commproc = (cpm8xx_t *)&imp->im_cpm; - -#ifdef CONFIG_UCODE_PATCH - /* Perform a reset. - */ - commproc->cp_cpcr = (CPM_CR_RST | CPM_CR_FLG); - - /* Wait for it. - */ - while (commproc->cp_cpcr & CPM_CR_FLG); + int cpm_vec = irq - CPM_IRQ_OFFSET; - cpm_load_patch(imp); -#endif + ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr &= ~(1 << cpm_vec); +} - /* Set SDMA Bus Request priority 5. - * On 860T, this also enables FEC priority 6. I am not sure - * this is what we realy want for some applications, but the - * manual recommends it. - * Bit 25, FAM can also be set to use FEC aggressive mode (860T). - */ - imp->im_siu_conf.sc_sdcr = 1; +static void +cpm_unmask_irq(unsigned int irq) +{ + int cpm_vec = irq - CPM_IRQ_OFFSET; - /* Reclaim the DP memory for our use. */ - m8xx_cpm_dpinit(); + ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr |= (1 << cpm_vec); +} - /* Tell everyone where the comm processor resides. - */ - cpmp = (cpm8xx_t *)commproc; +static void +cpm_ack(unsigned int irq) +{ + /* We do not need to do anything here. */ } -/* We used to do this earlier, but have to postpone as long as possible - * to ensure the kernel VM is now running. - */ static void -alloc_host_memory() +cpm_eoi(unsigned int irq) { - uint physaddr; + int cpm_vec = irq - CPM_IRQ_OFFSET; - /* Set the host page for allocation. - */ - host_buffer = (uint)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &physaddr); - host_end = host_buffer + PAGE_SIZE; + ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cisr = (1 << cpm_vec); } -#else + +struct hw_interrupt_type cpm_pic = { + .typename = " CPM ", + .enable = cpm_unmask_irq, + .disable = cpm_mask_irq, + .ack = cpm_ack, + .end = cpm_eoi, +}; + +extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); + void -m8xx_cpm_reset(uint host_page_addr) +m8xx_cpm_reset(uint bootpage) { volatile immap_t *imp; volatile cpm8xx_t *commproc; - pte_t *pte; + pte_t *pte; imp = (immap_t *)IMAP_ADDR; commproc = (cpm8xx_t *)&imp->im_cpm; @@ -134,40 +137,61 @@ * this is what we realy want for some applications, but the * manual recommends it. * Bit 25, FAM can also be set to use FEC aggressive mode (860T). - */ + */ imp->im_siu_conf.sc_sdcr = 1; /* Reclaim the DP memory for our use. */ m8xx_cpm_dpinit(); - /* Set the host page for allocation. - */ - host_buffer = host_page_addr; /* Host virtual page address */ - host_end = host_page_addr + PAGE_SIZE; + /* get the PTE for the bootpage */ + if (!get_pteptr(&init_mm, bootpage, &pte)) + panic("get_pteptr failed\n"); + + /* and make it uncachable */ + pte_val(*pte) |= _PAGE_NO_CACHE; + _tlbie(bootpage); - /* We need to get this page early, so I have to do it the - * hard way. - */ - if (get_pteptr(&init_mm, host_page_addr, &pte)) { - pte_val(*pte) |= _PAGE_NO_CACHE; - flush_tlb_page(init_mm.mmap, host_buffer); - } - else { - panic("Huh? No CPM host page?"); - } + host_buffer = bootpage; + host_end = host_buffer + PAGE_SIZE; /* Tell everyone where the comm processor resides. */ cpmp = (cpm8xx_t *)commproc; } -#endif + +/* We used to do this earlier, but have to postpone as long as possible + * to ensure the kernel VM is now running. + */ +static void +alloc_host_memory(void) +{ + dma_addr_t physaddr; + + /* Set the host page for allocation. + */ + host_buffer = (uint)dma_alloc_coherent(NULL, PAGE_SIZE, &physaddr, + GFP_KERNEL); + host_end = host_buffer + PAGE_SIZE; +} /* This is called during init_IRQ. We used to do it above, but this * was too early since init_IRQ was not yet called. */ +static struct irqaction cpm_error_irqaction = { + .handler = cpm_error_interrupt, + .mask = CPU_MASK_NONE, +}; +static struct irqaction cpm_interrupt_irqaction = { + .handler = cpm_interrupt, + .mask = CPU_MASK_NONE, + .name = "CPM cascade", +}; + void cpm_interrupt_init(void) { + int i; + /* Initialize the CPM interrupt controller. */ ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr = @@ -175,41 +199,52 @@ ((CPM_INTERRUPT/2) << 13) | CICR_HP_MASK; ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr = 0; - /* Set our interrupt handler with the core CPU. - */ - if (request_8xxirq(CPM_INTERRUPT, cpm_interrupt, 0, "cpm", NULL) != 0) + /* install the CPM interrupt controller routines for the CPM + * interrupt vectors + */ + for ( i = CPM_IRQ_OFFSET ; i < CPM_IRQ_OFFSET + NR_CPM_INTS ; i++ ) + irq_desc[i].handler = &cpm_pic; + + /* Set our interrupt handler with the core CPU. */ + if (setup_irq(CPM_INTERRUPT, &cpm_interrupt_irqaction)) panic("Could not allocate CPM IRQ!"); - /* Install our own error handler. - */ - cpm_install_handler(CPMVEC_ERROR, cpm_error_interrupt, NULL); + /* Install our own error handler. */ + cpm_error_irqaction.name = cpm_int_name[CPMVEC_ERROR]; + if (setup_irq(CPM_IRQ_OFFSET + CPMVEC_ERROR, &cpm_error_irqaction)) + panic("Could not allocate CPM error IRQ!"); + ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr |= CICR_IEN; } -/* CPM interrupt controller interrupt. -*/ -static void -cpm_interrupt(int irq, void * dev, struct pt_regs * regs) +/* + * Get the CPM interrupt vector. + */ +int +cpm_get_irq(struct pt_regs *regs) { - uint vec; + int cpm_vec; /* Get the vector by setting the ACK bit and then reading * the register. */ ((volatile immap_t *)IMAP_ADDR)->im_cpic.cpic_civr = 1; - vec = ((volatile immap_t *)IMAP_ADDR)->im_cpic.cpic_civr; - vec >>= 11; + cpm_vec = ((volatile immap_t *)IMAP_ADDR)->im_cpic.cpic_civr; + cpm_vec >>= 11; - if (cpm_vecs[vec].handler != 0) - (*cpm_vecs[vec].handler)(cpm_vecs[vec].dev_id, regs); - else - ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr &= ~(1 << vec); + return cpm_vec; +} - /* After servicing the interrupt, we have to remove the status - * indicator. +/* CPM interrupt controller cascade interrupt. +*/ +static irqreturn_t +cpm_interrupt(int irq, void * dev, struct pt_regs * regs) +{ + /* This interrupt handler never actually gets called. It is + * installed only to unmask the CPM cascade interrupt in the SIU + * and to make the CPM cascade interrupt visible in /proc/interrupts. */ - ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cisr = (1 << vec); - + return IRQ_HANDLED; } /* The CPM can generate the error interrupt when there is a race condition @@ -217,41 +252,73 @@ * and return. This is a no-op function so we don't need any special * tests in the interrupt handler. */ -static void -cpm_error_interrupt(void *dev, struct pt_regs *regs) +static irqreturn_t +cpm_error_interrupt(int irq, void *dev, struct pt_regs *regs) { + return IRQ_HANDLED; +} + +/* A helper function to translate the handler prototype required by + * request_irq() to the handler prototype required by cpm_install_handler(). + */ +static irqreturn_t +cpm_handler_helper(int irq, void *dev_id, struct pt_regs *regs) +{ + int cpm_vec = irq - CPM_IRQ_OFFSET; + + (*cpm_vecs[cpm_vec].handler)(dev_id, regs); + + return IRQ_HANDLED; } /* Install a CPM interrupt handler. -*/ + * This routine accepts a CPM interrupt vector in the range 0 to 31. + * This routine is retained for backward compatibility. Rather than using + * this routine to install a CPM interrupt handler, you can now use + * request_irq() with an IRQ in the range CPM_IRQ_OFFSET to + * CPM_IRQ_OFFSET + NR_CPM_INTS - 1 (16 to 47). + * + * Notice that the prototype of the interrupt handler function must be + * different depending on whether you install the handler with + * request_irq() or cpm_install_handler(). + */ void -cpm_install_handler(int vec, void (*handler)(void *, struct pt_regs *regs), +cpm_install_handler(int cpm_vec, void (*handler)(void *, struct pt_regs *regs), void *dev_id) { + int err; /* If null handler, assume we are trying to free the IRQ. */ if (!handler) { - cpm_free_handler(vec); + free_irq(CPM_IRQ_OFFSET + cpm_vec, dev_id); return; } - if (cpm_vecs[vec].handler != 0) - printk("CPM interrupt %x replacing %x\n", - (uint)handler, (uint)cpm_vecs[vec].handler); - cpm_vecs[vec].handler = handler; - cpm_vecs[vec].dev_id = dev_id; - ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr |= (1 << vec); + if (cpm_vecs[cpm_vec].handler != 0) + printk(KERN_INFO "CPM interrupt %x replacing %x\n", + (uint)handler, (uint)cpm_vecs[cpm_vec].handler); + cpm_vecs[cpm_vec].handler = handler; + cpm_vecs[cpm_vec].dev_id = dev_id; + + if ((err = request_irq(CPM_IRQ_OFFSET + cpm_vec, cpm_handler_helper, + 0, cpm_int_name[cpm_vec], dev_id))) + printk(KERN_ERR "request_irq() returned %d for CPM vector %d\n", + err, cpm_vec); } /* Free a CPM interrupt handler. -*/ + * This routine accepts a CPM interrupt vector in the range 0 to 31. + * This routine is retained for backward compatibility. + */ void -cpm_free_handler(int vec) +cpm_free_handler(int cpm_vec) { - cpm_vecs[vec].handler = NULL; - cpm_vecs[vec].dev_id = NULL; - ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr &= ~(1 << vec); + request_irq(CPM_IRQ_OFFSET + cpm_vec, NULL, 0, 0, + cpm_vecs[cpm_vec].dev_id); + + cpm_vecs[cpm_vec].handler = NULL; + cpm_vecs[cpm_vec].dev_id = NULL; } /* We also own one page of host buffer space for the allocation of @@ -262,10 +329,8 @@ { uint retloc; -#if 1 if (host_buffer == 0) alloc_host_memory(); -#endif if ((host_buffer + size) >= host_end) return(0); diff -Nru a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c --- a/arch/ppc/8xx_io/enet.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc/8xx_io/enet.c 2004-11-10 17:19:03 -08:00 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -581,10 +582,10 @@ /* Log any net taps. */ printk("%s: Promiscuous mode enabled.\n", dev->name); - cep->sccp->scc_pmsr |= SCC_PMSR_PRO; + cep->sccp->scc_psmr |= SCC_PSMR_PRO; } else { - cep->sccp->scc_pmsr &= ~SCC_PMSR_PRO; + cep->sccp->scc_psmr &= ~SCC_PSMR_PRO; if (dev->flags & IFF_ALLMULTI) { /* Catch all multicast addresses, so set the @@ -835,7 +836,8 @@ /* Allocate a page. */ - ba = (unsigned char *)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &mem_addr); + ba = (unsigned char *)dma_alloc_coherent(NULL, PAGE_SIZE, + &mem_addr, GFP_KERNEL); /* BUG: no check for failure */ /* Initialize the BD for every fragment in the page. @@ -889,7 +891,7 @@ /* Set processing mode. Use Ethernet CRC, catch broadcast, and * start frame search 22 bit times after RENA. */ - sccp->scc_pmsr = (SCC_PMSR_ENCRC | SCC_PMSR_NIB22); + sccp->scc_psmr = (SCC_PSMR_ENCRC | SCC_PSMR_NIB22); /* It is now OK to enable the Ethernet transmitter. * Unfortunately, there are board implementation differences here. diff -Nru a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c --- a/arch/ppc/8xx_io/fec.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/8xx_io/fec.c 2004-11-10 17:19:06 -08:00 @@ -1684,7 +1684,7 @@ /* Install our interrupt handler. */ - if (request_8xxirq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec", dev) != 0) + if (request_irq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec", dev) != 0) panic("Could not allocate FEC IRQ!"); #ifdef CONFIG_RPXCLASSIC @@ -1705,7 +1705,7 @@ ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel |= (0x80000000 >> PHY_INTERRUPT); - if (request_8xxirq(PHY_INTERRUPT, mii_link_interrupt, 0, "mii", dev) != 0) + if (request_irq(PHY_INTERRUPT, mii_link_interrupt, 0, "mii", dev) != 0) panic("Could not allocate MII IRQ!"); #endif diff -Nru a/arch/ppc/8xx_io/micropatch.c b/arch/ppc/8xx_io/micropatch.c --- a/arch/ppc/8xx_io/micropatch.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc/8xx_io/micropatch.c 2004-11-10 17:19:07 -08:00 @@ -19,18 +19,12 @@ #include #include -/* Define this to get SMC patches as well. You need to modify the uart - * driver as well...... -#define USE_SMC_PATCH 1 +/* + * I2C/SPI relocation patch arrays. */ -#ifdef CONFIG_USB_MPC8xx -#define USE_USB_SOF_PATCH -#endif +#ifdef CONFIG_I2C_SPI_UCODE_PATCH -#ifdef USE_IIC_PATCH -#define PATCH_DEFINED - /* IIC/SPI */ uint patch_2000[] = { 0x7FFFEFD9, 0x3FFD0000, @@ -183,11 +177,12 @@ }; #endif -#ifdef USE_SMC_PATCH -#define PATCH_DEFINED -/* SMC2/IIC/SPI Patch */ -/* This is the area from 0x2000 to 0x23ff. -*/ +/* + * I2C/SPI/SMC1 relocation patch arrays. + */ + +#ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH + uint patch_2000[] = { 0x3fff0000, 0x3ffd0000, @@ -511,8 +506,6 @@ 0x6079e2bb }; - /* This is from 0x2f00 to 0x2fff - */ uint patch_2f00[] = { 0x30303030, 0x3e3e3434, @@ -581,8 +574,6 @@ }; uint patch_2e00[] = { - /* This is from 0x2e00 to 0x2e3c - */ 0x27eeeeee, 0xeeeeeeee, 0xeeeeeeee, @@ -602,8 +593,12 @@ }; #endif -#ifdef USE_USB_SOF_PATCH -#define PATCH_DEFINED +/* + * USB SOF patch arrays. + */ + +#ifdef CONFIG_USB_SOF_UCODE_PATCH + uint patch_2000[] = { 0x7fff0000, 0x7ffd0000, @@ -626,33 +621,21 @@ }; #endif -/* Load the microcode patch. This is called early in the CPM initialization - * with the controller in the reset state. We enable the processor after - * we load the patch. - */ void cpm_load_patch(volatile immap_t *immr) { -#ifdef PATCH_DEFINED - volatile uint *dp; + volatile uint *dp; /* Dual-ported RAM. */ volatile cpm8xx_t *commproc; volatile iic_t *iip; volatile spi_t *spp; + volatile smc_uart_t *smp; int i; commproc = (cpm8xx_t *)&immr->im_cpm; - /* We work closely with commproc.c. We know it only allocates - * from data only space. - * For this particular patch, we only use the bottom 512 bytes - * and the upper 256 byte extension. We will use the space - * starting at 1K for the relocated parameters, as the general - * CPM allocation won't come from that area. - */ +#ifdef CONFIG_USB_SOF_UCODE_PATCH commproc->cp_rccr = 0; - /* Copy the patch into DPRAM. - */ dp = (uint *)(commproc->cp_dpmem); for (i=0; i<(sizeof(patch_2000)/4); i++) *dp++ = patch_2000[i]; @@ -661,29 +644,26 @@ for (i=0; i<(sizeof(patch_2f00)/4); i++) *dp++ = patch_2f00[i]; -#ifdef USE_USB_SOF_PATCH -#if 0 /* usb patch should not relocate iic */ - iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC]; -#define RPBASE 0x0030 - iip->iic_rpbase = RPBASE; + commproc->cp_rccr = 0x0009; - /* Put SPI above the IIC, also 32-byte aligned. - */ - i = (RPBASE + sizeof(iic_t) + 31) & ~31; - spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI]; - spp->spi_rpbase = i; -#endif + printk("USB SOF microcode patch installed\n"); +#endif /* CONFIG_USB_SOF_UCODE_PATCH */ - /* Enable uCode fetches from DPRAM. */ - commproc->cp_rccr = 0x0009; +#if defined(CONFIG_I2C_SPI_UCODE_PATCH) || \ + defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH) + + commproc->cp_rccr = 0; - printk("USB uCode patch installed\n"); -#endif /* USE_USB_SOF_PATCH */ + dp = (uint *)(commproc->cp_dpmem); + for (i=0; i<(sizeof(patch_2000)/4); i++) + *dp++ = patch_2000[i]; -#if defined(USE_SMC_PATCH) || defined(USE_IIC_PATCH) + dp = (uint *)&(commproc->cp_dpmem[0x0f00]); + for (i=0; i<(sizeof(patch_2f00)/4); i++) + *dp++ = patch_2f00[i]; iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC]; -#define RPBASE 0x0400 +# define RPBASE 0x0500 iip->iic_rpbase = RPBASE; /* Put SPI above the IIC, also 32-byte aligned. @@ -692,58 +672,46 @@ spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI]; spp->spi_rpbase = i; -#ifdef USE_SMC_PATCH +# if defined(CONFIG_I2C_SPI_UCODE_PATCH) + commproc->cp_cpmcr1 = 0x802a; + commproc->cp_cpmcr2 = 0x8028; + commproc->cp_cpmcr3 = 0x802e; + commproc->cp_cpmcr4 = 0x802c; + commproc->cp_rccr = 1; + + printk("I2C/SPI microcode patch installed.\n"); +# endif /* CONFIG_I2C_SPI_UCODE_PATCH */ + +# if defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH) + dp = (uint *)&(commproc->cp_dpmem[0x0e00]); for (i=0; i<(sizeof(patch_2e00)/4); i++) *dp++ = patch_2e00[i]; - /* Enable the traps to get to it. - */ commproc->cp_cpmcr1 = 0x8080; commproc->cp_cpmcr2 = 0x808a; commproc->cp_cpmcr3 = 0x8028; commproc->cp_cpmcr4 = 0x802a; - - /* Enable uCode fetches from DPRAM. - */ commproc->cp_rccr = 3; -#endif - -#ifdef USE_IIC_PATCH - /* Enable the traps to get to it. - */ - commproc->cp_cpmcr1 = 0x802a; - commproc->cp_cpmcr2 = 0x8028; - commproc->cp_cpmcr3 = 0x802e; - commproc->cp_cpmcr4 = 0x802c; - /* Enable uCode fetches from DPRAM. - */ - commproc->cp_rccr = 1; - - printk("I2C uCode patch installed\n"); -#endif + smp = (smc_uart_t *)&commproc->cp_dparam[PROFF_SMC1]; + smp->smc_rpbase = 0x1FC0; - /* Relocate the IIC and SPI parameter areas. These have to - * aligned on 32-byte boundaries. - */ - iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC]; - iip->iic_rpbase = RPBASE; - - /* Put SPI above the IIC, also 32-byte aligned. - */ - i = (RPBASE + sizeof(iic_t) + 31) & ~31; - spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI]; - spp->spi_rpbase = i; + printk("I2C/SPI/SMC1 microcode patch installed.\n"); +# endif /* CONFIG_I2C_SPI_SMC1_UCODE_PATCH) */ -#endif /* USE_SMC_PATCH || USE_IIC_PATCH */ -#endif /* PATCH_DEFINED */ +#endif /* some variation of the I2C/SPI patch was selected */ } +/* + * Take this entire routine out, since no one calls it and its + * logic is suspect. + */ + +#if 0 void verify_patch(volatile immap_t *immr) { -#ifdef PATCH_DEFINED volatile uint *dp; volatile cpm8xx_t *commproc; int i; @@ -772,6 +740,5 @@ } commproc->cp_rccr = 0x0009; -#endif /* PATCH_DEFINED */ } - +#endif diff -Nru a/arch/ppc/8xx_io/uart.c b/arch/ppc/8xx_io/uart.c --- a/arch/ppc/8xx_io/uart.c 2004-11-10 17:19:05 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,3004 +0,0 @@ -/* - * UART driver for MPC860 CPM SCC or SMC - * Copyright (c) 1997 Dan Malek (dmalek@jlc.net) - * - * I used the serial.c driver as the framework for this driver. - * Give credit to those guys. - * The original code was written for the MBX860 board. I tried to make - * it generic, but there may be some assumptions in the structures that - * have to be fixed later. - * To save porting time, I did not bother to change any object names - * that are not accessed outside of this file. - * It still needs lots of work........When it was easy, I included code - * to support the SCCs, but this has never been tested, nor is it complete. - * Only the SCCs support modem control, so that is not complete either. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_MAGIC_SYSRQ -#include -#endif - -#ifdef CONFIG_KGDB -#include -#endif - -#ifdef CONFIG_SERIAL_CONSOLE -#include - -/* this defines the index into rs_table for the port to use -*/ -# ifndef CONFIG_SERIAL_CONSOLE_PORT -# ifdef CONFIG_SCC3_ENET -# ifdef CONFIG_CONS_SMC2 -# define CONFIG_SERIAL_CONSOLE_PORT 0 /* Console on SMC2 is 1st port */ -# else -# error "Can't use SMC1 for console with Ethernet on SCC3" -# endif -# else /* ! CONFIG_SCC3_ENET */ -# ifdef CONFIG_CONS_SMC2 /* Console on SMC2 */ -# define CONFIG_SERIAL_CONSOLE_PORT 1 -# else /* Console on SMC1 */ -# define CONFIG_SERIAL_CONSOLE_PORT 0 -# endif /* CONFIG_CONS_SMC2 */ -# endif /* CONFIG_SCC3_ENET */ -# endif /* CONFIG_SERIAL_CONSOLE_PORT */ -#endif /* CONFIG_SERIAL_CONSOLE */ - -#if 0 -/* SCC2 for console -*/ -#undef CONFIG_SERIAL_CONSOLE_PORT -#define CONFIG_SERIAL_CONSOLE_PORT 2 -#endif - -#define TX_WAKEUP ASYNC_SHARE_IRQ - -static char *serial_name = "CPM UART driver"; -static char *serial_version = "0.03"; - -static DECLARE_TASK_QUEUE(tq_serial); - -static struct tty_driver *serial_driver; -static int serial_console_setup(struct console *co, char *options); - -static void serial_console_write(struct console *c, const char *s, - unsigned count); -static struct tty_driver *serial_console_device(struct console *c, int *index) - -#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -static unsigned long break_pressed; /* break, really ... */ -#endif - -/* - * Serial driver configuration section. Here are the various options: - */ -#define SERIAL_PARANOIA_CHECK -#define CONFIG_SERIAL_NOPAUSE_IO -#define SERIAL_DO_RESTART - -/* Set of debugging defines */ - -#undef SERIAL_DEBUG_INTR -#undef SERIAL_DEBUG_OPEN -#undef SERIAL_DEBUG_FLOW -#undef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT - -#define _INLINE_ inline - -#define DBG_CNT(s) - -/* We overload some of the items in the data structure to meet our - * needs. For example, the port address is the CPM parameter ram - * offset for the SCC or SMC. The maximum number of ports is 4 SCCs and - * 2 SMCs. The "hub6" field is used to indicate the channel number, with - * a flag indicating SCC or SMC, and the number is used as an index into - * the CPM parameter area for this device. - * The "type" field is currently set to 0, for PORT_UNKNOWN. It is - * not currently used. I should probably use it to indicate the port - * type of SMC or SCC. - * The SMCs do not support any modem control signals. - */ -#define smc_scc_num hub6 -#define NUM_IS_SCC ((int)0x00010000) -#define PORT_NUM(P) ((P) & 0x0000ffff) - -/* The choice of serial port to use for KGDB. If the system has - * two ports, you can use one for console and one for KGDB (which - * doesn't make sense to me, but people asked for it). - */ -#ifdef CONFIG_KGDB_TTYS1 -#define KGDB_SER_IDX 1 /* SCC2/SMC2 */ -#else -#define KGDB_SER_IDX 0 /* SCC1/SMC1 */ -#endif - -/* Processors other than the 860 only get SMCs configured by default. - * Either they don't have SCCs or they are allocated somewhere else. - * Of course, there are now 860s without some SCCs, so we will need to - * address that someday. - * The Embedded Planet Multimedia I/O cards use TDM interfaces to the - * stereo codec parts, and we use SMC2 to help support that. - */ -static struct serial_state rs_table[] = { - /* UART CLK PORT IRQ FLAGS NUM */ -#ifndef CONFIG_SCC3_ENET /* SMC1 not usable with Ethernet on SCC3 */ - { 0, 0, PROFF_SMC1, CPMVEC_SMC1, 0, 0 }, /* SMC1 ttyS0 */ -#endif -#if !defined(CONFIG_USB_MPC8xx) && !defined(CONFIG_USB_CLIENT_MPC8xx) -# ifdef CONFIG_SMC2_UART - { 0, 0, PROFF_SMC2, CPMVEC_SMC2, 0, 1 }, /* SMC2 ttyS1 */ -# endif -# ifdef CONFIG_USE_SCC_IO - { 0, 0, PROFF_SCC2, CPMVEC_SCC2, 0, (NUM_IS_SCC | 1) }, /* SCC2 ttyS2 */ - { 0, 0, PROFF_SCC3, CPMVEC_SCC3, 0, (NUM_IS_SCC | 2) }, /* SCC3 ttyS3 */ -# endif - #else /* CONFIG_USB_xxx */ -# ifdef CONFIG_USE_SCC_IO - { 0, 0, PROFF_SCC3, CPMVEC_SCC3, 0, (NUM_IS_SCC | 2) }, /* SCC3 ttyS3 */ -# endif -#endif /* CONFIG_USB_xxx */ -}; - -#define NR_PORTS (sizeof(rs_table)/sizeof(struct serial_state)) - -/* The number of buffer descriptors and their sizes. -*/ -#define RX_NUM_FIFO 4 -#define RX_BUF_SIZE 32 -#define TX_NUM_FIFO 4 -#define TX_BUF_SIZE 32 - -/* The async_struct in serial.h does not really give us what we - * need, so define our own here. - */ -typedef struct serial_info { - int magic; - int flags; - struct serial_state *state; - struct tty_struct *tty; - int read_status_mask; - int ignore_status_mask; - int timeout; - int line; - int x_char; /* xon/xoff character */ - int close_delay; - unsigned short closing_wait; - unsigned short closing_wait2; - unsigned long event; - unsigned long last_active; - int blocked_open; /* # of blocked opens */ - struct tq_struct tqueue; - struct tq_struct tqueue_hangup; - wait_queue_head_t open_wait; - wait_queue_head_t close_wait; - - /* CPM Buffer Descriptor pointers. - */ - cbd_t *rx_bd_base; - cbd_t *rx_cur; - cbd_t *tx_bd_base; - cbd_t *tx_cur; - - /* Virtual addresses for the FIFOs because we can't __va() a - * physical address anymore. - */ - unsigned char *rx_va_base; - unsigned char *tx_va_base; -} ser_info_t; - -static struct console sercons = { - .name = "ttyS", - .write = serial_console_write, - .device = serial_console_device, - .setup = serial_console_setup, - .flags = CON_PRINTBUFFER, - .index = CONFIG_SERIAL_CONSOLE_PORT, -}; - -static void change_speed(ser_info_t *info); -static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout); - -static inline int serial_paranoia_check(ser_info_t *info, - char *name, const char *routine) -{ -#ifdef SERIAL_PARANOIA_CHECK - static const char *badmagic = - "Warning: bad magic number for serial struct (%s) in %s\n"; - static const char *badinfo = - "Warning: null async_struct for (%s) in %s\n"; - - if (!info) { - printk(badinfo, name, routine); - return 1; - } - if (info->magic != SERIAL_MAGIC) { - printk(badmagic, name, routine); - return 1; - } -#endif - return 0; -} - -/* - * This is used to figure out the divisor speeds and the timeouts, - * indexed by the termio value. The generic CPM functions are responsible - * for setting and assigning baud rate generators for us. - */ -static int baud_table[] = { - 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, - 9600, 19200, 38400, 57600, 115200, 230400, 460800, 0 }; - - -/* - * ------------------------------------------------------------ - * rs_stop() and rs_start() - * - * This routines are called before setting or resetting tty->stopped. - * They enable or disable transmitter interrupts, as necessary. - * ------------------------------------------------------------ - */ -static void rs_8xx_stop(struct tty_struct *tty) -{ - ser_info_t *info = (ser_info_t *)tty->driver_data; - int idx; - unsigned long flags; - volatile scc_t *sccp; - volatile smc_t *smcp; - - if (serial_paranoia_check(info, tty->name, "rs_stop")) - return; - - save_flags(flags); cli(); - idx = PORT_NUM(info->state->smc_scc_num); - if (info->state->smc_scc_num & NUM_IS_SCC) { - sccp = &cpmp->cp_scc[idx]; - sccp->scc_sccm &= ~UART_SCCM_TX; - } - else { - smcp = &cpmp->cp_smc[idx]; - smcp->smc_smcm &= ~SMCM_TX; - } - restore_flags(flags); -} - -static void rs_8xx_start(struct tty_struct *tty) -{ - ser_info_t *info = (ser_info_t *)tty->driver_data; - int idx; - unsigned long flags; - volatile scc_t *sccp; - volatile smc_t *smcp; - - if (serial_paranoia_check(info, tty->name, "rs_stop")) - return; - - idx = PORT_NUM(info->state->smc_scc_num); - save_flags(flags); cli(); - if (info->state->smc_scc_num & NUM_IS_SCC) { - sccp = &cpmp->cp_scc[idx]; - sccp->scc_sccm |= UART_SCCM_TX; - } - else { - smcp = &cpmp->cp_smc[idx]; - smcp->smc_smcm |= SMCM_TX; - } - restore_flags(flags); -} - -/* - * ---------------------------------------------------------------------- - * - * Here starts the interrupt handling routines. All of the following - * subroutines are declared as inline and are folded into - * rs_interrupt(). They were separated out for readability's sake. - * - * Note: rs_interrupt() is a "fast" interrupt, which means that it - * runs with interrupts turned off. People who may want to modify - * rs_interrupt() should try to keep the interrupt handler as fast as - * possible. After you are done making modifications, it is not a bad - * idea to do: - * - * gcc -S -DKERNEL -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer serial.c - * - * and look at the resulting assemble code in serial.s. - * - * - Ted Ts'o (tytso@mit.edu), 7-Mar-93 - * ----------------------------------------------------------------------- - */ - -/* - * This routine is used by the interrupt handler to schedule - * processing in the software interrupt portion of the driver. - */ -static _INLINE_ void rs_sched_event(ser_info_t *info, - int event) -{ - info->event |= 1 << event; - queue_task(&info->tqueue, &tq_serial); - mark_bh(SERIAL_BH); -} - -static _INLINE_ void receive_chars(ser_info_t *info, struct pt_regs *regs) -{ - struct tty_struct *tty = info->tty; - unsigned char ch, *cp; - /*int ignored = 0;*/ - int i; - ushort status; - struct async_icount *icount; - volatile cbd_t *bdp; - - icount = &info->state->icount; - - /* Just loop through the closed BDs and copy the characters into - * the buffer. - */ - bdp = info->rx_cur; - for (;;) { - if (bdp->cbd_sc & BD_SC_EMPTY) /* If this one is empty */ - break; /* we are all done */ - - /* The read status mask tell us what we should do with - * incoming characters, especially if errors occur. - * One special case is the use of BD_SC_EMPTY. If - * this is not set, we are supposed to be ignoring - * inputs. In this case, just mark the buffer empty and - * continue. - if (!(info->read_status_mask & BD_SC_EMPTY)) { - bdp->cbd_sc |= BD_SC_EMPTY; - bdp->cbd_sc &= - ~(BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV); - - if (bdp->cbd_sc & BD_SC_WRAP) - bdp = info->rx_bd_base; - else - bdp++; - continue; - } - */ - - /* Get the number of characters and the buffer pointer. - */ - i = bdp->cbd_datlen; - cp = info->rx_va_base + ((bdp - info->rx_bd_base) * RX_BUF_SIZE); - status = bdp->cbd_sc; -#ifdef CONFIG_KGDB - if (info->state->smc_scc_num == KGDB_SER_IDX) { - if (*cp == 0x03 || *cp == '$') - breakpoint(); - return; - } -#endif - - /* Check to see if there is room in the tty buffer for - * the characters in our BD buffer. If not, we exit - * now, leaving the BD with the characters. We'll pick - * them up again on the next receive interrupt (which could - * be a timeout). - */ - if ((tty->flip.count + i) >= TTY_FLIPBUF_SIZE) - break; - - while (i-- > 0) { - ch = *cp++; - *tty->flip.char_buf_ptr = ch; - icount->rx++; - -#ifdef SERIAL_DEBUG_INTR - printk("DR%02x:%02x...", ch, status); -#endif - *tty->flip.flag_buf_ptr = 0; - if (status & (BD_SC_BR | BD_SC_FR | - BD_SC_PR | BD_SC_OV)) { - /* - * For statistics only - */ - if (status & BD_SC_BR) - icount->brk++; - else if (status & BD_SC_PR) - icount->parity++; - else if (status & BD_SC_FR) - icount->frame++; - if (status & BD_SC_OV) - icount->overrun++; - - /* - * Now check to see if character should be - * ignored, and mask off conditions which - * should be ignored. - if (status & info->ignore_status_mask) { - if (++ignored > 100) - break; - continue; - } - */ - status &= info->read_status_mask; - - if (status & (BD_SC_BR)) { -#ifdef SERIAL_DEBUG_INTR - printk("handling break...."); -#endif - *tty->flip.flag_buf_ptr = TTY_BREAK; - if (info->flags & ASYNC_SAK) - do_SAK(tty); - } else if (status & BD_SC_PR) - *tty->flip.flag_buf_ptr = TTY_PARITY; - else if (status & BD_SC_FR) - *tty->flip.flag_buf_ptr = TTY_FRAME; - if (status & BD_SC_OV) { - /* - * Overrun is special, since it's - * reported immediately, and doesn't - * affect the current character - */ - if (tty->flip.count < TTY_FLIPBUF_SIZE) { - tty->flip.count++; - tty->flip.flag_buf_ptr++; - tty->flip.char_buf_ptr++; - *tty->flip.flag_buf_ptr = - TTY_OVERRUN; - } - } - } -#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) - if (break_pressed && info->line == sercons.index) { - if (ch != 0 && time_before(jiffies, - break_pressed + HZ*5)) { - handle_sysrq(ch, regs, NULL); - break_pressed = 0; - goto ignore_char; - } else - break_pressed = 0; - } -#endif - if (tty->flip.count >= TTY_FLIPBUF_SIZE) - break; - - tty->flip.flag_buf_ptr++; - tty->flip.char_buf_ptr++; - tty->flip.count++; - } - -#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) - ignore_char: -#endif - /* This BD is ready to be used again. Clear status. - * Get next BD. - */ - bdp->cbd_sc |= BD_SC_EMPTY; - bdp->cbd_sc &= ~(BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV); - - if (bdp->cbd_sc & BD_SC_WRAP) - bdp = info->rx_bd_base; - else - bdp++; - } - info->rx_cur = (cbd_t *)bdp; - - queue_task(&tty->flip.tqueue, &tq_timer); -} - -static _INLINE_ void receive_break(ser_info_t *info, struct pt_regs *regs) -{ - struct tty_struct *tty = info->tty; - - info->state->icount.brk++; - -#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) - if (info->line == sercons.index) { - if (!break_pressed) { - break_pressed = jiffies; - return; - } else - break_pressed = 0; - } -#endif - - /* Check to see if there is room in the tty buffer for - * the break. If not, we exit now, losing the break. FIXME - */ - if ((tty->flip.count + 1) >= TTY_FLIPBUF_SIZE) - return; - *(tty->flip.flag_buf_ptr++) = TTY_BREAK; - *(tty->flip.char_buf_ptr++) = 0; - tty->flip.count++; - - queue_task(&tty->flip.tqueue, &tq_timer); -} - -static _INLINE_ void transmit_chars(ser_info_t *info, struct pt_regs *regs) -{ - - if ((info->flags & TX_WAKEUP) || - (info->tty->flags & (1 << TTY_DO_WRITE_WAKEUP))) { - rs_sched_event(info, RS_EVENT_WRITE_WAKEUP); - } - -#ifdef SERIAL_DEBUG_INTR - printk("THRE..."); -#endif -} - -#ifdef notdef - /* I need to do this for the SCCs, so it is left as a reminder. - */ -static _INLINE_ void check_modem_status(struct async_struct *info) -{ - int status; - struct async_icount *icount; - - status = serial_in(info, UART_MSR); - - if (status & UART_MSR_ANY_DELTA) { - icount = &info->state->icount; - /* update input line counters */ - if (status & UART_MSR_TERI) - icount->rng++; - if (status & UART_MSR_DDSR) - icount->dsr++; - if (status & UART_MSR_DDCD) { - icount->dcd++; -#ifdef CONFIG_HARD_PPS - if ((info->flags & ASYNC_HARDPPS_CD) && - (status & UART_MSR_DCD)) - hardpps(); -#endif - } - if (status & UART_MSR_DCTS) - icount->cts++; - wake_up_interruptible(&info->delta_msr_wait); - } - - if ((info->flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) { -#if (defined(SERIAL_DEBUG_OPEN) || defined(SERIAL_DEBUG_INTR)) - printk("ttys%d CD now %s...", info->line, - (status & UART_MSR_DCD) ? "on" : "off"); -#endif - if (status & UART_MSR_DCD) - wake_up_interruptible(&info->open_wait); - else { -#ifdef SERIAL_DEBUG_OPEN - printk("scheduling hangup..."); -#endif - schedule_task(&info->tqueue_hangup); - } - } - if (info->flags & ASYNC_CTS_FLOW) { - if (info->tty->hw_stopped) { - if (status & UART_MSR_CTS) { -#if (defined(SERIAL_DEBUG_INTR) || defined(SERIAL_DEBUG_FLOW)) - printk("CTS tx start..."); -#endif - info->tty->hw_stopped = 0; - info->IER |= UART_IER_THRI; - serial_out(info, UART_IER, info->IER); - rs_sched_event(info, RS_EVENT_WRITE_WAKEUP); - return; - } - } else { - if (!(status & UART_MSR_CTS)) { -#if (defined(SERIAL_DEBUG_INTR) || defined(SERIAL_DEBUG_FLOW)) - printk("CTS tx stop..."); -#endif - info->tty->hw_stopped = 1; - info->IER &= ~UART_IER_THRI; - serial_out(info, UART_IER, info->IER); - } - } - } -} -#endif - -/* - * This is the serial driver's interrupt routine for a single port - */ -static void rs_8xx_interrupt(void *dev_id, struct pt_regs *regs) -{ - u_char events; - int idx; - ser_info_t *info; - volatile smc_t *smcp; - volatile scc_t *sccp; - - info = (ser_info_t *)dev_id; - - idx = PORT_NUM(info->state->smc_scc_num); - if (info->state->smc_scc_num & NUM_IS_SCC) { - sccp = &cpmp->cp_scc[idx]; - events = sccp->scc_scce; - if (events & SMCM_BRKE) - receive_break(info, regs); - if (events & SCCM_RX) - receive_chars(info, regs); - if (events & SCCM_TX) - transmit_chars(info, regs); - sccp->scc_scce = events; - } - else { - smcp = &cpmp->cp_smc[idx]; - events = smcp->smc_smce; - if (events & SMCM_BRKE) - receive_break(info, regs); - if (events & SMCM_RX) - receive_chars(info, regs); - if (events & SMCM_TX) - transmit_chars(info, regs); - smcp->smc_smce = events; - } - -#ifdef SERIAL_DEBUG_INTR - printk("rs_interrupt_single(%d, %x)...", - info->state->smc_scc_num, events); -#endif -#ifdef modem_control - check_modem_status(info); -#endif - info->last_active = jiffies; -#ifdef SERIAL_DEBUG_INTR - printk("end.\n"); -#endif -} - - -/* - * ------------------------------------------------------------------- - * Here ends the serial interrupt routines. - * ------------------------------------------------------------------- - */ - -/* - * This routine is used to handle the "bottom half" processing for the - * serial driver, known also the "software interrupt" processing. - * This processing is done at the kernel interrupt level, after the - * rs_interrupt() has returned, BUT WITH INTERRUPTS TURNED ON. This - * is where time-consuming activities which can not be done in the - * interrupt driver proper are done; the interrupt driver schedules - * them using rs_sched_event(), and they get done here. - */ -static void do_serial_bh(void) -{ - run_task_queue(&tq_serial); -} - -static void do_softint(void *private_) -{ - ser_info_t *info = (ser_info_t *) private_; - struct tty_struct *tty; - - tty = info->tty; - if (!tty) - return; - - if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) { - if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && - tty->ldisc.write_wakeup) - (tty->ldisc.write_wakeup)(tty); - wake_up_interruptible(&tty->write_wait); - } -} - -/* - * This routine is called from the scheduler tqueue when the interrupt - * routine has signalled that a hangup has occurred. The path of - * hangup processing is: - * - * serial interrupt routine -> (scheduler tqueue) -> - * do_serial_hangup() -> tty->hangup() -> rs_hangup() - * - */ -static void do_serial_hangup(void *private_) -{ - struct async_struct *info = (struct async_struct *) private_; - struct tty_struct *tty; - - tty = info->tty; - if (tty) - tty_hangup(tty); -} - -/*static void rs_8xx_timer(void) -{ - printk("rs_8xx_timer\n"); -}*/ - - -static int startup(ser_info_t *info) -{ - unsigned long flags; - int retval=0; - int idx; - struct serial_state *state= info->state; - volatile smc_t *smcp; - volatile scc_t *sccp; - volatile smc_uart_t *up; - volatile scc_uart_t *scup; - - - save_flags(flags); cli(); - - if (info->flags & ASYNC_INITIALIZED) { - goto errout; - } - -#ifdef maybe - if (!state->port || !state->type) { - if (info->tty) - set_bit(TTY_IO_ERROR, &info->tty->flags); - goto errout; - } -#endif - -#ifdef SERIAL_DEBUG_OPEN - printk("starting up ttys%d (irq %d)...", info->line, state->irq); -#endif - - -#ifdef modem_control - info->MCR = 0; - if (info->tty->termios->c_cflag & CBAUD) - info->MCR = UART_MCR_DTR | UART_MCR_RTS; -#endif - - if (info->tty) - clear_bit(TTY_IO_ERROR, &info->tty->flags); - - /* - * and set the speed of the serial port - */ - change_speed(info); - - idx = PORT_NUM(info->state->smc_scc_num); - if (info->state->smc_scc_num & NUM_IS_SCC) { - sccp = &cpmp->cp_scc[idx]; - scup = (scc_uart_t *)&cpmp->cp_dparam[state->port]; - scup->scc_genscc.scc_mrblr = RX_BUF_SIZE; - scup->scc_maxidl = RX_BUF_SIZE; - sccp->scc_sccm |= (UART_SCCM_TX | UART_SCCM_RX); - sccp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT); - } - else { - smcp = &cpmp->cp_smc[idx]; - - /* Enable interrupts and I/O. - */ - smcp->smc_smcm |= (SMCM_RX | SMCM_TX); - smcp->smc_smcmr |= (SMCMR_REN | SMCMR_TEN); - - /* We can tune the buffer length and idle characters - * to take advantage of the entire incoming buffer size. - * If mrblr is something other than 1, maxidl has to be - * non-zero or we never get an interrupt. The maxidl - * is the number of character times we wait after reception - * of the last character before we decide no more characters - * are coming. - */ - up = (smc_uart_t *)&cpmp->cp_dparam[state->port]; - up->smc_mrblr = RX_BUF_SIZE; - up->smc_maxidl = RX_BUF_SIZE; - up->smc_brkcr = 1; /* number of break chars */ - } - - info->flags |= ASYNC_INITIALIZED; - restore_flags(flags); - return 0; - -errout: - restore_flags(flags); - return retval; -} - -/* - * This routine will shutdown a serial port; interrupts are disabled, and - * DTR is dropped if the hangup on close termio flag is on. - */ -static void shutdown(ser_info_t * info) -{ - unsigned long flags; - struct serial_state *state; - int idx; - volatile smc_t *smcp; - volatile scc_t *sccp; - - if (!(info->flags & ASYNC_INITIALIZED)) - return; - - state = info->state; - -#ifdef SERIAL_DEBUG_OPEN - printk("Shutting down serial port %d (irq %d)....", info->line, - state->irq); -#endif - - save_flags(flags); cli(); /* Disable interrupts */ - - idx = PORT_NUM(state->smc_scc_num); - if (state->smc_scc_num & NUM_IS_SCC) { - sccp = &cpmp->cp_scc[idx]; - sccp->scc_gsmrl &= ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT); -#ifdef CONFIG_SERIAL_CONSOLE - /* We can't disable the transmitter if this is the - * system console. - */ - if ((state - rs_table) != CONFIG_SERIAL_CONSOLE_PORT) -#endif - sccp->scc_sccm &= ~(UART_SCCM_TX | UART_SCCM_RX); - } - else { - smcp = &cpmp->cp_smc[idx]; - - /* Disable interrupts and I/O. - */ - smcp->smc_smcm &= ~(SMCM_RX | SMCM_TX); -#ifdef CONFIG_SERIAL_CONSOLE - /* We can't disable the transmitter if this is the - * system console. - */ - if ((state - rs_table) != CONFIG_SERIAL_CONSOLE_PORT) -#endif - smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN); - } - - if (info->tty) - set_bit(TTY_IO_ERROR, &info->tty->flags); - - info->flags &= ~ASYNC_INITIALIZED; - restore_flags(flags); -} - -/* - * This routine is called to set the UART divisor registers to match - * the specified baud rate for a serial port. - */ -static void change_speed(ser_info_t *info) -{ - int baud_rate; - unsigned cflag, cval, scval, prev_mode, new_mode; - int i, bits, sbits, idx; - unsigned long flags; - struct serial_state *state; - volatile smc_t *smcp; - volatile scc_t *sccp; - - if (!info->tty || !info->tty->termios) - return; - cflag = info->tty->termios->c_cflag; - - state = info->state; - - /* Character length programmed into the mode register is the - * sum of: 1 start bit, number of data bits, 0 or 1 parity bit, - * 1 or 2 stop bits, minus 1. - * The value 'bits' counts this for us. - */ - cval = 0; - scval = 0; - - /* byte size and parity */ - switch (cflag & CSIZE) { - case CS5: bits = 5; break; - case CS6: bits = 6; break; - case CS7: bits = 7; break; - case CS8: bits = 8; break; - /* Never happens, but GCC is too dumb to figure it out */ - default: bits = 8; break; - } - sbits = bits - 5; - - if (cflag & CSTOPB) { - cval |= SMCMR_SL; /* Two stops */ - scval |= SCU_PMSR_SL; - bits++; - } - if (cflag & PARENB) { - cval |= SMCMR_PEN; - scval |= SCU_PMSR_PEN; - bits++; - if (!(cflag & PARODD)) { - cval |= SMCMR_PM_EVEN; - scval |= (SCU_PMSR_REVP | SCU_PMSR_TEVP); - } - } - - /* Determine divisor based on baud rate */ - i = cflag & CBAUD; - if (i >= (sizeof(baud_table)/sizeof(int))) - baud_rate = 9600; - else - baud_rate = baud_table[i]; - - info->timeout = (TX_BUF_SIZE*HZ*bits); - info->timeout += HZ/50; /* Add .02 seconds of slop */ - -#ifdef modem_control - /* CTS flow control flag and modem status interrupts */ - info->IER &= ~UART_IER_MSI; - if (info->flags & ASYNC_HARDPPS_CD) - info->IER |= UART_IER_MSI; - if (cflag & CRTSCTS) { - info->flags |= ASYNC_CTS_FLOW; - info->IER |= UART_IER_MSI; - } else - info->flags &= ~ASYNC_CTS_FLOW; - if (cflag & CLOCAL) - info->flags &= ~ASYNC_CHECK_CD; - else { - info->flags |= ASYNC_CHECK_CD; - info->IER |= UART_IER_MSI; - } - serial_out(info, UART_IER, info->IER); -#endif - - /* - * Set up parity check flag - */ -#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) - - info->read_status_mask = (BD_SC_EMPTY | BD_SC_OV); - if (I_INPCK(info->tty)) - info->read_status_mask |= BD_SC_FR | BD_SC_PR; - if (I_BRKINT(info->tty) || I_PARMRK(info->tty)) - info->read_status_mask |= BD_SC_BR; - - /* - * Characters to ignore - */ - info->ignore_status_mask = 0; - if (I_IGNPAR(info->tty)) - info->ignore_status_mask |= BD_SC_PR | BD_SC_FR; - if (I_IGNBRK(info->tty)) { - info->ignore_status_mask |= BD_SC_BR; - /* - * If we're ignore parity and break indicators, ignore - * overruns too. (For real raw support). - */ - if (I_IGNPAR(info->tty)) - info->ignore_status_mask |= BD_SC_OV; - } - /* - * !!! ignore all characters if CREAD is not set - */ - if ((cflag & CREAD) == 0) - info->read_status_mask &= ~BD_SC_EMPTY; - save_flags(flags); cli(); - - /* Start bit has not been added (so don't, because we would just - * subtract it later), and we need to add one for the number of - * stops bits (there is always at least one). - */ - bits++; - idx = PORT_NUM(state->smc_scc_num); - if (state->smc_scc_num & NUM_IS_SCC) { - sccp = &cpmp->cp_scc[idx]; - new_mode = (sbits << 12) | scval; - prev_mode = sccp->scc_pmsr; - if (!(prev_mode & SCU_PMSR_PEN)) - /* If parity is disabled, mask out even/odd */ - prev_mode &= ~(SCU_PMSR_TPM|SCU_PMSR_RPM); - if (prev_mode != new_mode) - sccp->scc_pmsr = new_mode; - } - else { - smcp = &cpmp->cp_smc[idx]; - - /* Set the mode register. We want to keep a copy of the - * enables, because we want to put them back if they were - * present. - */ - prev_mode = smcp->smc_smcmr; - new_mode = smcr_mk_clen(bits) | cval | SMCMR_SM_UART; - new_mode |= (prev_mode & (SMCMR_REN | SMCMR_TEN)); - if (!(prev_mode & SMCMR_PEN)) - /* If parity is disabled, mask out even/odd */ - prev_mode &= ~SMCMR_PM_EVEN; - if (prev_mode != new_mode) - smcp->smc_smcmr = new_mode; - } - - m8xx_cpm_setbrg((state - rs_table), baud_rate); - - restore_flags(flags); -} - -static void rs_8xx_put_char(struct tty_struct *tty, unsigned char ch) -{ - ser_info_t *info = (ser_info_t *)tty->driver_data; - volatile cbd_t *bdp; - unsigned char *cp; - - if (serial_paranoia_check(info, tty->name, "rs_put_char")) - return; - - if (!tty) - return; - - bdp = info->tx_cur; - while (bdp->cbd_sc & BD_SC_READY); - - cp = info->tx_va_base + ((bdp - info->tx_bd_base) * TX_BUF_SIZE); - *cp = ch; - bdp->cbd_datlen = 1; - bdp->cbd_sc |= BD_SC_READY; - - /* Get next BD. - */ - if (bdp->cbd_sc & BD_SC_WRAP) - bdp = info->tx_bd_base; - else - bdp++; - - info->tx_cur = (cbd_t *)bdp; - -} - -static int rs_8xx_write(struct tty_struct * tty, - const unsigned char *buf, int count) -{ - int c, ret = 0; - ser_info_t *info = (ser_info_t *)tty->driver_data; - volatile cbd_t *bdp; - unsigned char *cp; - -#ifdef CONFIG_KGDB_CONSOLE - /* Try to let stub handle output. Returns true if it did. */ - if (kgdb_output_string(buf, count)) - return ret; -#endif - - if (serial_paranoia_check(info, tty->name, "rs_write")) - return 0; - - if (!tty) - return 0; - - bdp = info->tx_cur; - - while (1) { - c = min(count, TX_BUF_SIZE); - - if (c <= 0) - break; - - if (bdp->cbd_sc & BD_SC_READY) { - info->flags |= TX_WAKEUP; - break; - } - - cp = info->tx_va_base + ((bdp - info->tx_bd_base) * TX_BUF_SIZE); - memcpy((void *)cp, buf, c); - - bdp->cbd_datlen = c; - bdp->cbd_sc |= BD_SC_READY; - - buf += c; - count -= c; - ret += c; - - /* Get next BD. - */ - if (bdp->cbd_sc & BD_SC_WRAP) - bdp = info->tx_bd_base; - else - bdp++; - info->tx_cur = (cbd_t *)bdp; - } - return ret; -} - -static int rs_8xx_write_room(struct tty_struct *tty) -{ - ser_info_t *info = (ser_info_t *)tty->driver_data; - int ret; - - if (serial_paranoia_check(info, tty->name, "rs_write_room")) - return 0; - - if ((info->tx_cur->cbd_sc & BD_SC_READY) == 0) { - info->flags &= ~TX_WAKEUP; - ret = TX_BUF_SIZE; - } - else { - info->flags |= TX_WAKEUP; - ret = 0; - } - return ret; -} - -/* I could track this with transmit counters....maybe later. -*/ -static int rs_8xx_chars_in_buffer(struct tty_struct *tty) -{ - ser_info_t *info = (ser_info_t *)tty->driver_data; - - if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer")) - return 0; - return 0; -} - -static void rs_8xx_flush_buffer(struct tty_struct *tty) -{ - ser_info_t *info = (ser_info_t *)tty->driver_data; - - if (serial_paranoia_check(info, tty->name, "rs_flush_buffer")) - return; - - /* There is nothing to "flush", whatever we gave the CPM - * is on its way out. - */ - wake_up_interruptible(&tty->write_wait); - if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && - tty->ldisc.write_wakeup) - (tty->ldisc.write_wakeup)(tty); - info->flags &= ~TX_WAKEUP; -} - -/* - * This function is used to send a high-priority XON/XOFF character to - * the device - */ -static void rs_8xx_send_xchar(struct tty_struct *tty, char ch) -{ - volatile cbd_t *bdp; - unsigned char *cp; - - ser_info_t *info = (ser_info_t *)tty->driver_data; - - if (serial_paranoia_check(info, tty->name, "rs_send_char")) - return; - - bdp = info->tx_cur; - while (bdp->cbd_sc & BD_SC_READY); - - cp = info->tx_va_base + ((bdp - info->tx_bd_base) * TX_BUF_SIZE); - *cp = ch; - bdp->cbd_datlen = 1; - bdp->cbd_sc |= BD_SC_READY; - - /* Get next BD. - */ - if (bdp->cbd_sc & BD_SC_WRAP) - bdp = info->tx_bd_base; - else - bdp++; - - info->tx_cur = (cbd_t *)bdp; -} - -/* - * ------------------------------------------------------------ - * rs_throttle() - * - * This routine is called by the upper-layer tty layer to signal that - * incoming characters should be throttled. - * ------------------------------------------------------------ - */ -static void rs_8xx_throttle(struct tty_struct * tty) -{ - ser_info_t *info = (ser_info_t *)tty->driver_data; -#ifdef SERIAL_DEBUG_THROTTLE - char buf[64]; - - printk("throttle %s: %d....\n", _tty_name(tty, buf), - tty->ldisc.chars_in_buffer(tty)); -#endif - - if (serial_paranoia_check(info, tty->name, "rs_throttle")) - return; - - if (I_IXOFF(tty)) - rs_8xx_send_xchar(tty, STOP_CHAR(tty)); - -#ifdef modem_control - if (tty->termios->c_cflag & CRTSCTS) - info->MCR &= ~UART_MCR_RTS; - - cli(); - serial_out(info, UART_MCR, info->MCR); - sti(); -#endif -} - -static void rs_8xx_unthrottle(struct tty_struct * tty) -{ - ser_info_t *info = (ser_info_t *)tty->driver_data; -#ifdef SERIAL_DEBUG_THROTTLE - char buf[64]; - - printk("unthrottle %s: %d....\n", _tty_name(tty, buf), - tty->ldisc.chars_in_buffer(tty)); -#endif - - if (serial_paranoia_check(info, tty->name, "rs_unthrottle")) - return; - - if (I_IXOFF(tty)) { - if (info->x_char) - info->x_char = 0; - else - rs_8xx_send_xchar(tty, START_CHAR(tty)); - } -#ifdef modem_control - if (tty->termios->c_cflag & CRTSCTS) - info->MCR |= UART_MCR_RTS; - cli(); - serial_out(info, UART_MCR, info->MCR); - sti(); -#endif -} - -/* - * ------------------------------------------------------------ - * rs_ioctl() and friends - * ------------------------------------------------------------ - */ - -#ifdef maybe -/* - * get_lsr_info - get line status register info - * - * Purpose: Let user call ioctl() to get info when the UART physically - * is emptied. On bus types like RS485, the transmitter must - * release the bus after transmitting. This must be done when - * the transmit shift register is empty, not be done when the - * transmit holding register is empty. This functionality - * allows an RS485 driver to be written in user space. - */ -static int get_lsr_info(struct async_struct * info, unsigned int *value) -{ - unsigned char status; - unsigned int result; - - cli(); - status = serial_in(info, UART_LSR); - sti(); - result = ((status & UART_LSR_TEMT) ? TIOCSER_TEMT : 0); - return put_user(result,value); -} -#endif - -static int get_modem_info(ser_info_t *info, unsigned int *value) -{ - unsigned int result = 0; -#ifdef modem_control - unsigned char control, status; - - control = info->MCR; - cli(); - status = serial_in(info, UART_MSR); - sti(); - result = ((control & UART_MCR_RTS) ? TIOCM_RTS : 0) - | ((control & UART_MCR_DTR) ? TIOCM_DTR : 0) -#ifdef TIOCM_OUT1 - | ((control & UART_MCR_OUT1) ? TIOCM_OUT1 : 0) - | ((control & UART_MCR_OUT2) ? TIOCM_OUT2 : 0) -#endif - | ((status & UART_MSR_DCD) ? TIOCM_CAR : 0) - | ((status & UART_MSR_RI) ? TIOCM_RNG : 0) - | ((status & UART_MSR_DSR) ? TIOCM_DSR : 0) - | ((status & UART_MSR_CTS) ? TIOCM_CTS : 0); -#endif - return put_user(result,value); -} - -static int set_modem_info(ser_info_t *info, unsigned int cmd, - unsigned int *value) -{ - int error; - unsigned int arg; - - error = get_user(arg, value); - if (error) - return error; -#ifdef modem_control - switch (cmd) { - case TIOCMBIS: - if (arg & TIOCM_RTS) - info->MCR |= UART_MCR_RTS; - if (arg & TIOCM_DTR) - info->MCR |= UART_MCR_DTR; -#ifdef TIOCM_OUT1 - if (arg & TIOCM_OUT1) - info->MCR |= UART_MCR_OUT1; - if (arg & TIOCM_OUT2) - info->MCR |= UART_MCR_OUT2; -#endif - break; - case TIOCMBIC: - if (arg & TIOCM_RTS) - info->MCR &= ~UART_MCR_RTS; - if (arg & TIOCM_DTR) - info->MCR &= ~UART_MCR_DTR; -#ifdef TIOCM_OUT1 - if (arg & TIOCM_OUT1) - info->MCR &= ~UART_MCR_OUT1; - if (arg & TIOCM_OUT2) - info->MCR &= ~UART_MCR_OUT2; -#endif - break; - case TIOCMSET: - info->MCR = ((info->MCR & ~(UART_MCR_RTS | -#ifdef TIOCM_OUT1 - UART_MCR_OUT1 | - UART_MCR_OUT2 | -#endif - UART_MCR_DTR)) - | ((arg & TIOCM_RTS) ? UART_MCR_RTS : 0) -#ifdef TIOCM_OUT1 - | ((arg & TIOCM_OUT1) ? UART_MCR_OUT1 : 0) - | ((arg & TIOCM_OUT2) ? UART_MCR_OUT2 : 0) -#endif - | ((arg & TIOCM_DTR) ? UART_MCR_DTR : 0)); - break; - default: - return -EINVAL; - } - cli(); - serial_out(info, UART_MCR, info->MCR); - sti(); -#endif - return 0; -} - -/* Sending a break is a two step process on the SMC/SCC. It is accomplished - * by sending a STOP TRANSMIT command followed by a RESTART TRANSMIT - * command. We take advantage of the begin/end functions to make this - * happen. - */ -static ushort smc_chan_map[] = { - CPM_CR_CH_SMC1, - CPM_CR_CH_SMC2 -}; - -static ushort scc_chan_map[] = { - CPM_CR_CH_SCC1, - CPM_CR_CH_SCC2, - CPM_CR_CH_SCC3, - CPM_CR_CH_SCC4 -}; - -static void begin_break(ser_info_t *info) -{ - volatile cpm8xx_t *cp; - ushort chan; - int idx; - - cp = cpmp; - - idx = PORT_NUM(info->state->smc_scc_num); - if (info->state->smc_scc_num & NUM_IS_SCC) - chan = scc_chan_map[idx]; - else - chan = smc_chan_map[idx]; - cp->cp_cpcr = mk_cr_cmd(chan, CPM_CR_STOP_TX) | CPM_CR_FLG; - while (cp->cp_cpcr & CPM_CR_FLG); -} - -static void end_break(ser_info_t *info) -{ - volatile cpm8xx_t *cp; - ushort chan; - int idx; - - cp = cpmp; - - idx = PORT_NUM(info->state->smc_scc_num); - if (info->state->smc_scc_num & NUM_IS_SCC) - chan = scc_chan_map[idx]; - else - chan = smc_chan_map[idx]; - cp->cp_cpcr = mk_cr_cmd(chan, CPM_CR_RESTART_TX) | CPM_CR_FLG; - while (cp->cp_cpcr & CPM_CR_FLG); -} - -/* - * This routine sends a break character out the serial port. - */ -static void send_break(ser_info_t *info, int duration) -{ - current->state = TASK_INTERRUPTIBLE; -#ifdef SERIAL_DEBUG_SEND_BREAK - printk("rs_send_break(%d) jiff=%lu...", duration, jiffies); -#endif - begin_break(info); - schedule_timeout(duration); - end_break(info); -#ifdef SERIAL_DEBUG_SEND_BREAK - printk("done jiffies=%lu\n", jiffies); -#endif -} - - -static int rs_8xx_ioctl(struct tty_struct *tty, struct file * file, - unsigned int cmd, unsigned long arg) -{ - int error; - ser_info_t *info = (ser_info_t *)tty->driver_data; - int retval; - struct async_icount cnow; /* kernel counter temps */ - struct serial_icounter_struct *p_cuser; /* user space */ - - if (serial_paranoia_check(info, tty->name, "rs_ioctl")) - return -ENODEV; - - if ((cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) { - if (tty->flags & (1 << TTY_IO_ERROR)) - return -EIO; - } - - switch (cmd) { - case TCSBRK: /* SVID version: non-zero arg --> no break */ - retval = tty_check_change(tty); - if (retval) - return retval; - tty_wait_until_sent(tty, 0); - if (signal_pending(current)) - return -EINTR; - if (!arg) { - send_break(info, HZ/4); /* 1/4 second */ - if (signal_pending(current)) - return -EINTR; - } - return 0; - case TCSBRKP: /* support for POSIX tcsendbreak() */ - retval = tty_check_change(tty); - if (retval) - return retval; - tty_wait_until_sent(tty, 0); - if (signal_pending(current)) - return -EINTR; - send_break(info, arg ? arg*(HZ/10) : HZ/4); - if (signal_pending(current)) - return -EINTR; - return 0; - case TIOCSBRK: - retval = tty_check_change(tty); - if (retval) - return retval; - tty_wait_until_sent(tty, 0); - begin_break(info); - return 0; - case TIOCCBRK: - retval = tty_check_change(tty); - if (retval) - return retval; - end_break(info); - return 0; - case TIOCGSOFTCAR: - return put_user(C_CLOCAL(tty) ? 1 : 0, (int *) arg); - case TIOCSSOFTCAR: - error = get_user(arg, (unsigned int *) arg); - if (error) - return error; - tty->termios->c_cflag = - ((tty->termios->c_cflag & ~CLOCAL) | - (arg ? CLOCAL : 0)); - return 0; - case TIOCMGET: - return get_modem_info(info, (unsigned int *) arg); - case TIOCMBIS: - case TIOCMBIC: - case TIOCMSET: - return set_modem_info(info, cmd, (unsigned int *) arg); -#ifdef maybe - case TIOCSERGETLSR: /* Get line status register */ - return get_lsr_info(info, (unsigned int *) arg); -#endif - /* - * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change - * - mask passed in arg for lines of interest - * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking) - * Caller should use TIOCGICOUNT to see which one it was - */ - case TIOCMIWAIT: -#ifdef modem_control - cli(); - /* note the counters on entry */ - cprev = info->state->icount; - sti(); - while (1) { - interruptible_sleep_on(&info->delta_msr_wait); - /* see if a signal did it */ - if (signal_pending(current)) - return -ERESTARTSYS; - cli(); - cnow = info->state->icount; /* atomic copy */ - sti(); - if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr && - cnow.dcd == cprev.dcd && cnow.cts == cprev.cts) - return -EIO; /* no change => error */ - if ( ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) || - ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) || - ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) || - ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)) ) { - return 0; - } - cprev = cnow; - } - /* NOTREACHED */ -#else - return 0; -#endif - - /* - * Get counter of input serial line interrupts (DCD,RI,DSR,CTS) - * Return: write counters to the user passed counter struct - * NB: both 1->0 and 0->1 transitions are counted except for - * RI where only 0->1 is counted. - */ - case TIOCGICOUNT: - cli(); - cnow = info->state->icount; - sti(); - p_cuser = (struct serial_icounter_struct *) arg; - error = put_user(cnow.cts, &p_cuser->cts); - if (error) return error; - error = put_user(cnow.dsr, &p_cuser->dsr); - if (error) return error; - error = put_user(cnow.rng, &p_cuser->rng); - if (error) return error; - error = put_user(cnow.dcd, &p_cuser->dcd); - if (error) return error; - return 0; - - default: - return -ENOIOCTLCMD; - } - return 0; -} - -/* FIX UP modem control here someday...... -*/ -static void rs_8xx_set_termios(struct tty_struct *tty, struct termios *old_termios) -{ - ser_info_t *info = (ser_info_t *)tty->driver_data; - - if ( (tty->termios->c_cflag == old_termios->c_cflag) - && ( RELEVANT_IFLAG(tty->termios->c_iflag) - == RELEVANT_IFLAG(old_termios->c_iflag))) - return; - - change_speed(info); - -#ifdef modem_control - /* Handle transition to B0 status */ - if ((old_termios->c_cflag & CBAUD) && - !(tty->termios->c_cflag & CBAUD)) { - info->MCR &= ~(UART_MCR_DTR|UART_MCR_RTS); - cli(); - serial_out(info, UART_MCR, info->MCR); - sti(); - } - - /* Handle transition away from B0 status */ - if (!(old_termios->c_cflag & CBAUD) && - (tty->termios->c_cflag & CBAUD)) { - info->MCR |= UART_MCR_DTR; - if (!tty->hw_stopped || - !(tty->termios->c_cflag & CRTSCTS)) { - info->MCR |= UART_MCR_RTS; - } - cli(); - serial_out(info, UART_MCR, info->MCR); - sti(); - } - - /* Handle turning off CRTSCTS */ - if ((old_termios->c_cflag & CRTSCTS) && - !(tty->termios->c_cflag & CRTSCTS)) { - tty->hw_stopped = 0; - rs_8xx_start(tty); - } -#endif - -#if 0 - /* - * No need to wake up processes in open wait, since they - * sample the CLOCAL flag once, and don't recheck it. - * XXX It's not clear whether the current behavior is correct - * or not. Hence, this may change..... - */ - if (!(old_termios->c_cflag & CLOCAL) && - (tty->termios->c_cflag & CLOCAL)) - wake_up_interruptible(&info->open_wait); -#endif -} - -/* - * ------------------------------------------------------------ - * rs_close() - * - * This routine is called when the serial port gets closed. First, we - * wait for the last remaining data to be sent. Then, we unlink its - * async structure from the interrupt chain if necessary, and we free - * that IRQ if nothing is left in the chain. - * ------------------------------------------------------------ - */ -static void rs_8xx_close(struct tty_struct *tty, struct file * filp) -{ - ser_info_t *info = (ser_info_t *)tty->driver_data; - struct serial_state *state; - unsigned long flags; - int idx; - volatile smc_t *smcp; - volatile scc_t *sccp; - - if (!info || serial_paranoia_check(info, tty->name, "rs_close")) - return; - - state = info->state; - - save_flags(flags); cli(); - - if (tty_hung_up_p(filp)) { - DBG_CNT("before DEC-hung"); - restore_flags(flags); - return; - } - -#ifdef SERIAL_DEBUG_OPEN - printk("rs_close ttys%d, count = %d\n", info->line, state->count); -#endif - if ((tty->count == 1) && (state->count != 1)) { - /* - * Uh, oh. tty->count is 1, which means that the tty - * structure will be freed. state->count should always - * be one in these conditions. If it's greater than - * one, we've got real problems, since it means the - * serial port won't be shutdown. - */ - printk("rs_close: bad serial port count; tty->count is 1, " - "state->count is %d\n", state->count); - state->count = 1; - } - if (--state->count < 0) { - printk("rs_close: bad serial port count for ttys%d: %d\n", - info->line, state->count); - state->count = 0; - } - if (state->count) { - DBG_CNT("before DEC-2"); - restore_flags(flags); - return; - } - info->flags |= ASYNC_CLOSING; - /* - * Now we wait for the transmit buffer to clear; and we notify - * the line discipline to only process XON/XOFF characters. - */ - tty->closing = 1; - if (info->closing_wait != ASYNC_CLOSING_WAIT_NONE) - tty_wait_until_sent(tty, info->closing_wait); - /* - * At this point we stop accepting input. To do this, we - * disable the receive line status interrupts, and tell the - * interrupt driver to stop checking the data ready bit in the - * line status register. - */ - info->read_status_mask &= ~BD_SC_EMPTY; - if (info->flags & ASYNC_INITIALIZED) { - idx = PORT_NUM(info->state->smc_scc_num); - if (info->state->smc_scc_num & NUM_IS_SCC) { - sccp = &cpmp->cp_scc[idx]; - sccp->scc_sccm &= ~UART_SCCM_RX; - sccp->scc_gsmrl &= ~SCC_GSMRL_ENR; - } - else { - smcp = &cpmp->cp_smc[idx]; - smcp->smc_smcm &= ~SMCM_RX; - smcp->smc_smcmr &= ~SMCMR_REN; - } - /* - * Before we drop DTR, make sure the UART transmitter - * has completely drained; this is especially - * important if there is a transmit FIFO! - */ - rs_8xx_wait_until_sent(tty, info->timeout); - } - shutdown(info); - if (tty->driver->flush_buffer) - tty->driver->flush_buffer(tty); - if (tty->ldisc.flush_buffer) - tty->ldisc.flush_buffer(tty); - tty->closing = 0; - info->event = 0; - info->tty = 0; - if (info->blocked_open) { - if (info->close_delay) { - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(info->close_delay); - } - wake_up_interruptible(&info->open_wait); - } - info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); - wake_up_interruptible(&info->close_wait); - restore_flags(flags); -} - -/* - * rs_wait_until_sent() --- wait until the transmitter is empty - */ -static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout) -{ - ser_info_t *info = (ser_info_t *)tty->driver_data; - unsigned long orig_jiffies, char_time; - /*int lsr;*/ - volatile cbd_t *bdp; - - if (serial_paranoia_check(info, tty->name, "rs_wait_until_sent")) - return; - -#ifdef maybe - if (info->state->type == PORT_UNKNOWN) - return; -#endif - - orig_jiffies = jiffies; - /* - * Set the check interval to be 1/5 of the estimated time to - * send a single character, and make it at least 1. The check - * interval should also be less than the timeout. - * - * Note: we have to use pretty tight timings here to satisfy - * the NIST-PCTS. - */ - char_time = 1; - if (timeout) - char_time = min(char_time, timeout); -#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT - printk("In rs_wait_until_sent(%d) check=%lu...", timeout, char_time); - printk("jiff=%lu...", jiffies); -#endif - - /* We go through the loop at least once because we can't tell - * exactly when the last character exits the shifter. There can - * be at least two characters waiting to be sent after the buffers - * are empty. - */ - do { -#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT - printk("lsr = %d (jiff=%lu)...", lsr, jiffies); -#endif - current->state = TASK_INTERRUPTIBLE; -/* current->dyn_prio = 0; make us low-priority */ - schedule_timeout(char_time); - if (signal_pending(current)) - break; - if (timeout && time_after(jiffies, orig_jiffies + timeout)) - break; - - /* The 'tx_cur' is really the next buffer to send. We - * have to back up to the previous BD and wait for it - * to go. This isn't perfect, because all this indicates - * is the buffer is available. There are still characters - * in the CPM FIFO. - */ - bdp = info->tx_cur; - if (bdp == info->tx_bd_base) - bdp += (TX_NUM_FIFO-1); - else - bdp--; - } while (bdp->cbd_sc & BD_SC_READY); - current->state = TASK_RUNNING; -#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT - printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies); -#endif -} - -/* - * rs_hangup() --- called by tty_hangup() when a hangup is signaled. - */ -static void rs_8xx_hangup(struct tty_struct *tty) -{ - ser_info_t *info = (ser_info_t *)tty->driver_data; - struct serial_state *state = info->state; - - if (serial_paranoia_check(info, tty->name, "rs_hangup")) - return; - - state = info->state; - - rs_8xx_flush_buffer(tty); - shutdown(info); - info->event = 0; - state->count = 0; - info->flags &= ~ASYNC_NORMAL_ACTIVE; - info->tty = 0; - wake_up_interruptible(&info->open_wait); -} - -/* - * ------------------------------------------------------------ - * rs_open() and friends - * ------------------------------------------------------------ - */ -static int block_til_ready(struct tty_struct *tty, struct file * filp, - ser_info_t *info) -{ -#ifdef DO_THIS_LATER - DECLARE_WAITQUEUE(wait, current); -#endif - struct serial_state *state = info->state; - int retval; - int do_clocal = 0; - - /* - * If the device is in the middle of being closed, then block - * until it's done, and then try again. - */ - if (tty_hung_up_p(filp) || - (info->flags & ASYNC_CLOSING)) { - if (info->flags & ASYNC_CLOSING) - interruptible_sleep_on(&info->close_wait); -#ifdef SERIAL_DO_RESTART - if (info->flags & ASYNC_HUP_NOTIFY) - return -EAGAIN; - else - return -ERESTARTSYS; -#else - return -EAGAIN; -#endif - } - - /* - * If non-blocking mode is set, or the port is not enabled, - * then make the check up front and then exit. - * If this is an SMC port, we don't have modem control to wait - * for, so just get out here. - */ - if ((filp->f_flags & O_NONBLOCK) || - (tty->flags & (1 << TTY_IO_ERROR)) || - !(info->state->smc_scc_num & NUM_IS_SCC)) { - info->flags |= ASYNC_NORMAL_ACTIVE; - return 0; - } - - if (tty->termios->c_cflag & CLOCAL) - do_clocal = 1; - - /* - * Block waiting for the carrier detect and the line to become - * free (i.e., not in use by the callout). While we are in - * this loop, state->count is dropped by one, so that - * rs_close() knows when to free things. We restore it upon - * exit, either normal or abnormal. - */ - retval = 0; -#ifdef DO_THIS_LATER - add_wait_queue(&info->open_wait, &wait); -#ifdef SERIAL_DEBUG_OPEN - printk("block_til_ready before block: ttys%d, count = %d\n", - state->line, state->count); -#endif - cli(); - if (!tty_hung_up_p(filp)) - state->count--; - sti(); - info->blocked_open++; - while (1) { - cli(); - if ((tty->termios->c_cflag & CBAUD)) - serial_out(info, UART_MCR, - serial_inp(info, UART_MCR) | - (UART_MCR_DTR | UART_MCR_RTS)); - sti(); - set_current_state(TASK_INTERRUPTIBLE); - if (tty_hung_up_p(filp) || - !(info->flags & ASYNC_INITIALIZED)) { -#ifdef SERIAL_DO_RESTART - if (info->flags & ASYNC_HUP_NOTIFY) - retval = -EAGAIN; - else - retval = -ERESTARTSYS; -#else - retval = -EAGAIN; -#endif - break; - } - if (!(info->flags & ASYNC_CLOSING) && - (do_clocal || (serial_in(info, UART_MSR) & - UART_MSR_DCD))) - break; - if (signal_pending(current)) { - retval = -ERESTARTSYS; - break; - } -#ifdef SERIAL_DEBUG_OPEN - printk("block_til_ready blocking: ttys%d, count = %d\n", - info->line, state->count); -#endif - schedule(); - } - current->state = TASK_RUNNING; - remove_wait_queue(&info->open_wait, &wait); - if (!tty_hung_up_p(filp)) - state->count++; - info->blocked_open--; -#ifdef SERIAL_DEBUG_OPEN - printk("block_til_ready after blocking: ttys%d, count = %d\n", - info->line, state->count); -#endif -#endif /* DO_THIS_LATER */ - if (retval) - return retval; - info->flags |= ASYNC_NORMAL_ACTIVE; - return 0; -} - -static int get_async_struct(int line, ser_info_t **ret_info) -{ - struct serial_state *sstate; - - sstate = rs_table + line; - if (sstate->info) { - sstate->count++; - *ret_info = (ser_info_t *)sstate->info; - return 0; - } - else { - return -ENOMEM; - } -} - -/* - * This routine is called whenever a serial port is opened. It - * enables interrupts for a serial port, linking in its async structure into - * the IRQ chain. It also performs the serial-specific - * initialization for the tty structure. - */ -static int rs_8xx_open(struct tty_struct *tty, struct file * filp) -{ - ser_info_t *info; - int retval, line; - - line = tty->index; - if ((line < 0) || (line >= NR_PORTS)) - return -ENODEV; - retval = get_async_struct(line, &info); - if (retval) - return retval; - if (serial_paranoia_check(info, tty->name, "rs_open")) - return -ENODEV; - -#ifdef SERIAL_DEBUG_OPEN - printk("rs_open %s, count = %d\n", tty->name, info->state->count); -#endif - tty->driver_data = info; - info->tty = tty; - - /* - * Start up serial port - */ - retval = startup(info); - if (retval) - return retval; - - retval = block_til_ready(tty, filp, info); - if (retval) { -#ifdef SERIAL_DEBUG_OPEN - printk("rs_open returning after block_til_ready with %d\n", - retval); -#endif - return retval; - } - -#ifdef SERIAL_DEBUG_OPEN - printk("rs_open %s successful...", tty->name); -#endif - return 0; -} - -/* - * /proc fs routines.... - */ - -static inline int line_info(char *buf, struct serial_state *state) -{ -#ifdef notdef - struct async_struct *info = state->info, scr_info; - char stat_buf[30], control, status; -#endif - int ret; - - ret = sprintf(buf, "%d: uart:%s port:%X irq:%d", - state->line, - (state->smc_scc_num & NUM_IS_SCC) ? "SCC" : "SMC", - (unsigned int)(state->port), state->irq); - - if (!state->port || (state->type == PORT_UNKNOWN)) { - ret += sprintf(buf+ret, "\n"); - return ret; - } - -#ifdef notdef - /* - * Figure out the current RS-232 lines - */ - if (!info) { - info = &scr_info; /* This is just for serial_{in,out} */ - - info->magic = SERIAL_MAGIC; - info->port = state->port; - info->flags = state->flags; - info->quot = 0; - info->tty = 0; - } - cli(); - status = serial_in(info, UART_MSR); - control = info ? info->MCR : serial_in(info, UART_MCR); - sti(); - - stat_buf[0] = 0; - stat_buf[1] = 0; - if (control & UART_MCR_RTS) - strcat(stat_buf, "|RTS"); - if (status & UART_MSR_CTS) - strcat(stat_buf, "|CTS"); - if (control & UART_MCR_DTR) - strcat(stat_buf, "|DTR"); - if (status & UART_MSR_DSR) - strcat(stat_buf, "|DSR"); - if (status & UART_MSR_DCD) - strcat(stat_buf, "|CD"); - if (status & UART_MSR_RI) - strcat(stat_buf, "|RI"); - - if (info->quot) { - ret += sprintf(buf+ret, " baud:%d", - state->baud_base / info->quot); - } - - ret += sprintf(buf+ret, " tx:%d rx:%d", - state->icount.tx, state->icount.rx); - - if (state->icount.frame) - ret += sprintf(buf+ret, " fe:%d", state->icount.frame); - - if (state->icount.parity) - ret += sprintf(buf+ret, " pe:%d", state->icount.parity); - - if (state->icount.brk) - ret += sprintf(buf+ret, " brk:%d", state->icount.brk); - - if (state->icount.overrun) - ret += sprintf(buf+ret, " oe:%d", state->icount.overrun); - - /* - * Last thing is the RS-232 status lines - */ - ret += sprintf(buf+ret, " %s\n", stat_buf+1); -#endif - return ret; -} - -int rs_8xx_read_proc(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - int i, len = 0; - off_t begin = 0; - - len += sprintf(page, "serinfo:1.0 driver:%s\n", serial_version); - for (i = 0; i < NR_PORTS && len < 4000; i++) { - len += line_info(page + len, &rs_table[i]); - if (len+begin > off+count) - goto done; - if (len+begin < off) { - begin += len; - len = 0; - } - } - *eof = 1; -done: - if (off >= len+begin) - return 0; - *start = page + (begin-off); - return ((count < begin+len-off) ? count : begin+len-off); -} - -/* - * --------------------------------------------------------------------- - * rs_init() and friends - * - * rs_init() is called at boot-time to initialize the serial driver. - * --------------------------------------------------------------------- - */ - -/* - * This routine prints out the appropriate serial driver version - * number, and identifies which options were configured into this - * driver. - */ -static _INLINE_ void show_serial_version(void) -{ - printk(KERN_INFO "%s version %s\n", serial_name, serial_version); -} - - -/* - * The serial console driver used during boot. Note that these names - * clash with those found in "serial.c", so we currently can't support - * the 16xxx uarts and these at the same time. I will fix this to become - * an indirect function call from tty_io.c (or something). - */ - -#ifdef CONFIG_SERIAL_CONSOLE - -/* I need this just so I can store the virtual addresses and have - * common functions for the early console printing. - */ -static ser_info_t consinfo; - -/* - * Print a string to the serial port trying not to disturb any possible - * real use of the port... - */ -static void my_console_write(int idx, const char *s, - unsigned count) -{ - struct serial_state *ser; - ser_info_t *info; - unsigned i; - volatile cbd_t *bdp, *bdbase; - volatile smc_uart_t *up; - volatile u_char *cp; - - ser = rs_table + idx; - - /* If the port has been initialized for general use, we have - * to use the buffer descriptors allocated there. Otherwise, - * we simply use the single buffer allocated. - */ - if ((info = (ser_info_t *)ser->info) != NULL) { - bdp = info->tx_cur; - bdbase = info->tx_bd_base; - } - else { - /* Pointer to UART in parameter ram. - */ - up = (smc_uart_t *)&cpmp->cp_dparam[ser->port]; - - /* Get the address of the host memory buffer. - */ - bdp = bdbase = (cbd_t *)&cpmp->cp_dpmem[up->smc_tbase]; - - info = &consinfo; - } - - /* - * We need to gracefully shut down the transmitter, disable - * interrupts, then send our bytes out. - */ - - /* - * Now, do each character. This is not as bad as it looks - * since this is a holding FIFO and not a transmitting FIFO. - * We could add the complexity of filling the entire transmit - * buffer, but we would just wait longer between accesses...... - */ - for (i = 0; i < count; i++, s++) { - /* Wait for transmitter fifo to empty. - * Ready indicates output is ready, and xmt is doing - * that, not that it is ready for us to send. - */ - while (bdp->cbd_sc & BD_SC_READY); - - /* Send the character out. - * If the buffer address is in the CPM DPRAM, don't - * convert it. - */ - if ((uint)(bdp->cbd_bufaddr) > (uint)IMAP_ADDR) - cp = (u_char *)(bdp->cbd_bufaddr); - else - cp = info->tx_va_base + ((bdp - info->tx_bd_base) * TX_BUF_SIZE); - *cp = *s; - - bdp->cbd_datlen = 1; - bdp->cbd_sc |= BD_SC_READY; - - if (bdp->cbd_sc & BD_SC_WRAP) - bdp = bdbase; - else - bdp++; - - /* if a LF, also do CR... */ - if (*s == 10) { - while (bdp->cbd_sc & BD_SC_READY); - cp = info->tx_va_base + ((bdp - info->tx_bd_base) * TX_BUF_SIZE); - *cp = 13; - bdp->cbd_datlen = 1; - bdp->cbd_sc |= BD_SC_READY; - - if (bdp->cbd_sc & BD_SC_WRAP) { - bdp = bdbase; - } - else { - bdp++; - } - } - } - - /* - * Finally, Wait for transmitter & holding register to empty - * and restore the IER - */ - while (bdp->cbd_sc & BD_SC_READY); - - if (info) - info->tx_cur = (cbd_t *)bdp; -} - -static void serial_console_write(struct console *c, const char *s, - unsigned count) -{ -#ifdef CONFIG_KGDB_CONSOLE - /* Try to let stub handle output. Returns true if it did. */ - if (kgdb_output_string(s, count)) - return; -#endif - my_console_write(c->index, s, count); -} - -#ifdef CONFIG_XMON -int -xmon_8xx_write(const char *s, unsigned count) -{ - my_console_write(0, s, count); - return(count); -} -#endif - -#ifdef CONFIG_KGDB -void -putDebugChar(char ch) -{ - my_console_write(0, &ch, 1); -} -#endif - -/* - * Receive character from the serial port. This only works well - * before the port is initialized for real use. - */ -static int my_console_wait_key(int idx, int xmon, char *obuf) -{ - struct serial_state *ser; - u_char c, *cp; - ser_info_t *info; - volatile cbd_t *bdp; - volatile smc_uart_t *up; - int i; - - ser = rs_table + idx; - - /* Pointer to UART in parameter ram. - */ - up = (smc_uart_t *)&cpmp->cp_dparam[ser->port]; - - /* Get the address of the host memory buffer. - * If the port has been initialized for general use, we must - * use information from the port structure. - */ - if ((info = (ser_info_t *)ser->info)) { - bdp = info->rx_cur; - } - else { - bdp = (cbd_t *)&cpmp->cp_dpmem[up->smc_rbase]; - info = &consinfo; - } - - /* - * We need to gracefully shut down the receiver, disable - * interrupts, then read the input. - * XMON just wants a poll. If no character, return -1, else - * return the character. - */ - if (!xmon) { - while (bdp->cbd_sc & BD_SC_EMPTY); - } - else { - if (bdp->cbd_sc & BD_SC_EMPTY) - return -1; - } - - /* If the buffer address is in the CPM DPRAM, don't - * convert it. - */ - if ((uint)(bdp->cbd_bufaddr) > (uint)IMAP_ADDR) - cp = (u_char *)(bdp->cbd_bufaddr); - else - cp = info->rx_va_base + ((bdp - info->rx_bd_base) * RX_BUF_SIZE); - - if (obuf) { - i = c = bdp->cbd_datlen; - while (i-- > 0) - *obuf++ = *cp++; - } - else { - c = *cp; - } - bdp->cbd_sc |= BD_SC_EMPTY; - - if (info) { - if (bdp->cbd_sc & BD_SC_WRAP) { - bdp = info->rx_bd_base; - } - else { - bdp++; - } - info->rx_cur = (cbd_t *)bdp; - } - - return((int)c); -} - -#ifdef CONFIG_XMON -int -xmon_8xx_read_poll(void) -{ - return(my_console_wait_key(0, 1, NULL)); -} - -int -xmon_8xx_read_char(void) -{ - return(my_console_wait_key(0, 0, NULL)); -} -#endif - -#ifdef CONFIG_KGDB -static char kgdb_buf[RX_BUF_SIZE], *kgdp; -static int kgdb_chars; - -char -getDebugChar(void) -{ - if (kgdb_chars <= 0) { - kgdb_chars = my_console_wait_key(0, 0, kgdb_buf); - kgdp = kgdb_buf; - } - kgdb_chars--; - - return(*kgdp++); -} - -void kgdb_interruptible(int yes) -{ - volatile smc_t *smcp; - - smcp = &cpmp->cp_smc[KGDB_SER_IDX]; - - if (yes == 1) - smcp->smc_smcm |= SMCM_RX; - else - smcp->smc_smcm &= ~SMCM_RX; -} - -void kgdb_map_scc(void) -{ - struct serial_state *ser; - uint mem_addr; - volatile cbd_t *bdp; - volatile smc_uart_t *up; - - cpmp = (cpm8xx_t *)&(((immap_t *)IMAP_ADDR)->im_cpm); - - /* To avoid data cache CPM DMA coherency problems, allocate a - * buffer in the CPM DPRAM. This will work until the CPM and - * serial ports are initialized. At that time a memory buffer - * will be allocated. - * The port is already initialized from the boot procedure, all - * we do here is give it a different buffer and make it a FIFO. - */ - - ser = rs_table; - - /* Right now, assume we are using SMCs. - */ - up = (smc_uart_t *)&cpmp->cp_dparam[ser->port]; - - /* Allocate space for an input FIFO, plus a few bytes for output. - * Allocate bytes to maintain word alignment. - */ - mem_addr = (uint)(&cpmp->cp_dpmem[0xa00]); - - /* Set the physical address of the host memory buffers in - * the buffer descriptors. - */ - bdp = (cbd_t *)&cpmp->cp_dpmem[up->smc_rbase]; - bdp->cbd_bufaddr = mem_addr; - - bdp = (cbd_t *)&cpmp->cp_dpmem[up->smc_tbase]; - bdp->cbd_bufaddr = mem_addr+RX_BUF_SIZE; - - up->smc_mrblr = RX_BUF_SIZE; /* receive buffer length */ - up->smc_maxidl = RX_BUF_SIZE; -} -#endif - -static struct tty_driver *serial_console_device(struct console *c, int *index) -{ - *index = c->index; - return serial_driver; -} - -/* - * Register console. - */ -static void __init console_8xx_init(long kmem_start, long kmem_end) -{ - register_console(&sercons); -} -console_initcall(console_8xx_init); -#endif - -/* Index in baud rate table of the default console baud rate. -*/ -static int baud_idx; - -static struct tty_operations rs_8xx_ops = { - .open = rs_8xx_open, - .close = rs_8xx_close, - .write = rs_8xx_write, - .put_char = rs_8xx_put_char, - .write_room = rs_8xx_write_room, - .chars_in_buffer = rs_8xx_chars_in_buffer, - .flush_buffer = rs_8xx_flush_buffer, - .ioctl = rs_8xx_ioctl, - .throttle = rs_8xx_throttle, - .unthrottle = rs_8xx_unthrottle, - .send_xchar = rs_8xx_send_xchar, - .set_termios = rs_8xx_set_termios, - .stop = rs_8xx_stop, - .start = rs_8xx_start, - .hangup = rs_8xx_hangup, - .wait_until_sent = rs_8xx_wait_until_sent, - .read_proc = rs_8xx_read_proc, -}; - -/* - * The serial driver boot-time initialization code! - */ -static int __init rs_8xx_init(void) -{ - struct serial_state * state; - ser_info_t *info; - uint mem_addr, iobits, dp_offset; - int i, j, idx; - ushort chan; - volatile cbd_t *bdp; - volatile cpm8xx_t *cp; - volatile smc_t *sp; - volatile smc_uart_t *up; - volatile scc_t *scp; - volatile scc_uart_t *sup; - volatile immap_t *immap; - - serial_driver = alloc_tty_driver(NR_PORTS); - if (!serial_driver) - return -ENOMEM; - - init_bh(SERIAL_BH, do_serial_bh); - - show_serial_version(); - - /* Initialize the tty_driver structure */ - - serial_driver->owner = THIS_MODULE; - serial_driver->driver_name = "serial"; - serial_driver->devfs_name = "tts/"; - serial_driver->name = "ttyS"; - serial_driver->major = TTY_MAJOR; - serial_driver->minor_start = 64; - serial_driver->type = TTY_DRIVER_TYPE_SERIAL; - serial_driver->subtype = SERIAL_TYPE_NORMAL; - serial_driver->init_termios = tty_std_termios; - serial_driver->init_termios.c_cflag = - baud_idx | CS8 | CREAD | HUPCL | CLOCAL; - serial_driver->flags = TTY_DRIVER_REAL_RAW; - tty_set_operations(serial_driver, &rs_8xx_ops); - - if (tty_register_driver(serial_driver)) - panic("Couldn't register serial driver\n"); - - cp = cpmp; /* Get pointer to Communication Processor */ - immap = (immap_t *)IMAP_ADDR; /* and to internal registers */ - - - /* Configure SCC2, SCC3, and SCC4 instead of port A parallel I/O. - */ -#ifdef CONFIG_USE_SCC_IO -#ifndef CONFIG_MBX - /* The "standard" configuration through the 860. - */ - immap->im_ioport.iop_papar |= 0x00fc; - immap->im_ioport.iop_padir &= ~0x00fc; - immap->im_ioport.iop_paodr &= ~0x00fc; -#else - /* On the MBX, SCC3 is through Port D. - */ - immap->im_ioport.iop_papar |= 0x000c; /* SCC2 on port A */ - immap->im_ioport.iop_padir &= ~0x000c; - immap->im_ioport.iop_paodr &= ~0x000c; - - immap->im_ioport.iop_pdpar |= 0x0030; /* SCC3 on port D */ -#endif - - /* Since we don't yet do modem control, connect the port C pins - * as general purpose I/O. This will assert CTS and CD for the - * SCC ports. - */ - immap->im_ioport.iop_pcdir |= 0x03c6; - immap->im_ioport.iop_pcpar &= ~0x03c6; - - /* Connect SCC2 and SCC3 to NMSI. Connect BRG3 to SCC2 and - * BRG4 to SCC3. - */ - cp->cp_sicr &= ~0x00ffff00; - cp->cp_sicr |= 0x001b1200; - -#ifdef CONFIG_PP04 - /* Frequentis PP04 forced to RS-232 until we know better. - * Port C 12 and 13 low enables RS-232 on SCC3 and SCC4. - */ - immap->im_ioport.iop_pcdir |= 0x000c; - immap->im_ioport.iop_pcpar &= ~0x000c; - immap->im_ioport.iop_pcdat &= ~0x000c; - - /* This enables the TX driver. - */ - cp->cp_pbpar &= ~0x6000; - cp->cp_pbdat &= ~0x6000; -#endif -#endif - - for (i = 0, state = rs_table; i < NR_PORTS; i++,state++) { - state->magic = SSTATE_MAGIC; - state->line = i; - state->type = PORT_UNKNOWN; - state->custom_divisor = 0; - state->close_delay = 5*HZ/10; - state->closing_wait = 30*HZ; - state->icount.cts = state->icount.dsr = - state->icount.rng = state->icount.dcd = 0; - state->icount.rx = state->icount.tx = 0; - state->icount.frame = state->icount.parity = 0; - state->icount.overrun = state->icount.brk = 0; - printk(KERN_INFO "ttyS%d at 0x%04x is a %s\n", - i, (unsigned int)(state->port), - (state->smc_scc_num & NUM_IS_SCC) ? "SCC" : "SMC"); -#ifdef CONFIG_SERIAL_CONSOLE - /* If we just printed the message on the console port, and - * we are about to initialize it for general use, we have - * to wait a couple of character times for the CR/NL to - * make it out of the transmit buffer. - */ - if (i == CONFIG_SERIAL_CONSOLE_PORT) - mdelay(2); -#endif - info = kmalloc(sizeof(ser_info_t), GFP_KERNEL); - if (info) { - __clear_user(info,sizeof(ser_info_t)); - init_waitqueue_head(&info->open_wait); - init_waitqueue_head(&info->close_wait); - info->magic = SERIAL_MAGIC; - info->flags = state->flags; - info->tqueue.routine = do_softint; - info->tqueue.data = info; - info->tqueue_hangup.routine = do_serial_hangup; - info->tqueue_hangup.data = info; - info->line = i; - info->state = state; - state->info = (struct async_struct *)info; - - /* We need to allocate a transmit and receive buffer - * descriptors from dual port ram, and a character - * buffer area from host mem. - */ - dp_offset = cpm_dpalloc(sizeof(cbd_t) * RX_NUM_FIFO, 8); - - /* Allocate space for FIFOs in the host memory. - */ - mem_addr = m8xx_cpm_hostalloc(RX_NUM_FIFO * RX_BUF_SIZE); - info->rx_va_base = (unsigned char *)mem_addr; - - /* Set the physical address of the host memory - * buffers in the buffer descriptors, and the - * virtual address for us to work with. - */ - bdp = (cbd_t *)&cp->cp_dpmem[dp_offset]; - info->rx_cur = info->rx_bd_base = (cbd_t *)bdp; - - for (j=0; j<(RX_NUM_FIFO-1); j++) { - bdp->cbd_bufaddr = iopa(mem_addr); - bdp->cbd_sc = BD_SC_EMPTY | BD_SC_INTRPT; - mem_addr += RX_BUF_SIZE; - bdp++; - } - bdp->cbd_bufaddr = iopa(mem_addr); - bdp->cbd_sc = BD_SC_WRAP | BD_SC_EMPTY | BD_SC_INTRPT; - - idx = PORT_NUM(info->state->smc_scc_num); - if (info->state->smc_scc_num & NUM_IS_SCC) { - scp = &cp->cp_scc[idx]; - sup = (scc_uart_t *)&cp->cp_dparam[state->port]; - sup->scc_genscc.scc_rbase = dp_offset; - } - else { - sp = &cp->cp_smc[idx]; - up = (smc_uart_t *)&cp->cp_dparam[state->port]; - up->smc_rbase = dp_offset; - } - - dp_offset = cpm_dpalloc(sizeof(cbd_t) * TX_NUM_FIFO, 8); - - /* Allocate space for FIFOs in the host memory. - */ - mem_addr = m8xx_cpm_hostalloc(TX_NUM_FIFO * TX_BUF_SIZE); - info->tx_va_base = (unsigned char *)mem_addr; - - /* Set the physical address of the host memory - * buffers in the buffer descriptors, and the - * virtual address for us to work with. - */ - bdp = (cbd_t *)&cp->cp_dpmem[dp_offset]; - info->tx_cur = info->tx_bd_base = (cbd_t *)bdp; - - for (j=0; j<(TX_NUM_FIFO-1); j++) { - bdp->cbd_bufaddr = iopa(mem_addr); - bdp->cbd_sc = BD_SC_INTRPT; - mem_addr += TX_BUF_SIZE; - bdp++; - } - bdp->cbd_bufaddr = iopa(mem_addr); - bdp->cbd_sc = (BD_SC_WRAP | BD_SC_INTRPT); - - if (info->state->smc_scc_num & NUM_IS_SCC) { - sup->scc_genscc.scc_tbase = dp_offset; - - /* Set up the uart parameters in the - * parameter ram. - */ - sup->scc_genscc.scc_rfcr = SMC_EB; - sup->scc_genscc.scc_tfcr = SMC_EB; - - /* Set this to 1 for now, so we get single - * character interrupts. Using idle charater - * time requires some additional tuning. - */ - sup->scc_genscc.scc_mrblr = 1; - sup->scc_maxidl = 0; - sup->scc_brkcr = 1; - sup->scc_parec = 0; - sup->scc_frmec = 0; - sup->scc_nosec = 0; - sup->scc_brkec = 0; - sup->scc_uaddr1 = 0; - sup->scc_uaddr2 = 0; - sup->scc_toseq = 0; - sup->scc_char1 = 0x8000; - sup->scc_char2 = 0x8000; - sup->scc_char3 = 0x8000; - sup->scc_char4 = 0x8000; - sup->scc_char5 = 0x8000; - sup->scc_char6 = 0x8000; - sup->scc_char7 = 0x8000; - sup->scc_char8 = 0x8000; - sup->scc_rccm = 0xc0ff; - - /* Send the CPM an initialize command. - */ - chan = scc_chan_map[idx]; - - cp->cp_cpcr = mk_cr_cmd(chan, - CPM_CR_INIT_TRX) | CPM_CR_FLG; - while (cp->cp_cpcr & CPM_CR_FLG); - - /* Set UART mode, 8 bit, no parity, one stop. - * Enable receive and transmit. - */ - scp->scc_gsmrh = 0; - scp->scc_gsmrl = - (SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16); - - /* Disable all interrupts and clear all pending - * events. - */ - scp->scc_sccm = 0; - scp->scc_scce = 0xffff; - scp->scc_dsr = 0x7e7e; - scp->scc_pmsr = 0x3000; - - /* If the port is the console, enable Rx and Tx. - */ -#ifdef CONFIG_SERIAL_CONSOLE - if (i == CONFIG_SERIAL_CONSOLE_PORT) - scp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT); -#endif - } - else { - /* Configure SMCs Tx/Rx instead of port B - * parallel I/O. On 823/850 these are on - * port A for SMC2. - */ -#ifndef CONFIG_ALTSMC2 - iobits = 0xc0 << (idx * 4); - cp->cp_pbpar |= iobits; - cp->cp_pbdir &= ~iobits; - cp->cp_pbodr &= ~iobits; -#else - iobits = 0xc0; - if (idx == 0) { - /* SMC1 on Port B, like all 8xx. - */ - cp->cp_pbpar |= iobits; - cp->cp_pbdir &= ~iobits; - cp->cp_pbodr &= ~iobits; - } - else { - /* SMC2 is on Port A. - */ - immap->im_ioport.iop_papar |= iobits; - immap->im_ioport.iop_padir &= ~iobits; - immap->im_ioport.iop_paodr &= ~iobits; - } -#endif /* CONFIG_ALTSMC2 */ - - /* Connect the baud rate generator to the - * SMC based upon index in rs_table. Also - * make sure it is connected to NMSI. - */ - cp->cp_simode &= ~(0xffff << (idx * 16)); - cp->cp_simode |= (i << ((idx * 16) + 12)); - - up->smc_tbase = dp_offset; - - /* Set up the uart parameters in the - * parameter ram. - */ - up->smc_rfcr = SMC_EB; - up->smc_tfcr = SMC_EB; - - /* Set this to 1 for now, so we get single - * character interrupts. Using idle charater - * time requires some additional tuning. - */ - up->smc_mrblr = 1; - up->smc_maxidl = 0; - up->smc_brkcr = 1; - - /* Send the CPM an initialize command. - */ - chan = smc_chan_map[idx]; - - cp->cp_cpcr = mk_cr_cmd(chan, - CPM_CR_INIT_TRX) | CPM_CR_FLG; - while (cp->cp_cpcr & CPM_CR_FLG); - - /* Set UART mode, 8 bit, no parity, one stop. - * Enable receive and transmit. - */ - sp->smc_smcmr = smcr_mk_clen(9) | SMCMR_SM_UART; - - /* Disable all interrupts and clear all pending - * events. - */ - sp->smc_smcm = 0; - sp->smc_smce = 0xff; - - /* If the port is the console, enable Rx and Tx. - */ -#ifdef CONFIG_SERIAL_CONSOLE - if (i == CONFIG_SERIAL_CONSOLE_PORT) - sp->smc_smcmr |= SMCMR_REN | SMCMR_TEN; -#endif - } - - /* Install interrupt handler. - */ - cpm_install_handler(state->irq, rs_8xx_interrupt, info); - - /* Set up the baud rate generator. - */ - m8xx_cpm_setbrg(i, baud_table[baud_idx]); - - } - } - - return 0; -} -module_init(rs_8xx_init); - -/* This must always be called before the rs_8xx_init() function, otherwise - * it blows away the port control information. -*/ -static int __init serial_console_setup(struct console *co, char *options) -{ - struct serial_state *ser; - uint mem_addr, bidx, idx, dp_offset; - ushort chan; - volatile cbd_t *bdp; - volatile cpm8xx_t *cp; - volatile smc_t *sp; - volatile scc_t *scp; - volatile smc_uart_t *up; - volatile scc_uart_t *sup; - bd_t *bd; - - bd = (bd_t *)__res; - - for (bidx = 0; bidx < (sizeof(baud_table) / sizeof(int)); bidx++) - if (bd->bi_baudrate == baud_table[bidx]) - break; - /* make sure we have a useful value */ - if (bidx == (sizeof(baud_table) / sizeof(int))) - bidx = 13; /* B9600 */ - - co->cflag = CREAD|CLOCAL|bidx|CS8; - baud_idx = bidx; - - ser = rs_table + co->index; - - cp = cpmp; /* Get pointer to Communication Processor */ - - idx = PORT_NUM(ser->smc_scc_num); - if (ser->smc_scc_num & NUM_IS_SCC) { - scp = &cp->cp_scc[idx]; - sup = (scc_uart_t *)&cp->cp_dparam[ser->port]; - } - else { - sp = &cp->cp_smc[idx]; - up = (smc_uart_t *)&cpmp->cp_dparam[ser->port]; - } - - /* When we get here, the CPM has been reset, so we need - * to configure the port. - * We need to allocate a transmit and receive buffer descriptor - * from dual port ram, and a character buffer area from host mem. - */ - - /* Allocate space for two FIFOs. We can't allocate from host - * memory yet because vm allocator isn't initialized - * during this early console init. - */ - dp_offset = cpm_dpalloc(8, 8); - mem_addr = (uint)(&cpmp->cp_dpmem[dp_offset]); - - /* Allocate space for two buffer descriptors in the DP ram. - */ - dp_offset = cpm_dpalloc(sizeof(cbd_t) * 2, 8); - - /* Set the physical address of the host memory buffers in - * the buffer descriptors. - */ - bdp = (cbd_t *)&cp->cp_dpmem[dp_offset]; - bdp->cbd_bufaddr = iopa(mem_addr); - (bdp+1)->cbd_bufaddr = iopa(mem_addr+4); - - consinfo.rx_va_base = mem_addr; - consinfo.rx_bd_base = bdp; - consinfo.tx_va_base = mem_addr + 4; - consinfo.tx_bd_base = bdp+1; - - /* For the receive, set empty and wrap. - * For transmit, set wrap. - */ - bdp->cbd_sc = BD_SC_EMPTY | BD_SC_WRAP; - (bdp+1)->cbd_sc = BD_SC_WRAP; - - /* Set up the uart parameters in the parameter ram. - */ - if (ser->smc_scc_num & NUM_IS_SCC) { - - sup->scc_genscc.scc_rbase = dp_offset; - sup->scc_genscc.scc_tbase = dp_offset + sizeof(cbd_t); - - /* Set up the uart parameters in the - * parameter ram. - */ - sup->scc_genscc.scc_rfcr = SMC_EB; - sup->scc_genscc.scc_tfcr = SMC_EB; - - /* Set this to 1 for now, so we get single - * character interrupts. Using idle charater - * time requires some additional tuning. - */ - sup->scc_genscc.scc_mrblr = 1; - sup->scc_maxidl = 0; - sup->scc_brkcr = 1; - sup->scc_parec = 0; - sup->scc_frmec = 0; - sup->scc_nosec = 0; - sup->scc_brkec = 0; - sup->scc_uaddr1 = 0; - sup->scc_uaddr2 = 0; - sup->scc_toseq = 0; - sup->scc_char1 = 0x8000; - sup->scc_char2 = 0x8000; - sup->scc_char3 = 0x8000; - sup->scc_char4 = 0x8000; - sup->scc_char5 = 0x8000; - sup->scc_char6 = 0x8000; - sup->scc_char7 = 0x8000; - sup->scc_char8 = 0x8000; - sup->scc_rccm = 0xc0ff; - - /* Send the CPM an initialize command. - */ - chan = scc_chan_map[idx]; - - cp->cp_cpcr = mk_cr_cmd(chan, CPM_CR_INIT_TRX) | CPM_CR_FLG; - while (cp->cp_cpcr & CPM_CR_FLG); - - /* Set UART mode, 8 bit, no parity, one stop. - * Enable receive and transmit. - */ - scp->scc_gsmrh = 0; - scp->scc_gsmrl = - (SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16); - - /* Disable all interrupts and clear all pending - * events. - */ - scp->scc_sccm = 0; - scp->scc_scce = 0xffff; - scp->scc_dsr = 0x7e7e; - scp->scc_pmsr = 0x3000; - - scp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT); - - } - else { - up->smc_rbase = dp_offset; /* Base of receive buffer desc. */ - up->smc_tbase = dp_offset+sizeof(cbd_t); /* Base of xmt buffer desc. */ - up->smc_rfcr = SMC_EB; - up->smc_tfcr = SMC_EB; - - /* Set this to 1 for now, so we get single character interrupts. - */ - up->smc_mrblr = 1; /* receive buffer length */ - up->smc_maxidl = 0; /* wait forever for next char */ - - /* Send the CPM an initialize command. - */ - chan = smc_chan_map[idx]; - cp->cp_cpcr = mk_cr_cmd(chan, CPM_CR_INIT_TRX) | CPM_CR_FLG; - printk("%s", ""); - while (cp->cp_cpcr & CPM_CR_FLG); - - /* Set UART mode, 8 bit, no parity, one stop. - * Enable receive and transmit. - */ - sp->smc_smcmr = smcr_mk_clen(9) | SMCMR_SM_UART; - - /* And finally, enable Rx and Tx. - */ - sp->smc_smcmr |= SMCMR_REN | SMCMR_TEN; - } - - /* Set up the baud rate generator. - */ - m8xx_cpm_setbrg((ser - rs_table), bd->bi_baudrate); - - return 0; -} diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig --- a/arch/ppc/Kconfig 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc/Kconfig 2004-11-10 17:19:07 -08:00 @@ -74,6 +74,7 @@ bool "POWER4 and 970 (G5)" config 8xx + depends on BROKEN bool "8xx" config E500 @@ -755,11 +756,6 @@ config PC_KEYBOARD bool "PC PS/2 style Keyboard" depends on 4xx || CPM2 - -config SERIAL_CONSOLE - bool - depends on 8xx - default y config SERIAL_CONSOLE_BAUD int diff -Nru a/arch/ppc/boot/lib/Makefile b/arch/ppc/boot/lib/Makefile --- a/arch/ppc/boot/lib/Makefile 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/boot/lib/Makefile 2004-11-10 17:19:06 -08:00 @@ -2,15 +2,22 @@ # Makefile for some libs needed by zImage. # -CFLAGS_kbd.o += -Idrivers/char +CFLAGS_kbd.o := -Idrivers/char +CFLAGS_vreset.o := -I$(srctree)/arch/ppc/boot/include -ZLIB_DIR := ../../../../lib/zlib_inflate/ - -lib-y := $(addprefix $(ZLIB_DIR), \ - infblock.o infcodes.o inffast.o inflate.o inftrees.o infutil.o) -lib-y += div64.o +zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c + +lib-y += $(zlib:.c=.o) div64.o lib-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o -ifneq ($(KBUILD_SRC),) -_make_zlib_dir := $(shell [ -d $(obj)/$(ZLIB_DIR) ] || mkdir -p $(obj)/$(ZLIB_DIR) ) -endif + +# zlib files needs header from their original place +EXTRA_CFLAGS += -Ilib/zlib_inflate + +quiet_cmd_copy_zlib = COPY $@ + cmd_copy_zlib = cat $< > $@ + +$(addprefix $(obj)/,$(zlib)): $(obj)/%: $(srctree)/lib/zlib_inflate/% + $(call cmd,copy_zlib) + +clean-files := $(zlib) diff -Nru a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile --- a/arch/ppc/boot/simple/Makefile 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc/boot/simple/Makefile 2004-11-10 17:19:02 -08:00 @@ -41,7 +41,7 @@ # if present on 'classic' PPC. cacheflag-y := -DCLEAR_CACHES="" # This file will flush / disable the L2, and L3 if present. -clear_L2_L3 := $(boot)/simple/clear.S +clear_L2_L3 := $(srctree)/$(boot)/simple/clear.S # # See arch/ppc/kconfig and arch/ppc/platforms/Kconfig diff -Nru a/arch/ppc/boot/simple/mpc52xx_tty.c b/arch/ppc/boot/simple/mpc52xx_tty.c --- a/arch/ppc/boot/simple/mpc52xx_tty.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc/boot/simple/mpc52xx_tty.c 2004-11-10 17:19:07 -08:00 @@ -17,6 +17,7 @@ #include #include #include +#include #include #if MPC52xx_PF_CONSOLE_PORT == 0 diff -Nru a/arch/ppc/boot/utils/mkbugboot.c b/arch/ppc/boot/utils/mkbugboot.c --- a/arch/ppc/boot/utils/mkbugboot.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc/boot/utils/mkbugboot.c 2004-11-10 17:19:05 -08:00 @@ -96,7 +96,7 @@ uint8_t header_block[HEADER_SIZE]; bug_boot_header_t *bbh = (bug_boot_header_t *)&header_block[0]; - bzero(header_block, HEADER_SIZE); + memset(header_block, 0, HEADER_SIZE); /* Fill in the PPCBUG ROM boot header */ strncpy(bbh->magic_word, "BOOT", 4); /* PPCBUG magic word */ diff -Nru a/arch/ppc/configs/FADS_defconfig b/arch/ppc/configs/FADS_defconfig --- a/arch/ppc/configs/FADS_defconfig 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc/configs/FADS_defconfig 2004-11-10 17:19:05 -08:00 @@ -296,24 +296,26 @@ # # -# Character devices -# -# CONFIG_SERIAL_NONSTANDARD is not set - -# # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_CPM=y +CONFIG_SERIAL_CPM_CONSOLE=y +# CONFIG_SERIAL_CPM_SCC1 is not set +# CONFIG_SERIAL_CPM_SCC2 is not set +# CONFIG_SERIAL_CPM_SCC3 is not set +# CONFIG_SERIAL_CPM_SCC4 is not set +CONFIG_SERIAL_CPM_SMC1=y +CONFIG_SERIAL_CPM_SMC2=y +# CONFIG_SERIAL_CPM_ALT_SMC2 is not set CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 +# CONFIG_LEGACY_PTYS is not set # # I2C support @@ -478,10 +480,6 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set CONFIG_ENET_BIG_BUFFERS=y -CONFIG_SMC2_UART=y -# CONFIG_ALTSMC2 is not set -# CONFIG_CONS_SMC2 is not set -# CONFIG_USE_SCC_IO is not set # # Generic MPC8xx Options diff -Nru a/arch/ppc/configs/IVMS8_defconfig b/arch/ppc/configs/IVMS8_defconfig --- a/arch/ppc/configs/IVMS8_defconfig 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc/configs/IVMS8_defconfig 2004-11-10 17:19:05 -08:00 @@ -320,24 +320,25 @@ # # -# Character devices -# -# CONFIG_SERIAL_NONSTANDARD is not set - -# # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_CPM=y +CONFIG_SERIAL_CPM_CONSOLE=y +# CONFIG_SERIAL_CPM_SCC1 is not set +# CONFIG_SERIAL_CPM_SCC2 is not set +# CONFIG_SERIAL_CPM_SCC3 is not set +# CONFIG_SERIAL_CPM_SCC4 is not set +CONFIG_SERIAL_CPM_SMC1=y +# CONFIG_SERIAL_CPM_SMC2 is not set CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 +# CONFIG_LEGACY_PTYS is not set # # I2C support @@ -507,8 +508,6 @@ CONFIG_FEC_LXT971=y CONFIG_FEC_QS6612=y CONFIG_ENET_BIG_BUFFERS=y -# CONFIG_SMC2_UART is not set -# CONFIG_USE_SCC_IO is not set # # Generic MPC8xx Options diff -Nru a/arch/ppc/configs/SM850_defconfig b/arch/ppc/configs/SM850_defconfig --- a/arch/ppc/configs/SM850_defconfig 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc/configs/SM850_defconfig 2004-11-10 17:19:04 -08:00 @@ -92,7 +92,8 @@ # Parallel port support # # CONFIG_PARPORT is not set -# CONFIG_CMDLINE_BOOL is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="console=ttyCPM1" # # Advanced setup @@ -297,24 +298,26 @@ # # -# Character devices -# -# CONFIG_SERIAL_NONSTANDARD is not set - -# # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_CPM=y +CONFIG_SERIAL_CPM_CONSOLE=y +# CONFIG_SERIAL_CPM_SCC1 is not set +# CONFIG_SERIAL_CPM_SCC2 is not set +# CONFIG_SERIAL_CPM_SCC3 is not set +# CONFIG_SERIAL_CPM_SCC4 is not set +CONFIG_SERIAL_CPM_SMC1=y +CONFIG_SERIAL_CPM_SMC2=y +CONFIG_SERIAL_CPM_ALT_SMC2=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 +# CONFIG_LEGACY_PTYS is not set # # I2C support @@ -479,10 +482,6 @@ CONFIG_SCC3_ENET=y # CONFIG_FEC_ENET is not set CONFIG_ENET_BIG_BUFFERS=y -CONFIG_SMC2_UART=y -CONFIG_ALTSMC2=y -CONFIG_CONS_SMC2=y -# CONFIG_USE_SCC_IO is not set # # Generic MPC8xx Options diff -Nru a/arch/ppc/configs/SPD823TS_defconfig b/arch/ppc/configs/SPD823TS_defconfig --- a/arch/ppc/configs/SPD823TS_defconfig 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc/configs/SPD823TS_defconfig 2004-11-10 17:19:07 -08:00 @@ -296,24 +296,26 @@ # # -# Character devices -# -# CONFIG_SERIAL_NONSTANDARD is not set - -# # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_CPM=y +CONFIG_SERIAL_CPM_CONSOLE=y +# CONFIG_SERIAL_CPM_SCC1 is not set +# CONFIG_SERIAL_CPM_SCC2 is not set +# CONFIG_SERIAL_CPM_SCC3 is not set +# CONFIG_SERIAL_CPM_SCC4 is not set +CONFIG_SERIAL_CPM_SMC1=y +# CONFIG_SERIAL_CPM_SMC2 is not set +CONFIG_SERIAL_CPM_ALT_SMC2=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 +# CONFIG_LEGACY_PTYS is not set # # I2C support @@ -478,10 +480,6 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set CONFIG_ENET_BIG_BUFFERS=y -CONFIG_SMC2_UART=y -CONFIG_ALTSMC2=y -# CONFIG_CONS_SMC2 is not set -# CONFIG_USE_SCC_IO is not set # # Generic MPC8xx Options diff -Nru a/arch/ppc/configs/TQM823L_defconfig b/arch/ppc/configs/TQM823L_defconfig --- a/arch/ppc/configs/TQM823L_defconfig 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc/configs/TQM823L_defconfig 2004-11-10 17:19:03 -08:00 @@ -297,24 +297,26 @@ # # -# Character devices -# -# CONFIG_SERIAL_NONSTANDARD is not set - -# # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_CPM=y +CONFIG_SERIAL_CPM_CONSOLE=y +# CONFIG_SERIAL_CPM_SCC1 is not set +# CONFIG_SERIAL_CPM_SCC2 is not set +# CONFIG_SERIAL_CPM_SCC3 is not set +# CONFIG_SERIAL_CPM_SCC4 is not set +CONFIG_SERIAL_CPM_SMC1=y +CONFIG_SERIAL_CPM_SMC2=y +CONFIG_SERIAL_CPM_ALT_SMC2=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 +# CONFIG_LEGACY_PTYS is not set # # I2C support @@ -479,10 +481,6 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set CONFIG_ENET_BIG_BUFFERS=y -CONFIG_SMC2_UART=y -CONFIG_ALTSMC2=y -# CONFIG_CONS_SMC2 is not set -# CONFIG_USE_SCC_IO is not set # # Generic MPC8xx Options diff -Nru a/arch/ppc/configs/TQM850L_defconfig b/arch/ppc/configs/TQM850L_defconfig --- a/arch/ppc/configs/TQM850L_defconfig 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc/configs/TQM850L_defconfig 2004-11-10 17:19:05 -08:00 @@ -297,24 +297,26 @@ # # -# Character devices -# -# CONFIG_SERIAL_NONSTANDARD is not set - -# # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_CPM=y +CONFIG_SERIAL_CPM_CONSOLE=y +# CONFIG_SERIAL_CPM_SCC1 is not set +# CONFIG_SERIAL_CPM_SCC2 is not set +# CONFIG_SERIAL_CPM_SCC3 is not set +# CONFIG_SERIAL_CPM_SCC4 is not set +CONFIG_SERIAL_CPM_SMC1=y +CONFIG_SERIAL_CPM_SMC2=y +CONFIG_SERIAL_CPM_ALT_SMC2=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 +# CONFIG_LEGACY_PTYS is not set # # I2C support @@ -479,10 +481,6 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set CONFIG_ENET_BIG_BUFFERS=y -CONFIG_SMC2_UART=y -CONFIG_ALTSMC2=y -# CONFIG_CONS_SMC2 is not set -# CONFIG_USE_SCC_IO is not set # # Generic MPC8xx Options diff -Nru a/arch/ppc/configs/TQM860L_defconfig b/arch/ppc/configs/TQM860L_defconfig --- a/arch/ppc/configs/TQM860L_defconfig 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc/configs/TQM860L_defconfig 2004-11-10 17:19:03 -08:00 @@ -321,24 +321,25 @@ # # -# Character devices -# -# CONFIG_SERIAL_NONSTANDARD is not set - -# # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_CPM=y +CONFIG_SERIAL_CPM_CONSOLE=y +# CONFIG_SERIAL_CPM_SCC1 is not set +# CONFIG_SERIAL_CPM_SCC2 is not set +# CONFIG_SERIAL_CPM_SCC3 is not set +# CONFIG_SERIAL_CPM_SCC4 is not set +CONFIG_SERIAL_CPM_SMC1=y +CONFIG_SERIAL_CPM_SMC2=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 +# CONFIG_LEGACY_PTYS is not set # # I2C support @@ -508,10 +509,6 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set CONFIG_ENET_BIG_BUFFERS=y -CONFIG_SMC2_UART=y -# CONFIG_ALTSMC2 is not set -# CONFIG_CONS_SMC2 is not set -# CONFIG_USE_SCC_IO is not set # # Generic MPC8xx Options diff -Nru a/arch/ppc/configs/bseip_defconfig b/arch/ppc/configs/bseip_defconfig --- a/arch/ppc/configs/bseip_defconfig 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc/configs/bseip_defconfig 2004-11-10 17:19:03 -08:00 @@ -293,24 +293,25 @@ # # -# Character devices -# -# CONFIG_SERIAL_NONSTANDARD is not set - -# # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_CPM=y +CONFIG_SERIAL_CPM_CONSOLE=y +# CONFIG_SERIAL_CPM_SCC1 is not set +# CONFIG_SERIAL_CPM_SCC2 is not set +# CONFIG_SERIAL_CPM_SCC3 is not set +# CONFIG_SERIAL_CPM_SCC4 is not set +CONFIG_SERIAL_CPM_SMC1=y +CONFIG_SERIAL_CPM_SMC2=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +# CONFIG_LEGACY_PTYS is not set # # I2C support @@ -476,10 +477,6 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set # CONFIG_ENET_BIG_BUFFERS is not set -CONFIG_SMC2_UART=y -# CONFIG_ALTSMC2 is not set -# CONFIG_CONS_SMC2 is not set -# CONFIG_USE_SCC_IO is not set # # Generic MPC8xx Options diff -Nru a/arch/ppc/configs/mbx_defconfig b/arch/ppc/configs/mbx_defconfig --- a/arch/ppc/configs/mbx_defconfig 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc/configs/mbx_defconfig 2004-11-10 17:19:04 -08:00 @@ -290,23 +290,25 @@ # # -# Character devices -# -# CONFIG_SERIAL_NONSTANDARD is not set - -# # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_UNIX98_PTYS is not set +CONFIG_SERIAL_CPM=y +CONFIG_SERIAL_CPM_CONSOLE=y +# CONFIG_SERIAL_CPM_SCC1 is not set +CONFIG_SERIAL_CPM_SCC2=y +CONFIG_SERIAL_CPM_SCC3=y +# CONFIG_SERIAL_CPM_SCC4 is not set +CONFIG_SERIAL_CPM_SMC1=y +CONFIG_SERIAL_CPM_SMC2=y +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set # # I2C support @@ -470,10 +472,6 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set CONFIG_ENET_BIG_BUFFERS=y -CONFIG_SMC2_UART=y -# CONFIG_ALTSMC2 is not set -# CONFIG_CONS_SMC2 is not set -CONFIG_USE_SCC_IO=y # # Generic MPC8xx Options diff -Nru a/arch/ppc/configs/rpxcllf_defconfig b/arch/ppc/configs/rpxcllf_defconfig --- a/arch/ppc/configs/rpxcllf_defconfig 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/configs/rpxcllf_defconfig 2004-11-10 17:19:06 -08:00 @@ -1,26 +1,49 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1 +# Mon Nov 1 16:41:04 2004 # CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_HAVE_DEC_LOCK=y +CONFIG_PPC=y +CONFIG_PPC32=y +CONFIG_GENERIC_NVRAM=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +# CONFIG_CLEAN_COMPILE is not set +CONFIG_BROKEN=y +CONFIG_BROKEN_ON_SMP=y # # General setup # -CONFIG_SWAP=y +CONFIG_LOCALVERSION="" +# CONFIG_SWAP is not set CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_HOTPLUG is not set +# CONFIG_KOBJECT_UEVENT is not set +# CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y -CONFIG_FUTEX=y +# CONFIG_KALLSYMS is not set +# CONFIG_FUTEX is not set # CONFIG_EPOLL is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +# CONFIG_SHMEM is not set +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +CONFIG_TINY_SHMEM=y # # Loadable module support @@ -28,21 +51,23 @@ # CONFIG_MODULES is not set # -# Platform support +# Processor # -CONFIG_PPC=y -CONFIG_PPC32=y # CONFIG_6xx is not set # CONFIG_40x is not set +# CONFIG_44x is not set # CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set CONFIG_8xx=y +# CONFIG_E500 is not set +CONFIG_MATH_EMULATION=y +# CONFIG_CPU_FREQ is not set +CONFIG_EMBEDDEDBOOT=y +CONFIG_NOT_COHERENT_CACHE=y # -# IBM 4xx options +# Platform options # -CONFIG_EMBEDDEDBOOT=y -CONFIG_SERIAL_CONSOLE=y -CONFIG_NOT_COHERENT_CACHE=y # CONFIG_RPXLITE is not set CONFIG_RPXCLASSIC=y # CONFIG_BSEIP is not set @@ -66,27 +91,17 @@ # CONFIG_WINCEPT is not set # CONFIG_SMP is not set # CONFIG_PREEMPT is not set -CONFIG_MATH_EMULATION=y -# CONFIG_CPU_FREQ is not set - -# -# General setup -# # CONFIG_HIGHMEM is not set -# CONFIG_PCI is not set -# CONFIG_PCI_DOMAINS is not set -# CONFIG_PCI_QSPAN is not set -CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y -CONFIG_KERNEL_ELF=y # CONFIG_BINFMT_MISC is not set -# CONFIG_HOTPLUG is not set +# CONFIG_CMDLINE_BOOL is not set # -# Parallel port support +# Bus options # -# CONFIG_PARPORT is not set -# CONFIG_CMDLINE_BOOL is not set +# CONFIG_PCI is not set +# CONFIG_PCI_DOMAINS is not set +# CONFIG_PCI_QSPAN is not set # # Advanced setup @@ -100,52 +115,89 @@ CONFIG_LOWMEM_SIZE=0x30000000 CONFIG_KERNEL_START=0xc0000000 CONFIG_TASK_SIZE=0x80000000 +CONFIG_CONSISTENT_START=0xff100000 +CONFIG_CONSISTENT_SIZE=0x00200000 CONFIG_BOOT_LOAD=0x00400000 # +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y + +# # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # -# CONFIG_PNP is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_LBD is not set +# CONFIG_CDROM_PKTCDVD is not set # -# Multi-device support (RAID and LVM) +# IO Schedulers # -# CONFIG_MD is not set +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # -# ATA/IDE/MFM/RLL support +# ATA/ATAPI/MFM/RLL support # # CONFIG_IDE is not set # -# SCSI support +# SCSI device support # # CONFIG_SCSI is not set # +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# # Fusion MPT device support # # +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# # I2O device support # # +# Macintosh device drivers +# + +# # Networking support # CONFIG_NET=y @@ -156,66 +208,70 @@ CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set # CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_DHCP is not set CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set -CONFIG_SYN_COOKIES=y +# CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set # CONFIG_IPV6 is not set -# CONFIG_XFRM_USER is not set +# CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set # CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y -CONFIG_MII=y +# CONFIG_MII is not set # CONFIG_OAKNET is not set # @@ -225,48 +281,34 @@ # # Ethernet (10000 Mbit) # -# CONFIG_PPP is not set -# CONFIG_SLIP is not set # -# Wireless LAN (non-hamradio) +# Token Ring devices # -# CONFIG_NET_RADIO is not set # -# Token Ring devices (depends on LLC=y) +# Wireless LAN (non-hamradio) # -# CONFIG_SHAPER is not set +# CONFIG_NET_RADIO is not set # # Wan interfaces # # CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set - -# -# Graphics support -# -# CONFIG_FB is not set +# CONFIG_ISDN is not set # -# Old CD-ROM drivers (not SCSI, not IDE) +# Telephony Support # -# CONFIG_CD_NO_IDESCSI is not set +# CONFIG_PHONE is not set # # Input device support @@ -283,54 +325,38 @@ # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y # CONFIG_SERIO is not set +# CONFIG_SERIO_I8042 is not set # # Input Device Drivers # # -# Macintosh device drivers -# - -# # Character devices # +# CONFIG_VT is not set # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_CPM=y +CONFIG_SERIAL_CPM_CONSOLE=y +# CONFIG_SERIAL_CPM_SCC1 is not set +CONFIG_SERIAL_CPM_SCC2=y +CONFIG_SERIAL_CPM_SCC3=y +# CONFIG_SERIAL_CPM_SCC4 is not set +CONFIG_SERIAL_CPM_SMC1=y +CONFIG_SERIAL_CPM_SMC2=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Hardware Sensors Mainboard support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_LEGACY_PTYS is not set # # IPMI @@ -346,16 +372,27 @@ # CONFIG_GEN_RTC_X is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set # CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set -# CONFIG_HANGCHECK_TIMER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# # # Multimedia devices @@ -368,6 +405,27 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -385,6 +443,7 @@ # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -397,17 +456,22 @@ # # DOS/FAT/NT Filesystems # -# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # @@ -416,6 +480,7 @@ # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -432,17 +497,18 @@ CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set # CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set CONFIG_ROOT_NFS=y CONFIG_LOCKD=y # CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -456,16 +522,15 @@ # CONFIG_MAC_PARTITION is not set # CONFIG_MSDOS_PARTITION is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set # CONFIG_EFI_PARTITION is not set # -# Sound +# Native Language Support # -# CONFIG_SOUND is not set +# CONFIG_NLS is not set # # MPC8xx CPM Options @@ -477,42 +542,38 @@ CONFIG_FEC_ENET=y # CONFIG_USE_MDIO is not set CONFIG_ENET_BIG_BUFFERS=y -CONFIG_SMC2_UART=y -# CONFIG_ALTSMC2 is not set -# CONFIG_CONS_SMC2 is not set -CONFIG_USE_SCC_IO=y # # Generic MPC8xx Options # CONFIG_8xx_COPYBACK=y # CONFIG_8xx_CPU6 is not set -# CONFIG_UCODE_PATCH is not set - -# -# USB support -# -# CONFIG_USB_GADGET is not set +CONFIG_NO_UCODE_PATCH=y +# CONFIG_USB_SOF_UCODE_PATCH is not set +# CONFIG_I2C_SPI_UCODE_PATCH is not set +# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set # -# Bluetooth support +# Library routines # -# CONFIG_BT is not set +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC32 is not set +# CONFIG_LIBCRC32C is not set # -# Library routines +# Profiling support # -# CONFIG_CRC32 is not set +# CONFIG_PROFILING is not set # # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_KALLSYMS is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/ppc/configs/rpxlite_defconfig b/arch/ppc/configs/rpxlite_defconfig --- a/arch/ppc/configs/rpxlite_defconfig 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/configs/rpxlite_defconfig 2004-11-10 17:19:06 -08:00 @@ -1,26 +1,49 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.10-rc1 +# Mon Nov 1 16:41:09 2004 # CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_HAVE_DEC_LOCK=y +CONFIG_PPC=y +CONFIG_PPC32=y +CONFIG_GENERIC_NVRAM=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +# CONFIG_CLEAN_COMPILE is not set +CONFIG_BROKEN=y +CONFIG_BROKEN_ON_SMP=y # # General setup # -CONFIG_SWAP=y +CONFIG_LOCALVERSION="" +# CONFIG_SWAP is not set CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_HOTPLUG is not set +# CONFIG_KOBJECT_UEVENT is not set +# CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y -CONFIG_FUTEX=y +# CONFIG_KALLSYMS is not set +# CONFIG_FUTEX is not set # CONFIG_EPOLL is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +# CONFIG_SHMEM is not set +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +CONFIG_TINY_SHMEM=y # # Loadable module support @@ -28,21 +51,23 @@ # CONFIG_MODULES is not set # -# Platform support +# Processor # -CONFIG_PPC=y -CONFIG_PPC32=y # CONFIG_6xx is not set # CONFIG_40x is not set +# CONFIG_44x is not set # CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set CONFIG_8xx=y +# CONFIG_E500 is not set +CONFIG_MATH_EMULATION=y +# CONFIG_CPU_FREQ is not set +CONFIG_EMBEDDEDBOOT=y +CONFIG_NOT_COHERENT_CACHE=y # -# IBM 4xx options +# Platform options # -CONFIG_EMBEDDEDBOOT=y -CONFIG_SERIAL_CONSOLE=y -CONFIG_NOT_COHERENT_CACHE=y CONFIG_RPXLITE=y # CONFIG_RPXCLASSIC is not set # CONFIG_BSEIP is not set @@ -66,27 +91,17 @@ # CONFIG_WINCEPT is not set # CONFIG_SMP is not set # CONFIG_PREEMPT is not set -CONFIG_MATH_EMULATION=y -# CONFIG_CPU_FREQ is not set - -# -# General setup -# # CONFIG_HIGHMEM is not set -# CONFIG_PCI is not set -# CONFIG_PCI_DOMAINS is not set -# CONFIG_PCI_QSPAN is not set -CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y -CONFIG_KERNEL_ELF=y # CONFIG_BINFMT_MISC is not set -# CONFIG_HOTPLUG is not set +# CONFIG_CMDLINE_BOOL is not set # -# Parallel port support +# Bus options # -# CONFIG_PARPORT is not set -# CONFIG_CMDLINE_BOOL is not set +# CONFIG_PCI is not set +# CONFIG_PCI_DOMAINS is not set +# CONFIG_PCI_QSPAN is not set # # Advanced setup @@ -100,52 +115,89 @@ CONFIG_LOWMEM_SIZE=0x30000000 CONFIG_KERNEL_START=0xc0000000 CONFIG_TASK_SIZE=0x80000000 +CONFIG_CONSISTENT_START=0xff100000 +CONFIG_CONSISTENT_SIZE=0x00200000 CONFIG_BOOT_LOAD=0x00400000 # +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y + +# # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # -# CONFIG_PNP is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_LBD is not set +# CONFIG_CDROM_PKTCDVD is not set # -# Multi-device support (RAID and LVM) +# IO Schedulers # -# CONFIG_MD is not set +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # -# ATA/IDE/MFM/RLL support +# ATA/ATAPI/MFM/RLL support # # CONFIG_IDE is not set # -# SCSI support +# SCSI device support # # CONFIG_SCSI is not set # +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# # Fusion MPT device support # # +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# # I2O device support # # +# Macintosh device drivers +# + +# # Networking support # CONFIG_NET=y @@ -156,60 +208,64 @@ CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set # CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_DHCP is not set CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set -CONFIG_SYN_COOKIES=y +# CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set # CONFIG_IPV6 is not set -# CONFIG_XFRM_USER is not set +# CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set # CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set # # Ethernet (10 or 100Mbit) @@ -225,48 +281,34 @@ # # Ethernet (10000 Mbit) # -# CONFIG_PPP is not set -# CONFIG_SLIP is not set # -# Wireless LAN (non-hamradio) +# Token Ring devices # -# CONFIG_NET_RADIO is not set # -# Token Ring devices (depends on LLC=y) +# Wireless LAN (non-hamradio) # -# CONFIG_SHAPER is not set +# CONFIG_NET_RADIO is not set # # Wan interfaces # # CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set - -# -# Graphics support -# -# CONFIG_FB is not set +# CONFIG_ISDN is not set # -# Old CD-ROM drivers (not SCSI, not IDE) +# Telephony Support # -# CONFIG_CD_NO_IDESCSI is not set +# CONFIG_PHONE is not set # # Input device support @@ -283,54 +325,38 @@ # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y # CONFIG_SERIO is not set +# CONFIG_SERIO_I8042 is not set # # Input Device Drivers # # -# Macintosh device drivers -# - -# # Character devices # +# CONFIG_VT is not set # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_CPM=y +CONFIG_SERIAL_CPM_CONSOLE=y +# CONFIG_SERIAL_CPM_SCC1 is not set +# CONFIG_SERIAL_CPM_SCC2 is not set +# CONFIG_SERIAL_CPM_SCC3 is not set +# CONFIG_SERIAL_CPM_SCC4 is not set +CONFIG_SERIAL_CPM_SMC1=y +# CONFIG_SERIAL_CPM_SMC2 is not set CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Hardware Sensors Mainboard support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_LEGACY_PTYS is not set # # IPMI @@ -346,16 +372,27 @@ # CONFIG_GEN_RTC_X is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set # CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set -# CONFIG_HANGCHECK_TIMER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# # # Multimedia devices @@ -368,6 +405,27 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -385,6 +443,7 @@ # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -397,17 +456,22 @@ # # DOS/FAT/NT Filesystems # -# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # @@ -416,6 +480,7 @@ # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -432,17 +497,18 @@ CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set # CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set CONFIG_ROOT_NFS=y CONFIG_LOCKD=y # CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -456,16 +522,15 @@ # CONFIG_MAC_PARTITION is not set # CONFIG_MSDOS_PARTITION is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set # CONFIG_EFI_PARTITION is not set # -# Sound +# Native Language Support # -# CONFIG_SOUND is not set +# CONFIG_NLS is not set # # MPC8xx CPM Options @@ -476,40 +541,38 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set # CONFIG_ENET_BIG_BUFFERS is not set -# CONFIG_SMC2_UART is not set -# CONFIG_USE_SCC_IO is not set # # Generic MPC8xx Options # CONFIG_8xx_COPYBACK=y # CONFIG_8xx_CPU6 is not set -# CONFIG_UCODE_PATCH is not set - -# -# USB support -# -# CONFIG_USB_GADGET is not set +CONFIG_NO_UCODE_PATCH=y +# CONFIG_USB_SOF_UCODE_PATCH is not set +# CONFIG_I2C_SPI_UCODE_PATCH is not set +# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set # -# Bluetooth support +# Library routines # -# CONFIG_BT is not set +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC32 is not set +# CONFIG_LIBCRC32C is not set # -# Library routines +# Profiling support # -# CONFIG_CRC32 is not set +# CONFIG_PROFILING is not set # # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_KALLSYMS is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile --- a/arch/ppc/kernel/Makefile 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/kernel/Makefile 2004-11-10 17:19:06 -08:00 @@ -25,7 +25,7 @@ obj-$(CONFIG_TAU) += temp.o obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o -ifdef CONFIG_MATH_EMULATION +ifndef CONFIG_MATH_EMULATION obj-$(CONFIG_8xx) += softemu8xx.o endif diff -Nru a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S --- a/arch/ppc/kernel/head_44x.S 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc/kernel/head_44x.S 2004-11-10 17:19:03 -08:00 @@ -599,64 +599,8 @@ mfspr r10, SPRG0 b InstructionStorage -/* Check for a single step debug exception while in an exception - * handler before state has been saved. This is to catch the case - * where an instruction that we are trying to single step causes - * an exception (eg ITLB/DTLB miss) and thus the first instruction of - * the exception handler generates a single step debug exception. - * - * If we get a debug trap on the first instruction of an exception handler, - * we reset the MSR_DE in the _exception handler's_ MSR (the debug trap is - * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR). - * The exception handler was handling a non-critical interrupt, so it will - * save (and later restore) the MSR via SPRN_SRR1, which will still have - * the MSR_DE bit set. - */ /* Debug Interrupt */ - START_EXCEPTION(Debug) - CRITICAL_EXCEPTION_PROLOG - - /* - * If this is a single step or branch-taken exception in an - * exception entry sequence, it was probably meant to apply to - * the code where the exception occurred (since exception entry - * doesn't turn off DE automatically). We simulate the effect - * of turning off DE on entry to an exception handler by turning - * off DE in the CSRR1 value and clearing the debug status. - */ - mfspr r10,SPRN_DBSR /* check single-step/branch taken */ - andis. r10,r10,(DBSR_IC|DBSR_BT)@h - beq+ 1f - andi. r0,r9,MSR_PR /* check supervisor */ - beq 2f /* branch if we need to fix it up... */ - - /* continue normal handling for a critical exception... */ -1: mfspr r4,SPRN_DBSR - addi r3,r1,STACK_FRAME_OVERHEAD - EXC_XFER_TEMPLATE(DebugException, 0x2002, \ - (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ - NOCOPY, crit_transfer_to_handler, ret_from_crit_exc) - - /* here it looks like we got an inappropriate debug exception. */ -2: rlwinm r9,r9,0,~MSR_DE /* clear DE in the CSRR1 value */ - mtspr SPRN_DBSR,r10 /* clear the IC/BT debug intr status */ - /* restore state and get out */ - lwz r10,_CCR(r11) - lwz r0,GPR0(r11) - lwz r1,GPR1(r11) - mtcrf 0x80,r10 - mtspr CSRR0,r12 - mtspr CSRR1,r9 - lwz r9,GPR9(r11) - - mtspr SPRG2,r8; /* SPRG2 only used in criticals */ - lis r8,crit_save@ha; - lwz r10,crit_r10@l(r8) - lwz r11,crit_r11@l(r8) - mfspr r8,SPRG2 - - rfci - b . + DEBUG_EXCEPTION /* * Local functions diff -Nru a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S --- a/arch/ppc/kernel/head_4xx.S 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc/kernel/head_4xx.S 2004-11-10 17:19:07 -08:00 @@ -709,8 +709,20 @@ EXCEPTION(0x1E00, Trap_1E, UnknownException, EXC_XFER_EE) EXCEPTION(0x1F00, Trap_1F, UnknownException, EXC_XFER_EE) -/* 0x2000 - Debug Exception -*/ +/* Check for a single step debug exception while in an exception + * handler before state has been saved. This is to catch the case + * where an instruction that we are trying to single step causes + * an exception (eg ITLB/DTLB miss) and thus the first instruction of + * the exception handler generates a single step debug exception. + * + * If we get a debug trap on the first instruction of an exception handler, + * we reset the MSR_DE in the _exception handler's_ MSR (the debug trap is + * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR). + * The exception handler was handling a non-critical interrupt, so it will + * save (and later restore) the MSR via SPRN_SRR1, which will still have + * the MSR_DE bit set. + */ + /* 0x2000 - Debug Exception */ START_EXCEPTION(0x2000, DebugTrap) CRITICAL_EXCEPTION_PROLOG @@ -723,21 +735,20 @@ * off DE in the SRR3 value and clearing the debug status. */ mfspr r10,SPRN_DBSR /* check single-step/branch taken */ - andis. r10,r10,(DBSR_IC|DBSR_BT)@h - beq+ 1f - andi. r0,r9,MSR_IR|MSR_PR /* check supervisor + MMU off */ - beq 2f /* branch if we need to fix it up... */ + andis. r10,r10,DBSR_IC@h + beq+ 2f - /* continue normal handling for a critical exception... */ -1: mfspr r4,SPRN_DBSR - addi r3,r1,STACK_FRAME_OVERHEAD - EXC_XFER_TEMPLATE(DebugException, 0x2002, \ - (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ - NOCOPY, crit_transfer_to_handler, ret_from_crit_exc) + andi. r10,r9,MSR_IR|MSR_PR /* check supervisor + MMU off */ + beq 1f /* branch and fix it up */ + + mfspr r10,SPRN_SRR2 /* Faulting instruction address */ + cmplwi r10,0x2100 + bgt+ 2f /* address above exception vectors */ /* here it looks like we got an inappropriate debug exception. */ -2: rlwinm r9,r9,0,~MSR_DE /* clear DE in the SRR3 value */ - mtspr SPRN_DBSR,r10 /* clear the IC/BT debug intr status */ +1: rlwinm r9,r9,0,~MSR_DE /* clear DE in the SRR3 value */ + lis r10,DBSR_IC@h /* clear the IC event */ + mtspr SPRN_DBSR,r10 /* restore state and get out */ lwz r10,_CCR(r11) lwz r0,GPR0(r11) @@ -752,6 +763,13 @@ PPC405_ERR77_SYNC rfci b . + + /* continue normal handling for a critical exception... */ +2: mfspr r4,SPRN_DBSR + addi r3,r1,STACK_FRAME_OVERHEAD + EXC_XFER_TEMPLATE(DebugException, 0x2002, \ + (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ + NOCOPY, crit_transfer_to_handler, ret_from_crit_exc) /* * The other Data TLB exceptions bail out to this point diff -Nru a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S --- a/arch/ppc/kernel/head_8xx.S 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc/kernel/head_8xx.S 2004-11-10 17:19:04 -08:00 @@ -32,14 +32,18 @@ #include #include +/* Macro to make the code more readable. */ +#ifdef CONFIG_8xx_CPU6 +#define DO_8xx_CPU6(val, reg) \ + li reg, val; \ + stw reg, 12(r0); \ + lwz reg, 12(r0); +#else +#define DO_8xx_CPU6(val, reg) +#endif .text .globl _stext _stext: - -/* - * _start is defined this way because the XCOFF loader in the OpenFirmware - * on the powermac expects the entry point to be a procedure descriptor. - */ .text .globl _start _start: @@ -77,7 +81,6 @@ * and the CCR at memory location 0.....Someday I'll fix this..... * -- Dan */ - .globl __start __start: mr r31,r3 /* save parameters */ @@ -85,7 +88,6 @@ mr r29,r5 mr r28,r6 mr r27,r7 - li r24,0 /* cpu # */ /* We have to turn on the MMU right away so we get cache modes * set correctly. @@ -113,63 +115,106 @@ * task's thread_struct. */ #define EXCEPTION_PROLOG \ - mtspr SPRG0,r20; \ - mtspr SPRG1,r21; \ - mfcr r20; \ - mfspr r21,SPRG2; /* exception stack to use from */ \ - cmpwi 0,r21,0; /* user mode or RTAS */ \ - bne 1f; \ - tophys(r21,r1); /* use tophys(kernel sp) otherwise */ \ - subi r21,r21,INT_FRAME_SIZE; /* alloc exc. frame */\ -1: stw r20,_CCR(r21); /* save registers */ \ - stw r22,GPR22(r21); \ - stw r23,GPR23(r21); \ - mfspr r20,SPRG0; \ - stw r20,GPR20(r21); \ - mfspr r22,SPRG1; \ - stw r22,GPR21(r21); \ - mflr r20; \ - stw r20,_LINK(r21); \ - mfctr r22; \ - stw r22,_CTR(r21); \ - mfspr r20,XER; \ - stw r20,_XER(r21); \ - mfspr r22,SRR0; \ - mfspr r23,SRR1; \ - stw r0,GPR0(r21); \ - stw r1,GPR1(r21); \ - stw r2,GPR2(r21); \ - stw r1,0(r21); \ - tovirt(r1,r21); /* set new kernel sp */ \ - SAVE_4GPRS(3, r21); \ - SAVE_GPR(7, r21); + mtspr SPRG0,r10; \ + mtspr SPRG1,r11; \ + mfcr r10; \ + EXCEPTION_PROLOG_1; \ + EXCEPTION_PROLOG_2 + +#define EXCEPTION_PROLOG_1 \ + mfspr r11,SRR1; /* check whether user or kernel */ \ + andi. r11,r11,MSR_PR; \ + tophys(r11,r1); /* use tophys(r1) if kernel */ \ + beq 1f; \ + mfspr r11,SPRG3; \ + lwz r11,THREAD_INFO-THREAD(r11); \ + addi r11,r11,THREAD_SIZE; \ + tophys(r11,r11); \ +1: subi r11,r11,INT_FRAME_SIZE /* alloc exc. frame */ + + +#define EXCEPTION_PROLOG_2 \ + CLR_TOP32(r11); \ + stw r10,_CCR(r11); /* save registers */ \ + stw r12,GPR12(r11); \ + stw r9,GPR9(r11); \ + mfspr r10,SPRG0; \ + stw r10,GPR10(r11); \ + mfspr r12,SPRG1; \ + stw r12,GPR11(r11); \ + mflr r10; \ + stw r10,_LINK(r11); \ + mfspr r12,SRR0; \ + mfspr r9,SRR1; \ + stw r1,GPR1(r11); \ + stw r1,0(r11); \ + tovirt(r1,r11); /* set new kernel sp */ \ + li r10,MSR_KERNEL & ~(MSR_IR|MSR_DR); /* can take exceptions */ \ + MTMSRD(r10); /* (except for mach check in rtas) */ \ + stw r0,GPR0(r11); \ + SAVE_4GPRS(3, r11); \ + SAVE_2GPRS(7, r11) + /* * Note: code which follows this uses cr0.eq (set if from kernel), - * r21, r22 (SRR0), and r23 (SRR1). + * r11, r12 (SRR0), and r9 (SRR1). + * + * Note2: once we have set r1 we are in a position to take exceptions + * again, and we could thus set MSR:RI at that point. */ /* * Exception vectors. */ -#define STD_EXCEPTION(n, label, hdlr) \ +#define EXCEPTION(n, label, hdlr, xfer) \ . = n; \ label: \ EXCEPTION_PROLOG; \ addi r3,r1,STACK_FRAME_OVERHEAD; \ - li r20,MSR_KERNEL; \ - bl transfer_to_handler; \ - .long hdlr; \ - .long ret_from_except + xfer(n, hdlr) + +#define EXC_XFER_TEMPLATE(n, hdlr, trap, copyee, tfer, ret) \ + li r10,trap; \ + stw r10,TRAP(r11); \ + li r10,MSR_KERNEL; \ + copyee(r10, r9); \ + bl tfer; \ +i##n: \ + .long hdlr; \ + .long ret + +#define COPY_EE(d, s) rlwimi d,s,0,16,16 +#define NOCOPY(d, s) + +#define EXC_XFER_STD(n, hdlr) \ + EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full, \ + ret_from_except_full) + +#define EXC_XFER_LITE(n, hdlr) \ + EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \ + ret_from_except) + +#define EXC_XFER_EE(n, hdlr) \ + EXC_XFER_TEMPLATE(n, hdlr, n, COPY_EE, transfer_to_handler_full, \ + ret_from_except_full) + +#define EXC_XFER_EE_LITE(n, hdlr) \ + EXC_XFER_TEMPLATE(n, hdlr, n+1, COPY_EE, transfer_to_handler, \ + ret_from_except) /* System reset */ -#ifdef CONFIG_SMP /* MVME/MTX start the secondary here */ - STD_EXCEPTION(0x100, Reset, __secondary_start_psurge) -#else - STD_EXCEPTION(0x100, Reset, UnknownException) -#endif + EXCEPTION(0x100, Reset, UnknownException, EXC_XFER_STD) /* Machine check */ - STD_EXCEPTION(0x200, MachineCheck, MachineCheckException) + . = 0x200 +MachineCheck: + EXCEPTION_PROLOG + mfspr r4,DAR + stw r4,_DAR(r11) + mfspr r5,DSISR + stw r5,_DSISR(r11) + addi r3,r1,STACK_FRAME_OVERHEAD + EXC_XFER_STD(0x200, MachineCheckException) /* Data access exception. * This is "never generated" by the MPC8xx. We jump to it for other @@ -178,17 +223,11 @@ . = 0x300 DataAccess: EXCEPTION_PROLOG - mfspr r20,DSISR - stw r20,_DSISR(r21) - mr r5,r20 + mfspr r10,DSISR + stw r10,_DSISR(r11) + mr r5,r10 mfspr r4,DAR - stw r4,_DAR(r21) - addi r3,r1,STACK_FRAME_OVERHEAD - li r20,MSR_KERNEL - rlwimi r20,r23,0,16,16 /* copy EE bit from saved MSR */ - bl transfer_to_handler - .long do_page_fault - .long ret_from_except + EXC_XFER_EE_LITE(0x300, handle_page_fault) /* Instruction access exception. * This is "never generated" by the MPC8xx. We jump to it for other @@ -197,94 +236,52 @@ . = 0x400 InstructionAccess: EXCEPTION_PROLOG - addi r3,r1,STACK_FRAME_OVERHEAD - mr r4,r22 - mr r5,r23 - li r20,MSR_KERNEL - rlwimi r20,r23,0,16,16 /* copy EE bit from saved MSR */ - bl transfer_to_handler - .long do_page_fault - .long ret_from_except + mr r4,r12 + mr r5,r9 + EXC_XFER_EE_LITE(0x400, handle_page_fault) /* External interrupt */ - . = 0x500; -HardwareInterrupt: - EXCEPTION_PROLOG; - addi r3,r1,STACK_FRAME_OVERHEAD - li r20,MSR_KERNEL - li r4,0 - bl transfer_to_handler - .globl do_IRQ_intercept -do_IRQ_intercept: - .long do_IRQ; - .long ret_from_intercept - + EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE) /* Alignment exception */ . = 0x600 Alignment: EXCEPTION_PROLOG mfspr r4,DAR - stw r4,_DAR(r21) + stw r4,_DAR(r11) mfspr r5,DSISR - stw r5,_DSISR(r21) + stw r5,_DSISR(r11) addi r3,r1,STACK_FRAME_OVERHEAD - li r20,MSR_KERNEL - rlwimi r20,r23,0,16,16 /* copy EE bit from saved MSR */ - bl transfer_to_handler - .long AlignmentException - .long ret_from_except + EXC_XFER_EE(0x600, AlignmentException) /* Program check exception */ - . = 0x700 -ProgramCheck: - EXCEPTION_PROLOG - addi r3,r1,STACK_FRAME_OVERHEAD - li r20,MSR_KERNEL - rlwimi r20,r23,0,16,16 /* copy EE bit from saved MSR */ - bl transfer_to_handler - .long ProgramCheckException - .long ret_from_except + EXCEPTION(0x700, ProgramCheck, ProgramCheckException, EXC_XFER_STD) /* No FPU on MPC8xx. This exception is not supposed to happen. */ - STD_EXCEPTION(0x800, FPUnavailable, UnknownException) + EXCEPTION(0x800, FPUnavailable, UnknownException, EXC_XFER_STD) - . = 0x900 -Decrementer: - EXCEPTION_PROLOG - addi r3,r1,STACK_FRAME_OVERHEAD - li r20,MSR_KERNEL - bl transfer_to_handler - .globl timer_interrupt_intercept -timer_interrupt_intercept: - .long timer_interrupt - .long ret_from_intercept +/* Decrementer */ + EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE) - STD_EXCEPTION(0xa00, Trap_0a, UnknownException) - STD_EXCEPTION(0xb00, Trap_0b, UnknownException) + EXCEPTION(0xa00, Trap_0a, UnknownException, EXC_XFER_EE) + EXCEPTION(0xb00, Trap_0b, UnknownException, EXC_XFER_EE) /* System call */ . = 0xc00 SystemCall: EXCEPTION_PROLOG - stw r3,ORIG_GPR3(r21) - li r20,MSR_KERNEL - rlwimi r20,r23,0,16,16 /* copy EE bit from saved MSR */ - bl transfer_to_handler - .long DoSyscall - .long ret_from_except + EXC_XFER_EE_LITE(0xc00, DoSyscall) /* Single step - not used on 601 */ - STD_EXCEPTION(0xd00, SingleStep, SingleStepException) - - STD_EXCEPTION(0xe00, Trap_0e, UnknownException) - STD_EXCEPTION(0xf00, Trap_0f, UnknownException) + EXCEPTION(0xd00, SingleStep, SingleStepException, EXC_XFER_STD) + EXCEPTION(0xe00, Trap_0e, UnknownException, EXC_XFER_EE) + EXCEPTION(0xf00, Trap_0f, UnknownException, EXC_XFER_EE) /* On the MPC8xx, this is a software emulation interrupt. It occurs * for all unimplemented and illegal instructions. */ - STD_EXCEPTION(0x1000, SoftEmu, SoftwareEmulation) + EXCEPTION(0x1000, SoftEmu, SoftwareEmulation, EXC_XFER_STD) . = 0x1100 /* @@ -302,58 +299,43 @@ InstructionTLBMiss: #ifdef CONFIG_8xx_CPU6 stw r3, 8(r0) - li r3, 0x3f80 - stw r3, 12(r0) - lwz r3, 12(r0) #endif - mtspr M_TW, r20 /* Save a couple of working registers */ - mfcr r20 - stw r20, 0(r0) - stw r21, 4(r0) - mfspr r20, SRR0 /* Get effective address of fault */ -#ifdef CONFIG_8xx_CPU6 - li r3, 0x3780 - stw r3, 12(r0) - lwz r3, 12(r0) -#endif - mtspr MD_EPN, r20 /* Have to use MD_EPN for walk, MI_EPN can't */ - mfspr r20, M_TWB /* Get level 1 table entry address */ + DO_8xx_CPU6(0x3f80, r3) + mtspr M_TW, r10 /* Save a couple of working registers */ + mfcr r10 + stw r10, 0(r0) + stw r11, 4(r0) + mfspr r10, SRR0 /* Get effective address of fault */ + DO_8xx_CPU6(0x3780, r3) + mtspr MD_EPN, r10 /* Have to use MD_EPN for walk, MI_EPN can't */ + mfspr r10, M_TWB /* Get level 1 table entry address */ /* If we are faulting a kernel address, we have to use the * kernel page tables. */ - andi. r21, r20, 0x0800 /* Address >= 0x80000000 */ + andi. r11, r10, 0x0800 /* Address >= 0x80000000 */ beq 3f - lis r21, swapper_pg_dir@h - ori r21, r21, swapper_pg_dir@l - rlwimi r20, r21, 0, 2, 19 + lis r11, swapper_pg_dir@h + ori r11, r11, swapper_pg_dir@l + rlwimi r10, r11, 0, 2, 19 3: - lwz r21, 0(r20) /* Get the level 1 entry */ - rlwinm. r20, r21,0,0,19 /* Extract page descriptor page address */ + lwz r11, 0(r10) /* Get the level 1 entry */ + rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */ beq 2f /* If zero, don't try to find a pte */ /* We have a pte table, so load the MI_TWC with the attributes * for this "segment." */ - tophys(r21,r21) - ori r21,r21,1 /* Set valid bit */ -#ifdef CONFIG_8xx_CPU6 - li r3, 0x2b80 - stw r3, 12(r0) - lwz r3, 12(r0) -#endif - mtspr MI_TWC, r21 /* Set segment attributes */ -#ifdef CONFIG_8xx_CPU6 - li r3, 0x3b80 - stw r3, 12(r0) - lwz r3, 12(r0) -#endif - mtspr MD_TWC, r21 /* Load pte table base address */ - mfspr r21, MD_TWC /* ....and get the pte address */ - lwz r20, 0(r21) /* Get the pte */ + ori r11,r11,1 /* Set valid bit */ + DO_8xx_CPU6(0x2b80, r3) + mtspr MI_TWC, r11 /* Set segment attributes */ + DO_8xx_CPU6(0x3b80, r3) + mtspr MD_TWC, r11 /* Load pte table base address */ + mfspr r11, MD_TWC /* ....and get the pte address */ + lwz r10, 0(r11) /* Get the pte */ - ori r20, r20, _PAGE_ACCESSED - stw r20, 0(r21) + ori r10, r10, _PAGE_ACCESSED + stw r10, 0(r11) /* The Linux PTE won't go exactly into the MMU TLB. * Software indicator bits 21, 22 and 28 must be clear. @@ -361,29 +343,24 @@ * set. All other Linux PTE bits control the behavior * of the MMU. */ - li r21, 0x00f0 - rlwimi r20, r21, 0, 24, 28 /* Set 24-27, clear 28 */ - -#ifdef CONFIG_8xx_CPU6 - li r3, 0x2d80 - stw r3, 12(r0) - lwz r3, 12(r0) -#endif - mtspr MI_RPN, r20 /* Update TLB entry */ - - mfspr r20, M_TW /* Restore registers */ - lwz r21, 0(r0) - mtcr r21 - lwz r21, 4(r0) + li r11, 0x00f0 + rlwimi r10, r11, 0, 24, 28 /* Set 24-27, clear 28 */ + DO_8xx_CPU6(0x2d80, r3) + mtspr MI_RPN, r10 /* Update TLB entry */ + + mfspr r10, M_TW /* Restore registers */ + lwz r11, 0(r0) + mtcr r11 + lwz r11, 4(r0) #ifdef CONFIG_8xx_CPU6 lwz r3, 8(r0) #endif rfi -2: mfspr r20, M_TW /* Restore registers */ - lwz r21, 0(r0) - mtcr r21 - lwz r21, 4(r0) +2: mfspr r10, M_TW /* Restore registers */ + lwz r11, 0(r0) + mtcr r11 + lwz r11, 4(r0) #ifdef CONFIG_8xx_CPU6 lwz r3, 8(r0) #endif @@ -393,41 +370,34 @@ DataStoreTLBMiss: #ifdef CONFIG_8xx_CPU6 stw r3, 8(r0) - li r3, 0x3f80 - stw r3, 12(r0) - lwz r3, 12(r0) #endif - mtspr M_TW, r20 /* Save a couple of working registers */ - mfcr r20 - stw r20, 0(r0) - stw r21, 4(r0) - mfspr r20, M_TWB /* Get level 1 table entry address */ + DO_8xx_CPU6(0x3f80, r3) + mtspr M_TW, r10 /* Save a couple of working registers */ + mfcr r10 + stw r10, 0(r0) + stw r11, 4(r0) + mfspr r10, M_TWB /* Get level 1 table entry address */ /* If we are faulting a kernel address, we have to use the * kernel page tables. */ - andi. r21, r20, 0x0800 + andi. r11, r10, 0x0800 beq 3f - lis r21, swapper_pg_dir@h - ori r21, r21, swapper_pg_dir@l - rlwimi r20, r21, 0, 2, 19 + lis r11, swapper_pg_dir@h + ori r11, r11, swapper_pg_dir@l + rlwimi r10, r11, 0, 2, 19 3: - lwz r21, 0(r20) /* Get the level 1 entry */ - rlwinm. r20, r21,0,0,19 /* Extract page descriptor page address */ + lwz r11, 0(r10) /* Get the level 1 entry */ + rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */ beq 2f /* If zero, don't try to find a pte */ /* We have a pte table, so load fetch the pte from the table. */ - tophys(r21, r21) - ori r21, r21, 1 /* Set valid bit in physical L2 page */ -#ifdef CONFIG_8xx_CPU6 - li r3, 0x3b80 - stw r3, 12(r0) - lwz r3, 12(r0) -#endif - mtspr MD_TWC, r21 /* Load pte table base address */ - mfspr r20, MD_TWC /* ....and get the pte address */ - lwz r20, 0(r20) /* Get the pte */ + ori r11, r11, 1 /* Set valid bit in physical L2 page */ + DO_8xx_CPU6(0x3b80, r3) + mtspr MD_TWC, r11 /* Load pte table base address */ + mfspr r10, MD_TWC /* ....and get the pte address */ + lwz r10, 0(r10) /* Get the pte */ /* Insert the Guarded flag into the TWC from the Linux PTE. * It is bit 27 of both the Linux PTE and the TWC (at least @@ -435,17 +405,13 @@ * this into the Linux pgd/pmd and load it in the operation * above. */ - rlwimi r21, r20, 0, 27, 27 -#ifdef CONFIG_8xx_CPU6 - li r3, 0x3b80 - stw r3, 12(r0) - lwz r3, 12(r0) -#endif - mtspr MD_TWC, r21 - - mfspr r21, MD_TWC /* get the pte address again */ - ori r20, r20, _PAGE_ACCESSED - stw r20, 0(r21) + rlwimi r11, r10, 0, 27, 27 + DO_8xx_CPU6(0x3b80, r3) + mtspr MD_TWC, r11 + + mfspr r11, MD_TWC /* get the pte address again */ + ori r10, r10, _PAGE_ACCESSED + stw r10, 0(r11) /* The Linux PTE won't go exactly into the MMU TLB. * Software indicator bits 21, 22 and 28 must be clear. @@ -453,29 +419,24 @@ * set. All other Linux PTE bits control the behavior * of the MMU. */ - li r21, 0x00f0 - rlwimi r20, r21, 0, 24, 28 /* Set 24-27, clear 28 */ - -#ifdef CONFIG_8xx_CPU6 - li r3, 0x3d80 - stw r3, 12(r0) - lwz r3, 12(r0) -#endif - mtspr MD_RPN, r20 /* Update TLB entry */ - - mfspr r20, M_TW /* Restore registers */ - lwz r21, 0(r0) - mtcr r21 - lwz r21, 4(r0) + li r11, 0x00f0 + rlwimi r10, r11, 0, 24, 28 /* Set 24-27, clear 28 */ + DO_8xx_CPU6(0x3d80, r3) + mtspr MD_RPN, r10 /* Update TLB entry */ + + mfspr r10, M_TW /* Restore registers */ + lwz r11, 0(r0) + mtcr r11 + lwz r11, 4(r0) #ifdef CONFIG_8xx_CPU6 lwz r3, 8(r0) #endif rfi -2: mfspr r20, M_TW /* Restore registers */ - lwz r21, 0(r0) - mtcr r21 - lwz r21, 4(r0) +2: mfspr r10, M_TW /* Restore registers */ + lwz r11, 0(r0) + mtcr r11 + lwz r11, 4(r0) #ifdef CONFIG_8xx_CPU6 lwz r3, 8(r0) #endif @@ -501,19 +462,17 @@ DataTLBError: #ifdef CONFIG_8xx_CPU6 stw r3, 8(r0) - li r3, 0x3f80 - stw r3, 12(r0) - lwz r3, 12(r0) #endif - mtspr M_TW, r20 /* Save a couple of working registers */ - mfcr r20 - stw r20, 0(r0) - stw r21, 4(r0) + DO_8xx_CPU6(0x3f80, r3) + mtspr M_TW, r10 /* Save a couple of working registers */ + mfcr r10 + stw r10, 0(r0) + stw r11, 4(r0) /* First, make sure this was a store operation. */ - mfspr r20, DSISR - andis. r21, r20, 0x0200 /* If set, indicates store op */ + mfspr r10, DSISR + andis. r11, r10, 0x0200 /* If set, indicates store op */ beq 2f /* The EA of a data TLB miss is automatically stored in the MD_EPN @@ -532,54 +491,45 @@ * are initialized in mapin_ram(). This will avoid the problem, * assuming we only use the dcbi instruction on kernel addresses. */ - mfspr r20, DAR - rlwinm r21, r20, 0, 0, 19 - ori r21, r21, MD_EVALID - mfspr r20, M_CASID - rlwimi r21, r20, 0, 28, 31 -#ifdef CONFIG_8xx_CPU6 - li r3, 0x3780 - stw r3, 12(r0) - lwz r3, 12(r0) -#endif - mtspr MD_EPN, r21 + mfspr r10, DAR + rlwinm r11, r10, 0, 0, 19 + ori r11, r11, MD_EVALID + mfspr r10, M_CASID + rlwimi r11, r10, 0, 28, 31 + DO_8xx_CPU6(0x3780, r3) + mtspr MD_EPN, r11 - mfspr r20, M_TWB /* Get level 1 table entry address */ + mfspr r10, M_TWB /* Get level 1 table entry address */ /* If we are faulting a kernel address, we have to use the * kernel page tables. */ - andi. r21, r20, 0x0800 + andi. r11, r10, 0x0800 beq 3f - lis r21, swapper_pg_dir@h - ori r21, r21, swapper_pg_dir@l - rlwimi r20, r21, 0, 2, 19 + lis r11, swapper_pg_dir@h + ori r11, r11, swapper_pg_dir@l + rlwimi r10, r11, 0, 2, 19 3: - lwz r21, 0(r20) /* Get the level 1 entry */ - rlwinm. r20, r21,0,0,19 /* Extract page descriptor page address */ + lwz r11, 0(r10) /* Get the level 1 entry */ + rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */ beq 2f /* If zero, bail */ /* We have a pte table, so fetch the pte from the table. */ - tophys(r21, r21) - ori r21, r21, 1 /* Set valid bit in physical L2 page */ -#ifdef CONFIG_8xx_CPU6 - li r3, 0x3b80 - stw r3, 12(r0) - lwz r3, 12(r0) -#endif - mtspr MD_TWC, r21 /* Load pte table base address */ - mfspr r21, MD_TWC /* ....and get the pte address */ - lwz r20, 0(r21) /* Get the pte */ + ori r11, r11, 1 /* Set valid bit in physical L2 page */ + DO_8xx_CPU6(0x3b80, r3) + mtspr MD_TWC, r11 /* Load pte table base address */ + mfspr r11, MD_TWC /* ....and get the pte address */ + lwz r10, 0(r11) /* Get the pte */ - andi. r21, r20, _PAGE_RW /* Is it writeable? */ + andi. r11, r10, _PAGE_RW /* Is it writeable? */ beq 2f /* Bail out if not */ /* Update 'changed', among others. */ - ori r20, r20, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE - mfspr r21, MD_TWC /* Get pte address again */ - stw r20, 0(r21) /* and update pte in table */ + ori r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE + mfspr r11, MD_TWC /* Get pte address again */ + stw r10, 0(r11) /* and update pte in table */ /* The Linux PTE won't go exactly into the MMU TLB. * Software indicator bits 21, 22 and 28 must be clear. @@ -587,50 +537,45 @@ * set. All other Linux PTE bits control the behavior * of the MMU. */ - li r21, 0x00f0 - rlwimi r20, r21, 0, 24, 28 /* Set 24-27, clear 28 */ - -#ifdef CONFIG_8xx_CPU6 - li r3, 0x3d80 - stw r3, 12(r0) - lwz r3, 12(r0) -#endif - mtspr MD_RPN, r20 /* Update TLB entry */ - - mfspr r20, M_TW /* Restore registers */ - lwz r21, 0(r0) - mtcr r21 - lwz r21, 4(r0) + li r11, 0x00f0 + rlwimi r10, r11, 0, 24, 28 /* Set 24-27, clear 28 */ + DO_8xx_CPU6(0x3d80, r3) + mtspr MD_RPN, r10 /* Update TLB entry */ + + mfspr r10, M_TW /* Restore registers */ + lwz r11, 0(r0) + mtcr r11 + lwz r11, 4(r0) #ifdef CONFIG_8xx_CPU6 lwz r3, 8(r0) #endif rfi 2: - mfspr r20, M_TW /* Restore registers */ - lwz r21, 0(r0) - mtcr r21 - lwz r21, 4(r0) + mfspr r10, M_TW /* Restore registers */ + lwz r11, 0(r0) + mtcr r11 + lwz r11, 4(r0) #ifdef CONFIG_8xx_CPU6 lwz r3, 8(r0) #endif b DataAccess - STD_EXCEPTION(0x1500, Trap_15, UnknownException) - STD_EXCEPTION(0x1600, Trap_16, UnknownException) - STD_EXCEPTION(0x1700, Trap_17, TAUException) - STD_EXCEPTION(0x1800, Trap_18, UnknownException) - STD_EXCEPTION(0x1900, Trap_19, UnknownException) - STD_EXCEPTION(0x1a00, Trap_1a, UnknownException) - STD_EXCEPTION(0x1b00, Trap_1b, UnknownException) + EXCEPTION(0x1500, Trap_15, UnknownException, EXC_XFER_EE) + EXCEPTION(0x1600, Trap_16, UnknownException, EXC_XFER_EE) + EXCEPTION(0x1700, Trap_17, UnknownException, EXC_XFER_EE) + EXCEPTION(0x1800, Trap_18, UnknownException, EXC_XFER_EE) + EXCEPTION(0x1900, Trap_19, UnknownException, EXC_XFER_EE) + EXCEPTION(0x1a00, Trap_1a, UnknownException, EXC_XFER_EE) + EXCEPTION(0x1b00, Trap_1b, UnknownException, EXC_XFER_EE) /* On the MPC8xx, these next four traps are used for development * support of breakpoints and such. Someday I will get around to * using them. */ - STD_EXCEPTION(0x1c00, Trap_1c, UnknownException) - STD_EXCEPTION(0x1d00, Trap_1d, UnknownException) - STD_EXCEPTION(0x1e00, Trap_1e, UnknownException) - STD_EXCEPTION(0x1f00, Trap_1f, UnknownException) + EXCEPTION(0x1c00, Trap_1c, UnknownException, EXC_XFER_EE) + EXCEPTION(0x1d00, Trap_1d, UnknownException, EXC_XFER_EE) + EXCEPTION(0x1e00, Trap_1e, UnknownException, EXC_XFER_EE) + EXCEPTION(0x1f00, Trap_1f, UnknownException, EXC_XFER_EE) . = 0x2000 diff -Nru a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h --- a/arch/ppc/kernel/head_booke.h 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc/kernel/head_booke.h 2004-11-10 17:19:02 -08:00 @@ -237,4 +237,70 @@ ret_from_except) +/* Check for a single step debug exception while in an exception + * handler before state has been saved. This is to catch the case + * where an instruction that we are trying to single step causes + * an exception (eg ITLB/DTLB miss) and thus the first instruction of + * the exception handler generates a single step debug exception. + * + * If we get a debug trap on the first instruction of an exception handler, + * we reset the MSR_DE in the _exception handler's_ MSR (the debug trap is + * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR). + * The exception handler was handling a non-critical interrupt, so it will + * save (and later restore) the MSR via SPRN_CSRR1, which will still have + * the MSR_DE bit set. + */ +#define DEBUG_EXCEPTION \ + START_EXCEPTION(Debug); \ + CRITICAL_EXCEPTION_PROLOG; \ + \ + /* \ + * If there is a single step or branch-taken exception in an \ + * exception entry sequence, it was probably meant to apply to \ + * the code where the exception occurred (since exception entry \ + * doesn't turn off DE automatically). We simulate the effect \ + * of turning off DE on entry to an exception handler by turning \ + * off DE in the CSRR1 value and clearing the debug status. \ + */ \ + mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \ + andis. r10,r10,DBSR_IC@h; \ + beq+ 2f; \ + \ + lis r10,KERNELBASE@h; /* check if exception in vectors */ \ + ori r10,r10,KERNELBASE@l; \ + cmplw r12,r10; \ + blt+ 2f; /* addr below exception vectors */ \ + \ + lis r10,Debug@h; \ + ori r10,r10,Debug@l; \ + cmplw r12,r10; \ + bgt+ 2f; /* addr above exception vectors */ \ + \ + /* here it looks like we got an inappropriate debug exception. */ \ +1: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CSRR1 value */ \ + lis r10,DBSR_IC@h; /* clear the IC event */ \ + mtspr SPRN_DBSR,r10; \ + /* restore state and get out */ \ + lwz r10,_CCR(r11); \ + lwz r0,GPR0(r11); \ + lwz r1,GPR1(r11); \ + mtcrf 0x80,r10; \ + mtspr CSRR0,r12; \ + mtspr CSRR1,r9; \ + lwz r9,GPR9(r11); \ + lwz r12,GPR12(r11); \ + mtspr SPRG2,r8; /* SPRG2 only used in criticals */ \ + lis r8,crit_save@ha; \ + lwz r10,crit_r10@l(r8); \ + lwz r11,crit_r11@l(r8); \ + mfspr r8,SPRG2; \ + \ + rfci; \ + b .; \ + \ + /* continue normal handling for a critical exception... */ \ +2: mfspr r4,SPRN_DBSR; \ + addi r3,r1,STACK_FRAME_OVERHEAD; \ + EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc) + #endif /* __HEAD_BOOKE_H__ */ diff -Nru a/arch/ppc/kernel/head_e500.S b/arch/ppc/kernel/head_e500.S --- a/arch/ppc/kernel/head_e500.S 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/kernel/head_e500.S 2004-11-10 17:19:06 -08:00 @@ -668,64 +668,8 @@ /* Performance Monitor */ EXCEPTION(0x2060, PerformanceMonitor, UnknownException, EXC_XFER_EE) -/* Check for a single step debug exception while in an exception - * handler before state has been saved. This is to catch the case - * where an instruction that we are trying to single step causes - * an exception (eg ITLB/DTLB miss) and thus the first instruction of - * the exception handler generates a single step debug exception. - * - * If we get a debug trap on the first instruction of an exception handler, - * we reset the MSR_DE in the _exception handler's_ MSR (the debug trap is - * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR). - * The exception handler was handling a non-critical interrupt, so it will - * save (and later restore) the MSR via SPRN_SRR1, which will still have - * the MSR_DE bit set. - */ /* Debug Interrupt */ - START_EXCEPTION(Debug) - CRITICAL_EXCEPTION_PROLOG - - /* - * If this is a single step or branch-taken exception in an - * exception entry sequence, it was probably meant to apply to - * the code where the exception occurred (since exception entry - * doesn't turn off DE automatically). We simulate the effect - * of turning off DE on entry to an exception handler by turning - * off DE in the CSRR1 value and clearing the debug status. - */ - mfspr r10,SPRN_DBSR /* check single-step/branch taken */ - andis. r10,r10,(DBSR_IC|DBSR_BT)@h - beq+ 1f - andi. r0,r9,MSR_PR /* check supervisor */ - beq 2f /* branch if we need to fix it up... */ - - /* continue normal handling for a critical exception... */ -1: mfspr r4,SPRN_DBSR - addi r3,r1,STACK_FRAME_OVERHEAD - EXC_XFER_TEMPLATE(DebugException, 0x2002, \ - (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ - NOCOPY, crit_transfer_to_handler, ret_from_crit_exc) - - /* here it looks like we got an inappropriate debug exception. */ -2: rlwinm r9,r9,0,~MSR_DE /* clear DE in the CSRR1 value */ - mtspr SPRN_DBSR,r10 /* clear the IC/BT debug intr status */ - /* restore state and get out */ - lwz r10,_CCR(r11) - lwz r0,GPR0(r11) - lwz r1,GPR1(r11) - mtcrf 0x80,r10 - mtspr CSRR0,r12 - mtspr CSRR1,r9 - lwz r9,GPR9(r11) - - mtspr SPRG2,r8; /* SPRG2 only used in criticals */ - lis r8,crit_save@ha; - lwz r10,crit_r10@l(r8) - lwz r11,crit_r11@l(r8) - mfspr r8,SPRG2 - - rfci - b . + DEBUG_EXCEPTION /* * Local functions diff -Nru a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S --- a/arch/ppc/kernel/misc.S 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/kernel/misc.S 2004-11-10 17:19:06 -08:00 @@ -1447,3 +1447,6 @@ .long sys_mq_notify .long sys_mq_getsetattr .long sys_ni_syscall /* 268 reserved for sys_kexec_load */ + .long sys_add_key + .long sys_request_key /* 270 */ + .long sys_keyctl diff -Nru a/arch/ppc/kernel/ppc-stub.c b/arch/ppc/kernel/ppc-stub.c --- a/arch/ppc/kernel/ppc-stub.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/kernel/ppc-stub.c 2004-11-10 17:19:06 -08:00 @@ -498,7 +498,7 @@ unsigned int tt; /* Trap type code for powerpc */ unsigned char signo; /* Signal that we map this trap into */ } hard_trap_info[] = { -#if defined(CONFIG_40x) +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) { 0x100, SIGINT }, /* critical input interrupt */ { 0x200, SIGSEGV }, /* machine check */ { 0x300, SIGSEGV }, /* data storage */ @@ -521,7 +521,7 @@ ** 0x1100 data TLB miss ** 0x1200 instruction TLB miss */ - { 0x2000, SIGTRAP}, /* debug */ + { 0x2002, SIGTRAP}, /* debug */ #else { 0x200, SIGSEGV }, /* machine check */ { 0x300, SIGSEGV }, /* address error (store) */ @@ -602,11 +602,6 @@ sigval = computeSignal(regs->trap); ptr = remcomOutBuffer; -#if defined(CONFIG_40x) - *ptr++ = 'S'; - *ptr++ = hexchars[sigval >> 4]; - *ptr++ = hexchars[sigval & 0xf]; -#else *ptr++ = 'T'; *ptr++ = hexchars[sigval >> 4]; *ptr++ = hexchars[sigval & 0xf]; @@ -620,8 +615,6 @@ *ptr++ = ':'; ptr = mem2hex(((char *)regs) + SP_REGNUM*4, ptr, 4); *ptr++ = ';'; -#endif - *ptr++ = 0; putpacket(remcomOutBuffer); @@ -774,10 +767,6 @@ * some location may have changed something that is in the instruction cache. */ kgdb_flush_cache_all(); -#if defined(CONFIG_40x) - strcpy(remcomOutBuffer, "OK"); - putpacket(remcomOutBuffer); -#endif mtmsr(msr); kgdb_interruptible(1); @@ -791,10 +780,9 @@ case 's': kgdb_flush_cache_all(); -#if defined(CONFIG_40x) +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) + mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC); regs->msr |= MSR_DE; - regs->dbcr0 |= (DBCR0_IDM | DBCR0_IC); - mtmsr(msr); #else regs->msr |= MSR_SE; #endif diff -Nru a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c --- a/arch/ppc/kernel/ppc_ksyms.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/kernel/ppc_ksyms.c 2004-11-10 17:19:06 -08:00 @@ -321,9 +321,6 @@ #if defined(CONFIG_8xx) || defined(CONFIG_40x) || defined(CONFIG_85xx) EXPORT_SYMBOL(__res); #endif -#if defined(CONFIG_8xx) -EXPORT_SYMBOL(request_8xxirq); -#endif EXPORT_SYMBOL(next_mmu_context); EXPORT_SYMBOL(set_context); diff -Nru a/arch/ppc/kernel/ptrace.c b/arch/ppc/kernel/ptrace.c --- a/arch/ppc/kernel/ptrace.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc/kernel/ptrace.c 2004-11-10 17:19:03 -08:00 @@ -35,7 +35,7 @@ /* * Set of msr bits that gdb can change on behalf of a process. */ -#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) #define MSR_DEBUGCHANGE 0 #else #define MSR_DEBUGCHANGE (MSR_SE | MSR_BE) @@ -201,9 +201,9 @@ struct pt_regs *regs = task->thread.regs; if (regs != NULL) { -#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) task->thread.dbcr0 = DBCR0_IDM | DBCR0_IC; - /* MSR.DE should already be set */ + regs->msr |= MSR_DE; #else regs->msr |= MSR_SE; #endif @@ -216,8 +216,9 @@ struct pt_regs *regs = task->thread.regs; if (regs != NULL) { -#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) task->thread.dbcr0 = 0; + regs->msr &= ~MSR_DE; #else regs->msr &= ~MSR_SE; #endif diff -Nru a/arch/ppc/kernel/signal.c b/arch/ppc/kernel/signal.c --- a/arch/ppc/kernel/signal.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc/kernel/signal.c 2004-11-10 17:19:07 -08:00 @@ -290,7 +290,7 @@ /* force the process to reload the FP registers from current->thread when it next does FP instructions */ - regs->msr &= ~MSR_FP; + regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1); if (__copy_from_user(current->thread.fpr, &sr->mc_fregs, sizeof(sr->mc_fregs))) return 1; @@ -330,9 +330,14 @@ #endif /* CONFIG_SPE */ #ifndef CONFIG_SMP - last_task_used_math = NULL; - last_task_used_altivec = NULL; - last_task_used_spe = NULL; + preempt_disable(); + if (last_task_used_math == current) + last_task_used_math = NULL; + if (last_task_used_altivec == current) + last_task_used_altivec = NULL; + if (last_task_used_spe == current) + last_task_used_spe = NULL; + preempt_enable(); #endif return 0; } diff -Nru a/arch/ppc/kernel/softemu8xx.c b/arch/ppc/kernel/softemu8xx.c --- a/arch/ppc/kernel/softemu8xx.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc/kernel/softemu8xx.c 2004-11-10 17:19:04 -08:00 @@ -133,7 +133,7 @@ print_8xx_pte(current->mm,regs->nip); pa = get_8xx_pte(current->mm,regs->nip) & PAGE_MASK; pa |= (regs->nip & ~PAGE_MASK); - pa = __va(pa); + pa = (unsigned long)__va(pa); printk("Kernel VA for NIP %x ", pa); print_8xx_pte(current->mm,pa); } diff -Nru a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c --- a/arch/ppc/kernel/traps.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc/kernel/traps.c 2004-11-10 17:19:03 -08:00 @@ -647,22 +647,22 @@ } #endif /* CONFIG_8xx */ -#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) void DebugException(struct pt_regs *regs, unsigned long debug_status) { -#if 0 - if (debug_status & DBSR_TIE) { /* trap instruction*/ - if (!user_mode(regs) && debugger_bpt(regs)) - return; - _exception(SIGTRAP, regs, 0, 0); - - } -#endif if (debug_status & DBSR_IC) { /* instruction completion */ - if (!user_mode(regs) && debugger_sstep(regs)) - return; - current->thread.dbcr0 &= ~DBCR0_IC; + regs->msr &= ~MSR_DE; + if (user_mode(regs)) { + current->thread.dbcr0 &= ~DBCR0_IC; + } else { + /* Disable instruction completion */ + mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~DBCR0_IC); + /* Clear the instruction completion event */ + mtspr(SPRN_DBSR, DBSR_IC); + if (debugger_sstep(regs)) + return; + } _exception(SIGTRAP, regs, TRAP_TRACE, 0); } } diff -Nru a/arch/ppc/lib/dec_and_lock.c b/arch/ppc/lib/dec_and_lock.c --- a/arch/ppc/lib/dec_and_lock.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/lib/dec_and_lock.c 2004-11-10 17:19:06 -08:00 @@ -19,7 +19,7 @@ */ #ifndef ATOMIC_DEC_AND_LOCK -int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) +int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) { int counter; int newcount; @@ -42,5 +42,5 @@ return 0; } -EXPORT_SYMBOL(atomic_dec_and_lock); +EXPORT_SYMBOL(_atomic_dec_and_lock); #endif /* ATOMIC_DEC_AND_LOCK */ diff -Nru a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig --- a/arch/ppc/platforms/4xx/Kconfig 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc/platforms/4xx/Kconfig 2004-11-10 17:19:02 -08:00 @@ -201,7 +201,7 @@ config PPC_GEN550 bool - depends on 44x + depends on 4xx default y config PM diff -Nru a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c --- a/arch/ppc/platforms/4xx/ebony.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc/platforms/4xx/ebony.c 2004-11-10 17:19:07 -08:00 @@ -313,14 +313,6 @@ struct ocp_def *def; struct ocp_func_emac_data *emacdata; -#if !defined(CONFIG_BDI_SWITCH) - /* - * The Abatron BDI JTAG debugger does not tolerate others - * mucking with the debug registers. - */ - mtspr(SPRN_DBCR0, (DBCR0_TDE | DBCR0_IDM)); -#endif - /* Set mac_addr for each EMAC */ vpd_base = ioremap64(EBONY_VPD_BASE, EBONY_VPD_SIZE); def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 0); diff -Nru a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c --- a/arch/ppc/platforms/4xx/ocotea.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/platforms/4xx/ocotea.c 2004-11-10 17:19:06 -08:00 @@ -145,13 +145,13 @@ } #define PCIX_READW(offset) \ - (readw((u32)pcix_reg_base+offset)) + (readw(pcix_reg_base+offset)) #define PCIX_WRITEW(value, offset) \ - (writew(value, (u32)pcix_reg_base+offset)) + (writew(value, pcix_reg_base+offset)) #define PCIX_WRITEL(value, offset) \ - (writel(value, (u32)pcix_reg_base+offset)) + (writel(value, pcix_reg_base+offset)) /* * FIXME: This is only here to "make it work". This will move @@ -291,14 +291,6 @@ ibm440gx_tah_enable(); -#if !defined(CONFIG_BDI_SWITCH) - /* - * The Abatron BDI JTAG debugger does not tolerate others - * mucking with the debug registers. - */ - mtspr(SPRN_DBCR0, (DBCR0_TDE | DBCR0_IDM)); -#endif - /* Setup TODC access */ TODC_INIT(TODC_TYPE_DS1743, 0, @@ -329,6 +321,11 @@ printk("IBM Ocotea port (MontaVista Software, Inc. )\n"); } +static void __init ocotea_init(void) +{ + ibm440gx_l2c_setup(&clocks); +} + void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { @@ -350,8 +347,11 @@ ibm440gx_get_clocks(&clocks, 33333333, 6 * 1843200); ocp_sys_info.opb_bus_freq = clocks.opb; - /* Disable L2-Cache on broken hardware, enable it otherwise */ - ibm440gx_l2c_setup(&clocks); + /* XXX Fix L2C IRQ triggerring setting (edge-sensitive). + * Firmware (at least PIBS v1.72 OCT/28/2003) sets it incorrectly + * --ebs + */ + mtdcr(DCRN_UIC_TR(UIC2), mfdcr(DCRN_UIC_TR(UIC2)) | 0x00000100); ibm44x_platform_init(); @@ -369,4 +369,5 @@ #ifdef CONFIG_KGDB ppc_md.early_serial_map = ocotea_early_serial_map; #endif + ppc_md.init = ocotea_init; } diff -Nru a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c --- a/arch/ppc/platforms/85xx/mpc8560_ads.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc/platforms/85xx/mpc8560_ads.c 2004-11-10 17:19:07 -08:00 @@ -150,6 +150,13 @@ return IRQ_HANDLED; } +static struct irqaction cpm2_irqaction = { + .handler = cpm2_cascade, + .flags = SA_INTERRUPT, + .mask = CPU_MASK_NONE, + .name = "cpm2_cascade", +}; + static void __init mpc8560_ads_init_IRQ(void) { @@ -173,7 +180,7 @@ immap->im_intctl.ic_scprrh = 0x05309770; immap->im_intctl.ic_scprrl = 0x05309770; - request_irq(MPC85xx_IRQ_CPM, cpm2_cascade, SA_INTERRUPT, "cpm2_cascade", NULL); + setup_irq(MPC85xx_IRQ_CPM, &cpm2_irqaction); return; } diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c 2004-11-10 17:19:06 -08:00 @@ -193,6 +193,13 @@ while((irq = cpm2_get_irq(regs)) >= 0) __do_IRQ(irq, regs); } + +static struct irqaction cpm2_irqaction = { + .handler = cpm2_cascade, + .flags = SA_INTERRUPT, + .mask = CPU_MASK_NONE, + .name = "cpm2_cascade", +}; #endif /* CONFIG_CPM2 */ void __init @@ -235,7 +242,7 @@ immap->im_intctl.ic_scprrh = 0x05309770; immap->im_intctl.ic_scprrl = 0x05309770; - request_irq(MPC85xx_IRQ_CPM, cpm2_cascade, SA_INTERRUPT, "cpm2_cascade", NULL); + setup_irq(MPC85xx_IRQ_CPM, &cpm2_irqaction); #endif return; diff -Nru a/arch/ppc/platforms/chrp_setup.c b/arch/ppc/platforms/chrp_setup.c --- a/arch/ppc/platforms/chrp_setup.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/platforms/chrp_setup.c 2004-11-10 17:19:06 -08:00 @@ -371,6 +371,14 @@ } } +#if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON) +static struct irqaction xmon_irqaction = { + .handler = xmon_irq, + .mask = CPU_MASK_NONE, + .name = "XMON break", +}; +#endif + void __init chrp_init_IRQ(void) { struct device_node *np; @@ -416,7 +424,7 @@ && strcmp(kbd->parent->type, "adb") == 0) break; if (kbd) - request_irq(HYDRA_INT_ADB_NMI, xmon_irq, 0, "XMON break", 0); + setup_irq(HYDRA_INT_ADB_NMI, &xmon_irqaction); #endif } diff -Nru a/arch/ppc/platforms/mvme5100.c b/arch/ppc/platforms/mvme5100.c --- a/arch/ppc/platforms/mvme5100.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc/platforms/mvme5100.c 2004-11-10 17:19:03 -08:00 @@ -228,7 +228,7 @@ for (i = 0; i < NUM_8259_INTERRUPTS; i++) irq_desc[i].handler = &i8259_pic; - i8259_init(NULL); + i8259_init(0); #else openpic_init(0); #endif diff -Nru a/arch/ppc/platforms/pmac_smp.c b/arch/ppc/platforms/pmac_smp.c --- a/arch/ppc/platforms/pmac_smp.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc/platforms/pmac_smp.c 2004-11-10 17:19:04 -08:00 @@ -405,6 +405,13 @@ smp_tb_synchronized = 1; } +static struct irqaction psurge_irqaction = { + .handler = psurge_primary_intr, + .flags = SA_INTERRUPT, + .mask = CPU_MASK_NONE, + .name = "primary IPI", +}; + static void __init smp_psurge_setup_cpu(int cpu_nr) { @@ -421,7 +428,7 @@ /* reset the entry point so if we get another intr we won't * try to startup again */ out_be32(psurge_start, 0x100); - if (request_irq(30, psurge_primary_intr, SA_INTERRUPT, "primary IPI", NULL)) + if (setup_irq(30, &psurge_irqaction)) printk(KERN_ERR "Couldn't get primary IPI interrupt"); } diff -Nru a/arch/ppc/platforms/rpxclassic.h b/arch/ppc/platforms/rpxclassic.h --- a/arch/ppc/platforms/rpxclassic.h 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc/platforms/rpxclassic.h 2004-11-10 17:19:05 -08:00 @@ -82,7 +82,6 @@ /* for pcmcia sandisk */ #ifdef CONFIG_IDE # define MAX_HWIFS 1 -# define request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id)) #endif #endif diff -Nru a/arch/ppc/platforms/rpxlite.h b/arch/ppc/platforms/rpxlite.h --- a/arch/ppc/platforms/rpxlite.h 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc/platforms/rpxlite.h 2004-11-10 17:19:02 -08:00 @@ -68,7 +68,6 @@ #ifdef CONFIG_IDE # define MAX_HWIFS 1 -# define request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id)) #endif /* CPM Ethernet through SCCx. diff -Nru a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c --- a/arch/ppc/platforms/sandpoint.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc/platforms/sandpoint.c 2004-11-10 17:19:07 -08:00 @@ -60,11 +60,6 @@ * of the amount of memory in the system. Once a method of determining * what version of DINK initializes the system for us, if applicable, is * found, we can hopefully stop hardcoding 32MB of RAM. - * - * It is important to note that this code only supports the Sandpoint X3 - * (all flavors) platform, and it does not support the X2 anymore. Code - * that at one time worked on the X2 can be found at: - * ftp://source.mvista.com/pub/linuxppc/obsolete/sandpoint/ */ #include @@ -107,9 +102,13 @@ #include "sandpoint.h" +/* Set non-zero if an X2 Sandpoint detected. */ +static int sandpoint_is_x2; + unsigned char __res[sizeof(bd_t)]; static void sandpoint_halt(void); +static void sandpoint_probe_type(void); /* * Define all of the IRQ senses and polarities. Taken from the @@ -129,7 +128,7 @@ * Motorola SPS Sandpoint interrupt routing. */ static inline int -sandpoint_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +x3_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) { static char pci_irq_table[][4] = /* @@ -149,6 +148,27 @@ return PCI_IRQ_TABLE_LOOKUP; } +static inline int +x2_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +{ + static char pci_irq_table[][4] = + /* + * PCI IDSEL/INTPIN->INTLINE + * A B C D + */ + { + { 18, 0, 0, 0 }, /* IDSEL 11 - i8259 on Windbond */ + { 0, 0, 0, 0 }, /* IDSEL 12 - unused */ + { 16, 17, 18, 19 }, /* IDSEL 13 - PCI slot 1 */ + { 17, 18, 19, 16 }, /* IDSEL 14 - PCI slot 2 */ + { 18, 19, 16, 17 }, /* IDSEL 15 - PCI slot 3 */ + { 19, 16, 17, 18 }, /* IDSEL 16 - PCI slot 4 */ + }; + + const long min_idsel = 11, max_idsel = 16, irqs_per_slot = 4; + return PCI_IRQ_TABLE_LOOKUP; +} + static void __init sandpoint_setup_winbond_83553(struct pci_controller *hose) { @@ -216,6 +236,18 @@ return; } +/* On the sandpoint X2, we must avoid sending configuration cycles to + * device #12 (IDSEL addr = AD12). + */ +static int +x2_exclude_device(u_char bus, u_char devfn) +{ + if ((bus == 0) && (PCI_SLOT(devfn) == SANDPOINT_HOST_BRIDGE_IDSEL)) + return PCIBIOS_DEVICE_NOT_FOUND; + else + return PCIBIOS_SUCCESSFUL; +} + static void __init sandpoint_find_bridges(void) { @@ -241,7 +273,11 @@ ppc_md.pcibios_fixup = NULL; ppc_md.pcibios_fixup_bus = NULL; ppc_md.pci_swizzle = common_swizzle; - ppc_md.pci_map_irq = sandpoint_map_irq; + if (sandpoint_is_x2) { + ppc_md.pci_map_irq = x2_map_irq; + ppc_md.pci_exclude_device = x2_exclude_device; + } else + ppc_md.pci_map_irq = x3_map_irq; } else { if (ppc_md.progress) @@ -252,41 +288,14 @@ return; } -#if defined(CONFIG_SERIAL_8250) && \ - (defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG)) -static void __init -sandpoint_early_serial_map(void) -{ - struct uart_port serial_req; - - /* Setup serial port access */ - memset(&serial_req, 0, sizeof(serial_req)); - serial_req.uartclk = UART_CLK; - serial_req.irq = 4; - serial_req.flags = STD_COM_FLAGS; - serial_req.iotype = SERIAL_IO_MEM; - serial_req.membase = (u_char *)SANDPOINT_SERIAL_0; - - gen550_init(0, &serial_req); - - if (early_serial_setup(&serial_req) != 0) - printk(KERN_ERR "Early serial init of port 0 failed\n"); - - /* Assume early_serial_setup() doesn't modify serial_req */ - serial_req.line = 1; - serial_req.irq = 3; /* XXXX */ - serial_req.membase = (u_char *)SANDPOINT_SERIAL_1; - - gen550_init(1, &serial_req); - - if (early_serial_setup(&serial_req) != 0) - printk(KERN_ERR "Early serial init of port 1 failed\n"); -} -#endif - static void __init sandpoint_setup_arch(void) { + /* Probe for Sandpoint model */ + sandpoint_probe_type(); + if (sandpoint_is_x2) + epic_serial_mode = 0; + loops_per_jiffy = 100000000 / HZ; #ifdef CONFIG_BLK_DEV_INITRD @@ -351,13 +360,48 @@ } /* + * To probe the Sandpoint type, we need to check for a connection between GPIO + * pins 6 and 7 on the NS87308 SuperIO. + */ +static void __init sandpoint_probe_type(void) +{ + u8 x; + /* First, ensure that the GPIO pins are enabled. */ + SANDPOINT_87308_SELECT_DEV(0x07); /* Select GPIO logical device */ + SANDPOINT_87308_CFG_OUTB(0x60, 0x07); /* Base address 0x700 */ + SANDPOINT_87308_CFG_OUTB(0x61, 0x00); + SANDPOINT_87308_CFG_OUTB(0x30, 0x01); /* Enable */ + + /* Now, set pin 7 to output and pin 6 to input. */ + outb((inb(0x701) | 0x80) & 0xbf, 0x701); + /* Set push-pull output */ + outb(inb(0x702) | 0x80, 0x702); + /* Set pull-up on input */ + outb(inb(0x703) | 0x40, 0x703); + /* Set output high and check */ + x = inb(0x700); + outb(x | 0x80, 0x700); + x = inb(0x700); + sandpoint_is_x2 = ! (x & 0x40); + if (ppc_md.progress && sandpoint_is_x2) + ppc_md.progress("High output says X2", 0); + /* Set output low and check */ + outb(x & 0x7f, 0x700); + sandpoint_is_x2 |= inb(0x700) & 0x40; + if (ppc_md.progress && sandpoint_is_x2) + ppc_md.progress("Low output says X2", 0); + if (ppc_md.progress && ! sandpoint_is_x2) + ppc_md.progress("Sandpoint is X3", 0); +} + +/* * Fix IDE interrupts. */ static int __init sandpoint_fix_winbond_83553(void) { - /* Make all 8259 interrupt level sensitive */ - outb(0xf8, 0x4d0); + /* Make some 8259 interrupt level sensitive */ + outb(0xe0, 0x4d0); outb(0xde, 0x4d1); return 0; @@ -430,7 +474,7 @@ OpenPIC_NumInitSenses = sizeof(sandpoint_openpic_initsenses); mpc10x_set_openpic(); - openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", + openpic_hookup_cascade(sandpoint_is_x2 ? 17 : NUM_8259_INTERRUPTS, "82c59 cascade", i8259_irq); /* @@ -689,15 +733,11 @@ ppc_md.nvram_read_val = todc_mc146818_read_val; ppc_md.nvram_write_val = todc_mc146818_write_val; -#if defined(CONFIG_SERIAL_8250) && \ - (defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG)) - sandpoint_early_serial_map(); #ifdef CONFIG_KGDB ppc_md.kgdb_map_scc = gen550_kgdb_map_scc; #endif #ifdef CONFIG_SERIAL_TEXT_DEBUG ppc_md.progress = gen550_progress; -#endif #endif #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) diff -Nru a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c --- a/arch/ppc/platforms/sbc82xx.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc/platforms/sbc82xx.c 2004-11-10 17:19:03 -08:00 @@ -146,6 +146,13 @@ return IRQ_HANDLED; } +static struct irqaction sbc82xx_i8259_irqaction = { + .handler = sbc82xx_i8259_demux, + .flags = SA_INTERRUPT, + .mask = CPU_MASK_NONE, + .name = "i8259 demux", +}; + void __init sbc82xx_init_IRQ(void) { volatile memctl_cpm2_t *mc = &cpm2_immr->im_memctl; @@ -186,8 +193,7 @@ sbc82xx_i8259_map[1] = sbc82xx_i8259_mask; /* Set interrupt mask */ /* Request cascade IRQ */ - if (request_irq(SIU_INT_IRQ6, sbc82xx_i8259_demux, SA_INTERRUPT, - "i8259 demux", 0)) { + if (setup_irq(SIU_INT_IRQ6, &sbc82xx_i8259_irqaction)) { printk("Installation of i8259 IRQ demultiplexer failed.\n"); } } diff -Nru a/arch/ppc/platforms/tqm8xx.h b/arch/ppc/platforms/tqm8xx.h --- a/arch/ppc/platforms/tqm8xx.h 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/platforms/tqm8xx.h 2004-11-10 17:19:06 -08:00 @@ -72,8 +72,6 @@ #define IDE0_INTERRUPT 13 #ifdef CONFIG_IDE -#define ide_request_irq(irq,hand,flg,dev,id) \ - request_8xxirq((irq),(hand),(flg),(dev),(id)) #endif /*----------------------------------------------------------------------- diff -Nru a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile --- a/arch/ppc/syslib/Makefile 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc/syslib/Makefile 2004-11-10 17:19:02 -08:00 @@ -25,7 +25,6 @@ obj-$(CONFIG_PPC4xx_DMA) += ppc4xx_dma.o obj-$(CONFIG_PPC4xx_EDMA) += ppc4xx_sgdma.o ifeq ($(CONFIG_40x),y) -obj-$(CONFIG_KGDB) += ppc4xx_kgdb.o obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o ppc405_pci.o endif endif @@ -52,7 +51,8 @@ obj-$(CONFIG_MENF1) += todc_time.o i8259.o mpc10x_common.o \ pci_auto.o indirect_pci.o obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \ - i8259.o pci_auto.o hawk_common.o + pci_auto.o hawk_common.o +obj-$(CONFIG_MVME5100_IPMC761_PRESENT) += i8259.o obj-$(CONFIG_OCOTEA) += indirect_pci.o pci_auto.o todc_time.o obj-$(CONFIG_PAL4) += cpc700_pic.o obj-$(CONFIG_PCORE) += todc_time.o i8259.o pci_auto.o diff -Nru a/arch/ppc/syslib/gen550_dbg.c b/arch/ppc/syslib/gen550_dbg.c --- a/arch/ppc/syslib/gen550_dbg.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc/syslib/gen550_dbg.c 2004-11-10 17:19:04 -08:00 @@ -40,12 +40,12 @@ unsigned long direct_inb(unsigned long addr) { - return readb(addr); + return readb((void __iomem *)addr); } void direct_outb(unsigned long addr, unsigned char val) { - writeb(val, addr); + writeb(val, (void __iomem *)addr); } unsigned long io_inb(unsigned long port) diff -Nru a/arch/ppc/syslib/i8259.c b/arch/ppc/syslib/i8259.c --- a/arch/ppc/syslib/i8259.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc/syslib/i8259.c 2004-11-10 17:19:04 -08:00 @@ -151,6 +151,13 @@ "8259 edge control", 0x4d0, 0x4d1, IORESOURCE_BUSY }; +static struct irqaction i8259_irqaction = { + .handler = no_action, + .flags = SA_INTERRUPT, + .mask = CPU_MASK_NONE, + .name = "82c59 secondary cascade", +}; + /* * i8259_init() * intack_addr - PCI interrupt acknowledge (real) address which will return @@ -185,8 +192,7 @@ spin_unlock_irqrestore(&i8259_lock, flags); /* reserve our resources */ - request_irq( i8259_pic_irq_offset + 2, no_action, SA_INTERRUPT, - "82c59 secondary cascade", NULL ); + setup_irq( i8259_pic_irq_offset + 2, &i8259_irqaction); request_resource(&ioport_resource, &pic1_iores); request_resource(&ioport_resource, &pic2_iores); request_resource(&ioport_resource, &pic_edgectrl_iores); diff -Nru a/arch/ppc/syslib/ibm440gx_common.c b/arch/ppc/syslib/ibm440gx_common.c --- a/arch/ppc/syslib/ibm440gx_common.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/syslib/ibm440gx_common.c 2004-11-10 17:19:06 -08:00 @@ -4,7 +4,7 @@ * PPC440GX system library * * Eugene Surovegin or - * Copyright (c) 2003 Zultys Technologies + * Copyright (c) 2003, 2004 Zultys Technologies * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -14,6 +14,7 @@ */ #include #include +#include #include #include #include @@ -97,10 +98,51 @@ p->uart1 = p->plb / __fix_zero(uart1 & 0xff, 256); } -/* Enable L2 cache (call with IRQs disabled) */ +/* Issue L2C diagnostic command */ +static inline u32 l2c_diag(u32 addr) +{ + mtdcr(DCRN_L2C0_ADDR, addr); + mtdcr(DCRN_L2C0_CMD, L2C_CMD_DIAG); + while (!(mfdcr(DCRN_L2C0_SR) & L2C_SR_CC)) ; + return mfdcr(DCRN_L2C0_DATA); +} + +static irqreturn_t l2c_error_handler(int irq, void* dev, struct pt_regs* regs) +{ + u32 sr = mfdcr(DCRN_L2C0_SR); + if (sr & L2C_SR_CPE){ + /* Read cache trapped address */ + u32 addr = l2c_diag(0x42000000); + printk(KERN_EMERG "L2C: Cache Parity Error, addr[16:26] = 0x%08x\n", addr); + } + if (sr & L2C_SR_TPE){ + /* Read tag trapped address */ + u32 addr = l2c_diag(0x82000000) >> 16; + printk(KERN_EMERG "L2C: Tag Parity Error, addr[16:26] = 0x%08x\n", addr); + } + + /* Clear parity errors */ + if (sr & (L2C_SR_CPE | L2C_SR_TPE)){ + mtdcr(DCRN_L2C0_ADDR, 0); + mtdcr(DCRN_L2C0_CMD, L2C_CMD_CCP | L2C_CMD_CTE); + } else + printk(KERN_EMERG "L2C: LRU error\n"); + + return IRQ_HANDLED; +} + +/* Enable L2 cache */ void __init ibm440gx_l2c_enable(void){ u32 r; + unsigned long flags; + + /* Install error handler */ + if (request_irq(87, l2c_error_handler, SA_INTERRUPT, "L2C", 0) < 0){ + printk(KERN_ERR "Cannot install L2C error handler, cache is not enabled\n"); + return; + } + local_irq_save(flags); asm volatile ("sync" ::: "memory"); /* Disable SRAM */ @@ -137,20 +179,22 @@ /* Enable ICU/DCU ports */ r = mfdcr(DCRN_L2C0_CFG); - r &= ~(L2C_CFG_DCW_MASK | L2C_CFG_CPIM | L2C_CFG_TPIM | L2C_CFG_LIM - | L2C_CFG_PMUX_MASK | L2C_CFG_PMIM | L2C_CFG_TPEI | L2C_CFG_CPEI - | L2C_CFG_NAM | L2C_CFG_NBRM); + r &= ~(L2C_CFG_DCW_MASK | L2C_CFG_PMUX_MASK | L2C_CFG_PMIM | L2C_CFG_TPEI + | L2C_CFG_CPEI | L2C_CFG_NAM | L2C_CFG_NBRM); r |= L2C_CFG_ICU | L2C_CFG_DCU | L2C_CFG_TPC | L2C_CFG_CPC | L2C_CFG_FRAN - | L2C_CFG_SMCM; + | L2C_CFG_CPIM | L2C_CFG_TPIM | L2C_CFG_LIM | L2C_CFG_SMCM; mtdcr(DCRN_L2C0_CFG, r); asm volatile ("sync; isync" ::: "memory"); + local_irq_restore(flags); } -/* Disable L2 cache (call with IRQs disabled) */ +/* Disable L2 cache */ void __init ibm440gx_l2c_disable(void){ u32 r; + unsigned long flags; + local_irq_save(flags); asm volatile ("sync" ::: "memory"); /* Disable L2C mode */ @@ -169,6 +213,7 @@ SRAM_SBCR_BAS3 | SRAM_SBCR_BS_64KB | SRAM_SBCR_BU_RW); asm volatile ("sync; isync" ::: "memory"); + local_irq_restore(flags); } void __init ibm440gx_l2c_setup(struct ibm44x_clocks* p) diff -Nru a/arch/ppc/syslib/ibm44x_common.c b/arch/ppc/syslib/ibm44x_common.c --- a/arch/ppc/syslib/ibm44x_common.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc/syslib/ibm44x_common.c 2004-11-10 17:19:04 -08:00 @@ -166,5 +166,17 @@ #ifdef CONFIG_KGDB ppc_md.kgdb_map_scc = gen550_kgdb_map_scc; #endif + + /* + * The Abatron BDI JTAG debugger does not tolerate others + * mucking with the debug registers. + */ +#if !defined(CONFIG_BDI_SWITCH) + /* Enable internal debug mode */ + mtspr(SPRN_DBCR0, (DBCR0_IDM)); + + /* Clear any residual debug events */ + mtspr(SPRN_DBSR, 0xffffffff); +#endif } diff -Nru a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c --- a/arch/ppc/syslib/m8xx_setup.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc/syslib/m8xx_setup.c 2004-11-10 17:19:04 -08:00 @@ -57,8 +57,10 @@ extern void m8xx_ide_init(void); extern unsigned long find_available_memory(void); -extern void m8xx_cpm_reset(uint); +extern void m8xx_cpm_reset(uint cpm_page); +extern void m8xx_wdt_handler_install(bd_t *bp); extern void rpxfb_alloc_pages(void); +extern void cpm_interrupt_init(void); void __attribute__ ((weak)) board_init(void) @@ -123,11 +125,19 @@ } /* A place holder for time base interrupts, if they are ever enabled. */ -void timebase_interrupt(int irq, void * dev, struct pt_regs * regs) +irqreturn_t timebase_interrupt(int irq, void * dev, struct pt_regs * regs) { printk ("timebase_interrupt()\n"); + + return IRQ_HANDLED; } +static struct irqaction tbint_irqaction = { + .handler = timebase_interrupt, + .mask = CPU_MASK_NONE, + .name = "tbint", +}; + /* The decrementer counts at the system (internal) clock frequency divided by * sixteen, or external oscillator divided by four. We force the processor * to use system clock divided by sixteen. @@ -192,8 +202,15 @@ ((mk_int_int_mask(DEC_INTERRUPT) << 8) | (TBSCR_TBF | TBSCR_TBE)); - if (request_8xxirq(DEC_INTERRUPT, timebase_interrupt, 0, "tbint", NULL) != 0) + if (setup_irq(DEC_INTERRUPT, &tbint_irqaction)) panic("Could not allocate timer IRQ!"); + +#ifdef CONFIG_8xx_WDT + /* Install watchdog timer handler early because it might be + * already enabled by the bootloader + */ + m8xx_wdt_handler_install(binfo); +#endif } /* The RTC on the MPC8xx is an internal register. @@ -261,6 +278,14 @@ return 0; } +#ifdef CONFIG_PCI +static struct irqaction mbx_i8259_irqaction = { + .handler = mbx_i8259_action, + .mask = CPU_MASK_NONE, + .name = "i8259 cascade", +}; +#endif + /* Initialize the internal interrupt controller. The number of * interrupts supported can vary with the processor type, and the * 82xx family can have up to 64. @@ -271,25 +296,26 @@ m8xx_init_IRQ(void) { int i; - void cpm_interrupt_init(void); - for ( i = 0 ; i < NR_SIU_INTS ; i++ ) - irq_desc[i].handler = &ppc8xx_pic; + for (i = SIU_IRQ_OFFSET ; i < SIU_IRQ_OFFSET + NR_SIU_INTS ; i++) + irq_desc[i].handler = &ppc8xx_pic; - /* We could probably incorporate the CPM into the multilevel - * interrupt structure. - */ cpm_interrupt_init(); - unmask_irq(CPM_INTERRUPT); #if defined(CONFIG_PCI) - for ( i = NR_SIU_INTS ; i < (NR_SIU_INTS + NR_8259_INTS) ; i++ ) - irq_desc[i].handler = &i8259_pic; - i8259_pic.irq_offset = NR_SIU_INTS; - i8259_init(); - request_8xxirq(ISA_BRIDGE_INT, mbx_i8259_action, 0, "8259 cascade", NULL); - enable_irq(ISA_BRIDGE_INT); -#endif + for (i = I8259_IRQ_OFFSET ; i < I8259_IRQ_OFFSET + NR_8259_INTS ; i++) + irq_desc[i].handler = &i8259_pic; + + i8259_pic_irq_offset = I8259_IRQ_OFFSET; + i8259_init(0); + + /* The i8259 cascade interrupt must be level sensitive. */ + ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel &= + ~(0x80000000 >> ISA_BRIDGE_INT); + + if (setup_irq(ISA_BRIDGE_INT, &mbx_i8259_irqaction)) + enable_irq(ISA_BRIDGE_INT); +#endif /* CONFIG_PCI */ } /* -------------------------------------------------------------------- */ @@ -340,7 +366,7 @@ io_block_mapping(_IO_BASE,_IO_BASE,_IO_BASE_SIZE, _PAGE_IO); #endif #endif -#ifdef CONFIG_HTDMSOUND +#if defined(CONFIG_HTDMSOUND) || defined(CONFIG_RPXTOUCH) || defined(CONFIG_FB_RPX) io_block_mapping(HIOX_CSR_ADDR, HIOX_CSR_ADDR, HIOX_CSR_SIZE, _PAGE_IO); #endif #ifdef CONFIG_FADS @@ -348,6 +374,9 @@ #endif #ifdef CONFIG_PCI io_block_mapping(PCI_CSR_ADDR, PCI_CSR_ADDR, PCI_CSR_SIZE, _PAGE_IO); +#endif +#if defined(CONFIG_NETTA) + io_block_mapping(_IO_BASE,_IO_BASE,_IO_BASE_SIZE, _PAGE_IO); #endif } diff -Nru a/arch/ppc/syslib/mpc10x_common.c b/arch/ppc/syslib/mpc10x_common.c --- a/arch/ppc/syslib/mpc10x_common.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc/syslib/mpc10x_common.c 2004-11-10 17:19:03 -08:00 @@ -43,7 +43,7 @@ #ifdef CONFIG_MPC10X_OPENPIC #ifdef CONFIG_EPIC_SERIAL_MODE -#define EPIC_IRQ_BASE 16 +#define EPIC_IRQ_BASE (epic_serial_mode ? 16 : 5) #else #define EPIC_IRQ_BASE 5 #endif @@ -69,20 +69,16 @@ .vendor = OCP_VENDOR_MOTOROLA, .function = OCP_FUNC_IIC, .index = 0, - .irq = MPC10X_I2C_IRQ, .additions = &mpc10x_i2c_data }; static struct ocp_def mpc10x_dma_ocp[2] = { { .vendor = OCP_VENDOR_MOTOROLA, .function = OCP_FUNC_DMA, - .index = 0, - .irq = MPC10X_DMA0_IRQ -}, + .index = 0 }, { .vendor = OCP_VENDOR_MOTOROLA, .function = OCP_FUNC_DMA, - .index = 1, - .irq = MPC10X_DMA1_IRQ } + .index = 1 } }; /* Set resources to match bridge memory map */ @@ -292,12 +288,15 @@ MPC10X_EUMB_EPIC_SIZE); #endif mpc10x_i2c_ocp.paddr = phys_eumb_base + MPC10X_EUMB_I2C_OFFSET; + mpc10x_i2c_ocp.irq = MPC10X_I2C_IRQ; ocp_add_one_device(&mpc10x_i2c_ocp); mpc10x_dma_ocp[0].paddr = phys_eumb_base + MPC10X_EUMB_DMA_OFFSET + 0x100; + mpc10x_dma_ocp[0].irq = MPC10X_DMA0_IRQ; ocp_add_one_device(&mpc10x_dma_ocp[0]); mpc10x_dma_ocp[1].paddr = phys_eumb_base + MPC10X_EUMB_DMA_OFFSET + 0x200; + mpc10x_dma_ocp[1].irq = MPC10X_DMA1_IRQ; ocp_add_one_device(&mpc10x_dma_ocp[1]); } diff -Nru a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c --- a/arch/ppc/syslib/mpc52xx_setup.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/syslib/mpc52xx_setup.c 2004-11-10 17:19:06 -08:00 @@ -19,6 +19,7 @@ #include +#include #include #include #include diff -Nru a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c --- a/arch/ppc/syslib/open_pic.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc/syslib/open_pic.c 2004-11-10 17:19:05 -08:00 @@ -261,6 +261,9 @@ #endif /* CONFIG_SMP */ #ifdef CONFIG_EPIC_SERIAL_MODE +/* On platforms that may use EPIC serial mode, the default is enabled. */ +int epic_serial_mode = 1; + static void __init openpic_eicr_set_clk(u_int clkval) { openpic_writefield(&OpenPIC->Global.Global_Configuration1, @@ -415,8 +418,10 @@ openpic_set_spurious(OPENPIC_VEC_SPURIOUS); openpic_disable_8259_pass_through(); #ifdef CONFIG_EPIC_SERIAL_MODE - openpic_eicr_set_clk(7); /* Slowest value until we know better */ - openpic_enable_sie(); + if (epic_serial_mode) { + openpic_eicr_set_clk(7); /* Slowest value until we know better */ + openpic_enable_sie(); + } #endif openpic_set_priority(0); @@ -681,13 +686,21 @@ /* * Hookup a cascade to the OpenPIC. */ + +static struct irqaction openpic_cascade_irqaction = { + .handler = no_action, + .flags = SA_INTERRUPT, + .mask = CPU_MASK_NONE, +}; + void __init openpic_hookup_cascade(u_int irq, char *name, int (*cascade_fn)(struct pt_regs *)) { openpic_cascade_irq = irq; openpic_cascade_fn = cascade_fn; - if (request_irq(irq, no_action, SA_INTERRUPT, name, NULL)) + + if (setup_irq(irq, &openpic_cascade_irqaction)) printk("Unable to get OpenPIC IRQ %d for cascade\n", irq - open_pic_irq_offset); } diff -Nru a/arch/ppc/syslib/ppc4xx_setup.c b/arch/ppc/syslib/ppc4xx_setup.c --- a/arch/ppc/syslib/ppc4xx_setup.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc/syslib/ppc4xx_setup.c 2004-11-10 17:19:02 -08:00 @@ -42,6 +42,8 @@ #include #include +#include + /* Function Prototypes */ extern void abort(void); extern void ppc4xx_find_bridges(void); @@ -56,8 +58,16 @@ void __init ppc4xx_setup_arch(void) { - /* Setup PCI host bridges */ +#if !defined(CONFIG_BDI_SWITCH) + /* + * The Abatron BDI JTAG debugger does not tolerate others + * mucking with the debug registers. + */ + mtspr(SPRN_DBCR0, (DBCR0_IDM)); + mtspr(SPRN_DBSR, 0xffffffff); +#endif + /* Setup PCI host bridges */ #ifdef CONFIG_PCI ppc4xx_find_bridges(); #endif @@ -189,34 +199,6 @@ /* Set the PIT reload value and just let it run. */ mtspr(SPRN_PIT, tb_ticks_per_jiffy); } -#ifdef CONFIG_SERIAL_TEXT_DEBUG - -/* We assume that the UART has already been initialized by the - firmware or the boot loader */ -static void -serial_putc(u8 * com_port, unsigned char c) -{ - while ((readb(com_port + (UART_LSR)) & UART_LSR_THRE) == 0) ; - writeb(c, com_port); -} - -static void -ppc4xx_progress(char *s, unsigned short hex) -{ - char c; -#ifdef SERIAL_DEBUG_IO_BASE - u8 *com_port = (u8 *) SERIAL_DEBUG_IO_BASE; - - while ((c = *s++) != '\0') { - serial_putc(com_port, c); - } - serial_putc(com_port, '\r'); - serial_putc(com_port, '\n'); -#else - printk("%s\r\n"); -#endif -} -#endif /* CONFIG_SERIAL_TEXT_DEBUG */ /* * IDE stuff. @@ -319,13 +301,9 @@ ppc_md.setup_io_mappings = ppc4xx_map_io; #ifdef CONFIG_SERIAL_TEXT_DEBUG - ppc_md.progress = ppc4xx_progress; + ppc_md.progress = gen550_progress; #endif -/* -** m8xx_setup.c, prep_setup.c use -** defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) -*/ #if defined(CONFIG_PCI) && defined(CONFIG_IDE) ppc_ide_md.ide_init_hwif = ppc4xx_ide_init_hwif_ports; #endif /* defined(CONFIG_PCI) && defined(CONFIG_IDE) */ diff -Nru a/arch/ppc/syslib/ppc8xx_pic.c b/arch/ppc/syslib/ppc8xx_pic.c --- a/arch/ppc/syslib/ppc8xx_pic.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc/syslib/ppc8xx_pic.c 2004-11-10 17:19:03 -08:00 @@ -4,11 +4,14 @@ #include #include #include +#include #include #include #include #include "ppc8xx_pic.h" +extern int cpm_get_irq(struct pt_regs *regs); + /* The 8xx internal interrupt controller. It is usually * the only interrupt controller. Some boards, like the MBX and * Sandpoint have the 8259 as a secondary controller. Depending @@ -72,46 +75,13 @@ } struct hw_interrupt_type ppc8xx_pic = { - " 8xx SIU ", - NULL, - NULL, - m8xx_unmask_irq, - m8xx_mask_irq, - m8xx_mask_and_ack, - m8xx_end_irq, - 0 + .typename = " 8xx SIU ", + .enable = m8xx_unmask_irq, + .disable = m8xx_mask_irq, + .ack = m8xx_mask_and_ack, + .end = m8xx_end_irq, }; -#if 0 -void -m8xx_do_IRQ(struct pt_regs *regs, - int cpu) -{ - int irq; - unsigned long bits = 0; - - /* For MPC8xx, read the SIVEC register and shift the bits down - * to get the irq number. */ - bits = ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_sivec; - irq = bits >> 26; -#if 0 - irq += ppc8xx_pic.irq_offset; -#endif - bits = 1UL << irq; - - if (irq < 0) { - printk(KERN_DEBUG "Bogus interrupt %d from PC = %lx\n", - irq, regs->nip); - ppc_spurious_interrupts++; - } - else { - __do_IRQ(irq, regs); - } - -} -#endif - - /* * We either return a valid interrupt or -1 if there is nothing pending */ @@ -129,73 +99,32 @@ * When we read the sivec without an interrupt to process, we will * get back SIU_LEVEL7. In this case, return -1 */ - if (irq == SIU_LEVEL7) - return -1; + if (irq == CPM_INTERRUPT) + irq = CPM_IRQ_OFFSET + cpm_get_irq(regs); +#if defined(CONFIG_PCI) + else if (irq == ISA_BRIDGE_INT) { + int isa_irq; + + if ((isa_irq = i8259_poll(regs)) >= 0) + irq = I8259_IRQ_OFFSET + isa_irq; + } +#endif /* CONFIG_PCI */ + else if (irq == SIU_LEVEL7) + irq = -1; return irq; } -/* The MBX is the only 8xx board that uses the 8259. -*/ #if defined(CONFIG_MBX) && defined(CONFIG_PCI) -void mbx_i8259_action(int cpl, void *dev_id, struct pt_regs *regs) -{ - int bits, irq; - - /* A bug in the QSpan chip causes it to give us 0xff always - * when doing a character read. So read 32 bits and shift. - * This doesn't seem to return useful values anyway, but - * read it to make sure things are acked. - * -- Cort - */ - irq = (inl(0x508) >> 24)&0xff; - if ( irq != 0xff ) printk("iack %d\n", irq); - - outb(0x0C, 0x20); - irq = inb(0x20) & 7; - if (irq == 2) - { - outb(0x0C, 0xA0); - irq = inb(0xA0); - irq = (irq&7) + 8; - } - bits = 1UL << irq; - irq += i8259_pic.irq_offset; - __do_IRQ(irq, regs); -} -#endif - /* Only the MBX uses the external 8259. This allows us to catch standard * drivers that may mess up the internal interrupt controllers, and also * allow them to run without modification on the MBX. */ -int request_irq(unsigned int irq, - irqreturn_t (*handler)(int, void *, struct pt_regs *), - unsigned long irqflags, const char * devname, void *dev_id) +void mbx_i8259_action(int irq, void *dev_id, struct pt_regs *regs) { - -#if defined(CONFIG_MBX) && defined(CONFIG_PCI) - irq += i8259_pic.irq_offset; - return (request_8xxirq(irq, handler, irqflags, devname, dev_id)); -#else - /* - * Handle other "well-known" interrupts, but panic on unknown ones. + /* This interrupt handler never actually gets called. It is + * installed only to unmask the 8259 cascade interrupt in the SIU + * and to make the 8259 cascade interrupt visible in /proc/interrupts. */ - switch (irq) { -#ifdef IDE0_INTERRUPT - case IDE0_INTERRUPT: /* IDE0 */ - return (request_8xxirq(irq, handler, irqflags, devname, - dev_id)); -#endif -#ifdef IDE1_INTERRUPT - case IDE1_INTERRUPT: /* IDE1 */ - return (request_8xxirq(irq, handler, irqflags, devname, - dev_id)); -#endif - default: /* unknown IRQ -> panic */ - panic("request_irq"); - } -#endif } - -EXPORT_SYMBOL(request_irq); +#endif /* CONFIG_PCI */ diff -Nru a/arch/ppc/syslib/todc_time.c b/arch/ppc/syslib/todc_time.c --- a/arch/ppc/syslib/todc_time.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc/syslib/todc_time.c 2004-11-10 17:19:06 -08:00 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -47,8 +48,6 @@ * we set the 'R' bit before reading them, they basically stop counting. * --MAG */ - -extern spinlock_t rtc_lock; /* * 'todc_info' should be initialized in your *_setup.c file to diff -Nru a/arch/ppc/xmon/start.c b/arch/ppc/xmon/start.c --- a/arch/ppc/xmon/start.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc/xmon/start.c 2004-11-10 17:19:02 -08:00 @@ -102,7 +102,7 @@ { .handler = sysrq_handle_xmon, .help_msg = "Xmon", - .action_msg = "Entering xmon\n", + .action_msg = "Entering xmon", }; #endif diff -Nru a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig --- a/arch/ppc64/Kconfig 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc64/Kconfig 2004-11-10 17:19:04 -08:00 @@ -80,6 +80,16 @@ select ADB_PMU select U3_DART +config PPC_MAPLE + depends on PPC_MULTIPLATFORM + bool " Maple 970FX Evaluation Board" + select U3_DART + select MPIC_BROKEN_U3 + default n + help + This option enables support for the Maple 970FX Evaluation Board. + For more informations, refer to http://www.970eval.com + config PPC bool default y @@ -110,11 +120,21 @@ processors, that is, which share physical processors between two or more partitions. +config IBMVIO + depends on PPC_PSERIES || PPC_ISERIES + bool + default y + config U3_DART bool depends on PPC_MULTIPLATFORM default n +config MPIC_BROKEN_U3 + bool + depends on PPC_MAPLE + default y + config PPC_PMAC64 bool depends on PPC_PMAC @@ -355,6 +375,11 @@ source "arch/ppc64/Kconfig.debug" source "security/Kconfig" + +config KEYS_COMPAT + bool + depends on COMPAT && KEYS + default y source "crypto/Kconfig" diff -Nru a/arch/ppc64/Makefile b/arch/ppc64/Makefile --- a/arch/ppc64/Makefile 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/Makefile 2004-11-10 17:19:02 -08:00 @@ -55,11 +55,13 @@ boot := arch/ppc64/boot boottarget-$(CONFIG_PPC_PSERIES) := zImage zImage.initrd +boottarget-$(CONFIG_PPC_MAPLE) := zImage zImage.initrd boottarget-$(CONFIG_PPC_ISERIES) := vmlinux.sminitrd vmlinux.initrd vmlinux.sm $(boottarget-y): vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ bootimage-$(CONFIG_PPC_PSERIES) := zImage +bootimage-$(CONFIG_PPC_MAPLE) := zImage bootimage-$(CONFIG_PPC_ISERIES) := vmlinux BOOTIMAGE := $(bootimage-y) install: vmlinux diff -Nru a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile --- a/arch/ppc64/boot/Makefile 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc64/boot/Makefile 2004-11-10 17:19:06 -08:00 @@ -118,6 +118,6 @@ >> $(obj)/imagesize.c install: $(CONFIGURE) $(obj)/$(BOOTIMAGE) - sh -x $(src)/install.sh "$(KERNELRELEASE)" "$(obj)/$(BOOTIMAGE)" "$(INSTALL_PATH)" + sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" "$(obj)/$(BOOTIMAGE)" "$(INSTALL_PATH)" clean-files := $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip) diff -Nru a/arch/ppc64/configs/maple_defconfig b/arch/ppc64/configs/maple_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/configs/maple_defconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,921 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9 +# Wed Oct 20 15:39:14 2004 +# +CONFIG_64BIT=y +CONFIG_MMU=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_HAVE_DEC_LOCK=y +CONFIG_EARLY_PRINTK=y +CONFIG_COMPAT=y +CONFIG_FRAME_POINTER=y +CONFIG_FORCE_MAX_ZONEORDER=13 + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=17 +# CONFIG_HOTPLUG is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y +CONFIG_STOP_MACHINE=y +CONFIG_SYSVIPC_COMPAT=y + +# +# Platform support +# +# CONFIG_PPC_ISERIES is not set +CONFIG_PPC_MULTIPLATFORM=y +# CONFIG_PPC_PSERIES is not set +# CONFIG_PPC_PMAC is not set +CONFIG_PPC_MAPLE=y +CONFIG_PPC=y +CONFIG_PPC64=y +CONFIG_PPC_OF=y +# CONFIG_ALTIVEC is not set +CONFIG_U3_DART=y +CONFIG_MPIC_BROKEN_U3=y +CONFIG_BOOTX_TEXT=y +CONFIG_POWER4_ONLY=y +CONFIG_IOMMU_VMERGE=y +CONFIG_SMP=y +# CONFIG_IRQ_ALL_CPUS is not set +CONFIG_NR_CPUS=2 +# CONFIG_SCHED_SMT is not set +# CONFIG_PREEMPT is not set + +# +# General setup +# +CONFIG_PCI=y +CONFIG_PCI_DOMAINS=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_PCI_LEGACY_PROC=y +CONFIG_PCI_NAMES=y +CONFIG_PROC_DEVICETREE=y +# CONFIG_CMDLINE_BOOL is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +# CONFIG_BLK_DEV_INITRD is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECD=y +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +CONFIG_IDE_TASK_IOCTL=y +CONFIG_IDE_TASKFILE_IO=y + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_IDEPCI=y +CONFIG_IDEPCI_SHARE_IRQ=y +# CONFIG_BLK_DEV_OFFBOARD is not set +CONFIG_BLK_DEV_GENERIC=y +# CONFIG_BLK_DEV_OPTI621 is not set +# CONFIG_BLK_DEV_SL82C105 is not set +CONFIG_BLK_DEV_IDEDMA_PCI=y +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set +CONFIG_IDEDMA_PCI_AUTO=y +# CONFIG_IDEDMA_ONLYDISK is not set +# CONFIG_BLK_DEV_AEC62XX is not set +# CONFIG_BLK_DEV_ALI15X3 is not set +CONFIG_BLK_DEV_AMD74XX=y +# CONFIG_BLK_DEV_CMD64X is not set +# CONFIG_BLK_DEV_TRIFLEX is not set +# CONFIG_BLK_DEV_CY82C693 is not set +# CONFIG_BLK_DEV_CS5520 is not set +# CONFIG_BLK_DEV_CS5530 is not set +# CONFIG_BLK_DEV_HPT34X is not set +# CONFIG_BLK_DEV_HPT366 is not set +# CONFIG_BLK_DEV_SC1200 is not set +# CONFIG_BLK_DEV_PIIX is not set +# CONFIG_BLK_DEV_NS87415 is not set +# CONFIG_BLK_DEV_PDC202XX_OLD is not set +# CONFIG_BLK_DEV_PDC202XX_NEW is not set +# CONFIG_BLK_DEV_SVWKS is not set +# CONFIG_BLK_DEV_SIIMAGE is not set +# CONFIG_BLK_DEV_SLC90E66 is not set +# CONFIG_BLK_DEV_TRM290 is not set +# CONFIG_BLK_DEV_VIA82CXXX is not set +# CONFIG_IDE_ARM is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_IVB is not set +CONFIG_IDEDMA_AUTO=y +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Macintosh device drivers +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +# CONFIG_NETLINK_DEV is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +CONFIG_AMD8111_ETH=y +# CONFIG_AMD8111E_NAPI is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set +# CONFIG_EEPRO100 is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +CONFIG_E1000=y +# CONFIG_E1000_NAPI is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1600 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1200 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +# CONFIG_SERIO is not set +# CONFIG_SERIO_I8042 is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_PMACZILOG is not set +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# +CONFIG_I2C_ALGOBIT=y +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +CONFIG_I2C_AMD8111=y +# CONFIG_I2C_I801 is not set +# CONFIG_I2C_I810 is not set +# CONFIG_I2C_ISA is not set +# CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_PROSAVAGE is not set +# CONFIG_I2C_SAVAGE4 is not set +# CONFIG_SCx200_ACB is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set +# CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_SPLIT_ISO=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_UHCI_HCD=y + +# +# USB Device Class drivers +# +# CONFIG_USB_BLUETOOTH_TTY is not set +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_STORAGE is not set + +# +# USB Human Interface Devices (HID) +# +CONFIG_USB_HID=y +CONFIG_USB_HIDINPUT=y +# CONFIG_HID_FF is not set +# CONFIG_USB_HIDDEV is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_EGALAX is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set + +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set + +# +# Video4Linux support is needed for USB Multimedia device support +# + +# +# USB Network adaptors +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +CONFIG_USB_PEGASUS=y +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=y +# CONFIG_USB_SERIAL_CONSOLE is not set +CONFIG_USB_SERIAL_GENERIC=y +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_EMPEG is not set +# CONFIG_USB_SERIAL_FTDI_SIO is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +CONFIG_USB_SERIAL_KEYSPAN=y +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_PL2303 is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OMNINET is not set +CONFIG_USB_EZUSB=y + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_TIGL is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_TEST is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +CONFIG_DEVPTS_FS_XATTR=y +# CONFIG_DEVPTS_FS_SECURITY is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +# CONFIG_EXPORTFS is not set +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf-8" +# CONFIG_NLS_CODEPAGE_437 is not set +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_ISO8859_1 is not set +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_SLAB=y +CONFIG_DEBUG_SPINLOCK_SLEEP=y +# CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_STACKOVERFLOW=y +CONFIG_DEBUG_STACK_USAGE=y +CONFIG_DEBUGGER=y +CONFIG_XMON=y +CONFIG_XMON_DEFAULT=y +# CONFIG_PPCDBG is not set +# CONFIG_IRQSTACKS is not set +# CONFIG_SCHEDSTATS is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Library routines +# +CONFIG_CRC_CCITT=y +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/ppc64/kernel/LparData.c b/arch/ppc64/kernel/LparData.c --- a/arch/ppc64/kernel/LparData.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc64/kernel/LparData.c 2004-11-10 17:19:03 -08:00 @@ -6,9 +6,8 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include -#include -#include +#include +#include #include #include #include diff -Nru a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile --- a/arch/ppc64/kernel/Makefile 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc64/kernel/Makefile 2004-11-10 17:19:07 -08:00 @@ -11,12 +11,11 @@ udbg.o binfmt_elf32.o sys_ppc32.o ioctl32.o \ ptrace32.o signal32.o rtc.o init_task.o \ lmb.o cputable.o cpu_setup_power4.o idle_power4.o \ - iommu.o sysfs.o vio.o + iommu.o sysfs.o obj-$(CONFIG_PPC_OF) += of_device.o -pci-obj-$(CONFIG_PPC_ISERIES) += iSeries_pci.o iSeries_pci_reset.o \ - iSeries_IoMmTable.o +pci-obj-$(CONFIG_PPC_ISERIES) += iSeries_pci.o iSeries_pci_reset.o pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_dma_direct.o obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y) @@ -28,7 +27,7 @@ mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \ iSeries_iommu.o -obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o open_pic.o i8259.o prom_init.o prom.o +obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o prom.o mpic.o obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \ eeh.o pSeries_nvram.o rtasd.o ras.o \ @@ -45,14 +44,20 @@ obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o obj-$(CONFIG_BOOTX_TEXT) += btext.o obj-$(CONFIG_HVCS) += hvcserver.o +obj-$(CONFIG_IBMVIO) += vio.o obj-$(CONFIG_PPC_PMAC) += pmac_setup.o pmac_feature.o pmac_pci.o \ - pmac_time.o pmac_nvram.o pmac_low_i2c.o \ - open_pic_u3.o + pmac_time.o pmac_nvram.o pmac_low_i2c.o + +obj-$(CONFIG_PPC_MAPLE) += maple_setup.o maple_pci.o maple_time.o + obj-$(CONFIG_U3_DART) += u3_iommu.o ifdef CONFIG_SMP obj-$(CONFIG_PPC_PMAC) += pmac_smp.o smp-tbsync.o +obj-$(CONFIG_PPC_ISERIES) += iSeries_smp.o +obj-$(CONFIG_PPC_PSERIES) += pSeries_smp.o +obj-$(CONFIG_PPC_MAPLE) += smp-tbsync.o endif obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o diff -Nru a/arch/ppc64/kernel/cpu_setup_power4.S b/arch/ppc64/kernel/cpu_setup_power4.S --- a/arch/ppc64/kernel/cpu_setup_power4.S 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/cpu_setup_power4.S 2004-11-10 17:19:02 -08:00 @@ -156,6 +156,15 @@ cror 4*cr0+eq,4*cr0+eq,4*cr1+eq bne 1f + /* Before accessing memory, we make sure rm_ci is clear */ + li r0,0 + mfspr r3,SPRN_HID4 + rldimi r3,r0,40,23 /* clear bit 23 (rm_ci) */ + sync + mtspr SPRN_HID4,r3 + isync + sync + /* Clear interrupt prefix */ li r0,0 sync diff -Nru a/arch/ppc64/kernel/dma.c b/arch/ppc64/kernel/dma.c --- a/arch/ppc64/kernel/dma.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/dma.c 2004-11-10 17:19:02 -08:00 @@ -17,8 +17,10 @@ { if (dev->bus == &pci_bus_type) return pci_dma_supported(to_pci_dev(dev), mask); +#ifdef CONFIG_IBMVIO if (dev->bus == &vio_bus_type) return vio_dma_supported(to_vio_dev(dev), mask); +#endif /* CONFIG_IBMVIO */ BUG(); return 0; } @@ -28,8 +30,10 @@ { if (dev->bus == &pci_bus_type) return pci_set_dma_mask(to_pci_dev(dev), dma_mask); +#ifdef CONFIG_IBMVIO if (dev->bus == &vio_bus_type) return vio_set_dma_mask(to_vio_dev(dev), dma_mask); +#endif /* CONFIG_IBMVIO */ BUG(); return 0; } @@ -40,8 +44,10 @@ { if (dev->bus == &pci_bus_type) return pci_alloc_consistent(to_pci_dev(dev), size, dma_handle); +#ifdef CONFIG_IBMVIO if (dev->bus == &vio_bus_type) return vio_alloc_consistent(to_vio_dev(dev), size, dma_handle); +#endif /* CONFIG_IBMVIO */ BUG(); return NULL; } @@ -52,8 +58,10 @@ { if (dev->bus == &pci_bus_type) pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle); +#ifdef CONFIG_IBMVIO else if (dev->bus == &vio_bus_type) vio_free_consistent(to_vio_dev(dev), size, cpu_addr, dma_handle); +#endif /* CONFIG_IBMVIO */ else BUG(); } @@ -64,8 +72,10 @@ { if (dev->bus == &pci_bus_type) return pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction); +#ifdef CONFIG_IBMVIO if (dev->bus == &vio_bus_type) return vio_map_single(to_vio_dev(dev), cpu_addr, size, direction); +#endif /* CONFIG_IBMVIO */ BUG(); return (dma_addr_t)0; } @@ -76,8 +86,10 @@ { if (dev->bus == &pci_bus_type) pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction); +#ifdef CONFIG_IBMVIO else if (dev->bus == &vio_bus_type) vio_unmap_single(to_vio_dev(dev), dma_addr, size, direction); +#endif /* CONFIG_IBMVIO */ else BUG(); } @@ -89,8 +101,10 @@ { if (dev->bus == &pci_bus_type) return pci_map_page(to_pci_dev(dev), page, offset, size, (int)direction); +#ifdef CONFIG_IBMVIO if (dev->bus == &vio_bus_type) return vio_map_page(to_vio_dev(dev), page, offset, size, direction); +#endif /* CONFIG_IBMVIO */ BUG(); return (dma_addr_t)0; } @@ -101,8 +115,10 @@ { if (dev->bus == &pci_bus_type) pci_unmap_page(to_pci_dev(dev), dma_address, size, (int)direction); +#ifdef CONFIG_IBMVIO else if (dev->bus == &vio_bus_type) vio_unmap_page(to_vio_dev(dev), dma_address, size, direction); +#endif /* CONFIG_IBMVIO */ else BUG(); } @@ -113,8 +129,10 @@ { if (dev->bus == &pci_bus_type) return pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction); +#ifdef CONFIG_IBMVIO if (dev->bus == &vio_bus_type) return vio_map_sg(to_vio_dev(dev), sg, nents, direction); +#endif /* CONFIG_IBMVIO */ BUG(); return 0; } @@ -125,8 +143,10 @@ { if (dev->bus == &pci_bus_type) pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction); +#ifdef CONFIG_IBMVIO else if (dev->bus == &vio_bus_type) vio_unmap_sg(to_vio_dev(dev), sg, nhwentries, direction); +#endif /* CONFIG_IBMVIO */ else BUG(); } diff -Nru a/arch/ppc64/kernel/eeh.c b/arch/ppc64/kernel/eeh.c --- a/arch/ppc64/kernel/eeh.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc64/kernel/eeh.c 2004-11-10 17:19:05 -08:00 @@ -17,29 +17,79 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include +#include +#include +#include #include #include -#include -#include #include -#include #include -#include -#include -#include +#include +#include #include #include -#include #include +#include #include "pci.h" #undef DEBUG +/** Overview: + * EEH, or "Extended Error Handling" is a PCI bridge technology for + * dealing with PCI bus errors that can't be dealt with within the + * usual PCI framework, except by check-stopping the CPU. Systems + * that are designed for high-availability/reliability cannot afford + * to crash due to a "mere" PCI error, thus the need for EEH. + * An EEH-capable bridge operates by converting a detected error + * into a "slot freeze", taking the PCI adapter off-line, making + * the slot behave, from the OS'es point of view, as if the slot + * were "empty": all reads return 0xff's and all writes are silently + * ignored. EEH slot isolation events can be triggered by parity + * errors on the address or data busses (e.g. during posted writes), + * which in turn might be caused by dust, vibration, humidity, + * radioactivity or plain-old failed hardware. + * + * Note, however, that one of the leading causes of EEH slot + * freeze events are buggy device drivers, buggy device microcode, + * or buggy device hardware. This is because any attempt by the + * device to bus-master data to a memory address that is not + * assigned to the device will trigger a slot freeze. (The idea + * is to prevent devices-gone-wild from corrupting system memory). + * Buggy hardware/drivers will have a miserable time co-existing + * with EEH. + * + * Ideally, a PCI device driver, when suspecting that an isolation + * event has occured (e.g. by reading 0xff's), will then ask EEH + * whether this is the case, and then take appropriate steps to + * reset the PCI slot, the PCI device, and then resume operations. + * However, until that day, the checking is done here, with the + * eeh_check_failure() routine embedded in the MMIO macros. If + * the slot is found to be isolated, an "EEH Event" is synthesized + * and sent out for processing. + */ + +/** Bus Unit ID macros; get low and hi 32-bits of the 64-bit BUID */ #define BUID_HI(buid) ((buid) >> 32) #define BUID_LO(buid) ((buid) & 0xffffffff) -#define CONFIG_ADDR(busno, devfn) \ - (((((busno) & 0xff) << 8) | ((devfn) & 0xf8)) << 8) + +/* EEH event workqueue setup. */ +static spinlock_t eeh_eventlist_lock = SPIN_LOCK_UNLOCKED; +LIST_HEAD(eeh_eventlist); +static void eeh_event_handler(void *); +DECLARE_WORK(eeh_event_wq, eeh_event_handler, NULL); + +static struct notifier_block *eeh_notifier_chain; + +/* + * If a device driver keeps reading an MMIO register in an interrupt + * handler after a slot isolation event has occurred, we assume it + * is broken and panic. This sets the threshold for how many read + * attempts we allow before panicking. + */ +#define EEH_MAX_FAILS 1000 +static atomic_t eeh_fail_count; /* RTAS tokens */ static int ibm_set_eeh_option; @@ -58,13 +108,15 @@ static DEFINE_PER_CPU(unsigned long, total_mmio_ffs); static DEFINE_PER_CPU(unsigned long, false_positives); static DEFINE_PER_CPU(unsigned long, ignored_failures); +static DEFINE_PER_CPU(unsigned long, slot_resets); /** * The pci address cache subsystem. This subsystem places * PCI device address resources into a red-black tree, sorted * according to the address range, so that given only an i/o * address, the corresponding PCI device can be **quickly** - * found. + * found. It is safe to perform an address lookup in an interrupt + * context; this ability is an important feature. * * Currently, the only customer of this code is the EEH subsystem; * thus, this code has been somewhat tailored to suit EEH better. @@ -333,6 +385,94 @@ #endif } +/* --------------------------------------------------------------- */ +/* Above lies the PCI Address Cache. Below lies the EEH event infrastructure */ + +/** + * eeh_register_notifier - Register to find out about EEH events. + * @nb: notifier block to callback on events + */ +int eeh_register_notifier(struct notifier_block *nb) +{ + return notifier_chain_register(&eeh_notifier_chain, nb); +} + +/** + * eeh_unregister_notifier - Unregister to an EEH event notifier. + * @nb: notifier block to callback on events + */ +int eeh_unregister_notifier(struct notifier_block *nb) +{ + return notifier_chain_unregister(&eeh_notifier_chain, nb); +} + +/** + * eeh_panic - call panic() for an eeh event that cannot be handled. + * The philosophy of this routine is that it is better to panic and + * halt the OS than it is to risk possible data corruption by + * oblivious device drivers that don't know better. + * + * @dev pci device that had an eeh event + * @reset_state current reset state of the device slot + */ +static void eeh_panic(struct pci_dev *dev, int reset_state) +{ + /* + * XXX We should create a separate sysctl for this. + * + * Since the panic_on_oops sysctl is used to halt the system + * in light of potential corruption, we can use it here. + */ + if (panic_on_oops) + panic("EEH: MMIO failure (%d) on device:%s %s\n", reset_state, + pci_name(dev), pci_pretty_name(dev)); + else { + __get_cpu_var(ignored_failures)++; + printk(KERN_INFO "EEH: Ignored MMIO failure (%d) on device:%s %s\n", + reset_state, pci_name(dev), pci_pretty_name(dev)); + } +} + +/** + * eeh_event_handler - dispatch EEH events. The detection of a frozen + * slot can occur inside an interrupt, where it can be hard to do + * anything about it. The goal of this routine is to pull these + * detection events out of the context of the interrupt handler, and + * re-dispatch them for processing at a later time in a normal context. + * + * @dummy - unused + */ +static void eeh_event_handler(void *dummy) +{ + unsigned long flags; + struct eeh_event *event; + + while (1) { + spin_lock_irqsave(&eeh_eventlist_lock, flags); + event = NULL; + if (!list_empty(&eeh_eventlist)) { + event = list_entry(eeh_eventlist.next, struct eeh_event, list); + list_del(&event->list); + } + spin_unlock_irqrestore(&eeh_eventlist_lock, flags); + if (event == NULL) + break; + + printk(KERN_INFO "EEH: MMIO failure (%d), notifiying device " + "%s %s\n", event->reset_state, + pci_name(event->dev), pci_pretty_name(event->dev)); + + atomic_set(&eeh_fail_count, 0); + notifier_call_chain (&eeh_notifier_chain, + EEH_NOTIFY_FREEZE, event); + + __get_cpu_var(slot_resets)++; + + pci_dev_put(event->dev); + kfree(event); + } +} + /** * eeh_token_to_phys - convert EEH address token to phys address * @token i/o token, should be address in the form 0xE.... @@ -357,11 +497,11 @@ * * Check for an EEH failure for the given device node. Call this * routine if the result of a read was all 0xff's and you want to - * find out if this is due to an EEH slot freeze event. This routine + * find out if this is due to an EEH slot freeze. This routine * will query firmware for the EEH status. * * Returns 0 if there has not been an EEH error; otherwise returns - * an error code. + * a non-zero value and queues up a solt isolation event notification. * * It is safe to call this routine in an interrupt context. */ @@ -370,6 +510,8 @@ int ret; int rets[2]; unsigned long flags; + int rc, reset_state; + struct eeh_event *event; __get_cpu_var(total_mmio_ffs)++; @@ -390,6 +532,24 @@ } /* + * If we already have a pending isolation event for this + * slot, we know it's bad already, we don't need to check... + */ + if (dn->eeh_mode & EEH_MODE_ISOLATED) { + atomic_inc(&eeh_fail_count); + if (atomic_read(&eeh_fail_count) >= EEH_MAX_FAILS) { + /* re-read the slot reset state */ + rets[0] = -1; + rtas_call(ibm_read_slot_reset_state, 3, 3, rets, + dn->eeh_config_addr, + BUID_HI(dn->phb->buid), + BUID_LO(dn->phb->buid)); + eeh_panic(dev, rets[0]); + } + return 0; + } + + /* * Now test for an EEH failure. This is VERY expensive. * Note that the eeh_config_addr may be a parent device * in the case of a device behind a bridge, or it may be @@ -400,47 +560,54 @@ dn->eeh_config_addr, BUID_HI(dn->phb->buid), BUID_LO(dn->phb->buid)); - if (ret == 0 && rets[1] == 1 && (rets[0] == 2 || rets[0] == 4)) { - int log_event; - - spin_lock_irqsave(&slot_errbuf_lock, flags); - memset(slot_errbuf, 0, eeh_error_buf_size); - - log_event = rtas_call(ibm_slot_error_detail, - 8, 1, NULL, dn->eeh_config_addr, - BUID_HI(dn->phb->buid), - BUID_LO(dn->phb->buid), NULL, 0, - virt_to_phys(slot_errbuf), - eeh_error_buf_size, - 1 /* Temporary Error */); - - if (log_event == 0) - log_error(slot_errbuf, ERR_TYPE_RTAS_LOG, - 1 /* Fatal */); - - spin_unlock_irqrestore(&slot_errbuf_lock, flags); - - printk(KERN_INFO "EEH: MMIO failure (%d) on device: %s %s\n", - rets[0], dn->name, dn->full_name); - WARN_ON(1); - - /* - * XXX We should create a separate sysctl for this. - * - * Since the panic_on_oops sysctl is used to halt - * the system in light of potential corruption, we - * can use it here. - */ - if (panic_on_oops) { - panic("EEH: MMIO failure (%d) on device: %s %s\n", - rets[0], dn->name, dn->full_name); - } else { - __get_cpu_var(ignored_failures)++; - } - } else { + if (!(ret == 0 && rets[1] == 1 && (rets[0] == 2 || rets[0] == 4))) { __get_cpu_var(false_positives)++; + return 0; } + /* prevent repeated reports of this failure */ + dn->eeh_mode |= EEH_MODE_ISOLATED; + + reset_state = rets[0]; + + spin_lock_irqsave(&slot_errbuf_lock, flags); + memset(slot_errbuf, 0, eeh_error_buf_size); + + rc = rtas_call(ibm_slot_error_detail, + 8, 1, NULL, dn->eeh_config_addr, + BUID_HI(dn->phb->buid), + BUID_LO(dn->phb->buid), NULL, 0, + virt_to_phys(slot_errbuf), + eeh_error_buf_size, + 1 /* Temporary Error */); + + if (rc == 0) + log_error(slot_errbuf, ERR_TYPE_RTAS_LOG, 0); + spin_unlock_irqrestore(&slot_errbuf_lock, flags); + + printk(KERN_INFO "EEH: MMIO failure (%d) on device: %s %s\n", + rets[0], dn->name, dn->full_name); + event = kmalloc(sizeof(*event), GFP_ATOMIC); + if (event == NULL) { + eeh_panic(dev, reset_state); + return 1; + } + + event->dev = dev; + event->dn = dn; + event->reset_state = reset_state; + + /* We may or may not be called in an interrupt context */ + spin_lock_irqsave(&eeh_eventlist_lock, flags); + list_add(&event->list, &eeh_eventlist); + spin_unlock_irqrestore(&eeh_eventlist_lock, flags); + + /* Most EEH events are due to device driver bugs. Having + * a stack trace will help the device-driver authors figure + * out what happened. So print that out. */ + dump_stack(); + schedule_work(&eeh_event_wq); + return 0; } @@ -701,11 +868,13 @@ { unsigned int cpu; unsigned long ffs = 0, positives = 0, failures = 0; + unsigned long resets = 0; for_each_cpu(cpu) { ffs += per_cpu(total_mmio_ffs, cpu); positives += per_cpu(false_positives, cpu); failures += per_cpu(ignored_failures, cpu); + resets += per_cpu(slot_resets, cpu); } if (0 == eeh_subsystem_enabled) { @@ -715,8 +884,11 @@ seq_printf(m, "EEH Subsystem is enabled\n"); seq_printf(m, "eeh_total_mmio_ffs=%ld\n" "eeh_false_positives=%ld\n" - "eeh_ignored_failures=%ld\n", - ffs, positives, failures); + "eeh_ignored_failures=%ld\n" + "eeh_slot_resets=%ld\n" + "eeh_fail_count=%d\n", + ffs, positives, failures, resets, + eeh_fail_count.counter); } return 0; diff -Nru a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S --- a/arch/ppc64/kernel/head.S 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc64/kernel/head.S 2004-11-10 17:19:04 -08:00 @@ -1195,18 +1195,20 @@ * At entry, r3 = this processor's number (in Linux terms, not hardware). */ _GLOBAL(pseries_secondary_smp_init) + mr r24,r3 + /* turn on 64-bit mode */ bl .enable_64b_mode isync - /* Set up a paca value for this processor. */ - LOADADDR(r24, paca) /* Get base vaddr of paca array */ - mulli r13,r3,PACA_SIZE /* Calculate vaddr of right paca */ - add r13,r13,r24 /* for this processor. */ + /* Copy some CPU settings from CPU 0 */ + bl .__restore_cpu_setup + /* Set up a paca value for this processor. */ + LOADADDR(r5, paca) /* Get base vaddr of paca array */ + mulli r13,r24,PACA_SIZE /* Calculate vaddr of right paca */ + add r13,r13,r5 /* for this processor. */ mtspr SPRG3,r13 /* Save vaddr of paca in SPRG3 */ - mr r24,r3 /* __secondary_start needs cpu# */ - 1: HMT_LOW lbz r23,PACAPROCSTART(r13) /* Test if this processor should */ @@ -1886,19 +1888,6 @@ 91: #endif -#ifdef CONFIG_SMP - /* All secondary cpus are now spinning on a common - * spinloop, release them all now so they can start - * to spin on their individual paca spinloops. - * For non SMP kernels, the secondary cpus never - * get out of the common spinloop. - */ - li r3,1 - LOADADDR(r5,__secondary_hold_spinloop) - tophys(r4,r5) - std r3,0(r4) -#endif - /* The following gets the stack and TOC set up with the regs */ /* pointing to the real addr of the kernel stack. This is */ /* all done to support the C function call below which sets */ @@ -1913,7 +1902,7 @@ li r0,0 stdu r0,-STACK_FRAME_OVERHEAD(r1) - /* set up the TOC (physical address) */ + /* set up the TOC (physical address) */ LOADADDR(r2,__toc_start) addi r2,r2,0x4000 addi r2,r2,0x4000 @@ -1925,6 +1914,25 @@ sub r4,r4,r26 mr r5,r26 bl .identify_cpu + + /* Save some low level config HIDs of CPU0 to be copied to + * other CPUs later on, or used for suspend/resume + */ + bl .__save_cpu_setup + sync + +#ifdef CONFIG_SMP + /* All secondary cpus are now spinning on a common + * spinloop, release them all now so they can start + * to spin on their individual paca spinloops. + * For non SMP kernels, the secondary cpus never + * get out of the common spinloop. + */ + li r3,1 + LOADADDR(r5,__secondary_hold_spinloop) + tophys(r4,r5) + std r3,0(r4) +#endif /* Setup a valid physical PACA pointer in SPRG3 for early_setup * note that boot_cpuid can always be 0 nowadays since there is diff -Nru a/arch/ppc64/kernel/i8259.c b/arch/ppc64/kernel/i8259.c --- a/arch/ppc64/kernel/i8259.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc64/kernel/i8259.c 2004-11-10 17:19:07 -08:00 @@ -23,7 +23,8 @@ static spinlock_t i8259_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; -int i8259_pic_irq_offset; +static int i8259_pic_irq_offset; +static int i8259_present; int i8259_irq(int cpu) { @@ -140,11 +141,13 @@ NULL }; -void __init i8259_init(void) +void __init i8259_init(int offset) { unsigned long flags; spin_lock_irqsave(&i8259_lock, flags); + i8259_pic_irq_offset = offset; + i8259_present = 1; /* init master interrupt controller */ outb(0x11, 0x20); /* Start init sequence */ outb(0x00, 0x21); /* Vector base */ @@ -160,7 +163,18 @@ outb(cached_A1, 0xA1); outb(cached_21, 0x21); spin_unlock_irqrestore(&i8259_lock, flags); + +} + +static int i8259_request_cascade(void) +{ + if (!i8259_present) + return -ENODEV; + request_irq( i8259_pic_irq_offset + 2, no_action, SA_INTERRUPT, "82c59 secondary cascade", NULL ); - + + return 0; } + +arch_initcall(i8259_request_cascade); diff -Nru a/arch/ppc64/kernel/i8259.h b/arch/ppc64/kernel/i8259.h --- a/arch/ppc64/kernel/i8259.h 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc64/kernel/i8259.h 2004-11-10 17:19:03 -08:00 @@ -11,7 +11,7 @@ extern struct hw_interrupt_type i8259_pic; -void i8259_init(void); -int i8259_irq(int); +extern void i8259_init(int offset); +extern int i8259_irq(int); #endif /* _PPC_KERNEL_i8259_H */ diff -Nru a/arch/ppc64/kernel/iSeries_IoMmTable.c b/arch/ppc64/kernel/iSeries_IoMmTable.c --- a/arch/ppc64/kernel/iSeries_IoMmTable.c 2004-11-10 17:19:06 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,169 +0,0 @@ -#define PCIFR(...) -/************************************************************************/ -/* This module supports the iSeries I/O Address translation mapping */ -/* Copyright (C) 20yy */ -/* */ -/* This program is free software; you can redistribute it and/or modify */ -/* it under the terms of the GNU General Public License as published by */ -/* the Free Software Foundation; either version 2 of the License, or */ -/* (at your option) any later version. */ -/* */ -/* This program is distributed in the hope that it will be useful, */ -/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* GNU General Public License for more details. */ -/* */ -/* You should have received a copy of the GNU General Public License */ -/* along with this program; if not, write to the: */ -/* Free Software Foundation, Inc., */ -/* 59 Temple Place, Suite 330, */ -/* Boston, MA 02111-1307 USA */ -/************************************************************************/ -/* Change Activity: */ -/* Created, December 14, 2000 */ -/* Added Bar table for IoMm performance. */ -/* Ported to ppc64 */ -/* Added dynamic table allocation */ -/* End Change Activity */ -/************************************************************************/ -#include -#include -#include -#include -#include -#include -#include - -#include "iSeries_IoMmTable.h" -#include "pci.h" - -/* - * Table defines - * Each Entry size is 4 MB * 1024 Entries = 4GB I/O address space. - */ -#define Max_Entries 1024 -unsigned long iSeries_IoMmTable_Entry_Size = 0x0000000000400000; -unsigned long iSeries_Base_Io_Memory = 0xE000000000000000; -unsigned long iSeries_Max_Io_Memory = 0xE000000000000000; -static long iSeries_CurrentIndex = 0; - -/* - * Lookup Tables. - */ -struct iSeries_Device_Node **iSeries_IoMmTable; -u8 *iSeries_IoBarTable; - -/* - * Static and Global variables - */ -static char *iSeriesPciIoText = "iSeries PCI I/O"; -static spinlock_t iSeriesIoMmTableLock = SPIN_LOCK_UNLOCKED; - -/* - * iSeries_IoMmTable_Initialize - * - * Allocates and initalizes the Address Translation Table and Bar - * Tables to get them ready for use. Must be called before any - * I/O space is handed out to the device BARs. - * A follow up method,iSeries_IoMmTable_Status can be called to - * adjust the table after the device BARs have been assiged to - * resize the table. - */ -void iSeries_IoMmTable_Initialize(void) -{ - spin_lock(&iSeriesIoMmTableLock); - iSeries_IoMmTable = kmalloc(sizeof(void *) * Max_Entries, GFP_KERNEL); - iSeries_IoBarTable = kmalloc(sizeof(u8) * Max_Entries, GFP_KERNEL); - spin_unlock(&iSeriesIoMmTableLock); - PCIFR("IoMmTable Initialized 0x%p", iSeries_IoMmTable); - if ((iSeries_IoMmTable == NULL) || (iSeries_IoBarTable == NULL)) - panic("PCI: I/O tables allocation failed.\n"); -} - -/* - * iSeries_IoMmTable_AllocateEntry - * - * Adds pci_dev entry in address translation table - * - * - Allocates the number of entries required in table base on BAR - * size. - * - Allocates starting at iSeries_Base_Io_Memory and increases. - * - The size is round up to be a multiple of entry size. - * - CurrentIndex is incremented to keep track of the last entry. - * - Builds the resource entry for allocated BARs. - */ -static void iSeries_IoMmTable_AllocateEntry(struct pci_dev *PciDev, - int BarNumber) -{ - struct resource *BarResource = &PciDev->resource[BarNumber]; - long BarSize = pci_resource_len(PciDev, BarNumber); - - /* - * No space to allocate, quick exit, skip Allocation. - */ - if (BarSize == 0) - return; - /* - * Set Resource values. - */ - spin_lock(&iSeriesIoMmTableLock); - BarResource->name = iSeriesPciIoText; - BarResource->start = - iSeries_IoMmTable_Entry_Size * iSeries_CurrentIndex; - BarResource->start += iSeries_Base_Io_Memory; - BarResource->end = BarResource->start+BarSize-1; - /* - * Allocate the number of table entries needed for BAR. - */ - while (BarSize > 0 ) { - *(iSeries_IoMmTable + iSeries_CurrentIndex) = - (struct iSeries_Device_Node *)PciDev->sysdata; - *(iSeries_IoBarTable + iSeries_CurrentIndex) = BarNumber; - BarSize -= iSeries_IoMmTable_Entry_Size; - ++iSeries_CurrentIndex; - } - iSeries_Max_Io_Memory = iSeries_Base_Io_Memory + - (iSeries_IoMmTable_Entry_Size * iSeries_CurrentIndex); - spin_unlock(&iSeriesIoMmTableLock); -} - -/* - * iSeries_allocateDeviceBars - * - * - Allocates ALL pci_dev BAR's and updates the resources with the - * BAR value. BARS with zero length will have the resources - * The HvCallPci_getBarParms is used to get the size of the BAR - * space. It calls iSeries_IoMmTable_AllocateEntry to allocate - * each entry. - * - Loops through The Bar resources(0 - 5) including the ROM - * is resource(6). - */ -void iSeries_allocateDeviceBars(struct pci_dev *PciDev) -{ - struct resource *BarResource; - int BarNumber; - - for (BarNumber = 0; BarNumber <= PCI_ROM_RESOURCE; ++BarNumber) { - BarResource = &PciDev->resource[BarNumber]; - iSeries_IoMmTable_AllocateEntry(PciDev, BarNumber); - } -} - -/* - * Translates the IoAddress to the device that is mapped to IoSpace. - * This code is inlined, see the iSeries_pci.c file for the replacement. - */ -struct iSeries_Device_Node *iSeries_xlateIoMmAddress(void *IoAddress) -{ - return NULL; -} - -/* - * Status hook for IoMmTable - */ -void iSeries_IoMmTable_Status(void) -{ - PCIFR("IoMmTable......: 0x%p", iSeries_IoMmTable); - PCIFR("IoMmTable Range: 0x%p to 0x%p", iSeries_Base_Io_Memory, - iSeries_Max_Io_Memory); -} diff -Nru a/arch/ppc64/kernel/iSeries_IoMmTable.h b/arch/ppc64/kernel/iSeries_IoMmTable.h --- a/arch/ppc64/kernel/iSeries_IoMmTable.h 2004-11-10 17:19:05 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,85 +0,0 @@ -#ifndef _ISERIES_IOMMTABLE_H -#define _ISERIES_IOMMTABLE_H -/************************************************************************/ -/* File iSeries_IoMmTable.h created by Allan Trautman on Dec 12 2001. */ -/************************************************************************/ -/* Interfaces for the write/read Io address translation table. */ -/* Copyright (C) 20yy Allan H Trautman, IBM Corporation */ -/* */ -/* This program is free software; you can redistribute it and/or modify */ -/* it under the terms of the GNU General Public License as published by */ -/* the Free Software Foundation; either version 2 of the License, or */ -/* (at your option) any later version. */ -/* */ -/* This program is distributed in the hope that it will be useful, */ -/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* GNU General Public License for more details. */ -/* */ -/* You should have received a copy of the GNU General Public License */ -/* along with this program; if not, write to the: */ -/* Free Software Foundation, Inc., */ -/* 59 Temple Place, Suite 330, */ -/* Boston, MA 02111-1307 USA */ -/************************************************************************/ -/* Change Activity: */ -/* Created December 12, 2000 */ -/* Ported to ppc64, August 30, 2001 */ -/* End Change Activity */ -/************************************************************************/ - -struct pci_dev; -struct iSeries_Device_Node; - -extern struct iSeries_Device_Node **iSeries_IoMmTable; -extern u8 *iSeries_IoBarTable; -extern unsigned long iSeries_Base_Io_Memory; -extern unsigned long iSeries_Max_Io_Memory; -extern unsigned long iSeries_Base_Io_Memory; -extern unsigned long iSeries_IoMmTable_Entry_Size; -/* - * iSeries_IoMmTable_Initialize - * - * - Initalizes the Address Translation Table and get it ready for use. - * Must be called before any client calls any of the other methods. - * - * Parameters: None. - * - * Return: None. - */ -extern void iSeries_IoMmTable_Initialize(void); -extern void iSeries_IoMmTable_Status(void); - -/* - * iSeries_allocateDeviceBars - * - * - Allocates ALL pci_dev BAR's and updates the resources with the BAR - * value. BARS with zero length will not have the resources. The - * HvCallPci_getBarParms is used to get the size of the BAR space. - * It calls iSeries_IoMmTable_AllocateEntry to allocate each entry. - * - * Parameters: - * pci_dev = Pointer to pci_dev structure that will be mapped to pseudo - * I/O Address. - * - * Return: - * The pci_dev I/O resources updated with pseudo I/O Addresses. - */ -extern void iSeries_allocateDeviceBars(struct pci_dev *); - -/* - * iSeries_xlateIoMmAddress - * - * - Translates an I/O Memory address to Device Node that has been the - * allocated the psuedo I/O Address. - * - * Parameters: - * IoAddress = I/O Memory Address. - * - * Return: - * An iSeries_Device_Node to the device mapped to the I/O address. The - * BarNumber and BarOffset are valid if the Device Node is returned. - */ -extern struct iSeries_Device_Node *iSeries_xlateIoMmAddress(void *IoAddress); - -#endif /* _ISERIES_IOMMTABLE_H */ diff -Nru a/arch/ppc64/kernel/iSeries_iommu.c b/arch/ppc64/kernel/iSeries_iommu.c --- a/arch/ppc64/kernel/iSeries_iommu.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/iSeries_iommu.c 2004-11-10 17:19:02 -08:00 @@ -25,30 +25,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include #include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include +#include -#include -#include #include -#include -#include - #include - -#include "pci.h" - +#include +#include extern struct list_head iSeries_Global_Device_List; @@ -76,12 +60,11 @@ tce.te_bits.tb_pciwr = 1; } - rc = HvCallXm_setTce((u64)tbl->it_index, - (u64)index, - tce.te_word); + rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, + tce.te_word); if (rc) - panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx\n", rc); - + panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx\n", + rc); index++; uaddr += PAGE_SIZE; } @@ -90,20 +73,14 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages) { u64 rc; - union tce_entry tce; while (npages--) { - tce.te_word = 0; - rc = HvCallXm_setTce((u64)tbl->it_index, - (u64)index, - tce.te_word); - + rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, 0); if (rc) - panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx\n", rc); - + panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx\n", + rc); index++; } - } @@ -115,17 +92,14 @@ { struct iSeries_Device_Node *dp; - for (dp = (struct iSeries_Device_Node *)iSeries_Global_Device_List.next; - dp != (struct iSeries_Device_Node *)&iSeries_Global_Device_List; - dp = (struct iSeries_Device_Node *)dp->Device_List.next) - if (dp->iommu_table != NULL && - dp->iommu_table->it_type == TCE_PCI && - dp->iommu_table->it_offset == tbl->it_offset && - dp->iommu_table->it_index == tbl->it_index && - dp->iommu_table->it_size == tbl->it_size) + list_for_each_entry(dp, &iSeries_Global_Device_List, Device_List) { + if ((dp->iommu_table != NULL) && + (dp->iommu_table->it_type == TCE_PCI) && + (dp->iommu_table->it_offset == tbl->it_offset) && + (dp->iommu_table->it_index == tbl->it_index) && + (dp->iommu_table->it_size == tbl->it_size)) return dp->iommu_table; - - + } return NULL; } @@ -143,15 +117,14 @@ { struct iommu_table_cb *parms; - parms = (struct iommu_table_cb*)kmalloc(sizeof(*parms), GFP_KERNEL); - + parms = kmalloc(sizeof(*parms), GFP_KERNEL); if (parms == NULL) panic("PCI_DMA: TCE Table Allocation failed."); memset(parms, 0, sizeof(*parms)); - parms->itc_busno = ISERIES_BUS(dn); - parms->itc_slotno = dn->LogicalSlot; + parms->itc_busno = ISERIES_BUS(dn); + parms->itc_slotno = dn->LogicalSlot; parms->itc_virtbus = 0; HvCallXm_getTceTableParms(ISERIES_HV_ADDR(parms)); @@ -159,34 +132,32 @@ if (parms->itc_size == 0) panic("PCI_DMA: parms->size is zero, parms is 0x%p", parms); - tbl->it_size = parms->itc_size; - tbl->it_busno = parms->itc_busno; - tbl->it_offset = parms->itc_offset; - tbl->it_index = parms->itc_index; - tbl->it_entrysize = sizeof(union tce_entry); - tbl->it_blocksize = 1; - tbl->it_type = TCE_PCI; + tbl->it_size = parms->itc_size; + tbl->it_busno = parms->itc_busno; + tbl->it_offset = parms->itc_offset; + tbl->it_index = parms->itc_index; + tbl->it_entrysize = sizeof(union tce_entry); + tbl->it_blocksize = 1; + tbl->it_type = TCE_PCI; kfree(parms); } -void iommu_devnode_init(struct iSeries_Device_Node *dn) { +void iommu_devnode_init_iSeries(struct iSeries_Device_Node *dn) +{ struct iommu_table *tbl; - tbl = (struct iommu_table *)kmalloc(sizeof(struct iommu_table), GFP_KERNEL); + tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); iommu_table_getparms(dn, tbl); /* Look for existing tce table */ dn->iommu_table = iommu_table_find(tbl); - if (dn->iommu_table == NULL) dn->iommu_table = iommu_init_table(tbl); else kfree(tbl); - - return; } diff -Nru a/arch/ppc64/kernel/iSeries_irq.c b/arch/ppc64/kernel/iSeries_irq.c --- a/arch/ppc64/kernel/iSeries_irq.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc64/kernel/iSeries_irq.c 2004-11-10 17:19:06 -08:00 @@ -110,6 +110,7 @@ /* Unmask bridge interrupts in the FISR */ mask = 0x01010000 << function; HvCallPci_unmaskFisr(bus, subBus, deviceId, mask); + iSeries_enable_IRQ(irq); return 0; } diff -Nru a/arch/ppc64/kernel/iSeries_pci.c b/arch/ppc64/kernel/iSeries_pci.c --- a/arch/ppc64/kernel/iSeries_pci.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc64/kernel/iSeries_pci.c 2004-11-10 17:19:07 -08:00 @@ -1,4 +1,3 @@ -#define PCIFR(...) /* * iSeries_pci.c * @@ -47,27 +46,19 @@ #include #include -#include "iSeries_IoMmTable.h" #include "pci.h" extern int panic_timeout; -extern unsigned long iSeries_Base_Io_Memory; - -extern struct iommu_table *tceTables[256]; extern unsigned long io_page_mask; -extern void iSeries_MmIoTest(void); - /* * Forward declares of prototypes. */ static struct iSeries_Device_Node *find_Device_Node(int bus, int devfn); -static void iSeries_Scan_PHBs_Slots(struct pci_controller *Phb); -static void iSeries_Scan_EADs_Bridge(HvBusNumber Bus, HvSubBusNumber SubBus, - int IdSel); -static int iSeries_Scan_Bridge_Slot(HvBusNumber Bus, - struct HvCallPci_BridgeInfo *Info); +static void scan_PHB_slots(struct pci_controller *Phb); +static void scan_EADS_bridge(HvBusNumber Bus, HvSubBusNumber SubBus, int IdSel); +static int scan_bridge_slot(HvBusNumber Bus, struct HvCallPci_BridgeInfo *Info); LIST_HEAD(iSeries_Global_Device_List); @@ -88,7 +79,116 @@ static struct pci_ops iSeries_pci_ops; /* - * Log Error infor in Flight Recorder to system Console. + * Table defines + * Each Entry size is 4 MB * 1024 Entries = 4GB I/O address space. + */ +#define IOMM_TABLE_MAX_ENTRIES 1024 +#define IOMM_TABLE_ENTRY_SIZE 0x0000000000400000UL +#define BASE_IO_MEMORY 0xE000000000000000UL + +static unsigned long max_io_memory = 0xE000000000000000UL; +static long current_iomm_table_entry; + +/* + * Lookup Tables. + */ +static struct iSeries_Device_Node **iomm_table; +static u8 *iobar_table; + +/* + * Static and Global variables + */ +static char *pci_io_text = "iSeries PCI I/O"; +static spinlock_t iomm_table_lock = SPIN_LOCK_UNLOCKED; + +/* + * iomm_table_initialize + * + * Allocates and initalizes the Address Translation Table and Bar + * Tables to get them ready for use. Must be called before any + * I/O space is handed out to the device BARs. + */ +static void iomm_table_initialize(void) +{ + spin_lock(&iomm_table_lock); + iomm_table = kmalloc(sizeof(*iomm_table) * IOMM_TABLE_MAX_ENTRIES, + GFP_KERNEL); + iobar_table = kmalloc(sizeof(*iobar_table) * IOMM_TABLE_MAX_ENTRIES, + GFP_KERNEL); + spin_unlock(&iomm_table_lock); + if ((iomm_table == NULL) || (iobar_table == NULL)) + panic("PCI: I/O tables allocation failed.\n"); +} + +/* + * iomm_table_allocate_entry + * + * Adds pci_dev entry in address translation table + * + * - Allocates the number of entries required in table base on BAR + * size. + * - Allocates starting at BASE_IO_MEMORY and increases. + * - The size is round up to be a multiple of entry size. + * - CurrentIndex is incremented to keep track of the last entry. + * - Builds the resource entry for allocated BARs. + */ +static void iomm_table_allocate_entry(struct pci_dev *dev, int bar_num) +{ + struct resource *bar_res = &dev->resource[bar_num]; + long bar_size = pci_resource_len(dev, bar_num); + + /* + * No space to allocate, quick exit, skip Allocation. + */ + if (bar_size == 0) + return; + /* + * Set Resource values. + */ + spin_lock(&iomm_table_lock); + bar_res->name = pci_io_text; + bar_res->start = + IOMM_TABLE_ENTRY_SIZE * current_iomm_table_entry; + bar_res->start += BASE_IO_MEMORY; + bar_res->end = bar_res->start + bar_size - 1; + /* + * Allocate the number of table entries needed for BAR. + */ + while (bar_size > 0 ) { + iomm_table[current_iomm_table_entry] = dev->sysdata; + iobar_table[current_iomm_table_entry] = bar_num; + bar_size -= IOMM_TABLE_ENTRY_SIZE; + ++current_iomm_table_entry; + } + max_io_memory = BASE_IO_MEMORY + + (IOMM_TABLE_ENTRY_SIZE * current_iomm_table_entry); + spin_unlock(&iomm_table_lock); +} + +/* + * allocate_device_bars + * + * - Allocates ALL pci_dev BAR's and updates the resources with the + * BAR value. BARS with zero length will have the resources + * The HvCallPci_getBarParms is used to get the size of the BAR + * space. It calls iomm_table_allocate_entry to allocate + * each entry. + * - Loops through The Bar resources(0 - 5) including the ROM + * is resource(6). + */ +static void allocate_device_bars(struct pci_dev *dev) +{ + struct resource *bar_res; + int bar_num; + + for (bar_num = 0; bar_num <= PCI_ROM_RESOURCE; ++bar_num) { + bar_res = &dev->resource[bar_num]; + iomm_table_allocate_entry(dev, bar_num); + } +} + +/* + * Log error information to system console. * Filter out the device not there errors. * PCI: EADs Connect Failed 0x18.58.10 Rc: 0x00xx * PCI: Read Vendor Failed 0x18.58.10 Rc: 0x00xx @@ -99,7 +199,6 @@ { if (HvRc == 0x0302) return; - printk(KERN_ERR "PCI: %s Failed: 0x%02X.%02X.%02X Rc: 0x%04X", Error_Text, Bus, SubBus, AgentId, HvRc); } @@ -133,8 +232,6 @@ node->DevFn = PCI_DEVFN(ISERIES_ENCODE_DEVICE(AgentId), Function); node->IoRetry = 0; iSeries_Get_Location_Code(node); - PCIFR("Device 0x%02X.%2X, Node:0x%p ", ISERIES_BUS(node), - ISERIES_DEVFUN(node), node); return node; } @@ -160,10 +257,8 @@ if (ret == 0) { printk("bus %d appears to exist\n", bus); phb = pci_alloc_pci_controller(phb_type_hypervisor); - if (phb == NULL) { - PCIFR("Allocate pci_controller failed."); + if (phb == NULL) return -1; - } phb->pci_mem_offset = phb->local_number = bus; phb->first_busno = bus; phb->last_busno = bus; @@ -171,10 +266,9 @@ PPCDBG(PPCDBG_BUSWALK, "PCI:Create iSeries pci_controller(%p), Bus: %04X\n", phb, bus); - PCIFR("Create iSeries PHB controller: %04X", bus); /* Find and connect the devices. */ - iSeries_Scan_PHBs_Slots(phb); + scan_PHB_slots(phb); } /* * Check for Unexpected Return code, a clue that something @@ -195,7 +289,7 @@ void iSeries_pcibios_init(void) { PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Entry.\n"); - iSeries_IoMmTable_Initialize(); + iomm_table_initialize(); find_and_init_phbs(); io_page_mask = -1; /* pci_assign_all_busses = 0; SFRXXX*/ @@ -218,8 +312,7 @@ mf_displaySrc(0xC9000100); printk("pcibios_final_fixup\n"); - while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) - != NULL) { + for_each_pci_dev(pdev) { node = find_Device_Node(pdev->bus->number, pdev->devfn); printk("pci dev %p (%x.%x), node %p\n", pdev, pdev->bus->number, pdev->devfn, node); @@ -231,17 +324,16 @@ PPCDBG(PPCDBG_BUSWALK, "pdev 0x%p <==> DevNode 0x%p\n", pdev, node); - iSeries_allocateDeviceBars(pdev); + allocate_device_bars(pdev); iSeries_Device_Information(pdev, Buffer, sizeof(Buffer)); printk("%d. %s\n", DeviceCount, Buffer); - iommu_devnode_init(node); + iommu_devnode_init_iSeries(node); } else printk("PCI: Device Tree not found for 0x%016lX\n", (unsigned long)pdev); pdev->irq = node->Irq; } - iSeries_IoMmTable_Status(); iSeries_activate_IRQs(); mf_displaySrc(0xC9000200); } @@ -260,7 +352,7 @@ /* * Loop through each node function to find usable EADs bridges. */ -static void iSeries_Scan_PHBs_Slots(struct pci_controller *Phb) +static void scan_PHB_slots(struct pci_controller *Phb) { struct HvCallPci_DeviceInfo *DevInfo; HvBusNumber bus = Phb->local_number; /* System Bus */ @@ -283,7 +375,7 @@ sizeof(struct HvCallPci_DeviceInfo)); if (HvRc == 0) { if (DevInfo->deviceType == HvCallPci_NodeDevice) - iSeries_Scan_EADs_Bridge(bus, SubBus, IdSel); + scan_EADS_bridge(bus, SubBus, IdSel); else printk("PCI: Invalid System Configuration(0x%02X)" " for bus 0x%02x id 0x%02x.\n", @@ -295,7 +387,7 @@ kfree(DevInfo); } -static void iSeries_Scan_EADs_Bridge(HvBusNumber bus, HvSubBusNumber SubBus, +static void scan_EADS_bridge(HvBusNumber bus, HvSubBusNumber SubBus, int IdSel) { struct HvCallPci_BridgeInfo *BridgeInfo; @@ -340,7 +432,7 @@ if (BridgeInfo->busUnitInfo.deviceType == HvCallPci_BridgeDevice) { /* Scan_Bridge_Slot...: 0x18.00.12 */ - iSeries_Scan_Bridge_Slot(bus, BridgeInfo); + scan_bridge_slot(bus, BridgeInfo); } else printk("PCI: Invalid Bridge Configuration(0x%02X)", BridgeInfo->busUnitInfo.deviceType); @@ -355,7 +447,7 @@ /* * This assumes that the node slot is always on the primary bus! */ -static int iSeries_Scan_Bridge_Slot(HvBusNumber Bus, +static int scan_bridge_slot(HvBusNumber Bus, struct HvCallPci_BridgeInfo *BridgeInfo) { struct iSeries_Device_Node *node; @@ -593,12 +685,8 @@ return -1; /* Retry Try */ } /* If retry was in progress, log success and rest retry count */ - if (DevNode->IoRetry > 0) { - PCIFR("%s: Device 0x%04X:%02X Retry Successful(%2d).", - TextHdr, DevNode->DsaAddr.Dsa.busNumber, DevNode->DevFn, - DevNode->IoRetry); + if (DevNode->IoRetry > 0) DevNode->IoRetry = 0; - } return 0; } @@ -607,8 +695,9 @@ * Note: Make sure the passed variable end up on the stack to avoid * the exposure of being device global. */ -static inline struct iSeries_Device_Node *xlateIoMmAddress(const volatile void __iomem *IoAddress, - u64 *dsaptr, u64 *BarOffsetPtr) +static inline struct iSeries_Device_Node *xlate_iomm_address( + const volatile void __iomem *IoAddress, + u64 *dsaptr, u64 *BarOffsetPtr) { unsigned long OrigIoAddr; unsigned long BaseIoAddr; @@ -616,17 +705,16 @@ struct iSeries_Device_Node *DevNode; OrigIoAddr = (unsigned long __force)IoAddress; - if ((OrigIoAddr < iSeries_Base_Io_Memory) || - (OrigIoAddr >= iSeries_Max_Io_Memory)) + if ((OrigIoAddr < BASE_IO_MEMORY) || (OrigIoAddr >= max_io_memory)) return NULL; - BaseIoAddr = OrigIoAddr - iSeries_Base_Io_Memory; - TableIndex = BaseIoAddr / iSeries_IoMmTable_Entry_Size; - DevNode = iSeries_IoMmTable[TableIndex]; + BaseIoAddr = OrigIoAddr - BASE_IO_MEMORY; + TableIndex = BaseIoAddr / IOMM_TABLE_ENTRY_SIZE; + DevNode = iomm_table[TableIndex]; if (DevNode != NULL) { - int barnum = iSeries_IoBarTable[TableIndex]; + int barnum = iobar_table[TableIndex]; *dsaptr = DevNode->DsaAddr.DsaAddr | (barnum << 24); - *BarOffsetPtr = BaseIoAddr % iSeries_IoMmTable_Entry_Size; + *BarOffsetPtr = BaseIoAddr % IOMM_TABLE_ENTRY_SIZE; } else panic("PCI: Invalid PCI IoAddress detected!\n"); return DevNode; @@ -647,7 +735,7 @@ u64 dsa; struct HvCallPci_LoadReturn ret; struct iSeries_Device_Node *DevNode = - xlateIoMmAddress(IoAddress, &dsa, &BarOffset); + xlate_iomm_address(IoAddress, &dsa, &BarOffset); if (DevNode == NULL) { static unsigned long last_jiffies; @@ -676,7 +764,7 @@ u64 dsa; struct HvCallPci_LoadReturn ret; struct iSeries_Device_Node *DevNode = - xlateIoMmAddress(IoAddress, &dsa, &BarOffset); + xlate_iomm_address(IoAddress, &dsa, &BarOffset); if (DevNode == NULL) { static unsigned long last_jiffies; @@ -706,7 +794,7 @@ u64 dsa; struct HvCallPci_LoadReturn ret; struct iSeries_Device_Node *DevNode = - xlateIoMmAddress(IoAddress, &dsa, &BarOffset); + xlate_iomm_address(IoAddress, &dsa, &BarOffset); if (DevNode == NULL) { static unsigned long last_jiffies; @@ -743,7 +831,7 @@ u64 dsa; u64 rc; struct iSeries_Device_Node *DevNode = - xlateIoMmAddress(IoAddress, &dsa, &BarOffset); + xlate_iomm_address(IoAddress, &dsa, &BarOffset); if (DevNode == NULL) { static unsigned long last_jiffies; @@ -770,7 +858,7 @@ u64 dsa; u64 rc; struct iSeries_Device_Node *DevNode = - xlateIoMmAddress(IoAddress, &dsa, &BarOffset); + xlate_iomm_address(IoAddress, &dsa, &BarOffset); if (DevNode == NULL) { static unsigned long last_jiffies; @@ -797,7 +885,7 @@ u64 dsa; u64 rc; struct iSeries_Device_Node *DevNode = - xlateIoMmAddress(IoAddress, &dsa, &BarOffset); + xlate_iomm_address(IoAddress, &dsa, &BarOffset); if (DevNode == NULL) { static unsigned long last_jiffies; diff -Nru a/arch/ppc64/kernel/iSeries_smp.c b/arch/ppc64/kernel/iSeries_smp.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/iSeries_smp.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,152 @@ +/* + * SMP support for iSeries machines. + * + * Dave Engebretsen, Peter Bergner, and + * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com + * + * Plus various changes from other IBM teams... + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#undef DEBUG + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static unsigned long iSeries_smp_message[NR_CPUS]; + +void iSeries_smp_message_recv( struct pt_regs * regs ) +{ + int cpu = smp_processor_id(); + int msg; + + if ( num_online_cpus() < 2 ) + return; + + for ( msg = 0; msg < 4; ++msg ) + if ( test_and_clear_bit( msg, &iSeries_smp_message[cpu] ) ) + smp_message_recv( msg, regs ); +} + +static inline void smp_iSeries_do_message(int cpu, int msg) +{ + set_bit(msg, &iSeries_smp_message[cpu]); + HvCall_sendIPI(&(paca[cpu])); +} + +static void smp_iSeries_message_pass(int target, int msg) +{ + int i; + + if (target < NR_CPUS) + smp_iSeries_do_message(target, msg); + else { + for_each_online_cpu(i) { + if (target == MSG_ALL_BUT_SELF + && i == smp_processor_id()) + continue; + smp_iSeries_do_message(i, msg); + } + } +} + +static int smp_iSeries_numProcs(void) +{ + unsigned np, i; + + np = 0; + for (i=0; i < NR_CPUS; ++i) { + if (paca[i].lppaca.xDynProcStatus < 2) { + cpu_set(i, cpu_possible_map); + cpu_set(i, cpu_present_map); + cpu_set(i, cpu_sibling_map[i]); + ++np; + } + } + return np; +} + +static int smp_iSeries_probe(void) +{ + unsigned i; + unsigned np = 0; + + for (i=0; i < NR_CPUS; ++i) { + if (paca[i].lppaca.xDynProcStatus < 2) { + /*paca[i].active = 1;*/ + ++np; + } + } + + return np; +} + +static void smp_iSeries_kick_cpu(int nr) +{ + BUG_ON(nr < 0 || nr >= NR_CPUS); + + /* Verify that our partition has a processor nr */ + if (paca[nr].lppaca.xDynProcStatus >= 2) + return; + + /* The processor is currently spinning, waiting + * for the cpu_start field to become non-zero + * After we set cpu_start, the processor will + * continue on to secondary_start in iSeries_head.S + */ + paca[nr].cpu_start = 1; +} + +static void __devinit smp_iSeries_setup_cpu(int nr) +{ +} + +static struct smp_ops_t iSeries_smp_ops = { + .message_pass = smp_iSeries_message_pass, + .probe = smp_iSeries_probe, + .kick_cpu = smp_iSeries_kick_cpu, + .setup_cpu = smp_iSeries_setup_cpu, +}; + +/* This is called very early. */ +void __init smp_init_iSeries(void) +{ + smp_ops = &iSeries_smp_ops; + systemcfg->processorCount = smp_iSeries_numProcs(); +} + diff -Nru a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c --- a/arch/ppc64/kernel/idle.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc64/kernel/idle.c 2004-11-10 17:19:06 -08:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -363,12 +364,13 @@ } } #endif /* CONFIG_PPC_PSERIES */ -#ifdef CONFIG_PPC_PMAC - if (systemcfg->platform == PLATFORM_POWERMAC) { +#ifndef CONFIG_PPC_ISERIES + if (systemcfg->platform == PLATFORM_POWERMAC || + systemcfg->platform == PLATFORM_MAPLE) { printk(KERN_INFO "Using native/NAP idle loop\n"); idle_loop = native_idle; } -#endif /* CONFIG_PPC_PMAC */ +#endif /* CONFIG_PPC_ISERIES */ return 1; } diff -Nru a/arch/ppc64/kernel/iommu.c b/arch/ppc64/kernel/iommu.c --- a/arch/ppc64/kernel/iommu.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/iommu.c 2004-11-10 17:19:02 -08:00 @@ -425,6 +425,39 @@ return tbl; } +void iommu_free_table(struct device_node *dn) +{ + struct iommu_table *tbl = dn->iommu_table; + unsigned long bitmap_sz, i; + unsigned int order; + + if (!tbl || !tbl->it_map) { + printk(KERN_ERR "%s: expected TCE map for %s\n", __FUNCTION__, + dn->full_name); + return; + } + + /* verify that table contains no entries */ + /* it_mapsize is in entries, and we're examining 64 at a time */ + for (i = 0; i < (tbl->it_mapsize/64); i++) { + if (tbl->it_map[i] != 0) { + printk(KERN_WARNING "%s: Unexpected TCEs for %s\n", + __FUNCTION__, dn->full_name); + break; + } + } + + /* calculate bitmap size in bytes */ + bitmap_sz = (tbl->it_mapsize + 7) / 8; + + /* free bitmap */ + order = get_order(bitmap_sz); + free_pages((unsigned long) tbl->it_map, order); + + /* free table */ + kfree(tbl); +} + /* Creates TCEs for a user provided buffer. The user buffer must be * contiguous real kernel storage (not vmalloc). The address of the buffer * passed here is the kernel (virtual) address of the buffer. The buffer diff -Nru a/arch/ppc64/kernel/lparcfg.c b/arch/ppc64/kernel/lparcfg.c --- a/arch/ppc64/kernel/lparcfg.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/lparcfg.c 2004-11-10 17:19:02 -08:00 @@ -192,7 +192,7 @@ * is coming, but at this time is still problematic, so for now this * function will return 0. */ -static unsigned long get_purr() +static unsigned long get_purr(void) { unsigned long sum_purr = 0; return sum_purr; @@ -524,10 +524,10 @@ } struct file_operations lparcfg_fops = { - owner:THIS_MODULE, - read:seq_read, - open:lparcfg_open, - release:single_release, + .owner = THIS_MODULE, + .read = seq_read, + .open = lparcfg_open, + .release = single_release, }; int __init lparcfg_init(void) diff -Nru a/arch/ppc64/kernel/maple_pci.c b/arch/ppc64/kernel/maple_pci.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/maple_pci.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,528 @@ +/* + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), + * IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#define DEBUG + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "pci.h" + +#ifdef DEBUG +#define DBG(x...) printk(x) +#else +#define DBG(x...) +#endif + +extern int pci_probe_only; +extern int pci_read_irq_line(struct pci_dev *pci_dev); + +static struct pci_controller *u3_agp, *u3_ht; + +static int __init fixup_one_level_bus_range(struct device_node *node, int higher) +{ + for (; node != 0;node = node->sibling) { + int * bus_range; + unsigned int *class_code; + int len; + + /* For PCI<->PCI bridges or CardBus bridges, we go down */ + class_code = (unsigned int *) get_property(node, "class-code", NULL); + if (!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI && + (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS)) + continue; + bus_range = (int *) get_property(node, "bus-range", &len); + if (bus_range != NULL && len > 2 * sizeof(int)) { + if (bus_range[1] > higher) + higher = bus_range[1]; + } + higher = fixup_one_level_bus_range(node->child, higher); + } + return higher; +} + +/* This routine fixes the "bus-range" property of all bridges in the + * system since they tend to have their "last" member wrong on macs + * + * Note that the bus numbers manipulated here are OF bus numbers, they + * are not Linux bus numbers. + */ +static void __init fixup_bus_range(struct device_node *bridge) +{ + int * bus_range; + int len; + + /* Lookup the "bus-range" property for the hose */ + bus_range = (int *) get_property(bridge, "bus-range", &len); + if (bus_range == NULL || len < 2 * sizeof(int)) { + printk(KERN_WARNING "Can't get bus-range for %s\n", + bridge->full_name); + return; + } + bus_range[1] = fixup_one_level_bus_range(bridge->child, bus_range[1]); +} + + +#define U3_AGP_CFA0(devfn, off) \ + ((1 << (unsigned long)PCI_SLOT(dev_fn)) \ + | (((unsigned long)PCI_FUNC(dev_fn)) << 8) \ + | (((unsigned long)(off)) & 0xFCUL)) + +#define U3_AGP_CFA1(bus, devfn, off) \ + ((((unsigned long)(bus)) << 16) \ + |(((unsigned long)(devfn)) << 8) \ + |(((unsigned long)(off)) & 0xFCUL) \ + |1UL) + +static unsigned long u3_agp_cfg_access(struct pci_controller* hose, + u8 bus, u8 dev_fn, u8 offset) +{ + unsigned int caddr; + + if (bus == hose->first_busno) { + if (dev_fn < (11 << 3)) + return 0; + caddr = U3_AGP_CFA0(dev_fn, offset); + } else + caddr = U3_AGP_CFA1(bus, dev_fn, offset); + + /* Uninorth will return garbage if we don't read back the value ! */ + do { + out_le32(hose->cfg_addr, caddr); + } while (in_le32(hose->cfg_addr) != caddr); + + offset &= 0x07; + return ((unsigned long)hose->cfg_data) + offset; +} + +static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn, + int offset, int len, u32 *val) +{ + struct pci_controller *hose; + unsigned long addr; + + hose = pci_bus_to_host(bus); + if (hose == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; + + addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); + if (!addr) + return PCIBIOS_DEVICE_NOT_FOUND; + /* + * Note: the caller has already checked that offset is + * suitably aligned and that len is 1, 2 or 4. + */ + switch (len) { + case 1: + *val = in_8((u8 *)addr); + break; + case 2: + *val = in_le16((u16 *)addr); + break; + default: + *val = in_le32((u32 *)addr); + break; + } + return PCIBIOS_SUCCESSFUL; +} + +static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, + int offset, int len, u32 val) +{ + struct pci_controller *hose; + unsigned long addr; + + hose = pci_bus_to_host(bus); + if (hose == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; + + addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); + if (!addr) + return PCIBIOS_DEVICE_NOT_FOUND; + /* + * Note: the caller has already checked that offset is + * suitably aligned and that len is 1, 2 or 4. + */ + switch (len) { + case 1: + out_8((u8 *)addr, val); + (void) in_8((u8 *)addr); + break; + case 2: + out_le16((u16 *)addr, val); + (void) in_le16((u16 *)addr); + break; + default: + out_le32((u32 *)addr, val); + (void) in_le32((u32 *)addr); + break; + } + return PCIBIOS_SUCCESSFUL; +} + +static struct pci_ops u3_agp_pci_ops = +{ + u3_agp_read_config, + u3_agp_write_config +}; + + +#define U3_HT_CFA0(devfn, off) \ + ((((unsigned long)devfn) << 8) | offset) +#define U3_HT_CFA1(bus, devfn, off) \ + (U3_HT_CFA0(devfn, off) \ + + (((unsigned long)bus) << 16) \ + + 0x01000000UL) + +static unsigned long u3_ht_cfg_access(struct pci_controller* hose, + u8 bus, u8 devfn, u8 offset) +{ + if (bus == hose->first_busno) { + if (PCI_SLOT(devfn) == 0) + return 0; + return ((unsigned long)hose->cfg_data) + U3_HT_CFA0(devfn, offset); + } else + return ((unsigned long)hose->cfg_data) + U3_HT_CFA1(bus, devfn, offset); +} + +static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, + int offset, int len, u32 *val) +{ + struct pci_controller *hose; + unsigned long addr; + + hose = pci_bus_to_host(bus); + if (hose == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; + + addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); + if (!addr) + return PCIBIOS_DEVICE_NOT_FOUND; + + /* + * Note: the caller has already checked that offset is + * suitably aligned and that len is 1, 2 or 4. + */ + switch (len) { + case 1: + *val = in_8((u8 *)addr); + break; + case 2: + *val = in_le16((u16 *)addr); + break; + default: + *val = in_le32((u32 *)addr); + break; + } + return PCIBIOS_SUCCESSFUL; +} + +static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, + int offset, int len, u32 val) +{ + struct pci_controller *hose; + unsigned long addr; + + hose = pci_bus_to_host(bus); + if (hose == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; + + addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); + if (!addr) + return PCIBIOS_DEVICE_NOT_FOUND; + /* + * Note: the caller has already checked that offset is + * suitably aligned and that len is 1, 2 or 4. + */ + switch (len) { + case 1: + out_8((u8 *)addr, val); + (void) in_8((u8 *)addr); + break; + case 2: + out_le16((u16 *)addr, val); + (void) in_le16((u16 *)addr); + break; + default: + out_le32((u32 *)addr, val); + (void) in_le32((u32 *)addr); + break; + } + return PCIBIOS_SUCCESSFUL; +} + +static struct pci_ops u3_ht_pci_ops = +{ + u3_ht_read_config, + u3_ht_write_config +}; + +static void __init setup_u3_agp(struct pci_controller* hose) +{ + /* On G5, we move AGP up to high bus number so we don't need + * to reassign bus numbers for HT. If we ever have P2P bridges + * on AGP, we'll have to move pci_assign_all_busses to the + * pci_controller structure so we enable it for AGP and not for + * HT childs. + * We hard code the address because of the different size of + * the reg address cell, we shall fix that by killing struct + * reg_property and using some accessor functions instead + */ + hose->first_busno = 0xf0; + hose->last_busno = 0xff; + hose->ops = &u3_agp_pci_ops; + hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000); + hose->cfg_data = ioremap(0xf0000000 + 0xc00000, 0x1000); + + u3_agp = hose; +} + +static void __init setup_u3_ht(struct pci_controller* hose) +{ + hose->ops = &u3_ht_pci_ops; + + /* We hard code the address because of the different size of + * the reg address cell, we shall fix that by killing struct + * reg_property and using some accessor functions instead + */ + hose->cfg_data = (volatile unsigned char *)ioremap(0xf2000000, 0x02000000); + + hose->first_busno = 0; + hose->last_busno = 0xef; + + u3_ht = hose; +} + +static int __init add_bridge(struct device_node *dev) +{ + int len; + struct pci_controller *hose; + char* disp_name; + int *bus_range; + int primary = 1; + struct property *of_prop; + + DBG("Adding PCI host bridge %s\n", dev->full_name); + + bus_range = (int *) get_property(dev, "bus-range", &len); + if (bus_range == NULL || len < 2 * sizeof(int)) { + printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n", + dev->full_name); + } + + hose = pci_alloc_pci_controller(phb_type_apple); + if (!hose) + return -ENOMEM; + hose->arch_data = dev; + hose->first_busno = bus_range ? bus_range[0] : 0; + hose->last_busno = bus_range ? bus_range[1] : 0xff; + + of_prop = (struct property *)alloc_bootmem(sizeof(struct property) + + sizeof(hose->global_number)); + if (of_prop) { + memset(of_prop, 0, sizeof(struct property)); + of_prop->name = "linux,pci-domain"; + of_prop->length = sizeof(hose->global_number); + of_prop->value = (unsigned char *)&of_prop[1]; + memcpy(of_prop->value, &hose->global_number, sizeof(hose->global_number)); + prom_add_property(dev, of_prop); + } + + disp_name = NULL; + if (device_is_compatible(dev, "u3-agp")) { + setup_u3_agp(hose); + disp_name = "U3-AGP"; + primary = 0; + } else if (device_is_compatible(dev, "u3-ht")) { + setup_u3_ht(hose); + disp_name = "U3-HT"; + primary = 1; + } + printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n", + disp_name, hose->first_busno, hose->last_busno); + + /* Interpret the "ranges" property */ + /* This also maps the I/O region and sets isa_io/mem_base */ + pci_process_bridge_OF_ranges(hose, dev); + pci_setup_phb_io(hose, primary); + + /* Fixup "bus-range" OF property */ + fixup_bus_range(dev); + + return 0; +} + + +void __init maple_pcibios_fixup(void) +{ + struct pci_dev *dev = NULL; + + DBG(" -> maple_pcibios_fixup\n"); + + while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) + pci_read_irq_line(dev); + + /* Do the mapping of the IO space */ + phbs_remap_io(); + + /* Fixup the pci_bus sysdata pointers */ + pci_fix_bus_sysdata(); + + /* Setup the iommu */ + iommu_setup_u3(); + + DBG(" <- maple_pcibios_fixup\n"); +} + +static void __init maple_fixup_phb_resources(void) +{ + struct pci_controller *hose, *tmp; + + list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { + unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base; + hose->io_resource.start += offset; + hose->io_resource.end += offset; + printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n", + hose->global_number, + hose->io_resource.start, hose->io_resource.end); + } +} + +void __init maple_pci_init(void) +{ + struct device_node *np, *root; + struct device_node *ht = NULL; + + /* Probe root PCI hosts, that is on U3 the AGP host and the + * HyperTransport host. That one is actually "kept" around + * and actually added last as it's resource management relies + * on the AGP resources to have been setup first + */ + root = of_find_node_by_path("/"); + if (root == NULL) { + printk(KERN_CRIT "maple_find_bridges: can't find root of device tree\n"); + return; + } + for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) { + if (np->name == NULL) + continue; + if (strcmp(np->name, "pci") == 0) { + if (add_bridge(np) == 0) + of_node_get(np); + } + if (strcmp(np->name, "ht") == 0) { + of_node_get(np); + ht = np; + } + } + of_node_put(root); + + /* Now setup the HyperTransport host if we found any + */ + if (ht && add_bridge(ht) != 0) + of_node_put(ht); + + /* Fixup the IO resources on our host bridges as the common code + * does it only for childs of the host bridges + */ + maple_fixup_phb_resources(); + + /* Setup the linkage between OF nodes and PHBs */ + pci_devs_phb_init(); + + /* Fixup the PCI<->OF mapping for U3 AGP due to bus renumbering. We + * assume there is no P2P bridge on the AGP bus, which should be a + * safe assumptions hopefully. + */ + if (u3_agp) { + struct device_node *np = u3_agp->arch_data; + np->busno = 0xf0; + for (np = np->child; np; np = np->sibling) + np->busno = 0xf0; + } + + /* Tell pci.c to use the common resource allocation mecanism */ + pci_probe_only = 0; + + /* Allow all IO */ + io_page_mask = -1; +} + +int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel) +{ + struct device_node *np; + int irq = channel ? 15 : 14; + + if (pdev->vendor != PCI_VENDOR_ID_AMD || + pdev->device != PCI_DEVICE_ID_AMD_8111_IDE) + return irq; + + np = pci_device_to_OF_node(pdev); + if (np == NULL) + return irq; + if (np->n_intrs < 2) + return irq; + return np->intrs[channel & 0x1].line; +} + +/* XXX: To remove once all firmwares are ok */ +static void fixup_maple_ide(struct pci_dev* dev) +{ +#if 0 /* Enable this to enable IDE port 0 */ + { + u8 v; + + pci_read_config_byte(dev, 0x40, &v); + v |= 2; + pci_write_config_byte(dev, 0x40, v); + } +#endif +#if 0 /* fix bus master base */ + pci_write_config_dword(dev, 0x20, 0xcc01); + printk("old ide resource: %lx -> %lx \n", + dev->resource[4].start, dev->resource[4].end); + dev->resource[4].start = 0xcc00; + dev->resource[4].end = 0xcc10; +#endif +#if 1 /* Enable this to fixup IDE sense/polarity of irqs in IO-APICs */ + { + struct pci_dev *apicdev; + u32 v; + + apicdev = pci_get_slot (dev->bus, PCI_DEVFN(5,0)); + if (apicdev == NULL) + printk("IDE Fixup IRQ: Can't find IO-APIC !\n"); + else { + pci_write_config_byte(apicdev, 0xf2, 0x10 + 2*14); + pci_read_config_dword(apicdev, 0xf4, &v); + v &= ~0x00000022; + pci_write_config_dword(apicdev, 0xf4, v); + pci_write_config_byte(apicdev, 0xf2, 0x10 + 2*15); + pci_read_config_dword(apicdev, 0xf4, &v); + v &= ~0x00000022; + pci_write_config_dword(apicdev, 0xf4, v); + pci_dev_put(apicdev); + } + } +#endif +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_IDE, + fixup_maple_ide); diff -Nru a/arch/ppc64/kernel/maple_setup.c b/arch/ppc64/kernel/maple_setup.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/maple_setup.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,241 @@ +/* + * arch/ppc64/kernel/maple_setup.c + * + * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org), + * IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + */ + +#define DEBUG + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "mpic.h" + +#ifdef DEBUG +#define DBG(fmt...) udbg_printf(fmt) +#else +#define DBG(fmt...) +#endif + +extern int maple_set_rtc_time(struct rtc_time *tm); +extern void maple_get_rtc_time(struct rtc_time *tm); +extern void maple_get_boot_time(struct rtc_time *tm); +extern void maple_calibrate_decr(void); +extern void maple_pci_init(void); +extern void maple_pcibios_fixup(void); +extern int maple_pci_get_legacy_ide_irq(struct pci_dev *dev, int channel); +extern void generic_find_legacy_serial_ports(unsigned int *default_speed); + + +static void maple_restart(char *cmd) +{ +} + +static void maple_power_off(void) +{ +} + +static void maple_halt(void) +{ +} + +#ifdef CONFIG_SMP +struct smp_ops_t maple_smp_ops = { + .probe = smp_mpic_probe, + .message_pass = smp_mpic_message_pass, + .kick_cpu = smp_generic_kick_cpu, + .setup_cpu = smp_mpic_setup_cpu, + .give_timebase = smp_generic_give_timebase, + .take_timebase = smp_generic_take_timebase, +}; +#endif /* CONFIG_SMP */ + +void __init maple_setup_arch(void) +{ + /* init to some ~sane value until calibrate_delay() runs */ + loops_per_jiffy = 50000000; + + /* Setup SMP callback */ +#ifdef CONFIG_SMP + smp_ops = &maple_smp_ops; +#endif + /* Setup the PCI DMA to "direct" by default. May be overriden + * by iommu later on + */ + pci_dma_init_direct(); + + /* Lookup PCI hosts */ + maple_pci_init(); + +#ifdef CONFIG_DUMMY_CONSOLE + conswitchp = &dummy_con; +#endif +} + +/* + * Early initialization. + */ +static void __init maple_init_early(void) +{ + unsigned int default_speed; + + DBG(" -> maple_init_early\n"); + + /* Initialize hash table, from now on, we can take hash faults + * and call ioremap + */ + hpte_init_native(); + + /* Find the serial port */ + generic_find_legacy_serial_ports(&default_speed); + + DBG("naca->serialPortAddr: %lx\n", (long)naca->serialPortAddr); + + if (naca->serialPortAddr) { + void *comport; + /* Map the uart for udbg. */ + comport = (void *)__ioremap(naca->serialPortAddr, 16, _PAGE_NO_CACHE); + udbg_init_uart(comport, default_speed); + + ppc_md.udbg_putc = udbg_putc; + ppc_md.udbg_getc = udbg_getc; + ppc_md.udbg_getc_poll = udbg_getc_poll; + DBG("Hello World !\n"); + } + + /* Setup interrupt mapping options */ + naca->interrupt_controller = IC_OPEN_PIC; + + DBG(" <- maple_init_early\n"); +} + + +static __init void maple_init_IRQ(void) +{ + struct device_node *root; + unsigned int *opprop; + unsigned long opic_addr; + struct mpic *mpic; + unsigned char senses[128]; + int n; + + DBG(" -> maple_init_IRQ\n"); + + /* XXX: Non standard, replace that with a proper openpic/mpic node + * in the device-tree. Find the Open PIC if present */ + root = of_find_node_by_path("/"); + opprop = (unsigned int *) get_property(root, + "platform-open-pic", NULL); + if (opprop == 0) + panic("OpenPIC not found !\n"); + + n = prom_n_addr_cells(root); + for (opic_addr = 0; n > 0; --n) + opic_addr = (opic_addr << 32) + *opprop++; + of_node_put(root); + + /* Obtain sense values from device-tree */ + prom_get_irq_senses(senses, 0, 128); + + mpic = mpic_alloc(opic_addr, + MPIC_PRIMARY | MPIC_BIG_ENDIAN | + MPIC_BROKEN_U3 | MPIC_WANTS_RESET, + 0, 0, 128, 128, senses, 128, "U3-MPIC"); + BUG_ON(mpic == NULL); + mpic_init(mpic); + + DBG(" <- maple_init_IRQ\n"); +} + +static void __init maple_progress(char *s, unsigned short hex) +{ + printk("*** %04x : %s\n", hex, s ? s : ""); +} + + +/* + * Called very early, MMU is off, device-tree isn't unflattened + */ +static int __init maple_probe(int platform) +{ + if (platform != PLATFORM_MAPLE) + return 0; + /* + * On U3, the DART (iommu) must be allocated now since it + * has an impact on htab_initialize (due to the large page it + * occupies having to be broken up so the DART itself is not + * part of the cacheable linar mapping + */ + alloc_u3_dart_table(); + + return 1; +} + +struct machdep_calls __initdata maple_md = { + .probe = maple_probe, + .setup_arch = maple_setup_arch, + .init_early = maple_init_early, + .init_IRQ = maple_init_IRQ, + .get_irq = mpic_get_irq, + .pcibios_fixup = maple_pcibios_fixup, + .pci_get_legacy_ide_irq = maple_pci_get_legacy_ide_irq, + .restart = maple_restart, + .power_off = maple_power_off, + .halt = maple_halt, + .get_boot_time = maple_get_boot_time, + .set_rtc_time = maple_set_rtc_time, + .get_rtc_time = maple_get_rtc_time, + .calibrate_decr = maple_calibrate_decr, + .progress = maple_progress, +}; diff -Nru a/arch/ppc64/kernel/maple_time.c b/arch/ppc64/kernel/maple_time.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/maple_time.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,226 @@ +/* + * arch/ppc64/kernel/maple_time.c + * + * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org), + * IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + */ + +#undef DEBUG + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifdef DEBUG +#define DBG(x...) printk(x) +#else +#define DBG(x...) +#endif + +extern void setup_default_decr(void); +extern void GregorianDay(struct rtc_time * tm); + +extern unsigned long ppc_tb_freq; +extern unsigned long ppc_proc_freq; +static int maple_rtc_addr; + +static int maple_clock_read(int addr) +{ + outb_p(addr, maple_rtc_addr); + return inb_p(maple_rtc_addr+1); +} + +static void maple_clock_write(unsigned long val, int addr) +{ + outb_p(addr, maple_rtc_addr); + outb_p(val, maple_rtc_addr+1); +} + +void maple_get_rtc_time(struct rtc_time *tm) +{ + int uip, i; + + /* The Linux interpretation of the CMOS clock register contents: + * When the Update-In-Progress (UIP) flag goes from 1 to 0, the + * RTC registers show the second which has precisely just started. + * Let's hope other operating systems interpret the RTC the same way. + */ + + /* Since the UIP flag is set for about 2.2 ms and the clock + * is typically written with a precision of 1 jiffy, trying + * to obtain a precision better than a few milliseconds is + * an illusion. Only consistency is interesting, this also + * allows to use the routine for /dev/rtc without a potential + * 1 second kernel busy loop triggered by any reader of /dev/rtc. + */ + + for (i = 0; i<1000000; i++) { + uip = maple_clock_read(RTC_FREQ_SELECT); + tm->tm_sec = maple_clock_read(RTC_SECONDS); + tm->tm_min = maple_clock_read(RTC_MINUTES); + tm->tm_hour = maple_clock_read(RTC_HOURS); + tm->tm_mday = maple_clock_read(RTC_DAY_OF_MONTH); + tm->tm_mon = maple_clock_read(RTC_MONTH); + tm->tm_year = maple_clock_read(RTC_YEAR); + uip |= maple_clock_read(RTC_FREQ_SELECT); + if ((uip & RTC_UIP)==0) + break; + } + + if (!(maple_clock_read(RTC_CONTROL) & RTC_DM_BINARY) + || RTC_ALWAYS_BCD) { + BCD_TO_BIN(tm->tm_sec); + BCD_TO_BIN(tm->tm_min); + BCD_TO_BIN(tm->tm_hour); + BCD_TO_BIN(tm->tm_mday); + BCD_TO_BIN(tm->tm_mon); + BCD_TO_BIN(tm->tm_year); + } + if ((tm->tm_year + 1900) < 1970) + tm->tm_year += 100; + + GregorianDay(tm); +} + +int maple_set_rtc_time(struct rtc_time *tm) +{ + unsigned char save_control, save_freq_select; + int sec, min, hour, mon, mday, year; + + spin_lock(&rtc_lock); + + save_control = maple_clock_read(RTC_CONTROL); /* tell the clock it's being set */ + + maple_clock_write((save_control|RTC_SET), RTC_CONTROL); + + save_freq_select = maple_clock_read(RTC_FREQ_SELECT); /* stop and reset prescaler */ + + maple_clock_write((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); + + sec = tm->tm_sec; + min = tm->tm_min; + hour = tm->tm_hour; + mon = tm->tm_mon; + mday = tm->tm_mday; + year = tm->tm_year; + + if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { + BIN_TO_BCD(sec); + BIN_TO_BCD(min); + BIN_TO_BCD(hour); + BIN_TO_BCD(mon); + BIN_TO_BCD(mday); + BIN_TO_BCD(year); + } + maple_clock_write(sec, RTC_SECONDS); + maple_clock_write(min, RTC_MINUTES); + maple_clock_write(hour, RTC_HOURS); + maple_clock_write(mon, RTC_MONTH); + maple_clock_write(mday, RTC_DAY_OF_MONTH); + maple_clock_write(year, RTC_YEAR); + + /* The following flags have to be released exactly in this order, + * otherwise the DS12887 (popular MC146818A clone with integrated + * battery and quartz) will not reset the oscillator and will not + * update precisely 500 ms later. You won't find this mentioned in + * the Dallas Semiconductor data sheets, but who believes data + * sheets anyway ... -- Markus Kuhn + */ + maple_clock_write(save_control, RTC_CONTROL); + maple_clock_write(save_freq_select, RTC_FREQ_SELECT); + + spin_unlock(&rtc_lock); + + return 0; +} + +void __init maple_get_boot_time(struct rtc_time *tm) +{ + struct device_node *rtcs; + + rtcs = find_compatible_devices("rtc", "pnpPNP,b00"); + if (rtcs && rtcs->addrs) { + maple_rtc_addr = rtcs->addrs[0].address; + printk(KERN_INFO "Maple: Found RTC at 0x%x\n", maple_rtc_addr); + } else { + maple_rtc_addr = RTC_PORT(0); /* legacy address */ + printk(KERN_INFO "Maple: No device node for RTC, assuming " + "legacy address (0x%x)\n", maple_rtc_addr); + } + + maple_get_rtc_time(tm); +} + +/* XXX FIXME: Some sane defaults: 125 MHz timebase, 1GHz processor */ +#define DEFAULT_TB_FREQ 125000000UL +#define DEFAULT_PROC_FREQ (DEFAULT_TB_FREQ * 8) + +void __init maple_calibrate_decr(void) +{ + struct device_node *cpu; + struct div_result divres; + unsigned int *fp = NULL; + + /* + * The cpu node should have a timebase-frequency property + * to tell us the rate at which the decrementer counts. + */ + cpu = of_find_node_by_type(NULL, "cpu"); + + ppc_tb_freq = DEFAULT_TB_FREQ; + if (cpu != 0) + fp = (unsigned int *)get_property(cpu, "timebase-frequency", NULL); + if (fp != NULL) + ppc_tb_freq = *fp; + else + printk(KERN_ERR "WARNING: Estimating decrementer frequency (not found)\n"); + fp = NULL; + ppc_proc_freq = DEFAULT_PROC_FREQ; + if (cpu != 0) + fp = (unsigned int *)get_property(cpu, "clock-frequency", NULL); + if (fp != NULL) + ppc_proc_freq = *fp; + else + printk(KERN_ERR "WARNING: Estimating processor frequency (not found)\n"); + + of_node_put(cpu); + + printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n", + ppc_tb_freq/1000000, ppc_tb_freq%1000000); + printk(KERN_INFO "time_init: processor frequency = %lu.%.6lu MHz\n", + ppc_proc_freq/1000000, ppc_proc_freq%1000000); + + tb_ticks_per_jiffy = ppc_tb_freq / HZ; + tb_ticks_per_sec = tb_ticks_per_jiffy * HZ; + tb_ticks_per_usec = ppc_tb_freq / 1000000; + tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000); + div128_by_32(1024*1024, 0, tb_ticks_per_sec, &divres); + tb_to_xs = divres.result_low; + + setup_default_decr(); +} diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S --- a/arch/ppc64/kernel/misc.S 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc64/kernel/misc.S 2004-11-10 17:19:06 -08:00 @@ -591,7 +591,7 @@ isync b 1b -#ifdef CONFIG_PPC_PMAC +#if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) /* * Do an IO access in real mode */ @@ -653,7 +653,7 @@ sync isync blr -#endif /* CONFIG_PPC_PMAC */ +#endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */ /* * Create a kernel thread @@ -963,6 +963,9 @@ .llong .compat_sys_mq_notify .llong .compat_sys_mq_getsetattr .llong .sys_ni_syscall /* 268 reserved for sys_kexec_load */ + .llong .sys32_add_key + .llong .sys32_request_key + .llong .compat_sys_keyctl .balign 8 _GLOBAL(sys_call_table) @@ -1235,3 +1238,6 @@ .llong .sys_mq_notify .llong .sys_mq_getsetattr .llong .sys_ni_syscall /* 268 reserved for sys_kexec_load */ + .llong .sys_add_key + .llong .sys_request_key /* 270 */ + .llong .sys_keyctl diff -Nru a/arch/ppc64/kernel/mpic.c b/arch/ppc64/kernel/mpic.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/mpic.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,861 @@ +/* + * arch/ppc64/kernel/mpic.c + * + * Driver for interrupt controllers following the OpenPIC standard, the + * common implementation beeing IBM's MPIC. This driver also can deal + * with various broken implementations of this HW. + * + * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive + * for more details. + */ + +#undef DEBUG + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "mpic.h" + +#ifdef DEBUG +#define DBG(fmt...) printk(fmt) +#else +#define DBG(fmt...) +#endif + +static struct mpic *mpics; +static struct mpic *mpic_primary; +static spinlock_t mpic_lock = SPIN_LOCK_UNLOCKED; + + +/* + * Register accessor functions + */ + + +static inline u32 _mpic_read(unsigned int be, volatile u32 __iomem *base, + unsigned int reg) +{ + if (be) + return in_be32(base + (reg >> 2)); + else + return in_le32(base + (reg >> 2)); +} + +static inline void _mpic_write(unsigned int be, volatile u32 __iomem *base, + unsigned int reg, u32 value) +{ + if (be) + out_be32(base + (reg >> 2), value); + else + out_le32(base + (reg >> 2), value); +} + +static inline u32 _mpic_ipi_read(struct mpic *mpic, unsigned int ipi) +{ + unsigned int be = (mpic->flags & MPIC_BIG_ENDIAN) != 0; + unsigned int offset = MPIC_GREG_IPI_VECTOR_PRI_0 + (ipi * 0x10); + + if (mpic->flags & MPIC_BROKEN_IPI) + be = !be; + return _mpic_read(be, mpic->gregs, offset); +} + +static inline void _mpic_ipi_write(struct mpic *mpic, unsigned int ipi, u32 value) +{ + unsigned int offset = MPIC_GREG_IPI_VECTOR_PRI_0 + (ipi * 0x10); + + _mpic_write(mpic->flags & MPIC_BIG_ENDIAN, mpic->gregs, offset, value); +} + +static inline u32 _mpic_cpu_read(struct mpic *mpic, unsigned int reg) +{ + unsigned int cpu = 0; + + if (mpic->flags & MPIC_PRIMARY) + cpu = hard_smp_processor_id(); + + return _mpic_read(mpic->flags & MPIC_BIG_ENDIAN, mpic->cpuregs[cpu], reg); +} + +static inline void _mpic_cpu_write(struct mpic *mpic, unsigned int reg, u32 value) +{ + unsigned int cpu = 0; + + if (mpic->flags & MPIC_PRIMARY) + cpu = hard_smp_processor_id(); + + _mpic_write(mpic->flags & MPIC_BIG_ENDIAN, mpic->cpuregs[cpu], reg, value); +} + +static inline u32 _mpic_irq_read(struct mpic *mpic, unsigned int src_no, unsigned int reg) +{ + unsigned int isu = src_no >> mpic->isu_shift; + unsigned int idx = src_no & mpic->isu_mask; + + return _mpic_read(mpic->flags & MPIC_BIG_ENDIAN, mpic->isus[isu], + reg + (idx * MPIC_IRQ_STRIDE)); +} + +static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, + unsigned int reg, u32 value) +{ + unsigned int isu = src_no >> mpic->isu_shift; + unsigned int idx = src_no & mpic->isu_mask; + + _mpic_write(mpic->flags & MPIC_BIG_ENDIAN, mpic->isus[isu], + reg + (idx * MPIC_IRQ_STRIDE), value); +} + +#define mpic_read(b,r) _mpic_read(mpic->flags & MPIC_BIG_ENDIAN,(b),(r)) +#define mpic_write(b,r,v) _mpic_write(mpic->flags & MPIC_BIG_ENDIAN,(b),(r),(v)) +#define mpic_ipi_read(i) _mpic_ipi_read(mpic,(i)) +#define mpic_ipi_write(i,v) _mpic_ipi_write(mpic,(i),(v)) +#define mpic_cpu_read(i) _mpic_cpu_read(mpic,(i)) +#define mpic_cpu_write(i,v) _mpic_cpu_write(mpic,(i),(v)) +#define mpic_irq_read(s,r) _mpic_irq_read(mpic,(s),(r)) +#define mpic_irq_write(s,r,v) _mpic_irq_write(mpic,(s),(r),(v)) + + +/* + * Low level utility functions + */ + + + +/* Check if we have one of those nice broken MPICs with a flipped endian on + * reads from IPI registers + */ +static void __init mpic_test_broken_ipi(struct mpic *mpic) +{ + u32 r; + + mpic_write(mpic->gregs, MPIC_GREG_IPI_VECTOR_PRI_0, MPIC_VECPRI_MASK); + r = mpic_read(mpic->gregs, MPIC_GREG_IPI_VECTOR_PRI_0); + + if (r == le32_to_cpu(MPIC_VECPRI_MASK)) { + printk(KERN_INFO "mpic: Detected reversed IPI registers\n"); + mpic->flags |= MPIC_BROKEN_IPI; + } +} + +#ifdef CONFIG_MPIC_BROKEN_U3 + +/* Test if an interrupt is sourced from HyperTransport (used on broken U3s) + * to force the edge setting on the MPIC and do the ack workaround. + */ +static inline int mpic_is_ht_interrupt(struct mpic *mpic, unsigned int source_no) +{ + if (source_no >= 128 || !mpic->fixups) + return 0; + return mpic->fixups[source_no].base != NULL; +} + +static inline void mpic_apic_end_irq(struct mpic *mpic, unsigned int source_no) +{ + struct mpic_irq_fixup *fixup = &mpic->fixups[source_no]; + u32 tmp; + + spin_lock(&mpic->fixup_lock); + writeb(0x11 + 2 * fixup->irq, fixup->base); + tmp = readl(fixup->base + 2); + writel(tmp | 0x80000000ul, fixup->base + 2); + /* config writes shouldn't be posted but let's be safe ... */ + (void)readl(fixup->base + 2); + spin_unlock(&mpic->fixup_lock); +} + + +static void __init mpic_amd8111_read_irq(struct mpic *mpic, u8 __iomem *devbase) +{ + int i, irq; + u32 tmp; + + printk(KERN_INFO "mpic: - Workarounds on AMD 8111 @ %p\n", devbase); + + for (i=0; i < 24; i++) { + writeb(0x10 + 2*i, devbase + 0xf2); + tmp = readl(devbase + 0xf4); + if ((tmp & 0x1) || !(tmp & 0x20)) + continue; + irq = (tmp >> 16) & 0xff; + mpic->fixups[irq].irq = i; + mpic->fixups[irq].base = devbase + 0xf2; + } +} + +static void __init mpic_amd8131_read_irq(struct mpic *mpic, u8 __iomem *devbase) +{ + int i, irq; + u32 tmp; + + printk(KERN_INFO "mpic: - Workarounds on AMD 8131 @ %p\n", devbase); + + for (i=0; i < 4; i++) { + writeb(0x10 + 2*i, devbase + 0xba); + tmp = readl(devbase + 0xbc); + if ((tmp & 0x1) || !(tmp & 0x20)) + continue; + irq = (tmp >> 16) & 0xff; + mpic->fixups[irq].irq = i; + mpic->fixups[irq].base = devbase + 0xba; + } +} + +static void __init mpic_scan_ioapics(struct mpic *mpic) +{ + unsigned int devfn; + u8 __iomem *cfgspace; + + printk(KERN_INFO "mpic: Setting up IO-APICs workarounds for U3\n"); + + /* Allocate fixups array */ + mpic->fixups = alloc_bootmem(128 * sizeof(struct mpic_irq_fixup)); + BUG_ON(mpic->fixups == NULL); + memset(mpic->fixups, 0, 128 * sizeof(struct mpic_irq_fixup)); + + /* Init spinlock */ + spin_lock_init(&mpic->fixup_lock); + + /* Map u3 config space. We assume all IO-APICs are on the primary bus + * and slot will never be above "0xf" so we only need to map 32k + */ + cfgspace = (unsigned char __iomem *)ioremap(0xf2000000, 0x8000); + BUG_ON(cfgspace == NULL); + + /* Now we scan all slots. We do a very quick scan, we read the header type, + * vendor ID and device ID only, that's plenty enough + */ + for (devfn = 0; devfn < PCI_DEVFN(0x10,0); devfn ++) { + u8 __iomem *devbase = cfgspace + (devfn << 8); + u8 hdr_type = readb(devbase + PCI_HEADER_TYPE); + u32 l = readl(devbase + PCI_VENDOR_ID); + u16 vendor_id, device_id; + int multifunc = 0; + + DBG("devfn %x, l: %x\n", devfn, l); + + /* If no device, skip */ + if (l == 0xffffffff || l == 0x00000000 || + l == 0x0000ffff || l == 0xffff0000) + goto next; + + /* Check if it's a multifunction device (only really used + * to function 0 though + */ + multifunc = !!(hdr_type & 0x80); + vendor_id = l & 0xffff; + device_id = (l >> 16) & 0xffff; + + /* If a known device, go to fixup setup code */ + if (vendor_id == PCI_VENDOR_ID_AMD && device_id == 0x7460) + mpic_amd8111_read_irq(mpic, devbase); + if (vendor_id == PCI_VENDOR_ID_AMD && device_id == 0x7450) + mpic_amd8131_read_irq(mpic, devbase); + next: + /* next device, if function 0 */ + if ((PCI_FUNC(devfn) == 0) && !multifunc) + devfn += 7; + } +} + +#endif /* CONFIG_MPIC_BROKEN_U3 */ + + +/* Find an mpic associated with a given linux interrupt */ +static struct mpic *mpic_find(unsigned int irq, unsigned int *is_ipi) +{ + struct mpic *mpic = mpics; + + while(mpic) { + /* search IPIs first since they may override the main interrupts */ + if (irq >= mpic->ipi_offset && irq < (mpic->ipi_offset + 4)) { + if (is_ipi) + *is_ipi = 1; + return mpic; + } + if (irq >= mpic->irq_offset && + irq < (mpic->irq_offset + mpic->irq_count)) { + if (is_ipi) + *is_ipi = 0; + return mpic; + } + mpic = mpic -> next; + } + return NULL; +} + +/* Convert a cpu mask from logical to physical cpu numbers. */ +static inline u32 mpic_physmask(u32 cpumask) +{ + int i; + u32 mask = 0; + + for (i = 0; i < NR_CPUS; ++i, cpumask >>= 1) + mask |= (cpumask & 1) << get_hard_smp_processor_id(i); + return mask; +} + +#ifdef CONFIG_SMP +/* Get the mpic structure from the IPI number */ +static inline struct mpic * mpic_from_ipi(unsigned int ipi) +{ + return container_of(irq_desc[ipi].handler, struct mpic, hc_ipi); +} +#endif + +/* Get the mpic structure from the irq number */ +static inline struct mpic * mpic_from_irq(unsigned int irq) +{ + return container_of(irq_desc[irq].handler, struct mpic, hc_irq); +} + +/* Send an EOI */ +static inline void mpic_eoi(struct mpic *mpic) +{ + mpic_cpu_write(MPIC_CPU_EOI, 0); + (void)mpic_cpu_read(MPIC_CPU_WHOAMI); +} + +#ifdef CONFIG_SMP +static irqreturn_t mpic_ipi_action(int irq, void *dev_id, struct pt_regs *regs) +{ + struct mpic *mpic = dev_id; + + smp_message_recv(irq - mpic->ipi_offset, regs); + return IRQ_HANDLED; +} +#endif /* CONFIG_SMP */ + +/* + * Linux descriptor level callbacks + */ + + +static void mpic_enable_irq(unsigned int irq) +{ + unsigned int loops = 100000; + struct mpic *mpic = mpic_from_irq(irq); + unsigned int src = irq - mpic->irq_offset; + + DBG("%s: enable_irq: %d (src %d)\n", mpic->name, irq, src); + + mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, + mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & ~MPIC_VECPRI_MASK); + + /* make sure mask gets to controller before we return to user */ + do { + if (!loops--) { + printk(KERN_ERR "mpic_enable_irq timeout\n"); + break; + } + } while(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK); +} + +static void mpic_disable_irq(unsigned int irq) +{ + unsigned int loops = 100000; + struct mpic *mpic = mpic_from_irq(irq); + unsigned int src = irq - mpic->irq_offset; + + DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src); + + mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, + mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) | MPIC_VECPRI_MASK); + + /* make sure mask gets to controller before we return to user */ + do { + if (!loops--) { + printk(KERN_ERR "mpic_enable_irq timeout\n"); + break; + } + } while(!(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK)); +} + +static void mpic_end_irq(unsigned int irq) +{ + struct mpic *mpic = mpic_from_irq(irq); + + DBG("%s: end_irq: %d\n", mpic->name, irq); + + /* We always EOI on end_irq() even for edge interrupts since that + * should only lower the priority, the MPIC should have properly + * latched another edge interrupt coming in anyway + */ + +#ifdef CONFIG_MPIC_BROKEN_U3 + if (mpic->flags & MPIC_BROKEN_U3) { + unsigned int src = irq - mpic->irq_offset; + if (mpic_is_ht_interrupt(mpic, src)) + mpic_apic_end_irq(mpic, src); + } +#endif /* CONFIG_MPIC_BROKEN_U3 */ + + mpic_eoi(mpic); +} + +#ifdef CONFIG_SMP + +static void mpic_enable_ipi(unsigned int irq) +{ + struct mpic *mpic = mpic_from_ipi(irq); + unsigned int src = irq - mpic->ipi_offset; + + DBG("%s: enable_ipi: %d (ipi %d)\n", mpic->name, irq, src); + mpic_ipi_write(src, mpic_ipi_read(src) & ~MPIC_VECPRI_MASK); +} + +static void mpic_disable_ipi(unsigned int irq) +{ + /* NEVER disable an IPI... that's just plain wrong! */ +} + +static void mpic_end_ipi(unsigned int irq) +{ + struct mpic *mpic = mpic_from_ipi(irq); + + /* + * IPIs are marked IRQ_PER_CPU. This has the side effect of + * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from + * applying to them. We EOI them late to avoid re-entering. + * We mark IPI's with SA_INTERRUPT as they must run with + * irqs disabled. + */ + mpic_eoi(mpic); +} + +#endif /* CONFIG_SMP */ + +static void mpic_set_affinity(unsigned int irq, cpumask_t cpumask) +{ + struct mpic *mpic = mpic_from_irq(irq); + + cpumask_t tmp; + + cpus_and(tmp, cpumask, cpu_online_map); + + mpic_irq_write(irq - mpic->irq_offset, MPIC_IRQ_DESTINATION, + mpic_physmask(cpus_addr(tmp)[0])); +} + + +/* + * Exported functions + */ + + +struct mpic * __init mpic_alloc(unsigned long phys_addr, + unsigned int flags, + unsigned int isu_size, + unsigned int irq_offset, + unsigned int irq_count, + unsigned int ipi_offset, + unsigned char *senses, + unsigned int senses_count, + const char *name) +{ + struct mpic *mpic; + u32 reg; + const char *vers; + int i; + + mpic = (struct mpic *)alloc_bootmem(sizeof(struct mpic)); + if (mpic == NULL) + return NULL; + + memset(mpic, 0, sizeof(struct mpic)); + mpic->name = name; + + mpic->hc_irq.typename = name; + mpic->hc_irq.enable = mpic_enable_irq; + mpic->hc_irq.disable = mpic_disable_irq; + mpic->hc_irq.end = mpic_end_irq; + if (flags & MPIC_PRIMARY) + mpic->hc_irq.set_affinity = mpic_set_affinity; +#ifdef CONFIG_SMP + mpic->hc_ipi.typename = name; + mpic->hc_ipi.enable = mpic_enable_ipi; + mpic->hc_ipi.disable = mpic_disable_ipi; + mpic->hc_ipi.end = mpic_end_ipi; +#endif /* CONFIG_SMP */ + + mpic->flags = flags; + mpic->isu_size = isu_size; + mpic->irq_offset = irq_offset; + mpic->irq_count = irq_count; + mpic->ipi_offset = ipi_offset; + mpic->num_sources = 0; /* so far */ + mpic->senses = senses; + mpic->senses_count = senses_count; + + /* Map the global registers */ + mpic->gregs = ioremap(phys_addr + MPIC_GREG_BASE, 0x1000); + mpic->tmregs = mpic->gregs + (MPIC_TIMER_BASE >> 2); + BUG_ON(mpic->gregs == NULL); + + /* Reset */ + if (flags & MPIC_WANTS_RESET) { + mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0, + mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0) + | MPIC_GREG_GCONF_RESET); + while( mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0) + & MPIC_GREG_GCONF_RESET) + mb(); + } + + /* Read feature register, calculate num CPUs and, for non-ISU + * MPICs, num sources as well. On ISU MPICs, sources are counted + * as ISUs are added + */ + reg = mpic_read(mpic->gregs, MPIC_GREG_FEATURE_0); + mpic->num_cpus = ((reg & MPIC_GREG_FEATURE_LAST_CPU_MASK) + >> MPIC_GREG_FEATURE_LAST_CPU_SHIFT) + 1; + if (isu_size == 0) + mpic->num_sources = ((reg & MPIC_GREG_FEATURE_LAST_SRC_MASK) + >> MPIC_GREG_FEATURE_LAST_SRC_SHIFT) + 1; + + /* Map the per-CPU registers */ + for (i = 0; i < mpic->num_cpus; i++) { + mpic->cpuregs[i] = ioremap(phys_addr + MPIC_CPU_BASE + + i * MPIC_CPU_STRIDE, 0x1000); + BUG_ON(mpic->cpuregs[i] == NULL); + } + + /* Initialize main ISU if none provided */ + if (mpic->isu_size == 0) { + mpic->isu_size = mpic->num_sources; + mpic->isus[0] = ioremap(phys_addr + MPIC_IRQ_BASE, + MPIC_IRQ_STRIDE * mpic->isu_size); + BUG_ON(mpic->isus[0] == NULL); + } + mpic->isu_shift = 1 + __ilog2(mpic->isu_size - 1); + mpic->isu_mask = (1 << mpic->isu_shift) - 1; + + /* Display version */ + switch (reg & MPIC_GREG_FEATURE_VERSION_MASK) { + case 1: + vers = "1.0"; + break; + case 2: + vers = "1.2"; + break; + case 3: + vers = "1.3"; + break; + default: + vers = ""; + break; + } + printk(KERN_INFO "mpic: Setting up MPIC \"%s\" version %s at %lx, max %d CPUs\n", + name, vers, phys_addr, mpic->num_cpus); + printk(KERN_INFO "mpic: ISU size: %d, shift: %d, mask: %x\n", mpic->isu_size, + mpic->isu_shift, mpic->isu_mask); + + mpic->next = mpics; + mpics = mpic; + + if (flags & MPIC_PRIMARY) + mpic_primary = mpic; + + return mpic; +} + +void __init mpic_assign_isu(struct mpic *mpic, unsigned int isu_num, + unsigned long phys_addr) +{ + unsigned int isu_first = isu_num * mpic->isu_size; + + BUG_ON(isu_num >= MPIC_MAX_ISU); + + mpic->isus[isu_num] = ioremap(phys_addr, MPIC_IRQ_STRIDE * mpic->isu_size); + if ((isu_first + mpic->isu_size) > mpic->num_sources) + mpic->num_sources = isu_first + mpic->isu_size; +} + +void __init mpic_setup_cascade(unsigned int irq, mpic_cascade_t handler, + void *data) +{ + struct mpic *mpic = mpic_find(irq, NULL); + unsigned long flags; + + /* Synchronization here is a bit dodgy, so don't try to replace cascade + * interrupts on the fly too often ... but normally it's set up at boot. + */ + spin_lock_irqsave(&mpic_lock, flags); + if (mpic->cascade) + mpic_disable_irq(mpic->cascade_vec + mpic->irq_offset); + mpic->cascade = NULL; + wmb(); + mpic->cascade_vec = irq - mpic->irq_offset; + mpic->cascade_data = data; + wmb(); + mpic->cascade = handler; + mpic_enable_irq(irq); + spin_unlock_irqrestore(&mpic_lock, flags); +} + +void __init mpic_init(struct mpic *mpic) +{ + int i; + + BUG_ON(mpic->num_sources == 0); + + printk(KERN_INFO "mpic: Initializing for %d sources\n", mpic->num_sources); + + /* Set current processor priority to max */ + mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0xf); + + /* Initialize timers: just disable them all */ + for (i = 0; i < 4; i++) { + mpic_write(mpic->tmregs, + i * MPIC_TIMER_STRIDE + MPIC_TIMER_DESTINATION, 0); + mpic_write(mpic->tmregs, + i * MPIC_TIMER_STRIDE + MPIC_TIMER_VECTOR_PRI, + MPIC_VECPRI_MASK | + (MPIC_VEC_TIMER_0 + i)); + } + + /* Initialize IPIs to our reserved vectors and mark them disabled for now */ + mpic_test_broken_ipi(mpic); + for (i = 0; i < 4; i++) { + mpic_ipi_write(i, + MPIC_VECPRI_MASK | + (10 << MPIC_VECPRI_PRIORITY_SHIFT) | + (MPIC_VEC_IPI_0 + i)); +#ifdef CONFIG_SMP + if (!(mpic->flags & MPIC_PRIMARY)) + continue; + irq_desc[mpic->ipi_offset+i].status |= IRQ_PER_CPU; + irq_desc[mpic->ipi_offset+i].handler = &mpic->hc_ipi; + +#endif /* CONFIG_SMP */ + } + + /* Initialize interrupt sources */ + if (mpic->irq_count == 0) + mpic->irq_count = mpic->num_sources; + +#ifdef CONFIG_MPIC_BROKEN_U3 + /* Do the ioapic fixups on U3 broken mpic */ + DBG("MPIC flags: %x\n", mpic->flags); + if ((mpic->flags & MPIC_BROKEN_U3) && (mpic->flags & MPIC_PRIMARY)) + mpic_scan_ioapics(mpic); +#endif /* CONFIG_MPIC_BROKEN_U3 */ + + for (i = 0; i < mpic->num_sources; i++) { + /* start with vector = source number, and masked */ + u32 vecpri = MPIC_VECPRI_MASK | i | (8 << MPIC_VECPRI_PRIORITY_SHIFT); + int level = 0; + + /* if it's an IPI, we skip it */ + if ((mpic->irq_offset + i) >= (mpic->ipi_offset + i) && + (mpic->irq_offset + i) < (mpic->ipi_offset + i + 4)) + continue; + + /* do senses munging */ + if (mpic->senses && i < mpic->senses_count) { + if (mpic->senses[i] & IRQ_SENSE_LEVEL) + vecpri |= MPIC_VECPRI_SENSE_LEVEL; + if (mpic->senses[i] & IRQ_POLARITY_POSITIVE) + vecpri |= MPIC_VECPRI_POLARITY_POSITIVE; + } else + vecpri |= MPIC_VECPRI_SENSE_LEVEL; + + /* remember if it was a level interrupts */ + level = (vecpri & MPIC_VECPRI_SENSE_LEVEL); + + /* deal with broken U3 */ + if (mpic->flags & MPIC_BROKEN_U3) { +#ifdef CONFIG_MPIC_BROKEN_U3 + if (mpic_is_ht_interrupt(mpic, i)) { + vecpri &= ~(MPIC_VECPRI_SENSE_MASK | + MPIC_VECPRI_POLARITY_MASK); + vecpri |= MPIC_VECPRI_POLARITY_POSITIVE; + } +#else + printk(KERN_ERR "mpic: BROKEN_U3 set, but CONFIG doesn't match\n"); +#endif + } + + DBG("setup source %d, vecpri: %08x, level: %d\n", i, vecpri, + (level != 0)); + + /* init hw */ + mpic_irq_write(i, MPIC_IRQ_VECTOR_PRI, vecpri); + mpic_irq_write(i, MPIC_IRQ_DESTINATION, + 1 << get_hard_smp_processor_id(boot_cpuid)); + + /* init linux descriptors */ + if (i < mpic->irq_count) { + irq_desc[mpic->irq_offset+i].status = level ? IRQ_LEVEL : 0; + irq_desc[mpic->irq_offset+i].handler = &mpic->hc_irq; + } + } + + /* Init spurrious vector */ + mpic_write(mpic->gregs, MPIC_GREG_SPURIOUS, MPIC_VEC_SPURRIOUS); + + /* Disable 8259 passthrough */ + mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0, + mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0) + | MPIC_GREG_GCONF_8259_PTHROU_DIS); + + /* Set current processor priority to 0 */ + mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0); +} + + + +void mpic_irq_set_priority(unsigned int irq, unsigned int pri) +{ + int is_ipi; + struct mpic *mpic = mpic_find(irq, &is_ipi); + unsigned long flags; + u32 reg; + + spin_lock_irqsave(&mpic_lock, flags); + if (is_ipi) { + reg = mpic_ipi_read(irq - mpic->ipi_offset) & MPIC_VECPRI_PRIORITY_MASK; + mpic_ipi_write(irq - mpic->ipi_offset, + reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT)); + } else { + reg = mpic_irq_read(irq - mpic->irq_offset, MPIC_IRQ_VECTOR_PRI) + & MPIC_VECPRI_PRIORITY_MASK; + mpic_irq_write(irq - mpic->irq_offset, MPIC_IRQ_VECTOR_PRI, + reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT)); + } + spin_unlock_irqrestore(&mpic_lock, flags); +} + +unsigned int mpic_irq_get_priority(unsigned int irq) +{ + int is_ipi; + struct mpic *mpic = mpic_find(irq, &is_ipi); + unsigned long flags; + u32 reg; + + spin_lock_irqsave(&mpic_lock, flags); + if (is_ipi) + reg = mpic_ipi_read(irq - mpic->ipi_offset); + else + reg = mpic_irq_read(irq - mpic->irq_offset, MPIC_IRQ_VECTOR_PRI); + spin_unlock_irqrestore(&mpic_lock, flags); + return (reg & MPIC_VECPRI_PRIORITY_MASK) >> MPIC_VECPRI_PRIORITY_SHIFT; +} + +void mpic_setup_this_cpu(void) +{ +#ifdef CONFIG_SMP + struct mpic *mpic = mpic_primary; + unsigned long flags; +#ifdef CONFIG_IRQ_ALL_CPUS + u32 msk = 1 << hard_smp_processor_id(); + unsigned int i; +#endif + + BUG_ON(mpic == NULL); + + DBG("%s: setup_this_cpu(%d)\n", mpic->name, hard_smp_processor_id()); + + spin_lock_irqsave(&mpic_lock, flags); + +#ifdef CONFIG_IRQ_ALL_CPUS + /* let the mpic know we want intrs. default affinity is 0xffffffff + * until changed via /proc. That's how it's done on x86. If we want + * it differently, then we should make sure we also change the default + * values of irq_affinity in irq.c. + */ + for (i = 0; i < mpic->num_sources ; i++) + mpic_irq_write(i, MPIC_IRQ_DESTINATION, + mpic_irq_read(i, MPIC_IRQ_DESTINATION) | msk); +#endif /* CONFIG_IRQ_ALL_CPUS */ + + /* Set current processor priority to 0 */ + mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0); + + spin_unlock_irqrestore(&mpic_lock, flags); +#endif /* CONFIG_SMP */ +} + +void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask) +{ + struct mpic *mpic = mpic_primary; + + BUG_ON(mpic == NULL); + + DBG("%s: send_ipi(ipi_no: %d)\n", mpic->name, ipi_no); + + mpic_cpu_write(MPIC_CPU_IPI_DISPATCH_0 + ipi_no * 0x10, + mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0])); +} + +int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs) +{ + u32 irq; + + irq = mpic_cpu_read(MPIC_CPU_INTACK) & MPIC_VECPRI_VECTOR_MASK; + DBG("%s: get_one_irq(): %d\n", mpic->name, irq); + + if (mpic->cascade && irq == mpic->cascade_vec) { + DBG("%s: cascading ...\n", mpic->name); + irq = mpic->cascade(regs, mpic->cascade_data); + mpic_eoi(mpic); + return irq; + } + if (unlikely(irq == MPIC_VEC_SPURRIOUS)) + return -1; + if (irq < MPIC_VEC_IPI_0) + return irq + mpic->irq_offset; + DBG("%s: ipi %d !\n", mpic->name, irq - MPIC_VEC_IPI_0); + return irq - MPIC_VEC_IPI_0 + mpic->ipi_offset; +} + +int mpic_get_irq(struct pt_regs *regs) +{ + struct mpic *mpic = mpic_primary; + + BUG_ON(mpic == NULL); + + return mpic_get_one_irq(mpic, regs); +} + + +#ifdef CONFIG_SMP +void mpic_request_ipis(void) +{ + struct mpic *mpic = mpic_primary; + + BUG_ON(mpic == NULL); + + printk("requesting IPIs ... \n"); + + /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ + request_irq(mpic->ipi_offset+0, mpic_ipi_action, SA_INTERRUPT, + "IPI0 (call function)", mpic); + request_irq(mpic->ipi_offset+1, mpic_ipi_action, SA_INTERRUPT, + "IPI1 (reschedule)", mpic); + request_irq(mpic->ipi_offset+2, mpic_ipi_action, SA_INTERRUPT, + "IPI2 (unused)", mpic); + request_irq(mpic->ipi_offset+3, mpic_ipi_action, SA_INTERRUPT, + "IPI3 (debugger break)", mpic); + + printk("IPIs requested... \n"); +} +#endif /* CONFIG_SMP */ diff -Nru a/arch/ppc64/kernel/mpic.h b/arch/ppc64/kernel/mpic.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/mpic.h 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,267 @@ +#include + +/* + * Global registers + */ + +#define MPIC_GREG_BASE 0x01000 + +#define MPIC_GREG_FEATURE_0 0x00000 +#define MPIC_GREG_FEATURE_LAST_SRC_MASK 0x07ff0000 +#define MPIC_GREG_FEATURE_LAST_SRC_SHIFT 16 +#define MPIC_GREG_FEATURE_LAST_CPU_MASK 0x00001f00 +#define MPIC_GREG_FEATURE_LAST_CPU_SHIFT 8 +#define MPIC_GREG_FEATURE_VERSION_MASK 0xff +#define MPIC_GREG_FEATURE_1 0x00010 +#define MPIC_GREG_GLOBAL_CONF_0 0x00020 +#define MPIC_GREG_GCONF_RESET 0x80000000 +#define MPIC_GREG_GCONF_8259_PTHROU_DIS 0x20000000 +#define MPIC_GREG_GCONF_BASE_MASK 0x000fffff +#define MPIC_GREG_GLOBAL_CONF_1 0x00030 +#define MPIC_GREG_VENDOR_0 0x00040 +#define MPIC_GREG_VENDOR_1 0x00050 +#define MPIC_GREG_VENDOR_2 0x00060 +#define MPIC_GREG_VENDOR_3 0x00070 +#define MPIC_GREG_VENDOR_ID 0x00080 +#define MPIC_GREG_VENDOR_ID_STEPPING_MASK 0x00ff0000 +#define MPIC_GREG_VENDOR_ID_STEPPING_SHIFT 16 +#define MPIC_GREG_VENDOR_ID_DEVICE_ID_MASK 0x0000ff00 +#define MPIC_GREG_VENDOR_ID_DEVICE_ID_SHIFT 8 +#define MPIC_GREG_VENDOR_ID_VENDOR_ID_MASK 0x000000ff +#define MPIC_GREG_PROCESSOR_INIT 0x00090 +#define MPIC_GREG_IPI_VECTOR_PRI_0 0x000a0 +#define MPIC_GREG_IPI_VECTOR_PRI_1 0x000b0 +#define MPIC_GREG_IPI_VECTOR_PRI_2 0x000c0 +#define MPIC_GREG_IPI_VECTOR_PRI_3 0x000d0 +#define MPIC_GREG_SPURIOUS 0x000e0 +#define MPIC_GREG_TIMER_FREQ 0x000f0 + +/* + * + * Timer registers + */ +#define MPIC_TIMER_BASE 0x01100 +#define MPIC_TIMER_STRIDE 0x40 + +#define MPIC_TIMER_CURRENT_CNT 0x00000 +#define MPIC_TIMER_BASE_CNT 0x00010 +#define MPIC_TIMER_VECTOR_PRI 0x00020 +#define MPIC_TIMER_DESTINATION 0x00030 + +/* + * Per-Processor registers + */ + +#define MPIC_CPU_THISBASE 0x00000 +#define MPIC_CPU_BASE 0x20000 +#define MPIC_CPU_STRIDE 0x01000 + +#define MPIC_CPU_IPI_DISPATCH_0 0x00040 +#define MPIC_CPU_IPI_DISPATCH_1 0x00050 +#define MPIC_CPU_IPI_DISPATCH_2 0x00060 +#define MPIC_CPU_IPI_DISPATCH_3 0x00070 +#define MPIC_CPU_CURRENT_TASK_PRI 0x00080 +#define MPIC_CPU_TASKPRI_MASK 0x0000000f +#define MPIC_CPU_WHOAMI 0x00090 +#define MPIC_CPU_WHOAMI_MASK 0x0000001f +#define MPIC_CPU_INTACK 0x000a0 +#define MPIC_CPU_EOI 0x000b0 + +/* + * Per-source registers + */ + +#define MPIC_IRQ_BASE 0x10000 +#define MPIC_IRQ_STRIDE 0x00020 +#define MPIC_IRQ_VECTOR_PRI 0x00000 +#define MPIC_VECPRI_MASK 0x80000000 +#define MPIC_VECPRI_ACTIVITY 0x40000000 /* Read Only */ +#define MPIC_VECPRI_PRIORITY_MASK 0x000f0000 +#define MPIC_VECPRI_PRIORITY_SHIFT 16 +#define MPIC_VECPRI_VECTOR_MASK 0x000007ff +#define MPIC_VECPRI_POLARITY_POSITIVE 0x00800000 +#define MPIC_VECPRI_POLARITY_NEGATIVE 0x00000000 +#define MPIC_VECPRI_POLARITY_MASK 0x00800000 +#define MPIC_VECPRI_SENSE_LEVEL 0x00400000 +#define MPIC_VECPRI_SENSE_EDGE 0x00000000 +#define MPIC_VECPRI_SENSE_MASK 0x00400000 +#define MPIC_IRQ_DESTINATION 0x00010 + +#define MPIC_MAX_IRQ_SOURCES 2048 +#define MPIC_MAX_CPUS 32 +#define MPIC_MAX_ISU 32 + +/* + * Special vector numbers (internal use only) + */ +#define MPIC_VEC_SPURRIOUS 255 +#define MPIC_VEC_IPI_3 254 +#define MPIC_VEC_IPI_2 253 +#define MPIC_VEC_IPI_1 252 +#define MPIC_VEC_IPI_0 251 + +/* unused */ +#define MPIC_VEC_TIMER_3 250 +#define MPIC_VEC_TIMER_2 249 +#define MPIC_VEC_TIMER_1 248 +#define MPIC_VEC_TIMER_0 247 + +/* Type definition of the cascade handler */ +typedef int (*mpic_cascade_t)(struct pt_regs *regs, void *data); + +#ifdef CONFIG_MPIC_BROKEN_U3 +/* Fixup table entry */ +struct mpic_irq_fixup +{ + u8 __iomem *base; + unsigned int irq; +}; +#endif /* CONFIG_MPIC_BROKEN_U3 */ + + +/* The instance data of a given MPIC */ +struct mpic +{ + /* The "linux" controller struct */ + hw_irq_controller hc_irq; +#ifdef CONFIG_SMP + hw_irq_controller hc_ipi; +#endif + const char *name; + /* Flags */ + unsigned int flags; + /* How many irq sources in a given ISU */ + unsigned int isu_size; + unsigned int isu_shift; + unsigned int isu_mask; + /* Offset of irq vector numbers */ + unsigned int irq_offset; + unsigned int irq_count; + /* Offset of ipi vector numbers */ + unsigned int ipi_offset; + /* Number of sources */ + unsigned int num_sources; + /* Number of CPUs */ + unsigned int num_cpus; + /* cascade handler */ + mpic_cascade_t cascade; + void *cascade_data; + unsigned int cascade_vec; + /* senses array */ + unsigned char *senses; + unsigned int senses_count; + +#ifdef CONFIG_MPIC_BROKEN_U3 + /* The fixup table */ + struct mpic_irq_fixup *fixups; + spinlock_t fixup_lock; +#endif + + /* The various ioremap'ed bases */ + volatile u32 __iomem *gregs; + volatile u32 __iomem *tmregs; + volatile u32 __iomem *cpuregs[MPIC_MAX_CPUS]; + volatile u32 __iomem *isus[MPIC_MAX_ISU]; + + /* link */ + struct mpic *next; +}; + +/* This is the primary controller, only that one has IPIs and + * has afinity control. A non-primary MPIC always uses CPU0 + * registers only + */ +#define MPIC_PRIMARY 0x00000001 +/* Set this for a big-endian MPIC */ +#define MPIC_BIG_ENDIAN 0x00000002 +/* Broken U3 MPIC */ +#define MPIC_BROKEN_U3 0x00000004 +/* Broken IPI registers (autodetected) */ +#define MPIC_BROKEN_IPI 0x00000008 +/* MPIC wants a reset */ +#define MPIC_WANTS_RESET 0x00000010 + +/* Allocate the controller structure and setup the linux irq descs + * for the range if interrupts passed in. No HW initialization is + * actually performed. + * + * @phys_addr: physial base address of the MPIC + * @flags: flags, see constants above + * @isu_size: number of interrupts in an ISU. Use 0 to use a + * standard ISU-less setup (aka powermac) + * @irq_offset: first irq number to assign to this mpic + * @irq_count: number of irqs to use with this mpic IRQ sources. Pass 0 + * to match the number of sources + * @ipi_offset: first irq number to assign to this mpic IPI sources, + * used only on primary mpic + * @senses: array of sense values + * @senses_num: number of entries in the array + * + * Note about the sense array. If none is passed, all interrupts are + * setup to be level negative unless MPIC_BROKEN_U3 is set in which + * case they are edge positive (and the array is ignored anyway). + * The values in the array start at the first source of the MPIC, + * that is senses[0] correspond to linux irq "irq_offset". + */ +extern struct mpic *mpic_alloc(unsigned long phys_addr, + unsigned int flags, + unsigned int isu_size, + unsigned int irq_offset, + unsigned int irq_count, + unsigned int ipi_offset, + unsigned char *senses, + unsigned int senses_num, + const char *name); + +/* Assign ISUs, to call before mpic_init() + * + * @mpic: controller structure as returned by mpic_alloc() + * @isu_num: ISU number + * @phys_addr: physical address of the ISU + */ +extern void mpic_assign_isu(struct mpic *mpic, unsigned int isu_num, + unsigned long phys_addr); + +/* Initialize the controller. After this has been called, none of the above + * should be called again for this mpic + */ +extern void mpic_init(struct mpic *mpic); + +/* Setup a cascade. Currently, only one cascade is supported this + * way, though you can always do a normal request_irq() and add + * other cascades this way. You should call this _after_ having + * added all the ISUs + * + * @irq_no: "linux" irq number of the cascade (that is offset'ed vector) + * @handler: cascade handler function + */ +extern void mpic_setup_cascade(unsigned int irq_no, mpic_cascade_t hanlder, + void *data); + +/* + * All of the following functions must only be used after the + * ISUs have been assigned and the controller fully initialized + * with mpic_init() + */ + + +/* Change/Read the priority of an interrupt. Default is 8 for irqs and + * 10 for IPIs. You can call this on both IPIs and IRQ numbers, but the + * IPI number is then the offset'ed (linux irq number mapped to the IPI) + */ +extern void mpic_irq_set_priority(unsigned int irq, unsigned int pri); +extern unsigned int mpic_irq_get_priority(unsigned int irq); + +/* Setup a non-boot CPU */ +extern void mpic_setup_this_cpu(void); + +/* Request IPIs on primary mpic */ +extern void mpic_request_ipis(void); + +/* Send an IPI (non offseted number 0..3) */ +extern void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask); + +/* Fetch interrupt from a given mpic */ +extern int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs); +/* This one gets to the primary mpic */ +extern int mpic_get_irq(struct pt_regs *regs); diff -Nru a/arch/ppc64/kernel/nvram.c b/arch/ppc64/kernel/nvram.c --- a/arch/ppc64/kernel/nvram.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/nvram.c 2004-11-10 17:19:02 -08:00 @@ -77,7 +77,7 @@ } -static ssize_t dev_nvram_read(struct file *file, char *buf, +static ssize_t dev_nvram_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { ssize_t len; @@ -117,7 +117,7 @@ } -static ssize_t dev_nvram_write(struct file *file, const char *buf, +static ssize_t dev_nvram_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { ssize_t len; @@ -711,7 +711,7 @@ /* This doesn't actually zero anything, but it sets the event_logged * word to tell that this event is safely in syslog. */ -int nvram_clear_error_log() +int nvram_clear_error_log(void) { loff_t tmp_index; int clear_word = ERR_FLAG_ALREADY_LOGGED; diff -Nru a/arch/ppc64/kernel/open_pic.c b/arch/ppc64/kernel/open_pic.c --- a/arch/ppc64/kernel/open_pic.c 2004-11-10 17:19:05 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,886 +0,0 @@ -/* - * arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling - * - * Copyright (C) 1997 Geert Uytterhoeven - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "open_pic.h" -#include "open_pic_defs.h" -#include "i8259.h" -#include - -void* OpenPIC_Addr; -static volatile struct OpenPIC *OpenPIC = NULL; -u_int OpenPIC_NumInitSenses __initdata = 0; -u_char *OpenPIC_InitSenses __initdata = NULL; - -/* - * Local (static) OpenPIC Operations - */ - - -/* Global Operations */ -static void openpic_reset(void); -static void openpic_enable_8259_pass_through(void); -static void openpic_disable_8259_pass_through(void); -static u_int openpic_irq(void); -static void openpic_eoi(void); -static u_int openpic_get_priority(void); -static void openpic_set_priority(u_int pri); -static u_int openpic_get_spurious(void); -static void openpic_set_spurious(u_int vector); - -#ifdef CONFIG_SMP -/* Interprocessor Interrupts */ -static void openpic_initipi(u_int ipi, u_int pri, u_int vector); -static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, - struct pt_regs *regs); -#endif - -/* Timer Interrupts */ -static void openpic_inittimer(u_int timer, u_int pri, u_int vector); -static void openpic_maptimer(u_int timer, u_int cpumask); - -/* Interrupt Sources */ -static void openpic_enable_irq(u_int irq); -static void openpic_disable_irq(u_int irq); -static void openpic_initirq(u_int irq, u_int pri, u_int vector, int polarity, - int is_level); -static void openpic_mapirq(u_int irq, u_int cpumask); - -static void find_ISUs(void); - -static u_int NumProcessors; -static u_int NumSources; -static int NumISUs; -static int open_pic_irq_offset; -static volatile unsigned char* chrp_int_ack_special; - -OpenPIC_SourcePtr ISU[OPENPIC_MAX_ISU]; - -static void openpic_end_irq(unsigned int irq_nr); -static void openpic_set_affinity(unsigned int irq_nr, cpumask_t cpumask); - -struct hw_interrupt_type open_pic = { - " OpenPIC ", - NULL, - NULL, - openpic_enable_irq, - openpic_disable_irq, - NULL, - openpic_end_irq, - openpic_set_affinity -}; - -#ifdef CONFIG_SMP -static void openpic_end_ipi(unsigned int irq_nr); -static void openpic_enable_ipi(unsigned int irq_nr); -static void openpic_disable_ipi(unsigned int irq_nr); - -struct hw_interrupt_type open_pic_ipi = { - " OpenPIC ", - NULL, - NULL, - openpic_enable_ipi, - openpic_disable_ipi, - NULL, - openpic_end_ipi, - NULL -}; -#endif /* CONFIG_SMP */ - -unsigned int openpic_vec_ipi; -unsigned int openpic_vec_timer; -unsigned int openpic_vec_spurious; - -/* - * Accesses to the current processor's openpic registers - */ -#ifdef CONFIG_SMP -#define THIS_CPU Processor[cpu] -#define DECL_THIS_CPU int cpu = hard_smp_processor_id() -#define CHECK_THIS_CPU check_arg_cpu(cpu) -#else -#define THIS_CPU Processor[hard_smp_processor_id()] -#define DECL_THIS_CPU -#define CHECK_THIS_CPU -#endif /* CONFIG_SMP */ - -#if 0 -#define check_arg_ipi(ipi) \ - if (ipi < 0 || ipi >= OPENPIC_NUM_IPI) \ - printk(KERN_ERR "open_pic.c:%d: invalid ipi %d\n", __LINE__, ipi); -#define check_arg_timer(timer) \ - if (timer < 0 || timer >= OPENPIC_NUM_TIMERS) \ - printk(KERN_ERR "open_pic.c:%d: invalid timer %d\n", __LINE__, timer); -#define check_arg_vec(vec) \ - if (vec < 0 || vec >= OPENPIC_NUM_VECTORS) \ - printk(KERN_ERR "open_pic.c:%d: invalid vector %d\n", __LINE__, vec); -#define check_arg_pri(pri) \ - if (pri < 0 || pri >= OPENPIC_NUM_PRI) \ - printk(KERN_ERR "open_pic.c:%d: invalid priority %d\n", __LINE__, pri); -/* - * Print out a backtrace if it's out of range, since if it's larger than NR_IRQ's - * data has probably been corrupted and we're going to panic or deadlock later - * anyway --Troy - */ -#define check_arg_irq(irq) \ - if (irq < open_pic_irq_offset || irq >= (NumSources+open_pic_irq_offset)){ \ - printk(KERN_ERR "open_pic.c:%d: invalid irq %d\n", __LINE__, irq); \ - dump_stack(); } -#define check_arg_cpu(cpu) \ - if (cpu < 0 || cpu >= OPENPIC_MAX_PROCESSORS){ \ - printk(KERN_ERR "open_pic.c:%d: invalid cpu %d\n", __LINE__, cpu); \ - dump_stack(); } -#else -#define check_arg_ipi(ipi) do {} while (0) -#define check_arg_timer(timer) do {} while (0) -#define check_arg_vec(vec) do {} while (0) -#define check_arg_pri(pri) do {} while (0) -#define check_arg_irq(irq) do {} while (0) -#define check_arg_cpu(cpu) do {} while (0) -#endif - -#define GET_ISU(source) ISU[(source) >> 4][(source) & 0xf] - -void __init pSeries_init_openpic(void) -{ - struct device_node *np; - int i; - unsigned int *addrp; - unsigned char* chrp_int_ack_special = NULL; - unsigned char init_senses[NR_IRQS - NUM_ISA_INTERRUPTS]; - int nmi_irq = -1; -#if defined(CONFIG_VT) && defined(CONFIG_ADB_KEYBOARD) && defined(XMON) - struct device_node *kbd; -#endif - - if (!(np = of_find_node_by_name(NULL, "pci")) - || !(addrp = (unsigned int *) - get_property(np, "8259-interrupt-acknowledge", NULL))) - printk(KERN_ERR "Cannot find pci to get ack address\n"); - else - chrp_int_ack_special = (unsigned char *) - __ioremap(addrp[prom_n_addr_cells(np)-1], 1, _PAGE_NO_CACHE); - /* hydra still sets OpenPIC_InitSenses to a static set of values */ - if (OpenPIC_InitSenses == NULL) { - prom_get_irq_senses(init_senses, NUM_ISA_INTERRUPTS, NR_IRQS); - OpenPIC_InitSenses = init_senses; - OpenPIC_NumInitSenses = NR_IRQS - NUM_ISA_INTERRUPTS; - } - openpic_init(1, NUM_ISA_INTERRUPTS, chrp_int_ack_special, nmi_irq); - for (i = 0; i < NUM_ISA_INTERRUPTS; i++) - irq_desc[i].handler = &i8259_pic; - of_node_put(np); -} - -static inline u_int openpic_read(volatile u_int *addr) -{ - u_int val; - - val = in_le32(addr); - return val; -} - -static inline void openpic_write(volatile u_int *addr, u_int val) -{ - out_le32(addr, val); -} - -static inline u_int openpic_readfield(volatile u_int *addr, u_int mask) -{ - u_int val = openpic_read(addr); - return val & mask; -} - -static inline void openpic_writefield(volatile u_int *addr, u_int mask, - u_int field) -{ - u_int val = openpic_read(addr); - openpic_write(addr, (val & ~mask) | (field & mask)); -} - -static inline void openpic_clearfield(volatile u_int *addr, u_int mask) -{ - openpic_writefield(addr, mask, 0); -} - -static inline void openpic_setfield(volatile u_int *addr, u_int mask) -{ - openpic_writefield(addr, mask, mask); -} - -static void openpic_safe_writefield(volatile u_int *addr, u_int mask, - u_int field) -{ - unsigned int loops = 100000; - - openpic_setfield(addr, OPENPIC_MASK); - while (openpic_read(addr) & OPENPIC_ACTIVITY) { - if (!loops--) { - printk(KERN_ERR "openpic_safe_writefield timeout\n"); - break; - } - } - openpic_writefield(addr, mask | OPENPIC_MASK, field | OPENPIC_MASK); -} - -#ifdef CONFIG_SMP - -static int broken_ipi_registers; - -static u_int openpic_read_IPI(volatile u_int* addr) -{ - u_int val = 0; - - if (broken_ipi_registers) - /* yes this is right ... bug, feature, you decide! -- tgall */ - val = in_be32(addr); - else - val = in_le32(addr); - - return val; -} - -static void openpic_test_broken_IPI(void) -{ - u_int t; - - openpic_write(&OpenPIC->Global.IPI_Vector_Priority(0), OPENPIC_MASK); - t = openpic_read(&OpenPIC->Global.IPI_Vector_Priority(0)); - if (t == le32_to_cpu(OPENPIC_MASK)) { - printk(KERN_INFO "OpenPIC reversed IPI registers detected\n"); - broken_ipi_registers = 1; - } -} - -/* because of the power3 be / le above, this is needed */ -static inline void openpic_writefield_IPI(volatile u_int* addr, u_int mask, u_int field) -{ - u_int val = openpic_read_IPI(addr); - openpic_write(addr, (val & ~mask) | (field & mask)); -} - -static inline void openpic_clearfield_IPI(volatile u_int *addr, u_int mask) -{ - openpic_writefield_IPI(addr, mask, 0); -} - -static inline void openpic_setfield_IPI(volatile u_int *addr, u_int mask) -{ - openpic_writefield_IPI(addr, mask, mask); -} - -static void openpic_safe_writefield_IPI(volatile u_int *addr, u_int mask, u_int field) -{ - unsigned int loops = 100000; - - openpic_setfield_IPI(addr, OPENPIC_MASK); - - /* wait until it's not in use */ - /* BenH: Is this code really enough ? I would rather check the result - * and eventually retry ... - */ - while(openpic_read_IPI(addr) & OPENPIC_ACTIVITY) { - if (!loops--) { - printk(KERN_ERR "openpic_safe_writefield timeout\n"); - break; - } - } - - openpic_writefield_IPI(addr, mask, field | OPENPIC_MASK); -} -#endif /* CONFIG_SMP */ - -void __init openpic_init(int main_pic, int offset, unsigned char* chrp_ack, - int programmer_switch_irq) -{ - u_int t, i; - u_int timerfreq; - const char *version; - - if (!OpenPIC_Addr) { - printk(KERN_INFO "No OpenPIC found !\n"); - return; - } - OpenPIC = (volatile struct OpenPIC *)OpenPIC_Addr; - - ppc64_boot_msg(0x20, "OpenPic Init"); - - t = openpic_read(&OpenPIC->Global.Feature_Reporting0); - switch (t & OPENPIC_FEATURE_VERSION_MASK) { - case 1: - version = "1.0"; - break; - case 2: - version = "1.2"; - break; - case 3: - version = "1.3"; - break; - default: - version = "?"; - break; - } - NumProcessors = ((t & OPENPIC_FEATURE_LAST_PROCESSOR_MASK) >> - OPENPIC_FEATURE_LAST_PROCESSOR_SHIFT) + 1; - NumSources = ((t & OPENPIC_FEATURE_LAST_SOURCE_MASK) >> - OPENPIC_FEATURE_LAST_SOURCE_SHIFT) + 1; - printk(KERN_INFO "OpenPIC Version %s (%d CPUs and %d IRQ sources) at %p\n", - version, NumProcessors, NumSources, OpenPIC); - timerfreq = openpic_read(&OpenPIC->Global.Timer_Frequency); - if (timerfreq) - printk(KERN_INFO "OpenPIC timer frequency is %d.%06d MHz\n", - timerfreq / 1000000, timerfreq % 1000000); - - if (!main_pic) - return; - - open_pic_irq_offset = offset; - chrp_int_ack_special = (volatile unsigned char*)chrp_ack; - - find_ISUs(); - - /* Initialize timer interrupts */ - for (i = 0; i < OPENPIC_NUM_TIMERS; i++) { - /* Disabled, Priority 0 */ - openpic_inittimer(i, 0, openpic_vec_timer+i); - /* No processor */ - openpic_maptimer(i, 0); - } - -#ifdef CONFIG_SMP - /* Initialize IPI interrupts */ - openpic_test_broken_IPI(); - for (i = 0; i < OPENPIC_NUM_IPI; i++) { - /* Disabled, Priority 10..13 */ - openpic_initipi(i, 10+i, openpic_vec_ipi+i); - /* IPIs are per-CPU */ - irq_desc[openpic_vec_ipi+i].status |= IRQ_PER_CPU; - irq_desc[openpic_vec_ipi+i].handler = &open_pic_ipi; - } -#endif - - /* Initialize external interrupts */ - openpic_set_priority(0xf); - - /* SIOint (8259 cascade) is special */ - if (offset) { - openpic_initirq(0, 8, offset, 1, 1); - openpic_mapirq(0, 1 << get_hard_smp_processor_id(boot_cpuid)); - } - - /* Init all external sources */ - for (i = 0; i < NumSources; i++) { - int pri, sense; - - /* skip cascade if any */ - if (offset && i == 0) - continue; - /* the bootloader may have left it enabled (bad !) */ - openpic_disable_irq(i+offset); - - pri = (i == programmer_switch_irq)? 9: 8; - sense = (i < OpenPIC_NumInitSenses)? OpenPIC_InitSenses[i]: 1; - if (sense) - irq_desc[i+offset].status = IRQ_LEVEL; - - /* Enabled, Priority 8 or 9 */ - openpic_initirq(i, pri, i+offset, !sense, sense); - /* Processor 0 */ - openpic_mapirq(i, 1 << get_hard_smp_processor_id(boot_cpuid)); - } - - /* Init descriptors */ - for (i = offset; i < NumSources + offset; i++) - irq_desc[i].handler = &open_pic; - - /* Initialize the spurious interrupt */ - openpic_set_spurious(openpic_vec_spurious); - - openpic_set_priority(0); - openpic_disable_8259_pass_through(); - - ppc64_boot_msg(0x25, "OpenPic Done"); -} - -/* - * We cant do this in init_IRQ because we need the memory subsystem up for - * request_irq() - */ -static int __init openpic_setup_i8259(void) -{ - if (systemcfg->platform == PLATFORM_POWERMAC) - return 0; - - if (naca->interrupt_controller == IC_OPEN_PIC) { - /* Initialize the cascade */ - if (request_irq(NUM_ISA_INTERRUPTS, no_action, SA_INTERRUPT, - "82c59 cascade", NULL)) - printk(KERN_ERR "Unable to get OpenPIC IRQ 0 for cascade\n"); - i8259_init(); - } - - return 0; -} -arch_initcall(openpic_setup_i8259); - -void openpic_setup_ISU(int isu_num, unsigned long addr) -{ - if (isu_num >= OPENPIC_MAX_ISU) - return; - ISU[isu_num] = (OpenPIC_SourcePtr) __ioremap(addr, 0x400, _PAGE_NO_CACHE); - if (isu_num >= NumISUs) - NumISUs = isu_num + 1; -} - -void find_ISUs(void) -{ - /* For PowerMac, setup ISUs on base openpic */ - if (systemcfg->platform == PLATFORM_POWERMAC) { - int i; - for (i=0; i<128; i+=0x10) { - ISU[i>>4] = &((struct OpenPIC *)OpenPIC_Addr)->Source[i]; - NumISUs++; - } - } - /* Use /interrupt-controller/reg and - * /interrupt-controller/interrupt-ranges from OF device tree - * the ISU array is setup in chrp_pci.c in ibm_add_bridges - * as a result - * -- tgall - */ - - /* basically each ISU is a bus, and this assumes that - * open_pic_isu_count interrupts per bus are possible - * ISU == Interrupt Source - * - * On G5, we keep the original NumSources provided by the controller, - * it's below 128, so we have room to stuff the IPIs and timers like darwin - * does. We put the spurrious vector up at 0xff though. - */ - if (systemcfg->platform == PLATFORM_POWERMAC) { - openpic_vec_ipi = NumSources; - openpic_vec_timer = openpic_vec_ipi + 4; - openpic_vec_spurious = 0xff; - } else { - NumSources = NumISUs * 0x10; - - openpic_vec_ipi = NumSources + open_pic_irq_offset; - openpic_vec_timer = openpic_vec_ipi + OPENPIC_NUM_IPI; - openpic_vec_spurious = openpic_vec_timer + OPENPIC_NUM_TIMERS; - } -} - -static inline void openpic_reset(void) -{ - openpic_setfield(&OpenPIC->Global.Global_Configuration0, - OPENPIC_CONFIG_RESET); -} - -static inline void openpic_enable_8259_pass_through(void) -{ - openpic_clearfield(&OpenPIC->Global.Global_Configuration0, - OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE); -} - -static void openpic_disable_8259_pass_through(void) -{ - openpic_setfield(&OpenPIC->Global.Global_Configuration0, - OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE); -} - -/* - * Find out the current interrupt - */ -static u_int openpic_irq(void) -{ - u_int vec; - DECL_THIS_CPU; - - CHECK_THIS_CPU; - vec = openpic_readfield(&OpenPIC->THIS_CPU.Interrupt_Acknowledge, - OPENPIC_VECTOR_MASK); - return vec; -} - -static void openpic_eoi(void) -{ - DECL_THIS_CPU; - - CHECK_THIS_CPU; - openpic_write(&OpenPIC->THIS_CPU.EOI, 0); - /* Handle PCI write posting */ - (void)openpic_read(&OpenPIC->THIS_CPU.EOI); -} - - -static inline u_int openpic_get_priority(void) -{ - DECL_THIS_CPU; - - CHECK_THIS_CPU; - return openpic_readfield(&OpenPIC->THIS_CPU.Current_Task_Priority, - OPENPIC_CURRENT_TASK_PRIORITY_MASK); -} - -static void openpic_set_priority(u_int pri) -{ - DECL_THIS_CPU; - - CHECK_THIS_CPU; - check_arg_pri(pri); - openpic_writefield(&OpenPIC->THIS_CPU.Current_Task_Priority, - OPENPIC_CURRENT_TASK_PRIORITY_MASK, pri); -} - -/* - * Get/set the spurious vector - */ -static inline u_int openpic_get_spurious(void) -{ - return openpic_readfield(&OpenPIC->Global.Spurious_Vector, - OPENPIC_VECTOR_MASK); -} - -static void openpic_set_spurious(u_int vec) -{ - check_arg_vec(vec); - openpic_writefield(&OpenPIC->Global.Spurious_Vector, OPENPIC_VECTOR_MASK, - vec); -} - -/* - * Convert a cpu mask from logical to physical cpu numbers. - */ -static inline u32 physmask(u32 cpumask) -{ - int i; - u32 mask = 0; - - for (i = 0; i < NR_CPUS; ++i, cpumask >>= 1) - mask |= (cpumask & 1) << get_hard_smp_processor_id(i); - return mask; -} - -void openpic_init_processor(u_int cpumask) -{ - openpic_write(&OpenPIC->Global.Processor_Initialization, - physmask(cpumask & cpus_addr(cpu_online_map)[0])); -} - -#ifdef CONFIG_SMP -/* - * Initialize an interprocessor interrupt (and disable it) - * - * ipi: OpenPIC interprocessor interrupt number - * pri: interrupt source priority - * vec: the vector it will produce - */ -static void __init openpic_initipi(u_int ipi, u_int pri, u_int vec) -{ - check_arg_ipi(ipi); - check_arg_pri(pri); - check_arg_vec(vec); - openpic_safe_writefield_IPI(&OpenPIC->Global.IPI_Vector_Priority(ipi), - OPENPIC_PRIORITY_MASK | OPENPIC_VECTOR_MASK, - (pri << OPENPIC_PRIORITY_SHIFT) | vec); -} - -/* - * Send an IPI to one or more CPUs - * - * Externally called, however, it takes an IPI number (0...OPENPIC_NUM_IPI) - * and not a system-wide interrupt number - */ -void openpic_cause_IPI(u_int ipi, u_int cpumask) -{ - DECL_THIS_CPU; - - CHECK_THIS_CPU; - check_arg_ipi(ipi); - openpic_write(&OpenPIC->THIS_CPU.IPI_Dispatch(ipi), - physmask(cpumask & cpus_addr(cpu_online_map)[0])); -} - -void openpic_request_IPIs(void) -{ - int i; - - /* - * Make sure this matches what is defined in smp.c for - * smp_message_{pass|recv}() or what shows up in - * /proc/interrupts will be wrong!!! --Troy */ - - if (OpenPIC == NULL) - return; - - /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ - request_irq(openpic_vec_ipi, openpic_ipi_action, SA_INTERRUPT, - "IPI0 (call function)", NULL); - request_irq(openpic_vec_ipi+1, openpic_ipi_action, SA_INTERRUPT, - "IPI1 (reschedule)", NULL); - request_irq(openpic_vec_ipi+2, openpic_ipi_action, SA_INTERRUPT, - "IPI2 (unused)", NULL); - request_irq(openpic_vec_ipi+3, openpic_ipi_action, SA_INTERRUPT, - "IPI3 (debugger break)", NULL); - - for ( i = 0; i < OPENPIC_NUM_IPI ; i++ ) - openpic_enable_ipi(openpic_vec_ipi+i); -} - -/* - * Do per-cpu setup for SMP systems. - * - * Get IPI's working and start taking interrupts. - * -- Cort - */ -static spinlock_t openpic_setup_lock __devinitdata = SPIN_LOCK_UNLOCKED; - -void __devinit do_openpic_setup_cpu(void) -{ -#ifdef CONFIG_IRQ_ALL_CPUS - int i; - u32 msk = 1 << hard_smp_processor_id(); -#endif - - spin_lock(&openpic_setup_lock); - -#ifdef CONFIG_IRQ_ALL_CPUS - /* let the openpic know we want intrs. default affinity - * is 0xffffffff until changed via /proc - * That's how it's done on x86. If we want it differently, then - * we should make sure we also change the default values of irq_affinity - * in irq.c. - */ - for (i = 0; i < NumSources ; i++) - openpic_mapirq(i, openpic_read(&GET_ISU(i).Destination) | msk); -#endif /* CONFIG_IRQ_ALL_CPUS */ - openpic_set_priority(0); - - spin_unlock(&openpic_setup_lock); -} -#endif /* CONFIG_SMP */ - -/* - * Initialize a timer interrupt (and disable it) - * - * timer: OpenPIC timer number - * pri: interrupt source priority - * vec: the vector it will produce - */ -static void __init openpic_inittimer(u_int timer, u_int pri, u_int vec) -{ - check_arg_timer(timer); - check_arg_pri(pri); - check_arg_vec(vec); - openpic_safe_writefield(&OpenPIC->Global.Timer[timer].Vector_Priority, - OPENPIC_PRIORITY_MASK | OPENPIC_VECTOR_MASK, - (pri << OPENPIC_PRIORITY_SHIFT) | vec); -} - -/* - * Map a timer interrupt to one or more CPUs - */ -static void __init openpic_maptimer(u_int timer, u_int cpumask) -{ - check_arg_timer(timer); - openpic_write(&OpenPIC->Global.Timer[timer].Destination, - physmask(cpumask & cpus_addr(cpu_online_map)[0])); -} - - -/* - * - * All functions below take an offset'ed irq argument - * - */ - - -/* - * Enable/disable an external interrupt source - * - * Externally called, irq is an offseted system-wide interrupt number - */ -static void openpic_enable_irq(u_int irq) -{ - unsigned int loops = 100000; - check_arg_irq(irq); - - openpic_clearfield(&GET_ISU(irq - open_pic_irq_offset).Vector_Priority, OPENPIC_MASK); - /* make sure mask gets to controller before we return to user */ - do { - if (!loops--) { - printk(KERN_ERR "openpic_enable_irq timeout\n"); - break; - } - - mb(); /* sync is probably useless here */ - } while(openpic_readfield(&GET_ISU(irq - open_pic_irq_offset).Vector_Priority, - OPENPIC_MASK)); -} - -static void openpic_disable_irq(u_int irq) -{ - u32 vp; - unsigned int loops = 100000; - - check_arg_irq(irq); - - openpic_setfield(&GET_ISU(irq - open_pic_irq_offset).Vector_Priority, OPENPIC_MASK); - /* make sure mask gets to controller before we return to user */ - do { - if (!loops--) { - printk(KERN_ERR "openpic_disable_irq timeout\n"); - break; - } - - mb(); /* sync is probably useless here */ - vp = openpic_readfield(&GET_ISU(irq - open_pic_irq_offset).Vector_Priority, - OPENPIC_MASK | OPENPIC_ACTIVITY); - } while((vp & OPENPIC_ACTIVITY) && !(vp & OPENPIC_MASK)); -} - -#ifdef CONFIG_SMP -/* - * Enable/disable an IPI interrupt source - * - * Externally called, irq is an offseted system-wide interrupt number - */ -void openpic_enable_ipi(u_int irq) -{ - irq -= openpic_vec_ipi; - check_arg_ipi(irq); - openpic_clearfield_IPI(&OpenPIC->Global.IPI_Vector_Priority(irq), OPENPIC_MASK); - -} -void openpic_disable_ipi(u_int irq) -{ - /* NEVER disable an IPI... that's just plain wrong! */ -} - -#endif - -/* - * Initialize an interrupt source (and disable it!) - * - * irq: OpenPIC interrupt number - * pri: interrupt source priority - * vec: the vector it will produce - * pol: polarity (1 for positive, 0 for negative) - * sense: 1 for level, 0 for edge - */ -static void openpic_initirq(u_int irq, u_int pri, u_int vec, int pol, int sense) -{ - openpic_safe_writefield(&GET_ISU(irq).Vector_Priority, - OPENPIC_PRIORITY_MASK | OPENPIC_VECTOR_MASK | - OPENPIC_SENSE_MASK | OPENPIC_POLARITY_MASK, - (pri << OPENPIC_PRIORITY_SHIFT) | vec | - (pol ? OPENPIC_POLARITY_POSITIVE : - OPENPIC_POLARITY_NEGATIVE) | - (sense ? OPENPIC_SENSE_LEVEL : OPENPIC_SENSE_EDGE)); -} - -/* - * Map an interrupt source to one or more CPUs - */ -static void openpic_mapirq(u_int irq, u_int physmask) -{ - openpic_write(&GET_ISU(irq).Destination, physmask); -} - -/* - * Set the sense for an interrupt source (and disable it!) - * - * sense: 1 for level, 0 for edge - */ -#if 0 /* not used */ -static void openpic_set_sense(u_int irq, int sense) -{ - openpic_safe_writefield(&GET_ISU(irq).Vector_Priority, - OPENPIC_SENSE_LEVEL, - (sense ? OPENPIC_SENSE_LEVEL : 0)); -} - -static int openpic_get_sense(u_int irq) -{ - return openpic_readfield(&GET_ISU(irq).Vector_Priority, - OPENPIC_SENSE_LEVEL) != 0; -} -#endif - -static void openpic_end_irq(unsigned int irq_nr) -{ - openpic_eoi(); -} - -static void openpic_set_affinity(unsigned int irq_nr, cpumask_t cpumask) -{ - cpumask_t tmp; - - cpus_and(tmp, cpumask, cpu_online_map); - openpic_mapirq(irq_nr - open_pic_irq_offset, physmask(cpus_addr(tmp)[0])); -} - -#ifdef CONFIG_SMP -static void openpic_end_ipi(unsigned int irq_nr) -{ - /* - * IPIs are marked IRQ_PER_CPU. This has the side effect of - * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from - * applying to them. We EOI them late to avoid re-entering. - * We mark IPI's with SA_INTERRUPT as they must run with - * irqs disabled. - */ - openpic_eoi(); -} - -static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, - struct pt_regs *regs) -{ - smp_message_recv(cpl-openpic_vec_ipi, regs); - return IRQ_HANDLED; -} - -#endif /* CONFIG_SMP */ - -int openpic_get_irq(struct pt_regs *regs) -{ - extern int i8259_irq(int cpu); - - int irq = openpic_irq(); - - if (open_pic_irq_offset && irq == open_pic_irq_offset) { - /* - * This magic address generates a PCI IACK cycle. - */ - if ( chrp_int_ack_special ) - irq = *chrp_int_ack_special; - else - irq = i8259_irq( smp_processor_id() ); - openpic_eoi(); - } - if (irq == openpic_vec_spurious) - irq = -1; - return irq; -} diff -Nru a/arch/ppc64/kernel/open_pic.h b/arch/ppc64/kernel/open_pic.h --- a/arch/ppc64/kernel/open_pic.h 2004-11-10 17:19:02 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,42 +0,0 @@ -/* - * arch/ppc/kernel/open_pic.h -- OpenPIC Interrupt Handling - * - * Copyright (C) 1997 Geert Uytterhoeven - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - * - */ - -#ifndef _PPC64_KERNEL_OPEN_PIC_H -#define _PPC64_KERNEL_OPEN_PIC_H - -#include -#include -#include - -#define OPENPIC_SIZE 0x40000 - -/* OpenPIC IRQ controller structure */ -extern struct hw_interrupt_type open_pic; - -/* OpenPIC IPI controller structure */ -#ifdef CONFIG_SMP -extern struct hw_interrupt_type open_pic_ipi; -#endif /* CONFIG_SMP */ - -extern u_int OpenPIC_NumInitSenses; -extern u_char *OpenPIC_InitSenses; -extern void* OpenPIC_Addr; - -/* Exported functions */ -extern void openpic_init(int, int, unsigned char *, int); -extern void openpic_request_IPIs(void); -extern void do_openpic_setup_cpu(void); -extern int openpic_get_irq(struct pt_regs *regs); -extern void openpic_init_processor(u_int cpumask); -extern void openpic_setup_ISU(int isu_num, unsigned long addr); -extern void openpic_cause_IPI(u_int ipi, u_int cpumask); - -#endif /* _PPC64_KERNEL_OPEN_PIC_H */ diff -Nru a/arch/ppc64/kernel/open_pic_defs.h b/arch/ppc64/kernel/open_pic_defs.h --- a/arch/ppc64/kernel/open_pic_defs.h 2004-11-10 17:19:05 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,283 +0,0 @@ -/* - * linux/openpic.h -- OpenPIC definitions - * - * Copyright (C) 1997 Geert Uytterhoeven - * - * This file is based on the following documentation: - * - * The Open Programmable Interrupt Controller (PIC) - * Register Interface Specification Revision 1.2 - * - * Issue Date: October 1995 - * - * Issued jointly by Advanced Micro Devices and Cyrix Corporation - * - * AMD is a registered trademark of Advanced Micro Devices, Inc. - * Copyright (C) 1995, Advanced Micro Devices, Inc. and Cyrix, Inc. - * All Rights Reserved. - * - * To receive a copy of this documentation, send an email to openpic@amd.com. - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -#ifndef _LINUX_OPENPIC_H -#define _LINUX_OPENPIC_H - -#ifdef __KERNEL__ - -#include - -/* - * OpenPIC supports up to 2048 interrupt sources and up to 32 processors - */ - -#define OPENPIC_MAX_SOURCES 2048 -#define OPENPIC_MAX_PROCESSORS 32 -#define OPENPIC_MAX_ISU 32 - -#define OPENPIC_NUM_TIMERS 4 -#define OPENPIC_NUM_IPI 4 -#define OPENPIC_NUM_PRI 16 -#define OPENPIC_NUM_VECTORS OPENPIC_MAX_SOURCES - -/* - * OpenPIC Registers are 32 bits and aligned on 128 bit boundaries - */ - -typedef struct _OpenPIC_Reg { - u_int Reg; /* Little endian! */ - char Pad[0xc]; -} OpenPIC_Reg; - - -/* - * Per Processor Registers - */ - -typedef struct _OpenPIC_Processor { - /* - * Private Shadow Registers (for SLiC backwards compatibility) - */ - u_int IPI0_Dispatch_Shadow; /* Write Only */ - char Pad1[0x4]; - u_int IPI0_Vector_Priority_Shadow; /* Read/Write */ - char Pad2[0x34]; - /* - * Interprocessor Interrupt Command Ports - */ - OpenPIC_Reg _IPI_Dispatch[OPENPIC_NUM_IPI]; /* Write Only */ - /* - * Current Task Priority Register - */ - OpenPIC_Reg _Current_Task_Priority; /* Read/Write */ - char Pad3[0x10]; - /* - * Interrupt Acknowledge Register - */ - OpenPIC_Reg _Interrupt_Acknowledge; /* Read Only */ - /* - * End of Interrupt (EOI) Register - */ - OpenPIC_Reg _EOI; /* Read/Write */ - char Pad5[0xf40]; -} OpenPIC_Processor; - - - /* - * Timer Registers - */ - -typedef struct _OpenPIC_Timer { - OpenPIC_Reg _Current_Count; /* Read Only */ - OpenPIC_Reg _Base_Count; /* Read/Write */ - OpenPIC_Reg _Vector_Priority; /* Read/Write */ - OpenPIC_Reg _Destination; /* Read/Write */ -} OpenPIC_Timer; - - - /* - * Global Registers - */ - -typedef struct _OpenPIC_Global { - /* - * Feature Reporting Registers - */ - OpenPIC_Reg _Feature_Reporting0; /* Read Only */ - OpenPIC_Reg _Feature_Reporting1; /* Future Expansion */ - /* - * Global Configuration Registers - */ - OpenPIC_Reg _Global_Configuration0; /* Read/Write */ - OpenPIC_Reg _Global_Configuration1; /* Future Expansion */ - /* - * Vendor Specific Registers - */ - OpenPIC_Reg _Vendor_Specific[4]; - /* - * Vendor Identification Register - */ - OpenPIC_Reg _Vendor_Identification; /* Read Only */ - /* - * Processor Initialization Register - */ - OpenPIC_Reg _Processor_Initialization; /* Read/Write */ - /* - * IPI Vector/Priority Registers - */ - OpenPIC_Reg _IPI_Vector_Priority[OPENPIC_NUM_IPI]; /* Read/Write */ - /* - * Spurious Vector Register - */ - OpenPIC_Reg _Spurious_Vector; /* Read/Write */ - /* - * Global Timer Registers - */ - OpenPIC_Reg _Timer_Frequency; /* Read/Write */ - OpenPIC_Timer Timer[OPENPIC_NUM_TIMERS]; - char Pad1[0xee00]; -} OpenPIC_Global; - - - /* - * Interrupt Source Registers - */ - -typedef struct _OpenPIC_Source { - OpenPIC_Reg _Vector_Priority; /* Read/Write */ - OpenPIC_Reg _Destination; /* Read/Write */ -} OpenPIC_Source, *OpenPIC_SourcePtr; - - - /* - * OpenPIC Register Map - */ - -struct OpenPIC { - char Pad1[0x1000]; - /* - * Global Registers - */ - OpenPIC_Global Global; - /* - * Interrupt Source Configuration Registers - */ - OpenPIC_Source Source[OPENPIC_MAX_SOURCES]; - /* - * Per Processor Registers - */ - OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS]; -}; - - -/* - * Current Task Priority Register - */ - -#define OPENPIC_CURRENT_TASK_PRIORITY_MASK 0x0000000f - -/* - * Who Am I Register - */ - -#define OPENPIC_WHO_AM_I_ID_MASK 0x0000001f - -/* - * Feature Reporting Register 0 - */ - -#define OPENPIC_FEATURE_LAST_SOURCE_MASK 0x07ff0000 -#define OPENPIC_FEATURE_LAST_SOURCE_SHIFT 16 -#define OPENPIC_FEATURE_LAST_PROCESSOR_MASK 0x00001f00 -#define OPENPIC_FEATURE_LAST_PROCESSOR_SHIFT 8 -#define OPENPIC_FEATURE_VERSION_MASK 0x000000ff - -/* - * Global Configuration Register 0 - */ - -#define OPENPIC_CONFIG_RESET 0x80000000 -#define OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE 0x20000000 -#define OPENPIC_CONFIG_BASE_MASK 0x000fffff - -/* - * Vendor Identification Register - */ - -#define OPENPIC_VENDOR_ID_STEPPING_MASK 0x00ff0000 -#define OPENPIC_VENDOR_ID_STEPPING_SHIFT 16 -#define OPENPIC_VENDOR_ID_DEVICE_ID_MASK 0x0000ff00 -#define OPENPIC_VENDOR_ID_DEVICE_ID_SHIFT 8 -#define OPENPIC_VENDOR_ID_VENDOR_ID_MASK 0x000000ff - -/* - * Vector/Priority Registers - */ - -#define OPENPIC_MASK 0x80000000 -#define OPENPIC_ACTIVITY 0x40000000 /* Read Only */ -#define OPENPIC_PRIORITY_MASK 0x000f0000 -#define OPENPIC_PRIORITY_SHIFT 16 -#define OPENPIC_VECTOR_MASK 0x000007ff - - -/* - * Interrupt Source Registers - */ - -#define OPENPIC_POLARITY_POSITIVE 0x00800000 -#define OPENPIC_POLARITY_NEGATIVE 0x00000000 -#define OPENPIC_POLARITY_MASK 0x00800000 -#define OPENPIC_SENSE_LEVEL 0x00400000 -#define OPENPIC_SENSE_EDGE 0x00000000 -#define OPENPIC_SENSE_MASK 0x00400000 - - -/* - * Timer Registers - */ - -#define OPENPIC_COUNT_MASK 0x7fffffff -#define OPENPIC_TIMER_TOGGLE 0x80000000 -#define OPENPIC_TIMER_COUNT_INHIBIT 0x80000000 - - -/* - * Aliases to make life simpler - */ - -/* Per Processor Registers */ -#define IPI_Dispatch(i) _IPI_Dispatch[i].Reg -#define Current_Task_Priority _Current_Task_Priority.Reg -#define Interrupt_Acknowledge _Interrupt_Acknowledge.Reg -#define EOI _EOI.Reg - -/* Global Registers */ -#define Feature_Reporting0 _Feature_Reporting0.Reg -#define Feature_Reporting1 _Feature_Reporting1.Reg -#define Global_Configuration0 _Global_Configuration0.Reg -#define Global_Configuration1 _Global_Configuration1.Reg -#define Vendor_Specific(i) _Vendor_Specific[i].Reg -#define Vendor_Identification _Vendor_Identification.Reg -#define Processor_Initialization _Processor_Initialization.Reg -#define IPI_Vector_Priority(i) _IPI_Vector_Priority[i].Reg -#define Spurious_Vector _Spurious_Vector.Reg -#define Timer_Frequency _Timer_Frequency.Reg - -/* Timer Registers */ -#define Current_Count _Current_Count.Reg -#define Base_Count _Base_Count.Reg -#define Vector_Priority _Vector_Priority.Reg -#define Destination _Destination.Reg - -/* Interrupt Source Registers */ -#define Vector_Priority _Vector_Priority.Reg -#define Destination _Destination.Reg - - -#endif /* __KERNEL__ */ - -#endif /* _LINUX_OPENPIC_H */ diff -Nru a/arch/ppc64/kernel/open_pic_u3.c b/arch/ppc64/kernel/open_pic_u3.c --- a/arch/ppc64/kernel/open_pic_u3.c 2004-11-10 17:19:02 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,348 +0,0 @@ -/* - * arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling - * - * Copyright (C) 1997 Geert Uytterhoeven - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "open_pic.h" -#include "open_pic_defs.h" - -void* OpenPIC2_Addr; -static volatile struct OpenPIC *OpenPIC2 = NULL; - -extern u_int OpenPIC_NumInitSenses; -extern u_char *OpenPIC_InitSenses; - -static u_int NumSources; -static int NumISUs; -static int open_pic2_irq_offset; - -static OpenPIC_SourcePtr ISU2[OPENPIC_MAX_ISU]; - -unsigned int openpic2_vec_spurious; - -/* - * Accesses to the current processor's openpic registers - * U3 secondary openpic has only one output - */ -#define THIS_CPU Processor[0] -#define DECL_THIS_CPU -#define CHECK_THIS_CPU - -#define GET_ISU(source) ISU2[(source) >> 4][(source) & 0xf] - -static inline u_int openpic2_read(volatile u_int *addr) -{ - u_int val; - - val = in_be32(addr); - return val; -} - -static inline void openpic2_write(volatile u_int *addr, u_int val) -{ - out_be32(addr, val); -} - -static inline u_int openpic2_readfield(volatile u_int *addr, u_int mask) -{ - u_int val = openpic2_read(addr); - return val & mask; -} - -static inline void openpic2_writefield(volatile u_int *addr, u_int mask, - u_int field) -{ - u_int val = openpic2_read(addr); - openpic2_write(addr, (val & ~mask) | (field & mask)); -} - -static inline void openpic2_clearfield(volatile u_int *addr, u_int mask) -{ - openpic2_writefield(addr, mask, 0); -} - -static inline void openpic2_setfield(volatile u_int *addr, u_int mask) -{ - openpic2_writefield(addr, mask, mask); -} - -static void openpic2_safe_writefield(volatile u_int *addr, u_int mask, - u_int field) -{ - unsigned int loops = 100000; - - openpic2_setfield(addr, OPENPIC_MASK); - while (openpic2_read(addr) & OPENPIC_ACTIVITY) { - if (!loops--) { - printk(KERN_ERR "openpic2_safe_writefield timeout\n"); - break; - } - } - openpic2_writefield(addr, mask | OPENPIC_MASK, field | OPENPIC_MASK); -} - - -static inline void openpic2_reset(void) -{ - openpic2_setfield(&OpenPIC2->Global.Global_Configuration0, - OPENPIC_CONFIG_RESET); -} - -static void openpic2_disable_8259_pass_through(void) -{ - openpic2_setfield(&OpenPIC2->Global.Global_Configuration0, - OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE); -} - -/* - * Find out the current interrupt - */ -static u_int openpic2_irq(void) -{ - u_int vec; - DECL_THIS_CPU; - CHECK_THIS_CPU; - vec = openpic2_readfield(&OpenPIC2->THIS_CPU.Interrupt_Acknowledge, - OPENPIC_VECTOR_MASK); - return vec; -} - -static void openpic2_eoi(void) -{ - DECL_THIS_CPU; - CHECK_THIS_CPU; - openpic2_write(&OpenPIC2->THIS_CPU.EOI, 0); - /* Handle PCI write posting */ - (void)openpic2_read(&OpenPIC2->THIS_CPU.EOI); -} - - -static inline u_int openpic2_get_priority(void) -{ - DECL_THIS_CPU; - CHECK_THIS_CPU; - return openpic2_readfield(&OpenPIC2->THIS_CPU.Current_Task_Priority, - OPENPIC_CURRENT_TASK_PRIORITY_MASK); -} - -static void openpic2_set_priority(u_int pri) -{ - DECL_THIS_CPU; - CHECK_THIS_CPU; - openpic2_writefield(&OpenPIC2->THIS_CPU.Current_Task_Priority, - OPENPIC_CURRENT_TASK_PRIORITY_MASK, pri); -} - -/* - * Get/set the spurious vector - */ -static inline u_int openpic2_get_spurious(void) -{ - return openpic2_readfield(&OpenPIC2->Global.Spurious_Vector, - OPENPIC_VECTOR_MASK); -} - -static void openpic2_set_spurious(u_int vec) -{ - openpic2_writefield(&OpenPIC2->Global.Spurious_Vector, OPENPIC_VECTOR_MASK, - vec); -} - -/* - * Enable/disable an external interrupt source - * - * Externally called, irq is an offseted system-wide interrupt number - */ -static void openpic2_enable_irq(u_int irq) -{ - unsigned int loops = 100000; - - openpic2_clearfield(&GET_ISU(irq - open_pic2_irq_offset).Vector_Priority, OPENPIC_MASK); - /* make sure mask gets to controller before we return to user */ - do { - if (!loops--) { - printk(KERN_ERR "openpic_enable_irq timeout\n"); - break; - } - - mb(); /* sync is probably useless here */ - } while(openpic2_readfield(&GET_ISU(irq - open_pic2_irq_offset).Vector_Priority, - OPENPIC_MASK)); -} - -static void openpic2_disable_irq(u_int irq) -{ - u32 vp; - unsigned int loops = 100000; - - openpic2_setfield(&GET_ISU(irq - open_pic2_irq_offset).Vector_Priority, - OPENPIC_MASK); - /* make sure mask gets to controller before we return to user */ - do { - if (!loops--) { - printk(KERN_ERR "openpic_disable_irq timeout\n"); - break; - } - - mb(); /* sync is probably useless here */ - vp = openpic2_readfield(&GET_ISU(irq - open_pic2_irq_offset).Vector_Priority, - OPENPIC_MASK | OPENPIC_ACTIVITY); - } while((vp & OPENPIC_ACTIVITY) && !(vp & OPENPIC_MASK)); -} - -/* - * Initialize an interrupt source (and disable it!) - * - * irq: OpenPIC interrupt number - * pri: interrupt source priority - * vec: the vector it will produce - * pol: polarity (1 for positive, 0 for negative) - * sense: 1 for level, 0 for edge - */ -static void openpic2_initirq(u_int irq, u_int pri, u_int vec, int pol, int sense) -{ - openpic2_safe_writefield(&GET_ISU(irq).Vector_Priority, - OPENPIC_PRIORITY_MASK | OPENPIC_VECTOR_MASK | - OPENPIC_SENSE_MASK | OPENPIC_POLARITY_MASK, - (pri << OPENPIC_PRIORITY_SHIFT) | vec | - (pol ? OPENPIC_POLARITY_POSITIVE : - OPENPIC_POLARITY_NEGATIVE) | - (sense ? OPENPIC_SENSE_LEVEL : OPENPIC_SENSE_EDGE)); -} - -/* - * Map an interrupt source to one or more CPUs - */ -static void openpic2_mapirq(u_int irq, u_int physmask) -{ - openpic2_write(&GET_ISU(irq).Destination, physmask); -} - -/* - * Set the sense for an interrupt source (and disable it!) - * - * sense: 1 for level, 0 for edge - */ -static inline void openpic2_set_sense(u_int irq, int sense) -{ - openpic2_safe_writefield(&GET_ISU(irq).Vector_Priority, - OPENPIC_SENSE_LEVEL, - (sense ? OPENPIC_SENSE_LEVEL : 0)); -} - -static void openpic2_end_irq(unsigned int irq_nr) -{ - openpic2_eoi(); -} - -int openpic2_get_irq(struct pt_regs *regs) -{ - int irq = openpic2_irq(); - - if (irq == openpic2_vec_spurious) - return -1; - return irq + open_pic2_irq_offset; -} - -struct hw_interrupt_type open_pic2 = { - " OpenPIC2 ", - NULL, - NULL, - openpic2_enable_irq, - openpic2_disable_irq, - NULL, - openpic2_end_irq, -}; - -void __init openpic2_init(int offset) -{ - u_int t, i; - const char *version; - - if (!OpenPIC2_Addr) { - printk(KERN_INFO "No OpenPIC2 found !\n"); - return; - } - OpenPIC2 = (volatile struct OpenPIC *)OpenPIC2_Addr; - - ppc64_boot_msg(0x20, "OpenPic U3 Init"); - - t = openpic2_read(&OpenPIC2->Global.Feature_Reporting0); - switch (t & OPENPIC_FEATURE_VERSION_MASK) { - case 1: - version = "1.0"; - break; - case 2: - version = "1.2"; - break; - case 3: - version = "1.3"; - break; - default: - version = "?"; - break; - } - printk(KERN_INFO "OpenPIC (U3) Version %s\n", version); - - open_pic2_irq_offset = offset; - - for (i=0; i<128; i+=0x10) { - ISU2[i>>4] = &((struct OpenPIC *)OpenPIC2_Addr)->Source[i]; - NumISUs++; - } - NumSources = NumISUs * 0x10; - openpic2_vec_spurious = NumSources; - - openpic2_set_priority(0xf); - - /* Init all external sources */ - for (i = 0; i < NumSources; i++) { - int pri, sense; - - /* the bootloader may have left it enabled (bad !) */ - openpic2_disable_irq(i+offset); - - pri = 8; - sense = (i < OpenPIC_NumInitSenses) ? OpenPIC_InitSenses[i]: 1; - if (sense) - irq_desc[i+offset].status = IRQ_LEVEL; - - /* Enabled, Priority 8 or 9 */ - openpic2_initirq(i, pri, i, !sense, sense); - /* Processor 0 */ - openpic2_mapirq(i, 0x1); - } - - /* Init descriptors */ - for (i = offset; i < NumSources + offset; i++) - irq_desc[i].handler = &open_pic2; - - /* Initialize the spurious interrupt */ - openpic2_set_spurious(openpic2_vec_spurious); - - openpic2_set_priority(0); - openpic2_disable_8259_pass_through(); - - ppc64_boot_msg(0x25, "OpenPic U3 Done"); -} diff -Nru a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c --- a/arch/ppc64/kernel/pSeries_iommu.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc64/kernel/pSeries_iommu.c 2004-11-10 17:19:03 -08:00 @@ -276,7 +276,7 @@ first_phb = 0; for (dn = first_dn; dn != NULL; dn = dn->sibling) - iommu_devnode_init(dn); + iommu_devnode_init_pSeries(dn); } } @@ -298,7 +298,7 @@ * Do it now because iommu_table_setparms_lpar needs it. */ busdn->bussubno = bus->number; - iommu_devnode_init(busdn); + iommu_devnode_init_pSeries(busdn); } /* look for a window on a bridge even if the PHB had one */ @@ -397,7 +397,7 @@ } -void iommu_devnode_init(struct device_node *dn) +void iommu_devnode_init_pSeries(struct device_node *dn) { struct iommu_table *tbl; @@ -412,7 +412,6 @@ dn->iommu_table = iommu_init_table(tbl); } - void iommu_setup_pSeries(void) { struct pci_dev *dev = NULL; @@ -427,7 +426,7 @@ * pci device_node. This means get_iommu_table() won't need to search * up the device tree to find it. */ - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { + for_each_pci_dev(dev) { mydn = dn = PCI_GET_DN(dev); while (dn && dn->iommu_table == NULL) @@ -436,7 +435,6 @@ mydn->iommu_table = dn->iommu_table; } } - /* These are called very early. */ void tce_init_pSeries(void) diff -Nru a/arch/ppc64/kernel/pSeries_lpar.c b/arch/ppc64/kernel/pSeries_lpar.c --- a/arch/ppc64/kernel/pSeries_lpar.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc64/kernel/pSeries_lpar.c 2004-11-10 17:19:07 -08:00 @@ -59,6 +59,74 @@ int vtermno; /* virtual terminal# for udbg */ +#define __ALIGNED__ __attribute__((__aligned__(sizeof(long)))) +static void udbg_hvsi_putc(unsigned char c) +{ + /* packet's seqno isn't used anyways */ + uint8_t packet[] __ALIGNED__ = { 0xff, 5, 0, 0, c }; + int rc; + + if (c == '\n') + udbg_hvsi_putc('\r'); + + do { + rc = plpar_put_term_char(vtermno, sizeof(packet), packet); + } while (rc == H_Busy); +} + +static long hvsi_udbg_buf_len; +static uint8_t hvsi_udbg_buf[256]; + +static int udbg_hvsi_getc_poll(void) +{ + unsigned char ch; + int rc, i; + + if (hvsi_udbg_buf_len == 0) { + rc = plpar_get_term_char(vtermno, &hvsi_udbg_buf_len, hvsi_udbg_buf); + if (rc != H_Success || hvsi_udbg_buf[0] != 0xff) { + /* bad read or non-data packet */ + hvsi_udbg_buf_len = 0; + } else { + /* remove the packet header */ + for (i = 4; i < hvsi_udbg_buf_len; i++) + hvsi_udbg_buf[i-4] = hvsi_udbg_buf[i]; + hvsi_udbg_buf_len -= 4; + } + } + + if (hvsi_udbg_buf_len <= 0 || hvsi_udbg_buf_len > 256) { + /* no data ready */ + hvsi_udbg_buf_len = 0; + return -1; + } + + ch = hvsi_udbg_buf[0]; + /* shift remaining data down */ + for (i = 1; i < hvsi_udbg_buf_len; i++) { + hvsi_udbg_buf[i-1] = hvsi_udbg_buf[i]; + } + hvsi_udbg_buf_len--; + + return ch; +} + +static unsigned char udbg_hvsi_getc(void) +{ + int ch; + for (;;) { + ch = udbg_hvsi_getc_poll(); + if (ch == -1) { + /* This shouldn't be needed...but... */ + volatile unsigned long delay; + for (delay=0; delay < 2000000; delay++) + ; + } else { + return ch; + } + } +} + static void udbg_putcLP(unsigned char c) { char buf[16]; @@ -166,11 +234,15 @@ ppc_md.udbg_getc_poll = udbg_getc_pollLP; found = 1; } - } else { - /* XXX implement udbg_putcLP_vtty for hvterm-protocol1 case */ - printk(KERN_WARNING "%s doesn't speak hvterm1; " - "can't print udbg messages\n", - stdout_node->full_name); + } else if (device_is_compatible(stdout_node, "hvterm-protocol")) { + termno = (u32 *)get_property(stdout_node, "reg", NULL); + if (termno) { + vtermno = termno[0]; + ppc_md.udbg_putc = udbg_hvsi_putc; + ppc_md.udbg_getc = udbg_hvsi_getc; + ppc_md.udbg_getc_poll = udbg_hvsi_getc_poll; + found = 1; + } } } else if (strncmp(name, "serial", 6)) { /* XXX fix ISA serial console */ diff -Nru a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c --- a/arch/ppc64/kernel/pSeries_pci.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc64/kernel/pSeries_pci.c 2004-11-10 17:19:07 -08:00 @@ -42,7 +42,7 @@ #include #include -#include "open_pic.h" +#include "mpic.h" #include "pci.h" /* RTAS tokens */ @@ -54,6 +54,7 @@ static int s7a_workaround; extern unsigned long pci_probe_only; +extern struct mpic *pSeries_mpic; static int rtas_read_config(struct device_node *dn, int where, int size, u32 *val) { @@ -153,8 +154,8 @@ static void python_countermeasures(unsigned long addr) { - void *chip_regs; - volatile u32 *tmp, i; + void __iomem *chip_regs; + volatile u32 val; /* Python's register file is 1 MB in size. */ chip_regs = ioremap(addr & ~(0xfffffUL), 0x100000); @@ -166,17 +167,17 @@ #define PRG_CL_RESET_VALID 0x00010000 - tmp = (u32 *)((unsigned long)chip_regs + 0xf6030); - - if (*tmp & PRG_CL_RESET_VALID) { + val = in_be32(chip_regs + 0xf6030); + if (val & PRG_CL_RESET_VALID) { printk(KERN_INFO "Python workaround: "); - *tmp &= ~PRG_CL_RESET_VALID; + val &= ~PRG_CL_RESET_VALID; + out_be32(chip_regs + 0xf6030, val); /* * We must read it back for changes to * take effect */ - i = *tmp; - printk("reg0: %x\n", i); + val = in_be32(chip_regs + 0xf6030); + printk("reg0: %x\n", val); } iounmap(chip_regs); @@ -399,9 +400,9 @@ pci_process_bridge_OF_ranges(phb, node); pci_setup_phb_io(phb, index == 0); - if (naca->interrupt_controller == IC_OPEN_PIC) { + if (naca->interrupt_controller == IC_OPEN_PIC && pSeries_mpic) { int addr = root_size_cells * (index + 2) - 1; - openpic_setup_ISU(index, opprop[addr]); + mpic_assign_isu(pSeries_mpic, index, opprop[addr]); } index++; @@ -481,92 +482,6 @@ } } -static int get_bus_io_range(struct pci_bus *bus, unsigned long *start_phys, - unsigned long *start_virt, unsigned long *size) -{ - struct pci_controller *hose = PCI_GET_PHB_PTR(bus); - struct pci_bus_region region; - struct resource *res; - - if (bus->self) { - res = bus->resource[0]; - pcibios_resource_to_bus(bus->self, ®ion, res); - *start_phys = hose->io_base_phys + region.start; - *start_virt = (unsigned long) hose->io_base_virt + - region.start; - if (region.end > region.start) - *size = region.end - region.start + 1; - else { - printk("%s(): unexpected region 0x%lx->0x%lx\n", - __FUNCTION__, region.start, region.end); - return 1; - } - - } else { - /* Root Bus */ - res = &hose->io_resource; - *start_phys = hose->io_base_phys; - *start_virt = (unsigned long) hose->io_base_virt; - if (res->end > res->start) - *size = res->end - res->start + 1; - else { - printk("%s(): unexpected region 0x%lx->0x%lx\n", - __FUNCTION__, res->start, res->end); - return 1; - } - } - - return 0; -} - -int unmap_bus_range(struct pci_bus *bus) -{ - unsigned long start_phys; - unsigned long start_virt; - unsigned long size; - - if (!bus) { - printk(KERN_ERR "%s() expected bus\n", __FUNCTION__); - return 1; - } - - if (get_bus_io_range(bus, &start_phys, &start_virt, &size)) - return 1; - if (iounmap_explicit((void *) start_virt, size)) - return 1; - - return 0; -} -EXPORT_SYMBOL(unmap_bus_range); - -int remap_bus_range(struct pci_bus *bus) -{ - unsigned long start_phys; - unsigned long start_virt; - unsigned long size; - - if (!bus) { - printk(KERN_ERR "%s() expected bus\n", __FUNCTION__); - return 1; - } - - if (get_bus_io_range(bus, &start_phys, &start_virt, &size)) - return 1; - if (__ioremap_explicit(start_phys, start_virt, size, _PAGE_NO_CACHE)) - return 1; - - return 0; -} -EXPORT_SYMBOL(remap_bus_range); - -static void phbs_remap_io(void) -{ - struct pci_controller *hose, *tmp; - - list_for_each_entry_safe(hose, tmp, &hose_list, list_node) - remap_bus_range(hose->bus); -} - /* RPA-specific bits for removing PHBs */ int pcibios_remove_root_bus(struct pci_controller *phb) { @@ -619,25 +534,12 @@ static void __init pSeries_request_regions(void) { - struct device_node *i8042; - request_region(0x20,0x20,"pic1"); request_region(0xa0,0x20,"pic2"); request_region(0x00,0x20,"dma1"); request_region(0x40,0x20,"timer"); request_region(0x80,0x10,"dma page reg"); request_region(0xc0,0x20,"dma2"); - -#define I8042_DATA_REG 0x60 - - /* - * Some machines have an unterminated i8042 so check the device - * tree and reserve the region if it does not appear. Later on - * the i8042 code will try and reserve this region and fail. - */ - if (!(i8042 = of_find_node_by_type(NULL, "8042"))) - request_region(I8042_DATA_REG, 16, "reserved (no i8042)"); - of_node_put(i8042); } void __init pSeries_final_fixup(void) @@ -646,7 +548,7 @@ check_s7a(); - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { + for_each_pci_dev(dev) { pci_read_irq_line(dev); if (s7a_workaround) { if (dev->irq > 16) { diff -Nru a/arch/ppc64/kernel/pSeries_setup.c b/arch/ppc64/kernel/pSeries_setup.c --- a/arch/ppc64/kernel/pSeries_setup.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/pSeries_setup.c 2004-11-10 17:19:02 -08:00 @@ -61,19 +61,18 @@ #include #include "i8259.h" -#include "open_pic.h" #include #include #include +#include "mpic.h" + #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) #else #define DBG(fmt...) #endif -extern void pSeries_init_openpic(void); - extern void find_and_init_phbs(void); extern void pSeries_final_fixup(void); @@ -82,6 +81,8 @@ extern int pSeries_set_rtc_time(struct rtc_time *rtc_time); extern void find_udbg_vterm(void); extern void SystemReset_FWNMI(void), MachineCheck_FWNMI(void); /* from head.S */ +extern void generic_find_legacy_serial_ports(unsigned int *default_speed); + int fwnmi_active; /* TRUE if an FWNMI handler is present */ unsigned long virtPython0Facilities = 0; // python0 facility area (memory mapped io) (64-bit format) VIRTUAL address. @@ -91,6 +92,9 @@ extern unsigned long ppc_proc_freq; extern unsigned long ppc_tb_freq; +static volatile void __iomem * chrp_int_ack_special; +struct mpic *pSeries_mpic; + void pSeries_get_cpuinfo(struct seq_file *m) { struct device_node *root; @@ -120,15 +124,84 @@ fwnmi_active = 1; } -static void __init pSeries_setup_arch(void) +static int pSeries_irq_cascade(struct pt_regs *regs, void *data) +{ + if (chrp_int_ack_special) + return readb(chrp_int_ack_special); + else + return i8259_irq(smp_processor_id()); +} + +static void __init pSeries_init_mpic(void) +{ + unsigned int *addrp; + struct device_node *np; + int i; + + /* All ISUs are setup, complete initialization */ + mpic_init(pSeries_mpic); + + /* Check what kind of cascade ACK we have */ + if (!(np = of_find_node_by_name(NULL, "pci")) + || !(addrp = (unsigned int *) + get_property(np, "8259-interrupt-acknowledge", NULL))) + printk(KERN_ERR "Cannot find pci to get ack address\n"); + else + chrp_int_ack_special = ioremap(addrp[prom_n_addr_cells(np)-1], 1); + of_node_put(np); + + /* Setup the legacy interrupts & controller */ + for (i = 0; i < NUM_ISA_INTERRUPTS; i++) + irq_desc[i].handler = &i8259_pic; + i8259_init(0); + + /* Hook cascade to mpic */ + mpic_setup_cascade(NUM_ISA_INTERRUPTS, pSeries_irq_cascade, NULL); +} + +static void __init pSeries_setup_mpic(void) { - struct device_node *root; unsigned int *opprop; + unsigned long openpic_addr = 0; + unsigned char senses[NR_IRQS - NUM_ISA_INTERRUPTS]; + struct device_node *root; + int irq_count; + + /* Find the Open PIC if present */ + root = of_find_node_by_path("/"); + opprop = (unsigned int *) get_property(root, "platform-open-pic", NULL); + if (opprop != 0) { + int n = prom_n_addr_cells(root); + + for (openpic_addr = 0; n > 0; --n) + openpic_addr = (openpic_addr << 32) + *opprop++; + printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); + } + of_node_put(root); + + BUG_ON(openpic_addr == 0); + + /* Get the sense values from OF */ + prom_get_irq_senses(senses, NUM_ISA_INTERRUPTS, NR_IRQS); + + /* Setup the openpic driver */ + irq_count = NR_IRQS - NUM_ISA_INTERRUPTS - 4; /* leave room for IPIs */ + pSeries_mpic = mpic_alloc(openpic_addr, MPIC_PRIMARY, + 16, 16, irq_count, /* isu size, irq offset, irq count */ + NR_IRQS - 4, /* ipi offset */ + senses, irq_count, /* sense & sense size */ + " MPIC "); +} +static void __init pSeries_setup_arch(void) +{ /* Fixup ppc_md depending on the type of interrupt controller */ if (naca->interrupt_controller == IC_OPEN_PIC) { - ppc_md.init_IRQ = pSeries_init_openpic; - ppc_md.get_irq = openpic_get_irq; + ppc_md.init_IRQ = pSeries_init_mpic; + ppc_md.get_irq = mpic_get_irq; + /* Allocate the mpic now, so that find_and_init_phbs() can + * fill the ISUs */ + pSeries_setup_mpic(); } else { ppc_md.init_IRQ = xics_init_IRQ; ppc_md.get_irq = xics_get_irq; @@ -156,21 +229,6 @@ eeh_init(); find_and_init_phbs(); - /* Find the Open PIC if present */ - root = of_find_node_by_path("/"); - opprop = (unsigned int *) get_property(root, - "platform-open-pic", NULL); - if (opprop != 0) { - int n = prom_n_addr_cells(root); - unsigned long openpic; - - for (openpic = 0; n > 0; --n) - openpic = (openpic << 32) + *opprop++; - printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic); - OpenPIC_Addr = __ioremap(openpic, 0x40000, _PAGE_NO_CACHE); - } - of_node_put(root); - #ifdef CONFIG_DUMMY_CONSOLE conswitchp = &dummy_con; #endif @@ -189,75 +247,6 @@ arch_initcall(pSeries_init_panel); - -void __init pSeries_find_serial_port(void) -{ - struct device_node *np; - unsigned long encode_phys_size = 32; - u32 *sizeprop; - - struct isa_reg_property { - u32 space; - u32 address; - u32 size; - }; - struct pci_reg_property { - struct pci_address addr; - u32 size_hi; - u32 size_lo; - }; - - DBG(" -> pSeries_find_serial_port()\n"); - - naca->serialPortAddr = 0; - - np = of_find_node_by_path("/"); - if (!np) - return; - sizeprop = (u32 *)get_property(np, "#size-cells", NULL); - if (sizeprop != NULL) - encode_phys_size = (*sizeprop) << 5; - - for (np = NULL; (np = of_find_node_by_type(np, "serial"));) { - struct device_node *isa, *pci; - struct isa_reg_property *reg; - union pci_range *rangesp; - char *typep; - - typep = (char *)get_property(np, "ibm,aix-loc", NULL); - if ((typep == NULL) || (typep && strcmp(typep, "S1"))) - continue; - - reg = (struct isa_reg_property *)get_property(np, "reg", NULL); - - isa = of_get_parent(np); - if (!isa) { - DBG("no isa parent found\n"); - break; - } - pci = of_get_parent(isa); - if (!pci) { - DBG("no pci parent found\n"); - break; - } - - rangesp = (union pci_range *)get_property(pci, "ranges", NULL); - - if ( encode_phys_size == 32 ) - naca->serialPortAddr = rangesp->pci32.phys+reg->address; - else { - naca->serialPortAddr = - ((((unsigned long)rangesp->pci64.phys_hi) << 32) - | - (rangesp->pci64.phys_lo)) + reg->address; - } - break; - } - - DBG(" <- pSeries_find_serial_port()\n"); -} - - /* Build up the firmware_features bitmask field * using contents of device-tree/ibm,hypertas-functions. * Ultimately this functionality may be moved into prom.c prom_init(). @@ -330,6 +319,20 @@ } } +static void pSeries_cpu_die(void) +{ + local_irq_disable(); + /* Some hardware requires clearing the CPPR, while other hardware does not + * it is safe either way + */ + pSeriesLP_cppr_info(0, 0); + rtas_stop_self(); + /* Should never get here... */ + BUG(); + for(;;); +} + + /* * Early initialization. Relocation is on but do not reference unbolted pages */ @@ -337,6 +340,7 @@ { void *comport; int iommu_off = 0; + unsigned int default_speed; DBG(" -> pSeries_init_early()\n"); @@ -350,14 +354,14 @@ get_property(of_chosen, "linux,iommu-off", NULL)); } - pSeries_find_serial_port(); + generic_find_legacy_serial_ports(&default_speed); if (systemcfg->platform & PLATFORM_LPAR) find_udbg_vterm(); else if (naca->serialPortAddr) { /* Map the uart for udbg. */ comport = (void *)__ioremap(naca->serialPortAddr, 16, _PAGE_NO_CACHE); - udbg_init_uart(comport); + udbg_init_uart(comport, default_speed); ppc_md.udbg_putc = udbg_putc; ppc_md.udbg_getc = udbg_getc; @@ -542,6 +546,31 @@ setup_default_decr(); } +static int pSeries_check_legacy_ioport(unsigned int baseport) +{ + struct device_node *np; + +#define I8042_DATA_REG 0x60 +#define FDC_BASE 0x3f0 + + + switch(baseport) { + case I8042_DATA_REG: + np = of_find_node_by_type(NULL, "8042"); + if (np == NULL) + return -ENODEV; + of_node_put(np); + break; + case FDC_BASE: + np = of_find_node_by_type(NULL, "fdc"); + if (np == NULL) + return -ENODEV; + of_node_put(np); + break; + } + return 0; +} + /* * Called very early, MMU is off, device-tree isn't unflattened */ @@ -571,9 +600,11 @@ .power_off = rtas_power_off, .halt = rtas_halt, .panic = rtas_os_term, + .cpu_die = pSeries_cpu_die, .get_boot_time = pSeries_get_boot_time, .get_rtc_time = pSeries_get_rtc_time, .set_rtc_time = pSeries_set_rtc_time, .calibrate_decr = pSeries_calibrate_decr, .progress = pSeries_progress, + .check_legacy_ioport = pSeries_check_legacy_ioport, }; diff -Nru a/arch/ppc64/kernel/pSeries_smp.c b/arch/ppc64/kernel/pSeries_smp.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/pSeries_smp.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,393 @@ +/* + * SMP support for pSeries machines. + * + * Dave Engebretsen, Peter Bergner, and + * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com + * + * Plus various changes from other IBM teams... + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#undef DEBUG + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "mpic.h" + +#ifdef DEBUG +#define DBG(fmt...) udbg_printf(fmt) +#else +#define DBG(fmt...) +#endif + +extern void pseries_secondary_smp_init(unsigned long); + +static void vpa_init(int cpu) +{ + unsigned long flags, pcpu = get_hard_smp_processor_id(cpu); + + /* Register the Virtual Processor Area (VPA) */ + flags = 1UL << (63 - 18); + register_vpa(flags, pcpu, __pa((unsigned long)&(paca[cpu].lppaca))); +} + + +/* Get state of physical CPU. + * Return codes: + * 0 - The processor is in the RTAS stopped state + * 1 - stop-self is in progress + * 2 - The processor is not in the RTAS stopped state + * -1 - Hardware Error + * -2 - Hardware Busy, Try again later. + */ +static int query_cpu_stopped(unsigned int pcpu) +{ + int cpu_status; + int status, qcss_tok; + + qcss_tok = rtas_token("query-cpu-stopped-state"); + if (qcss_tok == RTAS_UNKNOWN_SERVICE) + return -1; + status = rtas_call(qcss_tok, 1, 2, &cpu_status, pcpu); + if (status != 0) { + printk(KERN_ERR + "RTAS query-cpu-stopped-state failed: %i\n", status); + return status; + } + + return cpu_status; +} + + +#ifdef CONFIG_HOTPLUG_CPU + +int __cpu_disable(void) +{ + /* FIXME: go put this in a header somewhere */ + extern void xics_migrate_irqs_away(void); + + systemcfg->processorCount--; + + /*fix boot_cpuid here*/ + if (smp_processor_id() == boot_cpuid) + boot_cpuid = any_online_cpu(cpu_online_map); + + /* FIXME: abstract this to not be platform specific later on */ + xics_migrate_irqs_away(); + return 0; +} + +void __cpu_die(unsigned int cpu) +{ + int tries; + int cpu_status; + unsigned int pcpu = get_hard_smp_processor_id(cpu); + + for (tries = 0; tries < 25; tries++) { + cpu_status = query_cpu_stopped(pcpu); + if (cpu_status == 0 || cpu_status == -1) + break; + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ/5); + } + if (cpu_status != 0) { + printk("Querying DEAD? cpu %i (%i) shows %i\n", + cpu, pcpu, cpu_status); + } + + /* Isolation and deallocation are definatly done by + * drslot_chrp_cpu. If they were not they would be + * done here. Change isolate state to Isolate and + * change allocation-state to Unusable. + */ + paca[cpu].cpu_start = 0; +} + +/* Search all cpu device nodes for an offline logical cpu. If a + * device node has a "ibm,my-drc-index" property (meaning this is an + * LPAR), paranoid-check whether we own the cpu. For each "thread" + * of a cpu, if it is offline and has the same hw index as before, + * grab that in preference. + */ +static unsigned int find_physical_cpu_to_start(unsigned int old_hwindex) +{ + struct device_node *np = NULL; + unsigned int best = -1U; + + while ((np = of_find_node_by_type(np, "cpu"))) { + int nr_threads, len; + u32 *index = (u32 *)get_property(np, "ibm,my-drc-index", NULL); + u32 *tid = (u32 *) + get_property(np, "ibm,ppc-interrupt-server#s", &len); + + if (!tid) + tid = (u32 *)get_property(np, "reg", &len); + + if (!tid) + continue; + + /* If there is a drc-index, make sure that we own + * the cpu. + */ + if (index) { + int state; + int rc = rtas_get_sensor(9003, *index, &state); + if (rc != 0 || state != 1) + continue; + } + + nr_threads = len / sizeof(u32); + + while (nr_threads--) { + if (0 == query_cpu_stopped(tid[nr_threads])) { + best = tid[nr_threads]; + if (best == old_hwindex) + goto out; + } + } + } +out: + of_node_put(np); + return best; +} + +/** + * smp_startup_cpu() - start the given cpu + * + * At boot time, there is nothing to do. At run-time, call RTAS with + * the appropriate start location, if the cpu is in the RTAS stopped + * state. + * + * Returns: + * 0 - failure + * 1 - success + */ +static inline int __devinit smp_startup_cpu(unsigned int lcpu) +{ + int status; + unsigned long start_here = __pa((u32)*((unsigned long *) + pseries_secondary_smp_init)); + unsigned int pcpu; + + /* At boot time the cpus are already spinning in hold + * loops, so nothing to do. */ + if (system_state < SYSTEM_RUNNING) + return 1; + + pcpu = find_physical_cpu_to_start(get_hard_smp_processor_id(lcpu)); + if (pcpu == -1U) { + printk(KERN_INFO "No more cpus available, failing\n"); + return 0; + } + + /* Fixup atomic count: it exited inside IRQ handler. */ + paca[lcpu].__current->thread_info->preempt_count = 0; + + /* At boot this is done in prom.c. */ + paca[lcpu].hw_cpu_id = pcpu; + + status = rtas_call(rtas_token("start-cpu"), 3, 1, NULL, + pcpu, start_here, lcpu); + if (status != 0) { + printk(KERN_ERR "start-cpu failed: %i\n", status); + return 0; + } + return 1; +} +#else /* ... CONFIG_HOTPLUG_CPU */ +static inline int __devinit smp_startup_cpu(unsigned int lcpu) +{ + return 1; +} +#endif /* CONFIG_HOTPLUG_CPU */ + +static inline void smp_xics_do_message(int cpu, int msg) +{ + set_bit(msg, &xics_ipi_message[cpu].value); + mb(); + xics_cause_IPI(cpu); +} + +static void smp_xics_message_pass(int target, int msg) +{ + unsigned int i; + + if (target < NR_CPUS) { + smp_xics_do_message(target, msg); + } else { + for_each_online_cpu(i) { + if (target == MSG_ALL_BUT_SELF + && i == smp_processor_id()) + continue; + smp_xics_do_message(i, msg); + } + } +} + +extern void xics_request_IPIs(void); + +static int __init smp_xics_probe(void) +{ + xics_request_IPIs(); + + return cpus_weight(cpu_possible_map); +} + +static void __devinit smp_xics_setup_cpu(int cpu) +{ + if (cpu != boot_cpuid) + xics_setup_cpu(); +} + +static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED; +static unsigned long timebase = 0; + +static void __devinit pSeries_give_timebase(void) +{ + spin_lock(&timebase_lock); + rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL); + timebase = get_tb(); + spin_unlock(&timebase_lock); + + while (timebase) + barrier(); + rtas_call(rtas_token("thaw-time-base"), 0, 1, NULL); +} + +static void __devinit pSeries_take_timebase(void) +{ + while (!timebase) + barrier(); + spin_lock(&timebase_lock); + set_tb(timebase >> 32, timebase & 0xffffffff); + timebase = 0; + spin_unlock(&timebase_lock); +} + +static void __devinit pSeries_late_setup_cpu(int cpu) +{ + extern unsigned int default_distrib_server; + + if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { + vpa_init(cpu); + } + +#ifdef CONFIG_IRQ_ALL_CPUS + /* Put the calling processor into the GIQ. This is really only + * necessary from a secondary thread as the OF start-cpu interface + * performs this function for us on primary threads. + */ + /* TODO: 9005 is #defined in rtas-proc.c -- move to a header */ + rtas_set_indicator(9005, default_distrib_server, 1); +#endif +} + + +void __devinit smp_pSeries_kick_cpu(int nr) +{ + BUG_ON(nr < 0 || nr >= NR_CPUS); + + if (!smp_startup_cpu(nr)) + return; + + /* + * The processor is currently spinning, waiting for the + * cpu_start field to become non-zero After we set cpu_start, + * the processor will continue on to secondary_start + */ + paca[nr].cpu_start = 1; +} + +static struct smp_ops_t pSeries_mpic_smp_ops = { + .message_pass = smp_mpic_message_pass, + .probe = smp_mpic_probe, + .kick_cpu = smp_pSeries_kick_cpu, + .setup_cpu = smp_mpic_setup_cpu, + .late_setup_cpu = pSeries_late_setup_cpu, +}; + +static struct smp_ops_t pSeries_xics_smp_ops = { + .message_pass = smp_xics_message_pass, + .probe = smp_xics_probe, + .kick_cpu = smp_pSeries_kick_cpu, + .setup_cpu = smp_xics_setup_cpu, + .late_setup_cpu = pSeries_late_setup_cpu, +}; + +/* This is called very early */ +void __init smp_init_pSeries(void) +{ + int ret, i; + + DBG(" -> smp_init_pSeries()\n"); + + if (naca->interrupt_controller == IC_OPEN_PIC) + smp_ops = &pSeries_mpic_smp_ops; + else + smp_ops = &pSeries_xics_smp_ops; + + /* Start secondary threads on SMT systems; primary threads + * are already in the running state. + */ + for_each_present_cpu(i) { + if (query_cpu_stopped(get_hard_smp_processor_id(i)) == 0) { + printk("%16.16x : starting thread\n", i); + DBG("%16.16x : starting thread\n", i); + rtas_call(rtas_token("start-cpu"), 3, 1, &ret, + get_hard_smp_processor_id(i), + __pa((u32)*((unsigned long *) + pseries_secondary_smp_init)), + i); + } + } + + if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) + vpa_init(boot_cpuid); + + /* Non-lpar has additional take/give timebase */ + if (systemcfg->platform == PLATFORM_PSERIES) { + smp_ops->give_timebase = pSeries_give_timebase; + smp_ops->take_timebase = pSeries_take_timebase; + } + + + DBG(" <- smp_init_pSeries()\n"); +} + diff -Nru a/arch/ppc64/kernel/pacaData.c b/arch/ppc64/kernel/pacaData.c --- a/arch/ppc64/kernel/pacaData.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc64/kernel/pacaData.c 2004-11-10 17:19:06 -08:00 @@ -7,13 +7,12 @@ * 2 of the License, or (at your option) any later version. */ -#include -#include -#include #include +#include #include #include #include +#include #include #include diff -Nru a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c --- a/arch/ppc64/kernel/pci.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc64/kernel/pci.c 2004-11-10 17:19:06 -08:00 @@ -11,6 +11,8 @@ * 2 of the License, or (at your option) any later version. */ +#undef DEBUG + #include #include #include @@ -39,6 +41,12 @@ #include "pci.h" +#ifdef DEBUG +#define DBG(fmt...) udbg_printf(fmt) +#else +#define DBG(fmt...) +#endif + unsigned long pci_probe_only = 1; unsigned long pci_assign_all_buses = 0; @@ -106,11 +114,11 @@ dev->resource[i].flags &= ~IORESOURCE_IO; } } -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, fixup_windbond_82c105); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, + fixup_windbond_82c105); -void -pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, - struct resource *res) +void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, + struct resource *res) { unsigned long offset = 0; struct pci_controller *hose = PCI_GET_PHB_PTR(dev); @@ -215,8 +223,7 @@ /* * Allocate pci_controller(phb) initialized common variables. */ -struct pci_controller * __init -pci_alloc_pci_controller(enum phb_types controller_type) +struct pci_controller * __init pci_alloc_pci_controller(enum phb_types controller_type) { struct pci_controller *hose; @@ -246,8 +253,7 @@ /* * Dymnamically allocate pci_controller(phb), initialize common variables. */ -struct pci_controller * -pci_alloc_phb_dynamic(enum phb_types controller_type) +struct pci_controller * pci_alloc_phb_dynamic(enum phb_types controller_type) { struct pci_controller *hose; @@ -430,9 +436,9 @@ * * Returns negative error code on failure, zero on success. */ -static __inline__ int -__pci_mmap_make_offset(struct pci_dev *dev, struct vm_area_struct *vma, - enum pci_mmap_state mmap_state) +static __inline__ int __pci_mmap_make_offset(struct pci_dev *dev, + struct vm_area_struct *vma, + enum pci_mmap_state mmap_state) { struct pci_controller *hose = PCI_GET_PHB_PTR(dev); unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; @@ -487,9 +493,9 @@ * Set vm_flags of VMA, as appropriate for this architecture, for a pci device * mapping. */ -static __inline__ void -__pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma, - enum pci_mmap_state mmap_state) +static __inline__ void __pci_mmap_set_flags(struct pci_dev *dev, + struct vm_area_struct *vma, + enum pci_mmap_state mmap_state) { vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO; } @@ -498,9 +504,10 @@ * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci * device mapping. */ -static __inline__ void -__pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma, - enum pci_mmap_state mmap_state, int write_combine) +static __inline__ void __pci_mmap_set_pgprot(struct pci_dev *dev, + struct vm_area_struct *vma, + enum pci_mmap_state mmap_state, + int write_combine) { long prot = pgprot_val(vma->vm_page_prot); @@ -569,7 +576,7 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node, unsigned long phb_io_base_phys, - void * phb_io_base_virt) + void __iomem * phb_io_base_virt) { struct isa_range *range; unsigned long pci_addr; @@ -578,9 +585,11 @@ int rlen = 0; range = (struct isa_range *) get_property(isa_node, "ranges", &rlen); - if (rlen < sizeof(struct isa_range)) { - printk(KERN_ERR "unexpected isa range size: %s\n", - __FUNCTION__); + if (range == NULL || (rlen < sizeof(struct isa_range))) { + printk(KERN_ERR "no ISA ranges or unexpected isa range size," + "mapping 64k\n"); + __ioremap_explicit(phb_io_base_phys, (unsigned long)phb_io_base_virt, + 0x10000, _PAGE_NO_CACHE); return; } @@ -613,7 +622,7 @@ } void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, - struct device_node *dev) + struct device_node *dev) { unsigned int *ranges; unsigned long size; @@ -645,8 +654,9 @@ cpu_phys_addr = cpu_phys_addr << 32 | ranges[4]; size = (unsigned long)ranges[na+3] << 32 | ranges[na+4]; - - switch (ranges[0] >> 24) { + if (size == 0) + continue; + switch ((ranges[0] >> 24) & 0x3) { case 1: /* I/O space */ hose->io_base_phys = cpu_phys_addr; hose->pci_io_size = size; @@ -654,6 +664,8 @@ res = &hose->io_resource; res->flags = IORESOURCE_IO; res->start = pci_addr; + DBG("phb%d: IO 0x%lx -> 0x%lx\n", hose->global_number, + res->start, res->start + size - 1); break; case 2: /* memory space */ memno = 0; @@ -666,6 +678,8 @@ res = &hose->mem_resources[memno]; res->flags = IORESOURCE_MEM; res->start = cpu_phys_addr; + DBG("phb%d: MEM 0x%lx -> 0x%lx\n", hose->global_number, + res->start, res->start + size - 1); } break; } @@ -729,6 +743,96 @@ res->end += io_virt_offset; } + +static int get_bus_io_range(struct pci_bus *bus, unsigned long *start_phys, + unsigned long *start_virt, unsigned long *size) +{ + struct pci_controller *hose = PCI_GET_PHB_PTR(bus); + struct pci_bus_region region; + struct resource *res; + + if (bus->self) { + res = bus->resource[0]; + pcibios_resource_to_bus(bus->self, ®ion, res); + *start_phys = hose->io_base_phys + region.start; + *start_virt = (unsigned long) hose->io_base_virt + + region.start; + if (region.end > region.start) + *size = region.end - region.start + 1; + else { + printk("%s(): unexpected region 0x%lx->0x%lx\n", + __FUNCTION__, region.start, region.end); + return 1; + } + + } else { + /* Root Bus */ + res = &hose->io_resource; + *start_phys = hose->io_base_phys; + *start_virt = (unsigned long) hose->io_base_virt; + if (res->end > res->start) + *size = res->end - res->start + 1; + else { + printk("%s(): unexpected region 0x%lx->0x%lx\n", + __FUNCTION__, res->start, res->end); + return 1; + } + } + + return 0; +} + +int unmap_bus_range(struct pci_bus *bus) +{ + unsigned long start_phys; + unsigned long start_virt; + unsigned long size; + + if (!bus) { + printk(KERN_ERR "%s() expected bus\n", __FUNCTION__); + return 1; + } + + if (get_bus_io_range(bus, &start_phys, &start_virt, &size)) + return 1; + if (iounmap_explicit((void __iomem *) start_virt, size)) + return 1; + + return 0; +} +EXPORT_SYMBOL(unmap_bus_range); + +int remap_bus_range(struct pci_bus *bus) +{ + unsigned long start_phys; + unsigned long start_virt; + unsigned long size; + + if (!bus) { + printk(KERN_ERR "%s() expected bus\n", __FUNCTION__); + return 1; + } + + + if (get_bus_io_range(bus, &start_phys, &start_virt, &size)) + return 1; + printk("mapping IO %lx -> %lx, size: %lx\n", start_phys, start_virt, size); + if (__ioremap_explicit(start_phys, start_virt, size, _PAGE_NO_CACHE)) + return 1; + + return 0; +} +EXPORT_SYMBOL(remap_bus_range); + +void phbs_remap_io(void) +{ + struct pci_controller *hose, *tmp; + + list_for_each_entry_safe(hose, tmp, &hose_list, list_node) + remap_bus_range(hose->bus); +} + + /*********************************************************************** * pci_find_hose_for_OF_device * @@ -761,6 +865,9 @@ else busdn = bus->sysdata; /* must be a phb */ + if (busdn == NULL) + return 0; + /* * Check to see if there is any of the 8 functions are in the * device tree. If they are then we need to scan all the @@ -783,7 +890,8 @@ for (i = 0; i < PCI_NUM_RESOURCES; i++) { if (dev->resource[i].flags & IORESOURCE_IO) { - unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base; + unsigned long offset = (unsigned long)hose->io_base_virt + - pci_io_base; unsigned long start, end, mask; start = dev->resource[i].start += offset; diff -Nru a/arch/ppc64/kernel/pci_dn.c b/arch/ppc64/kernel/pci_dn.c --- a/arch/ppc64/kernel/pci_dn.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc64/kernel/pci_dn.c 2004-11-10 17:19:07 -08:00 @@ -46,29 +46,13 @@ { struct pci_controller *phb = data; u32 *regs; - char *device_type = get_property(dn, "device_type", NULL); - char *model; dn->phb = phb; - if (device_type && (strcmp(device_type, "pci") == 0) && - (get_property(dn, "class-code", NULL) == 0)) { - /* special case for PHB's. Sigh. */ - regs = (u32 *)get_property(dn, "bus-range", NULL); - dn->busno = regs[0]; - - model = (char *)get_property(dn, "model", NULL); - - if (strstr(model, "U3")) - dn->devfn = -1; - else - dn->devfn = 0; /* assumption */ - } else { - regs = (u32 *)get_property(dn, "reg", NULL); - if (regs) { - /* First register entry is addr (00BBSS00) */ - dn->busno = (regs[0] >> 16) & 0xff; - dn->devfn = (regs[0] >> 8) & 0xff; - } + regs = (u32 *)get_property(dn, "reg", NULL); + if (regs) { + /* First register entry is addr (00BBSS00) */ + dn->busno = (regs[0] >> 16) & 0xff; + dn->devfn = (regs[0] >> 8) & 0xff; } return NULL; } @@ -97,20 +81,25 @@ struct device_node *dn, *nextdn; void *ret; - if (pre && ((ret = pre(start, data)) != NULL)) - return ret; + /* We started with a phb, iterate all childs */ for (dn = start->child; dn; dn = nextdn) { + u32 *classp, class; + nextdn = NULL; - if (get_property(dn, "class-code", NULL)) { - if (pre && ((ret = pre(dn, data)) != NULL)) - return ret; - if (dn->child) - /* Depth first...do children */ - nextdn = dn->child; - else if (dn->sibling) - /* ok, try next sibling instead. */ - nextdn = dn->sibling; - } + classp = (u32 *)get_property(dn, "class-code", NULL); + class = classp ? *classp : 0; + + if (pre && ((ret = pre(dn, data)) != NULL)) + return ret; + + /* If we are a PCI bridge, go down */ + if (dn->child && ((class >> 8) == PCI_CLASS_BRIDGE_PCI || + (class >> 8) == PCI_CLASS_BRIDGE_CARDBUS)) + /* Depth first...do children */ + nextdn = dn->child; + else if (dn->sibling) + /* ok, try next sibling instead. */ + nextdn = dn->sibling; if (!nextdn) { /* Walk up to next valid sibling. */ do { @@ -124,26 +113,16 @@ return NULL; } -/* - * Same as traverse_pci_devices except this does it for all phbs. - */ -static void *traverse_all_pci_devices(traverse_func pre) +void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) { - struct pci_controller *phb, *tmp; - void *ret; + struct device_node * dn = (struct device_node *) phb->arch_data; - list_for_each_entry_safe(phb, tmp, &hose_list, list_node) - if ((ret = traverse_pci_devices(phb->arch_data, pre, phb)) - != NULL) - return ret; - return NULL; -} + /* PHB nodes themselves must not match */ + dn->devfn = dn->busno = -1; + dn->phb = phb; -void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) -{ /* Update dn->phb ptrs for new phb and children devices */ - traverse_pci_devices((struct device_node *)phb->arch_data, - update_dn_pci_info, phb); + traverse_pci_devices(dn, update_dn_pci_info, phb); } /* @@ -154,6 +133,7 @@ { int busno = ((unsigned long)data >> 8) & 0xff; int devfn = ((unsigned long)data) & 0xff; + return ((devfn == dn->devfn) && (busno == dn->busno)) ? dn : NULL; } @@ -180,10 +160,8 @@ phb_dn = phb->arch_data; dn = traverse_pci_devices(phb_dn, is_devfn_node, (void *)searchval); - if (dn) { + if (dn) dev->sysdata = dn; - /* ToDo: call some device init hook here */ - } return dn; } EXPORT_SYMBOL(fetch_dev_dn); @@ -195,8 +173,11 @@ */ void __init pci_devs_phb_init(void) { + struct pci_controller *phb, *tmp; + /* This must be done first so the device nodes have valid pci info! */ - traverse_all_pci_devices(update_dn_pci_info); + list_for_each_entry_safe(phb, tmp, &hose_list, list_node) + pci_devs_phb_init_dynamic(phb); } diff -Nru a/arch/ppc64/kernel/pmac.h b/arch/ppc64/kernel/pmac.h --- a/arch/ppc64/kernel/pmac.h 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc64/kernel/pmac.h 2004-11-10 17:19:04 -08:00 @@ -18,7 +18,6 @@ extern void pmac_pcibios_fixup(void); extern void pmac_pci_init(void); extern void pmac_setup_pci_dma(void); -extern void fixup_k2_sata(struct pci_dev* dev); extern void pmac_check_ht_link(void); extern void pmac_setup_smp(void); diff -Nru a/arch/ppc64/kernel/pmac_low_i2c.c b/arch/ppc64/kernel/pmac_low_i2c.c --- a/arch/ppc64/kernel/pmac_low_i2c.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc64/kernel/pmac_low_i2c.c 2004-11-10 17:19:04 -08:00 @@ -16,9 +16,10 @@ * properties parser */ +#undef DEBUG + #include #include -#include #include #include #include @@ -33,12 +34,12 @@ #define MAX_LOW_I2C_HOST 4 -#if 1 +#ifdef DEBUG #define DBG(x...) do {\ printk(KERN_DEBUG "KW:" x); \ } while(0) #else -#define DBGG(x...) +#define DBG(x...) #endif struct low_i2c_host; @@ -50,11 +51,11 @@ struct device_node *np; /* OF device node */ struct semaphore mutex; /* Access mutex for use by i2c-keywest */ low_i2c_func_t func; /* Access function */ - unsigned is_open : 1; /* Poor man's access control */ + unsigned int is_open : 1; /* Poor man's access control */ int mode; /* Current mode */ int channel; /* Current channel */ int num_channels; /* Number of channels */ - unsigned long base; /* For keywest-i2c, base address */ + void __iomem *base; /* For keywest-i2c, base address */ int bsteps; /* And register stepping */ int speed; /* And speed */ }; @@ -154,14 +155,12 @@ static inline u8 __kw_read_reg(struct low_i2c_host *host, reg_t reg) { - return in_8(((volatile u8 *)host->base) - + (((unsigned)reg) << host->bsteps)); + return readb(host->base + (((unsigned int)reg) << host->bsteps)); } static inline void __kw_write_reg(struct low_i2c_host *host, reg_t reg, u8 val) { - out_8(((volatile u8 *)host->base) - + (((unsigned)reg) << host->bsteps), val); + writeb(val, host->base + (((unsigned)reg) << host->bsteps)); (void)__kw_read_reg(host, reg_subaddr); } @@ -174,14 +173,19 @@ */ static u8 kw_wait_interrupt(struct low_i2c_host* host) { - int i; + int i, j; u8 isr; - for (i = 0; i < 200000; i++) { + for (i = 0; i < 100000; i++) { isr = kw_read_reg(reg_isr) & KW_I2C_IRQ_MASK; if (isr != 0) return isr; - udelay(1); + + /* This code is used with the timebase frozen, we cannot rely + * on udelay ! For now, just use a bogus loop + */ + for (j = 1; j < 10000; j++) + mb(); } return isr; } @@ -190,6 +194,8 @@ { u8 ack; + DBG("kw_handle_interrupt(%s, isr: %x)\n", __kw_state_names[state], isr); + if (isr == 0) { if (state != state_stop) { DBG("KW: Timeout !\n"); @@ -301,11 +307,9 @@ break; case pmac_low_i2c_mode_stdsub: mode_reg |= KW_I2C_MODE_STANDARDSUB; - kw_write_reg(reg_subaddr, subaddr); break; case pmac_low_i2c_mode_combined: mode_reg |= KW_I2C_MODE_COMBINED; - kw_write_reg(reg_subaddr, subaddr); break; } @@ -317,6 +321,11 @@ /* Set up address and r/w bit */ kw_write_reg(reg_addr, addr); + /* Set up the sub address */ + if ((mode_reg & KW_I2C_MODE_MODE_MASK) == KW_I2C_MODE_STANDARDSUB + || (mode_reg & KW_I2C_MODE_MODE_MASK) == KW_I2C_MODE_COMBINED) + kw_write_reg(reg_subaddr, subaddr); + /* Start sending address & disable interrupt*/ kw_write_reg(reg_ier, 0 /*KW_I2C_IRQ_MASK*/); kw_write_reg(reg_control, KW_I2C_CTL_XADDR); @@ -333,7 +342,7 @@ static void keywest_low_i2c_add(struct device_node *np) { struct low_i2c_host *host = find_low_i2c_host(NULL); - unsigned long *psteps, *prate, steps, aoffset = 0; + u32 *psteps, *prate, steps, aoffset = 0; struct device_node *parent; if (host == NULL) { @@ -345,7 +354,7 @@ init_MUTEX(&host->mutex); host->np = of_node_get(np); - psteps = (unsigned long *)get_property(np, "AAPL,address-step", NULL); + psteps = (u32 *)get_property(np, "AAPL,address-step", NULL); steps = psteps ? (*psteps) : 0x10; for (host->bsteps = 0; (steps & 0x01) == 0; host->bsteps++) steps >>= 1; @@ -357,7 +366,7 @@ } /* Select interface rate */ host->speed = KW_I2C_MODE_100KHZ; - prate = (unsigned long *)get_property(np, "AAPL,i2c-rate", NULL); + prate = (u32 *)get_property(np, "AAPL,i2c-rate", NULL); if (prate) switch(*prate) { case 100: host->speed = KW_I2C_MODE_100KHZ; @@ -369,8 +378,9 @@ host->speed = KW_I2C_MODE_25KHZ; break; } + host->mode = pmac_low_i2c_mode_std; - host->base = (unsigned long)ioremap(np->addrs[0].address + aoffset, + host->base = ioremap(np->addrs[0].address + aoffset, np->addrs[0].size); host->func = keywest_low_i2c_func; } diff -Nru a/arch/ppc64/kernel/pmac_pci.c b/arch/ppc64/kernel/pmac_pci.c --- a/arch/ppc64/kernel/pmac_pci.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc64/kernel/pmac_pci.c 2004-11-10 17:19:05 -08:00 @@ -46,7 +46,6 @@ * assuming we won't have both UniNorth and Bandit */ static int has_uninorth; static struct pci_controller *u3_agp; -u8 pci_cache_line_size; struct pci_dev *k2_skiplist[2]; static int __init fixup_one_level_bus_range(struct device_node *node, int higher) @@ -150,16 +149,9 @@ int offset, int len, u32 *val) { struct pci_controller *hose; - struct device_node *busdn; unsigned long addr; - if (bus->self) - busdn = pci_device_to_OF_node(bus->self); - else - busdn = bus->sysdata; /* must be a phb */ - if (busdn == NULL) - return PCIBIOS_DEVICE_NOT_FOUND; - hose = busdn->phb; + hose = pci_bus_to_host(bus); if (hose == NULL) return PCIBIOS_DEVICE_NOT_FOUND; @@ -188,16 +180,9 @@ int offset, int len, u32 val) { struct pci_controller *hose; - struct device_node *busdn; unsigned long addr; - if (bus->self) - busdn = pci_device_to_OF_node(bus->self); - else - busdn = bus->sysdata; /* must be a phb */ - if (busdn == NULL) - return PCIBIOS_DEVICE_NOT_FOUND; - hose = busdn->phb; + hose = pci_bus_to_host(bus); if (hose == NULL) return PCIBIOS_DEVICE_NOT_FOUND; @@ -236,14 +221,44 @@ * implement self-view of the HT host yet */ -static int skip_k2_device(struct pci_bus *bus, unsigned int devfn) +/* + * This function deals with some "special cases" devices. + * + * 0 -> No special case + * 1 -> Skip the device but act as if the access was successfull + * (return 0xff's on reads, eventually, cache config space + * accesses in a later version) + * -1 -> Hide the device (unsuccessful acess) + */ +static int u3_ht_skip_device(struct pci_controller *hose, + struct pci_bus *bus, unsigned int devfn) { + struct device_node *busdn, *dn; int i; + /* + * When a device in K2 is powered down, we die on config + * cycle accesses. Fix that here. + */ for (i=0; i<2; i++) if (k2_skiplist[i] && k2_skiplist[i]->bus == bus && k2_skiplist[i]->devfn == devfn) return 1; + + /* We only allow config cycles to devices that are in OF device-tree + * as we are apparently having some weird things going on with some + * revs of K2 on recent G5s + */ + if (bus->self) + busdn = pci_device_to_OF_node(bus->self); + else + busdn = hose->arch_data; + for (dn = busdn->child; dn; dn = dn->sibling) + if (dn->devfn == devfn) + break; + if (dn == NULL) + return -1; + return 0; } @@ -259,8 +274,7 @@ { if (bus == hose->first_busno) { /* For now, we don't self probe U3 HT bridge */ - if (PCI_FUNC(devfn) != 0 || PCI_SLOT(devfn) > 7 || - PCI_SLOT(devfn) < 1) + if (PCI_SLOT(devfn) == 0) return 0; return ((unsigned long)hose->cfg_data) + U3_HT_CFA0(devfn, offset); } else @@ -271,39 +285,21 @@ int offset, int len, u32 *val) { struct pci_controller *hose; - struct device_node *busdn, *dn; unsigned long addr; - if (bus->self) - busdn = pci_device_to_OF_node(bus->self); - else - busdn = bus->sysdata; /* must be a phb */ - if (busdn == NULL) - return PCIBIOS_DEVICE_NOT_FOUND; - hose = busdn->phb; - if (hose == NULL) - return PCIBIOS_DEVICE_NOT_FOUND; - /* We only allow config cycles to devices that are in OF device-tree - * as we are apparently having some weird things going on with some - * revs of K2 on recent G5s - */ - for (dn = busdn->child; dn; dn = dn->sibling) - if (dn->devfn == devfn) - break; - if (dn == NULL) + hose = pci_bus_to_host(bus); + if (hose == NULL) return PCIBIOS_DEVICE_NOT_FOUND; addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); if (!addr) return PCIBIOS_DEVICE_NOT_FOUND; - /* - * When a device in K2 is powered down, we die on config - * cycle accesses. Fix that here. We may ultimately want - * to cache the config space for those instead of returning - * 0xffffffff's to make life easier to HW detection tools - */ - if (skip_k2_device(bus, devfn)) { + + switch (u3_ht_skip_device(hose, bus, devfn)) { + case 0: + break; + case 1: switch (len) { case 1: *val = 0xff; break; @@ -313,6 +309,8 @@ *val = 0xfffffffful; break; } return PCIBIOS_SUCCESSFUL; + default: + return PCIBIOS_DEVICE_NOT_FOUND; } /* @@ -337,28 +335,24 @@ int offset, int len, u32 val) { struct pci_controller *hose; - struct device_node *busdn; unsigned long addr; - if (bus->self) - busdn = pci_device_to_OF_node(bus->self); - else - busdn = bus->sysdata; /* must be a phb */ - if (busdn == NULL) - return PCIBIOS_DEVICE_NOT_FOUND; - hose = busdn->phb; + hose = pci_bus_to_host(bus); if (hose == NULL) return PCIBIOS_DEVICE_NOT_FOUND; addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); if (!addr) return PCIBIOS_DEVICE_NOT_FOUND; - /* - * When a device in K2 is powered down, we die on config - * cycle accesses. Fix that here. - */ - if (skip_k2_device(bus, devfn)) + + switch (u3_ht_skip_device(hose, bus, devfn)) { + case 0: + break; + case 1: return PCIBIOS_SUCCESSFUL; + default: + return PCIBIOS_DEVICE_NOT_FOUND; + } /* * Note: the caller has already checked that offset is @@ -669,13 +663,12 @@ { struct pci_dev *dev = NULL; - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) + for_each_pci_dev(dev) pci_read_irq_line(dev); pci_fix_bus_sysdata(); iommu_setup_u3(); - } static void __init pmac_fixup_phb_resources(void) @@ -750,11 +743,6 @@ /* Tell pci.c to use the common resource allocation mecanism */ pci_probe_only = 0; - /* HT don't do more than 64 bytes transfers. FIXME: Deal with - * the exception of U3/AGP (hook into pci_set_mwi) - */ - pci_cache_line_size = 16; /* 64 bytes */ - /* Allow all IO */ io_page_mask = -1; } @@ -763,7 +751,7 @@ * Disable second function on K2-SATA, it's broken * and disable IO BARs on first one */ -void fixup_k2_sata(struct pci_dev* dev) +static void fixup_k2_sata(struct pci_dev* dev) { int i; u16 cmd; diff -Nru a/arch/ppc64/kernel/pmac_setup.c b/arch/ppc64/kernel/pmac_setup.c --- a/arch/ppc64/kernel/pmac_setup.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/pmac_setup.c 2004-11-10 17:19:02 -08:00 @@ -72,6 +72,7 @@ #include #include "pmac.h" +#include "mpic.h" #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -319,29 +320,9 @@ DBG(" <- pmac_init_early\n"); } -extern void* OpenPIC_Addr; -extern void* OpenPIC2_Addr; -extern u_int OpenPIC_NumInitSenses; -extern u_char *OpenPIC_InitSenses; -extern void openpic_init(int main_pic, int offset, unsigned char* chrp_ack, - int programmer_switch_irq); -extern void openpic2_init(int offset); -extern int openpic_get_irq(struct pt_regs *regs); -extern int openpic2_get_irq(struct pt_regs *regs); - -static int pmac_cascade_irq = -1; - -static irqreturn_t pmac_u3_do_cascade(int cpl, void *dev_id, struct pt_regs *regs) -{ - int irq; - - for (;;) { - irq = openpic2_get_irq(regs); - if (irq == -1) - break; - ppc_irq_dispatch_handler(regs, irq); - } - return IRQ_HANDLED; +static int pmac_u3_cascade(struct pt_regs *regs, void *data) +{ + return mpic_get_one_irq((struct mpic *)data, regs); } static __init void pmac_init_IRQ(void) @@ -349,6 +330,7 @@ struct device_node *irqctrler = NULL; struct device_node *irqctrler2 = NULL; struct device_node *np = NULL; + struct mpic *mpic1, *mpic2; /* We first try to detect Apple's new Core99 chipset, since mac-io * is quite different on those machines and contains an IBM MPIC2. @@ -368,44 +350,37 @@ (unsigned int)irqctrler->addrs[0].address); prom_get_irq_senses(senses, 0, 128); - OpenPIC_InitSenses = senses; - OpenPIC_NumInitSenses = 128; - OpenPIC_Addr = ioremap(irqctrler->addrs[0].address, - irqctrler->addrs[0].size); - openpic_init(1, 0, NULL, -1); + mpic1 = mpic_alloc(irqctrler->addrs[0].address, + MPIC_PRIMARY | MPIC_WANTS_RESET, + 0, 0, 128, 256, senses, 128, " K2-MPIC "); + BUG_ON(mpic1 == NULL); + mpic_init(mpic1); if (irqctrler2 != NULL && irqctrler2->n_intrs > 0 && irqctrler2->n_addrs > 0) { printk(KERN_INFO "Slave OpenPIC at 0x%08x hooked on IRQ %d\n", (u32)irqctrler2->addrs[0].address, irqctrler2->intrs[0].line); + pmac_call_feature(PMAC_FTR_ENABLE_MPIC, irqctrler2, 0, 0); - OpenPIC2_Addr = ioremap(irqctrler2->addrs[0].address, - irqctrler2->addrs[0].size); prom_get_irq_senses(senses, 128, 128 + 128); - OpenPIC_InitSenses = senses; - OpenPIC_NumInitSenses = 128; - openpic2_init(128); - pmac_cascade_irq = irqctrler2->intrs[0].line; + + /* We don't need to set MPIC_BROKEN_U3 here since we don't have + * hypertransport interrupts routed to it + */ + mpic2 = mpic_alloc(irqctrler2->addrs[0].address, + MPIC_BIG_ENDIAN | MPIC_WANTS_RESET, + 0, 128, 128, 0, senses, 128, " U3-MPIC "); + BUG_ON(mpic2 == NULL); + mpic_init(mpic2); + mpic_setup_cascade(irqctrler2->intrs[0].line, + pmac_u3_cascade, mpic2); } } of_node_put(irqctrler); of_node_put(irqctrler2); } -/* We cannot do request_irq too early ... Right now, we get the - * cascade as a core_initcall, which should be fine for our needs - */ -static int __init pmac_irq_cascade_init(void) -{ - if (request_irq(pmac_cascade_irq, pmac_u3_do_cascade, 0, - "U3->K2 Cascade", NULL)) - printk(KERN_ERR "Unable to get OpenPIC IRQ for cascade\n"); - return 0; -} - -core_initcall(pmac_irq_cascade_init); - static void __init pmac_progress(char *s, unsigned short hex) { if (sccdbg) { @@ -420,6 +395,15 @@ #endif /* CONFIG_BOOTX_TEXT */ } +/* + * pmac has no legacy IO, anything calling this function has to + * fail or bad things will happen + */ +static int pmac_check_legacy_ioport(unsigned int baseport) +{ + return -ENODEV; +} + static int __init pmac_declare_of_platform_devices(void) { struct device_node *np; @@ -463,7 +447,7 @@ .init_early = pmac_init_early, .get_cpuinfo = pmac_show_cpuinfo, .init_IRQ = pmac_init_IRQ, - .get_irq = openpic_get_irq, + .get_irq = mpic_get_irq, .pcibios_fixup = pmac_pcibios_fixup, .restart = pmac_restart, .power_off = pmac_power_off, @@ -474,4 +458,5 @@ .calibrate_decr = pmac_calibrate_decr, .feature_call = pmac_do_feature_call, .progress = pmac_progress, + .check_legacy_ioport = pmac_check_legacy_ioport }; diff -Nru a/arch/ppc64/kernel/pmac_smp.c b/arch/ppc64/kernel/pmac_smp.c --- a/arch/ppc64/kernel/pmac_smp.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/pmac_smp.c 2004-11-10 17:19:02 -08:00 @@ -21,6 +21,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ + +#undef DEBUG + #include #include #include @@ -28,10 +31,10 @@ #include #include #include -#include #include #include #include +#include #include #include @@ -47,42 +50,180 @@ #include #include #include +#include + +#include "mpic.h" -#include "open_pic.h" +#ifdef DEBUG +#define DBG(fmt...) udbg_printf(fmt) +#else +#define DBG(fmt...) +#endif extern void pmac_secondary_start_1(void); extern void pmac_secondary_start_2(void); extern void pmac_secondary_start_3(void); -extern void smp_openpic_message_pass(int target, int msg); - extern struct smp_ops_t *smp_ops; +static void (*pmac_tb_freeze)(int freeze); +static struct device_node *pmac_tb_clock_chip_host; +static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED; +static unsigned long timebase; + +static void smp_core99_cypress_tb_freeze(int freeze) +{ + u8 data; + int rc; + + /* Strangely, the device-tree says address is 0xd2, but darwin + * accesses 0xd0 ... + */ + pmac_low_i2c_setmode(pmac_tb_clock_chip_host, pmac_low_i2c_mode_combined); + rc = pmac_low_i2c_xfer(pmac_tb_clock_chip_host, + 0xd0 | pmac_low_i2c_read, + 0x81, &data, 1); + if (rc != 0) + goto bail; + + data = (data & 0xf3) | (freeze ? 0x00 : 0x0c); + + pmac_low_i2c_setmode(pmac_tb_clock_chip_host, pmac_low_i2c_mode_stdsub); + rc = pmac_low_i2c_xfer(pmac_tb_clock_chip_host, + 0xd0 | pmac_low_i2c_write, + 0x81, &data, 1); + + bail: + if (rc != 0) { + printk("Cypress Timebase %s rc: %d\n", + freeze ? "freeze" : "unfreeze", rc); + panic("Timebase freeze failed !\n"); + } +} + +static void smp_core99_pulsar_tb_freeze(int freeze) +{ + u8 data; + int rc; + + /* Strangely, the device-tree says address is 0xd2, but darwin + * accesses 0xd0 ... + */ + pmac_low_i2c_setmode(pmac_tb_clock_chip_host, pmac_low_i2c_mode_combined); + rc = pmac_low_i2c_xfer(pmac_tb_clock_chip_host, + 0xd4 | pmac_low_i2c_read, + 0x2e, &data, 1); + if (rc != 0) + goto bail; + + data = (data & 0x88) | (freeze ? 0x11 : 0x22); + + pmac_low_i2c_setmode(pmac_tb_clock_chip_host, pmac_low_i2c_mode_stdsub); + rc = pmac_low_i2c_xfer(pmac_tb_clock_chip_host, + 0xd4 | pmac_low_i2c_write, + 0x2e, &data, 1); + bail: + if (rc != 0) { + printk(KERN_ERR "Pulsar Timebase %s rc: %d\n", + freeze ? "freeze" : "unfreeze", rc); + panic("Timebase freeze failed !\n"); + } +} + + +static void smp_core99_give_timebase(void) +{ + /* Open i2c bus for synchronous access */ + if (pmac_low_i2c_open(pmac_tb_clock_chip_host, 0)) + panic("Can't open i2c for TB sync !\n"); + + spin_lock(&timebase_lock); + (*pmac_tb_freeze)(1); + mb(); + timebase = get_tb(); + spin_unlock(&timebase_lock); + + while (timebase) + barrier(); + + spin_lock(&timebase_lock); + (*pmac_tb_freeze)(0); + spin_unlock(&timebase_lock); + + /* Close i2c bus */ + pmac_low_i2c_close(pmac_tb_clock_chip_host); +} + + +static void __devinit smp_core99_take_timebase(void) +{ + while (!timebase) + barrier(); + spin_lock(&timebase_lock); + set_tb(timebase >> 32, timebase & 0xffffffff); + timebase = 0; + spin_unlock(&timebase_lock); +} + + static int __init smp_core99_probe(void) { - struct device_node *cpus; - int ncpus = 1; + struct device_node *cpus; + struct device_node *cc; + int ncpus = 0; /* Maybe use systemconfiguration here ? */ if (ppc_md.progress) ppc_md.progress("smp_core99_probe", 0x345); - cpus = find_type_devices("cpu"); - if (cpus == NULL) - return 0; - while ((cpus = cpus->next) != NULL) + /* Count CPUs in the device-tree */ + for (cpus = NULL; (cpus = of_find_node_by_type(cpus, "cpu")) != NULL;) ++ncpus; printk(KERN_INFO "PowerMac SMP probe found %d cpus\n", ncpus); - if (ncpus > 1) - openpic_request_IPIs(); + /* Nothing more to do if less than 2 of them */ + if (ncpus <= 1) + return 1; + + /* Look for the clock chip */ + for (cc = NULL; (cc = of_find_node_by_name(cc, "i2c-hwclock")) != NULL;) { + struct device_node *p = of_get_parent(cc); + u32 *reg; + int ok; + ok = p && device_is_compatible(p, "uni-n-i2c"); + if (!ok) + goto next; + reg = (u32 *)get_property(cc, "reg", NULL); + if (reg == NULL) + goto next; + switch (*reg) { + case 0xd2: + pmac_tb_freeze = smp_core99_cypress_tb_freeze; + printk(KERN_INFO "Timebase clock is Cypress chip\n"); + break; + case 0xd4: + pmac_tb_freeze = smp_core99_pulsar_tb_freeze; + printk(KERN_INFO "Timebase clock is Pulsar chip\n"); + break; + } + if (pmac_tb_freeze != NULL) { + pmac_tb_clock_chip_host = p; + smp_ops->give_timebase = smp_core99_give_timebase; + smp_ops->take_timebase = smp_core99_take_timebase; + break; + } + next: + of_node_put(p); + } + + mpic_request_ipis(); return ncpus; } static void __init smp_core99_kick_cpu(int nr) { - int save_vector; + int save_vector, j; unsigned long new_vector; unsigned long flags; volatile unsigned int *vector @@ -102,15 +243,16 @@ * b .pmac_secondary_start - KERNELBASE */ switch(nr) { - case 1: - new_vector = (unsigned long)pmac_secondary_start_1; - break; - case 2: - new_vector = (unsigned long)pmac_secondary_start_2; - break; - case 3: - new_vector = (unsigned long)pmac_secondary_start_3; - break; + case 1: + new_vector = (unsigned long)pmac_secondary_start_1; + break; + case 2: + new_vector = (unsigned long)pmac_secondary_start_2; + break; + case 3: + default: + new_vector = (unsigned long)pmac_secondary_start_3; + break; } *vector = 0x48000002 + (new_vector - KERNELBASE); @@ -126,7 +268,8 @@ * ideally, all that crap will be done in prom.c and the CPU left * in a RAM-based wait loop like CHRP. */ - mdelay(1); + for (j = 1; j < 1000000; j++) + mb(); /* Restore our exception vector */ *vector = save_vector; @@ -138,8 +281,8 @@ static void __init smp_core99_setup_cpu(int cpu_nr) { - /* Setup openpic */ - do_openpic_setup_cpu(); + /* Setup MPIC */ + mpic_setup_this_cpu(); if (cpu_nr == 0) { extern void g5_phy_disable_cpu1(void); @@ -149,15 +292,12 @@ */ if (num_online_cpus() < 2) g5_phy_disable_cpu1(); - if (ppc_md.progress) ppc_md.progress("core99_setup_cpu 0 done", 0x349); + if (ppc_md.progress) ppc_md.progress("smp_core99_setup_cpu 0 done", 0x349); } } -extern void smp_generic_give_timebase(void); -extern void smp_generic_take_timebase(void); - struct smp_ops_t core99_smp_ops __pmacdata = { - .message_pass = smp_openpic_message_pass, + .message_pass = smp_mpic_message_pass, .probe = smp_core99_probe, .kick_cpu = smp_core99_kick_cpu, .setup_cpu = smp_core99_setup_cpu, diff -Nru a/arch/ppc64/kernel/proc_ppc64.c b/arch/ppc64/kernel/proc_ppc64.c --- a/arch/ppc64/kernel/proc_ppc64.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc64/kernel/proc_ppc64.c 2004-11-10 17:19:05 -08:00 @@ -33,7 +33,8 @@ #include static loff_t page_map_seek( struct file *file, loff_t off, int whence); -static ssize_t page_map_read( struct file *file, char *buf, size_t nbytes, loff_t *ppos); +static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, + loff_t *ppos); static int page_map_mmap( struct file *file, struct vm_area_struct *vma ); static struct file_operations page_map_fops = { @@ -161,7 +162,8 @@ return (file->f_pos = new); } -static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) +static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, + loff_t *ppos) { struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size); @@ -208,7 +210,8 @@ * whole nodes along with their properties. Operations on individual * properties are not implemented (yet). */ -static ssize_t ofdt_write(struct file *file, const char __user *buf, size_t count, loff_t *off) +static ssize_t ofdt_write(struct file *file, const char __user *buf, size_t count, + loff_t *off) { int rv = 0; char *kbuf; @@ -302,7 +305,8 @@ return rv; } -static struct property *new_property(const char *name, const int length, const unsigned char *value, struct property *last) +static struct property *new_property(const char *name, const int length, + const unsigned char *value, struct property *last) { struct property *new = kmalloc(sizeof(*new), GFP_KERNEL); @@ -343,7 +347,8 @@ * this function does no allocation or copying of the data. Return value * is set to the next name in buf, or NULL on error. */ -static char * parse_next_property(char *buf, char *end, char **name, int *length, unsigned char **value) +static char * parse_next_property(char *buf, char *end, char **name, int *length, + unsigned char **value) { char *tmp; @@ -351,13 +356,15 @@ tmp = strchr(buf, ' '); if (!tmp) { - printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__); + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); return NULL; } *tmp = '\0'; if (++tmp >= end) { - printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__); + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); return NULL; } @@ -365,11 +372,13 @@ *length = -1; *length = simple_strtoul(tmp, &tmp, 10); if (*length == -1) { - printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__); + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); return NULL; } if (*tmp != ' ' || ++tmp >= end) { - printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__); + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); return NULL; } @@ -377,11 +386,13 @@ *value = tmp; tmp += *length; if (tmp > end) { - printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__); + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); return NULL; } else if (tmp < end && *tmp != ' ' && *tmp != '\0') { - printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__); + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); return NULL; } tmp++; diff -Nru a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c --- a/arch/ppc64/kernel/prom.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc64/kernel/prom.c 2004-11-10 17:19:05 -08:00 @@ -52,7 +52,6 @@ #include #include #include -#include "open_pic.h" #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -1092,8 +1091,7 @@ * Work out the sense (active-low level / active-high edge) * of each interrupt from the device tree. */ -void __init -prom_get_irq_senses(unsigned char *senses, int off, int max) +void __init prom_get_irq_senses(unsigned char *senses, int off, int max) { struct device_node *np; int i, j; @@ -1105,7 +1103,9 @@ for (j = 0; j < np->n_intrs; j++) { i = np->intrs[j].line; if (i >= off && i < max) - senses[i-off] = np->intrs[j].sense; + senses[i-off] = np->intrs[j].sense ? + IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE : + IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE; } } } @@ -1740,7 +1740,7 @@ if (strcmp(node->name, "pci") == 0 && get_property(node, "ibm,dma-window", NULL)) { node->bussubno = node->busno; - iommu_devnode_init(node); + iommu_devnode_init_pSeries(node); } else node->iommu_table = parent->iommu_table; #endif /* CONFIG_PPC_PSERIES */ @@ -1802,6 +1802,15 @@ } /* + * Prepare an OF node for removal from system + */ +static void of_cleanup_node(struct device_node *np) +{ + if (np->iommu_table && get_property(np, "ibm,dma-window", NULL)) + iommu_free_table(np); +} + +/* * Remove an OF device node from the system. * Caller should have already "gotten" np. */ @@ -1817,6 +1826,8 @@ of_node_put(child); return -EBUSY; } + + of_cleanup_node(np); write_lock(&devtree_lock); OF_MARK_STALE(np); diff -Nru a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c --- a/arch/ppc64/kernel/prom_init.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc64/kernel/prom_init.c 2004-11-10 17:19:06 -08:00 @@ -51,7 +51,6 @@ #include #include #include -#include "open_pic.h" #ifdef CONFIG_LOGO_LINUX_CLUT224 #include @@ -160,8 +159,6 @@ extern unsigned long klimit; -//int global_width = 640, global_height = 480, global_depth = 8, global_pitch; -//unsigned global_address; /* prom structure */ static struct prom_t __initdata prom; @@ -706,46 +703,50 @@ struct prom_t *_prom = PTRRELOC(&prom); phandle prom_rtas; u64 base, entry = 0; - u32 size; + u32 size = 0; prom_debug("prom_instantiate_rtas: start...\n"); prom_rtas = call_prom("finddevice", 1, 1, ADDR("/rtas")); - if (prom_rtas != (phandle) -1) { - prom_getprop(prom_rtas, "rtas-size", &size, sizeof(size)); - if (size != 0) { - base = alloc_down(size, PAGE_SIZE, 0); - if (base == 0) { - prom_printf("RTAS allocation failed !\n"); - return; - } - prom_printf("instantiating rtas at 0x%x", base); + prom_debug("prom_rtas: %x\n", prom_rtas); + if (prom_rtas == (phandle) -1) + return; - prom_rtas = call_prom("open", 1, 1, ADDR("/rtas")); - prom_printf("..."); + prom_getprop(prom_rtas, "rtas-size", &size, sizeof(size)); + if (size == 0) + return; - if (call_prom("call-method", 3, 2, - ADDR("instantiate-rtas"), - prom_rtas, base) != PROM_ERROR) { - entry = (long)_prom->args.rets[1]; - } - if (entry == 0) { - prom_printf(" failed\n"); - return; - } - prom_printf(" done\n"); + base = alloc_down(size, PAGE_SIZE, 0); + if (base == 0) { + prom_printf("RTAS allocation failed !\n"); + return; + } + prom_printf("instantiating rtas at 0x%x", base); - reserve_mem(base, size); - } + prom_rtas = call_prom("open", 1, 1, ADDR("/rtas")); + prom_printf("..."); - prom_setprop(_prom->chosen, "linux,rtas-base", &base, sizeof(base)); - prom_setprop(_prom->chosen, "linux,rtas-entry", &entry, sizeof(entry)); - prom_setprop(_prom->chosen, "linux,rtas-size", &size, sizeof(size)); - - prom_debug("rtas base = 0x%x\n", base); - prom_debug("rtas entry = 0x%x\n", entry); - prom_debug("rtas size = 0x%x\n", (long)size); + if (call_prom("call-method", 3, 2, + ADDR("instantiate-rtas"), + prom_rtas, base) != PROM_ERROR) { + entry = (long)_prom->args.rets[1]; } + if (entry == 0) { + prom_printf(" failed\n"); + return; + } + prom_printf(" done\n"); + + reserve_mem(base, size); + + prom_setprop(_prom->chosen, "linux,rtas-base", &base, sizeof(base)); + prom_setprop(_prom->chosen, "linux,rtas-entry", &entry, sizeof(entry)); + prom_setprop(_prom->chosen, "linux,rtas-size", &size, sizeof(size)); + + prom_debug("rtas base = 0x%x\n", base); + prom_debug("rtas entry = 0x%x\n", entry); + prom_debug("rtas size = 0x%x\n", (long)size); + prom_debug("prom_instantiate_rtas: end...\n"); } @@ -952,9 +953,9 @@ continue; /* Skip non-configured cpus. */ - prom_getprop(node, "status", type, sizeof(type)); - if (strcmp(type, RELOC("okay")) != 0) - continue; + if (prom_getprop(node, "status", type, sizeof(type)) > 0) + if (strcmp(type, RELOC("okay")) != 0) + continue; reg = -1; prom_getprop(node, "reg", ®, sizeof(reg)); @@ -994,7 +995,8 @@ secondary_hold, cpuid); for ( i = 0 ; (i < 100000000) && - (*acknowledge == ((unsigned long)-1)); i++ ) ; + (*acknowledge == ((unsigned long)-1)); i++ ) + mb(); if (*acknowledge == cpuid) { prom_printf("done\n"); @@ -1130,6 +1132,8 @@ if (strstr(p, RELOC("Power Macintosh")) || strstr(p, RELOC("MacRISC4"))) return PLATFORM_POWERMAC; + if (strstr(p, RELOC("Momentum,Maple"))) + return PLATFORM_MAPLE; i += sl + 1; } } @@ -1161,7 +1165,7 @@ * So we check whether we will need to open the display, * and if so, open it now. */ -static unsigned long __init prom_check_displays(void) +static void __init prom_check_displays(void) { unsigned long offset = reloc_offset(); struct prom_t *_prom = PTRRELOC(&prom); diff -Nru a/arch/ppc64/kernel/rtas.c b/arch/ppc64/kernel/rtas.c --- a/arch/ppc64/kernel/rtas.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/rtas.c 2004-11-10 17:19:02 -08:00 @@ -516,7 +516,6 @@ return 0; } -#ifdef CONFIG_HOTPLUG_CPU /* This version can't take the spinlock, because it never returns */ struct rtas_args rtas_stop_self_args = { @@ -541,7 +540,6 @@ panic("Alas, I survived.\n"); } -#endif /* CONFIG_HOTPLUG_CPU */ /* * Return the firmware-specified size of the error log buffer diff -Nru a/arch/ppc64/kernel/rtas_flash.c b/arch/ppc64/kernel/rtas_flash.c --- a/arch/ppc64/kernel/rtas_flash.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc64/kernel/rtas_flash.c 2004-11-10 17:19:06 -08:00 @@ -562,6 +562,7 @@ validate_flash(args_buf); } + /* The matching atomic_inc was in rtas_excl_open() */ atomic_dec(&dp->count); return 0; @@ -572,7 +573,8 @@ if (dp) { if (dp->data != NULL) kfree(dp->data); - remove_proc_entry(dp->name, NULL); + dp->owner = NULL; + remove_proc_entry(dp->name, dp->parent); } } diff -Nru a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c --- a/arch/ppc64/kernel/rtasd.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc64/kernel/rtasd.c 2004-11-10 17:19:03 -08:00 @@ -275,7 +275,7 @@ * know that we can safely clear the events in NVRAM. * Next we'll sit and wait for something else to log. */ -static ssize_t rtas_log_read(struct file * file, char * buf, +static ssize_t rtas_log_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { int error; diff -Nru a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c --- a/arch/ppc64/kernel/setup.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc64/kernel/setup.c 2004-11-10 17:19:04 -08:00 @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include #include #include @@ -51,6 +53,7 @@ #include #include #include +#include #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -72,11 +75,14 @@ extern void udbg_init_pmac_realmode(void); /* That's RTAS panel debug */ extern void call_rtas_display_status_delay(unsigned char c); +/* Here's maple real mode debug */ +extern void udbg_init_maple_realmode(void); #define EARLY_DEBUG_INIT() do {} while(0) #if 0 #define EARLY_DEBUG_INIT() udbg_init_debug_lpar() +#define EARLY_DEBUG_INIT() udbg_init_maple_realmode() #define EARLY_DEBUG_INIT() udbg_init_pmac_realmode() #define EARLY_DEBUG_INIT() \ do { ppc_md.udbg_putc = call_rtas_display_status_delay; } while(0) @@ -323,6 +329,7 @@ extern struct machdep_calls pSeries_md; extern struct machdep_calls pmac_md; +extern struct machdep_calls maple_md; /* Ultimately, stuff them in an elf section like initcalls... */ static struct machdep_calls __initdata *machines[] = { @@ -332,6 +339,9 @@ #ifdef CONFIG_PPC_PMAC &pmac_md, #endif /* CONFIG_PPC_PMAC */ +#ifdef CONFIG_PPC_MAPLE + &maple_md, +#endif /* CONFIG_PPC_MAPLE */ NULL }; @@ -630,6 +640,7 @@ printk("naca->debug_switch = 0x%lx\n", naca->debug_switch); printk("naca->interrupt_controller = 0x%ld\n", naca->interrupt_controller); printk("systemcfg = 0x%p\n", systemcfg); + printk("systemcfg->platform = 0x%x\n", systemcfg->platform); printk("systemcfg->processorCount = 0x%lx\n", systemcfg->processorCount); printk("systemcfg->physicalMemorySize = 0x%lx\n", systemcfg->physicalMemorySize); printk("systemcfg->dCacheL1LineSize = 0x%x\n", systemcfg->dCacheL1LineSize); @@ -783,12 +794,11 @@ #ifdef CONFIG_PPC_MULTIPLATFORM static int __init set_preferred_console(void) { - struct device_node *prom_stdout; + struct device_node *prom_stdout = NULL; char *name; + u32 *spd; int offset = 0; -#if 0 - phandle *stdout_ph; -#endif + DBG(" -> set_preferred_console()\n"); /* The user has requested a console so this is already set up. */ @@ -802,20 +812,7 @@ return -ENODEV; } /* We are getting a weird phandle from OF ... */ -#if 0 - stdout_ph = (phandle *)get_property(of_chosen, "linux,stdout-package", NULL); - if (stdout_ph == NULL) { - DBG(" no linux,stdout-package !\n"); - return -ENODEV; - } - prom_stdout = of_find_node_by_phandle(*stdout_ph); - if (!prom_stdout) { - DBG(" can't find stdout package for phandle 0x%x !\n", *stdout_ph); - return -ENODEV; - } -#endif /* ... So use the full path instead */ -#if 1 name = (char *)get_property(of_chosen, "linux,stdout-path", NULL); if (name == NULL) { DBG(" no linux,stdout-path !\n"); @@ -826,7 +823,6 @@ DBG(" can't find stdout package %s !\n", name); return -ENODEV; } -#endif DBG("stdout is %s\n", prom_stdout->full_name); name = (char *)get_property(prom_stdout, "name", NULL); @@ -834,8 +830,12 @@ DBG(" stdout package has no name !\n"); goto not_found; } + spd = (u32 *)get_property(prom_stdout, "current-speed", NULL); - if (strcmp(name, "serial") == 0) { + if (0) + ; +#ifdef CONFIG_SERIAL_8250_CONSOLE + else if (strcmp(name, "serial") == 0) { int i; u32 *reg = (u32 *)get_property(prom_stdout, "reg", &i); if (i > 8) { @@ -858,6 +858,7 @@ } } } +#endif /* CONFIG_SERIAL_8250_CONSOLE */ #ifdef CONFIG_PPC_PSERIES else if (strcmp(name, "vty") == 0) { u32 *reg = (u32 *)get_property(prom_stdout, "reg", NULL); @@ -887,17 +888,24 @@ } } #endif /* CONFIG_PPC_PSERIES */ +#ifdef CONFIG_SERIAL_PMACZILOG_CONSOLE else if (strcmp(name, "ch-a") == 0) offset = 0; else if (strcmp(name, "ch-b") == 0) offset = 1; +#endif /* CONFIG_SERIAL_PMACZILOG_CONSOLE */ else goto not_found; of_node_put(prom_stdout); DBG("Found serial console at ttyS%d\n", offset); - return add_preferred_console("ttyS", offset, NULL); + if (spd) { + static char __initdata opt[16]; + sprintf(opt, "%d", *spd); + return add_preferred_console("ttyS", offset, opt); + } else + return add_preferred_console("ttyS", offset, NULL); not_found: DBG("No preferred console found !\n"); @@ -1106,15 +1114,210 @@ __setup("decr_overclock_proc0=", set_decr_overclock_proc0 ); __setup("decr_overclock=", set_decr_overclock ); +#ifndef CONFIG_PPC_ISERIES +/* + * This function can be used by platforms to "find" legacy serial ports. + * It works for "serial" nodes under an "isa" node, and will try to + * respect the "ibm,aix-loc" property if any. It works with up to 8 + * ports. + */ + +#define MAX_LEGACY_SERIAL_PORTS 8 +static struct plat_serial8250_port serial_ports[MAX_LEGACY_SERIAL_PORTS+1]; +static unsigned int old_serial_count; + +void __init generic_find_legacy_serial_ports(unsigned int *default_speed) +{ + struct device_node *np; + u32 *sizeprop; + + struct isa_reg_property { + u32 space; + u32 address; + u32 size; + }; + struct pci_reg_property { + struct pci_address addr; + u32 size_hi; + u32 size_lo; + }; + + DBG(" -> generic_find_legacy_serial_port()\n"); + + naca->serialPortAddr = 0; + if (default_speed) + *default_speed = 0; + + np = of_find_node_by_path("/"); + if (!np) + return; + + /* First fill our array */ + for (np = NULL; (np = of_find_node_by_type(np, "serial"));) { + struct device_node *isa, *pci; + struct isa_reg_property *reg; + unsigned long phys_size, addr_size, io_base; + u32 *rangesp; + u32 *interrupts, *clk, *spd; + char *typep; + int index, rlen, rentsize; + + /* Ok, first check if it's under an "isa" parent */ + isa = of_get_parent(np); + if (!isa || strcmp(isa->name, "isa")) { + DBG("%s: no isa parent found\n", np->full_name); + continue; + } + + /* Now look for an "ibm,aix-loc" property that gives us ordering + * if any... + */ + typep = (char *)get_property(np, "ibm,aix-loc", NULL); + + /* Get the ISA port number */ + reg = (struct isa_reg_property *)get_property(np, "reg", NULL); + if (reg == NULL) + goto next_port; + /* We assume the interrupt number isn't translated ... */ + interrupts = (u32 *)get_property(np, "interrupts", NULL); + /* get clock freq. if present */ + clk = (u32 *)get_property(np, "clock-frequency", NULL); + /* get default speed if present */ + spd = (u32 *)get_property(np, "current-speed", NULL); + /* Default to locate at end of array */ + index = old_serial_count; /* end of the array by default */ + + /* If we have a location index, then use it */ + if (typep && *typep == 'S') { + index = simple_strtol(typep+1, NULL, 0) - 1; + /* if index is out of range, use end of array instead */ + if (index >= MAX_LEGACY_SERIAL_PORTS) + index = old_serial_count; + /* if our index is still out of range, that mean that + * array is full, we could scan for a free slot but that + * make little sense to bother, just skip the port + */ + if (index >= MAX_LEGACY_SERIAL_PORTS) + goto next_port; + if (index >= old_serial_count) + old_serial_count = index + 1; + /* Check if there is a port who already claimed our slot */ + if (serial_ports[index].iobase != 0) { + /* if we still have some room, move it, else override */ + if (old_serial_count < MAX_LEGACY_SERIAL_PORTS) { + DBG("Moved legacy port %d -> %d\n", index, + old_serial_count); + serial_ports[old_serial_count++] = + serial_ports[index]; + } else { + DBG("Replacing legacy port %d\n", index); + } + } + } + if (index >= MAX_LEGACY_SERIAL_PORTS) + goto next_port; + if (index >= old_serial_count) + old_serial_count = index + 1; + + /* Now fill the entry */ + memset(&serial_ports[index], 0, sizeof(struct plat_serial8250_port)); + serial_ports[index].uartclk = clk ? *clk : BASE_BAUD * 16; + serial_ports[index].iobase = reg->address; + serial_ports[index].irq = interrupts ? interrupts[0] : 0; + serial_ports[index].flags = ASYNC_BOOT_AUTOCONF; + + DBG("Added legacy port, index: %d, port: %x, irq: %d, clk: %d\n", + index, + serial_ports[index].iobase, + serial_ports[index].irq, + serial_ports[index].uartclk); + + /* Get phys address of IO reg for port 1 */ + if (index != 0) + goto next_port; + + pci = of_get_parent(isa); + if (!pci) { + DBG("%s: no pci parent found\n", np->full_name); + goto next_port; + } + + rangesp = (u32 *)get_property(pci, "ranges", &rlen); + if (rangesp == NULL) { + of_node_put(pci); + goto next_port; + } + rlen /= 4; + + /* we need the #size-cells of the PCI bridge node itself */ + phys_size = 1; + sizeprop = (u32 *)get_property(pci, "#size-cells", NULL); + if (sizeprop != NULL) + phys_size = *sizeprop; + /* we need the parent #addr-cells */ + addr_size = prom_n_addr_cells(pci); + rentsize = 3 + addr_size + phys_size; + io_base = 0; + for (;rlen >= rentsize; rlen -= rentsize,rangesp += rentsize) { + if (((rangesp[0] >> 24) & 0x3) != 1) + continue; /* not IO space */ + io_base = rangesp[3]; + if (addr_size == 2) + io_base = (io_base << 32) | rangesp[4]; + } + if (io_base != 0) { + naca->serialPortAddr = io_base + reg->address; + if (default_speed && spd) + *default_speed = *spd; + } + of_node_put(pci); + next_port: + of_node_put(isa); + } + + DBG(" <- generic_find_legacy_serial_port()\n"); +} + +static struct platform_device serial_device = { + .name = "serial8250", + .id = 0, + .dev = { + .platform_data = serial_ports, + }, +}; + +static int __init serial_dev_init(void) +{ + return platform_device_register(&serial_device); +} +arch_initcall(serial_dev_init); + +#endif /* CONFIG_PPC_ISERIES */ + +int check_legacy_ioport(unsigned long base_port) +{ + if (ppc_md.check_legacy_ioport == NULL) + return 0; + return ppc_md.check_legacy_ioport(base_port); +} +EXPORT_SYMBOL(check_legacy_ioport); + #ifdef CONFIG_XMON static int __init early_xmon(char *p) { /* ensure xmon is enabled */ xmon_init(); - debugger(0); + debugger(NULL); return 0; } early_param("xmon", early_xmon); #endif +void cpu_die(void) +{ + if (ppc_md.cpu_die) + ppc_md.cpu_die(); + local_irq_disable(); + for (;;); +} diff -Nru a/arch/ppc64/kernel/signal.c b/arch/ppc64/kernel/signal.c --- a/arch/ppc64/kernel/signal.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/signal.c 2004-11-10 17:19:02 -08:00 @@ -224,8 +224,12 @@ #endif /* CONFIG_ALTIVEC */ #ifndef CONFIG_SMP - last_task_used_math = NULL; - last_task_used_altivec = NULL; + preempt_disable(); + if (last_task_used_math == current) + last_task_used_math = NULL; + if (last_task_used_altivec == current) + last_task_used_altivec = NULL; + preempt_enable(); #endif /* Force reload of FP/VEC */ regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC); diff -Nru a/arch/ppc64/kernel/signal32.c b/arch/ppc64/kernel/signal32.c --- a/arch/ppc64/kernel/signal32.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc64/kernel/signal32.c 2004-11-10 17:19:06 -08:00 @@ -235,8 +235,12 @@ #endif /* CONFIG_ALTIVEC */ #ifndef CONFIG_SMP - last_task_used_math = NULL; - last_task_used_altivec = NULL; + preempt_disable(); + if (last_task_used_math == current) + last_task_used_math = NULL; + if (last_task_used_altivec == current) + last_task_used_altivec = NULL; + preempt_enable(); #endif return 0; } diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c --- a/arch/ppc64/kernel/smp.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc64/kernel/smp.c 2004-11-10 17:19:05 -08:00 @@ -43,18 +43,14 @@ #include #include #include -#include -#include -#include #include #include -#include "open_pic.h" #include -#include #include #include -#include -#include +#include + +#include "mpic.h" #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -88,113 +84,9 @@ /* Low level assembly function used to backup CPU 0 state */ extern void __save_cpu_setup(void); -extern void pseries_secondary_smp_init(unsigned long); - -#ifdef CONFIG_PPC_ISERIES -static unsigned long iSeries_smp_message[NR_CPUS]; - -void iSeries_smp_message_recv( struct pt_regs * regs ) -{ - int cpu = smp_processor_id(); - int msg; - - if ( num_online_cpus() < 2 ) - return; - - for ( msg = 0; msg < 4; ++msg ) - if ( test_and_clear_bit( msg, &iSeries_smp_message[cpu] ) ) - smp_message_recv( msg, regs ); -} - -static inline void smp_iSeries_do_message(int cpu, int msg) -{ - set_bit(msg, &iSeries_smp_message[cpu]); - HvCall_sendIPI(&(paca[cpu])); -} - -static void smp_iSeries_message_pass(int target, int msg) -{ - int i; - - if (target < NR_CPUS) - smp_iSeries_do_message(target, msg); - else { - for_each_online_cpu(i) { - if (target == MSG_ALL_BUT_SELF - && i == smp_processor_id()) - continue; - smp_iSeries_do_message(i, msg); - } - } -} - -static int smp_iSeries_numProcs(void) -{ - unsigned np, i; - - np = 0; - for (i=0; i < NR_CPUS; ++i) { - if (paca[i].lppaca.xDynProcStatus < 2) { - cpu_set(i, cpu_possible_map); - cpu_set(i, cpu_present_map); - ++np; - } - } - return np; -} - -static int smp_iSeries_probe(void) -{ - unsigned i; - unsigned np = 0; - - for (i=0; i < NR_CPUS; ++i) { - if (paca[i].lppaca.xDynProcStatus < 2) { - /*paca[i].active = 1;*/ - ++np; - } - } - - return np; -} - -static void smp_iSeries_kick_cpu(int nr) -{ - BUG_ON(nr < 0 || nr >= NR_CPUS); - - /* Verify that our partition has a processor nr */ - if (paca[nr].lppaca.xDynProcStatus >= 2) - return; - - /* The processor is currently spinning, waiting - * for the cpu_start field to become non-zero - * After we set cpu_start, the processor will - * continue on to secondary_start in iSeries_head.S - */ - paca[nr].cpu_start = 1; -} - -static void __devinit smp_iSeries_setup_cpu(int nr) -{ -} - -static struct smp_ops_t iSeries_smp_ops = { - .message_pass = smp_iSeries_message_pass, - .probe = smp_iSeries_probe, - .kick_cpu = smp_iSeries_kick_cpu, - .setup_cpu = smp_iSeries_setup_cpu, -}; - -/* This is called very early. */ -void __init smp_init_iSeries(void) -{ - smp_ops = &iSeries_smp_ops; - systemcfg->processorCount = smp_iSeries_numProcs(); -} -#endif #ifdef CONFIG_PPC_MULTIPLATFORM -void smp_openpic_message_pass(int target, int msg) +void smp_mpic_message_pass(int target, int msg) { /* make sure we're sending something that translates to an IPI */ if ( msg > 0x3 ){ @@ -205,242 +97,52 @@ switch ( target ) { case MSG_ALL: - openpic_cause_IPI(msg, 0xffffffff); + mpic_send_ipi(msg, 0xffffffff); break; case MSG_ALL_BUT_SELF: - openpic_cause_IPI(msg, - 0xffffffff & ~(1 << smp_processor_id())); + mpic_send_ipi(msg, 0xffffffff & ~(1 << smp_processor_id())); break; default: - openpic_cause_IPI(msg, 1< 1) - openpic_request_IPIs(); + mpic_request_ipis(); return nr_cpus; } -static void __devinit smp_openpic_setup_cpu(int cpu) -{ - do_openpic_setup_cpu(); -} - -#endif /* CONFIG_PPC_MULTIPLATFORM */ - -#ifdef CONFIG_PPC_PSERIES - -/* Get state of physical CPU. - * Return codes: - * 0 - The processor is in the RTAS stopped state - * 1 - stop-self is in progress - * 2 - The processor is not in the RTAS stopped state - * -1 - Hardware Error - * -2 - Hardware Busy, Try again later. - */ -int query_cpu_stopped(unsigned int pcpu) -{ - int cpu_status; - int status, qcss_tok; - - DBG(" -> query_cpu_stopped(%d)\n", pcpu); - qcss_tok = rtas_token("query-cpu-stopped-state"); - if (qcss_tok == RTAS_UNKNOWN_SERVICE) - return -1; - status = rtas_call(qcss_tok, 1, 2, &cpu_status, pcpu); - if (status != 0) { - printk(KERN_ERR - "RTAS query-cpu-stopped-state failed: %i\n", status); - return status; - } - - DBG(" <- query_cpu_stopped(), status: %d\n", cpu_status); - - return cpu_status; -} - -#ifdef CONFIG_HOTPLUG_CPU - -int __cpu_disable(void) +void __devinit smp_mpic_setup_cpu(int cpu) { - /* FIXME: go put this in a header somewhere */ - extern void xics_migrate_irqs_away(void); - - systemcfg->processorCount--; - - /*fix boot_cpuid here*/ - if (smp_processor_id() == boot_cpuid) - boot_cpuid = any_online_cpu(cpu_online_map); - - /* FIXME: abstract this to not be platform specific later on */ - xics_migrate_irqs_away(); - return 0; + mpic_setup_this_cpu(); } -void __cpu_die(unsigned int cpu) -{ - int tries; - int cpu_status; - unsigned int pcpu = get_hard_smp_processor_id(cpu); - - for (tries = 0; tries < 25; tries++) { - cpu_status = query_cpu_stopped(pcpu); - if (cpu_status == 0 || cpu_status == -1) - break; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/5); - } - if (cpu_status != 0) { - printk("Querying DEAD? cpu %i (%i) shows %i\n", - cpu, pcpu, cpu_status); - } - - /* Isolation and deallocation are definatly done by - * drslot_chrp_cpu. If they were not they would be - * done here. Change isolate state to Isolate and - * change allocation-state to Unusable. - */ - paca[cpu].cpu_start = 0; - - /* So we can recognize if it fails to come up next time. */ - cpu_callin_map[cpu] = 0; -} - -/* Kill this cpu */ -void cpu_die(void) -{ - local_irq_disable(); - /* Some hardware requires clearing the CPPR, while other hardware does not - * it is safe either way - */ - pSeriesLP_cppr_info(0, 0); - rtas_stop_self(); - /* Should never get here... */ - BUG(); - for(;;); -} - -/* Search all cpu device nodes for an offline logical cpu. If a - * device node has a "ibm,my-drc-index" property (meaning this is an - * LPAR), paranoid-check whether we own the cpu. For each "thread" - * of a cpu, if it is offline and has the same hw index as before, - * grab that in preference. - */ -static unsigned int find_physical_cpu_to_start(unsigned int old_hwindex) -{ - struct device_node *np = NULL; - unsigned int best = -1U; - - while ((np = of_find_node_by_type(np, "cpu"))) { - int nr_threads, len; - u32 *index = (u32 *)get_property(np, "ibm,my-drc-index", NULL); - u32 *tid = (u32 *) - get_property(np, "ibm,ppc-interrupt-server#s", &len); - - if (!tid) - tid = (u32 *)get_property(np, "reg", &len); - - if (!tid) - continue; - - /* If there is a drc-index, make sure that we own - * the cpu. - */ - if (index) { - int state; - int rc = rtas_get_sensor(9003, *index, &state); - if (rc != 0 || state != 1) - continue; - } - - nr_threads = len / sizeof(u32); - - while (nr_threads--) { - if (0 == query_cpu_stopped(tid[nr_threads])) { - best = tid[nr_threads]; - if (best == old_hwindex) - goto out; - } - } - } -out: - of_node_put(np); - return best; -} - -/** - * smp_startup_cpu() - start the given cpu - * - * At boot time, there is nothing to do. At run-time, call RTAS with - * the appropriate start location, if the cpu is in the RTAS stopped - * state. - * - * Returns: - * 0 - failure - * 1 - success - */ -static inline int __devinit smp_startup_cpu(unsigned int lcpu) -{ - int status; - unsigned long start_here = __pa((u32)*((unsigned long *) - pseries_secondary_smp_init)); - unsigned int pcpu; - - /* At boot time the cpus are already spinning in hold - * loops, so nothing to do. */ - if (system_state < SYSTEM_RUNNING) - return 1; - - pcpu = find_physical_cpu_to_start(get_hard_smp_processor_id(lcpu)); - if (pcpu == -1U) { - printk(KERN_INFO "No more cpus available, failing\n"); - return 0; - } - - /* Fixup atomic count: it exited inside IRQ handler. */ - paca[lcpu].__current->thread_info->preempt_count = 0; - - /* At boot this is done in prom.c. */ - paca[lcpu].hw_cpu_id = pcpu; - - status = rtas_call(rtas_token("start-cpu"), 3, 1, NULL, - pcpu, start_here, lcpu); - if (status != 0) { - printk(KERN_ERR "start-cpu failed: %i\n", status); - return 0; - } - return 1; -} -#else /* ... CONFIG_HOTPLUG_CPU */ -static inline int __devinit smp_startup_cpu(unsigned int lcpu) -{ - return 1; -} -#endif /* CONFIG_HOTPLUG_CPU */ - -static void smp_pSeries_kick_cpu(int nr) +void __devinit smp_generic_kick_cpu(int nr) { BUG_ON(nr < 0 || nr >= NR_CPUS); - if (!smp_startup_cpu(nr)) - return; - /* * The processor is currently spinning, waiting for the * cpu_start field to become non-zero After we set cpu_start, * the processor will continue on to secondary_start */ paca[nr].cpu_start = 1; + mb(); } -#endif /* CONFIG_PPC_PSERIES */ + +#endif /* CONFIG_PPC_MULTIPLATFORM */ static void __init smp_space_timers(unsigned int max_cpus) { @@ -457,136 +159,6 @@ } } -#ifdef CONFIG_PPC_PSERIES -static void vpa_init(int cpu) -{ - unsigned long flags, pcpu = get_hard_smp_processor_id(cpu); - - /* Register the Virtual Processor Area (VPA) */ - flags = 1UL << (63 - 18); - register_vpa(flags, pcpu, __pa((unsigned long)&(paca[cpu].lppaca))); -} - -static inline void smp_xics_do_message(int cpu, int msg) -{ - set_bit(msg, &xics_ipi_message[cpu].value); - mb(); - xics_cause_IPI(cpu); -} - -static void smp_xics_message_pass(int target, int msg) -{ - unsigned int i; - - if (target < NR_CPUS) { - smp_xics_do_message(target, msg); - } else { - for_each_online_cpu(i) { - if (target == MSG_ALL_BUT_SELF - && i == smp_processor_id()) - continue; - smp_xics_do_message(i, msg); - } - } -} - -extern void xics_request_IPIs(void); - -static int __init smp_xics_probe(void) -{ -#ifdef CONFIG_SMP - xics_request_IPIs(); -#endif - - return cpus_weight(cpu_possible_map); -} - -static void __devinit smp_xics_setup_cpu(int cpu) -{ - if (cpu != boot_cpuid) - xics_setup_cpu(); -} - -static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED; -static unsigned long timebase = 0; - -static void __devinit pSeries_give_timebase(void) -{ - spin_lock(&timebase_lock); - rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL); - timebase = get_tb(); - spin_unlock(&timebase_lock); - - while (timebase) - barrier(); - rtas_call(rtas_token("thaw-time-base"), 0, 1, NULL); -} - -static void __devinit pSeries_take_timebase(void) -{ - while (!timebase) - barrier(); - spin_lock(&timebase_lock); - set_tb(timebase >> 32, timebase & 0xffffffff); - timebase = 0; - spin_unlock(&timebase_lock); -} - -static struct smp_ops_t pSeries_openpic_smp_ops = { - .message_pass = smp_openpic_message_pass, - .probe = smp_openpic_probe, - .kick_cpu = smp_pSeries_kick_cpu, - .setup_cpu = smp_openpic_setup_cpu, -}; - -static struct smp_ops_t pSeries_xics_smp_ops = { - .message_pass = smp_xics_message_pass, - .probe = smp_xics_probe, - .kick_cpu = smp_pSeries_kick_cpu, - .setup_cpu = smp_xics_setup_cpu, -}; - -/* This is called very early */ -void __init smp_init_pSeries(void) -{ - int ret, i; - - DBG(" -> smp_init_pSeries()\n"); - - if (naca->interrupt_controller == IC_OPEN_PIC) - smp_ops = &pSeries_openpic_smp_ops; - else - smp_ops = &pSeries_xics_smp_ops; - - /* Start secondary threads on SMT systems; primary threads - * are already in the running state. - */ - for_each_present_cpu(i) { - if (query_cpu_stopped(get_hard_smp_processor_id(i)) == 0) { - printk("%16.16x : starting thread\n", i); - DBG("%16.16x : starting thread\n", i); - rtas_call(rtas_token("start-cpu"), 3, 1, &ret, - get_hard_smp_processor_id(i), - __pa((u32)*((unsigned long *) - pseries_secondary_smp_init)), - i); - } - } - - if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) - vpa_init(boot_cpuid); - - /* Non-lpar has additional take/give timebase */ - if (systemcfg->platform == PLATFORM_PSERIES) { - smp_ops->give_timebase = pSeries_give_timebase; - smp_ops->take_timebase = pSeries_take_timebase; - } - - - DBG(" <- smp_init_pSeries()\n"); -} -#endif /* CONFIG_PPC_PSERIES */ - void smp_local_timer_interrupt(struct pt_regs * regs) { update_process_times(user_mode(regs)); @@ -809,6 +381,8 @@ { unsigned int cpu; + DBG("smp_prepare_cpus\n"); + /* * setup_cpu may need to be called on the boot cpu. We havent * spun any cpus up but lets be paranoid. @@ -833,9 +407,6 @@ max_cpus = smp_ops->probe(); - /* Backup CPU 0 state if necessary */ - __save_cpu_setup(); - smp_space_timers(max_cpus); for_each_cpu(cpu) @@ -876,6 +447,11 @@ paca[cpu].stab_real = virt_to_abs(tmp); } + /* Make sure callin-map entry is 0 (can be leftover a CPU + * hotplug + */ + cpu_callin_map[cpu] = 0; + /* The information for processor bringup must * be written out to main store before we release * the processor. @@ -883,6 +459,7 @@ mb(); /* wake up cpus */ + DBG("smp: kicking cpu %d\n", cpu); smp_ops->kick_cpu(cpu); /* @@ -922,7 +499,7 @@ return 0; } -extern unsigned int default_distrib_server; + /* Activate a secondary processor. */ int __devinit start_secondary(void *unused) { @@ -939,20 +516,8 @@ if (smp_ops->take_timebase) smp_ops->take_timebase(); -#ifdef CONFIG_PPC_PSERIES - if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { - vpa_init(cpu); - } - -#ifdef CONFIG_IRQ_ALL_CPUS - /* Put the calling processor into the GIQ. This is really only - * necessary from a secondary thread as the OF start-cpu interface - * performs this function for us on primary threads. - */ - /* TODO: 9005 is #defined in rtas-proc.c -- move to a header */ - rtas_set_indicator(9005, default_distrib_server, 1); -#endif -#endif + if (smp_ops->late_setup_cpu) + smp_ops->late_setup_cpu(cpu); spin_lock(&call_lock); cpu_set(cpu, cpu_online_map); diff -Nru a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c --- a/arch/ppc64/kernel/sys_ppc32.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc64/kernel/sys_ppc32.c 2004-11-10 17:19:05 -08:00 @@ -1328,3 +1328,21 @@ return err; } + +asmlinkage long sys32_add_key(const char __user *_type, + const char __user *_description, + const void __user *_payload, + u32 plen, + u32 ringid) +{ + return sys_add_key(_type, _description, _payload, plen, ringid); +} + +asmlinkage long sys32_request_key(const char __user *_type, + const char __user *_description, + const char __user *_callout_info, + u32 destringid) +{ + return sys_request_key(_type, _description, _callout_info, destringid); +} + diff -Nru a/arch/ppc64/kernel/u3_iommu.c b/arch/ppc64/kernel/u3_iommu.c --- a/arch/ppc64/kernel/u3_iommu.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc64/kernel/u3_iommu.c 2004-11-10 17:19:07 -08:00 @@ -267,6 +267,7 @@ void iommu_setup_u3(void) { + struct pci_controller *phb, *tmp; struct pci_dev *dev = NULL; struct device_node *dn; @@ -290,7 +291,7 @@ /* We only have one iommu table on the mac for now, which makes * things simple. Setup all PCI devices to point to this table */ - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { + for_each_pci_dev(dev) { /* We must use pci_device_to_OF_node() to make sure that * we get the real "final" pointer to the device in the * pci_dev sysdata and not the temporary PHB one @@ -298,6 +299,11 @@ struct device_node *dn = pci_device_to_OF_node(dev); if (dn) dn->iommu_table = &iommu_table_u3; + } + /* We also make sure we set all PHBs ... */ + list_for_each_entry_safe(phb, tmp, &hose_list, list_node) { + dn = (struct device_node *)phb->arch_data; + dn->iommu_table = &iommu_table_u3; } } diff -Nru a/arch/ppc64/kernel/udbg.c b/arch/ppc64/kernel/udbg.c --- a/arch/ppc64/kernel/udbg.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/udbg.c 2004-11-10 17:19:02 -08:00 @@ -11,6 +11,8 @@ #include #define WANT_PPCDBG_TAB /* Only defined here */ +#include +#include #include #include #include @@ -20,6 +22,9 @@ #include #include +extern u8 real_readb(volatile u8 __iomem *addr); +extern void real_writeb(u8 data, volatile u8 __iomem *addr); + struct NS16550 { /* this struct must be packed */ unsigned char rbr; /* 0 */ @@ -47,21 +52,36 @@ #define LSR_TEMT 0x40 /* Xmitter empty */ #define LSR_ERR 0x80 /* Error */ -static volatile struct NS16550 *udbg_comport; +static volatile struct NS16550 __iomem *udbg_comport; -void udbg_init_uart(void *comport) +void udbg_init_uart(void __iomem *comport, unsigned int speed) { + u8 dll = 12; + + switch(speed) { + case 115200: + dll = 1; + break; + case 57600: + dll = 2; + break; + case 38400: + dll = 3; + break; + } if (comport) { - udbg_comport = (struct NS16550 *)comport; - udbg_comport->lcr = 0x00; eieio(); - udbg_comport->ier = 0xFF; eieio(); - udbg_comport->ier = 0x00; eieio(); - udbg_comport->lcr = 0x80; eieio(); /* Access baud rate */ - udbg_comport->dll = 12; eieio(); /* 1 = 115200, 2 = 57600, 3 = 38400, 12 = 9600 baud */ - udbg_comport->dlm = 0; eieio(); /* dll >> 8 which should be zero for fast rates; */ - udbg_comport->lcr = 0x03; eieio(); /* 8 data, 1 stop, no parity */ - udbg_comport->mcr = 0x03; eieio(); /* RTS/DTR */ - udbg_comport->fcr = 0x07; eieio(); /* Clear & enable FIFOs */ + udbg_comport = (struct NS16550 __iomem *)comport; + out_8(&udbg_comport->lcr, 0x00); + out_8(&udbg_comport->ier, 0xff); + out_8(&udbg_comport->ier, 0x00); + out_8(&udbg_comport->lcr, 0x80); /* Access baud rate */ + out_8(&udbg_comport->dll, dll); /* 1 = 115200, 2 = 57600, + 3 = 38400, 12 = 9600 baud */ + out_8(&udbg_comport->dlm, 0x00); /* dll >> 8 which should be zero + for fast rates; */ + out_8(&udbg_comport->lcr, 0x03); /* 8 data, 1 stop, no parity */ + out_8(&udbg_comport->mcr, 0x03); /* RTS/DTR */ + out_8(&udbg_comport->fcr ,0x07); /* Clear & enable FIFOs */ } } @@ -70,7 +90,8 @@ #define SCC_TXRDY 4 #define SCC_RXRDY 1 -static volatile u8 *sccc, *sccd; +static volatile u8 __iomem *sccc; +static volatile u8 __iomem *sccd; static unsigned char scc_inittab[] = { 13, 0, /* set baud rate divisor */ @@ -109,7 +130,7 @@ /* Setup for 57600 8N1 */ addr += 0x20; - sccc = (volatile u8 *) ioremap(addr & PAGE_MASK, PAGE_SIZE) ; + sccc = (volatile u8 * __iomem) ioremap(addr & PAGE_MASK, PAGE_SIZE) ; sccc += addr & ~PAGE_MASK; sccd = sccc + 0x10; @@ -117,13 +138,11 @@ mb(); for (i = 20000; i != 0; --i) - x = *sccc; eieio(); - *sccc = 9; eieio(); /* reset A or B side */ - *sccc = 0xc0; eieio(); - for (i = 0; i < sizeof(scc_inittab); ++i) { - *sccc = scc_inittab[i]; - eieio(); - } + x = in_8(sccc); + out_8(sccc, 0x09); /* reset A or B side */ + out_8(sccc, 0xc0); + for (i = 0; i < sizeof(scc_inittab); ++i) + out_8(sccc, scc_inittab[i]); ppc_md.udbg_putc = udbg_putc; ppc_md.udbg_getc = udbg_getc; @@ -135,9 +154,6 @@ #endif /* CONFIG_PPC_PMAC */ #if CONFIG_PPC_PMAC -extern u8 real_readb(volatile u8 *addr); -extern void real_writeb(u8 data, volatile u8 *addr); - static void udbg_real_putc(unsigned char c) { while ((real_readb(sccc) & SCC_TXRDY) == 0) @@ -149,8 +165,8 @@ void udbg_init_pmac_realmode(void) { - sccc = (volatile u8 *)0x80013020ul; - sccd = (volatile u8 *)0x80013030ul; + sccc = (volatile u8 __iomem *)0x80013020ul; + sccd = (volatile u8 __iomem *)0x80013030ul; ppc_md.udbg_putc = udbg_real_putc; ppc_md.udbg_getc = NULL; @@ -158,25 +174,50 @@ } #endif /* CONFIG_PPC_PMAC */ -void udbg_putc(unsigned char c) +#ifdef CONFIG_PPC_MAPLE +void udbg_maple_real_putc(unsigned char c) { if (udbg_comport) { - while ((udbg_comport->lsr & LSR_THRE) == 0) + while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) /* wait for idle */; - udbg_comport->thr = c; eieio(); + real_writeb(c, &udbg_comport->thr); eieio(); if (c == '\n') { /* Also put a CR. This is for convenience. */ - while ((udbg_comport->lsr & LSR_THRE) == 0) + while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) /* wait for idle */; - udbg_comport->thr = '\r'; eieio(); + real_writeb('\r', &udbg_comport->thr); eieio(); + } + } +} + +void udbg_init_maple_realmode(void) +{ + udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8; + + ppc_md.udbg_putc = udbg_maple_real_putc; + ppc_md.udbg_getc = NULL; + ppc_md.udbg_getc_poll = NULL; +} +#endif /* CONFIG_PPC_MAPLE */ + +void udbg_putc(unsigned char c) +{ + if (udbg_comport) { + while ((in_8(&udbg_comport->lsr) & LSR_THRE) == 0) + /* wait for idle */; + out_8(&udbg_comport->thr, c); + if (c == '\n') { + /* Also put a CR. This is for convenience. */ + while ((in_8(&udbg_comport->lsr) & LSR_THRE) == 0) + /* wait for idle */; + out_8(&udbg_comport->thr, '\r'); } } #ifdef CONFIG_PPC_PMAC else if (sccc) { - while ((*sccc & SCC_TXRDY) == 0) - eieio(); - *sccd = c; - eieio(); + while ((in_8(sccc) & SCC_TXRDY) == 0) + ; + out_8(sccd, c); if (c == '\n') udbg_putc('\r'); } @@ -186,16 +227,15 @@ int udbg_getc_poll(void) { if (udbg_comport) { - if ((udbg_comport->lsr & LSR_DR) != 0) - return udbg_comport->rbr; + if ((in_8(&udbg_comport->lsr) & LSR_DR) != 0) + return in_8(&udbg_comport->rbr); else return -1; } #ifdef CONFIG_PPC_PMAC else if (sccc) { - eieio(); - if ((*sccc & SCC_RXRDY) != 0) - return *sccd; + if ((in_8(sccc) & SCC_RXRDY) != 0) + return in_8(sccd); else return -1; } @@ -206,16 +246,15 @@ unsigned char udbg_getc(void) { if (udbg_comport) { - while ((udbg_comport->lsr & LSR_DR) == 0) + while ((in_8(&udbg_comport->lsr) & LSR_DR) == 0) /* wait for char */; - return udbg_comport->rbr; + return in_8(&udbg_comport->rbr); } #ifdef CONFIG_PPC_PMAC else if (sccc) { - eieio(); - while ((*sccc & SCC_RXRDY) == 0) - eieio(); - return *sccd; + while ((in_8(sccc) & SCC_RXRDY) == 0) + ; + return in_8(sccd); } #endif /* CONFIG_PPC_PMAC */ return 0; diff -Nru a/arch/ppc64/kernel/vecemu.c b/arch/ppc64/kernel/vecemu.c --- a/arch/ppc64/kernel/vecemu.c 2004-11-10 17:19:02 -08:00 +++ b/arch/ppc64/kernel/vecemu.c 2004-11-10 17:19:02 -08:00 @@ -263,7 +263,7 @@ unsigned int va, vb, vc, vd; vector128 *vrs; - if (get_user(instr, (unsigned int *) regs->nip)) + if (get_user(instr, (unsigned int __user *) regs->nip)) return -EFAULT; if ((instr >> 26) != 4) return -EINVAL; /* not an altivec instruction */ diff -Nru a/arch/ppc64/kernel/vio.c b/arch/ppc64/kernel/vio.c --- a/arch/ppc64/kernel/vio.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc64/kernel/vio.c 2004-11-10 17:19:03 -08:00 @@ -521,24 +521,7 @@ newTceTable = (struct iommu_table *) kmalloc(sizeof(struct iommu_table), GFP_KERNEL); - /* RPA docs say that #address-cells is always 1 for virtual - devices, but some older boxes' OF returns 2. This should - be removed by GA, unless there is legacy OFs that still - have 2 for #address-cells */ - size = ((dma_window[1+vio_num_address_cells] >> PAGE_SHIFT) << 3) - >> PAGE_SHIFT; - - /* This is just an ugly kludge. Remove as soon as the OF for all - machines actually follow the spec and encodes the offset field - as phys-encode (that is, #address-cells wide)*/ - if (dma_window_property_size == 12) { - size = ((dma_window[1] >> PAGE_SHIFT) << 3) >> PAGE_SHIFT; - } else if (dma_window_property_size == 20) { - size = ((dma_window[4] >> PAGE_SHIFT) << 3) >> PAGE_SHIFT; - } else { - printk(KERN_WARNING "vio_build_iommu_table: Invalid size of ibm,my-dma-window=%i, using 0x80 for size\n", dma_window_property_size); - size = 0x80; - } + size = ((dma_window[4] >> PAGE_SHIFT) << 3) >> PAGE_SHIFT; /* There should be some code to extract the phys-encoded offset using prom_n_addr_cells(). However, according to a comment diff -Nru a/arch/ppc64/kernel/xics.c b/arch/ppc64/kernel/xics.c --- a/arch/ppc64/kernel/xics.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc64/kernel/xics.c 2004-11-10 17:19:04 -08:00 @@ -85,7 +85,7 @@ } qirr; }; -static struct xics_ipl *xics_per_cpu[NR_CPUS]; +static struct xics_ipl __iomem *xics_per_cpu[NR_CPUS]; static int xics_irq_8259_cascade = 0; static int xics_irq_8259_cascade_real = 0; @@ -116,22 +116,22 @@ static int pSeries_xirr_info_get(int n_cpu) { - return xics_per_cpu[n_cpu]->xirr.word; + return in_be32(&xics_per_cpu[n_cpu]->xirr.word); } static void pSeries_xirr_info_set(int n_cpu, int value) { - xics_per_cpu[n_cpu]->xirr.word = value; + out_be32(&xics_per_cpu[n_cpu]->xirr.word, value); } static void pSeries_cppr_info(int n_cpu, u8 value) { - xics_per_cpu[n_cpu]->xirr.bytes[0] = value; + out_8(&xics_per_cpu[n_cpu]->xirr.bytes[0], value); } static void pSeries_qirr_info(int n_cpu, u8 value) { - xics_per_cpu[n_cpu]->qirr.bytes[0] = value; + out_8(&xics_per_cpu[n_cpu]->qirr.bytes[0], value); } static xics_ops pSeries_ops = { @@ -457,7 +457,7 @@ struct xics_interrupt_node { unsigned long addr; unsigned long size; - } inodes[NR_CPUS]; + } intnodes[NR_CPUS]; ppc64_boot_msg(0x20, "XICS Init"); @@ -484,13 +484,13 @@ panic("xics_init_IRQ: can't find interrupt reg property"); while (ilen) { - inodes[indx].addr = (unsigned long long)*ireg++ << 32; + intnodes[indx].addr = (unsigned long)*ireg++ << 32; ilen -= sizeof(uint); - inodes[indx].addr |= *ireg++; + intnodes[indx].addr |= *ireg++; ilen -= sizeof(uint); - inodes[indx].size = (unsigned long long)*ireg++ << 32; + intnodes[indx].size = (unsigned long)*ireg++ << 32; ilen -= sizeof(uint); - inodes[indx].size |= *ireg++; + intnodes[indx].size |= *ireg++; ilen -= sizeof(uint); indx++; if (indx >= NR_CPUS) break; @@ -505,7 +505,8 @@ np = of_find_node_by_type(np, "cpu")) { ireg = (uint *)get_property(np, "reg", &ilen); if (ireg && ireg[0] == hard_smp_processor_id()) { - ireg = (uint *)get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen); + ireg = (uint *)get_property(np, "ibm,ppc-interrupt-gserver#s", + &ilen); i = ilen / sizeof(int); if (ireg && i > 0) { default_server = ireg[0]; @@ -516,8 +517,8 @@ } of_node_put(np); - intr_base = inodes[0].addr; - intr_size = (ulong)inodes[0].size; + intr_base = intnodes[0].addr; + intr_size = intnodes[0].size; np = of_find_node_by_type(NULL, "interrupt-controller"); if (!np) { @@ -538,16 +539,18 @@ if (systemcfg->platform == PLATFORM_PSERIES) { #ifdef CONFIG_SMP for_each_cpu(i) { + int hard_id; + /* FIXME: Do this dynamically! --RR */ if (!cpu_present(i)) continue; - xics_per_cpu[i] = __ioremap((ulong)inodes[get_hard_smp_processor_id(i)].addr, - (ulong)inodes[get_hard_smp_processor_id(i)].size, - _PAGE_NO_CACHE); + + hard_id = get_hard_smp_processor_id(i); + xics_per_cpu[i] = ioremap(intnodes[hard_id].addr, + intnodes[hard_id].size); } #else - xics_per_cpu[0] = __ioremap((ulong)intr_base, intr_size, - _PAGE_NO_CACHE); + xics_per_cpu[0] = ioremap(intr_base, intr_size); #endif /* CONFIG_SMP */ } else if (systemcfg->platform == PLATFORM_PSERIES_LPAR) { ops = &pSeriesLP_ops; @@ -578,7 +581,7 @@ no_action, 0, "8259 cascade", NULL)) printk(KERN_ERR "xics_setup_i8259: couldn't get 8259 " "cascade\n"); - i8259_init(); + i8259_init(0); } return 0; } diff -Nru a/arch/ppc64/lib/dec_and_lock.c b/arch/ppc64/lib/dec_and_lock.c --- a/arch/ppc64/lib/dec_and_lock.c 2004-11-10 17:19:03 -08:00 +++ b/arch/ppc64/lib/dec_and_lock.c 2004-11-10 17:19:03 -08:00 @@ -28,7 +28,7 @@ */ #ifndef ATOMIC_DEC_AND_LOCK -int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) +int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) { int counter; int newcount; @@ -51,5 +51,5 @@ return 0; } -EXPORT_SYMBOL(atomic_dec_and_lock); +EXPORT_SYMBOL(_atomic_dec_and_lock); #endif /* ATOMIC_DEC_AND_LOCK */ diff -Nru a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c --- a/arch/ppc64/mm/hash_utils.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc64/mm/hash_utils.c 2004-11-10 17:19:05 -08:00 @@ -341,9 +341,7 @@ int local) { unsigned long vsid, vpn, va, hash, secondary, slot; - - /* XXX fix for large ptes */ - unsigned long large = 0; + unsigned long huge = pte_huge(pte); if ((ea >= USER_START) && (ea <= USER_END)) vsid = get_vsid(context, ea); @@ -351,18 +349,18 @@ vsid = get_kernel_vsid(ea); va = (vsid << 28) | (ea & 0x0fffffff); - if (large) + if (huge) vpn = va >> HPAGE_SHIFT; else vpn = va >> PAGE_SHIFT; - hash = hpt_hash(vpn, large); + hash = hpt_hash(vpn, huge); secondary = (pte_val(pte) & _PAGE_SECONDARY) >> 15; if (secondary) hash = ~hash; slot = (hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP; slot += (pte_val(pte) & _PAGE_GROUP_IX) >> 12; - ppc_md.hpte_invalidate(slot, va, large, local); + ppc_md.hpte_invalidate(slot, va, huge, local); } void flush_hash_range(unsigned long context, unsigned long number, int local) @@ -401,7 +399,7 @@ info.si_signo = SIGBUS; info.si_errno = 0; info.si_code = BUS_ADRERR; - info.si_addr = (void *)address; + info.si_addr = (void __user *)address; force_sig_info(SIGBUS, &info, current); return; } diff -Nru a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c --- a/arch/ppc64/mm/hugetlbpage.c 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc64/mm/hugetlbpage.c 2004-11-10 17:19:04 -08:00 @@ -27,116 +27,143 @@ #include -/* HugePTE layout: - * - * 31 30 ... 15 14 13 12 10 9 8 7 6 5 4 3 2 1 0 - * PFN>>12..... - - - - - - HASH_IX.... 2ND HASH RW - HG=1 - */ +#define HUGEPGDIR_SHIFT (HPAGE_SHIFT + PAGE_SHIFT - 3) +#define HUGEPGDIR_SIZE (1UL << HUGEPGDIR_SHIFT) +#define HUGEPGDIR_MASK (~(HUGEPGDIR_SIZE-1)) + +#define HUGEPTE_INDEX_SIZE 9 +#define HUGEPGD_INDEX_SIZE 10 + +#define PTRS_PER_HUGEPTE (1 << HUGEPTE_INDEX_SIZE) +#define PTRS_PER_HUGEPGD (1 << HUGEPGD_INDEX_SIZE) -#define HUGEPTE_SHIFT 15 -#define _HUGEPAGE_PFN 0xffff8000 -#define _HUGEPAGE_BAD 0x00007f00 -#define _HUGEPAGE_HASHPTE 0x00000008 -#define _HUGEPAGE_SECONDARY 0x00000010 -#define _HUGEPAGE_GROUP_IX 0x000000e0 -#define _HUGEPAGE_HPTEFLAGS (_HUGEPAGE_HASHPTE | _HUGEPAGE_SECONDARY | \ - _HUGEPAGE_GROUP_IX) -#define _HUGEPAGE_RW 0x00000004 - -typedef struct {unsigned int val;} hugepte_t; -#define hugepte_val(hugepte) ((hugepte).val) -#define __hugepte(x) ((hugepte_t) { (x) } ) -#define hugepte_pfn(x) \ - ((unsigned long)(hugepte_val(x)>>HUGEPTE_SHIFT) << HUGETLB_PAGE_ORDER) -#define mk_hugepte(page,wr) __hugepte( \ - ((page_to_pfn(page)>>HUGETLB_PAGE_ORDER) << HUGEPTE_SHIFT ) \ - | (!!(wr) * _HUGEPAGE_RW) | _PMD_HUGEPAGE ) - -#define hugepte_bad(x) ( !(hugepte_val(x) & _PMD_HUGEPAGE) || \ - (hugepte_val(x) & _HUGEPAGE_BAD) ) -#define hugepte_page(x) pfn_to_page(hugepte_pfn(x)) -#define hugepte_none(x) (!(hugepte_val(x) & _HUGEPAGE_PFN)) - - -static void flush_hash_hugepage(mm_context_t context, unsigned long ea, - hugepte_t pte, int local); - -static inline unsigned int hugepte_update(hugepte_t *p, unsigned int clr, - unsigned int set) -{ - unsigned int old, tmp; - - __asm__ __volatile__( - "1: lwarx %0,0,%3 # pte_update\n\ - andc %1,%0,%4 \n\ - or %1,%1,%5 \n\ - stwcx. %1,0,%3 \n\ - bne- 1b" - : "=&r" (old), "=&r" (tmp), "=m" (*p) - : "r" (p), "r" (clr), "r" (set), "m" (*p) - : "cc" ); - return old; +static inline int hugepgd_index(unsigned long addr) +{ + return (addr & ~REGION_MASK) >> HUGEPGDIR_SHIFT; } -static inline void set_hugepte(hugepte_t *ptep, hugepte_t pte) +static pgd_t *hugepgd_offset(struct mm_struct *mm, unsigned long addr) { - hugepte_update(ptep, ~_HUGEPAGE_HPTEFLAGS, - hugepte_val(pte) & ~_HUGEPAGE_HPTEFLAGS); + int index; + + if (! mm->context.huge_pgdir) + return NULL; + + + index = hugepgd_index(addr); + BUG_ON(index >= PTRS_PER_HUGEPGD); + return mm->context.huge_pgdir + index; } -static hugepte_t *hugepte_alloc(struct mm_struct *mm, unsigned long addr) +static inline pte_t *hugepte_offset(pgd_t *dir, unsigned long addr) { - pgd_t *pgd; - pmd_t *pmd = NULL; + int index; - BUG_ON(!in_hugepage_area(mm->context, addr)); + if (pgd_none(*dir)) + return NULL; - pgd = pgd_offset(mm, addr); - pmd = pmd_alloc(mm, pgd, addr); + index = (addr >> HPAGE_SHIFT) % PTRS_PER_HUGEPTE; + return (pte_t *)pgd_page(*dir) + index; +} - /* We shouldn't find a (normal) PTE page pointer here */ - BUG_ON(!pmd_none(*pmd) && !pmd_hugepage(*pmd)); - - return (hugepte_t *)pmd; +static pgd_t *hugepgd_alloc(struct mm_struct *mm, unsigned long addr) +{ + BUG_ON(! in_hugepage_area(mm->context, addr)); + + if (! mm->context.huge_pgdir) { + pgd_t *new; + spin_unlock(&mm->page_table_lock); + /* Don't use pgd_alloc(), because we want __GFP_REPEAT */ + new = kmem_cache_alloc(zero_cache, GFP_KERNEL | __GFP_REPEAT); + BUG_ON(memcmp(new, empty_zero_page, PAGE_SIZE)); + spin_lock(&mm->page_table_lock); + + /* + * Because we dropped the lock, we should re-check the + * entry, as somebody else could have populated it.. + */ + if (mm->context.huge_pgdir) + pgd_free(new); + else + mm->context.huge_pgdir = new; + } + return hugepgd_offset(mm, addr); } -static hugepte_t *hugepte_offset(struct mm_struct *mm, unsigned long addr) +static pte_t *hugepte_alloc(struct mm_struct *mm, pgd_t *dir, + unsigned long addr) { - pgd_t *pgd; - pmd_t *pmd = NULL; + if (! pgd_present(*dir)) { + pte_t *new; - BUG_ON(!in_hugepage_area(mm->context, addr)); + spin_unlock(&mm->page_table_lock); + new = kmem_cache_alloc(zero_cache, GFP_KERNEL | __GFP_REPEAT); + BUG_ON(memcmp(new, empty_zero_page, PAGE_SIZE)); + spin_lock(&mm->page_table_lock); + /* + * Because we dropped the lock, we should re-check the + * entry, as somebody else could have populated it.. + */ + if (pgd_present(*dir)) { + if (new) + kmem_cache_free(zero_cache, new); + } else { + struct page *ptepage; - pgd = pgd_offset(mm, addr); - if (pgd_none(*pgd)) - return NULL; + if (! new) + return NULL; + ptepage = virt_to_page(new); + ptepage->mapping = (void *) mm; + ptepage->index = addr & HUGEPGDIR_MASK; + pgd_populate(mm, dir, new); + } + } - pmd = pmd_offset(pgd, addr); + return hugepte_offset(dir, addr); +} + +static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) +{ + pgd_t *pgd; - /* We shouldn't find a (normal) PTE page pointer here */ - BUG_ON(!pmd_none(*pmd) && !pmd_hugepage(*pmd)); + BUG_ON(! in_hugepage_area(mm->context, addr)); - return (hugepte_t *)pmd; + pgd = hugepgd_offset(mm, addr); + if (! pgd) + return NULL; + + return hugepte_offset(pgd, addr); } -static void setup_huge_pte(struct mm_struct *mm, struct page *page, - hugepte_t *ptep, int write_access) +static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) { - hugepte_t entry; - int i; + pgd_t *pgd; - mm->rss += (HPAGE_SIZE / PAGE_SIZE); - entry = mk_hugepte(page, write_access); - for (i = 0; i < HUGEPTE_BATCH_SIZE; i++) - set_hugepte(ptep+i, entry); + BUG_ON(! in_hugepage_area(mm->context, addr)); + + pgd = hugepgd_alloc(mm, addr); + if (! pgd) + return NULL; + + return hugepte_alloc(mm, pgd, addr); } -static void teardown_huge_pte(hugepte_t *ptep) +static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma, + struct page *page, pte_t *ptep, int write_access) { - int i; + pte_t entry; - for (i = 0; i < HUGEPTE_BATCH_SIZE; i++) - pmd_clear((pmd_t *)(ptep+i)); + mm->rss += (HPAGE_SIZE / PAGE_SIZE); + if (write_access) { + entry = + pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); + } else { + entry = pte_wrprotect(mk_pte(page, vma->vm_page_prot)); + } + entry = pte_mkyoung(entry); + entry = pte_mkhuge(entry); + + set_pte(ptep, entry); } /* @@ -249,7 +276,7 @@ { if (within_hugepage_high_range(addr, len)) return 0; - else if ((addr < 0x100000000) && ((addr+len) < 0x100000000)) { + else if ((addr < 0x100000000UL) && ((addr+len) < 0x100000000UL)) { int err; /* Yes, we need both tests, in case addr+len overflows * 64-bit arithmetic */ @@ -268,34 +295,31 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, struct vm_area_struct *vma) { - hugepte_t *src_pte, *dst_pte, entry; + pte_t *src_pte, *dst_pte, entry; struct page *ptepage; unsigned long addr = vma->vm_start; unsigned long end = vma->vm_end; + int err = -ENOMEM; while (addr < end) { - BUG_ON(! in_hugepage_area(src->context, addr)); - BUG_ON(! in_hugepage_area(dst->context, addr)); - - dst_pte = hugepte_alloc(dst, addr); + dst_pte = huge_pte_alloc(dst, addr); if (!dst_pte) - return -ENOMEM; + goto out; - src_pte = hugepte_offset(src, addr); + src_pte = huge_pte_offset(src, addr); entry = *src_pte; - if ((addr % HPAGE_SIZE) == 0) { - /* This is the first hugepte in a batch */ - ptepage = hugepte_page(entry); - get_page(ptepage); - dst->rss += (HPAGE_SIZE / PAGE_SIZE); - } - set_hugepte(dst_pte, entry); - + ptepage = pte_page(entry); + get_page(ptepage); + dst->rss += (HPAGE_SIZE / PAGE_SIZE); + set_pte(dst_pte, entry); - addr += PMD_SIZE; + addr += HPAGE_SIZE; } - return 0; + + err = 0; + out: + return err; } int @@ -310,18 +334,16 @@ vpfn = vaddr/PAGE_SIZE; while (vaddr < vma->vm_end && remainder) { - BUG_ON(!in_hugepage_area(mm->context, vaddr)); - if (pages) { - hugepte_t *pte; + pte_t *pte; struct page *page; - pte = hugepte_offset(mm, vaddr); + pte = huge_pte_offset(mm, vaddr); /* hugetlb should be locked, and hence, prefaulted */ - WARN_ON(!pte || hugepte_none(*pte)); + WARN_ON(!pte || pte_none(*pte)); - page = &hugepte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)]; + page = &pte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)]; WARN_ON(!PageCompound(page)); @@ -347,26 +369,31 @@ struct page * follow_huge_addr(struct mm_struct *mm, unsigned long address, int write) { - return ERR_PTR(-EINVAL); + pte_t *ptep; + struct page *page; + + if (! in_hugepage_area(mm->context, address)) + return ERR_PTR(-EINVAL); + + ptep = huge_pte_offset(mm, address); + page = pte_page(*ptep); + if (page) + page += (address % HPAGE_SIZE) / PAGE_SIZE; + + return page; } int pmd_huge(pmd_t pmd) { - return pmd_hugepage(pmd); + return 0; } struct page * follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int write) { - struct page *page; - - BUG_ON(! pmd_hugepage(*pmd)); - - page = hugepte_page(*(hugepte_t *)pmd); - if (page) - page += ((address & ~HPAGE_MASK) >> PAGE_SHIFT); - return page; + BUG(); + return NULL; } void unmap_hugepage_range(struct vm_area_struct *vma, @@ -374,44 +401,38 @@ { struct mm_struct *mm = vma->vm_mm; unsigned long addr; - hugepte_t *ptep; + pte_t *ptep; struct page *page; - int cpu; - int local = 0; - cpumask_t tmp; WARN_ON(!is_vm_hugetlb_page(vma)); BUG_ON((start % HPAGE_SIZE) != 0); BUG_ON((end % HPAGE_SIZE) != 0); - /* XXX are there races with checking cpu_vm_mask? - Anton */ - cpu = get_cpu(); - tmp = cpumask_of_cpu(cpu); - if (cpus_equal(vma->vm_mm->cpu_vm_mask, tmp)) - local = 1; - for (addr = start; addr < end; addr += HPAGE_SIZE) { - hugepte_t pte; - - BUG_ON(!in_hugepage_area(mm->context, addr)); + pte_t pte; - ptep = hugepte_offset(mm, addr); - if (!ptep || hugepte_none(*ptep)) + ptep = huge_pte_offset(mm, addr); + if (!ptep || pte_none(*ptep)) continue; pte = *ptep; - page = hugepte_page(pte); - teardown_huge_pte(ptep); - - if (hugepte_val(pte) & _HUGEPAGE_HASHPTE) - flush_hash_hugepage(mm->context, addr, - pte, local); + page = pte_page(pte); + pte_clear(ptep); put_page(page); } - put_cpu(); - mm->rss -= (end - start) >> PAGE_SHIFT; + flush_tlb_pending(); +} + +void hugetlb_free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *prev, + unsigned long start, unsigned long end) +{ + /* Because the huge pgtables are only 2 level, they can take + * at most around 4M, much less than one hugepage which the + * process is presumably entitled to use. So we don't bother + * freeing up the pagetables on unmap, and wait until + * destroy_context() to clean up the lot. */ } int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma) @@ -427,16 +448,14 @@ spin_lock(&mm->page_table_lock); for (addr = vma->vm_start; addr < vma->vm_end; addr += HPAGE_SIZE) { unsigned long idx; - hugepte_t *pte = hugepte_alloc(mm, addr); + pte_t *pte = huge_pte_alloc(mm, addr); struct page *page; - BUG_ON(!in_hugepage_area(mm->context, addr)); - if (!pte) { ret = -ENOMEM; goto out; } - if (!hugepte_none(*pte)) + if (! pte_none(*pte)) continue; idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) @@ -463,7 +482,7 @@ goto out; } } - setup_huge_pte(mm, page, pte, vma->vm_flags & VM_WRITE); + set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE); } out: spin_unlock(&mm->page_table_lock); @@ -717,20 +736,55 @@ } } +void hugetlb_mm_free_pgd(struct mm_struct *mm) +{ + int i; + pgd_t *pgdir; + + spin_lock(&mm->page_table_lock); + + pgdir = mm->context.huge_pgdir; + if (! pgdir) + return; + + mm->context.huge_pgdir = NULL; + + /* cleanup any hugepte pages leftover */ + for (i = 0; i < PTRS_PER_HUGEPGD; i++) { + pgd_t *pgd = pgdir + i; + + if (! pgd_none(*pgd)) { + pte_t *pte = (pte_t *)pgd_page(*pgd); + struct page *ptepage = virt_to_page(pte); + + ptepage->mapping = NULL; + + BUG_ON(memcmp(pte, empty_zero_page, PAGE_SIZE)); + kmem_cache_free(zero_cache, pte); + } + pgd_clear(pgd); + } + + BUG_ON(memcmp(pgdir, empty_zero_page, PAGE_SIZE)); + kmem_cache_free(zero_cache, pgdir); + + spin_unlock(&mm->page_table_lock); +} + int hash_huge_page(struct mm_struct *mm, unsigned long access, unsigned long ea, unsigned long vsid, int local) { - hugepte_t *ptep; + pte_t *ptep; unsigned long va, vpn; int is_write; - hugepte_t old_pte, new_pte; - unsigned long hpteflags, prpn, flags; + pte_t old_pte, new_pte; + unsigned long hpteflags, prpn; long slot; + int err = 1; + + spin_lock(&mm->page_table_lock); - /* We have to find the first hugepte in the batch, since - * that's the one that will store the HPTE flags */ - ea &= HPAGE_MASK; - ptep = hugepte_offset(mm, ea); + ptep = huge_pte_offset(mm, ea); /* Search the Linux page table for a match with va */ va = (vsid << 28) | (ea & 0x0fffffff); @@ -740,19 +794,18 @@ * If no pte found or not present, send the problem up to * do_page_fault */ - if (unlikely(!ptep || hugepte_none(*ptep))) - return 1; + if (unlikely(!ptep || pte_none(*ptep))) + goto out; - BUG_ON(hugepte_bad(*ptep)); +/* BUG_ON(pte_bad(*ptep)); */ /* * Check the user's access rights to the page. If access should be * prevented then send the problem up to do_page_fault. */ is_write = access & _PAGE_RW; - if (unlikely(is_write && !(hugepte_val(*ptep) & _HUGEPAGE_RW))) - return 1; - + if (unlikely(is_write && !(pte_val(*ptep) & _PAGE_RW))) + goto out; /* * At this point, we have a pte (old_pte) which can be used to build * or update an HPTE. There are 2 cases: @@ -765,41 +818,40 @@ * page is currently not DIRTY. */ - spin_lock_irqsave(&mm->page_table_lock, flags); old_pte = *ptep; new_pte = old_pte; - hpteflags = 0x2 | (! (hugepte_val(new_pte) & _HUGEPAGE_RW)); + hpteflags = 0x2 | (! (pte_val(new_pte) & _PAGE_RW)); /* Check if pte already has an hpte (case 2) */ - if (unlikely(hugepte_val(old_pte) & _HUGEPAGE_HASHPTE)) { + if (unlikely(pte_val(old_pte) & _PAGE_HASHPTE)) { /* There MIGHT be an HPTE for this pte */ unsigned long hash, slot; hash = hpt_hash(vpn, 1); - if (hugepte_val(old_pte) & _HUGEPAGE_SECONDARY) + if (pte_val(old_pte) & _PAGE_SECONDARY) hash = ~hash; slot = (hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP; - slot += (hugepte_val(old_pte) & _HUGEPAGE_GROUP_IX) >> 5; + slot += (pte_val(old_pte) & _PAGE_GROUP_IX) >> 12; if (ppc_md.hpte_updatepp(slot, hpteflags, va, 1, local) == -1) - hugepte_val(old_pte) &= ~_HUGEPAGE_HPTEFLAGS; + pte_val(old_pte) &= ~_PAGE_HPTEFLAGS; } - if (likely(!(hugepte_val(old_pte) & _HUGEPAGE_HASHPTE))) { + if (likely(!(pte_val(old_pte) & _PAGE_HASHPTE))) { unsigned long hash = hpt_hash(vpn, 1); unsigned long hpte_group; - prpn = hugepte_pfn(old_pte); + prpn = pte_pfn(old_pte); repeat: hpte_group = ((hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL; /* Update the linux pte with the HPTE slot */ - hugepte_val(new_pte) &= ~_HUGEPAGE_HPTEFLAGS; - hugepte_val(new_pte) |= _HUGEPAGE_HASHPTE; + pte_val(new_pte) &= ~_PAGE_HPTEFLAGS; + pte_val(new_pte) |= _PAGE_HASHPTE; /* Add in WIMG bits */ /* XXX We should store these in the pte */ @@ -810,7 +862,7 @@ /* Primary is full, try the secondary */ if (unlikely(slot == -1)) { - hugepte_val(new_pte) |= _HUGEPAGE_SECONDARY; + pte_val(new_pte) |= _PAGE_SECONDARY; hpte_group = ((~hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL; slot = ppc_md.hpte_insert(hpte_group, va, prpn, @@ -827,39 +879,20 @@ if (unlikely(slot == -2)) panic("hash_huge_page: pte_insert failed\n"); - hugepte_val(new_pte) |= (slot<<5) & _HUGEPAGE_GROUP_IX; + pte_val(new_pte) |= (slot<<12) & _PAGE_GROUP_IX; /* * No need to use ldarx/stdcx here because all who * might be updating the pte will hold the - * page_table_lock or the hash_table_lock - * (we hold both) + * page_table_lock */ *ptep = new_pte; } - spin_unlock_irqrestore(&mm->page_table_lock, flags); - - return 0; -} - -static void flush_hash_hugepage(mm_context_t context, unsigned long ea, - hugepte_t pte, int local) -{ - unsigned long vsid, vpn, va, hash, slot; - - BUG_ON(hugepte_bad(pte)); - BUG_ON(!in_hugepage_area(context, ea)); - - vsid = get_vsid(context.id, ea); + err = 0; - va = (vsid << 28) | (ea & 0x0fffffff); - vpn = va >> HPAGE_SHIFT; - hash = hpt_hash(vpn, 1); - if (hugepte_val(pte) & _HUGEPAGE_SECONDARY) - hash = ~hash; - slot = (hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP; - slot += (hugepte_val(pte) & _HUGEPAGE_GROUP_IX) >> 5; + out: + spin_unlock(&mm->page_table_lock); - ppc_md.hpte_invalidate(slot, va, 1, local); + return err; } diff -Nru a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c --- a/arch/ppc64/mm/init.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc64/mm/init.c 2004-11-10 17:19:05 -08:00 @@ -263,7 +263,8 @@ */ ; } else { - area = im_get_area(ea, size, IM_REGION_UNUSED|IM_REGION_SUBSET); + area = im_get_area(ea, size, + IM_REGION_UNUSED|IM_REGION_SUBSET|IM_REGION_EXISTS); if (area == NULL) { /* Expected when PHB-dlpar is in play */ return 1; @@ -477,12 +478,18 @@ int index; int err; +#ifdef CONFIG_HUGETLB_PAGE + /* We leave htlb_segs as it was, but for a fork, we need to + * clear the huge_pgdir. */ + mm->context.huge_pgdir = NULL; +#endif + again: if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL)) return -ENOMEM; spin_lock(&mmu_context_lock); - err = idr_get_new(&mmu_context_idr, NULL, &index); + err = idr_get_new_above(&mmu_context_idr, NULL, 1, &index); spin_unlock(&mmu_context_lock); if (err == -EAGAIN) @@ -507,20 +514,9 @@ spin_unlock(&mmu_context_lock); mm->context.id = NO_CONTEXT; -} - -static int __init mmu_context_init(void) -{ - int index; - /* Reserve the first (invalid) context*/ - idr_pre_get(&mmu_context_idr, GFP_KERNEL); - idr_get_new(&mmu_context_idr, NULL, &index); - BUG_ON(0 != index); - - return 0; + hugetlb_mm_free_pgd(mm); } -arch_initcall(mmu_context_init); /* * Do very early mm setup. @@ -873,14 +869,14 @@ local_irq_restore(flags); } -void * reserve_phb_iospace(unsigned long size) +void __iomem * reserve_phb_iospace(unsigned long size) { - void *virt_addr; + void __iomem *virt_addr; if (phbs_io_bot >= IMALLOC_BASE) panic("reserve_phb_iospace(): phb io space overflow\n"); - virt_addr = (void *) phbs_io_bot; + virt_addr = (void __iomem *) phbs_io_bot; phbs_io_bot += size; return virt_addr; diff -Nru a/arch/ppc64/mm/numa.c b/arch/ppc64/mm/numa.c --- a/arch/ppc64/mm/numa.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc64/mm/numa.c 2004-11-10 17:19:05 -08:00 @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include #include #include @@ -39,6 +41,7 @@ struct pglist_data *node_data[MAX_NUMNODES]; bootmem_data_t __initdata plat_node_bdata[MAX_NUMNODES]; static unsigned long node0_io_hole_size; +static int min_common_depth; /* * We need somewhere to store start/span for each node until we have @@ -64,7 +67,24 @@ } } -static struct device_node * __init find_cpu_node(unsigned int cpu) +#ifdef CONFIG_HOTPLUG_CPU +static void unmap_cpu_from_node(unsigned long cpu) +{ + int node = numa_cpu_lookup_table[cpu]; + + dbg("removing cpu %lu from node %d\n", cpu, node); + + if (cpu_isset(cpu, numa_cpumask_lookup_table[node])) { + cpu_clear(cpu, numa_cpumask_lookup_table[node]); + nr_cpus_in_node[node]--; + } else { + printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n", + cpu, node); + } +} +#endif /* CONFIG_HOTPLUG_CPU */ + +static struct device_node * __devinit find_cpu_node(unsigned int cpu) { unsigned int hw_cpuid = get_hard_smp_processor_id(cpu); struct device_node *cpu_node = NULL; @@ -96,26 +116,21 @@ /* must hold reference to node during call */ static int *of_get_associativity(struct device_node *dev) - { - unsigned int *result; - int len; - - result = (unsigned int *)get_property(dev, "ibm,associativity", &len); - - if (len <= 0) - return NULL; - - return result; +{ + return (unsigned int *)get_property(dev, "ibm,associativity", NULL); } -static int of_node_numa_domain(struct device_node *device, int depth) +static int of_node_numa_domain(struct device_node *device) { int numa_domain; unsigned int *tmp; + if (min_common_depth == -1) + return 0; + tmp = of_get_associativity(device); - if (tmp && (tmp[0] >= depth)) { - numa_domain = tmp[depth]; + if (tmp && (tmp[0] >= min_common_depth)) { + numa_domain = tmp[min_common_depth]; } else { dbg("WARNING: no NUMA information for %s\n", device->full_name); @@ -138,7 +153,7 @@ * * - Dave Hansen */ -static int find_min_common_depth(void) +static int __init find_min_common_depth(void) { int depth; unsigned int *ref_points; @@ -185,11 +200,72 @@ return result; } +/* + * Figure out to which domain a cpu belongs and stick it there. + * Return the id of the domain used. + */ +static int numa_setup_cpu(unsigned long lcpu) +{ + int numa_domain = 0; + struct device_node *cpu = find_cpu_node(lcpu); + + if (!cpu) { + WARN_ON(1); + goto out; + } + + numa_domain = of_node_numa_domain(cpu); + + if (numa_domain >= MAX_NUMNODES) { + /* + * POWER4 LPAR uses 0xffff as invalid node, + * dont warn in this case. + */ + if (numa_domain != 0xffff) + printk(KERN_ERR "WARNING: cpu %ld " + "maps to invalid NUMA node %d\n", + lcpu, numa_domain); + numa_domain = 0; + } +out: + node_set_online(numa_domain); + + map_cpu_to_node(lcpu, numa_domain); + + of_node_put(cpu); + + return numa_domain; +} + +static int cpu_numa_callback(struct notifier_block *nfb, + unsigned long action, + void *hcpu) +{ + unsigned long lcpu = (unsigned long)hcpu; + int ret = NOTIFY_DONE; + + switch (action) { + case CPU_UP_PREPARE: + if (min_common_depth == -1 || !numa_enabled) + map_cpu_to_node(lcpu, 0); + else + numa_setup_cpu(lcpu); + ret = NOTIFY_OK; + break; +#ifdef CONFIG_HOTPLUG_CPU + case CPU_DEAD: + case CPU_UP_CANCELED: + unmap_cpu_from_node(lcpu); + break; + ret = NOTIFY_OK; +#endif + } + return ret; +} + static int __init parse_numa_properties(void) { - struct device_node *cpu = NULL; struct device_node *memory = NULL; - int depth; int max_domain = 0; long entries = lmb_end_of_DRAM() >> MEMORY_INCREMENT_SHIFT; unsigned long i; @@ -206,44 +282,13 @@ for (i = 0; i < entries ; i++) numa_memory_lookup_table[i] = ARRAY_INITIALISER; - depth = find_min_common_depth(); - - dbg("NUMA associativity depth for CPU/Memory: %d\n", depth); - if (depth < 0) - return depth; - - for_each_cpu(i) { - int numa_domain; - - cpu = find_cpu_node(i); - - if (cpu) { - numa_domain = of_node_numa_domain(cpu, depth); - of_node_put(cpu); - - if (numa_domain >= MAX_NUMNODES) { - /* - * POWER4 LPAR uses 0xffff as invalid node, - * dont warn in this case. - */ - if (numa_domain != 0xffff) - printk(KERN_ERR "WARNING: cpu %ld " - "maps to invalid NUMA node %d\n", - i, numa_domain); - numa_domain = 0; - } - } else { - dbg("WARNING: no NUMA information for cpu %ld\n", i); - numa_domain = 0; - } - - node_set_online(numa_domain); + min_common_depth = find_min_common_depth(); - if (max_domain < numa_domain) - max_domain = numa_domain; + dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth); + if (min_common_depth < 0) + return min_common_depth; - map_cpu_to_node(i, numa_domain); - } + max_domain = numa_setup_cpu(boot_cpuid); memory = NULL; while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { @@ -267,7 +312,7 @@ start = _ALIGN_DOWN(start, MEMORY_INCREMENT); size = _ALIGN_UP(size, MEMORY_INCREMENT); - numa_domain = of_node_numa_domain(memory, depth); + numa_domain = of_node_numa_domain(memory); if (numa_domain >= MAX_NUMNODES) { if (numa_domain != 0xffff) @@ -341,8 +386,7 @@ numa_memory_lookup_table[i] = ARRAY_INITIALISER; } - for (i = 0; i < NR_CPUS; i++) - map_cpu_to_node(i, 0); + map_cpu_to_node(boot_cpuid, 0); node_set_online(0); @@ -358,35 +402,10 @@ static void __init dump_numa_topology(void) { unsigned int node; - unsigned int cpu, count; + unsigned int count; - for (node = 0; node < MAX_NUMNODES; node++) { - if (!node_online(node)) - continue; - - printk(KERN_INFO "Node %d CPUs:", node); - - count = 0; - /* - * If we used a CPU iterator here we would miss printing - * the holes in the cpumap. - */ - for (cpu = 0; cpu < NR_CPUS; cpu++) { - if (cpu_isset(cpu, numa_cpumask_lookup_table[node])) { - if (count == 0) - printk(" %u", cpu); - ++count; - } else { - if (count > 1) - printk("-%u", cpu - 1); - count = 0; - } - } - - if (count > 1) - printk("-%u", NR_CPUS - 1); - printk("\n"); - } + if (min_common_depth == -1 || !numa_enabled) + return; for (node = 0; node < MAX_NUMNODES; node++) { unsigned long i; @@ -414,6 +433,7 @@ printk("-0x%lx", i); printk("\n"); } + return; } /* @@ -460,6 +480,10 @@ void __init do_init_bootmem(void) { int nid; + static struct notifier_block ppc64_numa_nb = { + .notifier_call = cpu_numa_callback, + .priority = 1 /* Must run before sched domains notifier. */ + }; min_low_pfn = 0; max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT; @@ -469,6 +493,8 @@ setup_nonnuma(); else dump_numa_topology(); + + register_cpu_notifier(&ppc64_numa_nb); for (nid = 0; nid < numnodes; nid++) { unsigned long start_paddr, end_paddr; diff -Nru a/arch/ppc64/oprofile/common.c b/arch/ppc64/oprofile/common.c --- a/arch/ppc64/oprofile/common.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc64/oprofile/common.c 2004-11-10 17:19:07 -08:00 @@ -112,10 +112,15 @@ oprofilefs_create_ulong(sb, root, "enable_kernel", &sys.enable_kernel); oprofilefs_create_ulong(sb, root, "enable_user", &sys.enable_user); + oprofilefs_create_ulong(sb, root, "backtrace_spinlocks", + &sys.backtrace_spinlocks); /* Default to tracing both kernel and user */ sys.enable_kernel = 1; sys.enable_user = 1; + + /* Turn on backtracing through spinlocks by default */ + sys.backtrace_spinlocks = 1; return 0; } diff -Nru a/arch/ppc64/oprofile/op_impl.h b/arch/ppc64/oprofile/op_impl.h --- a/arch/ppc64/oprofile/op_impl.h 2004-11-10 17:19:04 -08:00 +++ b/arch/ppc64/oprofile/op_impl.h 2004-11-10 17:19:04 -08:00 @@ -71,6 +71,7 @@ unsigned long mmcra; unsigned long enable_kernel; unsigned long enable_user; + unsigned long backtrace_spinlocks; }; /* Per-arch configuration */ diff -Nru a/arch/ppc64/oprofile/op_model_power4.c b/arch/ppc64/oprofile/op_model_power4.c --- a/arch/ppc64/oprofile/op_model_power4.c 2004-11-10 17:19:05 -08:00 +++ b/arch/ppc64/oprofile/op_model_power4.c 2004-11-10 17:19:05 -08:00 @@ -32,6 +32,13 @@ static u64 mmcr1_val; static u32 mmcra_val; +/* + * Since we do not have an NMI, backtracing through spinlocks is + * only a best guess. In light of this, allow it to be disabled at + * runtime. + */ +static int backtrace_spinlocks; + static void power4_reg_setup(struct op_counter_config *ctr, struct op_system_config *sys, int num_ctrs) @@ -59,6 +66,8 @@ mmcr1_val = sys->mmcr1; mmcra_val = sys->mmcra; + backtrace_spinlocks = sys->backtrace_spinlocks; + for (i = 0; i < num_counters; ++i) reset_value[i] = 0x80000000UL - ctr[i].count; @@ -170,19 +179,38 @@ { } +static unsigned long check_spinlock_pc(struct pt_regs *regs, + unsigned long profile_pc) +{ + unsigned long pc = instruction_pointer(regs); + + /* + * If both the SIAR (sampled instruction) and the perfmon exception + * occurred in a spinlock region then we account the sample to the + * calling function. This isnt 100% correct, we really need soft + * IRQ disable so we always get the perfmon exception at the + * point at which the SIAR is set. + */ + if (backtrace_spinlocks && in_lock_functions(pc) && + in_lock_functions(profile_pc)) + return regs->link; + else + return profile_pc; +} + /* * On GQ and newer the MMCRA stores the HV and PR bits at the time * the SIAR was sampled. We use that to work out if the SIAR was sampled in * the hypervisor, our exception vectors or RTAS. */ -static unsigned long get_pc(void) +static unsigned long get_pc(struct pt_regs *regs) { unsigned long pc = mfspr(SPRN_SIAR); unsigned long mmcra; /* Cant do much about it */ if (!mmcra_has_sihv) - return pc; + return check_spinlock_pc(regs, pc); mmcra = mfspr(SPRN_MMCRA); @@ -196,10 +224,6 @@ if (mmcra & MMCRA_SIPR) return pc; - /* Were we in our exception vectors? */ - if (pc < 0x4000UL) - return (unsigned long)__va(pc); - #ifdef CONFIG_PPC_PSERIES /* Were we in RTAS? */ if (pc >= rtas.base && pc < (rtas.base + rtas.size)) @@ -207,12 +231,16 @@ return *((unsigned long *)rtas_bucket); #endif + /* Were we in our exception vectors or SLB real mode miss handler? */ + if (pc < 0x1000000UL) + return (unsigned long)__va(pc); + /* Not sure where we were */ if (pc < KERNELBASE) /* function descriptor madness */ return *((unsigned long *)kernel_unknown_bucket); - return pc; + return check_spinlock_pc(regs, pc); } static int get_kernel(unsigned long pc) @@ -239,7 +267,7 @@ unsigned int cpu = smp_processor_id(); unsigned int mmcr0; - pc = get_pc(); + pc = get_pc(regs); is_kernel = get_kernel(pc); /* set the PMM bit (see comment below) */ diff -Nru a/arch/ppc64/xmon/start.c b/arch/ppc64/xmon/start.c --- a/arch/ppc64/xmon/start.c 2004-11-10 17:19:07 -08:00 +++ b/arch/ppc64/xmon/start.c 2004-11-10 17:19:07 -08:00 @@ -35,7 +35,7 @@ { .handler = sysrq_handle_xmon, .help_msg = "Xmon", - .action_msg = "Entering xmon\n", + .action_msg = "Entering xmon", }; static int __init setup_xmon_sysrq(void) @@ -173,7 +173,7 @@ c = xmon_getchar(); if (c == -1) { if (p == str) - return 0; + return NULL; break; } *p++ = c; diff -Nru a/arch/ppc64/xmon/xmon.c b/arch/ppc64/xmon/xmon.c --- a/arch/ppc64/xmon/xmon.c 2004-11-10 17:19:06 -08:00 +++ b/arch/ppc64/xmon/xmon.c 2004-11-10 17:19:06 -08:00 @@ -645,7 +645,7 @@ for (i = 0; i < NBPTS; ++i, ++bp) if (bp->enabled && pc == bp->address) return bp; - return 0; + return NULL; } static struct bpt *in_breakpoint_table(unsigned long nip, unsigned long *offp) @@ -1582,7 +1582,7 @@ extern char dec_exc; void -super_regs() +super_regs(void) { int cmd; unsigned long val; @@ -1816,7 +1816,7 @@ ""; void -memex() +memex(void) { int cmd, inc, i, nslash; unsigned long n; @@ -1967,7 +1967,7 @@ } int -bsesc() +bsesc(void) { int c; @@ -1985,7 +1985,7 @@ || ('a' <= (c) && (c) <= 'f') \ || ('A' <= (c) && (c) <= 'F')) void -dump() +dump(void) { int c; @@ -2150,7 +2150,7 @@ static unsigned mask; void -memlocate() +memlocate(void) { unsigned a, n; unsigned char val[4]; @@ -2183,7 +2183,7 @@ static unsigned long mlim = 0xffffffff; void -memzcan() +memzcan(void) { unsigned char v; unsigned a; @@ -2212,7 +2212,7 @@ /* Input scanning routines */ int -skipbl() +skipbl(void) { int c; @@ -2237,8 +2237,7 @@ }; int -scanhex(vp) -unsigned long *vp; +scanhex(unsigned long *vp) { int c, d; unsigned long v; @@ -2322,7 +2321,7 @@ } void -scannl() +scannl(void) { int c; @@ -2365,13 +2364,13 @@ static char *lineptr; void -flush_input() +flush_input(void) { lineptr = NULL; } int -inchar() +inchar(void) { if (lineptr == NULL || *lineptr == 0) { if (fgets(line, sizeof(line), stdin) == NULL) { @@ -2384,8 +2383,7 @@ } void -take_input(str) -char *str; +take_input(char *str) { lineptr = str; } diff -Nru a/arch/s390/defconfig b/arch/s390/defconfig --- a/arch/s390/defconfig 2004-11-10 17:19:06 -08:00 +++ b/arch/s390/defconfig 2004-11-10 17:19:06 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc3 -# Fri Oct 8 19:17:35 2004 +# Linux kernel version: 2.6.9 +# Fri Oct 22 13:50:22 2004 # CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y @@ -26,6 +26,7 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=17 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set @@ -49,6 +50,7 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -144,6 +146,7 @@ # SCSI low-level drivers # # CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set CONFIG_ZFCP=y CONFIG_CCW=y @@ -157,7 +160,9 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" # CONFIG_LBD is not set +# CONFIG_CDROM_PKTCDVD is not set # # S/390 block device drivers @@ -224,6 +229,7 @@ CONFIG_S390_TAPE_34XX=m # CONFIG_VMLOGRDR is not set # CONFIG_MONREADER is not set +# CONFIG_DCSS_SHM is not set # # Cryptographic devices @@ -427,6 +433,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -506,6 +513,7 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_INFO is not set @@ -513,6 +521,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c --- a/arch/s390/kernel/asm-offsets.c 2004-11-10 17:19:03 -08:00 +++ b/arch/s390/kernel/asm-offsets.c 2004-11-10 17:19:03 -08:00 @@ -22,6 +22,8 @@ DEFINE(__THREAD_mm_segment, offsetof(struct task_struct, thread.mm_segment),); BLANK(); + DEFINE(__TASK_pid, offsetof(struct task_struct, pid),); + BLANK(); DEFINE(__PER_atmid, offsetof(per_struct, lowcore.words.perc_atmid),); DEFINE(__PER_address, offsetof(per_struct, lowcore.words.address),); DEFINE(__PER_access_id, offsetof(per_struct, lowcore.words.access_id),); diff -Nru a/arch/s390/kernel/cpcmd.c b/arch/s390/kernel/cpcmd.c --- a/arch/s390/kernel/cpcmd.c 2004-11-10 17:19:04 -08:00 +++ b/arch/s390/kernel/cpcmd.c 2004-11-10 17:19:04 -08:00 @@ -15,7 +15,7 @@ #include static spinlock_t cpcmd_lock = SPIN_LOCK_UNLOCKED; -static char cpcmd_buf[128]; +static char cpcmd_buf[240]; void cpcmd(char *cmd, char *response, int rlen) { @@ -24,22 +24,23 @@ int cmdlen; spin_lock_irqsave(&cpcmd_lock, flags); - cmdlen = strlen(cmd); - strcpy(cpcmd_buf, cmd); - ASCEBC(cpcmd_buf, cmdlen); + cmdlen = strlen(cmd); + BUG_ON(cmdlen>240); + strcpy(cpcmd_buf, cmd); + ASCEBC(cpcmd_buf, cmdlen); - if (response != NULL && rlen > 0) { + if (response != NULL && rlen > 0) { #ifndef CONFIG_ARCH_S390X asm volatile ("LRA 2,0(%0)\n\t" "LR 4,%1\n\t" "O 4,%4\n\t" "LRA 3,0(%2)\n\t" "LR 5,%3\n\t" - ".long 0x83240008 # Diagnose 83\n\t" + ".long 0x83240008 # Diagnose X'08'\n\t" : /* no output */ : "a" (cpcmd_buf), "d" (cmdlen), "a" (response), "d" (rlen), "m" (mask) - : "2", "3", "4", "5" ); + : "cc", "2", "3", "4", "5" ); #else /* CONFIG_ARCH_S390X */ asm volatile (" lrag 2,0(%0)\n" " lgr 4,%1\n" @@ -47,19 +48,19 @@ " lrag 3,0(%2)\n" " lgr 5,%3\n" " sam31\n" - " .long 0x83240008 # Diagnose 83\n" + " .long 0x83240008 # Diagnose X'08'\n" " sam64" : /* no output */ : "a" (cpcmd_buf), "d" (cmdlen), "a" (response), "d" (rlen), "m" (mask) - : "2", "3", "4", "5" ); + : "cc", "2", "3", "4", "5" ); #endif /* CONFIG_ARCH_S390X */ EBCASC(response, rlen); } else { #ifndef CONFIG_ARCH_S390X asm volatile ("LRA 2,0(%0)\n\t" "LR 3,%1\n\t" - ".long 0x83230008 # Diagnose 83\n\t" + ".long 0x83230008 # Diagnose X'08'\n\t" : /* no output */ : "a" (cpcmd_buf), "d" (cmdlen) : "2", "3" ); @@ -67,7 +68,7 @@ asm volatile (" lrag 2,0(%0)\n" " lgr 3,%1\n" " sam31\n" - " .long 0x83230008 # Diagnose 83\n" + " .long 0x83230008 # Diagnose X'08'\n" " sam64" : /* no output */ : "a" (cpcmd_buf), "d" (cmdlen) diff -Nru a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c --- a/arch/s390/kernel/debug.c 2004-11-10 17:19:02 -08:00 +++ b/arch/s390/kernel/debug.c 2004-11-10 17:19:02 -08:00 @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -708,6 +709,70 @@ proceed_active_area(id); } +static int debug_stoppable=1; +static int debug_active=1; + +#define CTL_S390DBF 5677 +#define CTL_S390DBF_STOPPABLE 5678 +#define CTL_S390DBF_ACTIVE 5679 + +/* + * proc handler for the running debug_active sysctl + * always allow read, allow write only if debug_stoppable is set or + * if debug_active is already off + */ +static int s390dbf_procactive(ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + if (!write || debug_stoppable || !debug_active) + return proc_dointvec(table, write, filp, buffer, lenp, ppos); + else + return 0; +} + + +static struct ctl_table s390dbf_table[] = { + { + .ctl_name = CTL_S390DBF_STOPPABLE, + .procname = "debug_stoppable", + .data = &debug_stoppable, + .maxlen = sizeof(int), + .mode = S_IRUGO | S_IWUSR, + .proc_handler = &proc_dointvec, + .strategy = &sysctl_intvec, + }, + { + .ctl_name = CTL_S390DBF_ACTIVE, + .procname = "debug_active", + .data = &debug_active, + .maxlen = sizeof(int), + .mode = S_IRUGO | S_IWUSR, + .proc_handler = &s390dbf_procactive, + .strategy = &sysctl_intvec, + }, + { .ctl_name = 0 } +}; + +static struct ctl_table s390dbf_dir_table[] = { + { + .ctl_name = CTL_S390DBF, + .procname = "s390dbf", + .maxlen = 0, + .mode = S_IRUGO | S_IXUGO, + .child = s390dbf_table, + }, + { .ctl_name = 0 } +}; + +struct ctl_table_header *s390dbf_sysctl_header; + +void debug_stop_all(void) +{ + if (debug_stoppable) + debug_active = 0; +} + + /* * debug_event_common: * - write debug entry with given size @@ -719,6 +784,8 @@ unsigned long flags; debug_entry_t *active; + if (!debug_active) + return NULL; spin_lock_irqsave(&id->lock, flags); active = get_active_entry(id); memset(DEBUG_DATA(active), 0, id->buf_size); @@ -740,6 +807,8 @@ unsigned long flags; debug_entry_t *active; + if (!debug_active) + return NULL; spin_lock_irqsave(&id->lock, flags); active = get_active_entry(id); memset(DEBUG_DATA(active), 0, id->buf_size); @@ -780,7 +849,8 @@ if((!id) || (level > id->level)) return NULL; - + if (!debug_active) + return NULL; numargs=debug_count_numargs(string); spin_lock_irqsave(&id->lock, flags); @@ -812,6 +882,8 @@ if((!id) || (level > id->level)) return NULL; + if (!debug_active) + return NULL; numargs=debug_count_numargs(string); @@ -838,6 +910,7 @@ { int rc = 0; + s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table, 1); down(&debug_lock); #ifdef CONFIG_PROC_FS debug_proc_root_entry = proc_mkdir(DEBUG_DIR_ROOT, NULL); @@ -1186,6 +1259,7 @@ #ifdef CONFIG_PROC_FS remove_proc_entry(debug_proc_root_entry->name, NULL); #endif /* CONFIG_PROC_FS */ + unregister_sysctl_table(s390dbf_sysctl_header); return; } @@ -1199,6 +1273,7 @@ EXPORT_SYMBOL(debug_register); EXPORT_SYMBOL(debug_unregister); EXPORT_SYMBOL(debug_set_level); +EXPORT_SYMBOL(debug_stop_all); EXPORT_SYMBOL(debug_register_view); EXPORT_SYMBOL(debug_unregister_view); EXPORT_SYMBOL(debug_event_common); diff -Nru a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S --- a/arch/s390/kernel/entry.S 2004-11-10 17:19:03 -08:00 +++ b/arch/s390/kernel/entry.S 2004-11-10 17:19:03 -08:00 @@ -144,6 +144,7 @@ l %r15,__THREAD_ksp(%r3) # load kernel stack from next->tss.ksp lm %r6,%r15,__SF_GPRS(%r15)# load __switch_to registers of next task st %r3,__LC_CURRENT # __LC_CURRENT = current task struct + lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4 l %r3,__THREAD_info(%r3) # load thread_info from task struct st %r3,__LC_THREAD_INFO ahi %r3,STACK_SIZE diff -Nru a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S --- a/arch/s390/kernel/entry64.S 2004-11-10 17:19:03 -08:00 +++ b/arch/s390/kernel/entry64.S 2004-11-10 17:19:03 -08:00 @@ -141,6 +141,7 @@ lg %r15,__THREAD_ksp(%r3) # load kernel stack from next->tss.ksp lmg %r6,%r15,__SF_GPRS(%r15)# load __switch_to registers of next task stg %r3,__LC_CURRENT # __LC_CURRENT = current task struct + lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4 lg %r3,__THREAD_info(%r3) # load thread_info from task struct stg %r3,__LC_THREAD_INFO aghi %r3,STACK_SIZE diff -Nru a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c --- a/arch/s390/kernel/irq.c 2004-11-10 17:19:05 -08:00 +++ b/arch/s390/kernel/irq.c 2004-11-10 17:19:05 -08:00 @@ -86,7 +86,7 @@ " la 15,0(%1)\n" : : "a" (new), "a" (old), "a" (__do_softirq) - : "0", "1", "2", "3", "4", "5", + : "0", "1", "2", "3", "4", "5", "14", "cc", "memory" ); } else /* We are already on the async stack. */ diff -Nru a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c --- a/arch/s390/kernel/traps.c 2004-11-10 17:19:03 -08:00 +++ b/arch/s390/kernel/traps.c 2004-11-10 17:19:03 -08:00 @@ -38,6 +38,7 @@ #include #include #include +#include /* Called from entry.S only */ extern void handle_per_exception(struct pt_regs *regs); @@ -277,8 +278,10 @@ void die(const char * str, struct pt_regs * regs, long err) { static int die_counter; - console_verbose(); - spin_lock_irq(&die_lock); + + debug_stop_all(); + console_verbose(); + spin_lock_irq(&die_lock); bust_spinlocks(1); printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); show_regs(regs); @@ -630,6 +633,21 @@ } } +asmlinkage void space_switch_exception(struct pt_regs * regs, long int_code) +{ + siginfo_t info; + + /* Set user psw back to home space mode. */ + if (regs->psw.mask & PSW_MASK_PSTATE) + regs->psw.mask |= PSW_ASC_HOME; + /* Send SIGILL. */ + info.si_signo = SIGILL; + info.si_errno = 0; + info.si_code = ILL_PRVOPC; + info.si_addr = get_check_address(regs); + do_trap(int_code, SIGILL, "space switch event", regs, &info); +} + asmlinkage void kernel_stack_overflow(struct pt_regs * regs) { die("Kernel stack overflow", regs, 0); @@ -673,7 +691,7 @@ pgm_check_table[0x3B] = &do_dat_exception; #endif /* CONFIG_ARCH_S390X */ pgm_check_table[0x15] = &operand_exception; - pgm_check_table[0x1C] = &privileged_op; + pgm_check_table[0x1C] = &space_switch_exception; pgm_check_table[0x1D] = &hfp_sqrt_exception; pgm_check_table[0x40] = &do_monitor_call; diff -Nru a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c --- a/arch/s390/mm/extmem.c 2004-11-10 17:19:06 -08:00 +++ b/arch/s390/mm/extmem.c 2004-11-10 17:19:06 -08:00 @@ -1,11 +1,10 @@ /* - * File...........: arch/s390/mm/dcss.c - * Author(s)......: Steven Shultz - * Carsten Otte + * File...........: arch/s390/mm/extmem.c + * Author(s)......: Carsten Otte + * Rob M van der Heij + * Steven Shultz * Bugreports.to..: - * thanks to Rob M van der Heij - * - he wrote the diag64 function - * (C) IBM Corporation 2002 + * (C) IBM Corporation 2002-2004 */ #include @@ -43,18 +42,38 @@ #define DCSS_SEGEXT 0x18 #define DCSS_QACTV 0x0c +struct qout64 { + int segstart; + int segend; + int segcnt; + int segrcnt; + char segout[8][6]; +}; + +struct qin64 { + char qopcode; + char rsrv1[3]; + char qrcode; + char rsrv2[3]; + char qname[8]; + unsigned int qoutptr; + short int qoutlen; +}; + struct dcss_segment { - struct list_head list; - char dcss_name[8]; - unsigned long start_addr; - unsigned long end; - atomic_t ref_count; - int dcss_attr; - int shared_attr; + struct list_head list; + char dcss_name[8]; + unsigned long start_addr; + unsigned long end; + atomic_t ref_count; + int do_nonshared; + int vm_segtype; }; static spinlock_t dcss_lock = SPIN_LOCK_UNLOCKED; static struct list_head dcss_list = LIST_HEAD_INIT(dcss_list); +static char *segtype_string[7] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC" }; + extern struct { unsigned long addr, size, type; } memory_chunk[MEMORY_CHUNKS]; @@ -63,20 +82,46 @@ * Create the 8 bytes, ebcdic VM segment name from * an ascii name. */ -static void inline dcss_mkname(char *name, char *dcss_name) +static void inline +dcss_mkname(char *name, char *dcss_name) { - int i; + int i; + + for (i = 0; i < 8; i++) { + if (name[i] == '\0') + break; + dcss_name[i] = toupper(name[i]); + }; + for (; i < 8; i++) + dcss_name[i] = ' '; + ASCEBC(dcss_name, 8); +} - for (i = 0; i <= 8; i++) { - if (name[i] == '\0') - break; - dcss_name[i] = toupper(name[i]); - }; - for (; i <= 8; i++) - dcss_name[i] = ' '; - ASCEBC(dcss_name, 8); + +/* + * search all segments in dcss_list, and return the one + * namend *name. If not found, return NULL. + */ +static struct dcss_segment * +segment_by_name (char *name) +{ + char dcss_name[9]; + struct list_head *l; + struct dcss_segment *tmp, *retval = NULL; + + BUG_ON (!spin_is_locked(&dcss_lock)); + dcss_mkname (name, dcss_name); + list_for_each (l, &dcss_list) { + tmp = list_entry (l, struct dcss_segment, list); + if (memcmp(tmp->dcss_name, dcss_name, 8) == 0) { + retval = tmp; + break; + } + } + return retval; } + /* * Perform a function on a dcss segment. */ @@ -84,337 +129,270 @@ dcss_diag (__u8 func, void *parameter, unsigned long *ret1, unsigned long *ret2) { - unsigned long rx, ry; - int rc; + unsigned long rx, ry; + int rc; - rx = (unsigned long) parameter; - ry = (unsigned long) func; - __asm__ __volatile__( + rx = (unsigned long) parameter; + ry = (unsigned long) func; + __asm__ __volatile__( #ifdef CONFIG_ARCH_S390X - " sam31\n" // switch to 31 bit - " diag %0,%1,0x64\n" - " sam64\n" // switch back to 64 bit + " sam31\n" // switch to 31 bit + " diag %0,%1,0x64\n" + " sam64\n" // switch back to 64 bit #else - " diag %0,%1,0x64\n" + " diag %0,%1,0x64\n" #endif - " ipm %2\n" - " srl %2,28\n" - : "+d" (rx), "+d" (ry), "=d" (rc) : : "cc" ); - *ret1 = rx; - *ret2 = ry; - return rc; + " ipm %2\n" + " srl %2,28\n" + : "+d" (rx), "+d" (ry), "=d" (rc) : : "cc" ); + *ret1 = rx; + *ret2 = ry; + return rc; } - -/* use to issue "extended" dcss query */ static inline int -dcss_diag_query(char *name, int *rwattr, int *shattr, unsigned long *segstart, unsigned long *segend) +dcss_diag_translate_rc (int vm_rc) { + if (vm_rc == 44) + return -ENOENT; + return -EIO; +} + + +/* do a diag to get info about a segment. + * fills start_address, end and vm_segtype fields + */ +static int +query_segment_info (struct dcss_segment *seg) { - int i,j,rc; - unsigned long rx, ry; + struct qin64 *qin = kmalloc (sizeof(struct qin64), GFP_DMA); + struct qout64 *qout = kmalloc (sizeof(struct qout64), GFP_DMA); - typedef struct segentry { - char thisseg[8]; - } segentry; - - struct qout64 { - int segstart; - int segend; - int segcnt; - int segrcnt; - segentry segout[6]; - }; - - struct qin64 { - char qopcode; - char rsrv1[3]; - char qrcode; - char rsrv2[3]; - char qname[8]; - unsigned int qoutptr; - short int qoutlen; - }; - - - struct qin64 *qinarea; - struct qout64 *qoutarea; - - qinarea = (struct qin64*) get_zeroed_page (GFP_DMA); - if (!qinarea) { - rc =-ENOMEM; - goto out; - } - qoutarea = (struct qout64*) get_zeroed_page (GFP_DMA); - if (!qoutarea) { - rc = -ENOMEM; - free_page ((unsigned long) qinarea); - goto out; - } - memset (qinarea,0,PAGE_SIZE); - memset (qoutarea,0,PAGE_SIZE); - - qinarea->qopcode = DCSS_QACTV; /* do a query for active - segments */ - qinarea->qoutptr = (unsigned long) qoutarea; - qinarea->qoutlen = sizeof(struct qout64); - - /* Move segment name into double word aligned - field and pad with blanks to 8 long. - */ - - for (i = j = 0 ; i < 8; i++) { - qinarea->qname[i] = (name[j] == '\0') ? ' ' : name[j++]; - } - - /* name already in EBCDIC */ - /* ASCEBC ((void *)&qinarea.qname, 8); */ - - /* set the assembler variables */ - rx = (unsigned long) qinarea; - ry = DCSS_SEGEXT; /* this is extended function */ + int diag_cc, rc; + unsigned long dummy, vmrc; - /* issue diagnose x'64' */ - __asm__ __volatile__( -#ifdef CONFIG_ARCH_S390X - " sam31\n" // switch to 31 bit - " diag %0,%1,0x64\n" - " sam64\n" // switch back to 64 bit -#else - " diag %0,%1,0x64\n" -#endif - " ipm %2\n" - " srl %2,28\n" - : "+d" (rx), "+d" (ry), "=d" (rc) : : "cc" ); - - /* parse the query output area */ - *segstart=qoutarea->segstart; - *segend=qoutarea->segend; - - if (rc > 1) - { - *rwattr = 2; - *shattr = 2; - rc = 0; - goto free; - } - - if (qoutarea->segcnt > 6) - { - *rwattr = 3; - *shattr = 3; - rc = 0; - goto free; - } - - *rwattr = 1; - *shattr = 1; - - for (i=0; i < qoutarea->segrcnt; i++) { - if (qoutarea->segout[i].thisseg[3] == 2 || - qoutarea->segout[i].thisseg[3] == 3 || - qoutarea->segout[i].thisseg[3] == 6 ) - *rwattr = 0; - if (qoutarea->segout[i].thisseg[3] == 1 || - qoutarea->segout[i].thisseg[3] == 3 || - qoutarea->segout[i].thisseg[3] == 5 ) - *shattr = 0; - } /* end of for statement */ - rc = 0; - free: - free_page ((unsigned long) qoutarea); - free_page ((unsigned long) qinarea); + if ((qin == NULL) || (qout == NULL)) { + rc = -ENOMEM; + goto out_free; + } + + /* initialize diag input parameters */ + qin->qopcode = DCSS_QACTV; + qin->qoutptr = (unsigned long) qout; + qin->qoutlen = sizeof(struct qout64); + memcpy (qin->qname, seg->dcss_name, 8); + + diag_cc = dcss_diag (DCSS_SEGEXT, qin, &dummy, &vmrc); + + if (diag_cc > 1) { + rc = dcss_diag_translate_rc (vmrc); + goto out_free; + } + + if (qout->segcnt > 1) { + rc = -ENOTSUPP; + goto out_free; + } + + /* analyze diag output and update seg */ + seg->start_addr = qout->segstart; + seg->end = qout->segend; + + seg->vm_segtype = qout->segout[0][3]; + + rc = 0; + + out_free: + if (qin) kfree(qin); + if (qout) kfree(qout); + return rc; +} + +/* + * check if the given segment collides with guest storage. + * returns 1 if this is the case, 0 if no collision was found + */ +static int +segment_overlaps_storage(struct dcss_segment *seg) +{ + int i; + + for (i=0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { + if (memory_chunk[i].type != 0) + continue; + if ((memory_chunk[i].addr >> 20) > (seg->end >> 20)) + continue; + if (((memory_chunk[i].addr + memory_chunk[i].size - 1) >> 20) + < (seg->start_addr >> 20)) + continue; + return 1; + } + return 0; +} + +/* + * check if segment collides with other segments that are currently loaded + * returns 1 if this is the case, 0 if no collision was found + */ +static int +segment_overlaps_others (struct dcss_segment *seg) +{ + struct list_head *l; + struct dcss_segment *tmp; + + BUG_ON (!spin_is_locked(&dcss_lock)); + list_for_each(l, &dcss_list) { + tmp = list_entry(l, struct dcss_segment, list); + if ((tmp->start_addr >> 20) > (seg->end >> 20)) + continue; + if ((tmp->end >> 20) < (seg->start_addr >> 20)) + continue; + if (seg == tmp) + continue; + return 1; + } + return 0; +} + +/* + * get info about a segment + * possible return values: + * -ENOSYS : we are not running on VM + * -EIO : could not perform query diagnose + * -ENOENT : no such segment + * -ENOTSUPP: multi-part segment cannot be used with linux + * -ENOSPC : segment cannot be used (overlaps with storage) + * -ENOMEM : out of memory + * 0 .. 6 : type of segment as defined in include/asm-s390/extmem.h + */ +int +segment_info (char* name) +{ + int rc; + struct dcss_segment seg; + + if (!MACHINE_IS_VM) + return -ENOSYS; + + dcss_mkname(name, seg.dcss_name); + rc = query_segment_info (&seg); + if (rc < 0) + return rc; + return seg.vm_segtype; +} + +/* + * real segment loading function, called from segment_load + */ +static int +__segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long *end) +{ + struct dcss_segment *seg = kmalloc(sizeof(struct dcss_segment), + GFP_DMA); + int dcss_command, rc, diag_cc; + + if (seg == NULL) { + rc = -ENOMEM; + goto out; + } + dcss_mkname (name, seg->dcss_name); + rc = query_segment_info (seg); + if (rc < 0) + goto out_free; + if (segment_overlaps_storage(seg)) { + PRINT_WARN ("segment_load: not loading segment %s - overlaps" + " storage\n",name); + rc = -ENOSPC; + goto out_free; + } + if (segment_overlaps_others(seg)) { + PRINT_WARN ("segment_load: not loading segment %s - overlaps" + " other segments\n",name); + rc = -EBUSY; + goto out_free; + } + if (do_nonshared) + dcss_command = DCSS_LOADNSR; + else + dcss_command = DCSS_LOADNOLY; + + diag_cc = dcss_diag(dcss_command, seg->dcss_name, + &seg->start_addr, &seg->end); + if (diag_cc > 1) { + PRINT_WARN ("segment_load: could not load segment %s - " + "diag returned error (%ld)\n",name,seg->end); + rc = dcss_diag_translate_rc (seg->end); + dcss_diag(DCSS_PURGESEG, seg->dcss_name, + &seg->start_addr, &seg->end); + goto out_free; + } + seg->do_nonshared = do_nonshared; + atomic_set(&seg->ref_count, 1); + list_add(&seg->list, &dcss_list); + rc = seg->vm_segtype; + *addr = seg->start_addr; + *end = seg->end; + if (do_nonshared) + PRINT_INFO ("segment_load: loaded segment %s range %p .. %p " + "type %s in non-shared mode\n", name, + (void*)seg->start_addr, (void*)seg->end, + segtype_string[seg->vm_segtype]); + else + PRINT_INFO ("segment_load: loaded segment %s range %p .. %p " + "type %s in shared mode\n", name, + (void*)seg->start_addr, (void*)seg->end, + segtype_string[seg->vm_segtype]); + goto out; + out_free: + kfree (seg); out: - return rc; + return rc; } /* - * Load a DCSS segment via the diag 0x64. + * this function loads a DCSS segment + * name : name of the DCSS + * do_nonshared : 0 indicates that the dcss should be shared with other linux images + * 1 indicates that the dcss should be exclusive for this linux image + * addr : will be filled with start address of the segment + * end : will be filled with end address of the segment + * return values: + * -ENOSYS : we are not running on VM + * -EIO : could not perform query or load diagnose + * -ENOENT : no such segment + * -ENOTSUPP: multi-part segment cannot be used with linux + * -ENOSPC : segment cannot be used (overlaps with storage) + * -EBUSY : segment can temporarily not be used (overlaps with dcss) + * -EPERM : segment is currently loaded with incompatible permissions + * -ENOMEM : out of memory + * 0 .. 6 : type of segment as defined in include/asm-s390/extmem.h */ -int segment_load(char *name, int segtype, unsigned long *addr, - unsigned long *end) +int +segment_load (char *name, int do_nonshared, unsigned long *addr, + unsigned long *end) { - char dcss_name[8]; - struct list_head *l; - struct dcss_segment *seg, *tmp; - unsigned long dummy; - unsigned long segstart, segend; - int rc = 0,i; - int rwattr, shattr; - - if (!MACHINE_IS_VM) - return -ENOSYS; - dcss_mkname(name, dcss_name); - /* search for the dcss in list of currently loaded segments */ - spin_lock(&dcss_lock); - seg = NULL; - list_for_each(l, &dcss_list) { - tmp = list_entry(l, struct dcss_segment, list); - if (memcmp(tmp->dcss_name, dcss_name, 8) == 0) { - seg = tmp; - break; - } - } - - if (seg == NULL) { - /* find out the attributes of this - shared segment */ - dcss_diag_query(dcss_name, &rwattr, &shattr, &segstart, &segend); - /* does segment collide with main memory? */ - for (i=0; i < MEMORY_CHUNKS; i++) { - if (memory_chunk[i].type != 0) - continue; - if (memory_chunk[i].addr > segend) - continue; - if (memory_chunk[i].addr + memory_chunk[i].size <= segstart) - continue; - spin_unlock(&dcss_lock); - return -ENOENT; - } - /* or does it collide with other (loaded) segments? */ - list_for_each(l, &dcss_list) { - tmp = list_entry(l, struct dcss_segment, list); - if ((segstart <= tmp->end && segstart >= tmp->start_addr) || - (segend <= tmp->end && segend >= tmp->start_addr) || - (segstart <= tmp->start_addr && segend >= tmp->end)) { - PRINT_ERR("Segment Overlap!\n"); - spin_unlock(&dcss_lock); - return -ENOENT; - } - } - - /* do case statement on segtype */ - /* if asking for shared ro, - shared rw works */ - /* if asking for exclusive ro, - exclusive rw works */ - - switch(segtype) { - case SEGMENT_SHARED_RO: - if (shattr > 1 || rwattr > 1) { - spin_unlock(&dcss_lock); - return -ENOENT; - } else { - if (shattr == 0 && rwattr == 0) - rc = SEGMENT_EXCLUSIVE_RO; - if (shattr == 0 && rwattr == 1) - rc = SEGMENT_EXCLUSIVE_RW; - if (shattr == 1 && rwattr == 0) - rc = SEGMENT_SHARED_RO; - if (shattr == 1 && rwattr == 1) - rc = SEGMENT_SHARED_RW; - } - break; - case SEGMENT_SHARED_RW: - if (shattr > 1 || rwattr != 1) { - spin_unlock(&dcss_lock); - return -ENOENT; - } else { - if (shattr == 0) - rc = SEGMENT_EXCLUSIVE_RW; - if (shattr == 1) - rc = SEGMENT_SHARED_RW; - } - break; - - case SEGMENT_EXCLUSIVE_RO: - if (shattr > 0 || rwattr > 1) { - spin_unlock(&dcss_lock); - return -ENOENT; - } else { - if (rwattr == 0) - rc = SEGMENT_EXCLUSIVE_RO; - if (rwattr == 1) - rc = SEGMENT_EXCLUSIVE_RW; - } - break; - - case SEGMENT_EXCLUSIVE_RW: -/* if (shattr != 0 || rwattr != 1) { - spin_unlock(&dcss_lock); - return -ENOENT; - } else { -*/ - rc = SEGMENT_EXCLUSIVE_RW; -// } - break; - - default: - spin_unlock(&dcss_lock); - return -ENOENT; - } /* end switch */ - - seg = kmalloc(sizeof(struct dcss_segment), GFP_DMA); - if (seg != NULL) { - memcpy(seg->dcss_name, dcss_name, 8); - if (rc == SEGMENT_EXCLUSIVE_RW) { - if (dcss_diag(DCSS_LOADNSR, seg->dcss_name, - &seg->start_addr, &seg->end) == 0) { - if (seg->end < max_low_pfn*PAGE_SIZE ) { - atomic_set(&seg->ref_count, 1); - list_add(&seg->list, &dcss_list); - *addr = seg->start_addr; - *end = seg->end; - seg->dcss_attr = rc; - if (shattr == 1 && rwattr == 1) - seg->shared_attr = SEGMENT_SHARED_RW; - else if (shattr == 1 && rwattr == 0) - seg->shared_attr = SEGMENT_SHARED_RO; - else - seg->shared_attr = SEGMENT_EXCLUSIVE_RW; - } else { - dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy); - kfree (seg); - rc = -ENOENT; - } - } else { - kfree(seg); - rc = -ENOENT; - } - goto out; - } - if (dcss_diag(DCSS_LOADNOLY, seg->dcss_name, - &seg->start_addr, &seg->end) == 0) { - if (seg->end < max_low_pfn*PAGE_SIZE ) { - atomic_set(&seg->ref_count, 1); - list_add(&seg->list, &dcss_list); - *addr = seg->start_addr; - *end = seg->end; - seg->dcss_attr = rc; - seg->shared_attr = rc; - } else { - dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy); - kfree (seg); - rc = -ENOENT; - } - } else { - kfree(seg); - rc = -ENOENT; - } - } else rc = -ENOMEM; - } else { - /* found */ - if ((segtype == SEGMENT_EXCLUSIVE_RW) && (seg->dcss_attr != SEGMENT_EXCLUSIVE_RW)) { - PRINT_ERR("Segment already loaded in other mode than EXCLUSIVE_RW!\n"); - rc = -EPERM; - goto out; - /* reload segment in exclusive mode */ -/* dcss_diag(DCSS_LOADNSR, seg->dcss_name, - &seg->start_addr, &seg->end); - seg->dcss_attr = SEGMENT_EXCLUSIVE_RW;*/ - } - if ((segtype != SEGMENT_EXCLUSIVE_RW) && (seg->dcss_attr == SEGMENT_EXCLUSIVE_RW)) { - PRINT_ERR("Segment already loaded in EXCLUSIVE_RW mode!\n"); - rc = -EPERM; - goto out; + struct dcss_segment *seg; + int rc; + + if (!MACHINE_IS_VM) + return -ENOSYS; + + spin_lock (&dcss_lock); + seg = segment_by_name (name); + if (seg == NULL) + rc = __segment_load (name, do_nonshared, addr, end); + else { + if (do_nonshared == seg->do_nonshared) { + atomic_inc(&seg->ref_count); + *addr = seg->start_addr; + *end = seg->end; + rc = seg->vm_segtype; + } else { + *addr = *end = 0; + rc = -EPERM; } - atomic_inc(&seg->ref_count); - *addr = seg->start_addr; - *end = seg->end; - rc = seg->dcss_attr; - } -out: - spin_unlock(&dcss_lock); - return rc; + } + spin_unlock (&dcss_lock); + return rc; } /* @@ -422,84 +400,65 @@ * it from the address space if nobody is using it * any longer. */ -void segment_unload(char *name) +void +segment_unload(char *name) { - char dcss_name[8]; - unsigned long dummy; - struct list_head *l,*l_tmp; - struct dcss_segment *seg; - - if (!MACHINE_IS_VM) - return; - dcss_mkname(name, dcss_name); - spin_lock(&dcss_lock); - list_for_each_safe(l, l_tmp, &dcss_list) { - seg = list_entry(l, struct dcss_segment, list); - if (memcmp(seg->dcss_name, dcss_name, 8) == 0) { - if (atomic_dec_return(&seg->ref_count) == 0) { - /* Last user of the segment is - gone. */ - list_del(&seg->list); - dcss_diag(DCSS_PURGESEG, seg->dcss_name, - &dummy, &dummy); - kfree(seg); - } - break; - } - } - spin_unlock(&dcss_lock); + unsigned long dummy; + struct dcss_segment *seg; + + if (!MACHINE_IS_VM) + return; + + spin_lock(&dcss_lock); + seg = segment_by_name (name); + if (seg == NULL) { + PRINT_ERR ("could not find segment %s in segment_unload, " + "please report to linux390@de.ibm.com\n",name); + goto out_unlock; + } + if (atomic_dec_return(&seg->ref_count) == 0) { + list_del(&seg->list); + dcss_diag(DCSS_PURGESEG, seg->dcss_name, + &dummy, &dummy); + kfree(seg); + } +out_unlock: + spin_unlock(&dcss_lock); } /* - * Replace an existing DCSS segment, so that machines - * that load it anew will see the new version. + * save segment content permanently */ -void segment_replace(char *name) +void segment_save(char *name) { - char dcss_name[8]; - struct list_head *l; - struct dcss_segment *seg; - int mybeg = 0; - int myend = 0; - char mybuff1[80]; - char mybuff2[80]; - - if (!MACHINE_IS_VM) - return; - dcss_mkname(name, dcss_name); - - memset (mybuff1, 0, sizeof(mybuff1)); - memset (mybuff2, 0, sizeof(mybuff2)); - - spin_lock(&dcss_lock); - list_for_each(l, &dcss_list) { - seg = list_entry(l, struct dcss_segment, list); - if (memcmp(seg->dcss_name, dcss_name, 8) == 0) { - mybeg = seg->start_addr >> 12; - myend = (seg->end) >> 12; - if (seg->shared_attr == SEGMENT_EXCLUSIVE_RW) - sprintf(mybuff1, "DEFSEG %s %X-%X EW", - name, mybeg, myend); - if (seg->shared_attr == SEGMENT_EXCLUSIVE_RO) - sprintf(mybuff1, "DEFSEG %s %X-%X RO", - name, mybeg, myend); - if (seg->shared_attr == SEGMENT_SHARED_RW) - sprintf(mybuff1, "DEFSEG %s %X-%X SW", - name, mybeg, myend); - if (seg->shared_attr == SEGMENT_SHARED_RO) - sprintf(mybuff1, "DEFSEG %s %X-%X SR", - name, mybeg, myend); - spin_unlock(&dcss_lock); - sprintf(mybuff2, "SAVESEG %s", name); - cpcmd(mybuff1, NULL, 80); - cpcmd(mybuff2, NULL, 80); - break; - } - - } - if (myend == 0) spin_unlock(&dcss_lock); + struct dcss_segment *seg; + int startpfn = 0; + int endpfn = 0; + char cmd1[80]; + char cmd2[80]; + + if (!MACHINE_IS_VM) + return; + + spin_lock(&dcss_lock); + seg = segment_by_name (name); + + if (seg == NULL) { + PRINT_ERR ("could not find segment %s in segment_save, please report to linux390@de.ibm.com\n",name); + return; + } + + startpfn = seg->start_addr >> 12; + endpfn = (seg->end) >> 12; + sprintf(cmd1, "DEFSEG %s %X-%X %s", name, startpfn, endpfn, + segtype_string[seg->vm_segtype]); + sprintf(cmd2, "SAVESEG %s", name); + cpcmd(cmd1, NULL, 80); + cpcmd(cmd2, NULL, 80); + spin_unlock(&dcss_lock); } EXPORT_SYMBOL(segment_load); EXPORT_SYMBOL(segment_unload); -EXPORT_SYMBOL(segment_replace); +EXPORT_SYMBOL(segment_save); +EXPORT_SYMBOL(segment_info); diff -Nru a/arch/sh/boards/overdrive/pcidma.c b/arch/sh/boards/overdrive/pcidma.c --- a/arch/sh/boards/overdrive/pcidma.c 2004-11-10 17:19:07 -08:00 +++ b/arch/sh/boards/overdrive/pcidma.c 2004-11-10 17:19:07 -08:00 @@ -25,7 +25,7 @@ printk("BUG: pci_alloc_consistent() called - not yet supported\n"); /* We ALWAYS need DMA memory on the overdrive hardware, - * due to it's extreme wierdness + * due to it's extreme weirdness * Need to flush the cache here as well, since the memory * can still be seen through the cache! */ diff -Nru a/arch/sh/kernel/entry.S b/arch/sh/kernel/entry.S --- a/arch/sh/kernel/entry.S 2004-11-10 17:19:04 -08:00 +++ b/arch/sh/kernel/entry.S 2004-11-10 17:19:04 -08:00 @@ -1140,5 +1140,10 @@ .long sys_mq_timedreceive /* 280 */ .long sys_mq_notify .long sys_mq_getsetattr + .long sys_ni_syscall /* Reserved for kexec */ + .long sys_waitid + .long sys_add_key /* 285 */ + .long sys_request_key + .long sys_keyctl /* End of entry.S */ diff -Nru a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c --- a/arch/sh/kernel/signal.c 2004-11-10 17:19:07 -08:00 +++ b/arch/sh/kernel/signal.c 2004-11-10 17:19:07 -08:00 @@ -493,14 +493,12 @@ /* * OK, we're invoking a handler - */ + */ static void -handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, - struct pt_regs * regs) +handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, + sigset_t *oldset, struct pt_regs *regs) { - struct k_sigaction *ka = ¤t->sighand->action[sig-1]; - /* Are we from a system call? */ if (regs->tra >= 0) { /* If so, check system call restarting.. */ @@ -570,6 +568,7 @@ { siginfo_t info; int signr; + struct k_sigaction ka; /* * We want the common case to go fast, which @@ -588,10 +587,10 @@ if (!oldset) oldset = ¤t->blocked; - signr = get_signal_to_deliver(&info, regs, NULL); + signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (signr > 0) { /* Whee! Actually deliver the signal. */ - handle_signal(signr, &info, oldset, regs); + handle_signal(signr, &ka, &info, oldset, regs); return 1; } diff -Nru a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c --- a/arch/sh64/kernel/pci_sh5.c 2004-11-10 17:19:07 -08:00 +++ b/arch/sh64/kernel/pci_sh5.c 2004-11-10 17:19:07 -08:00 @@ -517,7 +517,7 @@ bus->resource[0]->flags |= IORESOURCE_IO; bus->resource[1]->flags |= IORESOURCE_MEM; - /* For now, propogate host limits to the bus; + /* For now, propagate host limits to the bus; * we'll adjust them later. */ #if 1 diff -Nru a/arch/sparc/Kconfig b/arch/sparc/Kconfig --- a/arch/sparc/Kconfig 2004-11-10 17:19:01 -08:00 +++ b/arch/sparc/Kconfig 2004-11-10 17:19:01 -08:00 @@ -86,8 +86,8 @@ depends on BROKEN ---help--- This enables support for systems with more than one CPU. If you have - a system with only one CPU, like most personal computers, say N. If - you have a system with more than one CPU, say Y. + a system with only one CPU, say N. If you have a system with more + than one CPU, say Y. If you say N here, the kernel will run on single and multiprocessor machines, but will use only one CPU of a multiprocessor machine. If @@ -95,17 +95,11 @@ singleprocessor machines. On a singleprocessor machine, the kernel will run faster if you say N here. - Note that if you say Y here and choose architecture "586" or - "Pentium" under "Processor family", the kernel will not work on 486 - architectures. Similarly, multiprocessor kernels for the "PPro" - architecture may not work on all Pentium based boards. - People using multiprocessor machines who say Y here should also say Y to "Enhanced Real Time Clock Support", below. The "Advanced Power Management" code will be disabled if you say Y here. See also the , - , and the SMP-HOWTO available at . @@ -189,10 +183,10 @@ (/dev/tty0) will still be used as the system console by default, but you can alter that using a kernel command line option such as "console=ttyS1". (Try "man bootparam" or see the documentation of - your boot loader (lilo or loadlin) about how to pass options to the - kernel at boot time.) + your boot loader (silo) about how to pass options to the kernel at + boot time.) - If you don't have a VGA card installed and you say Y here, the + If you don't have a graphics card installed and you say Y here, the kernel will automatically use the first serial line, /dev/ttyS0, as system console. @@ -223,6 +217,7 @@ config SUN4 bool "Support for SUN4 machines (disables SUN4[CDM] support)" depends on !SMP + default n help Say Y here if, and only if, your machine is a sun4. Note that a kernel compiled with this option will run only on sun4. @@ -249,7 +244,10 @@ -t openpromfs none /proc/openprom". To compile the /proc/openprom support as a module, choose M here: the - module will be called openpromfs. If unsure, choose M. + module will be called openpromfs. + + Only choose N if you know in advance that you will not need to modify + OpenPROM settings on the running system. source "fs/Kconfig.binfmt" @@ -282,9 +280,9 @@ If you have several parallel ports, you can specify which ports to use with the "lp" kernel command line option. (Try "man bootparam" - or see the documentation of your boot loader (lilo or loadlin) about - how to pass options to the kernel at boot time.) The syntax of the - "lp" command line option can be found in . + or see the documentation of your boot loader (silo) about how to pass + options to the kernel at boot time.) The syntax of the "lp" command + line option can be found in . If you have more than 8 printers, you need to increase the LP_NO macro in lp.c and the PARPORT_MAX macro in parport.h. diff -Nru a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S --- a/arch/sparc/kernel/systbls.S 2004-11-10 17:19:04 -08:00 +++ b/arch/sparc/kernel/systbls.S 2004-11-10 17:19:04 -08:00 @@ -75,7 +75,7 @@ /*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy /*270*/ .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink /*275*/ .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid -/*280*/ .long sys_setaltroot, sys_add_key, sys_request_key, sys_keyctl +/*280*/ .long sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl #ifdef CONFIG_SUNOS_EMUL /* Now the SunOS syscall table. */ diff -Nru a/arch/sparc64/defconfig b/arch/sparc64/defconfig --- a/arch/sparc64/defconfig 2004-11-10 17:19:03 -08:00 +++ b/arch/sparc64/defconfig 2004-11-10 17:19:03 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9 -# Wed Oct 20 15:56:43 2004 +# Linux kernel version: 2.6.10-rc1 +# Sun Oct 31 13:19:19 2004 # CONFIG_64BIT=y CONFIG_MMU=y @@ -12,6 +12,7 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup @@ -33,12 +34,12 @@ # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -144,8 +145,10 @@ # CONFIG_FB_ATY128 is not set CONFIG_FB_ATY=y CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GX=y +# CONFIG_FB_ATY_GENERIC_LCD is not set # CONFIG_FB_ATY_XL_INIT is not set +CONFIG_FB_ATY_GX=y +# CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set @@ -235,6 +238,14 @@ CONFIG_CDROM_PKTCDVD_WCACHE=y # +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y + +# # ATA/ATAPI/MFM/RLL support # CONFIG_IDE=y @@ -251,7 +262,6 @@ # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set -CONFIG_IDE_TASKFILE_IO=y # # IDE chipset support/bugfixes @@ -543,6 +553,7 @@ # CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -573,6 +584,8 @@ CONFIG_IP_NF_MATCH_REALM=m CONFIG_IP_NF_MATCH_SCTP=m CONFIG_IP_NF_MATCH_COMMENT=m +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -596,6 +609,8 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m @@ -692,7 +707,6 @@ CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -731,6 +745,7 @@ CONFIG_NET_ACT_GACT=m CONFIG_GACT_PROB=y CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_PEDIT=m # # Network testing @@ -892,7 +907,6 @@ CONFIG_SUNDANCE_MMIO=y CONFIG_VIA_RHINE=m # CONFIG_VIA_RHINE_MMIO is not set -CONFIG_VIA_VELOCITY=m # # Ethernet (1000 Mbit) @@ -909,6 +923,7 @@ CONFIG_R8169=m CONFIG_R8169_NAPI=y CONFIG_SK98LIN=m +CONFIG_VIA_VELOCITY=m CONFIG_TIGON3=m # @@ -1220,6 +1235,7 @@ CONFIG_ROMFS_FS=m # CONFIG_QUOTA is not set CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m @@ -1464,6 +1480,8 @@ # CONFIG_DVB_TTUSB_BUDGET is not set CONFIG_DVB_TTUSB_DEC=m CONFIG_DVB_DIBUSB=m +CONFIG_DVB_CINERGYT2=m +# CONFIG_DVB_CINERGYT2_TUNING is not set # # Supported FlexCopII (B2C2) Adapters @@ -1530,6 +1548,7 @@ CONFIG_SND_AU8830=m CONFIG_SND_AZT3328=m CONFIG_SND_BT87X=m +# CONFIG_SND_BT87X_OVERCLOCK is not set CONFIG_SND_CS46XX=m # CONFIG_SND_CS46XX_NEW_DSP is not set CONFIG_SND_CS4281=m @@ -1561,7 +1580,7 @@ CONFIG_SND_VX222=m # -# ALSA USB devices +# USB devices # # CONFIG_SND_USB_AUDIO is not set CONFIG_SND_USB_USX2Y=m @@ -1585,6 +1604,8 @@ # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers @@ -1619,7 +1640,7 @@ # CONFIG_USB_STORAGE_JUMPSHOT is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y @@ -1743,6 +1764,7 @@ CONFIG_USB_LCD=m CONFIG_USB_LED=m CONFIG_USB_CYTHERM=m +CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_TEST=m @@ -1797,6 +1819,7 @@ # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_STACK_USAGE is not set diff -Nru a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c --- a/arch/sparc64/kernel/kprobes.c 2004-11-10 17:19:06 -08:00 +++ b/arch/sparc64/kernel/kprobes.c 2004-11-10 17:19:06 -08:00 @@ -15,7 +15,7 @@ * traps. The top-level scheme is similar to that used * in the x86 kprobes implementation. * - * In the kprobe->insn[] array we store the original + * In the kprobe->ainsn.insn[] array we store the original * instruction at index zero and a break instruction at * index one. * @@ -24,12 +24,12 @@ * - Remember "regs->tnpc" and interrupt level stored in * "regs->tstate" so we can restore them later * - Disable PIL interrupts - * - Set regs->tpc to point to kprobe->insn[0] - * - Set regs->tnpc to point to kprobe->insn[1] + * - Set regs->tpc to point to kprobe->ainsn.insn[0] + * - Set regs->tnpc to point to kprobe->ainsn.insn[1] * - Mark that we are actively in a kprobe * * At this point we wait for the second breakpoint at - * kprobe->insn[1] to hit. When it does we: + * kprobe->ainsn.insn[1] to hit. When it does we: * - Run the post-handler * - Set regs->tpc to "remembered" regs->tnpc stored above, * restore the PIL interrupt level in "regs->tstate" as well @@ -38,10 +38,15 @@ * - Mark that we are no longer actively in a kprobe. */ -void arch_prepare_kprobe(struct kprobe *p) +int arch_prepare_kprobe(struct kprobe *p) +{ + p->ainsn.insn[0] = *p->addr; + p->ainsn.insn[1] = BREAKPOINT_INSTRUCTION_2; + return 0; +} + +void arch_remove_kprobe(struct kprobe *p) { - p->insn[0] = *p->addr; - p->insn[1] = BREAKPOINT_INSTRUCTION_2; } /* kprobe_status settings */ @@ -59,8 +64,8 @@ current_kprobe_orig_tstate_pil = (regs->tstate & TSTATE_PIL); regs->tstate |= TSTATE_PIL; - regs->tpc = (unsigned long) &p->insn[0]; - regs->tnpc = (unsigned long) &p->insn[1]; + regs->tpc = (unsigned long) &p->ainsn.insn[0]; + regs->tnpc = (unsigned long) &p->ainsn.insn[1]; } static inline void disarm_kprobe(struct kprobe *p, struct pt_regs *regs) @@ -199,19 +204,19 @@ * instruction. To avoid the SMP problems that can occur when we * temporarily put back the original opcode to single-step, we * single-stepped a copy of the instruction. The address of this - * copy is p->insn. + * copy is p->ainsn.insn. * * This function prepares to return from the post-single-step * breakpoint trap. */ static void resume_execution(struct kprobe *p, struct pt_regs *regs) { - u32 insn = p->insn[0]; + u32 insn = p->ainsn.insn[0]; regs->tpc = current_kprobe_orig_tnpc; regs->tnpc = relbranch_fixup(insn, (unsigned long) p->addr, - (unsigned long) &p->insn[0], + (unsigned long) &p->ainsn.insn[0], regs->tnpc); retpc_fixup(regs, insn, (unsigned long) p->addr); diff -Nru a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c --- a/arch/sparc64/kernel/sparc64_ksyms.c 2004-11-10 17:19:06 -08:00 +++ b/arch/sparc64/kernel/sparc64_ksyms.c 2004-11-10 17:19:06 -08:00 @@ -177,7 +177,7 @@ EXPORT_SYMBOL(__atomic64_add); EXPORT_SYMBOL(__atomic64_sub); #ifdef CONFIG_SMP -EXPORT_SYMBOL(atomic_dec_and_lock); +EXPORT_SYMBOL(_atomic_dec_and_lock); #endif /* Atomic bit operations. */ diff -Nru a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S --- a/arch/sparc64/kernel/systbls.S 2004-11-10 17:19:04 -08:00 +++ b/arch/sparc64/kernel/systbls.S 2004-11-10 17:19:04 -08:00 @@ -76,7 +76,7 @@ .word sys_timer_delete, sys32_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink .word sys_mq_timedsend, sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid -/*280*/ .word sys_setaltroot, sys_add_key, sys_request_key, sys_keyctl +/*280*/ .word sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl #endif /* CONFIG_COMPAT */ @@ -142,7 +142,7 @@ .word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy /*270*/ .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid -/*280*/ .word sys_setaltroot, sys_add_key, sys_request_key, sys_keyctl +/*280*/ .word sys_nis_syscall, sys_add_key, sys_request_key, sys_keyctl #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ defined(CONFIG_SOLARIS_EMUL_MODULE) diff -Nru a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c --- a/arch/sparc64/kernel/time.c 2004-11-10 17:19:04 -08:00 +++ b/arch/sparc64/kernel/time.c 2004-11-10 17:19:04 -08:00 @@ -1046,6 +1046,7 @@ static struct time_interpolator sparc64_cpu_interpolator = { .source = TIME_SOURCE_CPU, .shift = 16, + .mask = 0xffffffffffffffffLL }; /* The quotient formula is taken from the IA64 port. */ diff -Nru a/arch/sparc64/lib/dec_and_lock.S b/arch/sparc64/lib/dec_and_lock.S --- a/arch/sparc64/lib/dec_and_lock.S 2004-11-10 17:19:04 -08:00 +++ b/arch/sparc64/lib/dec_and_lock.S 2004-11-10 17:19:04 -08:00 @@ -25,8 +25,8 @@ * } */ - .globl atomic_dec_and_lock -atomic_dec_and_lock: /* %o0 = counter, %o1 = lock */ + .globl _atomic_dec_and_lock +_atomic_dec_and_lock: /* %o0 = counter, %o1 = lock */ loop1: lduw [%o0], %g5 subcc %g5, 1, %g7 be,pn %icc, start_to_zero diff -Nru a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c --- a/arch/sparc64/mm/init.c 2004-11-10 17:19:04 -08:00 +++ b/arch/sparc64/mm/init.c 2004-11-10 17:19:04 -08:00 @@ -1745,6 +1745,7 @@ page = (addr + ((unsigned long) __va(kern_base)) - ((unsigned long) KERNBASE)); + memset((void *)addr, 0xcc, PAGE_SIZE); p = virt_to_page(page); ClearPageReserved(p); diff -Nru a/arch/um/Kconfig b/arch/um/Kconfig --- a/arch/um/Kconfig 2004-11-10 17:19:04 -08:00 +++ b/arch/um/Kconfig 2004-11-10 17:19:04 -08:00 @@ -1,3 +1,8 @@ +# UML uses the generic IRQ sugsystem +config GENERIC_HARDIRQS + bool + default y + config USERMODE bool default y @@ -100,7 +105,8 @@ say Y or M here; otherwise say N. config HPPFS - tristate "HoneyPot ProcFS" + tristate "HoneyPot ProcFS (EXPERIMENTAL)" + depends on BROKEN help hppfs (HoneyPot ProcFS) is a filesystem which allows UML /proc entries to be overridden, removed, or fabricated from the host. @@ -113,8 +119,12 @@ You only need this if you are setting up a UML honeypot. Otherwise, it is safe to say 'N' here. + If you are actively using it, please ask for it to be fixed. In this + moment, it does not work on 2.6 (it works somehow on 2.4). + config MCONSOLE bool "Management console" + default y help The user mode linux management console is a low-level interface to the kernel, somewhat like the i386 SysRq interface. Since there is @@ -131,19 +141,40 @@ config HOST_2G_2G bool "2G/2G host address space split" + default n + help + This is needed when the host on which you run has a 2G/2G memory + split, instead of the customary 3G/1G. + + Note that to enable such a host + configuration, which makes sense only in some cases, you need special + host patches. + + So, if you do not know what to do here, say 'N'. config SMP - bool "Symmetric multi-processing support" + bool "Symmetric multi-processing support (EXPERIMENTAL)" default n + depends on MODE_TT && EXPERIMENTAL help - This option enables UML SMP support. UML implements virtual SMP by - allowing as many processes to run simultaneously on the host as - there are virtual processors configured. Obviously, if the host is - a uniprocessor, those processes will timeshare, but, inside UML, - will appear to be running simultaneously. If the host is a - multiprocessor, then UML processes may run simultaneously, depending - on the host scheduler. - It is safe to leave this unchanged. + This option enables UML SMP support. + It is NOT related to having a real SMP box. Not directly, at least. + + UML implements virtual SMP by allowing as many processes to run + simultaneously on the host as there are virtual processors configured. + + Obviously, if the host is a uniprocessor, those processes will + timeshare, but, inside UML, will appear to be running simultaneously. + If the host is a multiprocessor, then UML processes may run + simultaneously, depending on the host scheduler. + + This, however, is supported only in TT mode. So, if you use the SKAS + patch on your host, switching to TT mode and enabling SMP usually gives + you worse performances. + Also, since the support for SMP has been under-developed, there could + be some bugs being exposed by enabling SMP. + + If you don't know what to do, say N. config NR_CPUS int "Maximum number of CPUs (2-32)" @@ -246,5 +277,9 @@ if BROKEN source "drivers/mtd/Kconfig" endif + +config INPUT + bool + default n source "arch/um/Kconfig.debug" diff -Nru a/arch/um/Kconfig_block b/arch/um/Kconfig_block --- a/arch/um/Kconfig_block 2004-11-10 17:19:05 -08:00 +++ b/arch/um/Kconfig_block 2004-11-10 17:19:05 -08:00 @@ -52,6 +52,33 @@ bool "Initial RAM disk (initrd) support" depends on BLK_DEV_RAM=y +#Copied directly from drivers/block/Kconfig +config INITRAMFS_SOURCE + string "Source directory of cpio_list" + default "" + help + This can be set to either a directory containing files, etc to be + included in the initramfs archive, or a file containing newline + separated entries. + + If it is a file, it should be in the following format: + # a comment + file + dir + nod + + Where: + name of the file/dir/nod in the archive + location of the file in the current filesystem + mode/permissions of the file + user id (0=root) + group id (0=root) + device type (b=block, c=character) + major number of nod + minor number of nod + + If you are not sure, leave it blank. + config MMAPPER tristate "Example IO memory driver" depends on BROKEN diff -Nru a/arch/um/Makefile b/arch/um/Makefile --- a/arch/um/Makefile 2004-11-10 17:19:05 -08:00 +++ b/arch/um/Makefile 2004-11-10 17:19:05 -08:00 @@ -5,7 +5,8 @@ ARCH_DIR = arch/um OS := $(shell uname -s) -#We require it or things break. +# We require bash because the vmlinux link and loader script cpp use bash +# features. SHELL := /bin/bash filechk_gen_header = $< @@ -62,16 +63,18 @@ $(SYS_HEADERS) : $(ARCH_DIR)/include/skas_ptregs.h endif +.PHONY: linux + all: linux linux: vmlinux - $(RM) $@ - ln $< $@ + ln -f $< $@ define archhelp echo '* linux - Binary kernel image (./linux) - for backward' - echo ' compatibility only: now you can simply run' - echo ' the vmlinux binary you find in the kernel root.' + echo ' compatibility only, this creates a hard link to the' + echo ' real kernel binary, the the "vmlinux" binary you' + echo ' find in the kernel root.' endef prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) \ @@ -117,7 +120,8 @@ -Wl,-T,$(vmlinux-lds) $(vmlinux-init) \ -Wl,--start-group $(vmlinux-main) -Wl,--end-group \ -L/usr/lib -lutil \ - $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE ,$^) + $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) \ + FORCE ,$^) ; rm -f linux endef USER_CFLAGS := $(patsubst -I%,,$(CFLAGS)) diff -Nru a/arch/um/defconfig b/arch/um/defconfig --- a/arch/um/defconfig 2004-11-10 17:19:05 -08:00 +++ b/arch/um/defconfig 2004-11-10 17:19:05 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc2-mm1 -# Thu Sep 16 23:44:48 2004 +# Linux kernel version: 2.6.9-bk4 +# Thu Oct 21 01:09:54 2004 # CONFIG_USERMODE=y CONFIG_MMU=y @@ -15,15 +15,13 @@ CONFIG_MODE_SKAS=y CONFIG_NET=y CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y +CONFIG_BINFMT_MISC=m CONFIG_HOSTFS=y -CONFIG_HPPFS=y CONFIG_MCONSOLE=y # CONFIG_HOST_2G_2G is not set # CONFIG_SMP is not set CONFIG_NEST_LEVEL=0 CONFIG_KERNEL_HALF_GIGS=1 -# CONFIG_HIGHMEM is not set CONFIG_KERNEL_STACK_ORDER=2 CONFIG_UML_REAL_TIME_CLOCK=y @@ -40,7 +38,7 @@ CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set +CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y @@ -48,11 +46,12 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set CONFIG_KOBJECT_UEVENT=y -# CONFIG_IKCONFIG is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -66,7 +65,12 @@ # # Loadable module support # -# CONFIG_MODULES is not set +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y # # Generic Driver Options @@ -86,6 +90,7 @@ CONFIG_PTY_CHAN=y CONFIG_TTY_CHAN=y CONFIG_XTERM_CHAN=y +# CONFIG_NOCONFIG_CHAN is not set CONFIG_CON_ZERO_CHAN="fd:0,fd:1" CONFIG_CON_CHAN="xterm" CONFIG_SSL_CHAN="pty" @@ -93,22 +98,21 @@ CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_WATCHDOG is not set -CONFIG_UML_SOUND=y -CONFIG_SOUND=y -CONFIG_HOSTAUDIO=y +CONFIG_UML_SOUND=m +CONFIG_SOUND=m +CONFIG_HOSTAUDIO=m # # Block Devices # CONFIG_BLK_DEV_UBD=y -# CONFIG_BLK_DEV_UBD_SYNC is not set +CONFIG_BLK_DEV_UBD_SYNC=y CONFIG_BLK_DEV_COW_COMMON=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=y +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y -# CONFIG_MMAPPER is not set CONFIG_NETDEVICES=y # @@ -120,7 +124,6 @@ CONFIG_UML_NET_SLIP=y CONFIG_UML_NET_DAEMON=y CONFIG_UML_NET_MCAST=y -# CONFIG_UML_NET_PCAP is not set CONFIG_UML_NET_SLIRP=y # @@ -178,18 +181,15 @@ # Network testing # # CONFIG_NET_PKTGEN is not set -# CONFIG_KGDBOE is not set # CONFIG_NETPOLL is not set -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set # CONFIG_NET_POLL_CONTROLLER is not set # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -CONFIG_DUMMY=y +CONFIG_DUMMY=m # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set -CONFIG_TUN=y +CONFIG_TUN=m # # Ethernet (10 or 100Mbit) @@ -217,7 +217,7 @@ # Wan interfaces # # CONFIG_WAN is not set -CONFIG_PPP=y +CONFIG_PPP=m # CONFIG_PPP_MULTILINK is not set # CONFIG_PPP_FILTER is not set # CONFIG_PPP_ASYNC is not set @@ -225,7 +225,7 @@ # CONFIG_PPP_DEFLATE is not set # CONFIG_PPP_BSDCOMP is not set # CONFIG_PPPOE is not set -CONFIG_SLIP=y +CONFIG_SLIP=m # CONFIG_SLIP_COMPRESSED is not set # CONFIG_SLIP_SMART is not set # CONFIG_SLIP_MODE_SLIP6 is not set @@ -237,47 +237,38 @@ # CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -CONFIG_REISER4_FS=y -CONFIG_REISER4_LARGE_KEY=y -# CONFIG_REISER4_CHECK is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set CONFIG_REISERFS_FS=y # CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_PROC_INFO is not set # CONFIG_REISERFS_FS_XATTR is not set # CONFIG_JFS_FS is not set # CONFIG_XFS_FS is not set -CONFIG_MINIX_FS=y +# CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y - -# -# Caches -# -# CONFIG_CACHEFS is not set +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m # # CD-ROM/DVD Filesystems # -CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y # CONFIG_ZISOFS is not set # CONFIG_UDF_FS is not set # # DOS/FAT/NT Filesystems # -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # @@ -286,11 +277,10 @@ CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_SYSFS=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -304,10 +294,6 @@ # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -CONFIG_JFFS_FS=y -CONFIG_JFFS_FS_VERBOSE=0 -# CONFIG_JFFS_PROC_FS is not set -# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -396,75 +382,10 @@ # CONFIG_LIBCRC32C is not set # -# SCSI support -# -# CONFIG_SCSI is not set - -# # Multi-device support (RAID and LVM) # # CONFIG_MD is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_PARTITIONS is not set -# CONFIG_MTD_CONCAT is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -CONFIG_MTD_BLKMTD=y - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set +# CONFIG_INPUT is not set # # Kernel hacking diff -Nru a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c --- a/arch/um/drivers/chan_user.c 2004-11-10 17:19:02 -08:00 +++ b/arch/um/drivers/chan_user.c 2004-11-10 17:19:02 -08:00 @@ -27,14 +27,26 @@ int err; if(isatty(fd)){ - tcgetattr(fd, &save); + CATCH_EINTR(err = tcgetattr(fd, &save)); + if (err) + goto error; new = save; + /* The terminal becomes a bit less raw, to handle \n also as + * "Carriage Return", not only as "New Line". Otherwise, the new + * line won't start at the first column.*/ new.c_oflag |= OPOST; - tcsetattr(fd, TCSAFLUSH, &new); + CATCH_EINTR(err = tcsetattr(fd, TCSAFLUSH, &new)); + if (err) + goto error; } err = generic_write(fd, buf, n, NULL); - if(isatty(fd)) tcsetattr(fd, TCSAFLUSH, &save); + /* Restore raw mode, in any case; we *must* ignore any error apart + * EINTR, except for debug.*/ + if(isatty(fd)) + CATCH_EINTR(tcsetattr(fd, TCSAFLUSH, &save)); return(err); +error: + return(-errno); } static void winch_handler(int sig) diff -Nru a/arch/um/drivers/line.c b/arch/um/drivers/line.c --- a/arch/um/drivers/line.c 2004-11-10 17:19:06 -08:00 +++ b/arch/um/drivers/line.c 2004-11-10 17:19:06 -08:00 @@ -110,7 +110,6 @@ int line_write(struct line *lines, struct tty_struct *tty, const char *buf, int len) { struct line *line; - char *new; unsigned long flags; int n, err, i, ret = 0; @@ -143,7 +142,6 @@ } out_up: up(&line->sem); - out_free: return(ret); } @@ -203,13 +201,17 @@ if(line->driver->read_irq == current_irq) free_irq_later(line->driver->read_irq, line); - else + else { + free_irq_by_irq_and_dev(line->driver->read_irq, line); free_irq(line->driver->read_irq, line); + } if(line->driver->write_irq == current_irq) free_irq_later(line->driver->write_irq, line); - else + else { + free_irq_by_irq_and_dev(line->driver->write_irq, line); free_irq(line->driver->write_irq, line); + } line->have_irq = 0; } diff -Nru a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c --- a/arch/um/drivers/mconsole_kern.c 2004-11-10 17:19:02 -08:00 +++ b/arch/um/drivers/mconsole_kern.c 2004-11-10 17:19:02 -08:00 @@ -19,6 +19,7 @@ #include "linux/fs.h" #include "linux/namei.h" #include "linux/proc_fs.h" +#include "linux/syscalls.h" #include "asm/irq.h" #include "asm/uaccess.h" #include "user_util.h" @@ -118,6 +119,11 @@ mconsole_reply(req, "", 0, 0); } +/* This is a more convoluted version of mconsole_proc, which has some stability + * problems; however, we need it fixed, because it is expected that UML users + * mount HPPFS instead of procfs on /proc. And we want mconsole_proc to still + * show the real procfs content, not the ones from hppfs.*/ +#if 0 void mconsole_proc(struct mc_request *req) { struct nameidata nd; @@ -149,6 +155,9 @@ nd.flags = O_RDONLY + 1; nd.last_type = LAST_ROOT; + /* START: it was experienced that the stability problems are closed + * if commenting out these two calls + the below read cycle. To + * make UML crash again, it was enough to readd either one.*/ err = link_path_walk(ptr, &nd); if(err){ mconsole_reply(req, "Failed to look up file", 1, 0); @@ -160,6 +169,7 @@ mconsole_reply(req, "Failed to open file", 1, 0); goto out_kill; } + /*END*/ buf = kmalloc(PAGE_SIZE, GFP_KERNEL); if(buf == NULL){ @@ -191,6 +201,62 @@ out_kill: deactivate_super(super); out: ; +} +#endif + +void mconsole_proc(struct mc_request *req) +{ + char path[64]; + char *buf; + int len; + int fd; + int first_chunk = 1; + char *ptr = req->request.data; + + ptr += strlen("proc"); + while(isspace(*ptr)) ptr++; + snprintf(path, sizeof(path), "/proc/%s", ptr); + + fd = sys_open(path, 0, 0); + if (fd < 0) { + mconsole_reply(req, "Failed to open file", 1, 0); + printk("open %s: %d\n",path,fd); + goto out; + } + + buf = kmalloc(PAGE_SIZE, GFP_KERNEL); + if(buf == NULL){ + mconsole_reply(req, "Failed to allocate buffer", 1, 0); + goto out_close; + } + + for (;;) { + len = sys_read(fd, buf, PAGE_SIZE-1); + if (len < 0) { + mconsole_reply(req, "Read of file failed", 1, 0); + goto out_free; + } + /*Begin the file content on his own line.*/ + if (first_chunk) { + mconsole_reply(req, "\n", 0, 1); + first_chunk = 0; + } + if (len == PAGE_SIZE-1) { + buf[len] = '\0'; + mconsole_reply(req, buf, 0, 1); + } else { + buf[len] = '\0'; + mconsole_reply(req, buf, 0, 0); + break; + } + } + + out_free: + kfree(buf); + out_close: + sys_close(fd); + out: + /* nothing */; } #define UML_MCONSOLE_HELPTEXT \ diff -Nru a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c --- a/arch/um/drivers/net_kern.c 2004-11-10 17:19:04 -08:00 +++ b/arch/um/drivers/net_kern.c 2004-11-10 17:19:04 -08:00 @@ -148,6 +148,7 @@ netif_stop_queue(dev); spin_lock(&lp->lock); + free_irq_by_irq_and_dev(dev->irq, dev); free_irq(dev->irq, dev); if(lp->close != NULL) (*lp->close)(lp->fd, &lp->user); lp->fd = -1; diff -Nru a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c --- a/arch/um/drivers/port_kern.c 2004-11-10 17:19:02 -08:00 +++ b/arch/um/drivers/port_kern.c 2004-11-10 17:19:02 -08:00 @@ -242,6 +242,7 @@ * connection. Then we loop here throwing out failed * connections until a good one is found. */ + free_irq_by_irq_and_dev(TELNETD_IRQ, conn); free_irq(TELNETD_IRQ, conn); if(conn->fd >= 0) break; diff -Nru a/arch/um/drivers/port_user.c b/arch/um/drivers/port_user.c --- a/arch/um/drivers/port_user.c 2004-11-10 17:19:05 -08:00 +++ b/arch/um/drivers/port_user.c 2004-11-10 17:19:05 -08:00 @@ -123,11 +123,17 @@ int port_listen_fd(int port) { struct sockaddr_in addr; - int fd, err; + int fd, err, arg; fd = socket(PF_INET, SOCK_STREAM, 0); if(fd == -1) return(-errno); + + arg = 1; + if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &arg, sizeof(arg)) < 0){ + err = -errno; + goto out; + } addr.sin_family = AF_INET; addr.sin_port = htons(port); diff -Nru a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c --- a/arch/um/drivers/ssl.c 2004-11-10 17:19:04 -08:00 +++ b/arch/um/drivers/ssl.c 2004-11-10 17:19:04 -08:00 @@ -119,7 +119,7 @@ static void ssl_put_char(struct tty_struct *tty, unsigned char ch) { - line_write(serial_lines, tty, 0, &ch, sizeof(ch)); + line_write(serial_lines, tty, &ch, sizeof(ch)); } static void ssl_flush_chars(struct tty_struct *tty) diff -Nru a/arch/um/drivers/xterm_kern.c b/arch/um/drivers/xterm_kern.c --- a/arch/um/drivers/xterm_kern.c 2004-11-10 17:19:05 -08:00 +++ b/arch/um/drivers/xterm_kern.c 2004-11-10 17:19:05 -08:00 @@ -63,6 +63,7 @@ } down(&data->sem); + free_irq_by_irq_and_dev(XTERM_IRQ, data); free_irq(XTERM_IRQ, data); ret = data->new_fd; diff -Nru a/arch/um/include/irq_user.h b/arch/um/include/irq_user.h --- a/arch/um/include/irq_user.h 2004-11-10 17:19:05 -08:00 +++ b/arch/um/include/irq_user.h 2004-11-10 17:19:05 -08:00 @@ -10,7 +10,7 @@ extern void sigio_handler(int sig, union uml_pt_regs *regs); extern int activate_fd(int irq, int fd, int type, void *dev_id); -extern void free_irq_by_irq_and_dev(int irq, void *dev_id); +extern void free_irq_by_irq_and_dev(unsigned int irq, void *dev_id); extern void free_irq_by_fd(int fd); extern void reactivate_fd(int fd, int irqnum); extern void deactivate_fd(int fd, int irqnum); diff -Nru a/arch/um/include/mem_user.h b/arch/um/include/mem_user.h --- a/arch/um/include/mem_user.h 2004-11-10 17:19:05 -08:00 +++ b/arch/um/include/mem_user.h 2004-11-10 17:19:05 -08:00 @@ -67,6 +67,7 @@ extern int protect_memory(unsigned long addr, unsigned long len, int r, int w, int x, int must_succeed); extern unsigned long get_kmem_end(void); +extern void check_tmpexec(void); #endif diff -Nru a/arch/um/include/mode.h b/arch/um/include/mode.h --- a/arch/um/include/mode.h 2004-11-10 17:19:05 -08:00 +++ b/arch/um/include/mode.h 2004-11-10 17:19:05 -08:00 @@ -9,11 +9,11 @@ #include "uml-config.h" #ifdef UML_CONFIG_MODE_TT -#include "../kernel/tt/include/mode.h" +#include "mode-tt.h" #endif #ifdef UML_CONFIG_MODE_SKAS -#include "../kernel/skas/include/mode.h" +#include "mode-skas.h" #endif #endif diff -Nru a/arch/um/include/mode_kern.h b/arch/um/include/mode_kern.h --- a/arch/um/include/mode_kern.h 2004-11-10 17:19:04 -08:00 +++ b/arch/um/include/mode_kern.h 2004-11-10 17:19:04 -08:00 @@ -9,11 +9,11 @@ #include "linux/config.h" #ifdef CONFIG_MODE_TT -#include "../kernel/tt/include/mode_kern.h" +#include "mode_kern-tt.h" #endif #ifdef CONFIG_MODE_SKAS -#include "../kernel/skas/include/mode_kern.h" +#include "mode_kern-skas.h" #endif #endif diff -Nru a/arch/um/include/os.h b/arch/um/include/os.h --- a/arch/um/include/os.h 2004-11-10 17:19:03 -08:00 +++ b/arch/um/include/os.h 2004-11-10 17:19:03 -08:00 @@ -157,6 +157,7 @@ extern int os_process_parent(int pid); extern void os_stop_process(int pid); extern void os_kill_process(int pid, int reap_child); +extern void os_kill_ptraced_process(int pid, int reap_child); extern void os_usr1_process(int pid); extern int os_getpid(void); diff -Nru a/arch/um/include/ptrace_user.h b/arch/um/include/ptrace_user.h --- a/arch/um/include/ptrace_user.h 2004-11-10 17:19:02 -08:00 +++ b/arch/um/include/ptrace_user.h 2004-11-10 17:19:02 -08:00 @@ -15,4 +15,15 @@ extern void arch_leave_kernel(void *task, int pid); extern void ptrace_pokeuser(unsigned long addr, unsigned long data); + +/* syscall emulation path in ptrace */ + +#ifndef PTRACE_SYSEMU +#define PTRACE_SYSEMU 31 +#endif + +void set_using_sysemu(int value); +int get_using_sysemu(void); +extern int sysemu_supported; + #endif diff -Nru a/arch/um/include/um_mmu.h b/arch/um/include/um_mmu.h --- a/arch/um/include/um_mmu.h 2004-11-10 17:19:05 -08:00 +++ b/arch/um/include/um_mmu.h 2004-11-10 17:19:05 -08:00 @@ -10,11 +10,11 @@ #include "choose-mode.h" #ifdef CONFIG_MODE_TT -#include "../kernel/tt/include/mmu.h" +#include "mmu-tt.h" #endif #ifdef CONFIG_MODE_SKAS -#include "../kernel/skas/include/mmu.h" +#include "mmu-skas.h" #endif typedef union { diff -Nru a/arch/um/include/um_uaccess.h b/arch/um/include/um_uaccess.h --- a/arch/um/include/um_uaccess.h 2004-11-10 17:19:05 -08:00 +++ b/arch/um/include/um_uaccess.h 2004-11-10 17:19:05 -08:00 @@ -10,11 +10,11 @@ #include "choose-mode.h" #ifdef CONFIG_MODE_TT -#include "../kernel/tt/include/uaccess.h" +#include "uaccess-tt.h" #endif #ifdef CONFIG_MODE_SKAS -#include "../kernel/skas/include/uaccess.h" +#include "uaccess-skas.h" #endif #define access_ok(type, addr, size) \ diff -Nru a/arch/um/include/user_util.h b/arch/um/include/user_util.h --- a/arch/um/include/user_util.h 2004-11-10 17:19:02 -08:00 +++ b/arch/um/include/user_util.h 2004-11-10 17:19:02 -08:00 @@ -8,7 +8,7 @@ #include "sysdep/ptrace.h" -#define CATCH_EINTR(expr) while (((expr) < 0) && (errno == EINTR)) +#define CATCH_EINTR(expr) while ((errno = 0, ((expr) < 0)) && (errno == EINTR)) extern int mode_tt; diff -Nru a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S --- a/arch/um/kernel/dyn.lds.S 2004-11-10 17:19:04 -08:00 +++ b/arch/um/kernel/dyn.lds.S 2004-11-10 17:19:04 -08:00 @@ -59,6 +59,8 @@ .text : { *(.text) SCHED_TEXT + LOCK_TEXT + *(.fixup) *(.stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) diff -Nru a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c --- a/arch/um/kernel/irq.c 2004-11-10 17:19:06 -08:00 +++ b/arch/um/kernel/irq.c 2004-11-10 17:19:06 -08:00 @@ -32,58 +32,6 @@ #include "irq_user.h" #include "irq_kern.h" -static void register_irq_proc (unsigned int irq); - -irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = { - [0 ... NR_IRQS-1] = { - .handler = &no_irq_type, - .lock = SPIN_LOCK_UNLOCKED - } -}; - -/* - * Generic no controller code - */ - -static void enable_none(unsigned int irq) { } -static unsigned int startup_none(unsigned int irq) { return 0; } -static void disable_none(unsigned int irq) { } -static void ack_none(unsigned int irq) -{ -/* - * 'what should we do if we get a hw irq event on an illegal vector'. - * each architecture has to answer this themselves, it doesn't deserve - * a generic callback i think. - */ -#ifdef CONFIG_X86 - printk(KERN_ERR "unexpected IRQ trap at vector %02x\n", irq); -#ifdef CONFIG_X86_LOCAL_APIC - /* - * Currently unexpected vectors happen only on SMP and APIC. - * We _must_ ack these because every local APIC has only N - * irq slots per priority level, and a 'hanging, unacked' IRQ - * holds up an irq slot - in excessive cases (when multiple - * unexpected vectors occur) that might lock up the APIC - * completely. - */ - ack_APIC_irq(); -#endif -#endif -} - -/* startup is the same as "enable", shutdown is same as "disable" */ -#define shutdown_none disable_none -#define end_none enable_none - -struct hw_interrupt_type no_irq_type = { - "none", - startup_none, - shutdown_none, - enable_none, - disable_none, - ack_none, - end_none -}; /* * Generic, controller-independent functions: @@ -126,10 +74,6 @@ skip: spin_unlock_irqrestore(&irq_desc[i].lock, flags); } else if (i == NR_IRQS) { - seq_printf(p, "NMI: "); - for (j = 0; j < NR_CPUS; j++) - if (cpu_online(j)) - seq_printf(p, "%10u ", nmi_count(j)); seq_putc(p, '\n'); } @@ -137,295 +81,18 @@ } /* - * This should really return information about whether - * we should do bottom half handling etc. Right now we - * end up _always_ checking the bottom half, which is a - * waste of time and is not what some drivers would - * prefer. - */ -int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, - struct irqaction * action) -{ - int status = 1; /* Force the "do bottom halves" bit */ - int ret, retval = 0; - - if (!(action->flags & SA_INTERRUPT)) - local_irq_enable(); - - do { - ret = action->handler(irq, action->dev_id, regs); - if (ret == IRQ_HANDLED) - status |= action->flags; - retval |= ret; - action = action->next; - } while (action); - if (status & SA_SAMPLE_RANDOM) - add_interrupt_randomness(irq); - - local_irq_disable(); - - return retval; -} - -/* - * Generic enable/disable code: this just calls - * down into the PIC-specific version for the actual - * hardware disable after having gotten the irq - * controller lock. - */ - -/** - * disable_irq_nosync - disable an irq without waiting - * @irq: Interrupt to disable - * - * Disable the selected interrupt line. Disables of an interrupt - * stack. Unlike disable_irq(), this function does not ensure existing - * instances of the IRQ handler have completed before returning. - * - * This function may be called from IRQ context. - */ - -inline void disable_irq_nosync(unsigned int irq) -{ - irq_desc_t *desc = irq_desc + irq; - unsigned long flags; - - spin_lock_irqsave(&desc->lock, flags); - if (!desc->depth++) { - desc->status |= IRQ_DISABLED; - desc->handler->disable(irq); - } - spin_unlock_irqrestore(&desc->lock, flags); -} - -#ifdef CONFIG_SMP -inline void synchronize_irq(unsigned int irq) -{ - /* is there anything to synchronize with? */ - if (!irq_desc[irq].action) - return; - - while (irq_desc[irq].status & IRQ_INPROGRESS) - cpu_relax(); -} -#endif - -/** - * disable_irq - disable an irq and wait for completion - * @irq: Interrupt to disable - * - * Disable the selected interrupt line. Disables of an interrupt - * stack. That is for two disables you need two enables. This - * function waits for any pending IRQ handlers for this interrupt - * to complete before returning. If you use this function while - * holding a resource the IRQ handler may need you will deadlock. - * - * This function may be called - with care - from IRQ context. - */ - -void disable_irq(unsigned int irq) -{ - disable_irq_nosync(irq); - synchronize_irq(irq); -} - -/** - * enable_irq - enable interrupt handling on an irq - * @irq: Interrupt to enable - * - * Re-enables the processing of interrupts on this IRQ line - * providing no disable_irq calls are now in effect. - * - * This function may be called from IRQ context. - */ - -void enable_irq(unsigned int irq) -{ - irq_desc_t *desc = irq_desc + irq; - unsigned long flags; - - spin_lock_irqsave(&desc->lock, flags); - switch (desc->depth) { - case 1: { - unsigned int status = desc->status & ~IRQ_DISABLED; - desc->status = status; - if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) { - desc->status = status | IRQ_REPLAY; - hw_resend_irq(desc->handler,irq); - } - desc->handler->enable(irq); - /* fall-through */ - } - default: - desc->depth--; - break; - case 0: - printk(KERN_ERR "enable_irq() unbalanced from %p\n", - __builtin_return_address(0)); - } - spin_unlock_irqrestore(&desc->lock, flags); -} - -/* * do_IRQ handles all normal device IRQ's (the special * SMP cross-CPU interrupts have their own specific * handlers). */ unsigned int do_IRQ(int irq, union uml_pt_regs *regs) -{ - /* - * 0 return value means that this irq is already being - * handled by some other CPU. (or is disabled) - */ - irq_desc_t *desc = irq_desc + irq; - struct irqaction * action; - unsigned int status; - - irq_enter(); - kstat_this_cpu.irqs[irq]++; - spin_lock(&desc->lock); - desc->handler->ack(irq); - /* - REPLAY is when Linux resends an IRQ that was dropped earlier - WAITING is used by probe to mark irqs that are being tested - */ - status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING); - status |= IRQ_PENDING; /* we _want_ to handle it */ - - /* - * If the IRQ is disabled for whatever reason, we cannot - * use the action we have. - */ - action = NULL; - if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) { - action = desc->action; - status &= ~IRQ_PENDING; /* we commit to handling */ - status |= IRQ_INPROGRESS; /* we are handling it */ - } - desc->status = status; - - /* - * If there is no IRQ handler or it was disabled, exit early. - Since we set PENDING, if another processor is handling - a different instance of this same irq, the other processor - will take care of it. - */ - if (!action) - goto out; - - /* - * Edge triggered interrupts need to remember - * pending events. - * This applies to any hw interrupts that allow a second - * instance of the same irq to arrive while we are in do_IRQ - * or in the handler. But the code here only handles the _second_ - * instance of the irq, not the third or fourth. So it is mostly - * useful for irq hardware that does not mask cleanly in an - * SMP environment. - */ - for (;;) { - spin_unlock(&desc->lock); - handle_IRQ_event(irq, (struct pt_regs *) regs, action); - spin_lock(&desc->lock); - - if (!(desc->status & IRQ_PENDING)) - break; - desc->status &= ~IRQ_PENDING; - } - desc->status &= ~IRQ_INPROGRESS; -out: - /* - * The ->end() handler has to deal with interrupts which got - * disabled while the handler was running. - */ - desc->handler->end(irq); - spin_unlock(&desc->lock); - - irq_exit(); - - return 1; -} - -/** - * request_irq - allocate an interrupt line - * @irq: Interrupt line to allocate - * @handler: Function to be called when the IRQ occurs - * @irqflags: Interrupt type flags - * @devname: An ascii name for the claiming device - * @dev_id: A cookie passed back to the handler function - * - * This call allocates interrupt resources and enables the - * interrupt line and IRQ handling. From the point this - * call is made your handler function may be invoked. Since - * your handler function must clear any interrupt the board - * raises, you must take care both to initialise your hardware - * and to set up the interrupt handler in the right order. - * - * Dev_id must be globally unique. Normally the address of the - * device data structure is used as the cookie. Since the handler - * receives this value it makes sense to use it. - * - * If your interrupt is shared you must pass a non NULL dev_id - * as this is required when freeing the interrupt. - * - * Flags: - * - * SA_SHIRQ Interrupt is shared - * - * SA_INTERRUPT Disable local interrupts while processing - * - * SA_SAMPLE_RANDOM The interrupt can be used for entropy - * - */ - -int request_irq(unsigned int irq, - irqreturn_t (*handler)(int, void *, struct pt_regs *), - unsigned long irqflags, - const char * devname, - void *dev_id) { - int retval; - struct irqaction * action; - -#if 1 - /* - * Sanity-check: shared interrupts should REALLY pass in - * a real dev-ID, otherwise we'll have trouble later trying - * to figure out which interrupt is which (messes up the - * interrupt freeing logic etc). - */ - if (irqflags & SA_SHIRQ) { - if (!dev_id) - printk(KERN_ERR "Bad boy: %s (at 0x%x) called us " - "without a dev_id!\n", devname, (&irq)[-1]); - } -#endif - - if (irq >= NR_IRQS) - return -EINVAL; - if (!handler) - return -EINVAL; - - action = (struct irqaction *) - kmalloc(sizeof(struct irqaction), GFP_KERNEL); - if (!action) - return -ENOMEM; - - action->handler = handler; - action->flags = irqflags; - cpus_clear(action->mask); - action->name = devname; - action->next = NULL; - action->dev_id = dev_id; - - retval = setup_irq(irq, action); - if (retval) - kfree(action); - return retval; + irq_enter(); + __do_IRQ(irq, (struct pt_regs *) regs); + irq_exit(); + return 1; } -EXPORT_SYMBOL(request_irq); - int um_request_irq(unsigned int irq, int fd, int type, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long irqflags, const char * devname, @@ -444,222 +111,6 @@ EXPORT_SYMBOL(um_request_irq); EXPORT_SYMBOL(reactivate_fd); -/* this was setup_x86_irq but it seems pretty generic */ -int setup_irq(unsigned int irq, struct irqaction * new) -{ - int shared = 0; - unsigned long flags; - struct irqaction *old, **p; - irq_desc_t *desc = irq_desc + irq; - - /* - * Some drivers like serial.c use request_irq() heavily, - * so we have to be careful not to interfere with a - * running system. - */ - if (new->flags & SA_SAMPLE_RANDOM) { - /* - * This function might sleep, we want to call it first, - * outside of the atomic block. - * Yes, this might clear the entropy pool if the wrong - * driver is attempted to be loaded, without actually - * installing a new handler, but is this really a problem, - * only the sysadmin is able to do this. - */ - rand_initialize_irq(irq); - } - - /* - * The following block of code has to be executed atomically - */ - spin_lock_irqsave(&desc->lock,flags); - p = &desc->action; - old = *p; - if (old != NULL) { - /* Can't share interrupts unless both agree to */ - if (!(old->flags & new->flags & SA_SHIRQ)) { - spin_unlock_irqrestore(&desc->lock,flags); - return -EBUSY; - } - - /* add new interrupt at end of irq queue */ - do { - p = &old->next; - old = *p; - } while (old); - shared = 1; - } - - *p = new; - - if (!shared) { - desc->depth = 0; - desc->status &= ~IRQ_DISABLED; - desc->handler->startup(irq); - } - spin_unlock_irqrestore(&desc->lock,flags); - - register_irq_proc(irq); - return 0; -} - -/** - * free_irq - free an interrupt - * @irq: Interrupt line to free - * @dev_id: Device identity to free - * - * Remove an interrupt handler. The handler is removed and if the - * interrupt line is no longer in use by any driver it is disabled. - * On a shared IRQ the caller must ensure the interrupt is disabled - * on the card it drives before calling this function. The function - * does not return until any executing interrupts for this IRQ - * have completed. - * - * This function may be called from interrupt context. - * - * Bugs: Attempting to free an irq in a handler for the same irq hangs - * the machine. - */ - -void free_irq(unsigned int irq, void *dev_id) -{ - irq_desc_t *desc; - struct irqaction **p; - unsigned long flags; - - if (irq >= NR_IRQS) - return; - - desc = irq_desc + irq; - spin_lock_irqsave(&desc->lock,flags); - p = &desc->action; - for (;;) { - struct irqaction * action = *p; - if (action) { - struct irqaction **pp = p; - p = &action->next; - if (action->dev_id != dev_id) - continue; - - /* Found it - now remove it from the list of entries */ - *pp = action->next; - if (!desc->action) { - desc->status |= IRQ_DISABLED; - desc->handler->shutdown(irq); - } - free_irq_by_irq_and_dev(irq, dev_id); - spin_unlock_irqrestore(&desc->lock,flags); - - /* Wait to make sure it's not being used on another CPU */ - synchronize_irq(irq); - kfree(action); - return; - } - printk(KERN_ERR "Trying to free free IRQ%d\n",irq); - spin_unlock_irqrestore(&desc->lock,flags); - return; - } -} - -EXPORT_SYMBOL(free_irq); - -/* These are initialized by sysctl_init, which is called from init/main.c */ -static struct proc_dir_entry * root_irq_dir; -static struct proc_dir_entry * irq_dir [NR_IRQS]; -static struct proc_dir_entry * smp_affinity_entry [NR_IRQS]; - -/* These are read and written as longs, so a read won't see a partial write - * even during a race. - */ -static cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL }; - -static int irq_affinity_read_proc (char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int len = cpumask_scnprintf(page, count, irq_affinity[(long)data]); - if (count - len < 2) - return -EINVAL; - len += sprintf(page + len, "\n"); - return len; -} - -static int irq_affinity_write_proc (struct file *file, const char *buffer, - unsigned long count, void *data) -{ - int irq = (long) data, full_count = count, err; - cpumask_t new_value; - - if (!irq_desc[irq].handler->set_affinity) - return -EIO; - - err = cpumask_parse(buffer, count, new_value); - if(err) - return(err); - -#ifdef CONFIG_SMP - /* - * Do not allow disabling IRQs completely - it's a too easy - * way to make the system unusable accidentally :-) At least - * one online CPU still has to be targeted. - */ - { cpumask_t tmp; - cpus_and(tmp, new_value, cpu_online_map); - if (cpus_empty(tmp)) - return -EINVAL; - } -#endif - - irq_affinity[irq] = new_value; - irq_desc[irq].handler->set_affinity(irq, new_value); - - return full_count; -} - -#define MAX_NAMELEN 10 - -static void register_irq_proc (unsigned int irq) -{ - struct proc_dir_entry *entry; - char name [MAX_NAMELEN]; - - if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type) || - irq_dir[irq]) - return; - - memset(name, 0, MAX_NAMELEN); - sprintf(name, "%d", irq); - - /* create /proc/irq/1234 */ - irq_dir[irq] = proc_mkdir(name, root_irq_dir); - - /* create /proc/irq/1234/smp_affinity */ - entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]); - - entry->nlink = 1; - entry->data = (void *)(long)irq; - entry->read_proc = irq_affinity_read_proc; - entry->write_proc = irq_affinity_write_proc; - - smp_affinity_entry[irq] = entry; -} - -void __init init_irq_proc (void) -{ - int i; - - /* create /proc/irq */ - root_irq_dir = proc_mkdir("irq", 0); - - /* create /proc/irq/prof_cpu_mask */ - create_prof_cpu_mask(root_irq_dir); - - /* - * Create entries for all existing IRQs. - */ - for (i = 0; i < NR_IRQS; i++) - register_irq_proc(i); -} - static spinlock_t irq_spinlock = SPIN_LOCK_UNLOCKED; unsigned long irq_lock(void) @@ -675,90 +126,27 @@ spin_unlock_irqrestore(&irq_spinlock, flags); } -unsigned long probe_irq_on(void) -{ - return(0); -} - -EXPORT_SYMBOL(probe_irq_on); - -int probe_irq_off(unsigned long val) -{ - return(0); -} - -EXPORT_SYMBOL(probe_irq_off); - -static unsigned int startup_SIGIO_irq(unsigned int irq) -{ - return(0); -} - -static void shutdown_SIGIO_irq(unsigned int irq) -{ -} - -static void enable_SIGIO_irq(unsigned int irq) -{ -} - -static void disable_SIGIO_irq(unsigned int irq) -{ -} - -static void mask_and_ack_SIGIO(unsigned int irq) -{ -} - -static void end_SIGIO_irq(unsigned int irq) -{ -} - -static unsigned int startup_SIGVTALRM_irq(unsigned int irq) -{ - return(0); -} - -static void shutdown_SIGVTALRM_irq(unsigned int irq) -{ -} - -static void enable_SIGVTALRM_irq(unsigned int irq) -{ -} - -static void disable_SIGVTALRM_irq(unsigned int irq) -{ -} - -static void mask_and_ack_SIGVTALRM(unsigned int irq) -{ -} - -static void end_SIGVTALRM_irq(unsigned int irq) +/* presently hw_interrupt_type must define (startup || enable) && + * disable && end */ +static void dummy(unsigned int irq) { } static struct hw_interrupt_type SIGIO_irq_type = { - "SIGIO", - startup_SIGIO_irq, - shutdown_SIGIO_irq, - enable_SIGIO_irq, - disable_SIGIO_irq, - mask_and_ack_SIGIO, - end_SIGIO_irq, - NULL + .typename = "SIGIO", + .disable = dummy, + .enable = dummy, + .ack = dummy, + .end = dummy }; static struct hw_interrupt_type SIGVTALRM_irq_type = { - "SIGVTALRM", - startup_SIGVTALRM_irq, - shutdown_SIGVTALRM_irq, - enable_SIGVTALRM_irq, - disable_SIGVTALRM_irq, - mask_and_ack_SIGVTALRM, - end_SIGVTALRM_irq, - NULL + .typename = "SIGVTALRM", + .shutdown = dummy, /* never called */ + .disable = dummy, + .enable = dummy, + .ack = dummy, + .end = dummy }; void __init init_IRQ(void) diff -Nru a/arch/um/kernel/irq_user.c b/arch/um/kernel/irq_user.c --- a/arch/um/kernel/irq_user.c 2004-11-10 17:19:04 -08:00 +++ b/arch/um/kernel/irq_user.c 2004-11-10 17:19:04 -08:00 @@ -263,7 +263,7 @@ return((irq->irq == data->irq) && (irq->id == data->dev)); } -void free_irq_by_irq_and_dev(int irq, void *dev) +void free_irq_by_irq_and_dev(unsigned int irq, void *dev) { struct irq_and_dev data = ((struct irq_and_dev) { .irq = irq, .dev = dev }); diff -Nru a/arch/um/kernel/main.c b/arch/um/kernel/main.c --- a/arch/um/kernel/main.c 2004-11-10 17:19:06 -08:00 +++ b/arch/um/kernel/main.c 2004-11-10 17:19:06 -08:00 @@ -17,11 +17,15 @@ #include "kern_util.h" #include "mem_user.h" #include "signal_user.h" +#include "time_user.h" +#include "irq_user.h" #include "user.h" #include "init.h" #include "mode.h" #include "choose-mode.h" #include "uml-config.h" +#include "irq_user.h" +#include "time_user.h" /* Set in set_stklim, which is called from main and __wrap_malloc. * __wrap_malloc only calls it if main hasn't started. diff -Nru a/arch/um/kernel/mem_user.c b/arch/um/kernel/mem_user.c --- a/arch/um/kernel/mem_user.c 2004-11-10 17:19:04 -08:00 +++ b/arch/um/kernel/mem_user.c 2004-11-10 17:19:04 -08:00 @@ -83,6 +83,26 @@ return(fd); } +void check_tmpexec(void) +{ + void *addr; + int err, fd = create_tmp_file(UM_KERN_PAGE_SIZE); + + addr = mmap(NULL, UM_KERN_PAGE_SIZE, + PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, fd, 0); + printf("Checking PROT_EXEC mmap in /tmp..."); + fflush(stdout); + if(addr == MAP_FAILED){ + err = errno; + perror("failed"); + if(err == EPERM) + printf("/tmp must be not mounted noexec\n"); + exit(1); + } + printf("OK\n"); + munmap(addr, UM_KERN_PAGE_SIZE); +} + static int have_devanon = 0; void check_devanon(void) @@ -111,7 +131,7 @@ exit(1); } - addr = mmap(NULL, len, PROT_READ | PROT_WRITE , MAP_PRIVATE, fd, 0); + addr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); if(addr == MAP_FAILED){ os_print_error((int) addr, "mapping physmem file"); exit(1); @@ -207,6 +227,39 @@ } return(0); } + +#if 0 +/* Debugging facility for dumping stuff out to the host, avoiding the timing + * problems that come with printf and breakpoints. + * Enable in case of emergency. + */ + +int logging = 1; +int logging_fd = -1; + +int logging_line = 0; +char logging_buf[512]; + +void log(char *fmt, ...) +{ + va_list ap; + struct timeval tv; + struct openflags flags; + + if(logging == 0) return; + if(logging_fd < 0){ + flags = of_create(of_trunc(of_rdwr(OPENFLAGS()))); + logging_fd = os_open_file("log", flags, 0644); + } + gettimeofday(&tv, NULL); + sprintf(logging_buf, "%d\t %u.%u ", logging_line++, tv.tv_sec, + tv.tv_usec); + va_start(ap, fmt); + vsprintf(&logging_buf[strlen(logging_buf)], fmt, ap); + va_end(ap); + write(logging_fd, logging_buf, strlen(logging_buf)); +} +#endif /* * Overrides for Emacs so that we follow Linus's tabbing style. diff -Nru a/arch/um/kernel/process.c b/arch/um/kernel/process.c --- a/arch/um/kernel/process.c 2004-11-10 17:19:06 -08:00 +++ b/arch/um/kernel/process.c 2004-11-10 17:19:06 -08:00 @@ -137,14 +137,31 @@ static int ptrace_child(void *arg) { - int pid = os_getpid(); + int ret; + int pid = os_getpid(), ppid = getppid(); + int sc_result; if(ptrace(PTRACE_TRACEME, 0, 0, 0) < 0){ perror("ptrace"); os_kill_process(pid, 0); } os_stop_process(pid); - _exit(os_getpid() == pid); + + /*This syscall will be intercepted by the parent. Don't call more than + * once, please.*/ + sc_result = os_getpid(); + + if (sc_result == pid) + ret = 1; /*Nothing modified by the parent, we are running + normally.*/ + else if (sc_result == ppid) + ret = 0; /*Expected in check_ptrace and check_sysemu when they + succeed in modifying the stack frame*/ + else + ret = 2; /*Serious trouble! This could be caused by a bug in + host 2.6 SKAS3/2.6 patch before release -V6, together + with a bug in the UML code itself.*/ + _exit(ret); } static int start_ptraced_child(void **stack_out) @@ -172,18 +189,36 @@ return(pid); } -static void stop_ptraced_child(int pid, void *stack, int exitcode) +/* When testing for SYSEMU support, if it is one of the broken versions, we must + * just avoid using sysemu, not panic, but only if SYSEMU features are broken. + * So only for SYSEMU features we test mustpanic, while normal host features + * must work anyway!*/ +static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic) { - int status, n; + int status, n, ret = 0; if(ptrace(PTRACE_CONT, pid, 0, 0) < 0) panic("check_ptrace : ptrace failed, errno = %d", errno); CATCH_EINTR(n = waitpid(pid, &status, 0)); - if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) - panic("check_ptrace : child exited with status 0x%x", status); + if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { + int exit_with = WEXITSTATUS(status); + if (exit_with == 2) + printk("check_ptrace : child exited with status 2. " + "Serious trouble happening! Try updating your " + "host skas patch!\nDisabling SYSEMU support."); + printk("check_ptrace : child exited with exitcode %d, while " + "expecting %d; status 0x%x", exit_with, + exitcode, status); + if (mustpanic) + panic("\n"); + else + printk("\n"); + ret = -1; + } if(munmap(stack, PAGE_SIZE) < 0) panic("check_ptrace : munmap failed, errno = %d", errno); + return ret; } static int force_sysemu_disabled = 0; @@ -200,50 +235,46 @@ " SYSEMU is a performance-patch introduced by Laurent Vivier. It changes\n" " behaviour of ptrace() and helps reducing host context switch rate.\n" " To make it working, you need a kernel patch for your host, too.\n" - " See http://perso.wanadoo.fr/laurent.vivier/UML/ for further information.\n"); + " See http://perso.wanadoo.fr/laurent.vivier/UML/ for further information.\n\n"); static void __init check_sysemu(void) { void *stack; int pid, n, status; - if (mode_tt) - return; - printk("Checking syscall emulation patch for ptrace..."); sysemu_supported = 0; pid = start_ptraced_child(&stack); - if(ptrace(PTRACE_SYSEMU, pid, 0, 0) >= 0) { - struct user_regs_struct regs; - CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); - if (n < 0) - panic("check_ptrace : wait failed, errno = %d", errno); - if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) - panic("check_ptrace : expected SIGTRAP, " - "got status = %d", status); + if(ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0) + goto fail; - if (ptrace(PTRACE_GETREGS, pid, 0, ®s) < 0) - panic("check_ptrace : failed to read child " - "registers, errno = %d", errno); - regs.orig_eax = pid; - if (ptrace(PTRACE_SETREGS, pid, 0, ®s) < 0) - panic("check_ptrace : failed to modify child " - "registers, errno = %d", errno); + CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); + if (n < 0) + panic("check_sysemu : wait failed, errno = %d", errno); + if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) + panic("check_sysemu : expected SIGTRAP, " + "got status = %d", status); - stop_ptraced_child(pid, stack, 0); + n = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_RET_OFFSET, + os_getpid()); + if(n < 0) + panic("check_sysemu : failed to modify system " + "call return, errno = %d", errno); - sysemu_supported = 1; - printk("found\n"); - } - else - { - stop_ptraced_child(pid, stack, 1); - sysemu_supported = 0; - printk("missing\n"); - } + if (stop_ptraced_child(pid, stack, 0, 0) < 0) + goto fail_stopped; + sysemu_supported = 1; + printk("OK\n"); set_using_sysemu(!force_sysemu_disabled); + return; + +fail: + stop_ptraced_child(pid, stack, 1, 0); +fail_stopped: + sysemu_supported = 0; + printk("missing\n"); } void __init check_ptrace(void) @@ -276,7 +307,7 @@ break; } } - stop_ptraced_child(pid, stack, 0); + stop_ptraced_child(pid, stack, 0, 1); printk("OK\n"); check_sysemu(); } @@ -324,7 +355,7 @@ else printf("found\n"); init_registers(pid); - stop_ptraced_child(pid, stack, 1); + stop_ptraced_child(pid, stack, 1, 1); printf("Checking for /proc/mm..."); if(os_access("/proc/mm", OS_ACC_W_OK) < 0){ diff -Nru a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c --- a/arch/um/kernel/process_kern.c 2004-11-10 17:19:04 -08:00 +++ b/arch/um/kernel/process_kern.c 2004-11-10 17:19:04 -08:00 @@ -18,6 +18,8 @@ #include "linux/capability.h" #include "linux/vmalloc.h" #include "linux/spinlock.h" +#include "linux/proc_fs.h" +#include "linux/ptrace.h" #include "asm/unistd.h" #include "asm/mman.h" #include "asm/segment.h" @@ -206,7 +208,6 @@ * although we are an idle CPU, we do not want to * get into the scheduler unnecessarily. */ - irq_stat[smp_processor_id()].idle_timestamp = jiffies; if(need_resched()) schedule(); @@ -397,6 +398,74 @@ int cpu(void) { return(current_thread->cpu); +} + +static atomic_t using_sysemu = ATOMIC_INIT(0); +int sysemu_supported; + +void set_using_sysemu(int value) +{ + atomic_set(&using_sysemu, sysemu_supported && value); +} + +int get_using_sysemu(void) +{ + return atomic_read(&using_sysemu); +} + +static int proc_read_sysemu(char *buf, char **start, off_t offset, int size,int *eof, void *data) +{ + if (snprintf(buf, size, "%d\n", get_using_sysemu()) < size) /*No overflow*/ + *eof = 1; + + return strlen(buf); +} + +static int proc_write_sysemu(struct file *file,const char *buf, unsigned long count,void *data) +{ + char tmp[2]; + + if (copy_from_user(tmp, buf, 1)) + return -EFAULT; + + if (tmp[0] == '0' || tmp[0] == '1') + set_using_sysemu(tmp[0] - '0'); + return count; /*We use the first char, but pretend to write everything*/ +} + +int __init make_proc_sysemu(void) +{ + struct proc_dir_entry *ent; + if (!sysemu_supported) + return 0; + + ent = create_proc_entry("sysemu", 0600, &proc_root); + + if (ent == NULL) + { + printk("Failed to register /proc/sysemu\n"); + return(0); + } + + ent->read_proc = proc_read_sysemu; + ent->write_proc = proc_write_sysemu; + + return 0; +} + +late_initcall(make_proc_sysemu); + +int singlestepping(void * t) +{ + struct task_struct *task = t ? t : current; + + if ( ! (task->ptrace & PT_DTRACE) ) + return(0); + + if (task->thread.singlestep_syscall) + return(0); + + return 1; } /* diff -Nru a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c --- a/arch/um/kernel/ptrace.c 2004-11-10 17:19:07 -08:00 +++ b/arch/um/kernel/ptrace.c 2004-11-10 17:19:07 -08:00 @@ -22,6 +22,8 @@ */ void ptrace_disable(struct task_struct *child) { + child->ptrace &= ~PT_DTRACE; + child->thread.singlestep_syscall = 0; } int sys_ptrace(long request, long pid, long addr, long data) @@ -139,6 +141,9 @@ ret = -EIO; if ((unsigned long) data > _NSIG) break; + + child->ptrace &= ~PT_DTRACE; + child->thread.singlestep_syscall = 0; if (request == PTRACE_SYSCALL) { set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); } @@ -160,6 +165,9 @@ ret = 0; if (child->exit_state == EXIT_ZOMBIE) /* already dead */ break; + + child->ptrace &= ~PT_DTRACE; + child->thread.singlestep_syscall = 0; child->exit_code = SIGKILL; wake_up_process(child); break; @@ -171,6 +179,7 @@ break; clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); child->ptrace |= PT_DTRACE; + child->thread.singlestep_syscall = 0; child->exit_code = data; /* give it a chance to run. */ wake_up_process(child); @@ -299,6 +308,9 @@ void syscall_trace(union uml_pt_regs *regs, int entryexit) { + int is_singlestep = (current->ptrace & PT_DTRACE) && entryexit; + int tracesysgood; + if (unlikely(current->audit_context)) { if (!entryexit) audit_syscall_entry(current, regs->orig_eax, @@ -308,18 +320,20 @@ audit_syscall_exit(current, regs->eax); } - if (!test_thread_flag(TIF_SYSCALL_TRACE)) + if (!test_thread_flag(TIF_SYSCALL_TRACE) && !is_singlestep) return; if (!(current->ptrace & PT_PTRACED)) return; /* the 0x80 provides a way for the tracing parent to distinguish between a syscall stop and SIGTRAP delivery */ - ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) - ? 0x80 : 0)); + tracesysgood = (current->ptrace & PT_TRACESYSGOOD) && !is_singlestep; + ptrace_notify(SIGTRAP | (tracesysgood ? 0x80 : 0)); + + /* force do_signal() --> is_syscall() */ + set_thread_flag(TIF_SIGPENDING); - /* - * this isn't the same as continuing with a signal, but it will do + /* this isn't the same as continuing with a signal, but it will do * for normal use. strace only continues with a signal if the * stopping signal is not SIGTRAP. -brl */ diff -Nru a/arch/um/kernel/sigio_kern.c b/arch/um/kernel/sigio_kern.c --- a/arch/um/kernel/sigio_kern.c 2004-11-10 17:19:03 -08:00 +++ b/arch/um/kernel/sigio_kern.c 2004-11-10 17:19:03 -08:00 @@ -28,7 +28,7 @@ int err; err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt, - SA_INTERRUPT | SA_SAMPLE_RANDOM, "write sigio", + SA_INTERRUPT | SA_SAMPLE_RANDOM, "write sigio", NULL); if(err){ printk("write_sigio_irq : um_request_irq failed, err = %d\n", diff -Nru a/arch/um/kernel/signal_kern.c b/arch/um/kernel/signal_kern.c --- a/arch/um/kernel/signal_kern.c 2004-11-10 17:19:05 -08:00 +++ b/arch/um/kernel/signal_kern.c 2004-11-10 17:19:05 -08:00 @@ -38,16 +38,17 @@ /* * OK, we're invoking a handler */ -static int handle_signal(struct pt_regs *regs, unsigned long signr, - struct k_sigaction *ka, siginfo_t *info, - sigset_t *oldset, int error) +static void handle_signal(struct pt_regs *regs, unsigned long signr, + struct k_sigaction *ka, siginfo_t *info, + sigset_t *oldset) { __sighandler_t handler; void (*restorer)(void); unsigned long sp; sigset_t save; - int err, ret; + int error, err, ret; + error = PT_REGS_SYSCALL_RET(¤t->thread.regs); ret = 0; /* Always make any pending restarted system calls return -EINTR */ current_thread_info()->restart_block.fn = do_no_restart_syscall; @@ -109,31 +110,25 @@ else err = setup_signal_stack_sc(sp, signr, (unsigned long) handler, restorer, regs, &save); - if(err) goto segv; - - return(0); - segv: - force_sigsegv(signr, current); - return(1); + if(err) + force_sigsegv(signr, current); } -static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset, int error) +static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset) { struct k_sigaction ka_copy; siginfo_t info; - int err, sig; + int sig; if (!oldset) oldset = ¤t->blocked; sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL); - if(sig == 0) - return(0); - - /* Whee! Actually deliver the signal. */ - err = handle_signal(regs, sig, &ka_copy, &info, oldset, error); - if(!err) + if(sig > 0){ + /* Whee! Actually deliver the signal. */ + handle_signal(regs, sig, &ka_copy, &info, oldset); return(1); + } /* Did we come from a system call? */ if(PT_REGS_SYSCALL_NR(regs) >= 0){ @@ -157,15 +152,15 @@ * on the host. The tracing thread will check this flag and * PTRACE_SYSCALL if necessary. */ - if((current->ptrace & PT_DTRACE) && - is_syscall(PT_REGS_IP(¤t->thread.regs))) - (void) CHOOSE_MODE(current->thread.mode.tt.singlestep_syscall = 1, 0); + if(current->ptrace & PT_DTRACE) + current->thread.singlestep_syscall = + is_syscall(PT_REGS_IP(¤t->thread.regs)); return(0); } int do_signal(int error) { - return(kern_do_signal(¤t->thread.regs, NULL, error)); + return(kern_do_signal(¤t->thread.regs, NULL)); } /* @@ -182,10 +177,11 @@ recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); + PT_REGS_SYSCALL_RET(¤t->thread.regs) = -EINTR; while (1) { current->state = TASK_INTERRUPTIBLE; schedule(); - if(kern_do_signal(¤t->thread.regs, &saveset, -EINTR)) + if(kern_do_signal(¤t->thread.regs, &saveset)) return(-EINTR); } } @@ -208,10 +204,11 @@ recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); + PT_REGS_SYSCALL_RET(¤t->thread.regs) = -EINTR; while (1) { current->state = TASK_INTERRUPTIBLE; schedule(); - if (kern_do_signal(¤t->thread.regs, &saveset, -EINTR)) + if (kern_do_signal(¤t->thread.regs, &saveset)) return(-EINTR); } } diff -Nru a/arch/um/kernel/signal_user.c b/arch/um/kernel/signal_user.c --- a/arch/um/kernel/signal_user.c 2004-11-10 17:19:05 -08:00 +++ b/arch/um/kernel/signal_user.c 2004-11-10 17:19:05 -08:00 @@ -57,6 +57,10 @@ return(!sigismember(&old, signal)); } +/* Both here and in set/get_signal we don't touch SIGPROF, because we must not + * disable profiling; it's safe because the profiling code does not interact + * with the kernel code at all.*/ + static void change_signals(int type) { sigset_t mask; @@ -65,7 +69,6 @@ sigaddset(&mask, SIGVTALRM); sigaddset(&mask, SIGALRM); sigaddset(&mask, SIGIO); - sigaddset(&mask, SIGPROF); if(sigprocmask(type, &mask, NULL) < 0) panic("Failed to change signal mask - errno = %d", errno); } diff -Nru a/arch/um/kernel/skas/exec_kern.c b/arch/um/kernel/skas/exec_kern.c --- a/arch/um/kernel/skas/exec_kern.c 2004-11-10 17:19:07 -08:00 +++ b/arch/um/kernel/skas/exec_kern.c 2004-11-10 17:19:07 -08:00 @@ -12,7 +12,7 @@ #include "asm/mmu_context.h" #include "tlb.h" #include "skas.h" -#include "mmu.h" +#include "um_mmu.h" #include "os.h" void flush_thread_skas(void) diff -Nru a/arch/um/kernel/skas/include/mmu-skas.h b/arch/um/kernel/skas/include/mmu-skas.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/skas/include/mmu-skas.h 2004-11-10 17:19:06 -08:00 @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#ifndef __SKAS_MMU_H +#define __SKAS_MMU_H + +struct mmu_context_skas { + int mm_fd; +}; + +#endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/skas/include/mmu.h b/arch/um/kernel/skas/include/mmu.h --- a/arch/um/kernel/skas/include/mmu.h 2004-11-10 17:19:06 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) - * Licensed under the GPL - */ - -#ifndef __SKAS_MMU_H -#define __SKAS_MMU_H - -#include "linux/list.h" -#include "linux/spinlock.h" - -struct mmu_context_skas { - int mm_fd; -}; - -#endif - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/kernel/skas/include/mode-skas.h b/arch/um/kernel/skas/include/mode-skas.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/skas/include/mode-skas.h 2004-11-10 17:19:04 -08:00 @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#ifndef __MODE_SKAS_H__ +#define __MODE_SKAS_H__ + +#include + +extern unsigned long exec_regs[]; +extern unsigned long exec_fp_regs[]; +extern unsigned long exec_fpx_regs[]; +extern int have_fpx_regs; + +extern void user_time_init_skas(void); +extern int copy_sc_from_user_skas(int pid, union uml_pt_regs *regs, + void *from_ptr); +extern int copy_sc_to_user_skas(int pid, void *to_ptr, void *fp, + union uml_pt_regs *regs, + unsigned long fault_addr, int fault_type); +extern void sig_handler_common_skas(int sig, void *sc_ptr); +extern void halt_skas(void); +extern void reboot_skas(void); +extern void kill_off_processes_skas(void); +extern int is_skas_winch(int pid, int fd, void *data); + +#endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/skas/include/mode.h b/arch/um/kernel/skas/include/mode.h --- a/arch/um/kernel/skas/include/mode.h 2004-11-10 17:19:04 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) - * Licensed under the GPL - */ - -#ifndef __MODE_SKAS_H__ -#define __MODE_SKAS_H__ - -extern unsigned long exec_regs[]; -extern unsigned long exec_fp_regs[]; -extern unsigned long exec_fpx_regs[]; -extern int have_fpx_regs; - -extern void user_time_init_skas(void); -extern int copy_sc_from_user_skas(int pid, union uml_pt_regs *regs, - void *from_ptr); -extern int copy_sc_to_user_skas(int pid, void *to_ptr, void *fp, - union uml_pt_regs *regs, - unsigned long fault_addr, int fault_type); -extern void sig_handler_common_skas(int sig, void *sc_ptr); -extern void halt_skas(void); -extern void reboot_skas(void); -extern void kill_off_processes_skas(void); -extern int is_skas_winch(int pid, int fd, void *data); - -#endif - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/kernel/skas/include/mode_kern-skas.h b/arch/um/kernel/skas/include/mode_kern-skas.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/skas/include/mode_kern-skas.h 2004-11-10 17:19:04 -08:00 @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#ifndef __SKAS_MODE_KERN_H__ +#define __SKAS_MODE_KERN_H__ + +#include "linux/sched.h" +#include "asm/page.h" +#include "asm/ptrace.h" + +extern void flush_thread_skas(void); +extern void *switch_to_skas(void *prev, void *next); +extern void start_thread_skas(struct pt_regs *regs, unsigned long eip, + unsigned long esp); +extern int copy_thread_skas(int nr, unsigned long clone_flags, + unsigned long sp, unsigned long stack_top, + struct task_struct *p, struct pt_regs *regs); +extern void release_thread_skas(struct task_struct *task); +extern void exit_thread_skas(void); +extern void initial_thread_cb_skas(void (*proc)(void *), void *arg); +extern void init_idle_skas(void); +extern void flush_tlb_kernel_range_skas(unsigned long start, + unsigned long end); +extern void flush_tlb_kernel_vm_skas(void); +extern void __flush_tlb_one_skas(unsigned long addr); +extern void flush_tlb_range_skas(struct vm_area_struct *vma, + unsigned long start, unsigned long end); +extern void flush_tlb_mm_skas(struct mm_struct *mm); +extern void force_flush_all_skas(void); +extern long execute_syscall_skas(void *r); +extern void before_mem_skas(unsigned long unused); +extern unsigned long set_task_sizes_skas(int arg, unsigned long *host_size_out, + unsigned long *task_size_out); +extern int start_uml_skas(void); +extern int external_pid_skas(struct task_struct *task); +extern int thread_pid_skas(struct task_struct *task); + +#define kmem_end_skas (host_task_size - 1024 * 1024) + +#endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/skas/include/mode_kern.h b/arch/um/kernel/skas/include/mode_kern.h --- a/arch/um/kernel/skas/include/mode_kern.h 2004-11-10 17:19:04 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) - * Licensed under the GPL - */ - -#ifndef __SKAS_MODE_KERN_H__ -#define __SKAS_MODE_KERN_H__ - -#include "linux/sched.h" -#include "asm/page.h" -#include "asm/ptrace.h" - -extern void flush_thread_skas(void); -extern void *switch_to_skas(void *prev, void *next); -extern void start_thread_skas(struct pt_regs *regs, unsigned long eip, - unsigned long esp); -extern int copy_thread_skas(int nr, unsigned long clone_flags, - unsigned long sp, unsigned long stack_top, - struct task_struct *p, struct pt_regs *regs); -extern void release_thread_skas(struct task_struct *task); -extern void exit_thread_skas(void); -extern void initial_thread_cb_skas(void (*proc)(void *), void *arg); -extern void init_idle_skas(void); -extern void flush_tlb_kernel_range_skas(unsigned long start, - unsigned long end); -extern void flush_tlb_kernel_vm_skas(void); -extern void __flush_tlb_one_skas(unsigned long addr); -extern void flush_tlb_range_skas(struct vm_area_struct *vma, - unsigned long start, unsigned long end); -extern void flush_tlb_mm_skas(struct mm_struct *mm); -extern void force_flush_all_skas(void); -extern long execute_syscall_skas(void *r); -extern void before_mem_skas(unsigned long unused); -extern unsigned long set_task_sizes_skas(int arg, unsigned long *host_size_out, - unsigned long *task_size_out); -extern int start_uml_skas(void); -extern int external_pid_skas(struct task_struct *task); -extern int thread_pid_skas(struct task_struct *task); - -#define kmem_end_skas (host_task_size - 1024 * 1024) - -#endif - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/kernel/skas/include/ptrace-skas.h b/arch/um/kernel/skas/include/ptrace-skas.h --- a/arch/um/kernel/skas/include/ptrace-skas.h 2004-11-10 17:19:02 -08:00 +++ b/arch/um/kernel/skas/include/ptrace-skas.h 2004-11-10 17:19:02 -08:00 @@ -10,16 +10,6 @@ #ifdef UML_CONFIG_MODE_SKAS -/* syscall emulation path in ptrace */ - -#ifndef PTRACE_SYSEMU -#define PTRACE_SYSEMU 31 -#endif - -void set_using_sysemu(int value); -int get_using_sysemu(void); -extern int sysemu_supported; - #include "skas_ptregs.h" #define HOST_FRAME_SIZE 17 diff -Nru a/arch/um/kernel/skas/include/skas.h b/arch/um/kernel/skas/include/skas.h --- a/arch/um/kernel/skas/include/skas.h 2004-11-10 17:19:03 -08:00 +++ b/arch/um/kernel/skas/include/skas.h 2004-11-10 17:19:03 -08:00 @@ -28,7 +28,6 @@ extern int protect(int fd, unsigned long addr, unsigned long len, int r, int w, int x, int must_succeed); extern void user_signal(int sig, union uml_pt_regs *regs); -extern int singlestepping_skas(void); extern int new_mm(int from); extern void save_registers(union uml_pt_regs *regs); extern void restore_registers(union uml_pt_regs *regs); diff -Nru a/arch/um/kernel/skas/include/uaccess-skas.h b/arch/um/kernel/skas/include/uaccess-skas.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/skas/include/uaccess-skas.h 2004-11-10 17:19:04 -08:00 @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#ifndef __SKAS_UACCESS_H +#define __SKAS_UACCESS_H + +#include "asm/errno.h" + +#define access_ok_skas(type, addr, size) \ + ((segment_eq(get_fs(), KERNEL_DS)) || \ + (((unsigned long) (addr) < TASK_SIZE) && \ + ((unsigned long) (addr) + (size) <= TASK_SIZE))) + +static inline int verify_area_skas(int type, const void * addr, + unsigned long size) +{ + return(access_ok_skas(type, addr, size) ? 0 : -EFAULT); +} + +extern int copy_from_user_skas(void *to, const void *from, int n); +extern int copy_to_user_skas(void *to, const void *from, int n); +extern int strncpy_from_user_skas(char *dst, const char *src, int count); +extern int __clear_user_skas(void *mem, int len); +extern int clear_user_skas(void *mem, int len); +extern int strnlen_user_skas(const void *str, int len); + +#endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/skas/include/uaccess.h b/arch/um/kernel/skas/include/uaccess.h --- a/arch/um/kernel/skas/include/uaccess.h 2004-11-10 17:19:04 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) - * Licensed under the GPL - */ - -#ifndef __SKAS_UACCESS_H -#define __SKAS_UACCESS_H - -#include "asm/errno.h" - -#define access_ok_skas(type, addr, size) \ - ((segment_eq(get_fs(), KERNEL_DS)) || \ - (((unsigned long) (addr) < TASK_SIZE) && \ - ((unsigned long) (addr) + (size) <= TASK_SIZE))) - -static inline int verify_area_skas(int type, const void * addr, - unsigned long size) -{ - return(access_ok_skas(type, addr, size) ? 0 : -EFAULT); -} - -extern int copy_from_user_skas(void *to, const void *from, int n); -extern int copy_to_user_skas(void *to, const void *from, int n); -extern int strncpy_from_user_skas(char *dst, const char *src, int count); -extern int __clear_user_skas(void *mem, int len); -extern int clear_user_skas(void *mem, int len); -extern int strnlen_user_skas(const void *str, int len); - -#endif - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c --- a/arch/um/kernel/skas/process.c 2004-11-10 17:19:07 -08:00 +++ b/arch/um/kernel/skas/process.c 2004-11-10 17:19:07 -08:00 @@ -139,17 +139,16 @@ void userspace(union uml_pt_regs *regs) { - int err, status, op, pid = userspace_pid[0]; + int err, status, op, pt_syscall_parm, pid = userspace_pid[0]; int local_using_sysemu; /*To prevent races if using_sysemu changes under us.*/ restore_registers(regs); local_using_sysemu = get_using_sysemu(); - if (local_using_sysemu) - err = ptrace(PTRACE_SYSEMU, pid, 0, 0); - else - err = ptrace(PTRACE_SYSCALL, pid, 0, 0); + pt_syscall_parm = local_using_sysemu ? PTRACE_SYSEMU : PTRACE_SYSCALL; + err = ptrace(pt_syscall_parm, pid, 0, 0); + if(err) panic("userspace - PTRACE_%s failed, errno = %d\n", local_using_sysemu ? "SYSEMU" : "SYSCALL", errno); @@ -189,13 +188,10 @@ /*Now we ended the syscall, so re-read local_using_sysemu.*/ local_using_sysemu = get_using_sysemu(); + pt_syscall_parm = local_using_sysemu ? PTRACE_SYSEMU : PTRACE_SYSCALL; - if (local_using_sysemu) - op = singlestepping_skas() ? PTRACE_SINGLESTEP : - PTRACE_SYSEMU; - else - op = singlestepping_skas() ? PTRACE_SINGLESTEP : - PTRACE_SYSCALL; + op = singlestepping(NULL) ? PTRACE_SINGLESTEP : + pt_syscall_parm; err = ptrace(op, pid, 0, 0); if(err) @@ -389,7 +385,7 @@ void kill_off_processes_skas(void) { #warning need to loop over userspace_pids in kill_off_processes_skas - os_kill_process(userspace_pid[0], 1); + os_kill_ptraced_process(userspace_pid[0], 1); } void init_registers(int pid) diff -Nru a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c --- a/arch/um/kernel/skas/process_kern.c 2004-11-10 17:19:07 -08:00 +++ b/arch/um/kernel/skas/process_kern.c 2004-11-10 17:19:07 -08:00 @@ -24,69 +24,6 @@ #include "mode.h" #include "proc_mm.h" -static atomic_t using_sysemu; -int sysemu_supported; - -void set_using_sysemu(int value) -{ - atomic_set(&using_sysemu, sysemu_supported && value); -} - -int get_using_sysemu(void) -{ - return atomic_read(&using_sysemu); -} - -int proc_read_sysemu(char *buf, char **start, off_t offset, int size,int *eof, void *data) -{ - if (snprintf(buf, size, "%d\n", get_using_sysemu()) < size) /*No overflow*/ - *eof = 1; - - return strlen(buf); -} - -int proc_write_sysemu(struct file *file,const char *buf, unsigned long count,void *data) -{ - char tmp[2]; - - if (copy_from_user(tmp, buf, 1)) - return -EFAULT; - - if (tmp[0] == '0' || tmp[0] == '1') - set_using_sysemu(tmp[0] - '0'); - return count; /*We use the first char, but pretend to write everything*/ -} - -int __init make_proc_sysemu(void) -{ - struct proc_dir_entry *ent; - if (mode_tt || !sysemu_supported) - return 0; - - ent = create_proc_entry("sysemu", 0600, &proc_root); - - if (ent == NULL) - { - printk("Failed to register /proc/sysemu\n"); - return(0); - } - - ent->read_proc = proc_read_sysemu; - ent->write_proc = proc_write_sysemu; - - return 0; -} - -late_initcall(make_proc_sysemu); - -int singlestepping_skas(void) -{ - int ret = current->ptrace & PT_DTRACE; - - current->ptrace &= ~PT_DTRACE; - return(ret); -} - void *switch_to_skas(void *prev, void *next) { struct task_struct *from, *to; diff -Nru a/arch/um/kernel/skas/syscall_kern.c b/arch/um/kernel/skas/syscall_kern.c --- a/arch/um/kernel/skas/syscall_kern.c 2004-11-10 17:19:05 -08:00 +++ b/arch/um/kernel/skas/syscall_kern.c 2004-11-10 17:19:05 -08:00 @@ -4,6 +4,7 @@ */ #include "linux/sys.h" +#include "linux/ptrace.h" #include "asm/errno.h" #include "asm/unistd.h" #include "asm/ptrace.h" diff -Nru a/arch/um/kernel/skas/syscall_user.c b/arch/um/kernel/skas/syscall_user.c --- a/arch/um/kernel/skas/syscall_user.c 2004-11-10 17:19:06 -08:00 +++ b/arch/um/kernel/skas/syscall_user.c 2004-11-10 17:19:06 -08:00 @@ -22,7 +22,7 @@ index = record_syscall_start(UPT_SYSCALL_NR(regs)); - syscall_trace(regs, 1); + syscall_trace(regs, 0); result = execute_syscall(regs); REGS_SET_SYSCALL_RETURN(regs->skas.regs, result); @@ -30,7 +30,7 @@ (result == -ERESTARTNOINTR)) do_signal(result); - syscall_trace(regs, 0); + syscall_trace(regs, 1); record_syscall_end(index, result); } diff -Nru a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c --- a/arch/um/kernel/sysrq.c 2004-11-10 17:19:03 -08:00 +++ b/arch/um/kernel/sysrq.c 2004-11-10 17:19:03 -08:00 @@ -6,6 +6,7 @@ #include "linux/sched.h" #include "linux/kernel.h" #include "linux/module.h" +#include "linux/kallsyms.h" #include "asm/page.h" #include "asm/processor.h" #include "sysrq.h" @@ -13,21 +14,20 @@ void show_trace(unsigned long * stack) { - int i; + /* XXX: Copy the CONFIG_FRAME_POINTER stack-walking backtrace from + * arch/i386/kernel/traps.c. */ unsigned long addr; if (!stack) stack = (unsigned long*) &stack; - printk("Call Trace: "); - i = 1; + printk("Call Trace: \n"); while (((long) stack & (THREAD_SIZE-1)) != 0) { addr = *stack++; if (__kernel_text_address(addr)) { - if (i && ((i % 6) == 0)) - printk("\n "); - printk("[<%08lx>] ", addr); - i++; + printk(" [<%08lx>]", addr); + print_symbol(" %s", addr); + printk("\n"); } } printk("\n"); @@ -48,14 +48,3 @@ { show_trace(sp); } - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/kernel/tt/Makefile b/arch/um/kernel/tt/Makefile --- a/arch/um/kernel/tt/Makefile 2004-11-10 17:19:04 -08:00 +++ b/arch/um/kernel/tt/Makefile 2004-11-10 17:19:04 -08:00 @@ -4,6 +4,7 @@ # extra-y := unmap_fin.o +clean-files := unmap_tmp.o obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o process_kern.o \ syscall_kern.o syscall_user.o time.o tlb.o tracer.o trap_user.o \ @@ -20,10 +21,9 @@ $(USER_OBJS) : %.o: %.c $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< -$(O_TARGET) : $(obj)/unmap_fin.o - $(obj)/unmap.o: $(src)/unmap.c $(CC) $(UNMAP_CFLAGS) -c -o $@ $< -$(obj)/unmap_fin.o : $(src)/unmap.o - ld -r -o $@ $< -lc -L/usr/lib +$(obj)/unmap_fin.o : $(obj)/unmap.o + ld -r -o $(obj)/unmap_tmp.o $< -lc -L/usr/lib + objcopy $(obj)/unmap_tmp.o $@ -G switcheroo diff -Nru a/arch/um/kernel/tt/include/mmu-tt.h b/arch/um/kernel/tt/include/mmu-tt.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/tt/include/mmu-tt.h 2004-11-10 17:19:04 -08:00 @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#ifndef __TT_MMU_H +#define __TT_MMU_H + +struct mmu_context_tt { +}; + +#endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/tt/include/mmu.h b/arch/um/kernel/tt/include/mmu.h --- a/arch/um/kernel/tt/include/mmu.h 2004-11-10 17:19:04 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) - * Licensed under the GPL - */ - -#ifndef __TT_MMU_H -#define __TT_MMU_H - -struct mmu_context_tt { -}; - -#endif - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/kernel/tt/include/mode-tt.h b/arch/um/kernel/tt/include/mode-tt.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/tt/include/mode-tt.h 2004-11-10 17:19:05 -08:00 @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#ifndef __MODE_TT_H__ +#define __MODE_TT_H__ + +#include "sysdep/ptrace.h" + +enum { OP_NONE, OP_EXEC, OP_FORK, OP_TRACE_ON, OP_REBOOT, OP_HALT, OP_CB }; + +extern int tracing_pid; + +extern int tracer(int (*init_proc)(void *), void *sp); +extern void user_time_init_tt(void); +extern int copy_sc_from_user_tt(void *to_ptr, void *from_ptr, void *data); +extern int copy_sc_to_user_tt(void *to_ptr, void *fp, void *from_ptr, + void *data); +extern void sig_handler_common_tt(int sig, void *sc); +extern void syscall_handler_tt(int sig, union uml_pt_regs *regs); +extern void reboot_tt(void); +extern void halt_tt(void); +extern int is_tracer_winch(int pid, int fd, void *data); +extern void kill_off_processes_tt(void); + +#endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/tt/include/mode.h b/arch/um/kernel/tt/include/mode.h --- a/arch/um/kernel/tt/include/mode.h 2004-11-10 17:19:05 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) - * Licensed under the GPL - */ - -#ifndef __MODE_TT_H__ -#define __MODE_TT_H__ - -#include "sysdep/ptrace.h" - -enum { OP_NONE, OP_EXEC, OP_FORK, OP_TRACE_ON, OP_REBOOT, OP_HALT, OP_CB }; - -extern int tracing_pid; - -extern int tracer(int (*init_proc)(void *), void *sp); -extern void user_time_init_tt(void); -extern int copy_sc_from_user_tt(void *to_ptr, void *from_ptr, void *data); -extern int copy_sc_to_user_tt(void *to_ptr, void *fp, void *from_ptr, - void *data); -extern void sig_handler_common_tt(int sig, void *sc); -extern void syscall_handler_tt(int sig, union uml_pt_regs *regs); -extern void reboot_tt(void); -extern void halt_tt(void); -extern int is_tracer_winch(int pid, int fd, void *data); -extern void kill_off_processes_tt(void); - -#endif - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/kernel/tt/include/mode_kern-tt.h b/arch/um/kernel/tt/include/mode_kern-tt.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/tt/include/mode_kern-tt.h 2004-11-10 17:19:03 -08:00 @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#ifndef __TT_MODE_KERN_H__ +#define __TT_MODE_KERN_H__ + +#include "linux/sched.h" +#include "asm/page.h" +#include "asm/ptrace.h" +#include "asm/uaccess.h" + +extern void *switch_to_tt(void *prev, void *next); +extern void flush_thread_tt(void); +extern void start_thread_tt(struct pt_regs *regs, unsigned long eip, + unsigned long esp); +extern int copy_thread_tt(int nr, unsigned long clone_flags, unsigned long sp, + unsigned long stack_top, struct task_struct *p, + struct pt_regs *regs); +extern void release_thread_tt(struct task_struct *task); +extern void exit_thread_tt(void); +extern void initial_thread_cb_tt(void (*proc)(void *), void *arg); +extern void init_idle_tt(void); +extern void flush_tlb_kernel_range_tt(unsigned long start, unsigned long end); +extern void flush_tlb_kernel_vm_tt(void); +extern void __flush_tlb_one_tt(unsigned long addr); +extern void flush_tlb_range_tt(struct vm_area_struct *vma, + unsigned long start, unsigned long end); +extern void flush_tlb_mm_tt(struct mm_struct *mm); +extern void force_flush_all_tt(void); +extern long execute_syscall_tt(void *r); +extern void before_mem_tt(unsigned long brk_start); +extern unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out, + unsigned long *task_size_out); +extern int start_uml_tt(void); +extern int external_pid_tt(struct task_struct *task); +extern int thread_pid_tt(struct task_struct *task); + +#define kmem_end_tt (host_task_size - ABOVE_KMEM) + +#endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/tt/include/mode_kern.h b/arch/um/kernel/tt/include/mode_kern.h --- a/arch/um/kernel/tt/include/mode_kern.h 2004-11-10 17:19:03 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) - * Licensed under the GPL - */ - -#ifndef __TT_MODE_KERN_H__ -#define __TT_MODE_KERN_H__ - -#include "linux/sched.h" -#include "asm/page.h" -#include "asm/ptrace.h" -#include "asm/uaccess.h" - -extern void *switch_to_tt(void *prev, void *next); -extern void flush_thread_tt(void); -extern void start_thread_tt(struct pt_regs *regs, unsigned long eip, - unsigned long esp); -extern int copy_thread_tt(int nr, unsigned long clone_flags, unsigned long sp, - unsigned long stack_top, struct task_struct *p, - struct pt_regs *regs); -extern void release_thread_tt(struct task_struct *task); -extern void exit_thread_tt(void); -extern void initial_thread_cb_tt(void (*proc)(void *), void *arg); -extern void init_idle_tt(void); -extern void flush_tlb_kernel_range_tt(unsigned long start, unsigned long end); -extern void flush_tlb_kernel_vm_tt(void); -extern void __flush_tlb_one_tt(unsigned long addr); -extern void flush_tlb_range_tt(struct vm_area_struct *vma, - unsigned long start, unsigned long end); -extern void flush_tlb_mm_tt(struct mm_struct *mm); -extern void force_flush_all_tt(void); -extern long execute_syscall_tt(void *r); -extern void before_mem_tt(unsigned long brk_start); -extern unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out, - unsigned long *task_size_out); -extern int start_uml_tt(void); -extern int external_pid_tt(struct task_struct *task); -extern int thread_pid_tt(struct task_struct *task); - -#define kmem_end_tt (host_task_size - ABOVE_KMEM) - -#endif - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/kernel/tt/include/tt.h b/arch/um/kernel/tt/include/tt.h --- a/arch/um/kernel/tt/include/tt.h 2004-11-10 17:19:05 -08:00 +++ b/arch/um/kernel/tt/include/tt.h 2004-11-10 17:19:05 -08:00 @@ -24,11 +24,9 @@ extern int set_user_mode(void *task); extern void set_tracing(void *t, int tracing); extern int is_tracing(void *task); -extern int singlestepping_tt(void *t); -extern void clear_singlestep(void *t); extern void syscall_handler(int sig, union uml_pt_regs *regs); extern void exit_kernel(int pid, void *task); -extern int do_syscall(void *task, int pid); +extern int do_syscall(void *task, int pid, int local_using_sysemu); extern int is_valid_pid(int pid); extern void remap_data(void *segment_start, void *segment_end, int w); diff -Nru a/arch/um/kernel/tt/include/uaccess-tt.h b/arch/um/kernel/tt/include/uaccess-tt.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/tt/include/uaccess-tt.h 2004-11-10 17:19:05 -08:00 @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) + * Licensed under the GPL + */ + +#ifndef __TT_UACCESS_H +#define __TT_UACCESS_H + +#include "linux/string.h" +#include "linux/sched.h" +#include "asm/processor.h" +#include "asm/errno.h" +#include "asm/current.h" +#include "asm/a.out.h" +#include "uml_uaccess.h" + +#define ABOVE_KMEM (16 * 1024 * 1024) + +extern unsigned long end_vm; +extern unsigned long uml_physmem; + +#define under_task_size(addr, size) \ + (((unsigned long) (addr) < TASK_SIZE) && \ + (((unsigned long) (addr) + (size)) < TASK_SIZE)) + +#define is_stack(addr, size) \ + (((unsigned long) (addr) < STACK_TOP) && \ + ((unsigned long) (addr) >= STACK_TOP - ABOVE_KMEM) && \ + (((unsigned long) (addr) + (size)) <= STACK_TOP)) + +#define access_ok_tt(type, addr, size) \ + ((type == VERIFY_READ) || (segment_eq(get_fs(), KERNEL_DS)) || \ + (((unsigned long) (addr) <= ((unsigned long) (addr) + (size))) && \ + (under_task_size(addr, size) || is_stack(addr, size)))) + +static inline int verify_area_tt(int type, const void * addr, + unsigned long size) +{ + return(access_ok_tt(type, addr, size) ? 0 : -EFAULT); +} + +extern unsigned long get_fault_addr(void); + +extern int __do_copy_from_user(void *to, const void *from, int n, + void **fault_addr, void **fault_catcher); +extern int __do_strncpy_from_user(char *dst, const char *src, size_t n, + void **fault_addr, void **fault_catcher); +extern int __do_clear_user(void *mem, size_t len, void **fault_addr, + void **fault_catcher); +extern int __do_strnlen_user(const char *str, unsigned long n, + void **fault_addr, void **fault_catcher); + +extern int copy_from_user_tt(void *to, const void *from, int n); +extern int copy_to_user_tt(void *to, const void *from, int n); +extern int strncpy_from_user_tt(char *dst, const char *src, int count); +extern int __clear_user_tt(void *mem, int len); +extern int clear_user_tt(void *mem, int len); +extern int strnlen_user_tt(const void *str, int len); + +#endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/tt/include/uaccess.h b/arch/um/kernel/tt/include/uaccess.h --- a/arch/um/kernel/tt/include/uaccess.h 2004-11-10 17:19:05 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) - * Licensed under the GPL - */ - -#ifndef __TT_UACCESS_H -#define __TT_UACCESS_H - -#include "linux/string.h" -#include "linux/sched.h" -#include "asm/processor.h" -#include "asm/errno.h" -#include "asm/current.h" -#include "asm/a.out.h" -#include "uml_uaccess.h" - -#define ABOVE_KMEM (16 * 1024 * 1024) - -extern unsigned long end_vm; -extern unsigned long uml_physmem; - -#define under_task_size(addr, size) \ - (((unsigned long) (addr) < TASK_SIZE) && \ - (((unsigned long) (addr) + (size)) < TASK_SIZE)) - -#define is_stack(addr, size) \ - (((unsigned long) (addr) < STACK_TOP) && \ - ((unsigned long) (addr) >= STACK_TOP - ABOVE_KMEM) && \ - (((unsigned long) (addr) + (size)) <= STACK_TOP)) - -#define access_ok_tt(type, addr, size) \ - ((type == VERIFY_READ) || (segment_eq(get_fs(), KERNEL_DS)) || \ - (((unsigned long) (addr) <= ((unsigned long) (addr) + (size))) && \ - (under_task_size(addr, size) || is_stack(addr, size)))) - -static inline int verify_area_tt(int type, const void * addr, - unsigned long size) -{ - return(access_ok_tt(type, addr, size) ? 0 : -EFAULT); -} - -extern unsigned long get_fault_addr(void); - -extern int __do_copy_from_user(void *to, const void *from, int n, - void **fault_addr, void **fault_catcher); -extern int __do_strncpy_from_user(char *dst, const char *src, size_t n, - void **fault_addr, void **fault_catcher); -extern int __do_clear_user(void *mem, size_t len, void **fault_addr, - void **fault_catcher); -extern int __do_strnlen_user(const char *str, unsigned long n, - void **fault_addr, void **fault_catcher); - -extern int copy_from_user_tt(void *to, const void *from, int n); -extern int copy_to_user_tt(void *to, const void *from, int n); -extern int strncpy_from_user_tt(char *dst, const char *src, int count); -extern int __clear_user_tt(void *mem, int len); -extern int clear_user_tt(void *mem, int len); -extern int strnlen_user_tt(const void *str, int len); - -#endif - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c --- a/arch/um/kernel/tt/process_kern.c 2004-11-10 17:19:06 -08:00 +++ b/arch/um/kernel/tt/process_kern.c 2004-11-10 17:19:06 -08:00 @@ -82,7 +82,7 @@ prev_sched = current->thread.prev_sched; if((prev_sched->exit_state == EXIT_ZOMBIE) || (prev_sched->exit_state == EXIT_DEAD)) - os_kill_process(prev_sched->thread.mode.tt.extern_pid, 1); + os_kill_ptraced_process(prev_sched->thread.mode.tt.extern_pid, 1); /* This works around a nasty race with 'jail'. If we are switching * between two threads of a threaded app and the incoming process @@ -305,7 +305,6 @@ change_sig(SIGUSR1, 0); err = 0; - out: return(err); } @@ -522,22 +521,6 @@ if(err) panic("Can't create switch pipe for init_task, errno = %d", -err); -} - -int singlestepping_tt(void *t) -{ - struct task_struct *task = t; - - if(task->thread.mode.tt.singlestep_syscall) - return(0); - return(task->ptrace & PT_DTRACE); -} - -void clear_singlestep(void *t) -{ - struct task_struct *task = t; - - task->ptrace &= ~PT_DTRACE; } int start_uml_tt(void) diff -Nru a/arch/um/kernel/tt/syscall_kern.c b/arch/um/kernel/tt/syscall_kern.c --- a/arch/um/kernel/tt/syscall_kern.c 2004-11-10 17:19:02 -08:00 +++ b/arch/um/kernel/tt/syscall_kern.c 2004-11-10 17:19:02 -08:00 @@ -123,12 +123,6 @@ set_fs(USER_DS); - if(current->thread.mode.tt.singlestep_syscall){ - current->thread.mode.tt.singlestep_syscall = 0; - current->ptrace &= ~PT_DTRACE; - force_sig(SIGTRAP, current); - } - return(res); } diff -Nru a/arch/um/kernel/tt/syscall_user.c b/arch/um/kernel/tt/syscall_user.c --- a/arch/um/kernel/tt/syscall_user.c 2004-11-10 17:19:05 -08:00 +++ b/arch/um/kernel/tt/syscall_user.c 2004-11-10 17:19:05 -08:00 @@ -33,7 +33,7 @@ SC_START_SYSCALL(sc); index = record_syscall_start(syscall); - syscall_trace(regs, 1); + syscall_trace(regs, 0); result = execute_syscall(regs); /* regs->sc may have changed while the system call ran (there may @@ -46,11 +46,11 @@ (result == -ERESTARTNOINTR)) do_signal(result); - syscall_trace(regs, 0); + syscall_trace(regs, 1); record_syscall_end(index, result); } -int do_syscall(void *task, int pid) +int do_syscall(void *task, int pid, int local_using_sysemu) { unsigned long proc_regs[FRAME_SIZE]; union uml_pt_regs *regs; @@ -69,6 +69,9 @@ ((unsigned long *) PT_IP(proc_regs) >= &_stext) && ((unsigned long *) PT_IP(proc_regs) <= &_etext)) tracer_panic("I'm tracing myself and I can't get out"); + + if(local_using_sysemu) + return(1); if(ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, __NR_getpid) < 0) diff -Nru a/arch/um/kernel/tt/tracer.c b/arch/um/kernel/tt/tracer.c --- a/arch/um/kernel/tt/tracer.c 2004-11-10 17:19:02 -08:00 +++ b/arch/um/kernel/tt/tracer.c 2004-11-10 17:19:02 -08:00 @@ -184,6 +184,7 @@ unsigned long eip = 0; int status, pid = 0, sig = 0, cont_type, tracing = 0, op = 0; int last_index, proc_id = 0, n, err, old_tracing = 0, strace = 0; + int pt_syscall_parm, local_using_sysemu; capture_signal_stack(); signal(SIGPIPE, SIG_IGN); @@ -297,6 +298,9 @@ tracing = is_tracing(task); old_tracing = tracing; + local_using_sysemu = get_using_sysemu(); + pt_syscall_parm = local_using_sysemu ? PTRACE_SYSEMU : PTRACE_SYSCALL; + switch(sig){ case SIGUSR1: sig = 0; @@ -330,9 +334,8 @@ continue; } tracing = 0; - if(do_syscall(task, pid)) + if(do_syscall(task, pid, local_using_sysemu)) sig = SIGUSR2; - else clear_singlestep(task); break; case SIGPROF: if(tracing) sig = 0; @@ -349,6 +352,7 @@ case SIGBUS: case SIGILL: case SIGWINCH: + default: tracing = 0; break; @@ -368,9 +372,9 @@ } if(tracing){ - if(singlestepping_tt(task)) + if(singlestepping(task)) cont_type = PTRACE_SINGLESTEP; - else cont_type = PTRACE_SYSCALL; + else cont_type = pt_syscall_parm; } else cont_type = PTRACE_CONT; diff -Nru a/arch/um/kernel/tt/trap_user.c b/arch/um/kernel/tt/trap_user.c --- a/arch/um/kernel/tt/trap_user.c 2004-11-10 17:19:05 -08:00 +++ b/arch/um/kernel/tt/trap_user.c 2004-11-10 17:19:05 -08:00 @@ -30,6 +30,13 @@ if(sig == SIGSEGV) change_sig(SIGSEGV, 1); + /* This is done because to allow SIGSEGV to be delivered inside a SEGV + * handler. This can happen in copy_user, and if SEGV is disabled, + * the process will die. + */ + if(sig == SIGSEGV) + change_sig(SIGSEGV, 1); + r = &TASK_REGS(get_current())->tt; save_regs = *r; is_user = user_context(SC_SP(sc)); diff -Nru a/arch/um/kernel/tty_log.c b/arch/um/kernel/tty_log.c --- a/arch/um/kernel/tty_log.c 2004-11-10 17:19:05 -08:00 +++ b/arch/um/kernel/tty_log.c 2004-11-10 17:19:05 -08:00 @@ -205,6 +205,8 @@ printf("set_tty_log_fd - strtoul failed on '%s'\n", name); tty_log_fd = -1; } + + *add = 0; return 0; } diff -Nru a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c --- a/arch/um/kernel/um_arch.c 2004-11-10 17:19:06 -08:00 +++ b/arch/um/kernel/um_arch.c 2004-11-10 17:19:06 -08:00 @@ -321,6 +321,11 @@ uml_start = CHOOSE_MODE_PROC(set_task_sizes_tt, set_task_sizes_skas, 0, &host_task_size, &task_size); + /* Need to check this early because mmapping happens before the + * kernel is running. + */ + check_tmpexec(); + brk_start = (unsigned long) sbrk(0); CHOOSE_MODE_PROC(before_mem_tt, before_mem_skas, brk_start); /* Increase physical memory size for exec-shield users @@ -400,9 +405,9 @@ static int panic_exit(struct notifier_block *self, unsigned long unused1, void *unused2) { -#ifdef CONFIG_MAGIC_SYSRQ - handle_sysrq('p', ¤t->thread.regs, NULL); -#endif + bust_spinlocks(1); + show_regs(&(current->thread.regs)); + bust_spinlocks(0); uml_exitcode = 1; machine_halt(); return(0); diff -Nru a/arch/um/kernel/umid.c b/arch/um/kernel/umid.c --- a/arch/um/kernel/umid.c 2004-11-10 17:19:06 -08:00 +++ b/arch/um/kernel/umid.c 2004-11-10 17:19:06 -08:00 @@ -54,6 +54,7 @@ static int __init set_umid_arg(char *name, int *add) { + *add = 0; return(set_umid(name, 0, printf)); } diff -Nru a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S --- a/arch/um/kernel/uml.lds.S 2004-11-10 17:19:04 -08:00 +++ b/arch/um/kernel/uml.lds.S 2004-11-10 17:19:04 -08:00 @@ -35,6 +35,8 @@ { *(.text) SCHED_TEXT + LOCK_TEXT + *(.fixup) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.gnu.linkonce.t*) diff -Nru a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c --- a/arch/um/os-Linux/file.c 2004-11-10 17:19:07 -08:00 +++ b/arch/um/os-Linux/file.c 2004-11-10 17:19:07 -08:00 @@ -308,7 +308,8 @@ __u64 actual; actual = lseek64(fd, offset, SEEK_SET); - if(actual != offset) return(-errno); + if(actual != offset) + return(-errno); return(0); } diff -Nru a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c --- a/arch/um/os-Linux/process.c 2004-11-10 17:19:02 -08:00 +++ b/arch/um/os-Linux/process.c 2004-11-10 17:19:02 -08:00 @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include "os.h" @@ -92,6 +93,13 @@ if(reap_child) CATCH_EINTR(waitpid(pid, NULL, 0)); +} + +void os_kill_ptraced_process(int pid, int reap_child) +{ + ptrace(PTRACE_KILL, pid); + if(reap_child) + CATCH_EINTR(waitpid(pid, NULL, 0)); } void os_usr1_process(int pid) diff -Nru a/arch/um/sys-i386/ptrace.c b/arch/um/sys-i386/ptrace.c --- a/arch/um/sys-i386/ptrace.c 2004-11-10 17:19:05 -08:00 +++ b/arch/um/sys-i386/ptrace.c 2004-11-10 17:19:05 -08:00 @@ -7,6 +7,7 @@ #include "asm/elf.h" #include "asm/ptrace.h" #include "asm/uaccess.h" +#include "asm/unistd.h" #include "ptrace_user.h" #include "sysdep/sigcontext.h" #include "sysdep/sc.h" @@ -23,11 +24,12 @@ n = copy_from_user(&instr, (void *) addr, sizeof(instr)); if(n){ - printk("is_syscall : failed to read instruction from 0x%lu\n", + printk("is_syscall : failed to read instruction from 0x%lx\n", addr); return(0); } - return(instr == 0x80cd); + /* int 0x80 or sysenter */ + return((instr == 0x80cd) || (instr == 0x340f)); } /* determines which flags the user has access to. */ diff -Nru a/arch/v850/kernel/ptrace.c b/arch/v850/kernel/ptrace.c --- a/arch/v850/kernel/ptrace.c 2004-11-10 17:19:04 -08:00 +++ b/arch/v850/kernel/ptrace.c 2004-11-10 17:19:04 -08:00 @@ -1,8 +1,8 @@ /* * arch/v850/kernel/ptrace.c -- `ptrace' system call * - * Copyright (C) 2002,03 NEC Electronics Corporation - * Copyright (C) 2002,03 Miles Bader + * Copyright (C) 2002,03,04 NEC Electronics Corporation + * Copyright (C) 2002,03,04 Miles Bader * * Derived from arch/mips/kernel/ptrace.c: * @@ -147,8 +147,8 @@ rval = ptrace_attach(child); goto out_tsk; } - ret = ptrace_check_attach(child, request == PTRACE_KILL); - if (ret < 0) + rval = ptrace_check_attach(child, request == PTRACE_KILL); + if (rval < 0) goto out_tsk; switch (request) { diff -Nru a/arch/v850/kernel/signal.c b/arch/v850/kernel/signal.c --- a/arch/v850/kernel/signal.c 2004-11-10 17:19:07 -08:00 +++ b/arch/v850/kernel/signal.c 2004-11-10 17:19:07 -08:00 @@ -427,11 +427,9 @@ */ static void -handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, - struct pt_regs * regs) +handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, + sigset_t *oldset, struct pt_regs * regs) { - struct k_sigaction *ka = ¤t->sighand->action[sig-1]; - /* Are we from a system call? */ if (PT_REGS_SYSCALL (regs)) { /* If so, check system call restarting.. */ @@ -464,9 +462,6 @@ else setup_frame(sig, ka, oldset, regs); - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; - if (!(ka->sa.sa_flags & SA_NODEFER)) { spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); @@ -489,6 +484,7 @@ { siginfo_t info; int signr; + struct k_sigaction ka; /* * We want the common case to go fast, which @@ -502,10 +498,10 @@ if (!oldset) oldset = ¤t->blocked; - signr = get_signal_to_deliver(&info, regs, NULL); + signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (signr > 0) { /* Whee! Actually deliver the signal. */ - handle_signal(signr, &info, oldset, regs); + handle_signal(signr, &info, &ka, oldset, regs); return 1; } diff -Nru a/arch/v850/kernel/vmlinux.lds.S b/arch/v850/kernel/vmlinux.lds.S --- a/arch/v850/kernel/vmlinux.lds.S 2004-11-10 17:19:05 -08:00 +++ b/arch/v850/kernel/vmlinux.lds.S 2004-11-10 17:19:05 -08:00 @@ -60,6 +60,11 @@ ___start___kcrctab_gpl = .; \ *(__kcrctab_gpl) \ ___stop___kcrctab_gpl = .; \ + /* Built-in module parameters */ \ + ___start___param = .; \ + *(__param) \ + ___stop___param = .; + /* Kernel text segment, and some constant data areas. */ #define TEXT_CONTENTS \ diff -Nru a/arch/x86_64/Kconfig.debug b/arch/x86_64/Kconfig.debug --- a/arch/x86_64/Kconfig.debug 2004-11-10 17:19:03 -08:00 +++ b/arch/x86_64/Kconfig.debug 2004-11-10 17:19:03 -08:00 @@ -33,6 +33,16 @@ options. See Documentation/x86_64/boot-options.txt for more details. +config KPROBES + bool "Kprobes" + depends on DEBUG_KERNEL + help + Kprobes allows you to trap at almost any kernel address and + execute a callback function. register_kprobe() establishes + a probepoint and specifies the callback. Kprobes is useful + for kernel debugging, non-intrusive instrumentation and testing. + If in doubt, say "N". + config IOMMU_LEAK bool "IOMMU leak tracing" depends on DEBUG_KERNEL diff -Nru a/arch/x86_64/boot/Makefile b/arch/x86_64/boot/Makefile --- a/arch/x86_64/boot/Makefile 2004-11-10 17:19:04 -08:00 +++ b/arch/x86_64/boot/Makefile 2004-11-10 17:19:04 -08:00 @@ -31,6 +31,7 @@ EXTRA_CFLAGS := -m32 hostprogs-y := tools/build +HOST_EXTRACFLAGS += $(LINUXINCLUDE) subdir- := compressed/ #Let make clean descend in compressed/ # --------------------------------------------------------------------------- diff -Nru a/arch/x86_64/boot/compressed/Makefile b/arch/x86_64/boot/compressed/Makefile --- a/arch/x86_64/boot/compressed/Makefile 2004-11-10 17:19:04 -08:00 +++ b/arch/x86_64/boot/compressed/Makefile 2004-11-10 17:19:04 -08:00 @@ -11,7 +11,7 @@ # cannot use EXTRA_CFLAGS because base CFLAGS contains -mkernel which conflicts with # -m32 -CFLAGS := -m32 -D__KERNEL__ -Iinclude -O2 +CFLAGS := -m32 -D__KERNEL__ -Iinclude -O2 -fno-strict-aliasing LDFLAGS := -m elf_i386 LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32 -m elf_i386 diff -Nru a/arch/x86_64/boot/video.S b/arch/x86_64/boot/video.S --- a/arch/x86_64/boot/video.S 2004-11-10 17:19:04 -08:00 +++ b/arch/x86_64/boot/video.S 2004-11-10 17:19:04 -08:00 @@ -1936,7 +1936,7 @@ movl $0x13131313, %eax # memset block with 0x13 movw $32, %cx - movw $0x440, %di + movw $0x140, %di cld rep stosl @@ -1945,7 +1945,7 @@ movw $0x01, %bx movw $0x00, %cx movw $0x01, %dx - movw $0x440, %di + movw $0x140, %di int $0x10 popw %di # restore all registers diff -Nru a/arch/x86_64/defconfig b/arch/x86_64/defconfig --- a/arch/x86_64/defconfig 2004-11-10 17:19:05 -08:00 +++ b/arch/x86_64/defconfig 2004-11-10 17:19:05 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc1-bk19 -# Sun Sep 12 23:13:23 2004 +# Linux kernel version: 2.6.10-rc1-bk6 +# Thu Oct 28 00:07:32 2004 # CONFIG_X86_64=y CONFIG_64BIT=y @@ -13,12 +13,14 @@ CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup @@ -32,6 +34,7 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=18 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set @@ -40,10 +43,6 @@ # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SHMEM=y # CONFIG_TINY_SHMEM is not set @@ -56,6 +55,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set CONFIG_STOP_MACHINE=y @@ -80,6 +80,7 @@ # CONFIG_PREEMPT is not set CONFIG_SCHED_SMT=y CONFIG_K8_NUMA=y +# CONFIG_NUMA_EMU is not set CONFIG_DISCONTIGMEM=y CONFIG_NUMA=y CONFIG_HAVE_DEC_LOCK=y @@ -87,12 +88,16 @@ CONFIG_GART_IOMMU=y CONFIG_SWIOTLB=y CONFIG_X86_MCE=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Power management options # CONFIG_PM=y +# CONFIG_PM_DEBUG is not set CONFIG_SOFTWARE_SUSPEND=y +CONFIG_PM_STD_PARTITION="" # # ACPI (Advanced Configuration and Power Interface) Support @@ -110,6 +115,7 @@ CONFIG_ACPI_THERMAL=y # CONFIG_ACPI_ASUS is not set CONFIG_ACPI_TOSHIBA=y +CONFIG_ACPI_BLACKLIST_YEAR=2001 CONFIG_ACPI_DEBUG=y CONFIG_ACPI_BUS=y CONFIG_ACPI_EC=y @@ -185,7 +191,17 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" CONFIG_LBD=y +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # # ATA/ATAPI/MFM/RLL support @@ -205,7 +221,6 @@ # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes @@ -222,7 +237,6 @@ # CONFIG_BLK_DEV_IDEDMA_FORCED is not set CONFIG_IDEDMA_PCI_AUTO=y # CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_ADMA=y # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set CONFIG_BLK_DEV_AMD74XX=y @@ -298,6 +312,7 @@ # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set CONFIG_SCSI_SATA=y +# CONFIG_SCSI_SATA_AHCI is not set # CONFIG_SCSI_SATA_SVW is not set CONFIG_SCSI_ATA_PIIX=y # CONFIG_SCSI_SATA_NV is not set @@ -305,6 +320,7 @@ # CONFIG_SCSI_SATA_SX4 is not set # CONFIG_SCSI_SATA_SIL is not set # CONFIG_SCSI_SATA_SIS is not set +# CONFIG_SCSI_SATA_ULI is not set CONFIG_SCSI_SATA_VIA=y # CONFIG_SCSI_SATA_VITESSE is not set # CONFIG_SCSI_BUSLOGIC is not set @@ -314,12 +330,14 @@ # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_QLOGIC_1280_1040 is not set CONFIG_SCSI_QLA2XXX=y # CONFIG_SCSI_QLA21XX is not set # CONFIG_SCSI_QLA22XX is not set @@ -404,7 +422,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -471,7 +488,6 @@ # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -485,6 +501,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=y # @@ -552,6 +569,7 @@ # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PCIPS2 is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -714,6 +732,8 @@ # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_SUSPEND is not set # CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers @@ -722,7 +742,7 @@ # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_UHCI_HCD is not set +CONFIG_USB_UHCI_HCD=y # # USB Device Class drivers @@ -745,7 +765,7 @@ # CONFIG_USB_STORAGE_JUMPSHOT is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y @@ -806,10 +826,15 @@ # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set @@ -872,6 +897,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y @@ -938,18 +964,19 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set -# CONFIG_FRAME_POINTER is not set -# CONFIG_INIT_DEBUG is not set -# CONFIG_SCHEDSTATS is not set +CONFIG_INIT_DEBUG=y # CONFIG_IOMMU_DEBUG is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S --- a/arch/x86_64/ia32/ia32entry.S 2004-11-10 17:19:04 -08:00 +++ b/arch/x86_64/ia32/ia32entry.S 2004-11-10 17:19:04 -08:00 @@ -391,7 +391,7 @@ .quad sys_uselib .quad sys_swapon .quad sys_reboot - .quad sys32_oldreaddir + .quad compat_old_readdir .quad sys32_mmap /* 90 */ .quad sys_munmap .quad sys_truncate @@ -433,7 +433,7 @@ .quad sys_init_module .quad sys_delete_module .quad quiet_ni_syscall /* 130 get_kernel_syms */ - .quad sys32_quotactl /* quotactl */ + .quad sys_quotactl .quad sys_getpgid .quad sys_fchdir .quad quiet_ni_syscall /* bdflush */ @@ -443,7 +443,7 @@ .quad sys_setfsuid16 .quad sys_setfsgid16 .quad sys_llseek /* 140 */ - .quad sys32_getdents + .quad compat_sys_getdents .quad compat_sys_select .quad sys_flock .quad sys_msync @@ -522,7 +522,7 @@ .quad sys_pivot_root .quad sys_mincore .quad sys_madvise - .quad sys_getdents64 /* 220 getdents64 */ + .quad compat_sys_getdents64 /* 220 getdents64 */ .quad compat_sys_fcntl64 .quad quiet_ni_syscall /* tux */ .quad quiet_ni_syscall /* security */ @@ -547,10 +547,10 @@ .quad compat_sys_sched_getaffinity .quad sys32_set_thread_area .quad sys32_get_thread_area - .quad sys32_io_setup /* 245 */ + .quad compat_sys_io_setup /* 245 */ .quad sys_io_destroy - .quad sys32_io_getevents - .quad sys32_io_submit + .quad compat_sys_io_getevents + .quad compat_sys_io_submit .quad sys_io_cancel .quad sys_fadvise64 /* 250 */ .quad quiet_ni_syscall /* free_huge_pages */ diff -Nru a/arch/x86_64/ia32/ptrace32.c b/arch/x86_64/ia32/ptrace32.c --- a/arch/x86_64/ia32/ptrace32.c 2004-11-10 17:19:03 -08:00 +++ b/arch/x86_64/ia32/ptrace32.c 2004-11-10 17:19:03 -08:00 @@ -109,7 +109,8 @@ case offsetof(struct user32, u_debugreg[7]): val &= ~DR_CONTROL_RESERVED; - /* You are not expected to understand this ... I don't neither. */ + /* See arch/i386/kernel/ptrace.c for an explanation of + * this awkward check.*/ for(i=0; i<4; i++) if ((0x5454 >> ((val >> (16 + 4*i)) & 0xf)) & 1) return -EIO; diff -Nru a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c --- a/arch/x86_64/ia32/sys_ia32.c 2004-11-10 17:19:04 -08:00 +++ b/arch/x86_64/ia32/sys_ia32.c 2004-11-10 17:19:04 -08:00 @@ -473,134 +473,6 @@ return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL); } -struct linux32_dirent { - u32 d_ino; - u32 d_off; - u16 d_reclen; - char d_name[1]; -}; - -struct old_linux32_dirent { - u32 d_ino; - u32 d_offset; - u16 d_namlen; - char d_name[1]; -}; - -struct getdents32_callback { - struct linux32_dirent __user * current_dir; - struct linux32_dirent __user * previous; - int count; - int error; -}; - -struct readdir32_callback { - struct old_linux32_dirent __user * dirent; - int count; -}; - -static int -filldir32 (void *__buf, const char *name, int namlen, loff_t offset, ino_t ino, - unsigned int d_type) -{ - struct linux32_dirent __user * dirent; - struct getdents32_callback * buf = (struct getdents32_callback *) __buf; - int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 2, 4); - - buf->error = -EINVAL; /* only used if we fail.. */ - if (reclen > buf->count) - return -EINVAL; - dirent = buf->previous; - if (dirent) - put_user(offset, &dirent->d_off); - dirent = buf->current_dir; - buf->previous = dirent; - put_user(ino, &dirent->d_ino); - put_user(reclen, &dirent->d_reclen); - copy_to_user(dirent->d_name, name, namlen); - put_user(0, dirent->d_name + namlen); - put_user(d_type, (char __user *)dirent + reclen - 1); - dirent = ((void __user *)dirent) + reclen; - buf->current_dir = dirent; - buf->count -= reclen; - return 0; -} - -asmlinkage long -sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count) -{ - struct file * file; - struct linux32_dirent __user * lastdirent; - struct getdents32_callback buf; - int error; - - error = -EBADF; - file = fget(fd); - if (!file) - goto out; - - buf.current_dir = (struct linux32_dirent __user *) dirent; - buf.previous = NULL; - buf.count = count; - buf.error = 0; - - error = vfs_readdir(file, filldir32, &buf); - if (error < 0) - goto out_putf; - error = buf.error; - lastdirent = buf.previous; - if (lastdirent) { - put_user(file->f_pos, &lastdirent->d_off); - error = count - buf.count; - } - -out_putf: - fput(file); -out: - return error; -} - -static int -fillonedir32 (void * __buf, const char * name, int namlen, loff_t offset, ino_t ino, unsigned d_type) -{ - struct readdir32_callback * buf = (struct readdir32_callback *) __buf; - struct old_linux32_dirent __user * dirent; - - if (buf->count) - return -EINVAL; - buf->count++; - dirent = buf->dirent; - put_user(ino, &dirent->d_ino); - put_user(offset, &dirent->d_offset); - put_user(namlen, &dirent->d_namlen); - copy_to_user(dirent->d_name, name, namlen); - put_user(0, dirent->d_name + namlen); - return 0; -} - -asmlinkage long -sys32_oldreaddir (unsigned int fd, void __user * dirent, unsigned int count) -{ - int error; - struct file * file; - struct readdir32_callback buf; - - error = -EBADF; - file = fget(fd); - if (!file) - goto out; - - buf.count = 0; - buf.dirent = dirent; - - error = vfs_readdir(file, fillonedir32, &buf); - if (error >= 0) - error = buf.count; - fput(file); -out: - return error; -} - struct sel_arg_struct { unsigned int n; unsigned int inp; @@ -1186,90 +1058,6 @@ return sys_kill(pid, sig); } - -long sys32_io_setup(unsigned nr_reqs, u32 __user *ctx32p) -{ - long ret; - aio_context_t ctx64; - mm_segment_t oldfs = get_fs(); - set_fs(KERNEL_DS); - ret = sys_io_setup(nr_reqs, &ctx64); - set_fs(oldfs); - /* truncating is ok because it's a user address */ - if (!ret) - ret = put_user((u32)ctx64, ctx32p); - return ret; -} - -asmlinkage long sys32_io_submit(aio_context_t ctx_id, int nr, - compat_uptr_t __user *iocbpp) -{ - struct kioctx *ctx; - long ret = 0; - int i; - - if (unlikely(nr < 0)) - return -EINVAL; - - if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(*iocbpp))))) - return -EFAULT; - - ctx = lookup_ioctx(ctx_id); - if (unlikely(!ctx)) { - pr_debug("EINVAL: io_submit: invalid context id\n"); - return -EINVAL; - } - - for (i=0; i= 0xffffffff || - !access_ok(VERIFY_WRITE, events, nr * sizeof(struct io_event))) - return -EFAULT; - if (timeout && get_compat_timespec(&t, timeout)) - return -EFAULT; - oldfs = get_fs(); - set_fs(KERNEL_DS); - ret = sys_io_getevents(ctx_id,min_nr,nr,events,timeout ? &t : NULL); - set_fs(oldfs); - if (!ret && timeout && put_compat_timespec(&t, timeout)) - return -EFAULT; - return ret; -} - asmlinkage long sys32_open(const char __user * filename, int flags, int mode) { char * tmp; @@ -1340,18 +1128,6 @@ static char lastcomm[8]; if (strcmp(lastcomm, me->comm)) { printk(KERN_INFO "%s: vm86 mode not supported on 64 bit kernel\n", - me->comm); - strcpy(lastcomm, me->comm); - } - return -ENOSYS; -} - -long sys32_quotactl(void) -{ - struct task_struct *me = current; - static char lastcomm[8]; - if (strcmp(lastcomm, me->comm)) { - printk(KERN_INFO "%s: 32bit quotactl not supported on 64 bit kernel\n", me->comm); strcpy(lastcomm, me->comm); } diff -Nru a/arch/x86_64/ia32/syscall32.c b/arch/x86_64/ia32/syscall32.c --- a/arch/x86_64/ia32/syscall32.c 2004-11-10 17:19:05 -08:00 +++ b/arch/x86_64/ia32/syscall32.c 2004-11-10 17:19:05 -08:00 @@ -28,7 +28,7 @@ extern int sysctl_vsyscall32; char *syscall32_page; -static int use_sysenter __initdata = -1; +static int use_sysenter = -1; /* * Map the 32bit vsyscall page on demand. diff -Nru a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile --- a/arch/x86_64/kernel/Makefile 2004-11-10 17:19:05 -08:00 +++ b/arch/x86_64/kernel/Makefile 2004-11-10 17:19:05 -08:00 @@ -5,11 +5,11 @@ extra-y := head.o head64.o init_task.o vmlinux.lds EXTRA_AFLAGS := -traditional obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ - ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \ + ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \ x8664_ksyms.o i387.o syscall.o vsyscall.o \ - setup64.o bootflag.o e820.o reboot.o warmreboot.o -obj-y += mce.o + setup64.o bootflag.o e820.o reboot.o warmreboot.o quirks.o +obj-$(CONFIG_X86_MCE) += mce.o obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/ obj-$(CONFIG_ACPI_BOOT) += acpi/ obj-$(CONFIG_X86_MSR) += msr.o @@ -17,7 +17,8 @@ obj-$(CONFIG_X86_CPUID) += cpuid.o obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o -obj-$(CONFIG_X86_IO_APIC) += io_apic.o mpparse.o +obj-$(CONFIG_X86_IO_APIC) += io_apic.o mpparse.o \ + genapic.o genapic_cluster.o genapic_flat.o obj-$(CONFIG_PM) += suspend.o obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend_asm.o obj-$(CONFIG_CPU_FREQ) += cpufreq/ @@ -25,6 +26,7 @@ obj-$(CONFIG_GART_IOMMU) += pci-gart.o aperture.o obj-$(CONFIG_DUMMY_IOMMU) += pci-nommu.o pci-dma.o obj-$(CONFIG_SWIOTLB) += swiotlb.o +obj-$(CONFIG_KPROBES) += kprobes.o obj-$(CONFIG_MODULES) += module.o @@ -37,3 +39,4 @@ swiotlb-$(CONFIG_SWIOTLB) += ../../ia64/lib/swiotlb.o microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o intel_cacheinfo-y += ../../i386/kernel/cpu/intel_cacheinfo.o +quirks-y += ../../i386/kernel/quirks.o diff -Nru a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c --- a/arch/x86_64/kernel/apic.c 2004-11-10 17:19:02 -08:00 +++ b/arch/x86_64/kernel/apic.c 2004-11-10 17:19:02 -08:00 @@ -32,6 +32,7 @@ #include #include #include +#include int apic_verbosity; @@ -300,8 +301,7 @@ * Double-check whether this APIC is really registered. * This is meaningless in clustered apic mode, so we skip it. */ - if (!clustered_apic_mode && - !physid_isset(GET_APIC_ID(apic_read(APIC_ID)), phys_cpu_present_map)) + if (!apic_id_registered()) BUG(); /* @@ -309,23 +309,7 @@ * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel * document number 292116). So here it goes... */ - - if (!clustered_apic_mode) { - /* - * In clustered apic mode, the firmware does this for us - * Put the APIC into flat delivery mode. - * Must be "all ones" explicitly for 82489DX. - */ - apic_write_around(APIC_DFR, 0xffffffff); - - /* - * Set up the logical destination ID. - */ - value = apic_read(APIC_LDR); - value &= ~APIC_LDR_MASK; - value |= (1<<(smp_processor_id()+24)); - apic_write_around(APIC_LDR, value); - } + init_apic_ldr(); /* * Set Task Priority to 'accept all'. We never change this @@ -919,6 +903,54 @@ irq_enter(); smp_local_timer_interrupt(regs); irq_exit(); +} + +/* + * oem_force_hpet_timer -- force HPET mode for some boxes. + * + * Thus far, the major user of this is IBM's Summit2 series: + * + * Clustered boxes may have unsynced TSC problems if they are + * multi-chassis. Use available data to take a good guess. + * If in doubt, go HPET. + */ +__init int oem_force_hpet_timer(void) +{ + int i, clusters, zeros; + unsigned id; + DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS); + + bitmap_empty(clustermap, NUM_APIC_CLUSTERS); + + for (i = 0; i < NR_CPUS; i++) { + id = bios_cpu_apicid[i]; + if (id != BAD_APICID) + __set_bit(APIC_CLUSTERID(id), clustermap); + } + + /* Problem: Partially populated chassis may not have CPUs in some of + * the APIC clusters they have been allocated. Only present CPUs have + * bios_cpu_apicid entries, thus causing zeroes in the bitmap. Since + * clusters are allocated sequentially, count zeros only if they are + * bounded by ones. + */ + clusters = 0; + zeros = 0; + for (i = 0; i < NUM_APIC_CLUSTERS; i++) { + if (test_bit(i, clustermap)) { + clusters += 1 + zeros; + zeros = 0; + } else + ++zeros; + } + + /* + * If clusters > 2, then should be multi-chassis. Return 1 for HPET. + * Else return 0 to use TSC. + * May have to revisit this when multi-core + hyperthreaded CPUs come + * out, but AFAIK this will work even for them. + */ + return (clusters > 2); } /* diff -Nru a/arch/x86_64/kernel/cpufreq/Kconfig b/arch/x86_64/kernel/cpufreq/Kconfig --- a/arch/x86_64/kernel/cpufreq/Kconfig 2004-11-10 17:19:07 -08:00 +++ b/arch/x86_64/kernel/cpufreq/Kconfig 2004-11-10 17:19:07 -08:00 @@ -88,5 +88,29 @@ If in doubt, say N. +config X86_P4_CLOCKMOD + tristate "Intel Pentium 4 clock modulation" + depends on CPU_FREQ_TABLE && EMBEDDED + help + This adds the clock modulation driver for Intel Pentium 4 / XEON + processors. When enabled it will lower CPU temperature by skipping + clocks. + + This driver should be only used in exceptional + circumstances when very low power is needed because it causes severe + slowdowns and noticeable latencies. Normally Speedstep should be used + instead. + + For details, take a look at . + + Unless you are absolutely sure say N. + + +config X86_SPEEDSTEP_LIB + tristate + depends on (X86_P4_CLOCKMOD) + default (X86_P4_CLOCKMOD) + + endmenu diff -Nru a/arch/x86_64/kernel/cpufreq/Makefile b/arch/x86_64/kernel/cpufreq/Makefile --- a/arch/x86_64/kernel/cpufreq/Makefile 2004-11-10 17:19:03 -08:00 +++ b/arch/x86_64/kernel/cpufreq/Makefile 2004-11-10 17:19:03 -08:00 @@ -7,7 +7,11 @@ obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o obj-$(CONFIG_X86_SPEEDSTEP_CENTRINO) += speedstep-centrino.o obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi.o +obj-$(CONFIG_X86_P4_CLOCKMOD) += p4-clockmod.o +obj-$(CONFIG_X86_SPEEDSTEP_LIB) += speedstep-lib.o powernow-k8-objs := ${SRCDIR}/powernow-k8.o speedstep-centrino-objs := ${SRCDIR}/speedstep-centrino.o acpi-objs := ${SRCDIR}/acpi.o +p4-clockmod-objs := ${SRCDIR}/p4-clockmod.o +speedstep-lib-objs := ${SRCDIR}/speedstep-lib.o diff -Nru a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c --- a/arch/x86_64/kernel/early_printk.c 2004-11-10 17:19:05 -08:00 +++ b/arch/x86_64/kernel/early_printk.c 2004-11-10 17:19:05 -08:00 @@ -10,7 +10,7 @@ #ifdef __i386__ #define VGABASE (__ISA_IO_base + 0xb8000) #else -#define VGABASE 0xffffffff800b8000UL +#define VGABASE ((void *)0xffffffff800b8000UL) #endif #define MAX_YPOS 25 diff -Nru a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S --- a/arch/x86_64/kernel/entry.S 2004-11-10 17:19:03 -08:00 +++ b/arch/x86_64/kernel/entry.S 2004-11-10 17:19:03 -08:00 @@ -907,6 +907,7 @@ ENTRY(spurious_interrupt_bug) zeroentry do_spurious_interrupt_bug +#ifdef CONFIG_X86_MCE /* runs on exception stack */ ENTRY(machine_check) CFI_STARTPROC @@ -915,6 +916,7 @@ paranoidentry do_machine_check jmp paranoid_exit CFI_ENDPROC +#endif ENTRY(call_debug) zeroentry do_call_debug diff -Nru a/arch/x86_64/kernel/genapic.c b/arch/x86_64/kernel/genapic.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/x86_64/kernel/genapic.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,82 @@ +/* + * Copyright 2004 James Cleverdon, IBM. + * Subject to the GNU Public License, v.2 + * + * Generic APIC sub-arch probe layer. + * + * Hacked for x86-64 by James Cleverdon from i386 architecture code by + * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and + * James Cleverdon. + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/* which logical CPU number maps to which CPU (physical APIC ID) */ +u8 x86_cpu_to_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; +EXPORT_SYMBOL(x86_cpu_to_apicid); +u8 x86_cpu_to_log_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; + +extern struct genapic apic_cluster; +extern struct genapic apic_flat; + +struct genapic *genapic = &apic_flat; + + +/* + * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode. + */ +void __init clustered_apic_check(void) +{ + long i; + u8 clusters, max_cluster; + u8 id; + u8 cluster_cnt[NUM_APIC_CLUSTERS]; + + memset(cluster_cnt, 0, sizeof(cluster_cnt)); + + for (i = 0; i < NR_CPUS; i++) { + id = bios_cpu_apicid[i]; + if (id != BAD_APICID) + cluster_cnt[APIC_CLUSTERID(id)]++; + } + + clusters = 0; + max_cluster = 0; + for (i = 0; i < NUM_APIC_CLUSTERS; i++) { + if (cluster_cnt[i] > 0) { + ++clusters; + if (cluster_cnt[i] > max_cluster) + max_cluster = cluster_cnt[i]; + } + } + + /* + * If we have clusters <= 1 and CPUs <= 8 in cluster 0, then flat mode, + * else if max_cluster <= 4 and cluster_cnt[15] == 0, clustered logical + * else physical mode. + * (We don't use lowest priority delivery + HW APIC IRQ steering, so + * can ignore the clustered logical case and go straight to physical.) + */ + if (clusters <= 1 && max_cluster <= 8 && cluster_cnt[0] == max_cluster) + genapic = &apic_flat; + else + genapic = &apic_cluster; + + printk(KERN_INFO "Setting APIC routing to %s\n", genapic->name); +} + +/* Same for both flat and clustered. */ + +void send_IPI_self(int vector) +{ + __send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL); +} diff -Nru a/arch/x86_64/kernel/genapic_cluster.c b/arch/x86_64/kernel/genapic_cluster.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/x86_64/kernel/genapic_cluster.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,130 @@ +/* + * Copyright 2004 James Cleverdon, IBM. + * Subject to the GNU Public License, v.2 + * + * Clustered APIC subarch code. Up to 255 CPUs, physical delivery. + * (A more realistic maximum is around 230 CPUs.) + * + * Hacked for x86-64 by James Cleverdon from i386 architecture code by + * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and + * James Cleverdon. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* + * Set up the logical destination ID. + * + * Intel recommends to set DFR, LDR and TPR before enabling + * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel + * document number 292116). So here it goes... + */ +static void cluster_init_apic_ldr(void) +{ + unsigned long val, id; + long i, count; + u8 lid; + u8 my_id = hard_smp_processor_id(); + u8 my_cluster = APIC_CLUSTER(my_id); + + /* Create logical APIC IDs by counting CPUs already in cluster. */ + for (count = 0, i = NR_CPUS; --i >= 0; ) { + lid = x86_cpu_to_log_apicid[i]; + if (lid != BAD_APICID && APIC_CLUSTER(lid) == my_cluster) + ++count; + } + /* + * We only have a 4 wide bitmap in cluster mode. There's no way + * to get above 60 CPUs and still give each one it's own bit. + * But, we're using physical IRQ delivery, so we don't care. + * Use bit 3 for the 4th through Nth CPU in each cluster. + */ + if (count >= XAPIC_DEST_CPUS_SHIFT) + count = 3; + id = my_cluster | (1UL << count); + x86_cpu_to_log_apicid[smp_processor_id()] = id; + apic_write_around(APIC_DFR, APIC_DFR_CLUSTER); + val = apic_read(APIC_LDR) & ~APIC_LDR_MASK; + val |= SET_APIC_LOGICAL_ID(id); + apic_write_around(APIC_LDR, val); +} + +/* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ + +static cpumask_t cluster_target_cpus(void) +{ + return cpumask_of_cpu(0); +} + +static void cluster_send_IPI_mask(cpumask_t mask, int vector) +{ + send_IPI_mask_sequence(mask, vector); +} + +static void cluster_send_IPI_allbutself(int vector) +{ + cpumask_t mask = cpu_online_map; + cpu_clear(smp_processor_id(), mask); + + if (!cpus_empty(mask)) + cluster_send_IPI_mask(mask, vector); +} + +static void cluster_send_IPI_all(int vector) +{ + cluster_send_IPI_mask(cpu_online_map, vector); +} + +static int cluster_apic_id_registered(void) +{ + return 1; +} + +static unsigned int cluster_cpu_mask_to_apicid(cpumask_t cpumask) +{ + int cpu; + + /* + * We're using fixed IRQ delivery, can only return one phys APIC ID. + * May as well be the first. + */ + cpu = first_cpu(cpumask); + if ((unsigned)cpu < NR_CPUS) + return x86_cpu_to_apicid[cpu]; + else + return BAD_APICID; +} + +/* cpuid returns the value latched in the HW at reset, not the APIC ID + * register's value. For any box whose BIOS changes APIC IDs, like + * clustered APIC systems, we must use hard_smp_processor_id. + * + * See Intel's IA-32 SW Dev's Manual Vol2 under CPUID. + */ +static unsigned int phys_pkg_id(int index_msb) +{ + return hard_smp_processor_id() >> index_msb; +} + +struct genapic apic_cluster = { + .name = "clustered", + .int_delivery_mode = dest_Fixed, + .int_dest_mode = (APIC_DEST_PHYSICAL != 0), + .int_delivery_dest = APIC_DEST_PHYSICAL | APIC_DM_FIXED, + .target_cpus = cluster_target_cpus, + .apic_id_registered = cluster_apic_id_registered, + .init_apic_ldr = cluster_init_apic_ldr, + .send_IPI_all = cluster_send_IPI_all, + .send_IPI_allbutself = cluster_send_IPI_allbutself, + .send_IPI_mask = cluster_send_IPI_mask, + .cpu_mask_to_apicid = cluster_cpu_mask_to_apicid, + .phys_pkg_id = phys_pkg_id, +}; diff -Nru a/arch/x86_64/kernel/genapic_flat.c b/arch/x86_64/kernel/genapic_flat.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/x86_64/kernel/genapic_flat.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,127 @@ +/* + * Copyright 2004 James Cleverdon, IBM. + * Subject to the GNU Public License, v.2 + * + * Flat APIC subarch code. Maximum 8 CPUs, logical delivery. + * + * Hacked for x86-64 by James Cleverdon from i386 architecture code by + * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and + * James Cleverdon. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +static cpumask_t flat_target_cpus(void) +{ + return cpu_online_map; +} + +/* + * Set up the logical destination ID. + * + * Intel recommends to set DFR, LDR and TPR before enabling + * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel + * document number 292116). So here it goes... + */ +static void flat_init_apic_ldr(void) +{ + unsigned long val; + unsigned long num, id; + + num = smp_processor_id(); + id = 1UL << num; + x86_cpu_to_log_apicid[num] = id; + apic_write_around(APIC_DFR, APIC_DFR_FLAT); + val = apic_read(APIC_LDR) & ~APIC_LDR_MASK; + val |= SET_APIC_LOGICAL_ID(id); + apic_write_around(APIC_LDR, val); +} + +static void flat_send_IPI_allbutself(int vector) +{ + /* + * if there are no other CPUs in the system then + * we get an APIC send error if we try to broadcast. + * thus we have to avoid sending IPIs in this case. + */ + if (num_online_cpus() > 1) + __send_IPI_shortcut(APIC_DEST_ALLBUT, vector, APIC_DEST_LOGICAL); +} + +static void flat_send_IPI_all(int vector) +{ + __send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL); +} + +static void flat_send_IPI_mask(cpumask_t cpumask, int vector) +{ + unsigned long mask = cpus_addr(cpumask)[0]; + unsigned long cfg; + unsigned long flags; + + local_save_flags(flags); + local_irq_disable(); + + /* + * Wait for idle. + */ + apic_wait_icr_idle(); + + /* + * prepare target chip field + */ + cfg = __prepare_ICR2(mask); + apic_write_around(APIC_ICR2, cfg); + + /* + * program the ICR + */ + cfg = __prepare_ICR(0, vector, APIC_DEST_LOGICAL); + + /* + * Send the IPI. The write to APIC_ICR fires this off. + */ + apic_write_around(APIC_ICR, cfg); + local_irq_restore(flags); +} + +static int flat_apic_id_registered(void) +{ + return physid_isset(GET_APIC_ID(apic_read(APIC_ID)), phys_cpu_present_map); +} + +static unsigned int flat_cpu_mask_to_apicid(cpumask_t cpumask) +{ + return cpus_addr(cpumask)[0] & APIC_ALL_CPUS; +} + +static unsigned int phys_pkg_id(int index_msb) +{ + u32 ebx; + + ebx = cpuid_ebx(1); + return ((ebx >> 24) & 0xFF) >> index_msb; +} + +struct genapic apic_flat = { + .name = "flat", + .int_delivery_mode = dest_LowestPrio, + .int_dest_mode = (APIC_DEST_LOGICAL != 0), + .int_delivery_dest = APIC_DEST_LOGICAL | APIC_DM_LOWEST, + .target_cpus = flat_target_cpus, + .apic_id_registered = flat_apic_id_registered, + .init_apic_ldr = flat_init_apic_ldr, + .send_IPI_all = flat_send_IPI_all, + .send_IPI_allbutself = flat_send_IPI_allbutself, + .send_IPI_mask = flat_send_IPI_mask, + .cpu_mask_to_apicid = flat_cpu_mask_to_apicid, + .phys_pkg_id = phys_pkg_id, +}; diff -Nru a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S --- a/arch/x86_64/kernel/head.S 2004-11-10 17:19:05 -08:00 +++ b/arch/x86_64/kernel/head.S 2004-11-10 17:19:05 -08:00 @@ -176,6 +176,18 @@ init_rsp: .quad init_thread_union+THREAD_SIZE-8 +ENTRY(early_idt_handler) + xorl %eax,%eax + movq 8(%rsp),%rsi # get rip + movq (%rsp),%rdx + movq %cr2,%rcx + leaq early_idt_msg(%rip),%rdi + call early_printk +1: hlt + jmp 1b + +early_idt_msg: + .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n" .code32 ENTRY(no_long_mode) diff -Nru a/arch/x86_64/kernel/head64.c b/arch/x86_64/kernel/head64.c --- a/arch/x86_64/kernel/head64.c 2004-11-10 17:19:04 -08:00 +++ b/arch/x86_64/kernel/head64.c 2004-11-10 17:19:04 -08:00 @@ -11,12 +11,14 @@ #include #include #include +#include #include #include #include #include #include +#include /* Don't add a printk in there. printk relies on the PDA which is not initialized yet. */ @@ -79,7 +81,11 @@ void __init x86_64_start_kernel(char * real_mode_data) { char *s; + int i; + for (i = 0; i < 256; i++) + set_intr_gate(i, early_idt_handler); + asm volatile("lidt %0" :: "m" (idt_descr)); clear_bss(); pda_init(0); copy_bootdata(real_mode_data); diff -Nru a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c --- a/arch/x86_64/kernel/io_apic.c 2004-11-10 17:19:04 -08:00 +++ b/arch/x86_64/kernel/io_apic.c 2004-11-10 17:19:04 -08:00 @@ -36,6 +36,7 @@ #include #include #include +#include #define __apicdebuginit __init @@ -726,8 +727,8 @@ */ memset(&entry,0,sizeof(entry)); - entry.delivery_mode = dest_LowestPrio; - entry.dest_mode = INT_DELIVERY_MODE; + entry.delivery_mode = INT_DELIVERY_MODE; + entry.dest_mode = INT_DEST_MODE; entry.mask = 0; /* enable IRQ */ entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS); @@ -795,10 +796,10 @@ * We use logical delivery to get the timer IRQ * to the first CPU. */ - entry.dest_mode = INT_DELIVERY_MODE; + entry.dest_mode = INT_DEST_MODE; entry.mask = 0; /* unmask IRQ now */ entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS); - entry.delivery_mode = dest_LowestPrio; + entry.delivery_mode = INT_DELIVERY_MODE; entry.polarity = 0; entry.trigger = 0; entry.vector = vector; @@ -1146,7 +1147,6 @@ static void __init setup_ioapic_ids_from_mpc (void) { union IO_APIC_reg_00 reg_00; - physid_mask_t phys_id_present_map = phys_cpu_present_map; int apic; int i; unsigned char old_id; @@ -1172,28 +1172,7 @@ mp_ioapics[apic].mpc_apicid = reg_00.bits.ID; } - /* - * Sanity check, is the ID really free? Every APIC in a - * system must have a unique ID or we get lots of nice - * 'stuck on smp_invalidate_needed IPI wait' messages. - */ - if (physid_isset(mp_ioapics[apic].mpc_apicid, phys_id_present_map)) { - printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n", - apic, mp_ioapics[apic].mpc_apicid); - for (i = 0; i < 0xf; i++) - if (!physid_isset(i, phys_id_present_map)) - break; - if (i >= 0xf) - panic("Max APIC ID exceeded!\n"); - printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n", - i); - physid_set(i, phys_id_present_map); - mp_ioapics[apic].mpc_apicid = i; - } else { - printk(KERN_INFO - "Using IO-APIC %d\n", mp_ioapics[apic].mpc_apicid); - physid_set(mp_ioapics[apic].mpc_apicid, phys_id_present_map); - } + printk(KERN_INFO "Using IO-APIC %d\n", mp_ioapics[apic].mpc_apicid); /* @@ -1348,9 +1327,9 @@ dest = cpu_mask_to_apicid(mask); /* - * Only the first 8 bits are valid. + * Only the high 8 bits are valid. */ - dest = dest << 24; + dest = SET_APIC_LOGICAL_ID(dest); spin_lock_irqsave(&ioapic_lock, flags); __DO_ACTION(1, = dest, ) @@ -1832,7 +1811,7 @@ #ifdef CONFIG_ACPI_BOOT -#define IO_APIC_MAX_ID 15 +#define IO_APIC_MAX_ID 0xFE int __init io_apic_get_unique_id (int ioapic, int apic_id) { @@ -1949,8 +1928,8 @@ memset(&entry,0,sizeof(entry)); - entry.delivery_mode = dest_LowestPrio; - entry.dest_mode = INT_DELIVERY_MODE; + entry.delivery_mode = INT_DELIVERY_MODE; + entry.dest_mode = INT_DEST_MODE; entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS); entry.trigger = edge_level; entry.polarity = active_high_low; @@ -1983,24 +1962,6 @@ } #endif /*CONFIG_ACPI_BOOT*/ - -#ifndef CONFIG_SMP -void send_IPI_self(int vector) -{ - unsigned int cfg; - - /* - * Wait for idle. - */ - apic_wait_icr_idle(); - cfg = APIC_DM_FIXED | APIC_DEST_SELF | vector | APIC_DEST_LOGICAL; - - /* - * Send the IPI. The write to APIC_ICR fires this off. - */ - apic_write_around(APIC_ICR, cfg); -} -#endif /* diff -Nru a/arch/x86_64/kernel/kprobes.c b/arch/x86_64/kernel/kprobes.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/x86_64/kernel/kprobes.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,481 @@ +/* + * Kernel Probes (KProbes) + * arch/x86_64/kernel/kprobes.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Copyright (C) IBM Corporation, 2002, 2004 + * + * 2002-Oct Created by Vamsi Krishna S Kernel + * Probes initial implementation ( includes contributions from + * Rusty Russell). + * 2004-July Suparna Bhattacharya added jumper probes + * interface to access function arguments. + * 2004-Oct Jim Keniston and Prasanna S Panchamukhi + * adapted for x86_64 + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/* kprobe_status settings */ +#define KPROBE_HIT_ACTIVE 0x00000001 +#define KPROBE_HIT_SS 0x00000002 + +static struct kprobe *current_kprobe; +static unsigned long kprobe_status, kprobe_old_rflags, kprobe_saved_rflags; +static struct pt_regs jprobe_saved_regs; +static long *jprobe_saved_rsp; +static kprobe_opcode_t *get_insn_slot(void); +static void free_insn_slot(kprobe_opcode_t *slot); +void jprobe_return_end(void); + +/* copy of the kernel stack at the probe fire time */ +static kprobe_opcode_t jprobes_stack[MAX_STACK_SIZE]; + +/* + * returns non-zero if opcode modifies the interrupt flag. + */ +static inline int is_IF_modifier(kprobe_opcode_t *insn) +{ + switch (*insn) { + case 0xfa: /* cli */ + case 0xfb: /* sti */ + case 0xcf: /* iret/iretd */ + case 0x9d: /* popf/popfd */ + return 1; + } + + if (*insn >= 0x40 && *insn <= 0x4f && *++insn == 0xcf) + return 1; + return 0; +} + +int arch_prepare_kprobe(struct kprobe *p) +{ + /* insn: must be on special executable page on x86_64. */ + p->ainsn.insn = get_insn_slot(); + if (!p->ainsn.insn) { + return -ENOMEM; + } + memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE); + return 0; +} + +void arch_remove_kprobe(struct kprobe *p) +{ + free_insn_slot(p->ainsn.insn); +} + +static inline void disarm_kprobe(struct kprobe *p, struct pt_regs *regs) +{ + *p->addr = p->opcode; + regs->rip = (unsigned long)p->addr; +} + +static void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) +{ + regs->eflags |= TF_MASK; + regs->eflags &= ~IF_MASK; + + regs->rip = (unsigned long)p->ainsn.insn; +} + +/* + * Interrupts are disabled on entry as trap3 is an interrupt gate and they + * remain disabled thorough out this function. + */ +int kprobe_handler(struct pt_regs *regs) +{ + struct kprobe *p; + int ret = 0; + kprobe_opcode_t *addr = (kprobe_opcode_t *)(regs->rip - sizeof(kprobe_opcode_t)); + + /* We're in an interrupt, but this is clear and BUG()-safe. */ + preempt_disable(); + + /* Check we're not actually recursing */ + if (kprobe_running()) { + /* We *are* holding lock here, so this is safe. + Disarm the probe we just hit, and ignore it. */ + p = get_kprobe(addr); + if (p) { + disarm_kprobe(p, regs); + ret = 1; + } else { + p = current_kprobe; + if (p->break_handler && p->break_handler(p, regs)) { + goto ss_probe; + } + } + /* If it's not ours, can't be delete race, (we hold lock). */ + goto no_kprobe; + } + + lock_kprobes(); + p = get_kprobe(addr); + if (!p) { + unlock_kprobes(); + if (*addr != BREAKPOINT_INSTRUCTION) { + /* + * The breakpoint instruction was removed right + * after we hit it. Another cpu has removed + * either a probepoint or a debugger breakpoint + * at this address. In either case, no further + * handling of this interrupt is appropriate. + */ + ret = 1; + } + /* Not one of ours: let kernel handle it */ + goto no_kprobe; + } + + kprobe_status = KPROBE_HIT_ACTIVE; + current_kprobe = p; + kprobe_saved_rflags = kprobe_old_rflags + = (regs->eflags & (TF_MASK | IF_MASK)); + if (is_IF_modifier(p->ainsn.insn)) + kprobe_saved_rflags &= ~IF_MASK; + + if (p->pre_handler(p, regs)) { + /* handler has already set things up, so skip ss setup */ + return 1; + } + + ss_probe: + prepare_singlestep(p, regs); + kprobe_status = KPROBE_HIT_SS; + return 1; + + no_kprobe: + preempt_enable_no_resched(); + return ret; +} + +/* + * Called after single-stepping. p->addr is the address of the + * instruction whose first byte has been replaced by the "int 3" + * instruction. To avoid the SMP problems that can occur when we + * temporarily put back the original opcode to single-step, we + * single-stepped a copy of the instruction. The address of this + * copy is p->ainsn.insn. + * + * This function prepares to return from the post-single-step + * interrupt. We have to fix up the stack as follows: + * + * 0) Except in the case of absolute or indirect jump or call instructions, + * the new rip is relative to the copied instruction. We need to make + * it relative to the original instruction. + * + * 1) If the single-stepped instruction was pushfl, then the TF and IF + * flags are set in the just-pushed eflags, and may need to be cleared. + * + * 2) If the single-stepped instruction was a call, the return address + * that is atop the stack is the address following the copied instruction. + * We need to make it the address following the original instruction. + */ +static void resume_execution(struct kprobe *p, struct pt_regs *regs) +{ + unsigned long *tos = (unsigned long *)regs->rsp; + unsigned long next_rip = 0; + unsigned long copy_rip = (unsigned long)p->ainsn.insn; + unsigned long orig_rip = (unsigned long)p->addr; + kprobe_opcode_t *insn = p->ainsn.insn; + + /*skip the REX prefix*/ + if (*insn >= 0x40 && *insn <= 0x4f) + insn++; + + switch (*insn) { + case 0x9c: /* pushfl */ + *tos &= ~(TF_MASK | IF_MASK); + *tos |= kprobe_old_rflags; + break; + case 0xe8: /* call relative - Fix return addr */ + *tos = orig_rip + (*tos - copy_rip); + break; + case 0xff: + if ((*insn & 0x30) == 0x10) { + /* call absolute, indirect */ + /* Fix return addr; rip is correct. */ + next_rip = regs->rip; + *tos = orig_rip + (*tos - copy_rip); + } else if (((*insn & 0x31) == 0x20) || /* jmp near, absolute indirect */ + ((*insn & 0x31) == 0x21)) { /* jmp far, absolute indirect */ + /* rip is correct. */ + next_rip = regs->rip; + } + break; + case 0xea: /* jmp absolute -- rip is correct */ + next_rip = regs->rip; + break; + default: + break; + } + + regs->eflags &= ~TF_MASK; + if (next_rip) { + regs->rip = next_rip; + } else { + regs->rip = orig_rip + (regs->rip - copy_rip); + } +} + +/* + * Interrupts are disabled on entry as trap1 is an interrupt gate and they + * remain disabled thoroughout this function. And we hold kprobe lock. + */ +int post_kprobe_handler(struct pt_regs *regs) +{ + if (!kprobe_running()) + return 0; + + if (current_kprobe->post_handler) + current_kprobe->post_handler(current_kprobe, regs, 0); + + resume_execution(current_kprobe, regs); + regs->eflags |= kprobe_saved_rflags; + + unlock_kprobes(); + preempt_enable_no_resched(); + + /* + * if somebody else is singlestepping across a probe point, eflags + * will have TF set, in which case, continue the remaining processing + * of do_debug, as if this is not a probe hit. + */ + if (regs->eflags & TF_MASK) + return 0; + + return 1; +} + +/* Interrupts disabled, kprobe_lock held. */ +int kprobe_fault_handler(struct pt_regs *regs, int trapnr) +{ + if (current_kprobe->fault_handler + && current_kprobe->fault_handler(current_kprobe, regs, trapnr)) + return 1; + + if (kprobe_status & KPROBE_HIT_SS) { + resume_execution(current_kprobe, regs); + regs->eflags |= kprobe_old_rflags; + + unlock_kprobes(); + preempt_enable_no_resched(); + } + return 0; +} + +/* + * Wrapper routine for handling exceptions. + */ +int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, + void *data) +{ + struct die_args *args = (struct die_args *)data; + switch (val) { + case DIE_INT3: + if (kprobe_handler(args->regs)) + return NOTIFY_STOP; + break; + case DIE_DEBUG: + if (post_kprobe_handler(args->regs)) + return NOTIFY_STOP; + break; + case DIE_GPF: + if (kprobe_running() && + kprobe_fault_handler(args->regs, args->trapnr)) + return NOTIFY_STOP; + break; + case DIE_PAGE_FAULT: + if (kprobe_running() && + kprobe_fault_handler(args->regs, args->trapnr)) + return NOTIFY_STOP; + break; + default: + break; + } + return NOTIFY_DONE; +} + +int setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) +{ + struct jprobe *jp = container_of(p, struct jprobe, kp); + unsigned long addr; + + jprobe_saved_regs = *regs; + jprobe_saved_rsp = (long *) regs->rsp; + addr = (unsigned long)jprobe_saved_rsp; + /* + * As Linus pointed out, gcc assumes that the callee + * owns the argument space and could overwrite it, e.g. + * tailcall optimization. So, to be absolutely safe + * we also save and restore enough stack bytes to cover + * the argument area. + */ + memcpy(jprobes_stack, (kprobe_opcode_t *) addr, MIN_STACK_SIZE(addr)); + regs->eflags &= ~IF_MASK; + regs->rip = (unsigned long)(jp->entry); + return 1; +} + +void jprobe_return(void) +{ + preempt_enable_no_resched(); + asm volatile (" xchg %%rbx,%%rsp \n" + " int3 \n" + " .globl jprobe_return_end \n" + " jprobe_return_end: \n" + " nop \n"::"b" + (jprobe_saved_rsp):"memory"); +} + +int longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) +{ + u8 *addr = (u8 *) (regs->rip - 1); + unsigned long stack_addr = (unsigned long)jprobe_saved_rsp; + struct jprobe *jp = container_of(p, struct jprobe, kp); + + if ((addr > (u8 *) jprobe_return) && (addr < (u8 *) jprobe_return_end)) { + if ((long *)regs->rsp != jprobe_saved_rsp) { + struct pt_regs *saved_regs = + container_of(jprobe_saved_rsp, struct pt_regs, rsp); + printk("current rsp %p does not match saved rsp %p\n", + (long *)regs->rsp, jprobe_saved_rsp); + printk("Saved registers for jprobe %p\n", jp); + show_registers(saved_regs); + printk("Current registers\n"); + show_registers(regs); + BUG(); + } + *regs = jprobe_saved_regs; + memcpy((kprobe_opcode_t *) stack_addr, jprobes_stack, + MIN_STACK_SIZE(stack_addr)); + return 1; + } + return 0; +} + +/* + * kprobe->ainsn.insn points to the copy of the instruction to be single-stepped. + * By default on x86_64, pages we get from kmalloc or vmalloc are not + * executable. Single-stepping an instruction on such a page yields an + * oops. So instead of storing the instruction copies in their respective + * kprobe objects, we allocate a page, map it executable, and store all the + * instruction copies there. (We can allocate additional pages if somebody + * inserts a huge number of probes.) Each page can hold up to INSNS_PER_PAGE + * instruction slots, each of which is MAX_INSN_SIZE*sizeof(kprobe_opcode_t) + * bytes. + */ +#define INSNS_PER_PAGE (PAGE_SIZE/(MAX_INSN_SIZE*sizeof(kprobe_opcode_t))) +struct kprobe_insn_page { + struct hlist_node hlist; + kprobe_opcode_t *insns; /* page of instruction slots */ + char slot_used[INSNS_PER_PAGE]; + int nused; +}; + +static struct hlist_head kprobe_insn_pages; + +/** + * get_insn_slot() - Find a slot on an executable page for an instruction. + * We allocate an executable page if there's no room on existing ones. + */ +static kprobe_opcode_t *get_insn_slot(void) +{ + struct kprobe_insn_page *kip; + struct hlist_node *pos; + + hlist_for_each(pos, &kprobe_insn_pages) { + kip = hlist_entry(pos, struct kprobe_insn_page, hlist); + if (kip->nused < INSNS_PER_PAGE) { + int i; + for (i = 0; i < INSNS_PER_PAGE; i++) { + if (!kip->slot_used[i]) { + kip->slot_used[i] = 1; + kip->nused++; + return kip->insns + (i*MAX_INSN_SIZE); + } + } + /* Surprise! No unused slots. Fix kip->nused. */ + kip->nused = INSNS_PER_PAGE; + } + } + + /* All out of space. Need to allocate a new page. Use slot 0.*/ + kip = kmalloc(sizeof(struct kprobe_insn_page), GFP_ATOMIC); + if (!kip) { + return NULL; + } + kip->insns = (kprobe_opcode_t*) __vmalloc(PAGE_SIZE, + GFP_ATOMIC|__GFP_HIGHMEM, __pgprot(__PAGE_KERNEL_EXEC)); + if (!kip->insns) { + kfree(kip); + return NULL; + } + INIT_HLIST_NODE(&kip->hlist); + hlist_add_head(&kip->hlist, &kprobe_insn_pages); + memset(kip->slot_used, 0, INSNS_PER_PAGE); + kip->slot_used[0] = 1; + kip->nused = 1; + return kip->insns; +} + +/** + * free_insn_slot() - Free instruction slot obtained from get_insn_slot(). + */ +static void free_insn_slot(kprobe_opcode_t *slot) +{ + struct kprobe_insn_page *kip; + struct hlist_node *pos; + + hlist_for_each(pos, &kprobe_insn_pages) { + kip = hlist_entry(pos, struct kprobe_insn_page, hlist); + if (kip->insns <= slot + && slot < kip->insns+(INSNS_PER_PAGE*MAX_INSN_SIZE)) { + int i = (slot - kip->insns) / MAX_INSN_SIZE; + kip->slot_used[i] = 0; + kip->nused--; + if (kip->nused == 0) { + /* + * Page is no longer in use. Free it unless + * it's the last one. We keep the last one + * so as not to have to set it up again the + * next time somebody inserts a probe. + */ + hlist_del(&kip->hlist); + if (hlist_empty(&kprobe_insn_pages)) { + INIT_HLIST_NODE(&kip->hlist); + hlist_add_head(&kip->hlist, + &kprobe_insn_pages); + } else { + vfree(kip->insns); + kfree(kip); + } + } + return; + } + } +} diff -Nru a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c --- a/arch/x86_64/kernel/mce.c 2004-11-10 17:19:03 -08:00 +++ b/arch/x86_64/kernel/mce.c 2004-11-10 17:19:03 -08:00 @@ -361,8 +361,7 @@ memset(mcelog.entry, 0, next * sizeof(struct mce)); mcelog.next = 0; - smp_wmb(); - + synchronize_kernel(); /* Collect entries that were still getting written before the synchronize. */ diff -Nru a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c --- a/arch/x86_64/kernel/mpparse.c 2004-11-10 17:19:03 -08:00 +++ b/arch/x86_64/kernel/mpparse.c 2004-11-10 17:19:03 -08:00 @@ -330,6 +330,7 @@ } } } + clustered_apic_check(); if (!num_processors) printk(KERN_ERR "SMP mptable: no processors registered!\n"); return num_processors; diff -Nru a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c --- a/arch/x86_64/kernel/nmi.c 2004-11-10 17:19:04 -08:00 +++ b/arch/x86_64/kernel/nmi.c 2004-11-10 17:19:04 -08:00 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -54,7 +55,7 @@ * -1: the lapic NMI watchdog is disabled, but can be enabled */ int nmi_active; /* oprofile uses this */ -static int panic_on_timeout; +int panic_on_timeout; unsigned int nmi_watchdog = NMI_DEFAULT; static unsigned int nmi_hz = HZ; @@ -344,8 +345,6 @@ nmi_active = 1; } -static spinlock_t nmi_print_lock = SPIN_LOCK_UNLOCKED; - /* * the best way to detect whether a CPU has a 'hard lockup' problem * is to check it's local APIC timer IRQ counts. If they are not @@ -395,21 +394,7 @@ alert_counter[cpu] = 0; return; } - spin_lock(&nmi_print_lock); - /* - * We are in trouble anyway, lets at least try - * to get a message out. - */ - bust_spinlocks(1); - printk("NMI Watchdog detected LOCKUP on CPU%d, registers:\n", cpu); - show_registers(regs); - if (panic_on_timeout || panic_on_oops) - panic("nmi watchdog"); - printk("console shuts up ...\n"); - console_silent(); - spin_unlock(&nmi_print_lock); - bust_spinlocks(0); - do_exit(SIGSEGV); + die_nmi("NMI Watchdog detected LOCKUP on CPU%d", regs); } } else { last_irq_sums[cpu] = sum; @@ -446,6 +431,49 @@ { nmi_callback = dummy_nmi_callback; } + +#ifdef CONFIG_SYSCTL + +static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) +{ + unsigned char reason = get_nmi_reason(); + char buf[64]; + + if (!(reason & 0xc0)) { + sprintf(buf, "NMI received for unknown reason %02x\n", reason); + die_nmi(buf,regs); + } + return 0; +} + +/* + * proc handler for /proc/sys/kernel/unknown_nmi_panic + */ +int proc_unknown_nmi_panic(struct ctl_table *table, int write, struct file *file, + void __user *buffer, size_t *length, loff_t *ppos) +{ + int old_state; + + old_state = unknown_nmi_panic; + proc_dointvec(table, write, file, buffer, length, ppos); + if (!!old_state == !!unknown_nmi_panic) + return 0; + + if (unknown_nmi_panic) { + if (reserve_lapic_nmi() < 0) { + unknown_nmi_panic = 0; + return -EBUSY; + } else { + set_nmi_callback(unknown_nmi_panic_callback); + } + } else { + release_lapic_nmi(); + unset_nmi_callback(); + } + return 0; +} + +#endif EXPORT_SYMBOL(nmi_active); EXPORT_SYMBOL(nmi_watchdog); diff -Nru a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c --- a/arch/x86_64/kernel/pci-gart.c 2004-11-10 17:19:04 -08:00 +++ b/arch/x86_64/kernel/pci-gart.c 2004-11-10 17:19:04 -08:00 @@ -236,11 +236,21 @@ mmu = 1; if (no_iommu || dma_mask < 0xffffffffUL) { if (high) { + free_pages((unsigned long)memory, + get_order(size)); + + if (swiotlb) { + return + swiotlb_alloc_coherent(dev, size, + dma_handle, + gfp); + } + if (!(gfp & GFP_DMA)) { gfp |= GFP_DMA; goto again; } - goto free; + return NULL; } mmu = 0; } @@ -260,9 +270,7 @@ error: if (panic_on_overflow) panic("dma_alloc_coherent: IOMMU overflow by %lu bytes\n", size); -free: free_pages((unsigned long)memory, get_order(size)); - /* XXX Could use the swiotlb pool here too */ return NULL; } @@ -273,6 +281,11 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t bus) { + if (swiotlb) { + swiotlb_free_coherent(dev, size, vaddr, bus); + return; + } + dma_unmap_single(dev, bus, size, 0); free_pages((unsigned long)vaddr, get_order(size)); } diff -Nru a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c --- a/arch/x86_64/kernel/process.c 2004-11-10 17:19:05 -08:00 +++ b/arch/x86_64/kernel/process.c 2004-11-10 17:19:05 -08:00 @@ -54,6 +54,9 @@ atomic_t hlt_counter = ATOMIC_INIT(0); +unsigned long boot_option_idle_override = 0; +EXPORT_SYMBOL(boot_option_idle_override); + /* * Powermanagement idle function, if any.. */ @@ -196,6 +199,7 @@ pm_idle = poll_idle; } + boot_option_idle_override = 1; return 1; } diff -Nru a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c --- a/arch/x86_64/kernel/ptrace.c 2004-11-10 17:19:03 -08:00 +++ b/arch/x86_64/kernel/ptrace.c 2004-11-10 17:19:03 -08:00 @@ -323,6 +323,8 @@ ret = 0; break; case offsetof(struct user, u_debugreg[7]): + /* See arch/i386/kernel/ptrace.c for an explanation of + * this awkward check.*/ data &= ~DR_CONTROL_RESERVED; for(i=0; i<4; i++) if ((0x5454 >> ((data >> (16 + 4*i)) & 0xf)) & 1) diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c --- a/arch/x86_64/kernel/setup.c 2004-11-10 17:19:02 -08:00 +++ b/arch/x86_64/kernel/setup.c 2004-11-10 17:19:02 -08:00 @@ -56,6 +56,7 @@ #include #include #include +#include /* * Machine setup.. @@ -710,7 +711,6 @@ #ifdef CONFIG_SMP u32 eax, ebx, ecx, edx; int index_lsb, index_msb, tmp; - int initial_apic_id; int cpu = smp_processor_id(); if (!cpu_has(c, X86_FEATURE_HT)) @@ -745,8 +745,7 @@ } if (index_lsb != index_msb ) index_msb++; - initial_apic_id = hard_smp_processor_id(); - phys_proc_id[cpu] = initial_apic_id >> index_msb; + phys_proc_id[cpu] = phys_pkg_id(index_msb); printk(KERN_INFO "CPU: Physical Processor ID: %d\n", phys_proc_id[cpu]); @@ -909,7 +908,9 @@ boot_cpu_data.x86_capability[i] &= c->x86_capability[i]; } +#ifdef CONFIG_X86_MCE mcheck_init(c); +#endif } @@ -948,10 +949,10 @@ "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", NULL, /* AMD-defined */ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "pni", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "nx", NULL, "mmxext", NULL, - NULL, NULL, NULL, NULL, NULL, "lm", "3dnowext", "3dnow", + NULL, "fxsr_opt", NULL, NULL, NULL, "lm", "3dnowext", "3dnow", /* Transmeta-defined */ "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL, @@ -970,6 +971,12 @@ "tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* AMD-defined (#2) */ + "lahf_lm", "htvalid", NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static char *x86_power_flags[] = { "ts", /* temperature sensor */ diff -Nru a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c --- a/arch/x86_64/kernel/setup64.c 2004-11-10 17:19:03 -08:00 +++ b/arch/x86_64/kernel/setup64.c 2004-11-10 17:19:03 -08:00 @@ -216,8 +216,8 @@ cpu_gdt_descr[cpu].size = GDT_SIZE; cpu_gdt_descr[cpu].address = (unsigned long)cpu_gdt_table[cpu]; - __asm__ __volatile__("lgdt %0": "=m" (cpu_gdt_descr[cpu])); - __asm__ __volatile__("lidt %0": "=m" (idt_descr)); + asm volatile("lgdt %0" :: "m" (cpu_gdt_descr[cpu])); + asm volatile("lidt %0" :: "m" (idt_descr)); memcpy(me->thread.tls_array, cpu_gdt_table[cpu], GDT_ENTRY_TLS_ENTRIES * 8); diff -Nru a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c --- a/arch/x86_64/kernel/smp.c 2004-11-10 17:19:07 -08:00 +++ b/arch/x86_64/kernel/smp.c 2004-11-10 17:19:07 -08:00 @@ -24,105 +24,7 @@ #include #include #include - -/* - * the following functions deal with sending IPIs between CPUs. - * - * We use 'broadcast', CPU->CPU IPIs and self-IPIs too. - */ - -static inline unsigned int __prepare_ICR (unsigned int shortcut, int vector) -{ - unsigned int icr = APIC_DM_FIXED | shortcut | vector | APIC_DEST_LOGICAL; - if (vector == KDB_VECTOR) - icr = (icr & (~APIC_VECTOR_MASK)) | APIC_DM_NMI; - return icr; -} - -static inline int __prepare_ICR2 (unsigned int mask) -{ - return SET_APIC_DEST_FIELD(mask); -} - -static inline void __send_IPI_shortcut(unsigned int shortcut, int vector) -{ - /* - * Subtle. In the case of the 'never do double writes' workaround - * we have to lock out interrupts to be safe. As we don't care - * of the value read we use an atomic rmw access to avoid costly - * cli/sti. Otherwise we use an even cheaper single atomic write - * to the APIC. - */ - unsigned int cfg; - - /* - * Wait for idle. - */ - apic_wait_icr_idle(); - - /* - * No need to touch the target chip field - */ - cfg = __prepare_ICR(shortcut, vector); - - /* - * Send the IPI. The write to APIC_ICR fires this off. - */ - apic_write_around(APIC_ICR, cfg); -} - -static inline void send_IPI_allbutself(int vector) -{ - /* - * if there are no other CPUs in the system then - * we get an APIC send error if we try to broadcast. - * thus we have to avoid sending IPIs in this case. - */ - if (num_online_cpus() > 1) - __send_IPI_shortcut(APIC_DEST_ALLBUT, vector); -} - -static inline void send_IPI_all(int vector) -{ - __send_IPI_shortcut(APIC_DEST_ALLINC, vector); -} - -void send_IPI_self(int vector) -{ - __send_IPI_shortcut(APIC_DEST_SELF, vector); -} - -static inline void send_IPI_mask(cpumask_t cpumask, int vector) -{ - unsigned long mask = cpus_addr(cpumask)[0]; - unsigned long cfg; - unsigned long flags; - - local_save_flags(flags); - local_irq_disable(); - - /* - * Wait for idle. - */ - apic_wait_icr_idle(); - - /* - * prepare target chip field - */ - cfg = __prepare_ICR2(mask); - apic_write_around(APIC_ICR2, cfg); - - /* - * program the ICR - */ - cfg = __prepare_ICR(0, vector); - - /* - * Send the IPI. The write to APIC_ICR fires this off. - */ - apic_write_around(APIC_ICR, cfg); - local_irq_restore(flags); -} +#include /* * Smarter SMP flushing macros. @@ -403,13 +305,15 @@ /* Send a message to all other CPUs and wait for them to respond */ send_IPI_allbutself(CALL_FUNCTION_VECTOR); + if (!wait) + return; + /* Wait for response */ while (atomic_read(&data.started) != cpus) barrier(); - if (wait) - while (atomic_read(&data.finished) != cpus) - barrier(); + while (atomic_read(&data.finished) != cpus) + barrier(); } /* @@ -459,11 +363,10 @@ int nolock = 0; /* Don't deadlock on the call lock in panic */ if (!spin_trylock(&call_lock)) { - udelay(100); /* ignore locking because we have paniced anyways */ nolock = 1; } - __smp_call_function(smp_really_stop_cpu, NULL, 1, 0); + __smp_call_function(smp_really_stop_cpu, NULL, 0, 0); if (!nolock) spin_unlock(&call_lock); smp_stop_cpu(); diff -Nru a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c --- a/arch/x86_64/kernel/smpboot.c 2004-11-10 17:19:07 -08:00 +++ b/arch/x86_64/kernel/smpboot.c 2004-11-10 17:19:07 -08:00 @@ -56,15 +56,12 @@ /* Number of siblings per CPU package */ int smp_num_siblings = 1; -char phys_proc_id[NR_CPUS]; /* Package ID of each logical CPU */ +/* Package ID of each logical CPU */ +u8 phys_proc_id[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; /* Bitmask of currently online CPUs */ cpumask_t cpu_online_map; -/* which logical CPU number maps to which CPU (physical APIC ID) */ -volatile char x86_cpu_to_apicid[NR_CPUS]; -EXPORT_SYMBOL(x86_cpu_to_apicid); - static cpumask_t cpu_callin_map; cpumask_t cpu_callout_map; static cpumask_t smp_commenced_mask; @@ -658,6 +655,8 @@ cpu_clear(cpu, cpu_callout_map); /* was set here (do_boot_cpu()) */ clear_bit(cpu, &cpu_initialized); /* was set by cpu_init() */ cpucount--; + x86_cpu_to_apicid[cpu] = BAD_APICID; + x86_cpu_to_log_apicid[cpu] = BAD_APICID; } } diff -Nru a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c --- a/arch/x86_64/kernel/time.c 2004-11-10 17:19:05 -08:00 +++ b/arch/x86_64/kernel/time.c 2004-11-10 17:19:05 -08:00 @@ -746,6 +746,7 @@ * Register with driver. * Timer0 and Timer1 is used by platform. */ + hd.hd_phys_address = vxtime.hpet_address; hd.hd_address = (void *)fix_to_virt(FIX_HPET_BASE); hd.hd_nirqs = ntimer; hd.hd_flags = HPET_DATA_PLATFORM; @@ -776,31 +777,9 @@ fs_initcall(late_hpet_init); #endif -static int hpet_init(void) +static int hpet_timer_stop_set_go(unsigned long tick) { - unsigned int cfg, id; - - if (!vxtime.hpet_address) - return -1; - set_fixmap_nocache(FIX_HPET_BASE, vxtime.hpet_address); - __set_fixmap(VSYSCALL_HPET, vxtime.hpet_address, PAGE_KERNEL_VSYSCALL_NOCACHE); - -/* - * Read the period, compute tick and quotient. - */ - - id = hpet_readl(HPET_ID); - - if (!(id & HPET_ID_VENDOR) || !(id & HPET_ID_NUMBER) || - !(id & HPET_ID_LEGSUP)) - return -1; - - hpet_period = hpet_readl(HPET_PERIOD); - if (hpet_period < 100000 || hpet_period > 100000000) - return -1; - - hpet_tick = (1000000000L * (USEC_PER_SEC / HZ) + hpet_period / 2) / - hpet_period; + unsigned int cfg; /* * Stop the timers and reset the main counter. @@ -832,6 +811,40 @@ return 0; } +static int hpet_init(void) +{ + unsigned int id; + + if (!vxtime.hpet_address) + return -1; + set_fixmap_nocache(FIX_HPET_BASE, vxtime.hpet_address); + __set_fixmap(VSYSCALL_HPET, vxtime.hpet_address, PAGE_KERNEL_VSYSCALL_NOCACHE); + +/* + * Read the period, compute tick and quotient. + */ + + id = hpet_readl(HPET_ID); + + if (!(id & HPET_ID_VENDOR) || !(id & HPET_ID_NUMBER) || + !(id & HPET_ID_LEGSUP)) + return -1; + + hpet_period = hpet_readl(HPET_PERIOD); + if (hpet_period < 100000 || hpet_period > 100000000) + return -1; + + hpet_tick = (1000000000L * (USEC_PER_SEC / HZ) + hpet_period / 2) / + hpet_period; + + return hpet_timer_stop_set_go(hpet_tick); +} + +static int hpet_reenable(void) +{ + return hpet_timer_stop_set_go(hpet_tick); +} + void __init pit_init(void) { unsigned long flags; @@ -916,7 +929,7 @@ * the TSC. * * Exceptions: - * IBM Summit. Will need to be special cased later. + * IBM Summit2 checked by oem_force_hpet_timer(). * AMD dual core may also not need HPET. Check me. * * Can be turned off with "notsc". @@ -924,6 +937,9 @@ if (num_online_cpus() > 1 && boot_cpu_data.x86_vendor == X86_VENDOR_AMD) notsc = 1; + /* Some systems will want to disable TSC and use HPET. */ + if (oem_force_hpet_timer()) + notsc = 1; if (vxtime.hpet_address && notsc) { timetype = "HPET"; vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; @@ -941,7 +957,7 @@ static long clock_cmos_diff; -static int time_suspend(struct sys_device *dev, u32 state) +static int timer_suspend(struct sys_device *dev, u32 state) { /* * Estimate time zone so that set_time can update the clock @@ -951,10 +967,15 @@ return 0; } -static int time_resume(struct sys_device *dev) +static int timer_resume(struct sys_device *dev) { unsigned long flags; - unsigned long sec = get_cmos_time() + clock_cmos_diff; + unsigned long sec; + + if (vxtime.hpet_address) + hpet_reenable(); + + sec = get_cmos_time() + clock_cmos_diff; write_seqlock_irqsave(&xtime_lock,flags); xtime.tv_sec = sec; xtime.tv_nsec = 0; @@ -962,24 +983,24 @@ return 0; } -static struct sysdev_class pit_sysclass = { - .resume = time_resume, - .suspend = time_suspend, - set_kset_name("pit"), +static struct sysdev_class timer_sysclass = { + .resume = timer_resume, + .suspend = timer_suspend, + set_kset_name("timer"), }; /* XXX this driverfs stuff should probably go elsewhere later -john */ -static struct sys_device device_i8253 = { +static struct sys_device device_timer = { .id = 0, - .cls = &pit_sysclass, + .cls = &timer_sysclass, }; static int time_init_device(void) { - int error = sysdev_class_register(&pit_sysclass); + int error = sysdev_class_register(&timer_sysclass); if (!error) - error = sysdev_register(&device_i8253); + error = sysdev_register(&device_timer); return error; } diff -Nru a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c --- a/arch/x86_64/kernel/traps.c 2004-11-10 17:19:02 -08:00 +++ b/arch/x86_64/kernel/traps.c 2004-11-10 17:19:02 -08:00 @@ -43,9 +43,11 @@ #include #include #include +#include #include + extern struct gate_struct idt_table[256]; asmlinkage void divide_error(void); @@ -72,6 +74,17 @@ asmlinkage void call_debug(void); struct notifier_block *die_chain; +static spinlock_t die_notifier_lock = SPIN_LOCK_UNLOCKED; + +int register_die_notifier(struct notifier_block *nb) +{ + int err = 0; + unsigned long flags; + spin_lock_irqsave(&die_notifier_lock, flags); + err = notifier_chain_register(&die_chain, nb); + spin_unlock_irqrestore(&die_notifier_lock, flags); + return err; +} static inline void conditional_sti(struct pt_regs *regs) { @@ -376,6 +389,22 @@ die(str, regs, err); } +void die_nmi(char *str, struct pt_regs *regs) +{ + oops_begin(); + /* + * We are in trouble anyway, lets at least try + * to get a message out. + */ + printk(str, safe_smp_processor_id()); + show_registers(regs); + if (panic_on_timeout || panic_on_oops) + panic("nmi watchdog"); + printk("console shuts up ...\n"); + oops_end(); + do_exit(SIGSEGV); +} + static inline unsigned long get_cr2(void) { unsigned long address; @@ -458,7 +487,6 @@ } DO_ERROR_INFO( 0, SIGFPE, "divide error", divide_error, FPE_INTDIV, regs->rip) -DO_ERROR( 3, SIGTRAP, "int3", int3); DO_ERROR( 4, SIGSEGV, "overflow", overflow) DO_ERROR( 5, SIGSEGV, "bounds", bounds) DO_ERROR_INFO( 6, SIGILL, "invalid operand", invalid_op, ILL_ILLOPN, regs->rip) @@ -563,9 +591,13 @@ printk("Do you have a strange power saving mode enabled?\n"); } -asmlinkage void default_do_nmi(struct pt_regs * regs) +asmlinkage void default_do_nmi(struct pt_regs *regs) { - unsigned char reason = inb(0x61); + unsigned char reason = 0; + + /* Only the BSP gets external NMIs from the system. */ + if (!smp_processor_id()) + reason = get_nmi_reason(); if (!(reason & 0xc0)) { if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT) @@ -586,6 +618,9 @@ } if (notify_die(DIE_NMI, "nmi", regs, reason, 0, SIGINT) == NOTIFY_STOP) return; + + /* AK: following checks seem to be broken on modern chipsets. FIXME */ + if (reason & 0x80) mem_parity_error(reason, regs); if (reason & 0x40) @@ -601,6 +636,15 @@ inb(0x71); /* dummy */ } +asmlinkage void do_int3(struct pt_regs * regs, long error_code) +{ + if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) == NOTIFY_STOP) { + return; + } + do_trap(3, SIGTRAP, "int3", regs, error_code, NULL); + return; +} + /* runs on IST stack. */ asmlinkage void *do_debug(struct pt_regs * regs, unsigned long error_code) { @@ -630,6 +674,10 @@ asm("movq %%db6,%0" : "=r" (condition)); + if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code, + SIGTRAP) == NOTIFY_STOP) { + return regs; + } conditional_sti(regs); /* Mask out spurious debug traps due to lazy DR7 setting */ @@ -862,8 +910,8 @@ set_intr_gate(0,÷_error); set_intr_gate_ist(1,&debug,DEBUG_STACK); set_intr_gate_ist(2,&nmi,NMI_STACK); - set_system_gate(3,&int3); /* int3-5 can be called from all */ - set_system_gate(4,&overflow); + set_intr_gate(3,&int3); + set_system_gate(4,&overflow); /* int4-5 can be called from all */ set_system_gate(5,&bounds); set_intr_gate(6,&invalid_op); set_intr_gate(7,&device_not_available); @@ -877,7 +925,9 @@ set_intr_gate(15,&spurious_interrupt_bug); set_intr_gate(16,&coprocessor_error); set_intr_gate(17,&alignment_check); +#ifdef CONFIG_X86_MCE set_intr_gate_ist(18,&machine_check, MCE_STACK); +#endif set_intr_gate(19,&simd_coprocessor_error); #ifdef CONFIG_IA32_EMULATION diff -Nru a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S --- a/arch/x86_64/kernel/vmlinux.lds.S 2004-11-10 17:19:02 -08:00 +++ b/arch/x86_64/kernel/vmlinux.lds.S 2004-11-10 17:19:02 -08:00 @@ -87,7 +87,9 @@ *(.init.text) _einittext = .; } + __initdata_begin = .; .init.data : { *(.init.data) } + __initdata_end = .; . = ALIGN(16); __setup_start = .; .init.setup : { *(.init.setup) } diff -Nru a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c --- a/arch/x86_64/kernel/vsyscall.c 2004-11-10 17:19:06 -08:00 +++ b/arch/x86_64/kernel/vsyscall.c 2004-11-10 17:19:06 -08:00 @@ -89,7 +89,7 @@ __vxtime.tsc_quot) >> 32; /* See comment in x86_64 do_gettimeofday. */ } else { - usec += ((readl(fix_to_virt(VSYSCALL_HPET) + 0xf0) - + usec += ((readl((void *)fix_to_virt(VSYSCALL_HPET) + 0xf0) - __vxtime.last) * __vxtime.quot) >> 32; } } while (read_seqretry(&__xtime_lock, sequence)); diff -Nru a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c --- a/arch/x86_64/kernel/x8664_ksyms.c 2004-11-10 17:19:03 -08:00 +++ b/arch/x86_64/kernel/x8664_ksyms.c 2004-11-10 17:19:03 -08:00 @@ -32,6 +32,7 @@ #include #include #include +#include extern spinlock_t rtc_lock; @@ -193,10 +194,11 @@ EXPORT_SYMBOL(empty_zero_page); #ifdef CONFIG_HAVE_DEC_LOCK -EXPORT_SYMBOL(atomic_dec_and_lock); +EXPORT_SYMBOL(_atomic_dec_and_lock); #endif EXPORT_SYMBOL(die_chain); +EXPORT_SYMBOL(register_die_notifier); #ifdef CONFIG_SMP EXPORT_SYMBOL(cpu_sibling_map); diff -Nru a/arch/x86_64/lib/dec_and_lock.c b/arch/x86_64/lib/dec_and_lock.c --- a/arch/x86_64/lib/dec_and_lock.c 2004-11-10 17:19:04 -08:00 +++ b/arch/x86_64/lib/dec_and_lock.c 2004-11-10 17:19:04 -08:00 @@ -10,7 +10,7 @@ #include #include -int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) +int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) { int counter; int newcount; diff -Nru a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c --- a/arch/x86_64/mm/fault.c 2004-11-10 17:19:02 -08:00 +++ b/arch/x86_64/mm/fault.c 2004-11-10 17:19:02 -08:00 @@ -23,6 +23,7 @@ #include /* For unblank_screen() */ #include #include +#include #include #include @@ -32,6 +33,7 @@ #include #include #include +#include void bust_spinlocks(int yes) { @@ -268,6 +270,9 @@ /* get the address */ __asm__("movq %%cr2,%0":"=r" (address)); + if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, + SIGSEGV) == NOTIFY_STOP) + return; if (likely(regs->eflags & X86_EFLAGS_IF)) local_irq_enable(); diff -Nru a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c --- a/arch/x86_64/mm/init.c 2004-11-10 17:19:03 -08:00 +++ b/arch/x86_64/mm/init.c 2004-11-10 17:19:03 -08:00 @@ -484,6 +484,8 @@ #endif } +extern char __initdata_begin[], __initdata_end[]; + void free_initmem(void) { unsigned long addr; @@ -492,12 +494,11 @@ for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { ClearPageReserved(virt_to_page(addr)); set_page_count(virt_to_page(addr), 1); -#ifdef CONFIG_INIT_DEBUG memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE); -#endif free_page(addr); totalram_pages++; } + memset(__initdata_begin, 0xba, __initdata_end - __initdata_begin); printk ("Freeing unused kernel memory: %luk freed\n", (&__init_end - &__init_begin) >> 10); } diff -Nru a/crypto/Kconfig b/crypto/Kconfig --- a/crypto/Kconfig 2004-11-10 17:19:06 -08:00 +++ b/crypto/Kconfig 2004-11-10 17:19:06 -08:00 @@ -223,6 +223,21 @@ See also: http://planeta.terra.com.br/informatica/paulobarreto/KhazadPage.html +config CRYPTO_ANUBIS + tristate "Anubis cipher algorithm" + depends on CRYPTO + help + Anubis cipher algorithm. + + Anubis is a variable key length cipher which can use keys from + 128 bits to 320 bits in length. It was evaluated as a entrant + in the NESSIE competition. + + See also: + https://www.cosic.esat.kuleuven.ac.be/nessie/reports/ + http://planeta.terra.com.br/informatica/paulobarreto/AnubisPage.html + + config CRYPTO_DEFLATE tristate "Deflate compression algorithm" depends on CRYPTO diff -Nru a/crypto/Makefile b/crypto/Makefile --- a/crypto/Makefile 2004-11-10 17:19:07 -08:00 +++ b/crypto/Makefile 2004-11-10 17:19:07 -08:00 @@ -25,6 +25,7 @@ obj-$(CONFIG_CRYPTO_ARC4) += arc4.o obj-$(CONFIG_CRYPTO_TEA) += tea.o obj-$(CONFIG_CRYPTO_KHAZAD) += khazad.o +obj-$(CONFIG_CRYPTO_ANUBIS) += anubis.o obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o diff -Nru a/crypto/anubis.c b/crypto/anubis.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/crypto/anubis.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,719 @@ +/* + * Cryptographic API. + * + * Anubis Algorithm + * + * The Anubis algorithm was developed by Paulo S. L. M. Barreto and + * Vincent Rijmen. + * + * See + * + * P.S.L.M. Barreto, V. Rijmen, + * ``The Anubis block cipher,'' + * NESSIE submission, 2000. + * + * This software implements the "tweaked" version of Anubis. + * Only the S-box and (consequently) the rounds constants have been + * changed. + * + * The original authors have disclaimed all copyright interest in this + * code and thus put it in the public domain. The subsequent authors + * have put this under the GNU General Public License. + * + * By Aaron Grothe ajgrothe@yahoo.com, October 28, 2004 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + */ + +#include +#include +#include +#include +#include + +#define ANUBIS_MIN_KEY_SIZE 16 +#define ANUBIS_MAX_KEY_SIZE 40 +#define ANUBIS_BLOCK_SIZE 16 +#define ANUBIS_MAX_N 10 +#define ANUBIS_MAX_ROUNDS (8 + ANUBIS_MAX_N) + +struct anubis_ctx { + int key_len; // in bits + int R; + u32 E[ANUBIS_MAX_ROUNDS + 1][4]; + u32 D[ANUBIS_MAX_ROUNDS + 1][4]; +}; + +static const u32 T0[256] = { + 0xba69d2bbU, 0x54a84de5U, 0x2f5ebce2U, 0x74e8cd25U, + 0x53a651f7U, 0xd3bb6bd0U, 0xd2b96fd6U, 0x4d9a29b3U, + 0x50a05dfdU, 0xac458acfU, 0x8d070e09U, 0xbf63c6a5U, + 0x70e0dd3dU, 0x52a455f1U, 0x9a29527bU, 0x4c982db5U, + 0xeac98f46U, 0xd5b773c4U, 0x97336655U, 0xd1bf63dcU, + 0x3366ccaaU, 0x51a259fbU, 0x5bb671c7U, 0xa651a2f3U, + 0xdea15ffeU, 0x48903dadU, 0xa84d9ad7U, 0x992f5e71U, + 0xdbab4be0U, 0x3264c8acU, 0xb773e695U, 0xfce5d732U, + 0xe3dbab70U, 0x9e214263U, 0x913f7e41U, 0x9b2b567dU, + 0xe2d9af76U, 0xbb6bd6bdU, 0x4182199bU, 0x6edca579U, + 0xa557aef9U, 0xcb8b0b80U, 0x6bd6b167U, 0x95376e59U, + 0xa15fbee1U, 0xf3fbeb10U, 0xb17ffe81U, 0x0204080cU, + 0xcc851792U, 0xc49537a2U, 0x1d3a744eU, 0x14285078U, + 0xc39b2bb0U, 0x63c69157U, 0xdaa94fe6U, 0x5dba69d3U, + 0x5fbe61dfU, 0xdca557f2U, 0x7dfae913U, 0xcd871394U, + 0x7ffee11fU, 0x5ab475c1U, 0x6cd8ad75U, 0x5cb86dd5U, + 0xf7f3fb08U, 0x264c98d4U, 0xffe3db38U, 0xedc79354U, + 0xe8cd874aU, 0x9d274e69U, 0x6fdea17fU, 0x8e010203U, + 0x19326456U, 0xa05dbae7U, 0xf0fde71aU, 0x890f1e11U, + 0x0f1e3c22U, 0x070e1c12U, 0xaf4386c5U, 0xfbebcb20U, + 0x08102030U, 0x152a547eU, 0x0d1a342eU, 0x04081018U, + 0x01020406U, 0x64c88d45U, 0xdfa35bf8U, 0x76ecc529U, + 0x79f2f90bU, 0xdda753f4U, 0x3d7af48eU, 0x162c5874U, + 0x3f7efc82U, 0x376edcb2U, 0x6ddaa973U, 0x3870e090U, + 0xb96fdeb1U, 0x73e6d137U, 0xe9cf834cU, 0x356ad4beU, + 0x55aa49e3U, 0x71e2d93bU, 0x7bf6f107U, 0x8c050a0fU, + 0x72e4d531U, 0x880d1a17U, 0xf6f1ff0eU, 0x2a54a8fcU, + 0x3e7cf884U, 0x5ebc65d9U, 0x274e9cd2U, 0x468c0589U, + 0x0c183028U, 0x65ca8943U, 0x68d0bd6dU, 0x61c2995bU, + 0x03060c0aU, 0xc19f23bcU, 0x57ae41efU, 0xd6b17fceU, + 0xd9af43ecU, 0x58b07dcdU, 0xd8ad47eaU, 0x66cc8549U, + 0xd7b37bc8U, 0x3a74e89cU, 0xc88d078aU, 0x3c78f088U, + 0xfae9cf26U, 0x96316253U, 0xa753a6f5U, 0x982d5a77U, + 0xecc59752U, 0xb86ddab7U, 0xc7933ba8U, 0xae4182c3U, + 0x69d2b96bU, 0x4b9631a7U, 0xab4b96ddU, 0xa94f9ed1U, + 0x67ce814fU, 0x0a14283cU, 0x478e018fU, 0xf2f9ef16U, + 0xb577ee99U, 0x224488ccU, 0xe5d7b364U, 0xeec19f5eU, + 0xbe61c2a3U, 0x2b56acfaU, 0x811f3e21U, 0x1224486cU, + 0x831b362dU, 0x1b366c5aU, 0x0e1c3824U, 0x23468ccaU, + 0xf5f7f304U, 0x458a0983U, 0x214284c6U, 0xce811f9eU, + 0x499239abU, 0x2c58b0e8U, 0xf9efc32cU, 0xe6d1bf6eU, + 0xb671e293U, 0x2850a0f0U, 0x172e5c72U, 0x8219322bU, + 0x1a34685cU, 0x8b0b161dU, 0xfee1df3eU, 0x8a09121bU, + 0x09122436U, 0xc98f038cU, 0x87132635U, 0x4e9c25b9U, + 0xe1dfa37cU, 0x2e5cb8e4U, 0xe4d5b762U, 0xe0dda77aU, + 0xebcb8b40U, 0x903d7a47U, 0xa455aaffU, 0x1e3c7844U, + 0x85172e39U, 0x60c09d5dU, 0x00000000U, 0x254a94deU, + 0xf4f5f702U, 0xf1ffe31cU, 0x94356a5fU, 0x0b162c3aU, + 0xe7d3bb68U, 0x75eac923U, 0xefc39b58U, 0x3468d0b8U, + 0x3162c4a6U, 0xd4b577c2U, 0xd0bd67daU, 0x86112233U, + 0x7efce519U, 0xad478ec9U, 0xfde7d334U, 0x2952a4f6U, + 0x3060c0a0U, 0x3b76ec9aU, 0x9f234665U, 0xf8edc72aU, + 0xc6913faeU, 0x13264c6aU, 0x060c1814U, 0x050a141eU, + 0xc59733a4U, 0x11224466U, 0x77eec12fU, 0x7cf8ed15U, + 0x7af4f501U, 0x78f0fd0dU, 0x366cd8b4U, 0x1c387048U, + 0x3972e496U, 0x59b279cbU, 0x18306050U, 0x56ac45e9U, + 0xb37bf68dU, 0xb07dfa87U, 0x244890d8U, 0x204080c0U, + 0xb279f28bU, 0x9239724bU, 0xa35bb6edU, 0xc09d27baU, + 0x44880d85U, 0x62c49551U, 0x10204060U, 0xb475ea9fU, + 0x84152a3fU, 0x43861197U, 0x933b764dU, 0xc2992fb6U, + 0x4a9435a1U, 0xbd67cea9U, 0x8f030605U, 0x2d5ab4eeU, + 0xbc65caafU, 0x9c254a6fU, 0x6ad4b561U, 0x40801d9dU, + 0xcf831b98U, 0xa259b2ebU, 0x801d3a27U, 0x4f9e21bfU, + 0x1f3e7c42U, 0xca890f86U, 0xaa4992dbU, 0x42841591U, +}; + +static const u32 T1[256] = { + 0x69babbd2U, 0xa854e54dU, 0x5e2fe2bcU, 0xe87425cdU, + 0xa653f751U, 0xbbd3d06bU, 0xb9d2d66fU, 0x9a4db329U, + 0xa050fd5dU, 0x45accf8aU, 0x078d090eU, 0x63bfa5c6U, + 0xe0703dddU, 0xa452f155U, 0x299a7b52U, 0x984cb52dU, + 0xc9ea468fU, 0xb7d5c473U, 0x33975566U, 0xbfd1dc63U, + 0x6633aaccU, 0xa251fb59U, 0xb65bc771U, 0x51a6f3a2U, + 0xa1defe5fU, 0x9048ad3dU, 0x4da8d79aU, 0x2f99715eU, + 0xabdbe04bU, 0x6432acc8U, 0x73b795e6U, 0xe5fc32d7U, + 0xdbe370abU, 0x219e6342U, 0x3f91417eU, 0x2b9b7d56U, + 0xd9e276afU, 0x6bbbbdd6U, 0x82419b19U, 0xdc6e79a5U, + 0x57a5f9aeU, 0x8bcb800bU, 0xd66b67b1U, 0x3795596eU, + 0x5fa1e1beU, 0xfbf310ebU, 0x7fb181feU, 0x04020c08U, + 0x85cc9217U, 0x95c4a237U, 0x3a1d4e74U, 0x28147850U, + 0x9bc3b02bU, 0xc6635791U, 0xa9dae64fU, 0xba5dd369U, + 0xbe5fdf61U, 0xa5dcf257U, 0xfa7d13e9U, 0x87cd9413U, + 0xfe7f1fe1U, 0xb45ac175U, 0xd86c75adU, 0xb85cd56dU, + 0xf3f708fbU, 0x4c26d498U, 0xe3ff38dbU, 0xc7ed5493U, + 0xcde84a87U, 0x279d694eU, 0xde6f7fa1U, 0x018e0302U, + 0x32195664U, 0x5da0e7baU, 0xfdf01ae7U, 0x0f89111eU, + 0x1e0f223cU, 0x0e07121cU, 0x43afc586U, 0xebfb20cbU, + 0x10083020U, 0x2a157e54U, 0x1a0d2e34U, 0x08041810U, + 0x02010604U, 0xc864458dU, 0xa3dff85bU, 0xec7629c5U, + 0xf2790bf9U, 0xa7ddf453U, 0x7a3d8ef4U, 0x2c167458U, + 0x7e3f82fcU, 0x6e37b2dcU, 0xda6d73a9U, 0x703890e0U, + 0x6fb9b1deU, 0xe67337d1U, 0xcfe94c83U, 0x6a35bed4U, + 0xaa55e349U, 0xe2713bd9U, 0xf67b07f1U, 0x058c0f0aU, + 0xe47231d5U, 0x0d88171aU, 0xf1f60effU, 0x542afca8U, + 0x7c3e84f8U, 0xbc5ed965U, 0x4e27d29cU, 0x8c468905U, + 0x180c2830U, 0xca654389U, 0xd0686dbdU, 0xc2615b99U, + 0x06030a0cU, 0x9fc1bc23U, 0xae57ef41U, 0xb1d6ce7fU, + 0xafd9ec43U, 0xb058cd7dU, 0xadd8ea47U, 0xcc664985U, + 0xb3d7c87bU, 0x743a9ce8U, 0x8dc88a07U, 0x783c88f0U, + 0xe9fa26cfU, 0x31965362U, 0x53a7f5a6U, 0x2d98775aU, + 0xc5ec5297U, 0x6db8b7daU, 0x93c7a83bU, 0x41aec382U, + 0xd2696bb9U, 0x964ba731U, 0x4babdd96U, 0x4fa9d19eU, + 0xce674f81U, 0x140a3c28U, 0x8e478f01U, 0xf9f216efU, + 0x77b599eeU, 0x4422cc88U, 0xd7e564b3U, 0xc1ee5e9fU, + 0x61bea3c2U, 0x562bfaacU, 0x1f81213eU, 0x24126c48U, + 0x1b832d36U, 0x361b5a6cU, 0x1c0e2438U, 0x4623ca8cU, + 0xf7f504f3U, 0x8a458309U, 0x4221c684U, 0x81ce9e1fU, + 0x9249ab39U, 0x582ce8b0U, 0xeff92cc3U, 0xd1e66ebfU, + 0x71b693e2U, 0x5028f0a0U, 0x2e17725cU, 0x19822b32U, + 0x341a5c68U, 0x0b8b1d16U, 0xe1fe3edfU, 0x098a1b12U, + 0x12093624U, 0x8fc98c03U, 0x13873526U, 0x9c4eb925U, + 0xdfe17ca3U, 0x5c2ee4b8U, 0xd5e462b7U, 0xdde07aa7U, + 0xcbeb408bU, 0x3d90477aU, 0x55a4ffaaU, 0x3c1e4478U, + 0x1785392eU, 0xc0605d9dU, 0x00000000U, 0x4a25de94U, + 0xf5f402f7U, 0xfff11ce3U, 0x35945f6aU, 0x160b3a2cU, + 0xd3e768bbU, 0xea7523c9U, 0xc3ef589bU, 0x6834b8d0U, + 0x6231a6c4U, 0xb5d4c277U, 0xbdd0da67U, 0x11863322U, + 0xfc7e19e5U, 0x47adc98eU, 0xe7fd34d3U, 0x5229f6a4U, + 0x6030a0c0U, 0x763b9aecU, 0x239f6546U, 0xedf82ac7U, + 0x91c6ae3fU, 0x26136a4cU, 0x0c061418U, 0x0a051e14U, + 0x97c5a433U, 0x22116644U, 0xee772fc1U, 0xf87c15edU, + 0xf47a01f5U, 0xf0780dfdU, 0x6c36b4d8U, 0x381c4870U, + 0x723996e4U, 0xb259cb79U, 0x30185060U, 0xac56e945U, + 0x7bb38df6U, 0x7db087faU, 0x4824d890U, 0x4020c080U, + 0x79b28bf2U, 0x39924b72U, 0x5ba3edb6U, 0x9dc0ba27U, + 0x8844850dU, 0xc4625195U, 0x20106040U, 0x75b49feaU, + 0x15843f2aU, 0x86439711U, 0x3b934d76U, 0x99c2b62fU, + 0x944aa135U, 0x67bda9ceU, 0x038f0506U, 0x5a2deeb4U, + 0x65bcafcaU, 0x259c6f4aU, 0xd46a61b5U, 0x80409d1dU, + 0x83cf981bU, 0x59a2ebb2U, 0x1d80273aU, 0x9e4fbf21U, + 0x3e1f427cU, 0x89ca860fU, 0x49aadb92U, 0x84429115U, +}; + +static const u32 T2[256] = { + 0xd2bbba69U, 0x4de554a8U, 0xbce22f5eU, 0xcd2574e8U, + 0x51f753a6U, 0x6bd0d3bbU, 0x6fd6d2b9U, 0x29b34d9aU, + 0x5dfd50a0U, 0x8acfac45U, 0x0e098d07U, 0xc6a5bf63U, + 0xdd3d70e0U, 0x55f152a4U, 0x527b9a29U, 0x2db54c98U, + 0x8f46eac9U, 0x73c4d5b7U, 0x66559733U, 0x63dcd1bfU, + 0xccaa3366U, 0x59fb51a2U, 0x71c75bb6U, 0xa2f3a651U, + 0x5ffedea1U, 0x3dad4890U, 0x9ad7a84dU, 0x5e71992fU, + 0x4be0dbabU, 0xc8ac3264U, 0xe695b773U, 0xd732fce5U, + 0xab70e3dbU, 0x42639e21U, 0x7e41913fU, 0x567d9b2bU, + 0xaf76e2d9U, 0xd6bdbb6bU, 0x199b4182U, 0xa5796edcU, + 0xaef9a557U, 0x0b80cb8bU, 0xb1676bd6U, 0x6e599537U, + 0xbee1a15fU, 0xeb10f3fbU, 0xfe81b17fU, 0x080c0204U, + 0x1792cc85U, 0x37a2c495U, 0x744e1d3aU, 0x50781428U, + 0x2bb0c39bU, 0x915763c6U, 0x4fe6daa9U, 0x69d35dbaU, + 0x61df5fbeU, 0x57f2dca5U, 0xe9137dfaU, 0x1394cd87U, + 0xe11f7ffeU, 0x75c15ab4U, 0xad756cd8U, 0x6dd55cb8U, + 0xfb08f7f3U, 0x98d4264cU, 0xdb38ffe3U, 0x9354edc7U, + 0x874ae8cdU, 0x4e699d27U, 0xa17f6fdeU, 0x02038e01U, + 0x64561932U, 0xbae7a05dU, 0xe71af0fdU, 0x1e11890fU, + 0x3c220f1eU, 0x1c12070eU, 0x86c5af43U, 0xcb20fbebU, + 0x20300810U, 0x547e152aU, 0x342e0d1aU, 0x10180408U, + 0x04060102U, 0x8d4564c8U, 0x5bf8dfa3U, 0xc52976ecU, + 0xf90b79f2U, 0x53f4dda7U, 0xf48e3d7aU, 0x5874162cU, + 0xfc823f7eU, 0xdcb2376eU, 0xa9736ddaU, 0xe0903870U, + 0xdeb1b96fU, 0xd13773e6U, 0x834ce9cfU, 0xd4be356aU, + 0x49e355aaU, 0xd93b71e2U, 0xf1077bf6U, 0x0a0f8c05U, + 0xd53172e4U, 0x1a17880dU, 0xff0ef6f1U, 0xa8fc2a54U, + 0xf8843e7cU, 0x65d95ebcU, 0x9cd2274eU, 0x0589468cU, + 0x30280c18U, 0x894365caU, 0xbd6d68d0U, 0x995b61c2U, + 0x0c0a0306U, 0x23bcc19fU, 0x41ef57aeU, 0x7fced6b1U, + 0x43ecd9afU, 0x7dcd58b0U, 0x47ead8adU, 0x854966ccU, + 0x7bc8d7b3U, 0xe89c3a74U, 0x078ac88dU, 0xf0883c78U, + 0xcf26fae9U, 0x62539631U, 0xa6f5a753U, 0x5a77982dU, + 0x9752ecc5U, 0xdab7b86dU, 0x3ba8c793U, 0x82c3ae41U, + 0xb96b69d2U, 0x31a74b96U, 0x96ddab4bU, 0x9ed1a94fU, + 0x814f67ceU, 0x283c0a14U, 0x018f478eU, 0xef16f2f9U, + 0xee99b577U, 0x88cc2244U, 0xb364e5d7U, 0x9f5eeec1U, + 0xc2a3be61U, 0xacfa2b56U, 0x3e21811fU, 0x486c1224U, + 0x362d831bU, 0x6c5a1b36U, 0x38240e1cU, 0x8cca2346U, + 0xf304f5f7U, 0x0983458aU, 0x84c62142U, 0x1f9ece81U, + 0x39ab4992U, 0xb0e82c58U, 0xc32cf9efU, 0xbf6ee6d1U, + 0xe293b671U, 0xa0f02850U, 0x5c72172eU, 0x322b8219U, + 0x685c1a34U, 0x161d8b0bU, 0xdf3efee1U, 0x121b8a09U, + 0x24360912U, 0x038cc98fU, 0x26358713U, 0x25b94e9cU, + 0xa37ce1dfU, 0xb8e42e5cU, 0xb762e4d5U, 0xa77ae0ddU, + 0x8b40ebcbU, 0x7a47903dU, 0xaaffa455U, 0x78441e3cU, + 0x2e398517U, 0x9d5d60c0U, 0x00000000U, 0x94de254aU, + 0xf702f4f5U, 0xe31cf1ffU, 0x6a5f9435U, 0x2c3a0b16U, + 0xbb68e7d3U, 0xc92375eaU, 0x9b58efc3U, 0xd0b83468U, + 0xc4a63162U, 0x77c2d4b5U, 0x67dad0bdU, 0x22338611U, + 0xe5197efcU, 0x8ec9ad47U, 0xd334fde7U, 0xa4f62952U, + 0xc0a03060U, 0xec9a3b76U, 0x46659f23U, 0xc72af8edU, + 0x3faec691U, 0x4c6a1326U, 0x1814060cU, 0x141e050aU, + 0x33a4c597U, 0x44661122U, 0xc12f77eeU, 0xed157cf8U, + 0xf5017af4U, 0xfd0d78f0U, 0xd8b4366cU, 0x70481c38U, + 0xe4963972U, 0x79cb59b2U, 0x60501830U, 0x45e956acU, + 0xf68db37bU, 0xfa87b07dU, 0x90d82448U, 0x80c02040U, + 0xf28bb279U, 0x724b9239U, 0xb6eda35bU, 0x27bac09dU, + 0x0d854488U, 0x955162c4U, 0x40601020U, 0xea9fb475U, + 0x2a3f8415U, 0x11974386U, 0x764d933bU, 0x2fb6c299U, + 0x35a14a94U, 0xcea9bd67U, 0x06058f03U, 0xb4ee2d5aU, + 0xcaafbc65U, 0x4a6f9c25U, 0xb5616ad4U, 0x1d9d4080U, + 0x1b98cf83U, 0xb2eba259U, 0x3a27801dU, 0x21bf4f9eU, + 0x7c421f3eU, 0x0f86ca89U, 0x92dbaa49U, 0x15914284U, +}; + +static const u32 T3[256] = { + 0xbbd269baU, 0xe54da854U, 0xe2bc5e2fU, 0x25cde874U, + 0xf751a653U, 0xd06bbbd3U, 0xd66fb9d2U, 0xb3299a4dU, + 0xfd5da050U, 0xcf8a45acU, 0x090e078dU, 0xa5c663bfU, + 0x3ddde070U, 0xf155a452U, 0x7b52299aU, 0xb52d984cU, + 0x468fc9eaU, 0xc473b7d5U, 0x55663397U, 0xdc63bfd1U, + 0xaacc6633U, 0xfb59a251U, 0xc771b65bU, 0xf3a251a6U, + 0xfe5fa1deU, 0xad3d9048U, 0xd79a4da8U, 0x715e2f99U, + 0xe04babdbU, 0xacc86432U, 0x95e673b7U, 0x32d7e5fcU, + 0x70abdbe3U, 0x6342219eU, 0x417e3f91U, 0x7d562b9bU, + 0x76afd9e2U, 0xbdd66bbbU, 0x9b198241U, 0x79a5dc6eU, + 0xf9ae57a5U, 0x800b8bcbU, 0x67b1d66bU, 0x596e3795U, + 0xe1be5fa1U, 0x10ebfbf3U, 0x81fe7fb1U, 0x0c080402U, + 0x921785ccU, 0xa23795c4U, 0x4e743a1dU, 0x78502814U, + 0xb02b9bc3U, 0x5791c663U, 0xe64fa9daU, 0xd369ba5dU, + 0xdf61be5fU, 0xf257a5dcU, 0x13e9fa7dU, 0x941387cdU, + 0x1fe1fe7fU, 0xc175b45aU, 0x75add86cU, 0xd56db85cU, + 0x08fbf3f7U, 0xd4984c26U, 0x38dbe3ffU, 0x5493c7edU, + 0x4a87cde8U, 0x694e279dU, 0x7fa1de6fU, 0x0302018eU, + 0x56643219U, 0xe7ba5da0U, 0x1ae7fdf0U, 0x111e0f89U, + 0x223c1e0fU, 0x121c0e07U, 0xc58643afU, 0x20cbebfbU, + 0x30201008U, 0x7e542a15U, 0x2e341a0dU, 0x18100804U, + 0x06040201U, 0x458dc864U, 0xf85ba3dfU, 0x29c5ec76U, + 0x0bf9f279U, 0xf453a7ddU, 0x8ef47a3dU, 0x74582c16U, + 0x82fc7e3fU, 0xb2dc6e37U, 0x73a9da6dU, 0x90e07038U, + 0xb1de6fb9U, 0x37d1e673U, 0x4c83cfe9U, 0xbed46a35U, + 0xe349aa55U, 0x3bd9e271U, 0x07f1f67bU, 0x0f0a058cU, + 0x31d5e472U, 0x171a0d88U, 0x0efff1f6U, 0xfca8542aU, + 0x84f87c3eU, 0xd965bc5eU, 0xd29c4e27U, 0x89058c46U, + 0x2830180cU, 0x4389ca65U, 0x6dbdd068U, 0x5b99c261U, + 0x0a0c0603U, 0xbc239fc1U, 0xef41ae57U, 0xce7fb1d6U, + 0xec43afd9U, 0xcd7db058U, 0xea47add8U, 0x4985cc66U, + 0xc87bb3d7U, 0x9ce8743aU, 0x8a078dc8U, 0x88f0783cU, + 0x26cfe9faU, 0x53623196U, 0xf5a653a7U, 0x775a2d98U, + 0x5297c5ecU, 0xb7da6db8U, 0xa83b93c7U, 0xc38241aeU, + 0x6bb9d269U, 0xa731964bU, 0xdd964babU, 0xd19e4fa9U, + 0x4f81ce67U, 0x3c28140aU, 0x8f018e47U, 0x16eff9f2U, + 0x99ee77b5U, 0xcc884422U, 0x64b3d7e5U, 0x5e9fc1eeU, + 0xa3c261beU, 0xfaac562bU, 0x213e1f81U, 0x6c482412U, + 0x2d361b83U, 0x5a6c361bU, 0x24381c0eU, 0xca8c4623U, + 0x04f3f7f5U, 0x83098a45U, 0xc6844221U, 0x9e1f81ceU, + 0xab399249U, 0xe8b0582cU, 0x2cc3eff9U, 0x6ebfd1e6U, + 0x93e271b6U, 0xf0a05028U, 0x725c2e17U, 0x2b321982U, + 0x5c68341aU, 0x1d160b8bU, 0x3edfe1feU, 0x1b12098aU, + 0x36241209U, 0x8c038fc9U, 0x35261387U, 0xb9259c4eU, + 0x7ca3dfe1U, 0xe4b85c2eU, 0x62b7d5e4U, 0x7aa7dde0U, + 0x408bcbebU, 0x477a3d90U, 0xffaa55a4U, 0x44783c1eU, + 0x392e1785U, 0x5d9dc060U, 0x00000000U, 0xde944a25U, + 0x02f7f5f4U, 0x1ce3fff1U, 0x5f6a3594U, 0x3a2c160bU, + 0x68bbd3e7U, 0x23c9ea75U, 0x589bc3efU, 0xb8d06834U, + 0xa6c46231U, 0xc277b5d4U, 0xda67bdd0U, 0x33221186U, + 0x19e5fc7eU, 0xc98e47adU, 0x34d3e7fdU, 0xf6a45229U, + 0xa0c06030U, 0x9aec763bU, 0x6546239fU, 0x2ac7edf8U, + 0xae3f91c6U, 0x6a4c2613U, 0x14180c06U, 0x1e140a05U, + 0xa43397c5U, 0x66442211U, 0x2fc1ee77U, 0x15edf87cU, + 0x01f5f47aU, 0x0dfdf078U, 0xb4d86c36U, 0x4870381cU, + 0x96e47239U, 0xcb79b259U, 0x50603018U, 0xe945ac56U, + 0x8df67bb3U, 0x87fa7db0U, 0xd8904824U, 0xc0804020U, + 0x8bf279b2U, 0x4b723992U, 0xedb65ba3U, 0xba279dc0U, + 0x850d8844U, 0x5195c462U, 0x60402010U, 0x9fea75b4U, + 0x3f2a1584U, 0x97118643U, 0x4d763b93U, 0xb62f99c2U, + 0xa135944aU, 0xa9ce67bdU, 0x0506038fU, 0xeeb45a2dU, + 0xafca65bcU, 0x6f4a259cU, 0x61b5d46aU, 0x9d1d8040U, + 0x981b83cfU, 0xebb259a2U, 0x273a1d80U, 0xbf219e4fU, + 0x427c3e1fU, 0x860f89caU, 0xdb9249aaU, 0x91158442U, +}; + +static const u32 T4[256] = { + 0xbabababaU, 0x54545454U, 0x2f2f2f2fU, 0x74747474U, + 0x53535353U, 0xd3d3d3d3U, 0xd2d2d2d2U, 0x4d4d4d4dU, + 0x50505050U, 0xacacacacU, 0x8d8d8d8dU, 0xbfbfbfbfU, + 0x70707070U, 0x52525252U, 0x9a9a9a9aU, 0x4c4c4c4cU, + 0xeaeaeaeaU, 0xd5d5d5d5U, 0x97979797U, 0xd1d1d1d1U, + 0x33333333U, 0x51515151U, 0x5b5b5b5bU, 0xa6a6a6a6U, + 0xdedededeU, 0x48484848U, 0xa8a8a8a8U, 0x99999999U, + 0xdbdbdbdbU, 0x32323232U, 0xb7b7b7b7U, 0xfcfcfcfcU, + 0xe3e3e3e3U, 0x9e9e9e9eU, 0x91919191U, 0x9b9b9b9bU, + 0xe2e2e2e2U, 0xbbbbbbbbU, 0x41414141U, 0x6e6e6e6eU, + 0xa5a5a5a5U, 0xcbcbcbcbU, 0x6b6b6b6bU, 0x95959595U, + 0xa1a1a1a1U, 0xf3f3f3f3U, 0xb1b1b1b1U, 0x02020202U, + 0xccccccccU, 0xc4c4c4c4U, 0x1d1d1d1dU, 0x14141414U, + 0xc3c3c3c3U, 0x63636363U, 0xdadadadaU, 0x5d5d5d5dU, + 0x5f5f5f5fU, 0xdcdcdcdcU, 0x7d7d7d7dU, 0xcdcdcdcdU, + 0x7f7f7f7fU, 0x5a5a5a5aU, 0x6c6c6c6cU, 0x5c5c5c5cU, + 0xf7f7f7f7U, 0x26262626U, 0xffffffffU, 0xededededU, + 0xe8e8e8e8U, 0x9d9d9d9dU, 0x6f6f6f6fU, 0x8e8e8e8eU, + 0x19191919U, 0xa0a0a0a0U, 0xf0f0f0f0U, 0x89898989U, + 0x0f0f0f0fU, 0x07070707U, 0xafafafafU, 0xfbfbfbfbU, + 0x08080808U, 0x15151515U, 0x0d0d0d0dU, 0x04040404U, + 0x01010101U, 0x64646464U, 0xdfdfdfdfU, 0x76767676U, + 0x79797979U, 0xddddddddU, 0x3d3d3d3dU, 0x16161616U, + 0x3f3f3f3fU, 0x37373737U, 0x6d6d6d6dU, 0x38383838U, + 0xb9b9b9b9U, 0x73737373U, 0xe9e9e9e9U, 0x35353535U, + 0x55555555U, 0x71717171U, 0x7b7b7b7bU, 0x8c8c8c8cU, + 0x72727272U, 0x88888888U, 0xf6f6f6f6U, 0x2a2a2a2aU, + 0x3e3e3e3eU, 0x5e5e5e5eU, 0x27272727U, 0x46464646U, + 0x0c0c0c0cU, 0x65656565U, 0x68686868U, 0x61616161U, + 0x03030303U, 0xc1c1c1c1U, 0x57575757U, 0xd6d6d6d6U, + 0xd9d9d9d9U, 0x58585858U, 0xd8d8d8d8U, 0x66666666U, + 0xd7d7d7d7U, 0x3a3a3a3aU, 0xc8c8c8c8U, 0x3c3c3c3cU, + 0xfafafafaU, 0x96969696U, 0xa7a7a7a7U, 0x98989898U, + 0xececececU, 0xb8b8b8b8U, 0xc7c7c7c7U, 0xaeaeaeaeU, + 0x69696969U, 0x4b4b4b4bU, 0xababababU, 0xa9a9a9a9U, + 0x67676767U, 0x0a0a0a0aU, 0x47474747U, 0xf2f2f2f2U, + 0xb5b5b5b5U, 0x22222222U, 0xe5e5e5e5U, 0xeeeeeeeeU, + 0xbebebebeU, 0x2b2b2b2bU, 0x81818181U, 0x12121212U, + 0x83838383U, 0x1b1b1b1bU, 0x0e0e0e0eU, 0x23232323U, + 0xf5f5f5f5U, 0x45454545U, 0x21212121U, 0xcecececeU, + 0x49494949U, 0x2c2c2c2cU, 0xf9f9f9f9U, 0xe6e6e6e6U, + 0xb6b6b6b6U, 0x28282828U, 0x17171717U, 0x82828282U, + 0x1a1a1a1aU, 0x8b8b8b8bU, 0xfefefefeU, 0x8a8a8a8aU, + 0x09090909U, 0xc9c9c9c9U, 0x87878787U, 0x4e4e4e4eU, + 0xe1e1e1e1U, 0x2e2e2e2eU, 0xe4e4e4e4U, 0xe0e0e0e0U, + 0xebebebebU, 0x90909090U, 0xa4a4a4a4U, 0x1e1e1e1eU, + 0x85858585U, 0x60606060U, 0x00000000U, 0x25252525U, + 0xf4f4f4f4U, 0xf1f1f1f1U, 0x94949494U, 0x0b0b0b0bU, + 0xe7e7e7e7U, 0x75757575U, 0xefefefefU, 0x34343434U, + 0x31313131U, 0xd4d4d4d4U, 0xd0d0d0d0U, 0x86868686U, + 0x7e7e7e7eU, 0xadadadadU, 0xfdfdfdfdU, 0x29292929U, + 0x30303030U, 0x3b3b3b3bU, 0x9f9f9f9fU, 0xf8f8f8f8U, + 0xc6c6c6c6U, 0x13131313U, 0x06060606U, 0x05050505U, + 0xc5c5c5c5U, 0x11111111U, 0x77777777U, 0x7c7c7c7cU, + 0x7a7a7a7aU, 0x78787878U, 0x36363636U, 0x1c1c1c1cU, + 0x39393939U, 0x59595959U, 0x18181818U, 0x56565656U, + 0xb3b3b3b3U, 0xb0b0b0b0U, 0x24242424U, 0x20202020U, + 0xb2b2b2b2U, 0x92929292U, 0xa3a3a3a3U, 0xc0c0c0c0U, + 0x44444444U, 0x62626262U, 0x10101010U, 0xb4b4b4b4U, + 0x84848484U, 0x43434343U, 0x93939393U, 0xc2c2c2c2U, + 0x4a4a4a4aU, 0xbdbdbdbdU, 0x8f8f8f8fU, 0x2d2d2d2dU, + 0xbcbcbcbcU, 0x9c9c9c9cU, 0x6a6a6a6aU, 0x40404040U, + 0xcfcfcfcfU, 0xa2a2a2a2U, 0x80808080U, 0x4f4f4f4fU, + 0x1f1f1f1fU, 0xcacacacaU, 0xaaaaaaaaU, 0x42424242U, +}; + +static const u32 T5[256] = { + 0x00000000U, 0x01020608U, 0x02040c10U, 0x03060a18U, + 0x04081820U, 0x050a1e28U, 0x060c1430U, 0x070e1238U, + 0x08103040U, 0x09123648U, 0x0a143c50U, 0x0b163a58U, + 0x0c182860U, 0x0d1a2e68U, 0x0e1c2470U, 0x0f1e2278U, + 0x10206080U, 0x11226688U, 0x12246c90U, 0x13266a98U, + 0x142878a0U, 0x152a7ea8U, 0x162c74b0U, 0x172e72b8U, + 0x183050c0U, 0x193256c8U, 0x1a345cd0U, 0x1b365ad8U, + 0x1c3848e0U, 0x1d3a4ee8U, 0x1e3c44f0U, 0x1f3e42f8U, + 0x2040c01dU, 0x2142c615U, 0x2244cc0dU, 0x2346ca05U, + 0x2448d83dU, 0x254ade35U, 0x264cd42dU, 0x274ed225U, + 0x2850f05dU, 0x2952f655U, 0x2a54fc4dU, 0x2b56fa45U, + 0x2c58e87dU, 0x2d5aee75U, 0x2e5ce46dU, 0x2f5ee265U, + 0x3060a09dU, 0x3162a695U, 0x3264ac8dU, 0x3366aa85U, + 0x3468b8bdU, 0x356abeb5U, 0x366cb4adU, 0x376eb2a5U, + 0x387090ddU, 0x397296d5U, 0x3a749ccdU, 0x3b769ac5U, + 0x3c7888fdU, 0x3d7a8ef5U, 0x3e7c84edU, 0x3f7e82e5U, + 0x40809d3aU, 0x41829b32U, 0x4284912aU, 0x43869722U, + 0x4488851aU, 0x458a8312U, 0x468c890aU, 0x478e8f02U, + 0x4890ad7aU, 0x4992ab72U, 0x4a94a16aU, 0x4b96a762U, + 0x4c98b55aU, 0x4d9ab352U, 0x4e9cb94aU, 0x4f9ebf42U, + 0x50a0fdbaU, 0x51a2fbb2U, 0x52a4f1aaU, 0x53a6f7a2U, + 0x54a8e59aU, 0x55aae392U, 0x56ace98aU, 0x57aeef82U, + 0x58b0cdfaU, 0x59b2cbf2U, 0x5ab4c1eaU, 0x5bb6c7e2U, + 0x5cb8d5daU, 0x5dbad3d2U, 0x5ebcd9caU, 0x5fbedfc2U, + 0x60c05d27U, 0x61c25b2fU, 0x62c45137U, 0x63c6573fU, + 0x64c84507U, 0x65ca430fU, 0x66cc4917U, 0x67ce4f1fU, + 0x68d06d67U, 0x69d26b6fU, 0x6ad46177U, 0x6bd6677fU, + 0x6cd87547U, 0x6dda734fU, 0x6edc7957U, 0x6fde7f5fU, + 0x70e03da7U, 0x71e23bafU, 0x72e431b7U, 0x73e637bfU, + 0x74e82587U, 0x75ea238fU, 0x76ec2997U, 0x77ee2f9fU, + 0x78f00de7U, 0x79f20befU, 0x7af401f7U, 0x7bf607ffU, + 0x7cf815c7U, 0x7dfa13cfU, 0x7efc19d7U, 0x7ffe1fdfU, + 0x801d2774U, 0x811f217cU, 0x82192b64U, 0x831b2d6cU, + 0x84153f54U, 0x8517395cU, 0x86113344U, 0x8713354cU, + 0x880d1734U, 0x890f113cU, 0x8a091b24U, 0x8b0b1d2cU, + 0x8c050f14U, 0x8d07091cU, 0x8e010304U, 0x8f03050cU, + 0x903d47f4U, 0x913f41fcU, 0x92394be4U, 0x933b4decU, + 0x94355fd4U, 0x953759dcU, 0x963153c4U, 0x973355ccU, + 0x982d77b4U, 0x992f71bcU, 0x9a297ba4U, 0x9b2b7dacU, + 0x9c256f94U, 0x9d27699cU, 0x9e216384U, 0x9f23658cU, + 0xa05de769U, 0xa15fe161U, 0xa259eb79U, 0xa35bed71U, + 0xa455ff49U, 0xa557f941U, 0xa651f359U, 0xa753f551U, + 0xa84dd729U, 0xa94fd121U, 0xaa49db39U, 0xab4bdd31U, + 0xac45cf09U, 0xad47c901U, 0xae41c319U, 0xaf43c511U, + 0xb07d87e9U, 0xb17f81e1U, 0xb2798bf9U, 0xb37b8df1U, + 0xb4759fc9U, 0xb57799c1U, 0xb67193d9U, 0xb77395d1U, + 0xb86db7a9U, 0xb96fb1a1U, 0xba69bbb9U, 0xbb6bbdb1U, + 0xbc65af89U, 0xbd67a981U, 0xbe61a399U, 0xbf63a591U, + 0xc09dba4eU, 0xc19fbc46U, 0xc299b65eU, 0xc39bb056U, + 0xc495a26eU, 0xc597a466U, 0xc691ae7eU, 0xc793a876U, + 0xc88d8a0eU, 0xc98f8c06U, 0xca89861eU, 0xcb8b8016U, + 0xcc85922eU, 0xcd879426U, 0xce819e3eU, 0xcf839836U, + 0xd0bddaceU, 0xd1bfdcc6U, 0xd2b9d6deU, 0xd3bbd0d6U, + 0xd4b5c2eeU, 0xd5b7c4e6U, 0xd6b1cefeU, 0xd7b3c8f6U, + 0xd8adea8eU, 0xd9afec86U, 0xdaa9e69eU, 0xdbabe096U, + 0xdca5f2aeU, 0xdda7f4a6U, 0xdea1febeU, 0xdfa3f8b6U, + 0xe0dd7a53U, 0xe1df7c5bU, 0xe2d97643U, 0xe3db704bU, + 0xe4d56273U, 0xe5d7647bU, 0xe6d16e63U, 0xe7d3686bU, + 0xe8cd4a13U, 0xe9cf4c1bU, 0xeac94603U, 0xebcb400bU, + 0xecc55233U, 0xedc7543bU, 0xeec15e23U, 0xefc3582bU, + 0xf0fd1ad3U, 0xf1ff1cdbU, 0xf2f916c3U, 0xf3fb10cbU, + 0xf4f502f3U, 0xf5f704fbU, 0xf6f10ee3U, 0xf7f308ebU, + 0xf8ed2a93U, 0xf9ef2c9bU, 0xfae92683U, 0xfbeb208bU, + 0xfce532b3U, 0xfde734bbU, 0xfee13ea3U, 0xffe338abU, +}; + +static const u32 rc[] = { + 0xba542f74U, 0x53d3d24dU, 0x50ac8dbfU, 0x70529a4cU, + 0xead597d1U, 0x33515ba6U, 0xde48a899U, 0xdb32b7fcU, + 0xe39e919bU, 0xe2bb416eU, 0xa5cb6b95U, 0xa1f3b102U, + 0xccc41d14U, 0xc363da5dU, 0x5fdc7dcdU, 0x7f5a6c5cU, + 0xf726ffedU, 0xe89d6f8eU, 0x19a0f089U, +}; + +static int anubis_setkey(void *ctx_arg, const u8 *in_key, + unsigned int key_len, u32 *flags) +{ + + int N, R, i, pos, r; + u32 kappa[ANUBIS_MAX_N]; + u32 inter[ANUBIS_MAX_N]; + + struct anubis_ctx *ctx = ctx_arg; + + switch (key_len) + { + case 16: case 20: case 24: case 28: + case 32: case 36: case 40: + break; + default: + *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; + return - EINVAL; + } + + ctx->key_len = key_len * 8; + N = ctx->key_len >> 5; + ctx->R = R = 8 + N; + + /* * map cipher key to initial key state (mu): */ + for (i = 0, pos = 0; i < N; i++, pos += 4) { + kappa[i] = + (in_key[pos ] << 24) ^ + (in_key[pos + 1] << 16) ^ + (in_key[pos + 2] << 8) ^ + (in_key[pos + 3] ); + } + + /* + * generate R + 1 round keys: + */ + for (r = 0; r <= R; r++) { + u32 K0, K1, K2, K3; + /* + * generate r-th round key K^r: + */ + K0 = T4[(kappa[N - 1] >> 24) ]; + K1 = T4[(kappa[N - 1] >> 16) & 0xff]; + K2 = T4[(kappa[N - 1] >> 8) & 0xff]; + K3 = T4[(kappa[N - 1] ) & 0xff]; + for (i = N - 2; i >= 0; i--) { + K0 = T4[(kappa[i] >> 24) ] ^ + (T5[(K0 >> 24) ] & 0xff000000U) ^ + (T5[(K0 >> 16) & 0xff] & 0x00ff0000U) ^ + (T5[(K0 >> 8) & 0xff] & 0x0000ff00U) ^ + (T5[(K0 ) & 0xff] & 0x000000ffU); + K1 = T4[(kappa[i] >> 16) & 0xff] ^ + (T5[(K1 >> 24) ] & 0xff000000U) ^ + (T5[(K1 >> 16) & 0xff] & 0x00ff0000U) ^ + (T5[(K1 >> 8) & 0xff] & 0x0000ff00U) ^ + (T5[(K1 ) & 0xff] & 0x000000ffU); + K2 = T4[(kappa[i] >> 8) & 0xff] ^ + (T5[(K2 >> 24) ] & 0xff000000U) ^ + (T5[(K2 >> 16) & 0xff] & 0x00ff0000U) ^ + (T5[(K2 >> 8) & 0xff] & 0x0000ff00U) ^ + (T5[(K2 ) & 0xff] & 0x000000ffU); + K3 = T4[(kappa[i] ) & 0xff] ^ + (T5[(K3 >> 24) ] & 0xff000000U) ^ + (T5[(K3 >> 16) & 0xff] & 0x00ff0000U) ^ + (T5[(K3 >> 8) & 0xff] & 0x0000ff00U) ^ + (T5[(K3 ) & 0xff] & 0x000000ffU); + } + + ctx->E[r][0] = K0; + ctx->E[r][1] = K1; + ctx->E[r][2] = K2; + ctx->E[r][3] = K3; + + /* + * compute kappa^{r+1} from kappa^r: + */ + if (r == R) { + break; + } + for (i = 0; i < N; i++) { + int j = i; + inter[i] = T0[(kappa[j--] >> 24) ]; + if (j < 0) j = N - 1; + inter[i] ^= T1[(kappa[j--] >> 16) & 0xff]; + if (j < 0) j = N - 1; + inter[i] ^= T2[(kappa[j--] >> 8) & 0xff]; + if (j < 0) j = N - 1; + inter[i] ^= T3[(kappa[j ] ) & 0xff]; + } + kappa[0] = inter[0] ^ rc[r]; + for (i = 1; i < N; i++) { + kappa[i] = inter[i]; + } + } + + /* + * generate inverse key schedule: K'^0 = K^R, K'^R = + * K^0, K'^r = theta(K^{R-r}): + */ + for (i = 0; i < 4; i++) { + ctx->D[0][i] = ctx->E[R][i]; + ctx->D[R][i] = ctx->E[0][i]; + } + for (r = 1; r < R; r++) { + for (i = 0; i < 4; i++) { + u32 v = ctx->E[R - r][i]; + ctx->D[r][i] = + T0[T4[(v >> 24) ] & 0xff] ^ + T1[T4[(v >> 16) & 0xff] & 0xff] ^ + T2[T4[(v >> 8) & 0xff] & 0xff] ^ + T3[T4[(v ) & 0xff] & 0xff]; + } + } + + return 0; +} + +static void anubis_crypt(u32 roundKey[ANUBIS_MAX_ROUNDS + 1][4], + u8 *ciphertext, const u8 *plaintext, const int R) +{ + int i, pos, r; + u32 state[4]; + u32 inter[4]; + + /* + * map plaintext block to cipher state (mu) + * and add initial round key (sigma[K^0]): + */ + for (i = 0, pos = 0; i < 4; i++, pos += 4) { + state[i] = + (plaintext[pos ] << 24) ^ + (plaintext[pos + 1] << 16) ^ + (plaintext[pos + 2] << 8) ^ + (plaintext[pos + 3] ) ^ + roundKey[0][i]; + } + + /* + * R - 1 full rounds: + */ + + for (r = 1; r < R; r++) { + inter[0] = + T0[(state[0] >> 24) ] ^ + T1[(state[1] >> 24) ] ^ + T2[(state[2] >> 24) ] ^ + T3[(state[3] >> 24) ] ^ + roundKey[r][0]; + inter[1] = + T0[(state[0] >> 16) & 0xff] ^ + T1[(state[1] >> 16) & 0xff] ^ + T2[(state[2] >> 16) & 0xff] ^ + T3[(state[3] >> 16) & 0xff] ^ + roundKey[r][1]; + inter[2] = + T0[(state[0] >> 8) & 0xff] ^ + T1[(state[1] >> 8) & 0xff] ^ + T2[(state[2] >> 8) & 0xff] ^ + T3[(state[3] >> 8) & 0xff] ^ + roundKey[r][2]; + inter[3] = + T0[(state[0] ) & 0xff] ^ + T1[(state[1] ) & 0xff] ^ + T2[(state[2] ) & 0xff] ^ + T3[(state[3] ) & 0xff] ^ + roundKey[r][3]; + state[0] = inter[0]; + state[1] = inter[1]; + state[2] = inter[2]; + state[3] = inter[3]; + } + + /* + * last round: + */ + + inter[0] = + (T0[(state[0] >> 24) ] & 0xff000000U) ^ + (T1[(state[1] >> 24) ] & 0x00ff0000U) ^ + (T2[(state[2] >> 24) ] & 0x0000ff00U) ^ + (T3[(state[3] >> 24) ] & 0x000000ffU) ^ + roundKey[R][0]; + inter[1] = + (T0[(state[0] >> 16) & 0xff] & 0xff000000U) ^ + (T1[(state[1] >> 16) & 0xff] & 0x00ff0000U) ^ + (T2[(state[2] >> 16) & 0xff] & 0x0000ff00U) ^ + (T3[(state[3] >> 16) & 0xff] & 0x000000ffU) ^ + roundKey[R][1]; + inter[2] = + (T0[(state[0] >> 8) & 0xff] & 0xff000000U) ^ + (T1[(state[1] >> 8) & 0xff] & 0x00ff0000U) ^ + (T2[(state[2] >> 8) & 0xff] & 0x0000ff00U) ^ + (T3[(state[3] >> 8) & 0xff] & 0x000000ffU) ^ + roundKey[R][2]; + inter[3] = + (T0[(state[0] ) & 0xff] & 0xff000000U) ^ + (T1[(state[1] ) & 0xff] & 0x00ff0000U) ^ + (T2[(state[2] ) & 0xff] & 0x0000ff00U) ^ + (T3[(state[3] ) & 0xff] & 0x000000ffU) ^ + roundKey[R][3]; + + /* + * map cipher state to ciphertext block (mu^{-1}): + */ + + for (i = 0, pos = 0; i < 4; i++, pos += 4) { + u32 w = inter[i]; + ciphertext[pos ] = (u8)(w >> 24); + ciphertext[pos + 1] = (u8)(w >> 16); + ciphertext[pos + 2] = (u8)(w >> 8); + ciphertext[pos + 3] = (u8)(w ); + } +} + +static void anubis_encrypt(void *ctx_arg, u8 *dst, const u8 *src) +{ + struct anubis_ctx *ctx = ctx_arg; + anubis_crypt(ctx->E, dst, src, ctx->R); +} + +static void anubis_decrypt(void *ctx_arg, u8 *dst, const u8 *src) +{ + struct anubis_ctx *ctx = ctx_arg; + anubis_crypt(ctx->D, dst, src, ctx->R); +} + +static struct crypto_alg anubis_alg = { + .cra_name = "anubis", + .cra_flags = CRYPTO_ALG_TYPE_CIPHER, + .cra_blocksize = ANUBIS_BLOCK_SIZE, + .cra_ctxsize = sizeof (struct anubis_ctx), + .cra_module = THIS_MODULE, + .cra_list = LIST_HEAD_INIT(anubis_alg.cra_list), + .cra_u = { .cipher = { + .cia_min_keysize = ANUBIS_MIN_KEY_SIZE, + .cia_max_keysize = ANUBIS_MAX_KEY_SIZE, + .cia_setkey = anubis_setkey, + .cia_encrypt = anubis_encrypt, + .cia_decrypt = anubis_decrypt } } +}; + +static int __init init(void) +{ + int ret = 0; + + ret = crypto_register_alg(&anubis_alg); + return ret; +} + +static void __exit fini(void) +{ + crypto_unregister_alg(&anubis_alg); +} + +module_init(init); +module_exit(fini); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Anubis Cryptographic Algorithm"); diff -Nru a/crypto/sha256.c b/crypto/sha256.c --- a/crypto/sha256.c 2004-11-10 17:19:04 -08:00 +++ b/crypto/sha256.c 2004-11-10 17:19:04 -08:00 @@ -63,15 +63,7 @@ static inline void LOAD_OP(int I, u32 *W, const u8 *input) { - u32 t1 = input[(4 * I)] & 0xff; - - t1 <<= 8; - t1 |= input[(4 * I) + 1] & 0xff; - t1 <<= 8; - t1 |= input[(4 * I) + 2] & 0xff; - t1 <<= 8; - t1 |= input[(4 * I) + 3] & 0xff; - W[I] = t1; + W[I] = __be32_to_cpu( ((u32*)(input))[I] ); } static inline void BLEND_OP(int I, u32 *W) diff -Nru a/crypto/sha512.c b/crypto/sha512.c --- a/crypto/sha512.c 2004-11-10 17:19:06 -08:00 +++ b/crypto/sha512.c 2004-11-10 17:19:06 -08:00 @@ -30,6 +30,7 @@ u64 state[8]; u32 count[4]; u8 buf[128]; + u64 W[80]; }; static inline u64 Ch(u64 x, u64 y, u64 z) @@ -104,34 +105,18 @@ static inline void LOAD_OP(int I, u64 *W, const u8 *input) { - u64 t1 = input[(8*I) ] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+1] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+2] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+3] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+4] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+5] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+6] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+7] & 0xff; - W[I] = t1; + W[I] = __be64_to_cpu( ((u64*)(input))[I] ); } static inline void BLEND_OP(int I, u64 *W) { - W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16]; + W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16]; } static void -sha512_transform(u64 *state, const u8 *input) +sha512_transform(u64 *state, u64 *W, const u8 *input) { u64 a, b, c, d, e, f, g, h, t1, t2; - u64 W[80]; int i; @@ -172,7 +157,6 @@ /* erase our data */ a = b = c = d = e = f = g = h = t1 = t2 = 0; - memset(W, 0, 80 * sizeof(u64)); } static void @@ -230,10 +214,10 @@ /* Transform as many times as possible. */ if (len >= part_len) { memcpy(&sctx->buf[index], data, part_len); - sha512_transform(sctx->state, sctx->buf); + sha512_transform(sctx->state, sctx->W, sctx->buf); for (i = part_len; i + 127 < len; i+=128) - sha512_transform(sctx->state, &data[i]); + sha512_transform(sctx->state, sctx->W, &data[i]); index = 0; } else { @@ -242,6 +226,9 @@ /* Buffer remaining input */ memcpy(&sctx->buf[index], &data[i], len - i); + + /* erase our data */ + memset(sctx->W, 0, sizeof(sctx->W)); } static void diff -Nru a/crypto/tcrypt.c b/crypto/tcrypt.c --- a/crypto/tcrypt.c 2004-11-10 17:19:06 -08:00 +++ b/crypto/tcrypt.c 2004-11-10 17:19:06 -08:00 @@ -684,6 +684,12 @@ test_cipher ("khazad", MODE_ECB, ENCRYPT, khazad_enc_tv_template, KHAZAD_ENC_TEST_VECTORS); test_cipher ("khazad", MODE_ECB, DECRYPT, khazad_dec_tv_template, KHAZAD_DEC_TEST_VECTORS); + //ANUBIS + test_cipher ("anubis", MODE_ECB, ENCRYPT, anubis_enc_tv_template, ANUBIS_ENC_TEST_VECTORS); + test_cipher ("anubis", MODE_ECB, DECRYPT, anubis_dec_tv_template, ANUBIS_DEC_TEST_VECTORS); + test_cipher ("anubis", MODE_CBC, ENCRYPT, anubis_cbc_enc_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS); + test_cipher ("anubis", MODE_CBC, DECRYPT, anubis_cbc_dec_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS); + test_hash("sha384", sha384_tv_template, SHA384_TEST_VECTORS); test_hash("sha512", sha512_tv_template, SHA512_TEST_VECTORS); test_hash("wp512", wp512_tv_template, WP512_TEST_VECTORS); @@ -817,6 +823,13 @@ case 25: test_cipher ("tnepres", MODE_ECB, ENCRYPT, tnepres_enc_tv_template, TNEPRES_ENC_TEST_VECTORS); test_cipher ("tnepres", MODE_ECB, DECRYPT, tnepres_dec_tv_template, TNEPRES_DEC_TEST_VECTORS); + break; + + case 26: + test_cipher ("anubis", MODE_ECB, ENCRYPT, anubis_enc_tv_template, ANUBIS_ENC_TEST_VECTORS); + test_cipher ("anubis", MODE_ECB, DECRYPT, anubis_dec_tv_template, ANUBIS_DEC_TEST_VECTORS); + test_cipher ("anubis", MODE_CBC, ENCRYPT, anubis_cbc_enc_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS); + test_cipher ("anubis", MODE_CBC, DECRYPT, anubis_cbc_dec_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS); break; #ifdef CONFIG_CRYPTO_HMAC diff -Nru a/crypto/tcrypt.h b/crypto/tcrypt.h --- a/crypto/tcrypt.h 2004-11-10 17:19:06 -08:00 +++ b/crypto/tcrypt.h 2004-11-10 17:19:06 -08:00 @@ -2267,6 +2267,211 @@ }; /* + * Anubis test vectors. + */ + +#define ANUBIS_ENC_TEST_VECTORS 5 +#define ANUBIS_DEC_TEST_VECTORS 5 +#define ANUBIS_CBC_ENC_TEST_VECTORS 2 +#define ANUBIS_CBC_DEC_TEST_VECTORS 2 + +struct cipher_testvec anubis_enc_tv_template[] = { + { + .key = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, + .klen = 16, + .input = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, + .ilen = 16, + .result = { 0x6d, 0xc5, 0xda, 0xa2, 0x26, 0x7d, 0x62, 0x6f, + 0x08, 0xb7, 0x52, 0x8e, 0x6e, 0x6e, 0x86, 0x90 }, + .rlen = 16, + }, { + + .key = { 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03 }, + .klen = 20, + .input = { 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 }, + .ilen = 16, + .result = { 0xdb, 0xf1, 0x42, 0xf4, 0xd1, 0x8a, 0xc7, 0x49, + 0x87, 0x41, 0x6f, 0x82, 0x0a, 0x98, 0x64, 0xae }, + .rlen = 16, + }, { + .key = { 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, + 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, + 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, + 0x24, 0x24, 0x24, 0x24 }, + .klen = 28, + .input = { 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, + 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24 }, + .ilen = 16, + .result = { 0xfd, 0x1b, 0x4a, 0xe3, 0xbf, 0xf0, 0xad, 0x3d, + 0x06, 0xd3, 0x61, 0x27, 0xfd, 0x13, 0x9e, 0xde }, + .rlen = 16, + }, { + .key = { 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, + 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, + 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, + 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25 }, + .klen = 32, + .input = { 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, + 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25 }, + .ilen = 16, + .result = { 0x1a, 0x91, 0xfb, 0x2b, 0xb7, 0x78, 0x6b, 0xc4, + 0x17, 0xd9, 0xff, 0x40, 0x3b, 0x0e, 0xe5, 0xfe }, + .rlen = 16, + }, { + .key = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, + .klen = 40, + .input = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, + .ilen = 16, + .result = { 0xa5, 0x2c, 0x85, 0x6f, 0x9c, 0xba, 0xa0, 0x97, + 0x9e, 0xc6, 0x84, 0x0f, 0x17, 0x21, 0x07, 0xee }, + .rlen = 16, + }, +}; + +struct cipher_testvec anubis_dec_tv_template[] = { + { + .key = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, + .klen = 16, + .input = { 0x6d, 0xc5, 0xda, 0xa2, 0x26, 0x7d, 0x62, 0x6f, + 0x08, 0xb7, 0x52, 0x8e, 0x6e, 0x6e, 0x86, 0x90 }, + .ilen = 16, + .result = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, + .rlen = 16, + }, { + + .key = { 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03 }, + .klen = 20, + .input = { 0xdb, 0xf1, 0x42, 0xf4, 0xd1, 0x8a, 0xc7, 0x49, + 0x87, 0x41, 0x6f, 0x82, 0x0a, 0x98, 0x64, 0xae }, + .ilen = 16, + .result = { 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 }, + .rlen = 16, + }, { + .key = { 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, + 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, + 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, + 0x24, 0x24, 0x24, 0x24 }, + .klen = 28, + .input = { 0xfd, 0x1b, 0x4a, 0xe3, 0xbf, 0xf0, 0xad, 0x3d, + 0x06, 0xd3, 0x61, 0x27, 0xfd, 0x13, 0x9e, 0xde }, + .ilen = 16, + .result = { 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, + 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24 }, + .rlen = 16, + }, { + .key = { 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, + 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, + 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, + 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25 }, + .klen = 32, + .input = { 0x1a, 0x91, 0xfb, 0x2b, 0xb7, 0x78, 0x6b, 0xc4, + 0x17, 0xd9, 0xff, 0x40, 0x3b, 0x0e, 0xe5, 0xfe }, + .ilen = 16, + .result = { 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, + 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25 }, + .rlen = 16, + }, { + .key = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, + .input = { 0xa5, 0x2c, 0x85, 0x6f, 0x9c, 0xba, 0xa0, 0x97, + 0x9e, 0xc6, 0x84, 0x0f, 0x17, 0x21, 0x07, 0xee }, + .klen = 40, + .ilen = 16, + .result = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, + .rlen = 16, + }, +}; + +struct cipher_testvec anubis_cbc_enc_tv_template[] = { + { + .key = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, + .klen = 16, + .input = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, + .ilen = 32, + .result = { 0x6d, 0xc5, 0xda, 0xa2, 0x26, 0x7d, 0x62, 0x6f, + 0x08, 0xb7, 0x52, 0x8e, 0x6e, 0x6e, 0x86, 0x90, + 0x86, 0xd8, 0xb5, 0x6f, 0x98, 0x5e, 0x8a, 0x66, + 0x4f, 0x1f, 0x78, 0xa1, 0xbb, 0x37, 0xf1, 0xbe }, + .rlen = 32, + }, { + .key = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, + .klen = 40, + .input = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, + .ilen = 32, + .result = { 0xa5, 0x2c, 0x85, 0x6f, 0x9c, 0xba, 0xa0, 0x97, + 0x9e, 0xc6, 0x84, 0x0f, 0x17, 0x21, 0x07, 0xee, + 0xa2, 0xbc, 0x06, 0x98, 0xc6, 0x4b, 0xda, 0x75, + 0x2e, 0xaa, 0xbe, 0x58, 0xce, 0x01, 0x5b, 0xc7 }, + .rlen = 32, + }, +}; + +struct cipher_testvec anubis_cbc_dec_tv_template[] = { + { + .key = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, + .klen = 16, + .input = { 0x6d, 0xc5, 0xda, 0xa2, 0x26, 0x7d, 0x62, 0x6f, + 0x08, 0xb7, 0x52, 0x8e, 0x6e, 0x6e, 0x86, 0x90, + 0x86, 0xd8, 0xb5, 0x6f, 0x98, 0x5e, 0x8a, 0x66, + 0x4f, 0x1f, 0x78, 0xa1, 0xbb, 0x37, 0xf1, 0xbe }, + .ilen = 32, + .result = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, + .rlen = 32, + }, { + .key = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, + .klen = 40, + .input = { 0xa5, 0x2c, 0x85, 0x6f, 0x9c, 0xba, 0xa0, 0x97, + 0x9e, 0xc6, 0x84, 0x0f, 0x17, 0x21, 0x07, 0xee, + 0xa2, 0xbc, 0x06, 0x98, 0xc6, 0x4b, 0xda, 0x75, + 0x2e, 0xaa, 0xbe, 0x58, 0xce, 0x01, 0x5b, 0xc7 }, + .ilen = 32, + .result = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, + .rlen = 32, + }, +}; + +/* * Compression stuff. */ #define COMP_BUF_SIZE 512 diff -Nru a/drivers/Makefile b/drivers/Makefile --- a/drivers/Makefile 2004-11-10 17:19:07 -08:00 +++ b/drivers/Makefile 2004-11-10 17:19:07 -08:00 @@ -17,8 +17,9 @@ # default. obj-y += char/ -# i810fb depends on char/agp/ +# i810fb and intelfb depend on char/agp/ obj-$(CONFIG_FB_I810) += video/i810/ +obj-$(CONFIG_FB_INTEL) += video/intelfb/ # we also need input/serio early so serio bus is initialized by the time # serial drivers start registering their serio ports diff -Nru a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig --- a/drivers/acpi/Kconfig 2004-11-10 17:19:07 -08:00 +++ b/drivers/acpi/Kconfig 2004-11-10 17:19:07 -08:00 @@ -110,6 +110,21 @@ down the system. Until then, you can cat it, and see output when a button is pressed. +config ACPI_VIDEO + tristate "Video" + depends on ACPI_INTERPRETER + depends on EXPERIMENTAL + depends on !IA64_SGI_SN + default m + help + This driver implement the ACPI Extensions For Display Adapters + for integrated graphics devices on motherboard, as specified in + ACPI 2.0 Specification, Appendix B, allowing to perform some basic + control like defining the video POST device, retrieving EDID information + or to setup a video output, etc. + Note that this is an ref. implementation only. It may or may not work + for your integrated video device. + config ACPI_FAN tristate "Fan" depends on ACPI_INTERPRETER @@ -176,6 +191,20 @@ something works not quite as expected, please use the mailing list available on the above page (acpi4asus-user@lists.sourceforge.net) +config ACPI_IBM + tristate "IBM ThinkPad Laptop Extras" + depends on X86 + depends on ACPI_INTERPRETER + default m + ---help--- + This is a Linux ACPI driver for the IBM ThinkPad laptops. It adds + support for Fn-Fx key combinations, Bluetooth control, video + output switching, ThinkLight control, UltraBay eject and more. + For more information about this driver see Documentation/ibm-acpi.txt + and http://ibm-acpi.sf.net/ . + + If you have an IBM ThinkPad laptop, say Y or M here. + config ACPI_TOSHIBA tristate "Toshiba Laptop Extras" depends on X86 @@ -206,7 +235,7 @@ config ACPI_CUSTOM_DSDT bool "Include Custom DSDT" - depends on X86 && ACPI_INTERPRETER && !STANDALONE + depends on ACPI_INTERPRETER && !STANDALONE default n help Thist option is to load a custom ACPI DSDT diff -Nru a/drivers/acpi/Makefile b/drivers/acpi/Makefile --- a/drivers/acpi/Makefile 2004-11-10 17:19:06 -08:00 +++ b/drivers/acpi/Makefile 2004-11-10 17:19:06 -08:00 @@ -38,6 +38,7 @@ obj-$(CONFIG_ACPI_BUTTON) += button.o obj-$(CONFIG_ACPI_EC) += ec.o obj-$(CONFIG_ACPI_FAN) += fan.o +obj-$(CONFIG_ACPI_VIDEO) += video.o obj-$(CONFIG_ACPI_PCI) += pci_root.o pci_link.o pci_irq.o pci_bind.o obj-$(CONFIG_ACPI_POWER) += power.o obj-$(CONFIG_ACPI_PROCESSOR) += processor.o @@ -46,5 +47,6 @@ obj-$(CONFIG_ACPI_DEBUG) += debug.o obj-$(CONFIG_ACPI_NUMA) += numa.o obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o +obj-$(CONFIG_ACPI_IBM) += ibm_acpi.o obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o obj-$(CONFIG_ACPI_BUS) += scan.o motherboard.o diff -Nru a/drivers/acpi/ac.c b/drivers/acpi/ac.c --- a/drivers/acpi/ac.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/ac.c 2004-11-10 17:19:04 -08:00 @@ -117,11 +117,11 @@ ACPI_FUNCTION_TRACE("acpi_ac_seq_show"); if (!ac) - return 0; + return_VALUE(0); if (acpi_ac_get_state(ac)) { seq_puts(seq, "ERROR: Unable to read AC Adapter state\n"); - return 0; + return_VALUE(0); } seq_puts(seq, "state: "); @@ -137,7 +137,7 @@ break; } - return 0; + return_VALUE(0); } static int acpi_ac_open_fs(struct inode *inode, struct file *file) @@ -212,7 +212,7 @@ ACPI_FUNCTION_TRACE("acpi_ac_notify"); if (!ac) - return; + return_VOID; if (acpi_bus_get_device(ac->handle, &device)) return_VOID; diff -Nru a/drivers/acpi/acpi_ksyms.c b/drivers/acpi/acpi_ksyms.c --- a/drivers/acpi/acpi_ksyms.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/acpi/acpi_ksyms.c 2004-11-10 17:19:07 -08:00 @@ -102,6 +102,8 @@ EXPORT_SYMBOL(acpi_os_printf); EXPORT_SYMBOL(acpi_os_sleep); EXPORT_SYMBOL(acpi_os_stall); +EXPORT_SYMBOL(acpi_os_read_port); +EXPORT_SYMBOL(acpi_os_write_port); EXPORT_SYMBOL(acpi_os_signal); EXPORT_SYMBOL(acpi_os_queue_for_execution); EXPORT_SYMBOL(acpi_os_signal_semaphore); @@ -125,6 +127,7 @@ #ifdef CONFIG_ACPI_BUS EXPORT_SYMBOL(acpi_fadt); +EXPORT_SYMBOL(acpi_fadt_is_v1); EXPORT_SYMBOL(acpi_walk_namespace); EXPORT_SYMBOL(acpi_root_dir); EXPORT_SYMBOL(acpi_bus_get_device); diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c --- a/drivers/acpi/bus.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/acpi/bus.c 2004-11-10 17:19:05 -08:00 @@ -332,7 +332,7 @@ ACPI_FUNCTION_TRACE("acpi_bus_receive_event"); if (!event) - return -EINVAL; + return_VALUE(-EINVAL); if (list_empty(&acpi_bus_event_list)) { @@ -599,7 +599,7 @@ ACPI_FUNCTION_TRACE("acpi_early_init"); if (acpi_disabled) - return; + return_VOID; /* enable workarounds, unless strict ACPI spec. compliance */ if (!acpi_strict) @@ -652,11 +652,11 @@ goto error0; } - return; + return_VOID; error0: disable_acpi(); - return; + return_VOID; } static int __init @@ -743,7 +743,7 @@ if (acpi_disabled) { printk(KERN_INFO PREFIX "Interpreter disabled.\n"); - return -ENODEV; + return_VALUE(-ENODEV); } firmware_register(&acpi_subsys); diff -Nru a/drivers/acpi/button.c b/drivers/acpi/button.c --- a/drivers/acpi/button.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/acpi/button.c 2004-11-10 17:19:02 -08:00 @@ -116,12 +116,12 @@ ACPI_FUNCTION_TRACE("acpi_button_info_seq_show"); if (!button || !button->device) - return 0; + return_VALUE(0); seq_printf(seq, "type: %s\n", acpi_device_name(button->device)); - return 0; + return_VALUE(0); } static int acpi_button_info_open_fs(struct inode *inode, struct file *file) @@ -138,7 +138,7 @@ ACPI_FUNCTION_TRACE("acpi_button_state_seq_show"); if (!button || !button->device) - return 0; + return_VALUE(0); status = acpi_evaluate_integer(button->handle,"_LID",NULL,&state); if (ACPI_FAILURE(status)) { @@ -148,7 +148,7 @@ seq_printf(seq, "state: %s\n", (state ? "open" : "closed")); } - return 0; + return_VALUE(0); } static int acpi_button_state_open_fs(struct inode *inode, struct file *file) diff -Nru a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c --- a/drivers/acpi/dispatcher/dsmthdat.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/dispatcher/dsmthdat.c 2004-11-10 17:19:04 -08:00 @@ -312,7 +312,7 @@ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, - "obj %p op %X, ref count = %d [%s]\n", object, + "new_obj %p Opcode %X, Refs=%d [%s]\n", object, opcode, object->common.reference_count, acpi_ut_get_type_name (object->common.type))); @@ -448,7 +448,22 @@ * was referenced by the method (via the ASL) * before it was initialized. Either case is an error. */ - switch (opcode) { + + /* If slack enabled, init the local_x/arg_x to an Integer of value zero */ + + if (acpi_gbl_enable_interpreter_slack) { + object = acpi_ut_create_internal_object (ACPI_TYPE_INTEGER); + if (!object) { + return_ACPI_STATUS (AE_NO_MEMORY); + } + + object->integer.value = 0; + node->object = object; + } + + /* Otherwise, return the error */ + + else switch (opcode) { case AML_ARG_OP: ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Uninitialized Arg[%d] at node %p\n", @@ -572,7 +587,7 @@ ACPI_FUNCTION_TRACE ("ds_store_object_to_local"); - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Opcode=%d Idx=%d Obj=%p\n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Opcode=%X Index=%d Obj=%p\n", opcode, index, obj_desc)); /* Parameter validation */ diff -Nru a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c --- a/drivers/acpi/dispatcher/dsutils.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/dispatcher/dsutils.c 2004-11-10 17:19:04 -08:00 @@ -333,7 +333,7 @@ u32 i; - ACPI_FUNCTION_TRACE_PTR ("acpi_ds_clear_operands", walk_state); + ACPI_FUNCTION_TRACE_PTR ("ds_clear_operands", walk_state); /* diff -Nru a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c --- a/drivers/acpi/dispatcher/dswexec.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/acpi/dispatcher/dswexec.c 2004-11-10 17:19:07 -08:00 @@ -60,17 +60,18 @@ * Dispatch table for opcode classes */ static ACPI_EXECUTE_OP acpi_gbl_op_type_dispatch [] = { - acpi_ex_opcode_1A_0T_0R, - acpi_ex_opcode_1A_0T_1R, - acpi_ex_opcode_1A_1T_0R, - acpi_ex_opcode_1A_1T_1R, - acpi_ex_opcode_2A_0T_0R, - acpi_ex_opcode_2A_0T_1R, - acpi_ex_opcode_2A_1T_1R, - acpi_ex_opcode_2A_2T_1R, - acpi_ex_opcode_3A_0T_0R, - acpi_ex_opcode_3A_1T_1R, - acpi_ex_opcode_6A_0T_1R}; + acpi_ex_opcode_0A_0T_1R, + acpi_ex_opcode_1A_0T_0R, + acpi_ex_opcode_1A_0T_1R, + acpi_ex_opcode_1A_1T_0R, + acpi_ex_opcode_1A_1T_1R, + acpi_ex_opcode_2A_0T_0R, + acpi_ex_opcode_2A_0T_1R, + acpi_ex_opcode_2A_1T_1R, + acpi_ex_opcode_2A_2T_1R, + acpi_ex_opcode_3A_0T_0R, + acpi_ex_opcode_3A_1T_1R, + acpi_ex_opcode_6A_0T_1R}; /***************************************************************************** * @@ -413,7 +414,7 @@ * routine. There is one routine per opcode "type" based upon the * number of opcode arguments and return type. */ - status = acpi_gbl_op_type_dispatch [op_type] (walk_state); + status = acpi_gbl_op_type_dispatch[op_type] (walk_state); } else { /* @@ -425,7 +426,9 @@ (walk_state->operands[0]->common.type == ACPI_TYPE_LOCAL_REFERENCE) && (walk_state->operands[1]->common.type == ACPI_TYPE_LOCAL_REFERENCE) && (walk_state->operands[0]->reference.opcode == - walk_state->operands[1]->reference.opcode)) { + walk_state->operands[1]->reference.opcode) && + (walk_state->operands[0]->reference.offset == + walk_state->operands[1]->reference.offset)) { status = AE_OK; } else { @@ -639,7 +642,8 @@ * conditional predicate */ - if ((walk_state->control_state) && + if ((ACPI_SUCCESS (status)) && + (walk_state->control_state) && (walk_state->control_state->common.state == ACPI_CONTROL_PREDICATE_EXECUTING) && (walk_state->control_state->control.predicate_op == op)) { @@ -649,6 +653,19 @@ cleanup: + + /* Invoke exception handler on error */ + + if (ACPI_FAILURE (status) && + acpi_gbl_exception_handler && + !(status & AE_CODE_CONTROL)) { + acpi_ex_exit_interpreter (); + status = acpi_gbl_exception_handler (status, + walk_state->method_node->name.integer, walk_state->opcode, + walk_state->aml_offset, NULL); + acpi_ex_enter_interpreter (); + } + if (walk_state->result_obj) { /* Break to debugger to display result */ diff -Nru a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c --- a/drivers/acpi/dispatcher/dswload.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/acpi/dispatcher/dswload.c 2004-11-10 17:19:02 -08:00 @@ -182,18 +182,20 @@ */ status = acpi_ns_lookup (walk_state->scope_info, path, object_type, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, walk_state, &(node)); - if (ACPI_FAILURE (status)) { #ifdef _ACPI_ASL_COMPILER - if (status == AE_NOT_FOUND) { - acpi_dm_add_to_external_list (path); - status = AE_OK; - } - else { - ACPI_REPORT_NSERROR (path, status); - } -#else - ACPI_REPORT_NSERROR (path, status); + if (status == AE_NOT_FOUND) { + /* + * Table disassembly: + * Target of Scope() not found. Generate an External for it, and + * insert the name into the namespace. + */ + acpi_dm_add_to_external_list (path); + status = acpi_ns_lookup (walk_state->scope_info, path, object_type, + ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT, walk_state, &(node)); + } #endif + if (ACPI_FAILURE (status)) { + ACPI_REPORT_NSERROR (path, status); return (status); } diff -Nru a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c --- a/drivers/acpi/dispatcher/dswstate.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/acpi/dispatcher/dswstate.c 2004-11-10 17:19:06 -08:00 @@ -867,6 +867,7 @@ status = acpi_ds_result_stack_push (walk_state); if (ACPI_FAILURE (status)) { + acpi_ut_release_to_cache (ACPI_MEM_LIST_WALK, walk_state); return_PTR (NULL); } diff -Nru a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c --- a/drivers/acpi/events/evgpe.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/acpi/events/evgpe.c 2004-11-10 17:19:07 -08:00 @@ -434,13 +434,8 @@ } ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, - "GPE pair: Status %8.8X%8.8X = %02X, Enable %8.8X%8.8X = %02X\n", - ACPI_FORMAT_UINT64 ( - gpe_register_info->status_address.address), - status_reg, - ACPI_FORMAT_UINT64 ( - gpe_register_info->enable_address.address), - enable_reg)); + "Read GPE Register at GPE%X: Status=%02X, Enable=%02X\n", + gpe_register_info->base_gpe_number, status_reg, enable_reg)); /* First check if there is anything active at all in this register */ diff -Nru a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c --- a/drivers/acpi/events/evgpeblk.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/events/evgpeblk.c 2004-11-10 17:19:04 -08:00 @@ -970,15 +970,13 @@ /* Dump info about this GPE block */ ACPI_DEBUG_PRINT ((ACPI_DB_INIT, - "GPE %02X to %02X [%4.4s] %u regs at %8.8X%8.8X on int 0x%X\n", + "GPE %02X to %02X [%4.4s] %u regs on int 0x%X\n", (u32) gpe_block->block_base_number, (u32) (gpe_block->block_base_number + ((gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) -1)), gpe_device->name.ascii, gpe_block->register_count, - ACPI_FORMAT_UINT64 (gpe_block->block_address.address), interrupt_level)); - /* Enable all valid GPEs found above */ diff -Nru a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c --- a/drivers/acpi/events/evxface.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/acpi/events/evxface.c 2004-11-10 17:19:05 -08:00 @@ -53,6 +53,51 @@ /******************************************************************************* * + * FUNCTION: acpi_install_exception_handler + * + * PARAMETERS: Handler - Pointer to the handler function for the + * event + * + * RETURN: Status + * + * DESCRIPTION: Saves the pointer to the handler function + * + ******************************************************************************/ + +acpi_status +acpi_install_exception_handler ( + acpi_exception_handler handler) +{ + acpi_status status; + + + ACPI_FUNCTION_TRACE ("acpi_install_exception_handler"); + + + status = acpi_ut_acquire_mutex (ACPI_MTX_EVENTS); + if (ACPI_FAILURE (status)) { + return_ACPI_STATUS (status); + } + + /* Don't allow two handlers. */ + + if (acpi_gbl_exception_handler) { + status = AE_ALREADY_EXISTS; + goto cleanup; + } + + /* Install the handler */ + + acpi_gbl_exception_handler = handler; + +cleanup: + (void) acpi_ut_release_mutex (ACPI_MTX_EVENTS); + return_ACPI_STATUS (status); +} + + +/******************************************************************************* + * * FUNCTION: acpi_install_fixed_event_handler * * PARAMETERS: Event - Event type to enable. diff -Nru a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c --- a/drivers/acpi/executer/exconvrt.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/acpi/executer/exconvrt.c 2004-11-10 17:19:02 -08:00 @@ -58,7 +58,7 @@ * PARAMETERS: obj_desc - Object to be converted. Must be an * Integer, Buffer, or String * result_desc - Where the new Integer object is returned - * walk_state - Current method state + * Flags - Used for string conversion * * RETURN: Status * @@ -70,13 +70,13 @@ acpi_ex_convert_to_integer ( union acpi_operand_object *obj_desc, union acpi_operand_object **result_desc, - struct acpi_walk_state *walk_state) + u32 flags) { - u32 i; - union acpi_operand_object *ret_desc; - u32 count; + union acpi_operand_object *return_desc; u8 *pointer; acpi_integer result; + u32 i; + u32 count; acpi_status status; @@ -85,15 +85,17 @@ switch (ACPI_GET_OBJECT_TYPE (obj_desc)) { case ACPI_TYPE_INTEGER: + + /* No conversion necessary */ + *result_desc = obj_desc; return_ACPI_STATUS (AE_OK); + case ACPI_TYPE_BUFFER: case ACPI_TYPE_STRING: - pointer = (u8 *) obj_desc->string.pointer; - count = obj_desc->string.length; - break; - case ACPI_TYPE_BUFFER: + /* Note: Takes advantage of common buffer/string fields */ + pointer = obj_desc->buffer.pointer; count = obj_desc->buffer.length; break; @@ -126,10 +128,12 @@ case ACPI_TYPE_STRING: /* - * Convert string to an integer - * String must be hexadecimal as per the ACPI specification + * Convert string to an integer - for most cases, the string must be + * hexadecimal as per the ACPI specification. The only exception (as + * of ACPI 3.0) is that the to_integer() operator allows both decimal + * and hexadecimal strings (hex prefixed with "0x"). */ - status = acpi_ut_strtoul64 ((char *) pointer, 16, &result); + status = acpi_ut_strtoul64 ((char *) pointer, flags, &result); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } @@ -139,8 +143,8 @@ case ACPI_TYPE_BUFFER: /* - * Buffer conversion - we simply grab enough raw data from the - * buffer to fill an integer + * Convert buffer to an integer - we simply grab enough raw data + * from the buffer to fill an integer */ for (i = 0; i < count; i++) { /* @@ -161,27 +165,15 @@ /* * Create a new integer */ - ret_desc = acpi_ut_create_internal_object (ACPI_TYPE_INTEGER); - if (!ret_desc) { + return_desc = acpi_ut_create_internal_object (ACPI_TYPE_INTEGER); + if (!return_desc) { return_ACPI_STATUS (AE_NO_MEMORY); } /* Save the Result */ - ret_desc->integer.value = result; - - /* - * If we are about to overwrite the original object on the operand stack, - * we must remove a reference on the original object because we are - * essentially removing it from the stack. - */ - if (*result_desc == obj_desc) { - if (walk_state->opcode != AML_STORE_OP) { - acpi_ut_remove_reference (obj_desc); - } - } - - *result_desc = ret_desc; + return_desc->integer.value = result; + *result_desc = return_desc; return_ACPI_STATUS (AE_OK); } @@ -193,7 +185,6 @@ * PARAMETERS: obj_desc - Object to be converted. Must be an * Integer, Buffer, or String * result_desc - Where the new buffer object is returned - * walk_state - Current method state * * RETURN: Status * @@ -204,11 +195,9 @@ acpi_status acpi_ex_convert_to_buffer ( union acpi_operand_object *obj_desc, - union acpi_operand_object **result_desc, - struct acpi_walk_state *walk_state) + union acpi_operand_object **result_desc) { - union acpi_operand_object *ret_desc; - u32 i; + union acpi_operand_object *return_desc; u8 *new_buf; @@ -230,17 +219,17 @@ * Create a new Buffer object. * Need enough space for one integer */ - ret_desc = acpi_ut_create_buffer_object (acpi_gbl_integer_byte_width); - if (!ret_desc) { + return_desc = acpi_ut_create_buffer_object (acpi_gbl_integer_byte_width); + if (!return_desc) { return_ACPI_STATUS (AE_NO_MEMORY); } - /* Copy the integer to the buffer */ + /* Copy the integer to the buffer, LSB first */ - new_buf = ret_desc->buffer.pointer; - for (i = 0; i < acpi_gbl_integer_byte_width; i++) { - new_buf[i] = (u8) (obj_desc->integer.value >> (i * 8)); - } + new_buf = return_desc->buffer.pointer; + ACPI_MEMCPY (new_buf, + &obj_desc->integer.value, + acpi_gbl_integer_byte_width); break; @@ -250,14 +239,14 @@ * Create a new Buffer object * Size will be the string length */ - ret_desc = acpi_ut_create_buffer_object ((acpi_size) obj_desc->string.length); - if (!ret_desc) { + return_desc = acpi_ut_create_buffer_object ((acpi_size) obj_desc->string.length); + if (!return_desc) { return_ACPI_STATUS (AE_NO_MEMORY); } /* Copy the string to the buffer */ - new_buf = ret_desc->buffer.pointer; + new_buf = return_desc->buffer.pointer; ACPI_STRNCPY ((char *) new_buf, (char *) obj_desc->string.pointer, obj_desc->string.length); break; @@ -269,32 +258,20 @@ /* Mark buffer initialized */ - ret_desc->common.flags |= AOPOBJ_DATA_VALID; - - /* - * If we are about to overwrite the original object on the operand stack, - * we must remove a reference on the original object because we are - * essentially removing it from the stack. - */ - if (*result_desc == obj_desc) { - if (walk_state->opcode != AML_STORE_OP) { - acpi_ut_remove_reference (obj_desc); - } - } - - *result_desc = ret_desc; + return_desc->common.flags |= AOPOBJ_DATA_VALID; + *result_desc = return_desc; return_ACPI_STATUS (AE_OK); } /******************************************************************************* * - * FUNCTION: acpi_ex_convert_ascii + * FUNCTION: acpi_ex_convert_to_ascii * * PARAMETERS: Integer - Value to be converted - * Base - 10 or 16 + * Base - ACPI_STRING_DECIMAL or ACPI_STRING_HEX * String - Where the string is returned - * data_width - Size of data item to be converted + * data_width - Size of data item to be converted, in bytes * * RETURN: Actual string length * @@ -305,79 +282,81 @@ u32 acpi_ex_convert_to_ascii ( acpi_integer integer, - u32 base, + u16 base, u8 *string, u8 data_width) { - u32 i; - u32 j; - u32 k = 0; - char hex_digit; acpi_integer digit; + acpi_native_uint i; + acpi_native_uint j; + acpi_native_uint k = 0; + acpi_native_uint hex_length; + acpi_native_uint decimal_length; u32 remainder; - u32 length; - u8 leading_zero; + u8 supress_zeros; ACPI_FUNCTION_ENTRY (); - if (data_width < sizeof (acpi_integer)) { - leading_zero = FALSE; - length = data_width; - } - else { - leading_zero = TRUE; - length = sizeof (acpi_integer); - } - switch (base) { case 10: + /* Setup max length for the decimal number */ + + switch (data_width) { + case 1: + decimal_length = ACPI_MAX8_DECIMAL_DIGITS; + break; + + case 4: + decimal_length = ACPI_MAX32_DECIMAL_DIGITS; + break; + + case 8: + default: + decimal_length = ACPI_MAX64_DECIMAL_DIGITS; + break; + } + + supress_zeros = TRUE; /* No leading zeros */ remainder = 0; - for (i = ACPI_MAX_DECIMAL_DIGITS; i > 0; i--) { + + for (i = decimal_length; i > 0; i--) { /* Divide by nth factor of 10 */ digit = integer; for (j = 0; j < i; j++) { - (void) acpi_ut_short_divide (&digit, 10, &digit, &remainder); + (void) acpi_ut_short_divide (digit, 10, &digit, &remainder); } - /* Create the decimal digit */ + /* Handle leading zeros */ if (remainder != 0) { - leading_zero = FALSE; + supress_zeros = FALSE; } - if (!leading_zero) { + if (!supress_zeros) { string[k] = (u8) (ACPI_ASCII_ZERO + remainder); k++; } } break; - case 16: - /* Copy the integer to the buffer */ + hex_length = ACPI_MUL_2 (data_width); /* 2 ascii hex chars per data byte */ - for (i = 0, j = ((length * 2) -1); i < (length * 2); i++, j--) { + for (i = 0, j = (hex_length-1); i < hex_length; i++, j--) { + /* Get one hex digit, most significant digits first */ - hex_digit = acpi_ut_hex_to_ascii_char (integer, (j * 4)); - if (hex_digit != ACPI_ASCII_ZERO) { - leading_zero = FALSE; - } - - if (!leading_zero) { - string[k] = (u8) hex_digit; - k++; - } + string[k] = (u8) acpi_ut_hex_to_ascii_char (integer, ACPI_MUL_4 (j)); + k++; } break; - default: - break; + return (0); } /* @@ -392,7 +371,7 @@ } string [k] = 0; - return (k); + return ((u32) k); } @@ -401,11 +380,9 @@ * FUNCTION: acpi_ex_convert_to_string * * PARAMETERS: obj_desc - Object to be converted. Must be an - * Integer, Buffer, or String + * Integer, Buffer, or String * result_desc - Where the string object is returned - * Base - 10 or 16 - * max_length - Max length of the returned string - * walk_state - Current method state + * Type - String flags (base and conversion type) * * RETURN: Status * @@ -417,15 +394,14 @@ acpi_ex_convert_to_string ( union acpi_operand_object *obj_desc, union acpi_operand_object **result_desc, - u32 base, - u32 max_length, - struct acpi_walk_state *walk_state) + u32 type) { - union acpi_operand_object *ret_desc; + union acpi_operand_object *return_desc; u8 *new_buf; - u8 *pointer; - u32 string_length; + u32 string_length = 0; + u16 base = 16; u32 i; + u8 separator = ','; ACPI_FUNCTION_TRACE_PTR ("ex_convert_to_string", obj_desc); @@ -434,130 +410,129 @@ switch (ACPI_GET_OBJECT_TYPE (obj_desc)) { case ACPI_TYPE_STRING: - if (max_length >= obj_desc->string.length) { - *result_desc = obj_desc; - return_ACPI_STATUS (AE_OK); - } - else { - /* Must copy the string first and then truncate it */ + /* No conversion necessary */ - return_ACPI_STATUS (AE_NOT_IMPLEMENTED); - } + *result_desc = obj_desc; + return_ACPI_STATUS (AE_OK); case ACPI_TYPE_INTEGER: - string_length = acpi_gbl_integer_byte_width * 2; - if (base == 10) { + switch (type) { + case ACPI_EXPLICIT_CONVERT_DECIMAL: + + /* Make room for maximum decimal number */ + string_length = ACPI_MAX_DECIMAL_DIGITS; + base = 10; + break; + + default: + + /* Two hex string characters for each integer byte */ + + string_length = ACPI_MUL_2 (acpi_gbl_integer_byte_width); + break; } /* * Create a new String + * Need enough space for one ASCII integer (plus null terminator) */ - ret_desc = acpi_ut_create_internal_object (ACPI_TYPE_STRING); - if (!ret_desc) { + return_desc = acpi_ut_create_string_object ((acpi_size) string_length); + if (!return_desc) { return_ACPI_STATUS (AE_NO_MEMORY); } - /* Need enough space for one ASCII integer plus null terminator */ + new_buf = return_desc->buffer.pointer; - new_buf = ACPI_MEM_CALLOCATE ((acpi_size) string_length + 1); - if (!new_buf) { - ACPI_REPORT_ERROR - (("ex_convert_to_string: Buffer allocation failure\n")); - acpi_ut_remove_reference (ret_desc); - return_ACPI_STATUS (AE_NO_MEMORY); - } + /* Convert integer to string */ - /* Convert */ - - i = acpi_ex_convert_to_ascii (obj_desc->integer.value, base, new_buf, sizeof (acpi_integer)); + string_length = acpi_ex_convert_to_ascii (obj_desc->integer.value, base, + new_buf, acpi_gbl_integer_byte_width); /* Null terminate at the correct place */ - if (max_length < i) { - new_buf[max_length] = 0; - ret_desc->string.length = max_length; - } - else { - new_buf [i] = 0; - ret_desc->string.length = i; - } - - ret_desc->buffer.pointer = new_buf; + return_desc->string.length = string_length; + new_buf [string_length] = 0; break; case ACPI_TYPE_BUFFER: - /* Find the string length */ + switch (type) { + case ACPI_EXPLICIT_CONVERT_DECIMAL: /* Used by to_decimal_string operator */ + /* + * From ACPI: "If Data is a buffer, it is converted to a string of + * decimal values separated by commas." + */ + base = 10; + string_length = obj_desc->buffer.length; /* 4 chars for each decimal */ - pointer = obj_desc->buffer.pointer; - for (string_length = 0; string_length < obj_desc->buffer.length; string_length++) { - /* Exit on null terminator */ + /*lint -fallthrough */ - if (!pointer[string_length]) { - break; + case ACPI_IMPLICIT_CONVERT_HEX: + /* + * From the ACPI spec: + *"The entire contents of the buffer are converted to a string of + * two-character hexadecimal numbers, each separated by a space." + */ + if (type == ACPI_IMPLICIT_CONVERT_HEX) { + separator = ' '; } - } - if (max_length > ACPI_MAX_STRING_CONVERSION) { - if (string_length > ACPI_MAX_STRING_CONVERSION) { + /*lint -fallthrough */ + + case ACPI_EXPLICIT_CONVERT_HEX: /* Used by to_hex_string operator */ + /* + * From ACPI: "If Data is a buffer, it is converted to a string of + * hexadecimal values separated by commas." + */ + string_length += (obj_desc->buffer.length * 3); + if (string_length > ACPI_MAX_STRING_CONVERSION) /* ACPI limit */ { return_ACPI_STATUS (AE_AML_STRING_LIMIT); } - } - /* - * Create a new string object - */ - ret_desc = acpi_ut_create_internal_object (ACPI_TYPE_STRING); - if (!ret_desc) { - return_ACPI_STATUS (AE_NO_MEMORY); - } + /* Create a new string object and string buffer */ - /* String length is the lesser of the Max or the actual length */ + return_desc = acpi_ut_create_string_object ((acpi_size) string_length -1); + if (!return_desc) { + return_ACPI_STATUS (AE_NO_MEMORY); + } - if (max_length < string_length) { - string_length = max_length; - } + new_buf = return_desc->buffer.pointer; - new_buf = ACPI_MEM_CALLOCATE ((acpi_size) string_length + 1); - if (!new_buf) { - ACPI_REPORT_ERROR - (("ex_convert_to_string: Buffer allocation failure\n")); - acpi_ut_remove_reference (ret_desc); - return_ACPI_STATUS (AE_NO_MEMORY); - } + /* + * Convert buffer bytes to hex or decimal values + * (separated by commas) + */ + for (i = 0; i < obj_desc->buffer.length; i++) { + new_buf += acpi_ex_convert_to_ascii ( + (acpi_integer) obj_desc->buffer.pointer[i], base, + new_buf, 1); + *new_buf++ = separator; /* each separated by a comma or space */ + } - /* Copy the appropriate number of buffer characters */ + /* Null terminate the string (overwrites final comma from above) */ - ACPI_MEMCPY (new_buf, pointer, string_length); + new_buf--; + *new_buf = 0; - /* Null terminate */ + /* Recalculate length */ - new_buf [string_length] = 0; - ret_desc->buffer.pointer = new_buf; - ret_desc->string.length = string_length; - break; + return_desc->string.length = ACPI_STRLEN (return_desc->string.pointer); + break; + default: + return_ACPI_STATUS (AE_BAD_PARAMETER); + } + break; default: return_ACPI_STATUS (AE_TYPE); } - /* - * If we are about to overwrite the original object on the operand stack, - * we must remove a reference on the original object because we are - * essentially removing it from the stack. - */ - if (*result_desc == obj_desc) { - if (walk_state->opcode != AML_STORE_OP) { - acpi_ut_remove_reference (obj_desc); - } - } - - *result_desc = ret_desc; + *result_desc = return_desc; return_ACPI_STATUS (AE_OK); } @@ -635,7 +610,8 @@ * These types require an Integer operand. We can convert * a Buffer or a String to an Integer if necessary. */ - status = acpi_ex_convert_to_integer (source_desc, result_desc, walk_state); + status = acpi_ex_convert_to_integer (source_desc, result_desc, + 16); break; @@ -645,7 +621,8 @@ * The operand must be a String. We can convert an * Integer or Buffer if necessary */ - status = acpi_ex_convert_to_string (source_desc, result_desc, 16, ACPI_UINT32_MAX, walk_state); + status = acpi_ex_convert_to_string (source_desc, result_desc, + ACPI_IMPLICIT_CONVERT_HEX); break; @@ -655,7 +632,7 @@ * The operand must be a Buffer. We can convert an * Integer or String if necessary */ - status = acpi_ex_convert_to_buffer (source_desc, result_desc, walk_state); + status = acpi_ex_convert_to_buffer (source_desc, result_desc); break; diff -Nru a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c --- a/drivers/acpi/executer/exdump.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/acpi/executer/exdump.c 2004-11-10 17:19:02 -08:00 @@ -55,7 +55,6 @@ /* * The following routines are used for debug output only */ - #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) /***************************************************************************** @@ -64,7 +63,7 @@ * * PARAMETERS: *obj_desc - Pointer to entry to be dumped * - * RETURN: Status + * RETURN: None * * DESCRIPTION: Dump an operand object * @@ -72,12 +71,11 @@ void acpi_ex_dump_operand ( - union acpi_operand_object *obj_desc) + union acpi_operand_object *obj_desc, + u32 depth) { - u8 *buf = NULL; u32 length; - union acpi_operand_object **element; - u16 element_index; + u32 index; ACPI_FUNCTION_NAME ("ex_dump_operand") @@ -89,9 +87,9 @@ if (!obj_desc) { /* - * This usually indicates that something serious is wrong + * This could be a null element of a package */ - acpi_os_printf ("Null Object Descriptor\n"); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n")); return; } @@ -103,15 +101,19 @@ if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) { ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, - "%p is not a node or operand object: [%s]\n", - obj_desc, acpi_ut_get_descriptor_name (obj_desc))); + "%p is not a node or operand object: [%s]\n", + obj_desc, acpi_ut_get_descriptor_name (obj_desc))); ACPI_DUMP_BUFFER (obj_desc, sizeof (union acpi_operand_object)); return; } /* obj_desc is a valid object */ - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", obj_desc)); + if (depth > 0) { + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, "%*s[%u] ", depth, " ", depth)); + } + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, "%p ", obj_desc)); + switch (ACPI_GET_OBJECT_TYPE (obj_desc)) { case ACPI_TYPE_LOCAL_REFERENCE: @@ -125,8 +127,8 @@ case AML_NAME_OP: - ACPI_DUMP_PATHNAME (obj_desc->reference.object, "Reference: Name: ", - ACPI_LV_INFO, _COMPONENT); + ACPI_DUMP_PATHNAME (obj_desc->reference.object, + "Reference: Name: ", ACPI_LV_INFO, _COMPONENT); ACPI_DUMP_ENTRY (obj_desc->reference.object, ACPI_LV_INFO); break; @@ -134,27 +136,27 @@ case AML_INDEX_OP: acpi_os_printf ("Reference: Index %p\n", - obj_desc->reference.object); + obj_desc->reference.object); break; case AML_REF_OF_OP: acpi_os_printf ("Reference: (ref_of) %p\n", - obj_desc->reference.object); + obj_desc->reference.object); break; case AML_ARG_OP: acpi_os_printf ("Reference: Arg%d", - obj_desc->reference.offset); + obj_desc->reference.offset); if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) { /* Value is an Integer */ acpi_os_printf (" value is [%8.8X%8.8x]", - ACPI_FORMAT_UINT64 (obj_desc->integer.value)); + ACPI_FORMAT_UINT64 (obj_desc->integer.value)); } acpi_os_printf ("\n"); @@ -164,14 +166,14 @@ case AML_LOCAL_OP: acpi_os_printf ("Reference: Local%d", - obj_desc->reference.offset); + obj_desc->reference.offset); if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) { /* Value is an Integer */ acpi_os_printf (" value is [%8.8X%8.8x]", - ACPI_FORMAT_UINT64 (obj_desc->integer.value)); + ACPI_FORMAT_UINT64 (obj_desc->integer.value)); } acpi_os_printf ("\n"); @@ -181,7 +183,7 @@ case AML_INT_NAMEPATH_OP: acpi_os_printf ("Reference.Node->Name %X\n", - obj_desc->reference.node->name.integer); + obj_desc->reference.node->name.integer); break; @@ -194,18 +196,15 @@ break; } - break; case ACPI_TYPE_BUFFER: acpi_os_printf ("Buffer len %X @ %p \n", - obj_desc->buffer.length, - obj_desc->buffer.pointer); + obj_desc->buffer.length, obj_desc->buffer.pointer); length = obj_desc->buffer.length; - if (length > 64) { length = 64; } @@ -215,41 +214,37 @@ if (obj_desc->buffer.pointer) { acpi_os_printf ("Buffer Contents: "); - for (buf = obj_desc->buffer.pointer; length--; ++buf) { - acpi_os_printf (" %02x", *buf); + for (index = 0; index < length; index++) { + acpi_os_printf (" %02x", obj_desc->buffer.pointer[index]); } acpi_os_printf ("\n"); } - break; case ACPI_TYPE_INTEGER: acpi_os_printf ("Integer %8.8X%8.8X\n", - ACPI_FORMAT_UINT64 (obj_desc->integer.value)); + ACPI_FORMAT_UINT64 (obj_desc->integer.value)); break; case ACPI_TYPE_PACKAGE: - acpi_os_printf ("Package count %X @ %p\n", - obj_desc->package.count, obj_desc->package.elements); + acpi_os_printf ("Package [Len %X] element_array %p\n", + obj_desc->package.count, obj_desc->package.elements); /* - * If elements exist, package vector pointer is valid, + * If elements exist, package element pointer is valid, * and debug_level exceeds 1, dump package's elements. */ if (obj_desc->package.count && obj_desc->package.elements && acpi_dbg_level > 1) { - for (element_index = 0, element = obj_desc->package.elements; - element_index < obj_desc->package.count; - ++element_index, ++element) { - acpi_ex_dump_operand (*element); + for (index = 0; index < obj_desc->package.count; index++) { + acpi_ex_dump_operand (obj_desc->package.elements[index], depth+1); } } - acpi_os_printf ("\n"); break; @@ -277,7 +272,7 @@ case ACPI_TYPE_STRING: acpi_os_printf ("String length %X @ %p ", - obj_desc->string.length, obj_desc->string.pointer); + obj_desc->string.length, obj_desc->string.pointer); acpi_ut_print_string (obj_desc->string.pointer, ACPI_UINT8_MAX); acpi_os_printf ("\n"); break; @@ -297,7 +292,7 @@ obj_desc->field.field_flags & AML_FIELD_LOCK_RULE_MASK, obj_desc->field.field_flags & AML_FIELD_UPDATE_RULE_MASK, obj_desc->field.base_byte_offset, obj_desc->field.start_field_bit_offset); - ACPI_DUMP_STACK_ENTRY (obj_desc->field.region_obj); + acpi_ex_dump_operand (obj_desc->field.region_obj, depth+1); break; @@ -321,9 +316,8 @@ acpi_os_printf ("*not a Buffer* \n"); } else { - ACPI_DUMP_STACK_ENTRY (obj_desc->buffer_field.buffer_obj); + acpi_ex_dump_operand (obj_desc->buffer_field.buffer_obj, depth+1); } - break; @@ -387,10 +381,13 @@ * * FUNCTION: acpi_ex_dump_operands * - * PARAMETERS: interpreter_mode - Load or Exec - * *Ident - Identification + * PARAMETERS: Operands - Operand list + * interpreter_mode - Load or Exec + * Ident - Identification * num_levels - # of stack entries to dump above line - * *Note - Output notation + * Note - Output notation + * module_name - Caller's module name + * line_number - Caller's invocation line number * * DESCRIPTION: Dump the object stack * @@ -407,7 +404,6 @@ u32 line_number) { acpi_native_uint i; - union acpi_operand_object **obj_desc; ACPI_FUNCTION_NAME ("ex_dump_operands"); @@ -432,8 +428,7 @@ /* Dump the operand stack starting at the top */ for (i = 0; num_levels > 0; i--, num_levels--) { - obj_desc = &operands[i]; - acpi_ex_dump_operand (*obj_desc); + acpi_ex_dump_operand (operands[i], 0); } ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, @@ -489,8 +484,7 @@ #if ACPI_MACHINE_WIDTH == 16 acpi_os_printf ("%20s : %p\n", title, value); #else - acpi_os_printf ("%20s : %8.8X%8.8X\n", title, - ACPI_FORMAT_UINT64 (value)); + acpi_os_printf ("%20s : %8.8X%8.8X\n", title, ACPI_FORMAT_UINT64 (value)); #endif } @@ -499,7 +493,7 @@ * * FUNCTION: acpi_ex_dump_node * - * PARAMETERS: *Node - Descriptor to dump + * PARAMETERS: *Node - Descriptor to dump * Flags - Force display * * DESCRIPTION: Dumps the members of the given.Node @@ -563,22 +557,25 @@ if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) { acpi_ex_dump_node ((struct acpi_namespace_node *) obj_desc, flags); - acpi_os_printf ("\nAttached Object (%p):\n", ((struct acpi_namespace_node *) obj_desc)->object); - acpi_ex_dump_object_descriptor (((struct acpi_namespace_node *) obj_desc)->object, flags); - return; + acpi_os_printf ("\nAttached Object (%p):\n", + ((struct acpi_namespace_node *) obj_desc)->object); + acpi_ex_dump_object_descriptor ( + ((struct acpi_namespace_node *) obj_desc)->object, flags); + return_VOID; } if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) { - acpi_os_printf ("ex_dump_object_descriptor: %p is not an ACPI operand object: [%s]\n", - obj_desc, acpi_ut_get_descriptor_name (obj_desc)); + acpi_os_printf ( + "ex_dump_object_descriptor: %p is not an ACPI operand object: [%s]\n", + obj_desc, acpi_ut_get_descriptor_name (obj_desc)); return_VOID; } /* Common Fields */ - acpi_ex_out_string ("Type", acpi_ut_get_object_type_name (obj_desc)); + acpi_ex_out_string ("Type", acpi_ut_get_object_type_name (obj_desc)); acpi_ex_out_integer ("Reference Count", obj_desc->common.reference_count); - acpi_ex_out_integer ("Flags", obj_desc->common.flags); + acpi_ex_out_integer ("Flags", obj_desc->common.flags); /* Object-specific Fields */ @@ -592,7 +589,7 @@ case ACPI_TYPE_STRING: - acpi_ex_out_integer ("Length", obj_desc->string.length); + acpi_ex_out_integer ("Length", obj_desc->string.length); acpi_os_printf ("%20s : %p ", "Pointer", obj_desc->string.pointer); acpi_ut_print_string (obj_desc->string.pointer, ACPI_UINT8_MAX); @@ -602,17 +599,17 @@ case ACPI_TYPE_BUFFER: - acpi_ex_out_integer ("Length", obj_desc->buffer.length); - acpi_ex_out_pointer ("Pointer", obj_desc->buffer.pointer); + acpi_ex_out_integer ("Length", obj_desc->buffer.length); + acpi_ex_out_pointer ("Pointer", obj_desc->buffer.pointer); ACPI_DUMP_BUFFER (obj_desc->buffer.pointer, obj_desc->buffer.length); break; case ACPI_TYPE_PACKAGE: - acpi_ex_out_integer ("Flags", obj_desc->package.flags); - acpi_ex_out_integer ("Count", obj_desc->package.count); - acpi_ex_out_pointer ("Elements", obj_desc->package.elements); + acpi_ex_out_integer ("Flags", obj_desc->package.flags); + acpi_ex_out_integer ("Count", obj_desc->package.count); + acpi_ex_out_pointer ("Elements", obj_desc->package.elements); /* Dump the package contents */ @@ -621,7 +618,8 @@ for (i = 0; i < obj_desc->package.count; i++) { acpi_os_printf ("[%.3d] %p", i, obj_desc->package.elements[i]); if (obj_desc->package.elements[i]) { - acpi_os_printf (" %s", acpi_ut_get_object_type_name (obj_desc->package.elements[i])); + acpi_os_printf (" %s", + acpi_ut_get_object_type_name (obj_desc->package.elements[i])); } acpi_os_printf ("\n"); } @@ -639,38 +637,38 @@ case ACPI_TYPE_EVENT: - acpi_ex_out_pointer ("Semaphore", obj_desc->event.semaphore); + acpi_ex_out_pointer ("Semaphore", obj_desc->event.semaphore); break; case ACPI_TYPE_METHOD: - acpi_ex_out_integer ("param_count", obj_desc->method.param_count); - acpi_ex_out_integer ("Concurrency", obj_desc->method.concurrency); - acpi_ex_out_pointer ("Semaphore", obj_desc->method.semaphore); - acpi_ex_out_integer ("owning_id", obj_desc->method.owning_id); - acpi_ex_out_integer ("aml_length", obj_desc->method.aml_length); - acpi_ex_out_pointer ("aml_start", obj_desc->method.aml_start); + acpi_ex_out_integer ("param_count", obj_desc->method.param_count); + acpi_ex_out_integer ("Concurrency", obj_desc->method.concurrency); + acpi_ex_out_pointer ("Semaphore", obj_desc->method.semaphore); + acpi_ex_out_integer ("owning_id", obj_desc->method.owning_id); + acpi_ex_out_integer ("aml_length", obj_desc->method.aml_length); + acpi_ex_out_pointer ("aml_start", obj_desc->method.aml_start); break; case ACPI_TYPE_MUTEX: - acpi_ex_out_integer ("sync_level", obj_desc->mutex.sync_level); + acpi_ex_out_integer ("sync_level", obj_desc->mutex.sync_level); acpi_ex_out_pointer ("owner_thread", obj_desc->mutex.owner_thread); - acpi_ex_out_integer ("acquisition_depth",obj_desc->mutex.acquisition_depth); - acpi_ex_out_pointer ("Semaphore", obj_desc->mutex.semaphore); + acpi_ex_out_integer ("acquire_depth", obj_desc->mutex.acquisition_depth); + acpi_ex_out_pointer ("Semaphore", obj_desc->mutex.semaphore); break; case ACPI_TYPE_REGION: - acpi_ex_out_integer ("space_id", obj_desc->region.space_id); - acpi_ex_out_integer ("Flags", obj_desc->region.flags); - acpi_ex_out_address ("Address", obj_desc->region.address); - acpi_ex_out_integer ("Length", obj_desc->region.length); - acpi_ex_out_pointer ("Handler", obj_desc->region.handler); - acpi_ex_out_pointer ("Next", obj_desc->region.next); + acpi_ex_out_integer ("space_id", obj_desc->region.space_id); + acpi_ex_out_integer ("Flags", obj_desc->region.flags); + acpi_ex_out_address ("Address", obj_desc->region.address); + acpi_ex_out_integer ("Length", obj_desc->region.length); + acpi_ex_out_pointer ("Handler", obj_desc->region.handler); + acpi_ex_out_pointer ("Next", obj_desc->region.next); break; @@ -686,11 +684,11 @@ case ACPI_TYPE_PROCESSOR: acpi_ex_out_integer ("Processor ID", obj_desc->processor.proc_id); - acpi_ex_out_integer ("Length", obj_desc->processor.length); - acpi_ex_out_address ("Address", (acpi_physical_address) obj_desc->processor.address); + acpi_ex_out_integer ("Length", obj_desc->processor.length); + acpi_ex_out_address ("Address", (acpi_physical_address) obj_desc->processor.address); acpi_ex_out_pointer ("system_notify", obj_desc->processor.system_notify); acpi_ex_out_pointer ("device_notify", obj_desc->processor.device_notify); - acpi_ex_out_pointer ("Handler", obj_desc->processor.handler); + acpi_ex_out_pointer ("Handler", obj_desc->processor.handler); break; @@ -698,7 +696,7 @@ acpi_ex_out_pointer ("system_notify", obj_desc->thermal_zone.system_notify); acpi_ex_out_pointer ("device_notify", obj_desc->thermal_zone.device_notify); - acpi_ex_out_pointer ("Handler", obj_desc->thermal_zone.handler); + acpi_ex_out_pointer ("Handler", obj_desc->thermal_zone.handler); break; @@ -707,35 +705,35 @@ case ACPI_TYPE_LOCAL_BANK_FIELD: case ACPI_TYPE_LOCAL_INDEX_FIELD: - acpi_ex_out_integer ("field_flags", obj_desc->common_field.field_flags); - acpi_ex_out_integer ("access_byte_width", obj_desc->common_field.access_byte_width); - acpi_ex_out_integer ("bit_length", obj_desc->common_field.bit_length); + acpi_ex_out_integer ("field_flags", obj_desc->common_field.field_flags); + acpi_ex_out_integer ("access_byte_width",obj_desc->common_field.access_byte_width); + acpi_ex_out_integer ("bit_length", obj_desc->common_field.bit_length); acpi_ex_out_integer ("fld_bit_offset", obj_desc->common_field.start_field_bit_offset); acpi_ex_out_integer ("base_byte_offset", obj_desc->common_field.base_byte_offset); acpi_ex_out_integer ("datum_valid_bits", obj_desc->common_field.datum_valid_bits); - acpi_ex_out_integer ("end_fld_valid_bits", obj_desc->common_field.end_field_valid_bits); - acpi_ex_out_integer ("end_buf_valid_bits", obj_desc->common_field.end_buffer_valid_bits); - acpi_ex_out_pointer ("parent_node", obj_desc->common_field.node); + acpi_ex_out_integer ("end_fld_valid_bits",obj_desc->common_field.end_field_valid_bits); + acpi_ex_out_integer ("end_buf_valid_bits",obj_desc->common_field.end_buffer_valid_bits); + acpi_ex_out_pointer ("parent_node", obj_desc->common_field.node); switch (ACPI_GET_OBJECT_TYPE (obj_desc)) { case ACPI_TYPE_BUFFER_FIELD: - acpi_ex_out_pointer ("buffer_obj", obj_desc->buffer_field.buffer_obj); + acpi_ex_out_pointer ("buffer_obj", obj_desc->buffer_field.buffer_obj); break; case ACPI_TYPE_LOCAL_REGION_FIELD: - acpi_ex_out_pointer ("region_obj", obj_desc->field.region_obj); + acpi_ex_out_pointer ("region_obj", obj_desc->field.region_obj); break; case ACPI_TYPE_LOCAL_BANK_FIELD: - acpi_ex_out_integer ("Value", obj_desc->bank_field.value); - acpi_ex_out_pointer ("region_obj", obj_desc->bank_field.region_obj); - acpi_ex_out_pointer ("bank_obj", obj_desc->bank_field.bank_obj); + acpi_ex_out_integer ("Value", obj_desc->bank_field.value); + acpi_ex_out_pointer ("region_obj", obj_desc->bank_field.region_obj); + acpi_ex_out_pointer ("bank_obj", obj_desc->bank_field.bank_obj); break; case ACPI_TYPE_LOCAL_INDEX_FIELD: - acpi_ex_out_integer ("Value", obj_desc->index_field.value); - acpi_ex_out_pointer ("Index", obj_desc->index_field.index_obj); - acpi_ex_out_pointer ("Data", obj_desc->index_field.data_obj); + acpi_ex_out_integer ("Value", obj_desc->index_field.value); + acpi_ex_out_pointer ("Index", obj_desc->index_field.index_obj); + acpi_ex_out_pointer ("Data", obj_desc->index_field.data_obj); break; default: @@ -747,29 +745,29 @@ case ACPI_TYPE_LOCAL_REFERENCE: - acpi_ex_out_integer ("target_type", obj_desc->reference.target_type); - acpi_ex_out_string ("Opcode", (acpi_ps_get_opcode_info (obj_desc->reference.opcode))->name); - acpi_ex_out_integer ("Offset", obj_desc->reference.offset); - acpi_ex_out_pointer ("obj_desc", obj_desc->reference.object); - acpi_ex_out_pointer ("Node", obj_desc->reference.node); - acpi_ex_out_pointer ("Where", obj_desc->reference.where); + acpi_ex_out_integer ("target_type", obj_desc->reference.target_type); + acpi_ex_out_string ("Opcode", (acpi_ps_get_opcode_info (obj_desc->reference.opcode))->name); + acpi_ex_out_integer ("Offset", obj_desc->reference.offset); + acpi_ex_out_pointer ("obj_desc", obj_desc->reference.object); + acpi_ex_out_pointer ("Node", obj_desc->reference.node); + acpi_ex_out_pointer ("Where", obj_desc->reference.where); break; case ACPI_TYPE_LOCAL_ADDRESS_HANDLER: - acpi_ex_out_integer ("space_id", obj_desc->address_space.space_id); - acpi_ex_out_pointer ("Next", obj_desc->address_space.next); - acpi_ex_out_pointer ("region_list", obj_desc->address_space.region_list); - acpi_ex_out_pointer ("Node", obj_desc->address_space.node); - acpi_ex_out_pointer ("Context", obj_desc->address_space.context); + acpi_ex_out_integer ("space_id", obj_desc->address_space.space_id); + acpi_ex_out_pointer ("Next", obj_desc->address_space.next); + acpi_ex_out_pointer ("region_list", obj_desc->address_space.region_list); + acpi_ex_out_pointer ("Node", obj_desc->address_space.node); + acpi_ex_out_pointer ("Context", obj_desc->address_space.context); break; case ACPI_TYPE_LOCAL_NOTIFY: - acpi_ex_out_pointer ("Node", obj_desc->notify.node); - acpi_ex_out_pointer ("Context", obj_desc->notify.context); + acpi_ex_out_pointer ("Node", obj_desc->notify.node); + acpi_ex_out_pointer ("Context", obj_desc->notify.context); break; @@ -779,7 +777,8 @@ case ACPI_TYPE_LOCAL_DATA: default: - acpi_os_printf ("ex_dump_object_descriptor: Display not implemented for object type %s\n", + acpi_os_printf ( + "ex_dump_object_descriptor: Display not implemented for object type %s\n", acpi_ut_get_object_type_name (obj_desc)); break; } diff -Nru a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c --- a/drivers/acpi/executer/exfldio.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/acpi/executer/exfldio.c 2004-11-10 17:19:03 -08:00 @@ -139,7 +139,7 @@ if (ACPI_ROUND_UP (rgn_desc->region.length, obj_desc->common_field.access_byte_width) >= (obj_desc->common_field.base_byte_offset + - obj_desc->common_field.access_byte_width + + (acpi_native_uint) obj_desc->common_field.access_byte_width + field_datum_byte_offset)) { return_ACPI_STATUS (AE_OK); } diff -Nru a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c --- a/drivers/acpi/executer/exmisc.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/acpi/executer/exmisc.c 2004-11-10 17:19:07 -08:00 @@ -149,8 +149,9 @@ * * FUNCTION: acpi_ex_concat_template * - * PARAMETERS: *obj_desc - Object to be converted. Must be an - * Integer, Buffer, or String + * PARAMETERS: Operand0 - First source object + * Operand1 - Second source object + * actual_return_desc - Where to place the return object * walk_state - Current walk state * * RETURN: Status @@ -161,8 +162,8 @@ acpi_status acpi_ex_concat_template ( - union acpi_operand_object *obj_desc1, - union acpi_operand_object *obj_desc2, + union acpi_operand_object *operand0, + union acpi_operand_object *operand1, union acpi_operand_object **actual_return_desc, struct acpi_walk_state *walk_state) { @@ -179,16 +180,16 @@ /* Find the end_tags in each resource template */ - end_tag1 = acpi_ut_get_resource_end_tag (obj_desc1); - end_tag2 = acpi_ut_get_resource_end_tag (obj_desc2); + end_tag1 = acpi_ut_get_resource_end_tag (operand0); + end_tag2 = acpi_ut_get_resource_end_tag (operand1); if (!end_tag1 || !end_tag2) { return_ACPI_STATUS (AE_AML_OPERAND_TYPE); } /* Compute the length of each part */ - length1 = ACPI_PTR_DIFF (end_tag1, obj_desc1->buffer.pointer); - length2 = ACPI_PTR_DIFF (end_tag2, obj_desc2->buffer.pointer) + + length1 = ACPI_PTR_DIFF (end_tag1, operand0->buffer.pointer); + length2 = ACPI_PTR_DIFF (end_tag2, operand1->buffer.pointer) + 2; /* Size of END_TAG */ /* Create a new buffer object for the result */ @@ -201,8 +202,8 @@ /* Copy the templates to the new descriptor */ new_buf = return_desc->buffer.pointer; - ACPI_MEMCPY (new_buf, obj_desc1->buffer.pointer, length1); - ACPI_MEMCPY (new_buf + length1, obj_desc2->buffer.pointer, length2); + ACPI_MEMCPY (new_buf, operand0->buffer.pointer, length1); + ACPI_MEMCPY (new_buf + length1, operand1->buffer.pointer, length2); /* Compute the new checksum */ @@ -221,8 +222,8 @@ * * FUNCTION: acpi_ex_do_concatenate * - * PARAMETERS: obj_desc1 - First source object - * obj_desc2 - Second source object + * PARAMETERS: Operand0 - First source object + * Operand1 - Second source object * actual_return_desc - Where to place the return object * walk_state - Current walk state * @@ -234,20 +235,57 @@ acpi_status acpi_ex_do_concatenate ( - union acpi_operand_object *obj_desc1, - union acpi_operand_object *obj_desc2, + union acpi_operand_object *operand0, + union acpi_operand_object *operand1, union acpi_operand_object **actual_return_desc, struct acpi_walk_state *walk_state) { - acpi_status status; - u32 i; - acpi_integer this_integer; + union acpi_operand_object *local_operand1 = operand1; union acpi_operand_object *return_desc; char *new_buf; + acpi_status status; + acpi_size new_length; - ACPI_FUNCTION_ENTRY (); + ACPI_FUNCTION_TRACE ("ex_do_concatenate"); + + + /* + * Convert the second operand if necessary. The first operand + * determines the type of the second operand, (See the Data Types + * section of the ACPI specification.) Both object types are + * guaranteed to be either Integer/String/Buffer by the operand + * resolution mechanism. + */ + switch (ACPI_GET_OBJECT_TYPE (operand0)) { + case ACPI_TYPE_INTEGER: + status = acpi_ex_convert_to_integer (operand1, &local_operand1, 16); + break; + + case ACPI_TYPE_STRING: + status = acpi_ex_convert_to_string (operand1, &local_operand1, + ACPI_IMPLICIT_CONVERT_HEX); + break; + + case ACPI_TYPE_BUFFER: + status = acpi_ex_convert_to_buffer (operand1, &local_operand1); + break; + + default: + ACPI_REPORT_ERROR (("Concat - invalid obj type: %X\n", + ACPI_GET_OBJECT_TYPE (operand0))); + status = AE_AML_INTERNAL; + } + if (ACPI_FAILURE (status)) { + goto cleanup; + } + + /* + * Both operands are now known to be the same object type + * (Both are Integer, String, or Buffer), and we can now perform the + * concatenation. + */ /* * There are three cases to handle: @@ -256,113 +294,102 @@ * 2) Two Strings concatenated to produce a new String * 3) Two Buffers concatenated to produce a new Buffer */ - switch (ACPI_GET_OBJECT_TYPE (obj_desc1)) { + switch (ACPI_GET_OBJECT_TYPE (operand0)) { case ACPI_TYPE_INTEGER: /* Result of two Integers is a Buffer */ /* Need enough buffer space for two integers */ - return_desc = acpi_ut_create_buffer_object (acpi_gbl_integer_byte_width * 2); + return_desc = acpi_ut_create_buffer_object ( + ACPI_MUL_2 (acpi_gbl_integer_byte_width)); if (!return_desc) { - return (AE_NO_MEMORY); + status = AE_NO_MEMORY; + goto cleanup; } new_buf = (char *) return_desc->buffer.pointer; - /* Convert the first integer */ - - this_integer = obj_desc1->integer.value; - for (i = 0; i < acpi_gbl_integer_byte_width; i++) { - new_buf[i] = (char) this_integer; - this_integer >>= 8; - } + /* Copy the first integer, LSB first */ - /* Convert the second integer */ + ACPI_MEMCPY (new_buf, + &operand0->integer.value, + acpi_gbl_integer_byte_width); - this_integer = obj_desc2->integer.value; - for (; i < (ACPI_MUL_2 (acpi_gbl_integer_byte_width)); i++) { - new_buf[i] = (char) this_integer; - this_integer >>= 8; - } + /* Copy the second integer (LSB first) after the first */ + ACPI_MEMCPY (new_buf + acpi_gbl_integer_byte_width, + &local_operand1->integer.value, + acpi_gbl_integer_byte_width); break; - case ACPI_TYPE_STRING: /* Result of two Strings is a String */ - return_desc = acpi_ut_create_internal_object (ACPI_TYPE_STRING); - if (!return_desc) { - return (AE_NO_MEMORY); + new_length = (acpi_size) operand0->string.length + + (acpi_size) local_operand1->string.length; + if (new_length > ACPI_MAX_STRING_CONVERSION) { + status = AE_AML_STRING_LIMIT; + goto cleanup; } - /* Operand0 is string */ - - new_buf = ACPI_MEM_CALLOCATE ((acpi_size) obj_desc1->string.length + - (acpi_size) obj_desc2->string.length + 1); - if (!new_buf) { - ACPI_REPORT_ERROR - (("ex_do_concatenate: String allocation failure\n")); + return_desc = acpi_ut_create_string_object (new_length); + if (!return_desc) { status = AE_NO_MEMORY; goto cleanup; } + new_buf = return_desc->string.pointer; + /* Concatenate the strings */ - ACPI_STRCPY (new_buf, obj_desc1->string.pointer); - ACPI_STRCPY (new_buf + obj_desc1->string.length, - obj_desc2->string.pointer); - - /* Complete the String object initialization */ - - return_desc->string.pointer = new_buf; - return_desc->string.length = obj_desc1->string.length + - obj_desc2->string.length; + ACPI_STRCPY (new_buf, + operand0->string.pointer); + ACPI_STRCPY (new_buf + operand0->string.length, + local_operand1->string.pointer); break; - case ACPI_TYPE_BUFFER: /* Result of two Buffers is a Buffer */ return_desc = acpi_ut_create_buffer_object ( - (acpi_size) obj_desc1->buffer.length + - (acpi_size) obj_desc2->buffer.length); + (acpi_size) operand0->buffer.length + + (acpi_size) local_operand1->buffer.length); if (!return_desc) { - return (AE_NO_MEMORY); + status = AE_NO_MEMORY; + goto cleanup; } new_buf = (char *) return_desc->buffer.pointer; /* Concatenate the buffers */ - ACPI_MEMCPY (new_buf, obj_desc1->buffer.pointer, - obj_desc1->buffer.length); - ACPI_MEMCPY (new_buf + obj_desc1->buffer.length, obj_desc2->buffer.pointer, - obj_desc2->buffer.length); - + ACPI_MEMCPY (new_buf, + operand0->buffer.pointer, + operand0->buffer.length); + ACPI_MEMCPY (new_buf + operand0->buffer.length, + local_operand1->buffer.pointer, + local_operand1->buffer.length); break; - default: /* Invalid object type, should not happen here */ - ACPI_REPORT_ERROR (("Concat - invalid obj type: %X\n", - ACPI_GET_OBJECT_TYPE (obj_desc1))); - status = AE_AML_INTERNAL; - return_desc = NULL; + ACPI_REPORT_ERROR (("Concatenate - Invalid object type: %X\n", + ACPI_GET_OBJECT_TYPE (operand0))); + status =AE_AML_INTERNAL; + goto cleanup; } *actual_return_desc = return_desc; - return (AE_OK); - cleanup: - - acpi_ut_remove_reference (return_desc); - return (status); + if (local_operand1 != operand1) { + acpi_ut_remove_reference (local_operand1); + } + return_ACPI_STATUS (AE_OK); } @@ -371,8 +398,8 @@ * FUNCTION: acpi_ex_do_math_op * * PARAMETERS: Opcode - AML opcode - * Operand0 - Integer operand #0 - * Operand1 - Integer operand #1 + * Integer0 - Integer operand #0 + * Integer1 - Integer operand #1 * * RETURN: Integer result of the operation * @@ -385,62 +412,62 @@ acpi_integer acpi_ex_do_math_op ( u16 opcode, - acpi_integer operand0, - acpi_integer operand1) + acpi_integer integer0, + acpi_integer integer1) { ACPI_FUNCTION_ENTRY (); switch (opcode) { - case AML_ADD_OP: /* Add (Operand0, Operand1, Result) */ + case AML_ADD_OP: /* Add (Integer0, Integer1, Result) */ - return (operand0 + operand1); + return (integer0 + integer1); - case AML_BIT_AND_OP: /* And (Operand0, Operand1, Result) */ + case AML_BIT_AND_OP: /* And (Integer0, Integer1, Result) */ - return (operand0 & operand1); + return (integer0 & integer1); - case AML_BIT_NAND_OP: /* NAnd (Operand0, Operand1, Result) */ + case AML_BIT_NAND_OP: /* NAnd (Integer0, Integer1, Result) */ - return (~(operand0 & operand1)); + return (~(integer0 & integer1)); - case AML_BIT_OR_OP: /* Or (Operand0, Operand1, Result) */ + case AML_BIT_OR_OP: /* Or (Integer0, Integer1, Result) */ - return (operand0 | operand1); + return (integer0 | integer1); - case AML_BIT_NOR_OP: /* NOr (Operand0, Operand1, Result) */ + case AML_BIT_NOR_OP: /* NOr (Integer0, Integer1, Result) */ - return (~(operand0 | operand1)); + return (~(integer0 | integer1)); - case AML_BIT_XOR_OP: /* XOr (Operand0, Operand1, Result) */ + case AML_BIT_XOR_OP: /* XOr (Integer0, Integer1, Result) */ - return (operand0 ^ operand1); + return (integer0 ^ integer1); - case AML_MULTIPLY_OP: /* Multiply (Operand0, Operand1, Result) */ + case AML_MULTIPLY_OP: /* Multiply (Integer0, Integer1, Result) */ - return (operand0 * operand1); + return (integer0 * integer1); case AML_SHIFT_LEFT_OP: /* shift_left (Operand, shift_count, Result) */ - return (operand0 << operand1); + return (integer0 << integer1); case AML_SHIFT_RIGHT_OP: /* shift_right (Operand, shift_count, Result) */ - return (operand0 >> operand1); + return (integer0 >> integer1); - case AML_SUBTRACT_OP: /* Subtract (Operand0, Operand1, Result) */ + case AML_SUBTRACT_OP: /* Subtract (Integer0, Integer1, Result) */ - return (operand0 - operand1); + return (integer0 - integer1); default: @@ -451,20 +478,84 @@ /******************************************************************************* * + * FUNCTION: acpi_ex_do_logical_numeric_op + * + * PARAMETERS: Opcode - AML opcode + * Integer0 - Integer operand #0 + * Integer1 - Integer operand #1 + * logical_result - TRUE/FALSE result of the operation + * + * RETURN: Status + * + * DESCRIPTION: Execute a logical "Numeric" AML opcode. For these Numeric + * operators (LAnd and LOr), both operands must be integers. + * + * Note: cleanest machine code seems to be produced by the code + * below, rather than using statements of the form: + * Result = (Integer0 && Integer1); + * + ******************************************************************************/ + +acpi_status +acpi_ex_do_logical_numeric_op ( + u16 opcode, + acpi_integer integer0, + acpi_integer integer1, + u8 *logical_result) +{ + acpi_status status = AE_OK; + u8 local_result = FALSE; + + + ACPI_FUNCTION_TRACE ("ex_do_logical_numeric_op"); + + + switch (opcode) { + case AML_LAND_OP: /* LAnd (Integer0, Integer1) */ + + if (integer0 && integer1) { + local_result = TRUE; + } + break; + + case AML_LOR_OP: /* LOr (Integer0, Integer1) */ + + if (integer0 || integer1) { + local_result = TRUE; + } + break; + + default: + status = AE_AML_INTERNAL; + break; + } + + /* Return the logical result and status */ + + *logical_result = local_result; + return_ACPI_STATUS (status); +} + + +/******************************************************************************* + * * FUNCTION: acpi_ex_do_logical_op * * PARAMETERS: Opcode - AML opcode - * obj_desc0 - operand #0 - * obj_desc1 - operand #1 + * Operand0 - operand #0 + * Operand1 - operand #1 + * logical_result - TRUE/FALSE result of the operation * - * RETURN: TRUE/FALSE result of the operation + * RETURN: Status * * DESCRIPTION: Execute a logical AML opcode. The purpose of having all of the * functions here is to prevent a lot of pointer dereferencing * to obtain the operands and to simplify the generation of the - * logical value. Both operands must already be validated as - * 1) Both the same type, and - * 2) Either Integer, Buffer, or String type. + * logical value. For the Numeric operators (LAnd and LOr), both + * operands must be integers. For the other logical operators, + * operands can be any combination of Integer/String/Buffer. The + * first operand determines the type to which the second operand + * will be converted. * * Note: cleanest machine code seems to be produced by the code * below, rather than using statements of the form: @@ -472,143 +563,175 @@ * ******************************************************************************/ -u8 +acpi_status acpi_ex_do_logical_op ( u16 opcode, - union acpi_operand_object *obj_desc0, - union acpi_operand_object *obj_desc1) + union acpi_operand_object *operand0, + union acpi_operand_object *operand1, + u8 *logical_result) { - acpi_integer operand0; - acpi_integer operand1; - u8 *ptr0; - u8 *ptr1; + union acpi_operand_object *local_operand1 = operand1; + acpi_integer integer0; + acpi_integer integer1; u32 length0; u32 length1; - u32 i; + acpi_status status = AE_OK; + u8 local_result = FALSE; + int compare; - ACPI_FUNCTION_ENTRY (); + ACPI_FUNCTION_TRACE ("ex_do_logical_op"); - if (ACPI_GET_OBJECT_TYPE (obj_desc0) == ACPI_TYPE_INTEGER) { - /* Both operands are of type integer */ + /* + * Convert the second operand if necessary. The first operand + * determines the type of the second operand, (See the Data Types + * section of the ACPI 3.0+ specification.) Both object types are + * guaranteed to be either Integer/String/Buffer by the operand + * resolution mechanism. + */ + switch (ACPI_GET_OBJECT_TYPE (operand0)) { + case ACPI_TYPE_INTEGER: + status = acpi_ex_convert_to_integer (operand1, &local_operand1, 16); + break; - operand0 = obj_desc0->integer.value; - operand1 = obj_desc1->integer.value; + case ACPI_TYPE_STRING: + status = acpi_ex_convert_to_string (operand1, &local_operand1, + ACPI_IMPLICIT_CONVERT_HEX); + break; - switch (opcode) { - case AML_LAND_OP: /* LAnd (Operand0, Operand1) */ + case ACPI_TYPE_BUFFER: + status = acpi_ex_convert_to_buffer (operand1, &local_operand1); + break; - if (operand0 && operand1) { - return (TRUE); - } - break; + default: + status = AE_AML_INTERNAL; + break; + } + + if (ACPI_FAILURE (status)) { + goto cleanup; + } + + /* + * Two cases: 1) Both Integers, 2) Both Strings or Buffers + */ + if (ACPI_GET_OBJECT_TYPE (operand0) == ACPI_TYPE_INTEGER) { + /* + * 1) Both operands are of type integer + * Note: local_operand1 may have changed above + */ + integer0 = operand0->integer.value; + integer1 = local_operand1->integer.value; + switch (opcode) { case AML_LEQUAL_OP: /* LEqual (Operand0, Operand1) */ - if (operand0 == operand1) { - return (TRUE); + if (integer0 == integer1) { + local_result = TRUE; } break; case AML_LGREATER_OP: /* LGreater (Operand0, Operand1) */ - if (operand0 > operand1) { - return (TRUE); + if (integer0 > integer1) { + local_result = TRUE; } break; case AML_LLESS_OP: /* LLess (Operand0, Operand1) */ - if (operand0 < operand1) { - return (TRUE); - } - break; - - case AML_LOR_OP: /* LOr (Operand0, Operand1) */ - - if (operand0 || operand1) { - return (TRUE); + if (integer0 < integer1) { + local_result = TRUE; } break; default: + status = AE_AML_INTERNAL; break; } } else { /* - * Case for Buffer/String objects. - * NOTE: takes advantage of common Buffer/String object fields + * 2) Both operands are Strings or both are Buffers + * Note: Code below takes advantage of common Buffer/String + * object fields. local_operand1 may have changed above. Use + * memcmp to handle nulls in buffers. */ - length0 = obj_desc0->buffer.length; - ptr0 = obj_desc0->buffer.pointer; + length0 = operand0->buffer.length; + length1 = local_operand1->buffer.length; + + /* Lexicographic compare: compare the data bytes */ - length1 = obj_desc1->buffer.length; - ptr1 = obj_desc1->buffer.pointer; + compare = ACPI_MEMCMP ((const char * ) operand0->buffer.pointer, + (const char * ) local_operand1->buffer.pointer, + (length0 > length1) ? length1 : length0); switch (opcode) { case AML_LEQUAL_OP: /* LEqual (Operand0, Operand1) */ /* Length and all bytes must be equal */ - if (length0 != length1) { - return (FALSE); - } + if ((length0 == length1) && + (compare == 0)) { + /* Length and all bytes match ==> TRUE */ - for (i = 0; i < length0; i++) { - if (ptr0[i] != ptr1[i]) { - return (FALSE); - } + local_result = TRUE; } - return (TRUE); + break; case AML_LGREATER_OP: /* LGreater (Operand0, Operand1) */ - /* Lexicographic compare: Scan the 1-to-1 data */ - - for (i = 0; (i < length0) && (i < length1); i++) { - if (ptr0[i] > ptr1[i]) { - return (TRUE); - } + if (compare > 0) { + local_result = TRUE; + goto cleanup; /* TRUE */ + } + if (compare < 0) { + goto cleanup; /* FALSE */ } - /* Bytes match, now check lengths */ + /* Bytes match (to shortest length), compare lengths */ if (length0 > length1) { - return (TRUE); + local_result = TRUE; } - - /* Length0 <= Length1 */ - - return (FALSE); + break; case AML_LLESS_OP: /* LLess (Operand0, Operand1) */ - /* Lexicographic compare: Scan the 1-to-1 data */ - - for (i = 0; (i < length0) && (i < length1); i++) { - if (ptr0[i] < ptr1[i]) { - return (TRUE); - } + if (compare > 0) { + goto cleanup; /* FALSE */ + } + if (compare < 0) { + local_result = TRUE; + goto cleanup; /* TRUE */ } - /* Bytes match, now check lengths */ + /* Bytes match (to shortest length), compare lengths */ if (length0 < length1) { - return (TRUE); + local_result = TRUE; } - - /* Length0 >= Length1 */ - - return (FALSE); + break; default: + status = AE_AML_INTERNAL; break; } } - return (FALSE); +cleanup: + + /* New object was created if implicit conversion performed - delete */ + + if (local_operand1 != operand1) { + acpi_ut_remove_reference (local_operand1); + } + + /* Return the logical result and status */ + + *logical_result = local_result; + return_ACPI_STATUS (status); } diff -Nru a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c --- a/drivers/acpi/executer/exoparg1.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/acpi/executer/exoparg1.c 2004-11-10 17:19:06 -08:00 @@ -67,7 +67,7 @@ * Where: * * xA - ARGUMENTS: The number of arguments (input operands) that are - * required for this opcode type (1 through 6 args). + * required for this opcode type (0 through 6 args). * yT - TARGETS: The number of targets (output operands) that are required * for this opcode type (0, 1, or 2 targets). * zR - RETURN VALUE: Indicates whether this opcode type returns a value @@ -79,6 +79,69 @@ /******************************************************************************* * + * FUNCTION: acpi_ex_opcode_0A_0T_1R + * + * PARAMETERS: walk_state - Current state (contains AML opcode) + * + * RETURN: Status + * + * DESCRIPTION: Execute operator with no operands, one return value + * + ******************************************************************************/ + +acpi_status +acpi_ex_opcode_0A_0T_1R ( + struct acpi_walk_state *walk_state) +{ + acpi_status status = AE_OK; + union acpi_operand_object *return_desc = NULL; + + + ACPI_FUNCTION_TRACE_STR ("ex_opcode_0A_0T_1R", acpi_ps_get_opcode_name (walk_state->opcode)); + + + /* Examine the AML opcode */ + + switch (walk_state->opcode) { + case AML_TIMER_OP: /* Timer () */ + + /* Create a return object of type Integer */ + + return_desc = acpi_ut_create_internal_object (ACPI_TYPE_INTEGER); + if (!return_desc) { + status = AE_NO_MEMORY; + goto cleanup; + } + + return_desc->integer.value = acpi_os_get_timer (); + break; + + default: /* Unknown opcode */ + + ACPI_REPORT_ERROR (("acpi_ex_opcode_0A_0T_1R: Unknown opcode %X\n", + walk_state->opcode)); + status = AE_AML_BAD_OPCODE; + break; + } + +cleanup: + + if (!walk_state->result_obj) { + walk_state->result_obj = return_desc; + } + + /* Delete return object on error */ + + if (ACPI_FAILURE (status)) { + acpi_ut_remove_reference (return_desc); + } + + return_ACPI_STATUS (status); +} + + +/******************************************************************************* + * * FUNCTION: acpi_ex_opcode_1A_0T_0R * * PARAMETERS: walk_state - Current state (contains AML opcode) @@ -124,7 +187,7 @@ case AML_SLEEP_OP: /* Sleep (msec_time) */ - status = acpi_ex_system_do_suspend ((u32) operand[0]->integer.value); + status = acpi_ex_system_do_suspend (operand[0]->integer.value); break; @@ -222,7 +285,7 @@ union acpi_operand_object *return_desc2 = NULL; u32 temp32; u32 i; - u32 power_of_ten; + acpi_integer power_of_ten; acpi_integer digit; @@ -262,7 +325,8 @@ * Acpi specification describes Integer type as a little * endian unsigned value, so this boundary condition is valid. */ - for (temp32 = 0; return_desc->integer.value && temp32 < ACPI_INTEGER_BIT_SIZE; ++temp32) { + for (temp32 = 0; return_desc->integer.value && + temp32 < ACPI_INTEGER_BIT_SIZE; ++temp32) { return_desc->integer.value >>= 1; } @@ -278,13 +342,15 @@ * The Acpi specification describes Integer type as a little * endian unsigned value, so this boundary condition is valid. */ - for (temp32 = 0; return_desc->integer.value && temp32 < ACPI_INTEGER_BIT_SIZE; ++temp32) { + for (temp32 = 0; return_desc->integer.value && + temp32 < ACPI_INTEGER_BIT_SIZE; ++temp32) { return_desc->integer.value <<= 1; } /* Since the bit position is one-based, subtract from 33 (65) */ - return_desc->integer.value = temp32 == 0 ? 0 : (ACPI_INTEGER_BIT_SIZE + 1) - temp32; + return_desc->integer.value = temp32 == 0 ? 0 : + (ACPI_INTEGER_BIT_SIZE + 1) - temp32; break; @@ -319,7 +385,8 @@ /* Sum the digit into the result with the current power of 10 */ - return_desc->integer.value += (((acpi_integer) temp32) * power_of_ten); + return_desc->integer.value += (((acpi_integer) temp32) * + power_of_ten); /* Shift to next BCD digit */ @@ -340,18 +407,20 @@ /* Each BCD digit is one nybble wide */ for (i = 0; (i < acpi_gbl_integer_nybble_width) && (digit > 0); i++) { - (void) acpi_ut_short_divide (&digit, 10, &digit, &temp32); + (void) acpi_ut_short_divide (digit, 10, &digit, &temp32); /* Insert the BCD digit that resides in the remainder from above */ - return_desc->integer.value |= (((acpi_integer) temp32) << (i * 4)); + return_desc->integer.value |= (((acpi_integer) temp32) << + ACPI_MUL_4 (i)); } /* Overflow if there is any data left in Digit */ if (digit > 0) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Integer too large to convert to BCD: %8.8X%8.8X\n", - ACPI_FORMAT_UINT64 (operand[0]->integer.value))); + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "Integer too large to convert to BCD: %8.8X%8.8X\n", + ACPI_FORMAT_UINT64 (operand[0]->integer.value))); status = AE_AML_NUMERIC_OVERFLOW; goto cleanup; } @@ -429,42 +498,47 @@ */ case AML_COPY_OP: /* Copy (Source, Target) */ - status = acpi_ut_copy_iobject_to_iobject (operand[0], &return_desc, walk_state); + status = acpi_ut_copy_iobject_to_iobject (operand[0], &return_desc, + walk_state); break; case AML_TO_DECSTRING_OP: /* to_decimal_string (Data, Result) */ - status = acpi_ex_convert_to_string (operand[0], &return_desc, 10, ACPI_UINT32_MAX, walk_state); + status = acpi_ex_convert_to_string (operand[0], &return_desc, + ACPI_EXPLICIT_CONVERT_DECIMAL); break; case AML_TO_HEXSTRING_OP: /* to_hex_string (Data, Result) */ - status = acpi_ex_convert_to_string (operand[0], &return_desc, 16, ACPI_UINT32_MAX, walk_state); + status = acpi_ex_convert_to_string (operand[0], &return_desc, + ACPI_EXPLICIT_CONVERT_HEX); break; case AML_TO_BUFFER_OP: /* to_buffer (Data, Result) */ - status = acpi_ex_convert_to_buffer (operand[0], &return_desc, walk_state); + status = acpi_ex_convert_to_buffer (operand[0], &return_desc); break; case AML_TO_INTEGER_OP: /* to_integer (Data, Result) */ - status = acpi_ex_convert_to_integer (operand[0], &return_desc, walk_state); + status = acpi_ex_convert_to_integer (operand[0], &return_desc, + ACPI_ANY_BASE); break; - case AML_SHIFT_LEFT_BIT_OP: /* shift_left_bit (Source, bit_num) */ - case AML_SHIFT_RIGHT_BIT_OP: /* shift_right_bit (Source, bit_num) */ + case AML_SHIFT_LEFT_BIT_OP: /* shift_left_bit (Source, bit_num) */ + case AML_SHIFT_RIGHT_BIT_OP: /* shift_right_bit (Source, bit_num) */ /* * These are two obsolete opcodes */ - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%s is obsolete and not implemented\n", - acpi_ps_get_opcode_name (walk_state->opcode))); + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "%s is obsolete and not implemented\n", + acpi_ps_get_opcode_name (walk_state->opcode))); status = AE_SUPPORT; goto cleanup; @@ -537,7 +611,13 @@ goto cleanup; } - return_desc->integer.value = !operand[0]->integer.value; + /* + * Set result to ONES (TRUE) if Value == 0. Note: + * return_desc->Integer.Value is initially == 0 (FALSE) from above. + */ + if (!operand[0]->integer.value) { + return_desc->integer.value = ACPI_INTEGER_MAX; + } break; @@ -545,54 +625,80 @@ case AML_INCREMENT_OP: /* Increment (Operand) */ /* - * Since we are expecting a Reference operand, it - * can be either a NS Node or an internal object. + * Create a new integer. Can't just get the base integer and + * increment it because it may be an Arg or Field. + */ + return_desc = acpi_ut_create_internal_object (ACPI_TYPE_INTEGER); + if (!return_desc) { + status = AE_NO_MEMORY; + goto cleanup; + } + + /* + * Since we are expecting a Reference operand, it can be either a + * NS Node or an internal object. */ - return_desc = operand[0]; - if (ACPI_GET_DESCRIPTOR_TYPE (operand[0]) == ACPI_DESC_TYPE_OPERAND) { + temp_desc = operand[0]; + if (ACPI_GET_DESCRIPTOR_TYPE (temp_desc) == ACPI_DESC_TYPE_OPERAND) { /* Internal reference object - prevent deletion */ - acpi_ut_add_reference (return_desc); + acpi_ut_add_reference (temp_desc); } /* - * Convert the return_desc Reference to a Number - * (This removes a reference on the return_desc object) + * Convert the Reference operand to an Integer (This removes a + * reference on the Operand[0] object) + * + * NOTE: We use LNOT_OP here in order to force resolution of the + * reference operand to an actual integer. */ - status = acpi_ex_resolve_operands (AML_LNOT_OP, &return_desc, walk_state); + status = acpi_ex_resolve_operands (AML_LNOT_OP, &temp_desc, walk_state); if (ACPI_FAILURE (status)) { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%s: bad operand(s) %s\n", - acpi_ps_get_opcode_name (walk_state->opcode), acpi_format_exception(status))); + acpi_ps_get_opcode_name (walk_state->opcode), + acpi_format_exception(status))); goto cleanup; } /* - * return_desc is now guaranteed to be an Integer object - * Do the actual increment or decrement + * temp_desc is now guaranteed to be an Integer object -- + * Perform the actual increment or decrement */ - if (AML_INCREMENT_OP == walk_state->opcode) { - return_desc->integer.value++; + if (walk_state->opcode == AML_INCREMENT_OP) { + return_desc->integer.value = temp_desc->integer.value +1; } else { - return_desc->integer.value--; + return_desc->integer.value = temp_desc->integer.value -1; } - /* Store the result back in the original descriptor */ + /* Finished with this Integer object */ + + acpi_ut_remove_reference (temp_desc); + /* + * Store the result back (indirectly) through the original + * Reference object + */ status = acpi_ex_store (return_desc, operand[0], walk_state); break; case AML_TYPE_OP: /* object_type (source_object) */ + /* + * Note: The operand is not resolved at this point because we want to + * get the associated object, not its value. For example, we don't want + * to resolve a field_unit to its value, we want the actual field_unit + * object. + */ + /* Get the type of the base object */ status = acpi_ex_resolve_multiple (walk_state, operand[0], &type, NULL); if (ACPI_FAILURE (status)) { goto cleanup; } - /* Allocate a descriptor to hold the type. */ return_desc = acpi_ut_create_internal_object (ACPI_TYPE_INTEGER); @@ -607,6 +713,11 @@ case AML_SIZE_OF_OP: /* size_of (source_object) */ + /* + * Note: The operand is not resolved at this point because we want to + * get the associated object, not its value. + */ + /* Get the base object */ status = acpi_ex_resolve_multiple (walk_state, operand[0], &type, &temp_desc); @@ -615,11 +726,19 @@ } /* - * Type is guaranteed to be a buffer, string, or package at this - * point (even if the original operand was an object reference, it - * will be resolved and typechecked during operand resolution.) + * The type of the base object must be integer, buffer, string, or + * package. All others are not supported. + * + * NOTE: Integer is not specifically supported by the ACPI spec, + * but is supported implicitly via implicit operand conversion. + * rather than bother with conversion, we just use the byte width + * global (4 or 8 bytes). */ switch (type) { + case ACPI_TYPE_INTEGER: + value = acpi_gbl_integer_byte_width; + break; + case ACPI_TYPE_BUFFER: value = temp_desc->buffer.length; break; @@ -633,7 +752,8 @@ break; default: - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "size_of, Not Buf/Str/Pkg - found type %s\n", + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "size_of - Operand is not Buf/Int/Str/Pkg - found type %s\n", acpi_ut_get_type_name (type))); status = AE_AML_OPERAND_TYPE; goto cleanup; @@ -803,7 +923,8 @@ * an uninitialized package element and is thus a * severe error. */ - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "NULL package element obj %p\n", + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "NULL package element obj %p\n", operand[0])); status = AE_AML_UNINITIALIZED_ELEMENT; goto cleanup; @@ -815,7 +936,8 @@ default: - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown Index target_type %X in obj %p\n", + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "Unknown Index target_type %X in obj %p\n", operand[0]->reference.target_type, operand[0])); status = AE_AML_OPERAND_TYPE; goto cleanup; @@ -839,7 +961,8 @@ default: - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown opcode in ref(%p) - %X\n", + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "Unknown opcode in ref(%p) - %X\n", operand[0], operand[0]->reference.opcode)); status = AE_TYPE; diff -Nru a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c --- a/drivers/acpi/executer/exoparg2.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/executer/exoparg2.c 2004-11-10 17:19:04 -08:00 @@ -199,7 +199,8 @@ acpi_status status; - ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_2T_1R", acpi_ps_get_opcode_name (walk_state->opcode)); + ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_2T_1R", + acpi_ps_get_opcode_name (walk_state->opcode)); /* @@ -222,8 +223,10 @@ /* Quotient to return_desc1, remainder to return_desc2 */ - status = acpi_ut_divide (&operand[0]->integer.value, &operand[1]->integer.value, - &return_desc1->integer.value, &return_desc2->integer.value); + status = acpi_ut_divide (operand[0]->integer.value, + operand[1]->integer.value, + &return_desc1->integer.value, + &return_desc2->integer.value); if (ACPI_FAILURE (status)) { goto cleanup; } @@ -292,13 +295,13 @@ { union acpi_operand_object **operand = &walk_state->operands[0]; union acpi_operand_object *return_desc = NULL; - union acpi_operand_object *temp_desc = NULL; u32 index; acpi_status status = AE_OK; acpi_size length; - ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_1T_1R", acpi_ps_get_opcode_name (walk_state->opcode)); + ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_1T_1R", + acpi_ps_get_opcode_name (walk_state->opcode)); /* @@ -331,52 +334,17 @@ /* return_desc will contain the remainder */ - status = acpi_ut_divide (&operand[0]->integer.value, &operand[1]->integer.value, - NULL, &return_desc->integer.value); + status = acpi_ut_divide (operand[0]->integer.value, + operand[1]->integer.value, + NULL, + &return_desc->integer.value); break; case AML_CONCAT_OP: /* Concatenate (Data1, Data2, Result) */ - /* - * Convert the second operand if necessary. The first operand - * determines the type of the second operand, (See the Data Types - * section of the ACPI specification.) Both object types are - * guaranteed to be either Integer/String/Buffer by the operand - * resolution mechanism above. - */ - switch (ACPI_GET_OBJECT_TYPE (operand[0])) { - case ACPI_TYPE_INTEGER: - status = acpi_ex_convert_to_integer (operand[1], &temp_desc, walk_state); - break; - - case ACPI_TYPE_STRING: - status = acpi_ex_convert_to_string (operand[1], &temp_desc, 16, ACPI_UINT32_MAX, walk_state); - break; - - case ACPI_TYPE_BUFFER: - status = acpi_ex_convert_to_buffer (operand[1], &temp_desc, walk_state); - break; - - default: - ACPI_REPORT_ERROR (("Concat - invalid obj type: %X\n", - ACPI_GET_OBJECT_TYPE (operand[0]))); - status = AE_AML_INTERNAL; - } - - if (ACPI_FAILURE (status)) { - goto cleanup; - } - - /* - * Both operands are now known to be the same object type - * (Both are Integer, String, or Buffer), and we can now perform the - * concatenation. - */ - status = acpi_ex_do_concatenate (operand[0], temp_desc, &return_desc, walk_state); - if (temp_desc != operand[1]) { - acpi_ut_remove_reference (temp_desc); - } + status = acpi_ex_do_concatenate (operand[0], operand[1], + &return_desc, walk_state); break; @@ -387,55 +355,45 @@ * been converted.) Copy the raw buffer data to a new object of type String. */ - /* Get the length of the new string */ - + /* + * Get the length of the new string. It is the smallest of: + * 1) Length of the input buffer + * 2) Max length as specified in the to_string operator + * 3) Length of input buffer up to a zero byte (null terminator) + * + * NOTE: A length of zero is ok, and will create a zero-length, null + * terminated string. + */ length = 0; - if (operand[1]->integer.value == 0) { - /* Handle optional length value */ - - operand[1]->integer.value = ACPI_INTEGER_MAX; - } - while ((length < operand[0]->buffer.length) && (length < operand[1]->integer.value) && (operand[0]->buffer.pointer[length])) { length++; + if (length > ACPI_MAX_STRING_CONVERSION) { + status = AE_AML_STRING_LIMIT; + goto cleanup; + } } - if (length > ACPI_MAX_STRING_CONVERSION) { - status = AE_AML_STRING_LIMIT; - goto cleanup; - } - - /* Create the internal return object */ + /* Allocate a new string object */ - return_desc = acpi_ut_create_internal_object (ACPI_TYPE_STRING); + return_desc = acpi_ut_create_string_object (length); if (!return_desc) { status = AE_NO_MEMORY; goto cleanup; } - /* Allocate a new string buffer (Length + 1 for null terminator) */ - - return_desc->string.pointer = ACPI_MEM_CALLOCATE (length + 1); - if (!return_desc->string.pointer) { - status = AE_NO_MEMORY; - goto cleanup; - } + /* Copy the raw buffer data with no transform. NULL terminated already. */ - /* Copy the raw buffer data with no transform */ - - ACPI_MEMCPY (return_desc->string.pointer, operand[0]->buffer.pointer, length); - - /* Set the string length */ - - return_desc->string.length = (u32) length; + ACPI_MEMCPY (return_desc->string.pointer, + operand[0]->buffer.pointer, length); break; case AML_CONCAT_RES_OP: /* concatenate_res_template (Buffer, Buffer, Result) (ACPI 2.0) */ - status = acpi_ex_concat_template (operand[0], operand[1], &return_desc, walk_state); + status = acpi_ex_concat_template (operand[0], operand[1], + &return_desc, walk_state); break; @@ -458,7 +416,8 @@ /* Object to be indexed is a Package */ if (index >= operand[0]->package.count) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Index value (%X) beyond package end (%X)\n", + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "Index value (%X) beyond package end (%X)\n", index, operand[0]->package.count)); status = AE_AML_PACKAGE_LIMIT; goto cleanup; @@ -472,7 +431,8 @@ /* Object to be indexed is a Buffer */ if (index >= operand[0]->buffer.length) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Index value (%X) beyond end of buffer (%X)\n", + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "Index value (%X) beyond end of buffer (%X)\n", index, operand[0]->buffer.length)); status = AE_AML_BUFFER_LIMIT; goto cleanup; @@ -558,7 +518,8 @@ u8 logical_result = FALSE; - ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_0T_1R", acpi_ps_get_opcode_name (walk_state->opcode)); + ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_0T_1R", + acpi_ps_get_opcode_name (walk_state->opcode)); /* Create the internal return object */ @@ -572,18 +533,15 @@ /* * Execute the Opcode */ - if (walk_state->op_info->flags & AML_LOGICAL) /* logical_op (Operand0, Operand1) */ { - /* Both operands must be of the same type */ - - if (ACPI_GET_OBJECT_TYPE (operand[0]) != - ACPI_GET_OBJECT_TYPE (operand[1])) { - status = AE_AML_OPERAND_TYPE; - goto cleanup; - } - - logical_result = acpi_ex_do_logical_op (walk_state->opcode, - operand[0], - operand[1]); + if (walk_state->op_info->flags & AML_LOGICAL_NUMERIC) /* logical_op (Operand0, Operand1) */ { + status = acpi_ex_do_logical_numeric_op (walk_state->opcode, + operand[0]->integer.value, operand[1]->integer.value, + &logical_result); + goto store_logical_result; + } + else if (walk_state->op_info->flags & AML_LOGICAL) /* logical_op (Operand0, Operand1) */ { + status = acpi_ex_do_logical_op (walk_state->opcode, operand[0], + operand[1], &logical_result); goto store_logical_result; } diff -Nru a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c --- a/drivers/acpi/executer/exprep.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/acpi/executer/exprep.c 2004-11-10 17:19:03 -08:00 @@ -508,6 +508,7 @@ if (!obj_desc->index_field.data_obj || !obj_desc->index_field.index_obj) { ACPI_REPORT_ERROR (("Null Index Object during field prep\n")); + acpi_ut_delete_object_desc (obj_desc); return_ACPI_STATUS (AE_AML_INTERNAL); } diff -Nru a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c --- a/drivers/acpi/executer/exregion.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/acpi/executer/exregion.c 2004-11-10 17:19:02 -08:00 @@ -121,7 +121,7 @@ * Hardware does not support non-aligned data transfers, we must verify * the request. */ - (void) acpi_ut_short_divide ((acpi_integer *) &address, length, NULL, &remainder); + (void) acpi_ut_short_divide ((acpi_integer) address, length, NULL, &remainder); if (remainder != 0) { return_ACPI_STATUS (AE_AML_ALIGNMENT); } diff -Nru a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c --- a/drivers/acpi/executer/exresolv.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/executer/exresolv.c 2004-11-10 17:19:04 -08:00 @@ -327,12 +327,45 @@ union acpi_operand_object *obj_desc = (void *) operand; struct acpi_namespace_node *node; acpi_object_type type; + acpi_status status; ACPI_FUNCTION_TRACE ("acpi_ex_resolve_multiple"); /* + * Operand can be either a namespace node or an operand descriptor + */ + switch (ACPI_GET_DESCRIPTOR_TYPE (obj_desc)) { + case ACPI_DESC_TYPE_OPERAND: + type = obj_desc->common.type; + break; + + case ACPI_DESC_TYPE_NAMED: + type = ((struct acpi_namespace_node *) obj_desc)->type; + obj_desc = acpi_ns_get_attached_object ((struct acpi_namespace_node *) obj_desc); + + /* If we had an Alias node, use the attached object for type info */ + + if (type == ACPI_TYPE_LOCAL_ALIAS) { + type = ((struct acpi_namespace_node *) obj_desc)->type; + obj_desc = acpi_ns_get_attached_object ((struct acpi_namespace_node *) obj_desc); + } + break; + + default: + return_ACPI_STATUS (AE_AML_OPERAND_TYPE); + } + + + /* + * If type is anything other than a reference, we are done + */ + if (type != ACPI_TYPE_LOCAL_REFERENCE) { + goto exit; + } + + /* * For reference objects created via the ref_of or Index operators, * we need to get to the base object (as per the ACPI specification * of the object_type and size_of operators). This means traversing @@ -420,6 +453,33 @@ if (obj_desc == operand) { return_ACPI_STATUS (AE_AML_CIRCULAR_REFERENCE); + } + break; + + + case AML_LOCAL_OP: + case AML_ARG_OP: + + if (return_desc) { + status = acpi_ds_method_data_get_value (obj_desc->reference.opcode, + obj_desc->reference.offset, walk_state, &obj_desc); + if (ACPI_FAILURE (status)) { + return_ACPI_STATUS (status); + } + acpi_ut_remove_reference (obj_desc); + } + else { + status = acpi_ds_method_data_get_node (obj_desc->reference.opcode, + obj_desc->reference.offset, walk_state, &node); + if (ACPI_FAILURE (status)) { + return_ACPI_STATUS (status); + } + + obj_desc = acpi_ns_get_attached_object (node); + if (!obj_desc) { + type = ACPI_TYPE_ANY; + goto exit; + } } break; diff -Nru a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c --- a/drivers/acpi/executer/exresop.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/acpi/executer/exresop.c 2004-11-10 17:19:06 -08:00 @@ -160,7 +160,7 @@ return_ACPI_STATUS (AE_AML_INTERNAL); } - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Opcode %X [%s] operand_types=%X \n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Opcode %X [%s] required_operand_types=%8.8X \n", opcode, op_info->name, arg_types)); /* @@ -227,12 +227,13 @@ case AML_LOAD_OP: /* ddb_handle from LOAD_OP or LOAD_TABLE_OP */ ACPI_DEBUG_ONLY_MEMBERS (ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, - "Reference Opcode: %s\n", op_info->name))); + "Operand is a Reference, ref_opcode [%s]\n", + (acpi_ps_get_opcode_info (obj_desc->reference.opcode))->name))); break; default: ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Unknown Reference Opcode %X [%s]\n", + "Operand is a Reference, Unknown Reference Opcode %X [%s]\n", obj_desc->reference.opcode, (acpi_ps_get_opcode_info (obj_desc->reference.opcode))->name)); @@ -398,7 +399,7 @@ * But we can implicitly convert from a STRING or BUFFER * Aka - "Implicit Source Operand Conversion" */ - status = acpi_ex_convert_to_integer (obj_desc, stack_ptr, walk_state); + status = acpi_ex_convert_to_integer (obj_desc, stack_ptr, 16); if (ACPI_FAILURE (status)) { if (status == AE_TYPE) { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, @@ -420,7 +421,7 @@ * But we can implicitly convert from a STRING or INTEGER * Aka - "Implicit Source Operand Conversion" */ - status = acpi_ex_convert_to_buffer (obj_desc, stack_ptr, walk_state); + status = acpi_ex_convert_to_buffer (obj_desc, stack_ptr); if (ACPI_FAILURE (status)) { if (status == AE_TYPE) { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, @@ -442,7 +443,8 @@ * But we can implicitly convert from a BUFFER or INTEGER * Aka - "Implicit Source Operand Conversion" */ - status = acpi_ex_convert_to_string (obj_desc, stack_ptr, 16, ACPI_UINT32_MAX, walk_state); + status = acpi_ex_convert_to_string (obj_desc, stack_ptr, + ACPI_IMPLICIT_CONVERT_HEX); if (ACPI_FAILURE (status)) { if (status == AE_TYPE) { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, @@ -494,7 +496,7 @@ /* Highest priority conversion is to type Buffer */ - status = acpi_ex_convert_to_buffer (obj_desc, stack_ptr, walk_state); + status = acpi_ex_convert_to_buffer (obj_desc, stack_ptr); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } diff -Nru a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c --- a/drivers/acpi/executer/exstore.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/executer/exstore.c 2004-11-10 17:19:04 -08:00 @@ -129,7 +129,8 @@ /* Destination is not a Reference object */ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Destination is not a Reference or Constant object [%p]\n", dest_desc)); + "Target is not a Reference or Constant object - %s [%p]\n", + acpi_ut_get_object_type_name (dest_desc), dest_desc)); ACPI_DUMP_STACK_ENTRY (source_desc); ACPI_DUMP_STACK_ENTRY (dest_desc); @@ -182,23 +183,37 @@ * Storing to the Debug object causes the value stored to be * displayed and otherwise has no effect -- see ACPI Specification */ - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "**** Write to Debug Object: ****:\n\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, + "**** Write to Debug Object: Object %p %s ****:\n\n", + source_desc, acpi_ut_get_object_type_name (source_desc))); ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[ACPI Debug] %s: ", - acpi_ut_get_object_type_name (source_desc))); + acpi_ut_get_object_type_name (source_desc))); + + if (!acpi_ut_valid_internal_object (source_desc)) { + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, + "%p, Invalid Internal Object!\n", source_desc)); + break; + } switch (ACPI_GET_OBJECT_TYPE (source_desc)) { case ACPI_TYPE_INTEGER: - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "0x%8.8X%8.8X\n", + if (acpi_gbl_integer_byte_width == 4) { + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "0x%8.8X\n", + (u32) source_desc->integer.value)); + } + else { + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "0x%8.8X%8.8X\n", ACPI_FORMAT_UINT64 (source_desc->integer.value))); + } break; case ACPI_TYPE_BUFFER: - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Length 0x%.2X", - (u32) source_desc->buffer.length)); + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[0x%.2X]", + (u32) source_desc->buffer.length)); ACPI_DUMP_BUFFER (source_desc->buffer.pointer, (source_desc->buffer.length < 32) ? source_desc->buffer.length : 32); break; @@ -206,22 +221,22 @@ case ACPI_TYPE_STRING: - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Length 0x%.2X, \"%s\"\n", - source_desc->string.length, source_desc->string.pointer)); + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[0x%.2X] \"%s\"\n", + source_desc->string.length, source_desc->string.pointer)); break; case ACPI_TYPE_PACKAGE: - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Size 0x%.2X Elements Ptr - %p\n", - source_desc->package.count, source_desc->package.elements)); + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[0x%.2X] Elements Ptr - %p\n", + source_desc->package.count, source_desc->package.elements)); break; default: ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%p\n", - source_desc)); + source_desc)); break; } diff -Nru a/drivers/acpi/executer/exsystem.c b/drivers/acpi/executer/exsystem.c --- a/drivers/acpi/executer/exsystem.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/acpi/executer/exsystem.c 2004-11-10 17:19:05 -08:00 @@ -167,7 +167,7 @@ acpi_status acpi_ex_system_do_suspend ( - u32 how_long) + acpi_integer how_long) { acpi_status status; @@ -179,8 +179,7 @@ acpi_ex_exit_interpreter (); - acpi_os_sleep ((u16) (how_long / (u32) 1000), - (u16) (how_long % (u32) 1000)); + acpi_os_sleep (how_long); /* And now we must get the interpreter again */ diff -Nru a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c --- a/drivers/acpi/executer/exutils.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/acpi/executer/exutils.c 2004-11-10 17:19:03 -08:00 @@ -280,25 +280,25 @@ { u32 num_digits; acpi_integer current_value; - acpi_integer quotient; ACPI_FUNCTION_TRACE ("ex_digits_needed"); - /* - * acpi_integer is unsigned, so we don't worry about a '-' - */ - if ((current_value = value) == 0) { + /* acpi_integer is unsigned, so we don't worry about a '-' prefix */ + + if (value == 0) { return_VALUE (1); } + current_value = value; num_digits = 0; + /* Count the digits in the requested base */ + while (current_value) { - (void) acpi_ut_short_divide (¤t_value, base, "ient, NULL); + (void) acpi_ut_short_divide (current_value, base, ¤t_value, NULL); num_digits++; - current_value = quotient; } return_VALUE (num_digits); @@ -361,7 +361,6 @@ u32 count; u32 digits_needed; u32 remainder; - acpi_integer quotient; ACPI_FUNCTION_ENTRY (); @@ -371,9 +370,8 @@ out_string[digits_needed] = 0; for (count = digits_needed; count > 0; count--) { - (void) acpi_ut_short_divide (&value, 10, "ient, &remainder); + (void) acpi_ut_short_divide (value, 10, &value, &remainder); out_string[count-1] = (char) ('0' + remainder);\ - value = quotient; } } diff -Nru a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c --- a/drivers/acpi/hardware/hwregs.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/acpi/hardware/hwregs.c 2004-11-10 17:19:06 -08:00 @@ -709,6 +709,7 @@ u32 *value, struct acpi_generic_address *reg) { + u64 address; acpi_status status; @@ -720,8 +721,14 @@ * a non-zero address within. However, don't return an error * because the PM1A/B code must not fail if B isn't present. */ - if ((!reg) || - (!reg->address)) { + if (!reg) { + return (AE_OK); + } + + /* Get a local copy of the address. Handles possible alignment issues */ + + ACPI_MOVE_64_TO_64 (&address, ®->address); + if (!address) { return (AE_OK); } *value = 0; @@ -734,14 +741,14 @@ case ACPI_ADR_SPACE_SYSTEM_MEMORY: status = acpi_os_read_memory ( - (acpi_physical_address) reg->address, + (acpi_physical_address) address, value, width); break; case ACPI_ADR_SPACE_SYSTEM_IO: - status = acpi_os_read_port ((acpi_io_address) reg->address, + status = acpi_os_read_port ((acpi_io_address) address, value, width); break; @@ -754,7 +761,7 @@ ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Read: %8.8X width %2d from %8.8X%8.8X (%s)\n", *value, width, - ACPI_FORMAT_UINT64 (reg->address), + ACPI_FORMAT_UINT64 (address), acpi_ut_get_region_name (reg->address_space_id))); return (status); @@ -781,6 +788,7 @@ u32 value, struct acpi_generic_address *reg) { + u64 address; acpi_status status; @@ -792,8 +800,14 @@ * a non-zero address within. However, don't return an error * because the PM1A/B code must not fail if B isn't present. */ - if ((!reg) || - (!reg->address)) { + if (!reg) { + return (AE_OK); + } + + /* Get a local copy of the address. Handles possible alignment issues */ + + ACPI_MOVE_64_TO_64 (&address, ®->address); + if (!address) { return (AE_OK); } @@ -805,14 +819,14 @@ case ACPI_ADR_SPACE_SYSTEM_MEMORY: status = acpi_os_write_memory ( - (acpi_physical_address) reg->address, + (acpi_physical_address) address, value, width); break; case ACPI_ADR_SPACE_SYSTEM_IO: - status = acpi_os_write_port ((acpi_io_address) reg->address, + status = acpi_os_write_port ((acpi_io_address) address, value, width); break; @@ -825,7 +839,7 @@ ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Wrote: %8.8X width %2d to %8.8X%8.8X (%s)\n", value, width, - ACPI_FORMAT_UINT64 (reg->address), + ACPI_FORMAT_UINT64 (address), acpi_ut_get_region_name (reg->address_space_id))); return (status); diff -Nru a/drivers/acpi/hardware/hwtimer.c b/drivers/acpi/hardware/hwtimer.c --- a/drivers/acpi/hardware/hwtimer.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/acpi/hardware/hwtimer.c 2004-11-10 17:19:02 -08:00 @@ -149,10 +149,9 @@ u32 end_ticks, u32 *time_elapsed) { - u32 delta_ticks = 0; - union uint64_overlay normalized_ticks; acpi_status status; - acpi_integer out_quotient; + u32 delta_ticks; + acpi_integer quotient; ACPI_FUNCTION_TRACE ("acpi_get_timer_duration"); @@ -164,7 +163,7 @@ /* * Compute Tick Delta: - * Handle (max one) timer rollovers on 24- versus 32-bit timers. + * Handle (max one) timer rollovers on 24-bit versus 32-bit timers. */ if (start_ticks < end_ticks) { delta_ticks = end_ticks - start_ticks; @@ -181,22 +180,20 @@ delta_ticks = (0xFFFFFFFF - start_ticks) + end_ticks; } } - else { + else /* start_ticks == end_ticks */ { *time_elapsed = 0; return_ACPI_STATUS (AE_OK); } /* - * Compute Duration (Requires a 64-bit divide): + * Compute Duration (Requires a 64-bit multiply and divide): * * time_elapsed = (delta_ticks * 1000000) / PM_TIMER_FREQUENCY; */ - normalized_ticks.full = ((u64) delta_ticks) * 1000000; + status = acpi_ut_short_divide (((u64) delta_ticks) * 1000000, + PM_TIMER_FREQUENCY, "ient, NULL); - status = acpi_ut_short_divide (&normalized_ticks.full, PM_TIMER_FREQUENCY, - &out_quotient, NULL); - - *time_elapsed = (u32) out_quotient; + *time_elapsed = (u32) quotient; return_ACPI_STATUS (status); } diff -Nru a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/acpi/ibm_acpi.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,1237 @@ +/* + * ibm_acpi.c - IBM ThinkPad ACPI Extras + * + * + * Copyright (C) 2004 Borislav Deianov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Changelog: + * + * 2004-08-09 0.1 initial release, support for X series + * 2004-08-14 0.2 support for T series, X20 + * bluetooth enable/disable + * hotkey events disabled by default + * removed fan control, currently useless + * 2004-08-17 0.3 support for R40 + * lcd off, brightness control + * thinklight on/off + * 2004-09-16 0.4 support for module parameters + * hotkey mask can be prefixed by 0x + * video output switching + * video expansion control + * ultrabay eject support + * removed lcd brightness/on/off control, didn't work + * 2004-10-18 0.5 thinklight support on A21e, G40, R32, T20, T21, X20 + * proc file format changed + * video_switch command + * experimental cmos control + * experimental led control + * experimental acpi sounds + * 2004-10-19 0.6 use acpi_bus_register_driver() to claim HKEY device + * 2004-10-23 0.7 fix module loading on A21e, A22p, T20, T21, X20 + * fix LED control on A21e + * 2004-11-08 0.8 fix init error case, don't return from a macro + * thanks to Chris Wright + */ + +#define IBM_VERSION "0.8" + +#include +#include +#include +#include +#include +#include + +#include +#include + +#define IBM_NAME "ibm" +#define IBM_DESC "IBM ThinkPad ACPI Extras" +#define IBM_FILE "ibm_acpi" +#define IBM_URL "http://ibm-acpi.sf.net/" + +#define IBM_DIR IBM_NAME + +#define IBM_LOG IBM_FILE ": " +#define IBM_ERR KERN_ERR IBM_LOG +#define IBM_NOTICE KERN_NOTICE IBM_LOG +#define IBM_INFO KERN_INFO IBM_LOG +#define IBM_DEBUG KERN_DEBUG IBM_LOG + +#define IBM_MAX_ACPI_ARGS 3 + +#define __unused __attribute__ ((unused)) + +static int experimental; +module_param(experimental, int, 0); + +static acpi_handle root_handle = NULL; + +#define IBM_HANDLE(object, parent, paths...) \ + static acpi_handle object##_handle; \ + static acpi_handle *object##_parent = &parent##_handle; \ + static char *object##_paths[] = { paths } + +IBM_HANDLE(ec, root, + "\\_SB.PCI0.ISA.EC", /* A21e, A22p, T20, T21, X20 */ + "\\_SB.PCI0.LPC.EC", /* all others */ +); + +IBM_HANDLE(vid, root, + "\\_SB.PCI0.VID", /* A21e, G40, X30, X40 */ + "\\_SB.PCI0.AGP.VID", /* all others */ +); + +IBM_HANDLE(cmos, root, + "\\UCMS", /* R50, R50p, R51, T4x, X31, X40 */ + "\\CMOS", /* A3x, G40, R32, T23, T30, X22, X24, X30 */ + "\\CMS", /* R40, R40e */ +); /* A21e, A22p, T20, T21, X20 */ + +IBM_HANDLE(dock, root, + "\\_SB.GDCK", /* X30, X31, X40 */ + "\\_SB.PCI0.DOCK", /* A22p, T20, T21, X20 */ + "\\_SB.PCI0.PCI1.DOCK", /* all others */ +); /* A21e, G40, R32, R40, R40e */ + +IBM_HANDLE(bay, root, + "\\_SB.PCI0.IDE0.SCND.MSTR"); /* all except A21e */ +IBM_HANDLE(bayej, root, + "\\_SB.PCI0.IDE0.SCND.MSTR._EJ0"); /* all except A2x, A3x */ + +IBM_HANDLE(lght, root, "\\LGHT"); /* A21e, A22p, T20, T21, X20 */ +IBM_HANDLE(hkey, ec, "HKEY"); /* all */ +IBM_HANDLE(led, ec, "LED"); /* all except A21e, A22p, T20, T21, X20 */ +IBM_HANDLE(sysl, ec, "SYSL"); /* A21e, A22p, T20, T21, X20 */ +IBM_HANDLE(bled, ec, "BLED"); /* A22p, T20, T21, X20 */ +IBM_HANDLE(beep, ec, "BEEP"); /* all models */ + +struct ibm_struct { + char *name; + + char *hid; + struct acpi_driver *driver; + + int (*init) (struct ibm_struct *); + int (*read) (struct ibm_struct *, char *); + int (*write) (struct ibm_struct *, char *); + void (*exit) (struct ibm_struct *); + + void (*notify) (struct ibm_struct *, u32); + acpi_handle *handle; + int type; + struct acpi_device *device; + + int driver_registered; + int proc_created; + int init_called; + int notify_installed; + + int supported; + union { + struct { + int status; + int mask; + } hotkey; + struct { + int autoswitch; + } video; + } state; + + int experimental; +}; + +struct proc_dir_entry *proc_dir = NULL; + +#define onoff(status,bit) ((status) & (1 << (bit)) ? "on" : "off") +#define enabled(status,bit) ((status) & (1 << (bit)) ? "enabled" : "disabled") +#define strlencmp(a,b) (strncmp((a), (b), strlen(b))) + +static int acpi_evalf(acpi_handle handle, + void *res, char *method, char *fmt, ...) +{ + char *fmt0 = fmt; + struct acpi_object_list params; + union acpi_object in_objs[IBM_MAX_ACPI_ARGS]; + struct acpi_buffer result; + union acpi_object out_obj; + acpi_status status; + va_list ap; + char res_type; + int success; + int quiet; + + if (!*fmt) { + printk(IBM_ERR "acpi_evalf() called with empty format\n"); + return 0; + } + + if (*fmt == 'q') { + quiet = 1; + fmt++; + } else + quiet = 0; + + res_type = *(fmt++); + + params.count = 0; + params.pointer = &in_objs[0]; + + va_start(ap, fmt); + while (*fmt) { + char c = *(fmt++); + switch (c) { + case 'd': /* int */ + in_objs[params.count].integer.value = va_arg(ap, int); + in_objs[params.count++].type = ACPI_TYPE_INTEGER; + break; + /* add more types as needed */ + default: + printk(IBM_ERR "acpi_evalf() called " + "with invalid format character '%c'\n", c); + return 0; + } + } + va_end(ap); + + result.length = sizeof(out_obj); + result.pointer = &out_obj; + + status = acpi_evaluate_object(handle, method, ¶ms, &result); + + switch (res_type) { + case 'd': /* int */ + if (res) + *(int *)res = out_obj.integer.value; + success = status == AE_OK && out_obj.type == ACPI_TYPE_INTEGER; + break; + case 'v': /* void */ + success = status == AE_OK; + break; + /* add more types as needed */ + default: + printk(IBM_ERR "acpi_evalf() called " + "with invalid format character '%c'\n", res_type); + return 0; + } + + if (!success && !quiet) + printk(IBM_ERR "acpi_evalf(%s, %s, ...) failed: %d\n", + method, fmt0, status); + + return success; +} + +static void __unused acpi_print_int(acpi_handle handle, char *method) +{ + int i; + + if (acpi_evalf(handle, &i, method, "d")) + printk(IBM_INFO "%s = 0x%x\n", method, i); + else + printk(IBM_ERR "error calling %s\n", method); +} + +static char *next_cmd(char **cmds) +{ + char *start = *cmds; + char *end; + + while ((end = strchr(start, ',')) && end == start) + start = end + 1; + + if (!end) + return NULL; + + *end = 0; + *cmds = end + 1; + return start; +} + +static int driver_init(struct ibm_struct *ibm) +{ + printk(IBM_INFO "%s v%s\n", IBM_DESC, IBM_VERSION); + printk(IBM_INFO "%s\n", IBM_URL); + + return 0; +} + +static int driver_read(struct ibm_struct *ibm, char *p) +{ + int len = 0; + + len += sprintf(p + len, "driver:\t\t%s\n", IBM_DESC); + len += sprintf(p + len, "version:\t%s\n", IBM_VERSION); + + return len; +} + +static int hotkey_get(struct ibm_struct *ibm, int *status, int *mask) +{ + if (!acpi_evalf(hkey_handle, status, "DHKC", "d")) + return -EIO; + if (ibm->supported) { + if (!acpi_evalf(hkey_handle, mask, "DHKN", "qd")) + return -EIO; + } else { + *mask = ibm->state.hotkey.mask; + } + return 0; +} + +static int hotkey_set(struct ibm_struct *ibm, int status, int mask) +{ + int i; + + if (!acpi_evalf(hkey_handle, NULL, "MHKC", "vd", status)) + return -EIO; + + if (!ibm->supported) + return 0; + + for (i=0; i<32; i++) { + int bit = ((1 << i) & mask) != 0; + if (!acpi_evalf(hkey_handle, NULL, "MHKM", "vdd", i+1, bit)) + return -EIO; + } + + return 0; +} + +static int hotkey_init(struct ibm_struct *ibm) +{ + int ret; + + ibm->supported = 1; + ret = hotkey_get(ibm, + &ibm->state.hotkey.status, + &ibm->state.hotkey.mask); + if (ret < 0) { + /* mask not supported on A21e, A22p, T20, T21, X20, X22, X24 */ + ibm->supported = 0; + ret = hotkey_get(ibm, + &ibm->state.hotkey.status, + &ibm->state.hotkey.mask); + } + + return ret; +} + +static int hotkey_read(struct ibm_struct *ibm, char *p) +{ + int status, mask; + int len = 0; + + if (hotkey_get(ibm, &status, &mask) < 0) + return -EIO; + + len += sprintf(p + len, "status:\t\t%s\n", enabled(status, 0)); + if (ibm->supported) { + len += sprintf(p + len, "mask:\t\t0x%04x\n", mask); + len += sprintf(p + len, + "commands:\tenable, disable, reset, \n"); + } else { + len += sprintf(p + len, "mask:\t\tnot supported\n"); + len += sprintf(p + len, "commands:\tenable, disable, reset\n"); + } + + return len; +} + +static int hotkey_write(struct ibm_struct *ibm, char *buf) +{ + int status, mask; + char *cmd; + int do_cmd = 0; + + if (hotkey_get(ibm, &status, &mask) < 0) + return -ENODEV; + + while ((cmd = next_cmd(&buf))) { + if (strlencmp(cmd, "enable") == 0) { + status = 1; + } else if (strlencmp(cmd, "disable") == 0) { + status = 0; + } else if (strlencmp(cmd, "reset") == 0) { + status = ibm->state.hotkey.status; + mask = ibm->state.hotkey.mask; + } else if (sscanf(cmd, "0x%x", &mask) == 1) { + /* mask set */ + } else if (sscanf(cmd, "%x", &mask) == 1) { + /* mask set */ + } else + return -EINVAL; + do_cmd = 1; + } + + if (do_cmd && hotkey_set(ibm, status, mask) < 0) + return -EIO; + + return 0; +} + +static void hotkey_exit(struct ibm_struct *ibm) +{ + hotkey_set(ibm, ibm->state.hotkey.status, ibm->state.hotkey.mask); +} + +static void hotkey_notify(struct ibm_struct *ibm, u32 event) +{ + int hkey; + + if (acpi_evalf(hkey_handle, &hkey, "MHKP", "d")) + acpi_bus_generate_event(ibm->device, event, hkey); + else { + printk(IBM_ERR "unknown hotkey event %d\n", event); + acpi_bus_generate_event(ibm->device, event, 0); + } +} + +static int bluetooth_init(struct ibm_struct *ibm) +{ + /* bluetooth not supported on A21e, G40, T20, T21, X20 */ + ibm->supported = acpi_evalf(hkey_handle, NULL, "GBDC", "qv"); + + return 0; +} + +static int bluetooth_status(struct ibm_struct *ibm) +{ + int status; + + if (!ibm->supported || !acpi_evalf(hkey_handle, &status, "GBDC", "d")) + status = 0; + + return status; +} + +static int bluetooth_read(struct ibm_struct *ibm, char *p) +{ + int len = 0; + int status = bluetooth_status(ibm); + + if (!ibm->supported) + len += sprintf(p + len, "status:\t\tnot supported\n"); + else if (!(status & 1)) + len += sprintf(p + len, "status:\t\tnot installed\n"); + else { + len += sprintf(p + len, "status:\t\t%s\n", enabled(status, 1)); + len += sprintf(p + len, "commands:\tenable, disable\n"); + } + + return len; +} + +static int bluetooth_write(struct ibm_struct *ibm, char *buf) +{ + int status = bluetooth_status(ibm); + char *cmd; + int do_cmd = 0; + + if (!ibm->supported) + return -EINVAL; + + while ((cmd = next_cmd(&buf))) { + if (strlencmp(cmd, "enable") == 0) { + status |= 2; + } else if (strlencmp(cmd, "disable") == 0) { + status &= ~2; + } else + return -EINVAL; + do_cmd = 1; + } + + if (do_cmd && !acpi_evalf(hkey_handle, NULL, "SBDC", "vd", status)) + return -EIO; + + return 0; +} + +static int video_init(struct ibm_struct *ibm) +{ + if (!acpi_evalf(vid_handle, + &ibm->state.video.autoswitch, "^VDEE", "d")) + return -ENODEV; + + return 0; +} + +static int video_status(struct ibm_struct *ibm) +{ + int status = 0; + int i; + + acpi_evalf(NULL, NULL, "\\VUPS", "vd", 1); + if (acpi_evalf(NULL, &i, "\\VCDC", "d")) + status |= 0x02 * i; + + acpi_evalf(NULL, NULL, "\\VUPS", "vd", 0); + if (acpi_evalf(NULL, &i, "\\VCDL", "d")) + status |= 0x01 * i; + if (acpi_evalf(NULL, &i, "\\VCDD", "d")) + status |= 0x08 * i; + + if (acpi_evalf(vid_handle, &i, "^VDEE", "d")) + status |= 0x10 * (i & 1); + + return status; +} + +static int video_read(struct ibm_struct *ibm, char *p) +{ + int status = video_status(ibm); + int len = 0; + + len += sprintf(p + len, "lcd:\t\t%s\n", enabled(status, 0)); + len += sprintf(p + len, "crt:\t\t%s\n", enabled(status, 1)); + len += sprintf(p + len, "dvi:\t\t%s\n", enabled(status, 3)); + len += sprintf(p + len, "auto:\t\t%s\n", enabled(status, 4)); + len += sprintf(p + len, "commands:\tlcd_enable, lcd_disable, " + "crt_enable, crt_disable\n"); + len += sprintf(p + len, "commands:\tdvi_enable, dvi_disable, " + "auto_enable, auto_disable\n"); + len += sprintf(p + len, "commands:\tvideo_switch, expand_toggle\n"); + + return len; +} + +static int video_write(struct ibm_struct *ibm, char *buf) +{ + char *cmd; + int enable, disable, status; + + enable = disable = 0; + + while ((cmd = next_cmd(&buf))) { + if (strlencmp(cmd, "lcd_enable") == 0) { + enable |= 0x01; + } else if (strlencmp(cmd, "lcd_disable") == 0) { + disable |= 0x01; + } else if (strlencmp(cmd, "crt_enable") == 0) { + enable |= 0x02; + } else if (strlencmp(cmd, "crt_disable") == 0) { + disable |= 0x02; + } else if (strlencmp(cmd, "dvi_enable") == 0) { + enable |= 0x08; + } else if (strlencmp(cmd, "dvi_disable") == 0) { + disable |= 0x08; + } else if (strlencmp(cmd, "auto_enable") == 0) { + if (!acpi_evalf(vid_handle, NULL, "_DOS", "vd", 1)) + return -EIO; + } else if (strlencmp(cmd, "auto_disable") == 0) { + if (!acpi_evalf(vid_handle, NULL, "_DOS", "vd", 0)) + return -EIO; + } else if (strlencmp(cmd, "video_switch") == 0) { + int autoswitch; + if (!acpi_evalf(vid_handle, &autoswitch, "^VDEE", "d")) + return -EIO; + if (!acpi_evalf(vid_handle, NULL, "_DOS", "vd", 1)) + return -EIO; + if (!acpi_evalf(vid_handle, NULL, "VSWT", "v")) + return -EIO; + if (!acpi_evalf(vid_handle, NULL, "_DOS", "vd", + autoswitch)) + return -EIO; + } else if (strlencmp(cmd, "expand_toggle") == 0) { + if (!acpi_evalf(NULL, NULL, "\\VEXP", "v")) + return -EIO; + } else + return -EINVAL; + } + + if (enable || disable) { + status = (video_status(ibm) & 0x0f & ~disable) | enable; + if (!acpi_evalf(NULL, NULL, "\\VUPS", "vd", 0x80)) + return -EIO; + if (!acpi_evalf(NULL, NULL, "\\VSDS", "vdd", status, 1)) + return -EIO; + } + + return 0; +} + +static void video_exit(struct ibm_struct *ibm) +{ + acpi_evalf(vid_handle, NULL, "_DOS", "vd", + ibm->state.video.autoswitch); +} + +static int light_init(struct ibm_struct *ibm) +{ + /* kblt not supported on G40, R32, X20 */ + ibm->supported = acpi_evalf(ec_handle, NULL, "KBLT", "qv"); + + return 0; +} + +static int light_read(struct ibm_struct *ibm, char *p) +{ + int len = 0; + int status = 0; + + if (ibm->supported) { + if (!acpi_evalf(ec_handle, &status, "KBLT", "d")) + return -EIO; + len += sprintf(p + len, "status:\t\t%s\n", onoff(status, 0)); + } else + len += sprintf(p + len, "status:\t\tunknown\n"); + + len += sprintf(p + len, "commands:\ton, off\n"); + + return len; +} + +static int light_write(struct ibm_struct *ibm, char *buf) +{ + int cmos_cmd, lght_cmd; + char *cmd; + int success; + + while ((cmd = next_cmd(&buf))) { + if (strlencmp(cmd, "on") == 0) { + cmos_cmd = 0x0c; + lght_cmd = 1; + } else if (strlencmp(cmd, "off") == 0) { + cmos_cmd = 0x0d; + lght_cmd = 0; + } else + return -EINVAL; + + success = cmos_handle ? + acpi_evalf(cmos_handle, NULL, NULL, "vd", cmos_cmd) : + acpi_evalf(lght_handle, NULL, NULL, "vd", lght_cmd); + if (!success) + return -EIO; + } + + return 0; +} + +static int _sta(acpi_handle handle) +{ + int status; + + if (!handle || !acpi_evalf(handle, &status, "_STA", "d")) + status = 0; + + return status; +} + +#define dock_docked() (_sta(dock_handle) & 1) + +static int dock_read(struct ibm_struct *ibm, char *p) +{ + int len = 0; + int docked = dock_docked(); + + if (!dock_handle) + len += sprintf(p + len, "status:\t\tnot supported\n"); + else if (!docked) + len += sprintf(p + len, "status:\t\tundocked\n"); + else { + len += sprintf(p + len, "status:\t\tdocked\n"); + len += sprintf(p + len, "commands:\tdock, undock\n"); + } + + return len; +} + +static int dock_write(struct ibm_struct *ibm, char *buf) +{ + char *cmd; + + if (!dock_docked()) + return -EINVAL; + + while ((cmd = next_cmd(&buf))) { + if (strlencmp(cmd, "undock") == 0) { + if (!acpi_evalf(dock_handle, NULL, "_DCK", "vd", 0)) + return -EIO; + if (!acpi_evalf(dock_handle, NULL, "_EJ0", "vd", 1)) + return -EIO; + } else if (strlencmp(cmd, "dock") == 0) { + if (!acpi_evalf(dock_handle, NULL, "_DCK", "vd", 1)) + return -EIO; + } else + return -EINVAL; + } + + return 0; +} + +static void dock_notify(struct ibm_struct *ibm, u32 event) +{ + int docked = dock_docked(); + + if (event == 3 && docked) + acpi_bus_generate_event(ibm->device, event, 1); /* button */ + else if (event == 3 && !docked) + acpi_bus_generate_event(ibm->device, event, 2); /* undock */ + else if (event == 0 && docked) + acpi_bus_generate_event(ibm->device, event, 3); /* dock */ + else { + printk(IBM_ERR "unknown dock event %d, status %d\n", + event, _sta(dock_handle)); + acpi_bus_generate_event(ibm->device, event, 0); /* unknown */ + } +} + +#define bay_occupied() (_sta(bay_handle) & 1) + +static int bay_init(struct ibm_struct *ibm) +{ + /* bay not supported on A21e, A22p, A31, A31p, G40, R32, R40e */ + ibm->supported = bay_handle && bayej_handle && + acpi_evalf(bay_handle, NULL, "_STA", "qv"); + + return 0; +} + +static int bay_read(struct ibm_struct *ibm, char *p) +{ + int len = 0; + int occupied = bay_occupied(); + + if (!ibm->supported) + len += sprintf(p + len, "status:\t\tnot supported\n"); + else if (!occupied) + len += sprintf(p + len, "status:\t\tunoccupied\n"); + else { + len += sprintf(p + len, "status:\t\toccupied\n"); + len += sprintf(p + len, "commands:\teject\n"); + } + + return len; +} + +static int bay_write(struct ibm_struct *ibm, char *buf) +{ + char *cmd; + + while ((cmd = next_cmd(&buf))) { + if (strlencmp(cmd, "eject") == 0) { + if (!ibm->supported || + !acpi_evalf(bay_handle, NULL, "_EJ0", "vd", 1)) + return -EIO; + } else + return -EINVAL; + } + + return 0; +} + +static void bay_notify(struct ibm_struct *ibm, u32 event) +{ + acpi_bus_generate_event(ibm->device, event, 0); +} + +static int cmos_read(struct ibm_struct *ibm, char *p) +{ + int len = 0; + + /* cmos not supported on A21e, A22p, T20, T21, X20 */ + if (!cmos_handle) + len += sprintf(p + len, "status:\t\tnot supported\n"); + else { + len += sprintf(p + len, "status:\t\tsupported\n"); + len += sprintf(p + len, "commands:\t\n"); + } + + return len; +} + +static int cmos_write(struct ibm_struct *ibm, char *buf) +{ + char *cmd; + int cmos_cmd; + + if (!cmos_handle) + return -EINVAL; + + while ((cmd = next_cmd(&buf))) { + if (sscanf(cmd, "%u", &cmos_cmd) == 1) { + /* cmos_cmd set */ + } else + return -EINVAL; + + if (!acpi_evalf(cmos_handle, NULL, NULL, "vd", cmos_cmd)) + return -EIO; + } + + return 0; +} + +static int led_read(struct ibm_struct *ibm, char *p) +{ + int len = 0; + + len += sprintf(p + len, "commands:\t" + " on, off, blink\n"); + + return len; +} + +static int led_write(struct ibm_struct *ibm, char *buf) +{ + char *cmd; + unsigned int led; + int led_cmd, sysl_cmd, bled_a, bled_b; + + while ((cmd = next_cmd(&buf))) { + if (sscanf(cmd, "%u", &led) != 1) + return -EINVAL; + + if (strstr(cmd, "blink")) { + led_cmd = 0xc0; + sysl_cmd = 2; + bled_a = 2; + bled_b = 1; + } else if (strstr(cmd, "on")) { + led_cmd = 0x80; + sysl_cmd = 1; + bled_a = 2; + bled_b = 0; + } else if (strstr(cmd, "off")) { + led_cmd = sysl_cmd = bled_a = bled_b = 0; + } else + return -EINVAL; + + if (led_handle) { + if (!acpi_evalf(led_handle, NULL, NULL, "vdd", + led, led_cmd)) + return -EIO; + } else if (led < 2) { + if (acpi_evalf(sysl_handle, NULL, NULL, "vdd", + led, sysl_cmd)) + return -EIO; + } else if (led == 2 && bled_handle) { + if (acpi_evalf(bled_handle, NULL, NULL, "vdd", + bled_a, bled_b)) + return -EIO; + } else + return -EINVAL; + } + + return 0; +} + +static int beep_read(struct ibm_struct *ibm, char *p) +{ + int len = 0; + + len += sprintf(p + len, "commands:\t\n"); + + return len; +} + +static int beep_write(struct ibm_struct *ibm, char *buf) +{ + char *cmd; + int beep_cmd; + + while ((cmd = next_cmd(&buf))) { + if (sscanf(cmd, "%u", &beep_cmd) == 1) { + /* beep_cmd set */ + } else + return -EINVAL; + + if (!acpi_evalf(beep_handle, NULL, NULL, "vd", beep_cmd)) + return -EIO; + } + + return 0; +} + +struct ibm_struct ibms[] = { + { + .name = "driver", + .init = driver_init, + .read = driver_read, + }, + { + .name = "hotkey", + .hid = "IBM0068", + .init = hotkey_init, + .read = hotkey_read, + .write = hotkey_write, + .exit = hotkey_exit, + .notify = hotkey_notify, + .handle = &hkey_handle, + .type = ACPI_DEVICE_NOTIFY, + }, + { + .name = "bluetooth", + .init = bluetooth_init, + .read = bluetooth_read, + .write = bluetooth_write, + }, + { + .name = "video", + .init = video_init, + .read = video_read, + .write = video_write, + .exit = video_exit, + }, + { + .name = "light", + .init = light_init, + .read = light_read, + .write = light_write, + }, + { + .name = "dock", + .read = dock_read, + .write = dock_write, + .notify = dock_notify, + .handle = &dock_handle, + .type = ACPI_SYSTEM_NOTIFY, + }, + { + .name = "bay", + .init = bay_init, + .read = bay_read, + .write = bay_write, + .notify = bay_notify, + .handle = &bay_handle, + .type = ACPI_SYSTEM_NOTIFY, + }, + { + .name = "cmos", + .read = cmos_read, + .write = cmos_write, + .experimental = 1, + }, + { + .name = "led", + .read = led_read, + .write = led_write, + .experimental = 1, + }, + { + .name = "beep", + .read = beep_read, + .write = beep_write, + .experimental = 1, + }, +}; +#define NUM_IBMS (sizeof(ibms)/sizeof(ibms[0])) + +static int dispatch_read(char *page, char **start, off_t off, int count, + int *eof, void *data) +{ + struct ibm_struct *ibm = (struct ibm_struct *)data; + int len; + + if (!ibm || !ibm->read) + return -EINVAL; + + len = ibm->read(ibm, page); + if (len < 0) + return len; + + if (len <= off + count) + *eof = 1; + *start = page + off; + len -= off; + if (len > count) + len = count; + if (len < 0) + len = 0; + + return len; +} + +static int dispatch_write(struct file *file, const char __user *userbuf, + unsigned long count, void *data) +{ + struct ibm_struct *ibm = (struct ibm_struct *)data; + char *kernbuf; + int ret; + + if (!ibm || !ibm->write) + return -EINVAL; + + kernbuf = kmalloc(count + 2, GFP_KERNEL); + if (!kernbuf) + return -ENOMEM; + + if (copy_from_user(kernbuf, userbuf, count)) { + kfree(kernbuf); + return -EFAULT; + } + + kernbuf[count] = 0; + strcat(kernbuf, ","); + ret = ibm->write(ibm, kernbuf); + if (ret == 0) + ret = count; + + kfree(kernbuf); + + return ret; +} + +static void dispatch_notify(acpi_handle handle, u32 event, void *data) +{ + struct ibm_struct *ibm = (struct ibm_struct *)data; + + if (!ibm || !ibm->notify) + return; + + ibm->notify(ibm, event); +} + +static int setup_notify(struct ibm_struct *ibm) +{ + acpi_status status; + int ret; + + if (!*ibm->handle) + return 0; + + ret = acpi_bus_get_device(*ibm->handle, &ibm->device); + if (ret < 0) { + printk(IBM_ERR "%s device not present\n", ibm->name); + return 0; + } + + acpi_driver_data(ibm->device) = ibm; + sprintf(acpi_device_class(ibm->device), "%s/%s", IBM_NAME, ibm->name); + + status = acpi_install_notify_handler(*ibm->handle, ibm->type, + dispatch_notify, ibm); + if (ACPI_FAILURE(status)) { + printk(IBM_ERR "acpi_install_notify_handler(%s) failed: %d\n", + ibm->name, status); + return -ENODEV; + } + + ibm->notify_installed = 1; + + return 0; +} + +static int device_add(struct acpi_device *device) +{ + return 0; +} + +static int register_driver(struct ibm_struct *ibm) +{ + int ret; + + ibm->driver = kmalloc(sizeof(struct acpi_driver), GFP_KERNEL); + if (!ibm->driver) { + printk(IBM_ERR "kmalloc(ibm->driver) failed\n"); + return -1; + } + + memset(ibm->driver, 0, sizeof(struct acpi_driver)); + sprintf(ibm->driver->name, "%s/%s", IBM_NAME, ibm->name); + ibm->driver->ids = ibm->hid; + ibm->driver->ops.add = &device_add; + + ret = acpi_bus_register_driver(ibm->driver); + if (ret < 0) { + printk(IBM_ERR "acpi_bus_register_driver(%s) failed: %d\n", + ibm->hid, ret); + kfree(ibm->driver); + } + + return ret; +} + +static int ibm_init(struct ibm_struct *ibm) +{ + int ret; + struct proc_dir_entry *entry; + + if (ibm->experimental && !experimental) + return 0; + + if (ibm->hid) { + ret = register_driver(ibm); + if (ret < 0) + return ret; + ibm->driver_registered = 1; + } + + if (ibm->init) { + ret = ibm->init(ibm); + if (ret != 0) + return ret; + ibm->init_called = 1; + } + + entry = create_proc_entry(ibm->name, S_IFREG | S_IRUGO | S_IWUSR, + proc_dir); + if (!entry) { + printk(IBM_ERR "unable to create proc entry %s\n", ibm->name); + return -ENODEV; + } + entry->owner = THIS_MODULE; + ibm->proc_created = 1; + + entry->data = ibm; + if (ibm->read) + entry->read_proc = &dispatch_read; + if (ibm->write) + entry->write_proc = &dispatch_write; + + if (ibm->notify) { + ret = setup_notify(ibm); + if (ret < 0) + return ret; + } + + return 0; +} + +static void ibm_exit(struct ibm_struct *ibm) +{ + if (ibm->notify_installed) + acpi_remove_notify_handler(*ibm->handle, ibm->type, + dispatch_notify); + + if (ibm->proc_created) + remove_proc_entry(ibm->name, proc_dir); + + if (ibm->init_called && ibm->exit) + ibm->exit(ibm); + + if (ibm->driver_registered) { + acpi_bus_unregister_driver(ibm->driver); + kfree(ibm->driver); + } +} + +static int ibm_handle_init(char *name, + acpi_handle *handle, acpi_handle parent, + char **paths, int num_paths, int required) +{ + int i; + acpi_status status; + + for (i=0; i=0; i--) + ibm_exit(&ibms[i]); + + remove_proc_entry(IBM_DIR, acpi_root_dir); +} + +static int __init acpi_ibm_init(void) +{ + int ret, i; + + if (acpi_disabled) + return -ENODEV; + + /* these handles are required */ + if (IBM_HANDLE_INIT(ec, 1) < 0 || + IBM_HANDLE_INIT(hkey, 1) < 0 || + IBM_HANDLE_INIT(vid, 1) < 0 || + IBM_HANDLE_INIT(beep, 1) < 0) + return -ENODEV; + + /* these handles have alternatives */ + IBM_HANDLE_INIT(lght, 0); + if (IBM_HANDLE_INIT(cmos, !lght_handle) < 0) + return -ENODEV; + IBM_HANDLE_INIT(sysl, 0); + if (IBM_HANDLE_INIT(led, !sysl_handle) < 0) + return -ENODEV; + + /* these handles are not required */ + IBM_HANDLE_INIT(dock, 0); + IBM_HANDLE_INIT(bay, 0); + IBM_HANDLE_INIT(bayej, 0); + IBM_HANDLE_INIT(bled, 0); + + proc_dir = proc_mkdir(IBM_DIR, acpi_root_dir); + if (!proc_dir) { + printk(IBM_ERR "unable to create proc dir %s", IBM_DIR); + return -ENODEV; + } + proc_dir->owner = THIS_MODULE; + + for (i=0; idata.io; if (io_res->min_base_address != io_res->max_base_address) - return AE_OK; + return_VALUE(AE_OK); if (IS_RESERVED_ADDR(io_res->min_base_address, io_res->range_length)) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Motherboard resources 0x%08x - 0x%08x\n", io_res->min_base_address, @@ -86,7 +86,7 @@ if (requested_res) requested_res->flags &= ~IORESOURCE_BUSY; - return AE_OK; + return_VALUE(AE_OK); } static int acpi_motherboard_add (struct acpi_device *device) diff -Nru a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c --- a/drivers/acpi/namespace/nsaccess.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/acpi/namespace/nsaccess.c 2004-11-10 17:19:07 -08:00 @@ -161,8 +161,10 @@ #if defined (_ACPI_ASL_COMPILER) || defined (_ACPI_DUMP_App) - /* i_aSL Compiler cheats by putting parameter count in the owner_iD */ - + /* + * i_aSL Compiler cheats by putting parameter count + * in the owner_iD + */ new_node->owner_id = obj_desc->method.param_count; #else /* Mark this as a very SPECIAL method */ @@ -204,6 +206,7 @@ status = acpi_os_create_semaphore (ACPI_NO_UNIT_LIMIT, 1, &obj_desc->mutex.semaphore); if (ACPI_FAILURE (status)) { + acpi_ut_remove_reference (obj_desc); goto unlock_and_exit; } @@ -219,6 +222,7 @@ status = acpi_os_create_semaphore (1, 1, &obj_desc->mutex.semaphore); if (ACPI_FAILURE (status)) { + acpi_ut_remove_reference (obj_desc); goto unlock_and_exit; } } @@ -236,7 +240,8 @@ /* Store pointer to value descriptor in the Node */ - status = acpi_ns_attach_object (new_node, obj_desc, ACPI_GET_OBJECT_TYPE (obj_desc)); + status = acpi_ns_attach_object (new_node, obj_desc, + ACPI_GET_OBJECT_TYPE (obj_desc)); /* Remove local reference to the object */ @@ -462,7 +467,8 @@ type = this_node->type; ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, - "Prefix-only Pathname (Zero name segments), Flags=%X\n", flags)); + "Prefix-only Pathname (Zero name segments), Flags=%X\n", + flags)); break; case AML_DUAL_NAME_PREFIX: @@ -554,7 +560,7 @@ /* Try to find the single (4 character) ACPI name */ status = acpi_ns_search_and_enter (simple_name, walk_state, current_node, - interpreter_mode, this_search_type, local_flags, &this_node); + interpreter_mode, this_search_type, local_flags, &this_node); if (ACPI_FAILURE (status)) { if (status == AE_NOT_FOUND) { /* Name not found in ACPI namespace */ diff -Nru a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c --- a/drivers/acpi/namespace/nsalloc.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/namespace/nsalloc.c 2004-11-10 17:19:04 -08:00 @@ -502,8 +502,8 @@ * visit the node */ level++; - parent_node = child_node; - child_node = NULL; + parent_node = child_node; + child_node = NULL; } } else { @@ -650,8 +650,8 @@ * visit the node */ level++; - parent_node = child_node; - child_node = NULL; + parent_node = child_node; + child_node = NULL; } else if (child_node->owner_id == owner_id) { deletion_node = child_node; diff -Nru a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c --- a/drivers/acpi/namespace/nsdump.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/acpi/namespace/nsdump.c 2004-11-10 17:19:06 -08:00 @@ -198,7 +198,8 @@ } if (!acpi_ut_valid_acpi_name (this_node->name.integer)) { - ACPI_REPORT_WARNING (("Invalid ACPI Name %08X\n", this_node->name.integer)); + ACPI_REPORT_WARNING (("Invalid ACPI Name %08X\n", + this_node->name.integer)); } /* @@ -226,9 +227,8 @@ case ACPI_TYPE_PROCESSOR: acpi_os_printf ("ID %X Len %.4X Addr %p\n", - obj_desc->processor.proc_id, - obj_desc->processor.length, - (char *) obj_desc->processor.address); + obj_desc->processor.proc_id, obj_desc->processor.length, + (char *) obj_desc->processor.address); break; @@ -241,16 +241,15 @@ case ACPI_TYPE_METHOD: acpi_os_printf ("Args %X Len %.4X Aml %p\n", - (u32) obj_desc->method.param_count, - obj_desc->method.aml_length, - obj_desc->method.aml_start); + (u32) obj_desc->method.param_count, + obj_desc->method.aml_length, obj_desc->method.aml_start); break; case ACPI_TYPE_INTEGER: acpi_os_printf ("= %8.8X%8.8X\n", - ACPI_FORMAT_UINT64 (obj_desc->integer.value)); + ACPI_FORMAT_UINT64 (obj_desc->integer.value)); break; @@ -258,7 +257,7 @@ if (obj_desc->common.flags & AOPOBJ_DATA_VALID) { acpi_os_printf ("Elements %.2X\n", - obj_desc->package.count); + obj_desc->package.count); } else { acpi_os_printf ("[Length not yet evaluated]\n"); @@ -298,11 +297,12 @@ case ACPI_TYPE_REGION: - acpi_os_printf ("[%s]", acpi_ut_get_region_name (obj_desc->region.space_id)); + acpi_os_printf ("[%s]", + acpi_ut_get_region_name (obj_desc->region.space_id)); if (obj_desc->region.flags & AOPOBJ_DATA_VALID) { acpi_os_printf (" Addr %8.8X%8.8X Len %.4X\n", - ACPI_FORMAT_UINT64 (obj_desc->region.address), - obj_desc->region.length); + ACPI_FORMAT_UINT64 (obj_desc->region.address), + obj_desc->region.length); } else { acpi_os_printf (" [Address/Length not yet evaluated]\n"); @@ -313,7 +313,7 @@ case ACPI_TYPE_LOCAL_REFERENCE: acpi_os_printf ("[%s]\n", - acpi_ps_get_opcode_name (obj_desc->reference.opcode)); + acpi_ps_get_opcode_name (obj_desc->reference.opcode)); break; @@ -322,7 +322,7 @@ if (obj_desc->buffer_field.buffer_obj && obj_desc->buffer_field.buffer_obj->buffer.node) { acpi_os_printf ("Buf [%4.4s]", - acpi_ut_get_node_name (obj_desc->buffer_field.buffer_obj->buffer.node)); + acpi_ut_get_node_name (obj_desc->buffer_field.buffer_obj->buffer.node)); } break; @@ -330,30 +330,31 @@ case ACPI_TYPE_LOCAL_REGION_FIELD: acpi_os_printf ("Rgn [%4.4s]", - acpi_ut_get_node_name (obj_desc->common_field.region_obj->region.node)); + acpi_ut_get_node_name (obj_desc->common_field.region_obj->region.node)); break; case ACPI_TYPE_LOCAL_BANK_FIELD: acpi_os_printf ("Rgn [%4.4s] Bnk [%4.4s]", - acpi_ut_get_node_name (obj_desc->common_field.region_obj->region.node), - acpi_ut_get_node_name (obj_desc->bank_field.bank_obj->common_field.node)); + acpi_ut_get_node_name (obj_desc->common_field.region_obj->region.node), + acpi_ut_get_node_name (obj_desc->bank_field.bank_obj->common_field.node)); break; case ACPI_TYPE_LOCAL_INDEX_FIELD: acpi_os_printf ("Idx [%4.4s] Dat [%4.4s]", - acpi_ut_get_node_name (obj_desc->index_field.index_obj->common_field.node), - acpi_ut_get_node_name (obj_desc->index_field.data_obj->common_field.node)); + acpi_ut_get_node_name (obj_desc->index_field.index_obj->common_field.node), + acpi_ut_get_node_name (obj_desc->index_field.data_obj->common_field.node)); break; case ACPI_TYPE_LOCAL_ALIAS: case ACPI_TYPE_LOCAL_METHOD_ALIAS: - acpi_os_printf ("Target %4.4s (%p)\n", acpi_ut_get_node_name (obj_desc), obj_desc); + acpi_os_printf ("Target %4.4s (%p)\n", + acpi_ut_get_node_name (obj_desc), obj_desc); break; default: @@ -371,10 +372,10 @@ case ACPI_TYPE_LOCAL_INDEX_FIELD: acpi_os_printf (" Off %.3X Len %.2X Acc %.2hd\n", - (obj_desc->common_field.base_byte_offset * 8) - + obj_desc->common_field.start_field_bit_offset, - obj_desc->common_field.bit_length, - obj_desc->common_field.access_byte_width); + (obj_desc->common_field.base_byte_offset * 8) + + obj_desc->common_field.start_field_bit_offset, + obj_desc->common_field.bit_length, + obj_desc->common_field.access_byte_width); break; default: @@ -471,12 +472,13 @@ obj_type = ACPI_GET_OBJECT_TYPE (obj_desc); if (obj_type > ACPI_TYPE_LOCAL_MAX) { - acpi_os_printf ("(Ptr to ACPI Object type %X [UNKNOWN])\n", obj_type); + acpi_os_printf ("(Ptr to ACPI Object type %X [UNKNOWN])\n", + obj_type); bytes_to_dump = 32; } else { acpi_os_printf ("(Ptr to ACPI Object type %s, %X)\n", - acpi_ut_get_type_name (obj_type), obj_type); + acpi_ut_get_type_name (obj_type), obj_type); bytes_to_dump = sizeof (union acpi_operand_object); } break; @@ -484,8 +486,9 @@ default: - acpi_os_printf ("(String or Buffer ptr - not an object descriptor) [%s]\n", - acpi_ut_get_descriptor_name (obj_desc)); + acpi_os_printf ( + "(String or Buffer ptr - not an object descriptor) [%s]\n", + acpi_ut_get_descriptor_name (obj_desc)); bytes_to_dump = 16; break; } @@ -552,7 +555,7 @@ * FUNCTION: acpi_ns_dump_objects * * PARAMETERS: Type - Object type to be dumped - * max_depth - Maximum depth of dump. Use ACPI_UINT32_MAX + * max_depth - Maximum depth of dump. Use ACPI_UINT32_MAX * for an effectively unlimited depth. * owner_id - Dump only objects owned by this ID. Use * ACPI_UINT32_MAX to match all owners. diff -Nru a/drivers/acpi/namespace/nsdumpdv.c b/drivers/acpi/namespace/nsdumpdv.c --- a/drivers/acpi/namespace/nsdumpdv.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/acpi/namespace/nsdumpdv.c 2004-11-10 17:19:02 -08:00 @@ -91,10 +91,10 @@ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_TABLES, " ")); } - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_TABLES, " HID: %s, ADR: %8.8X%8.8X, Status: %X\n", - info->hardware_id.value, - ACPI_FORMAT_UINT64 (info->address), - info->current_status)); + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_TABLES, + " HID: %s, ADR: %8.8X%8.8X, Status: %X\n", + info->hardware_id.value, ACPI_FORMAT_UINT64 (info->address), + info->current_status)); ACPI_MEM_FREE (info); } @@ -133,7 +133,8 @@ return; } - ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "Display of all devices in the namespace:\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, + "Display of all devices in the namespace:\n")); status = acpi_ns_walk_namespace (ACPI_TYPE_DEVICE, sys_bus_handle, ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK, diff -Nru a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c --- a/drivers/acpi/namespace/nseval.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/namespace/nseval.c 2004-11-10 17:19:04 -08:00 @@ -57,14 +57,9 @@ * * FUNCTION: acpi_ns_evaluate_relative * - * PARAMETERS: Handle - The relative containing object - * Pathname - Name of method to execute, If NULL, the + * PARAMETERS: Pathname - Name of method to execute, If NULL, the * handle is the object to execute - * Params - List of parameters to pass to the method, - * terminated by NULL. Params itself may be - * NULL if no parameters are being passed. - * return_object - Where to put method's return value (if - * any). If NULL, no value is returned. + * Info - Method info block * * RETURN: Status * @@ -138,8 +133,7 @@ } /* - * Now that we have a handle to the object, we can attempt - * to evaluate it. + * Now that we have a handle to the object, we can attempt to evaluate it. */ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%s [%p] Value %p\n", pathname, node, acpi_ns_get_attached_object (node))); @@ -165,9 +159,9 @@ * * PARAMETERS: Pathname - Fully qualified pathname to the object * Info - Contains: - * return_object - Where to put method's return value (if + * return_object - Where to put method's return value (if * any). If NULL, no value is returned. - * Params - List of parameters to pass to the method, + * Params - List of parameters to pass to the method, * terminated by NULL. Params itself may be * NULL if no parameters are being passed. * @@ -213,14 +207,14 @@ (void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE); if (ACPI_FAILURE (status)) { - ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Object at [%s] was not found, status=%.4X\n", + ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, + "Object at [%s] was not found, status=%.4X\n", pathname, status)); goto cleanup; } /* - * Now that we have a handle to the object, we can attempt - * to evaluate it. + * Now that we have a handle to the object, we can attempt to evaluate it. */ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%s [%p] Value %p\n", pathname, info->node, acpi_ns_get_attached_object (info->node))); @@ -303,9 +297,8 @@ } /* - * For a method alias, we must grab the actual method node - * so that proper scoping context will be established - * before execution. + * For a method alias, we must grab the actual method node so that proper + * scoping context will be established before execution. */ if (acpi_ns_get_type (info->node) == ACPI_TYPE_LOCAL_METHOD_ALIAS) { info->node = ACPI_CAST_PTR (struct acpi_namespace_node, info->node->object); @@ -314,11 +307,9 @@ /* * Two major cases here: * 1) The object is an actual control method -- execute it. - * 2) The object is not a method -- just return it's current - * value + * 2) The object is not a method -- just return it's current value * - * In both cases, the namespace is unlocked by the - * acpi_ns* procedure + * In both cases, the namespace is unlocked by the acpi_ns* procedure */ if (acpi_ns_get_type (info->node) == ACPI_TYPE_METHOD) { /* @@ -328,15 +319,13 @@ } else { /* - * Case 2) Object is NOT a method, just return its - * current value + * Case 2) Object is NOT a method, just return its current value */ status = acpi_ns_get_object_value (info); } /* - * Check if there is a return value on the stack that must - * be dealt with + * Check if there is a return value on the stack that must be dealt with */ if (status == AE_CTRL_RETURN_VALUE) { /* Map AE_CTRL_RETURN_VALUE to AE_OK, we are done with it */ @@ -345,8 +334,8 @@ } /* - * Namespace was unlocked by the handling acpi_ns* function, - * so we just return + * Namespace was unlocked by the handling acpi_ns* function, so we + * just return */ return_ACPI_STATUS (status); } @@ -356,12 +345,7 @@ * * FUNCTION: acpi_ns_execute_control_method * - * PARAMETERS: method_node - The method to execute - * Params - List of parameters to pass to the method, - * terminated by NULL. Params itself may be - * NULL if no parameters are being passed. - * return_obj_desc - List of result objects to be returned - * from the method. + * PARAMETERS: Info - Method info block (w/params) * * RETURN: Status * @@ -430,8 +414,7 @@ * * FUNCTION: acpi_ns_get_object_value * - * PARAMETERS: Node - The object - * return_obj_desc - Where the objects value is returned + * PARAMETERS: Info - Method info block (w/params) * * RETURN: Status * @@ -453,28 +436,25 @@ /* - * Objects require additional resolution steps (e.g., the - * Node may be a field that must be read, etc.) -- we can't just grab - * the object out of the node. + * Objects require additional resolution steps (e.g., the Node may be a + * field that must be read, etc.) -- we can't just grab the object out of + * the node. */ /* - * Use resolve_node_to_value() to get the associated value. This call - * always deletes obj_desc (allocated above). + * Use resolve_node_to_value() to get the associated value. This call always + * deletes obj_desc (allocated above). * - * NOTE: we can get away with passing in NULL for a walk state - * because obj_desc is guaranteed to not be a reference to either - * a method local or a method argument (because this interface can only be - * called from the acpi_evaluate external interface, never called from - * a running control method.) + * NOTE: we can get away with passing in NULL for a walk state because + * obj_desc is guaranteed to not be a reference to either a method local or + * a method argument (because this interface can only be called from the + * acpi_evaluate external interface, never called from a running method.) * - * Even though we do not directly invoke the interpreter - * for this, we must enter it because we could access an opregion. - * The opregion access code assumes that the interpreter - * is locked. + * Even though we do not directly invoke the interpreter for this, we must + * enter it because we could access an opregion. The opregion access code + * assumes that the interpreter is locked. * - * We must release the namespace lock before entering the - * intepreter. + * We must release the namespace lock before entering the intepreter. */ status = acpi_ut_release_mutex (ACPI_MTX_NAMESPACE); if (ACPI_FAILURE (status)) { @@ -485,16 +465,18 @@ if (ACPI_SUCCESS (status)) { status = acpi_ex_resolve_node_to_value (&resolved_node, NULL); /* - * If acpi_ex_resolve_node_to_value() succeeded, the return value was - * placed in resolved_node. + * If acpi_ex_resolve_node_to_value() succeeded, the return value was placed + * in resolved_node. */ acpi_ex_exit_interpreter (); if (ACPI_SUCCESS (status)) { status = AE_CTRL_RETURN_VALUE; - info->return_object = ACPI_CAST_PTR (union acpi_operand_object, resolved_node); + info->return_object = ACPI_CAST_PTR + (union acpi_operand_object, resolved_node); ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Returning object %p [%s]\n", - info->return_object, acpi_ut_get_object_type_name (info->return_object))); + info->return_object, + acpi_ut_get_object_type_name (info->return_object))); } } diff -Nru a/drivers/acpi/namespace/nsinit.c b/drivers/acpi/namespace/nsinit.c --- a/drivers/acpi/namespace/nsinit.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/namespace/nsinit.c 2004-11-10 17:19:04 -08:00 @@ -77,7 +77,8 @@ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "**** Starting initialization of namespace objects ****\n")); - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Completing Region/Field/Buffer/Package initialization:")); + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, + "Completing Region/Field/Buffer/Package initialization:")); /* Set all init info to zero */ @@ -142,7 +143,8 @@ info.num_STA = 0; info.num_INI = 0; - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Executing all Device _STA and_INI methods:")); + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, + "Executing all Device _STA and_INI methods:")); status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE); if (ACPI_FAILURE (status)) { @@ -257,8 +259,8 @@ } /* - * Each of these types can contain executable AML code within - * the declaration. + * Each of these types can contain executable AML code within the + * declaration. */ switch (type) { case ACPI_TYPE_REGION: @@ -267,21 +269,18 @@ status = acpi_ds_get_region_arguments (obj_desc); break; - case ACPI_TYPE_BUFFER_FIELD: info->field_init++; status = acpi_ds_get_buffer_field_arguments (obj_desc); break; - case ACPI_TYPE_BUFFER: info->buffer_init++; status = acpi_ds_get_buffer_arguments (obj_desc); break; - case ACPI_TYPE_PACKAGE: info->package_init++; @@ -301,15 +300,17 @@ acpi_format_exception (status))); } - /* Print a dot for each object unless we are going to print the entire pathname */ - + /* + * Print a dot for each object unless we are going to print the entire + * pathname + */ if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) { ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, ".")); } /* - * We ignore errors from above, and always return OK, since - * we don't want to abort the walk on any single error. + * We ignore errors from above, and always return OK, since we don't want + * to abort the walk on any single error. */ acpi_ex_exit_interpreter (); return (AE_OK); @@ -363,7 +364,8 @@ return_ACPI_STATUS (AE_OK); } - if ((acpi_dbg_level <= ACPI_LV_ALL_EXCEPTIONS) && (!(acpi_dbg_level & ACPI_LV_INFO))) { + if ((acpi_dbg_level <= ACPI_LV_ALL_EXCEPTIONS) && + (!(acpi_dbg_level & ACPI_LV_INFO))) { ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, ".")); } @@ -428,7 +430,6 @@ status = acpi_gbl_init_handler (pinfo.node, ACPI_INIT_DEVICE_INI); } - return_ACPI_STATUS (status); } diff -Nru a/drivers/acpi/namespace/nsload.c b/drivers/acpi/namespace/nsload.c --- a/drivers/acpi/namespace/nsload.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/acpi/namespace/nsload.c 2004-11-10 17:19:06 -08:00 @@ -92,12 +92,14 @@ return_ACPI_STATUS (AE_BAD_PARAMETER); } - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "AML block at %p\n", table_desc->aml_start)); + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "AML block at %p\n", + table_desc->aml_start)); /* Ignore table if there is no AML contained within */ if (!table_desc->aml_length) { - ACPI_REPORT_WARNING (("Zero-length AML block in table [%4.4s]\n", table_desc->pointer->signature)); + ACPI_REPORT_WARNING (("Zero-length AML block in table [%4.4s]\n", + table_desc->pointer->signature)); return_ACPI_STATUS (AE_OK); } @@ -110,7 +112,8 @@ * to another control method, we can't continue parsing * because we don't know how many arguments to parse next! */ - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Loading table into namespace ****\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, + "**** Loading table into namespace ****\n")); status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE); if (ACPI_FAILURE (status)) { @@ -196,7 +199,6 @@ if (ACPI_SUCCESS (status)) { table_desc->loaded_into_namespace = TRUE; } - break; @@ -252,7 +254,6 @@ table_desc = table_desc->next; } - break; diff -Nru a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c --- a/drivers/acpi/namespace/nsnames.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/acpi/namespace/nsnames.c 2004-11-10 17:19:07 -08:00 @@ -202,7 +202,11 @@ next_node = acpi_ns_get_parent_node (next_node); } - return (size + 1); + if (!size) { + size = 1; /* Root node case */ + } + + return (size + 1); /* +1 for null string terminator */ } @@ -253,7 +257,8 @@ acpi_ns_build_external_path (node, required_size, buffer->pointer); - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s [%X] \n", (char *) buffer->pointer, (u32) required_size)); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s [%X] \n", + (char *) buffer->pointer, (u32) required_size)); return_ACPI_STATUS (AE_OK); } diff -Nru a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c --- a/drivers/acpi/namespace/nssearch.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/acpi/namespace/nssearch.c 2004-11-10 17:19:07 -08:00 @@ -96,8 +96,10 @@ scope_name = acpi_ns_get_external_pathname (node); if (scope_name) { - ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching %s (%p) For [%4.4s] (%s)\n", - scope_name, node, (char *) &target_name, acpi_ut_get_type_name (type))); + ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, + "Searching %s (%p) For [%4.4s] (%s)\n", + scope_name, node, (char *) &target_name, + acpi_ut_get_type_name (type))); ACPI_MEM_FREE (scope_name); } @@ -164,7 +166,7 @@ * PARAMETERS: *target_name - Ascii ACPI name to search for * *Node - Starting node where search will begin * Type - Object type to match - * **return_node - Where the matched Named Obj is returned + * **return_node - Where the matched Node is returned * * RETURN: Status * @@ -199,13 +201,13 @@ parent_node = acpi_ns_get_parent_node (node); /* - * If there is no parent (i.e., we are at the root) or - * type is "local", we won't be searching the parent tree. + * If there is no parent (i.e., we are at the root) or type is "local", + * we won't be searching the parent tree. */ if (!parent_node) { ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[%4.4s] has no parent\n", (char *) &target_name)); - return_ACPI_STATUS (AE_NOT_FOUND); + return_ACPI_STATUS (AE_NOT_FOUND); } if (acpi_ns_local (type)) { @@ -217,11 +219,12 @@ /* Search the parent tree */ - ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching parent for %4.4s\n", (char *) &target_name)); + ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, + "Searching parent [%4.4s] for [%4.4s]\n", + acpi_ut_get_node_name (parent_node), (char *) &target_name)); /* - * Search parents until found the target or we have backed up to - * the root + * Search parents until target is found or we have backed up to the root */ while (parent_node) { /* @@ -230,7 +233,7 @@ * the actual name we are searching for. Typechecking comes later. */ status = acpi_ns_search_node (target_name, parent_node, - ACPI_TYPE_ANY, return_node); + ACPI_TYPE_ANY, return_node); if (ACPI_SUCCESS (status)) { return_ACPI_STATUS (status); } @@ -293,7 +296,8 @@ /* Parameter validation */ if (!node || !target_name || !return_node) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Null param: Node %p Name %X return_node %p\n", + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "Null param: Node %p Name %X return_node %p\n", node, target_name, return_node)); ACPI_REPORT_ERROR (("ns_search_and_enter: Null parameter\n")); @@ -330,22 +334,20 @@ } /* - * The name was not found. If we are NOT performing the - * first pass (name entry) of loading the namespace, search - * the parent tree (all the way to the root if necessary.) - * We don't want to perform the parent search when the - * namespace is actually being loaded. We want to perform - * the search when namespace references are being resolved - * (load pass 2) and during the execution phase. + * The name was not found. If we are NOT performing the first pass + * (name entry) of loading the namespace, search the parent tree (all the + * way to the root if necessary.) We don't want to perform the parent + * search when the namespace is actually being loaded. We want to perform + * the search when namespace references are being resolved (load pass 2) + * and during the execution phase. */ if ((interpreter_mode != ACPI_IMODE_LOAD_PASS1) && (flags & ACPI_NS_SEARCH_PARENT)) { /* - * Not found at this level - search parent tree according - * to ACPI specification + * Not found at this level - search parent tree according to the + * ACPI specification */ - status = acpi_ns_search_parent_tree (target_name, node, - type, return_node); + status = acpi_ns_search_parent_tree (target_name, node, type, return_node); if (ACPI_SUCCESS (status)) { return_ACPI_STATUS (status); } @@ -355,7 +357,8 @@ * In execute mode, just search, never add names. Exit now. */ if (interpreter_mode == ACPI_IMODE_EXECUTE) { - ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%4.4s Not found in %p [Not adding]\n", + ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, + "%4.4s Not found in %p [Not adding]\n", (char *) &target_name, node)); return_ACPI_STATUS (AE_NOT_FOUND); diff -Nru a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c --- a/drivers/acpi/namespace/nsutils.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/namespace/nsutils.c 2004-11-10 17:19:04 -08:00 @@ -85,12 +85,14 @@ if (lookup_status == AE_BAD_CHARACTER) { /* There is a non-ascii character in the name */ - acpi_os_printf ("[0x%4.4X] (NON-ASCII)\n", *(ACPI_CAST_PTR (u32, internal_name))); + acpi_os_printf ("[0x%4.4X] (NON-ASCII)\n", + *(ACPI_CAST_PTR (u32, internal_name))); } else { /* Convert path to external format */ - status = acpi_ns_externalize_name (ACPI_UINT32_MAX, internal_name, NULL, &name); + status = acpi_ns_externalize_name (ACPI_UINT32_MAX, + internal_name, NULL, &name); /* Print target name */ @@ -141,7 +143,8 @@ if (path) { - status = acpi_ns_get_node_by_path (path, prefix_node, ACPI_NS_NO_UPSEARCH, &node); + status = acpi_ns_get_node_by_path (path, prefix_node, + ACPI_NS_NO_UPSEARCH, &node); if (ACPI_FAILURE (status)) { acpi_os_printf ("report_method_error: Could not get node\n"); return; @@ -180,7 +183,7 @@ return; } - /* Convert handle to a full pathname and print it (with supplied message) */ + /* Convert handle to full pathname and print it (with supplied message) */ buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; @@ -324,13 +327,11 @@ info->fully_qualified = FALSE; /* - * For the internal name, the required length is 4 bytes - * per segment, plus 1 each for root_prefix, multi_name_prefix_op, - * segment count, trailing null (which is not really needed, - * but no there's harm in putting it there) + * For the internal name, the required length is 4 bytes per segment, plus + * 1 each for root_prefix, multi_name_prefix_op, segment count, trailing null + * (which is not really needed, but no there's harm in putting it there) * - * strlen() + 1 covers the first name_seg, which has no - * path separator + * strlen() + 1 covers the first name_seg, which has no path separator */ if (acpi_ns_valid_root_prefix (next_external_char[0])) { info->fully_qualified = TRUE; @@ -347,10 +348,9 @@ } /* - * Determine the number of ACPI name "segments" by counting - * the number of path separators within the string. Start - * with one segment since the segment count is (# separators) - * + 1, and zero separators is ok. + * Determine the number of ACPI name "segments" by counting the number of + * path separators within the string. Start with one segment since the + * segment count is [(# separators) + 1], and zero separators is ok. */ if (*next_external_char) { info->num_segments = 1; @@ -625,7 +625,8 @@ /* 4-byte names */ names_index = prefix_length + 2; - num_segments = (acpi_native_uint) (u8) internal_name[(acpi_native_uint) (prefix_length + 1)]; + num_segments = (acpi_native_uint) (u8) + internal_name[(acpi_native_uint) (prefix_length + 1)]; break; case AML_DUAL_NAME_PREFIX: @@ -672,7 +673,7 @@ } /* - * Build converted_name... + * Build converted_name */ *converted_name = ACPI_MEM_CALLOCATE (required_length); if (!(*converted_name)) { @@ -756,7 +757,7 @@ * * PARAMETERS: Node - Node to be converted to a Handle * - * RETURN: An USER acpi_handle + * RETURN: A user handle * * DESCRIPTION: Convert a real Node to a namespace handle * @@ -976,7 +977,8 @@ parent_node = acpi_ns_get_parent_node (child_node); if (parent_node) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Parent of %p [%4.4s] is %p [%4.4s]\n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, + "Parent of %p [%4.4s] is %p [%4.4s]\n", child_node, acpi_ut_get_node_name (child_node), parent_node, acpi_ut_get_node_name (parent_node))); @@ -985,7 +987,8 @@ } } - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "unable to find parent of %p (%4.4s)\n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, + "Unable to find parent of %p (%4.4s)\n", child_node, acpi_ut_get_node_name (child_node))); } @@ -1018,11 +1021,9 @@ } /* - * Walk to the end of this peer list. - * The last entry is marked with a flag and the peer - * pointer is really a pointer back to the parent. - * This saves putting a parent back pointer in each and - * every named object! + * Walk to the end of this peer list. The last entry is marked with a flag + * and the peer pointer is really a pointer back to the parent. This saves + * putting a parent back pointer in each and every named object! */ while (!(node->flags & ANOBJ_END_OF_PEER_LIST)) { node = node->peer; @@ -1039,8 +1040,8 @@ * * PARAMETERS: Node - Current table entry * - * RETURN: Next valid Node in the linked node list. NULL if no more valid - * nodess + * RETURN: Next valid Node in the linked node list. NULL if no more valid + * nodes. * * DESCRIPTION: Find the next valid node within a name table. * Useful for implementing NULL-end-of-list loops. diff -Nru a/drivers/acpi/namespace/nswalk.c b/drivers/acpi/namespace/nswalk.c --- a/drivers/acpi/namespace/nswalk.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/acpi/namespace/nswalk.c 2004-11-10 17:19:07 -08:00 @@ -264,8 +264,8 @@ * node, visit the onde */ level++; - parent_node = child_node; - child_node = NULL; + parent_node = child_node; + child_node = NULL; } } } diff -Nru a/drivers/acpi/osl.c b/drivers/acpi/osl.c --- a/drivers/acpi/osl.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/acpi/osl.c 2004-11-10 17:19:06 -08:00 @@ -229,7 +229,7 @@ *new_val = NULL; if (!memcmp (init_val->name, "_OS_", 4) && strlen(acpi_os_name)) { - printk(KERN_INFO PREFIX "Overriding _OS definition %s\n", + printk(KERN_INFO PREFIX "Overriding _OS definition to '%s'\n", acpi_os_name); *new_val = acpi_os_name; } @@ -306,10 +306,10 @@ */ void -acpi_os_sleep(u32 sec, u32 ms) +acpi_os_sleep(acpi_integer ms) { current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ * sec + (ms * HZ) / 1000); + schedule_timeout(((signed long) ms * HZ) / 1000); } void @@ -326,6 +326,29 @@ } } +/* + * Support ACPI 3.0 AML Timer operand + * Returns 64-bit free-running, monotonically increasing timer + * with 100ns granularity + */ +u64 +acpi_os_get_timer (void) +{ + static u64 t; + +#ifdef CONFIG_HPET + /* TBD: use HPET if available */ +#endif + +#ifdef CONFIG_X86_PM_TIMER + /* TBD: default to PM timer if HPET was not available */ +#endif + if (!t) + printk(KERN_ERR PREFIX "acpi_os_get_timer() TBD\n"); + + return(++t); +} + acpi_status acpi_os_read_port( acpi_io_address port, @@ -1007,11 +1030,15 @@ printk(KERN_ERR PREFIX "Fatal opcode executed\n"); break; case ACPI_SIGNAL_BREAKPOINT: - { - char *bp_info = (char*) info; - - printk(KERN_ERR "ACPI breakpoint: %s\n", bp_info); - } + /* + * AML Breakpoint + * ACPI spec. says to treat it as a NOP unless + * you are debugging. So if/when we integrate + * AML debugger into the kernel debugger its + * hook will go here. But until then it is + * not useful to print anything on breakpoints. + */ + break; default: break; } @@ -1100,3 +1127,11 @@ __setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup); +/* + * acpi_cstate_limit is defined in the base kernel so modules can + * change it w/o depending on the state of the processor module. + */ +unsigned int acpi_cstate_limit = ACPI_C_STATES_MAX; + + +EXPORT_SYMBOL(acpi_cstate_limit); diff -Nru a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c --- a/drivers/acpi/parser/psopcode.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/acpi/parser/psopcode.c 2004-11-10 17:19:03 -08:00 @@ -194,6 +194,7 @@ #define ARGP_STRING_OP ARGP_LIST1 (ARGP_CHARLIST) #define ARGP_SUBTRACT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) #define ARGP_THERMAL_ZONE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST) +#define ARGP_TIMER_OP ARG_NONE #define ARGP_TO_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) #define ARGP_TO_BUFFER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) #define ARGP_TO_DEC_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) @@ -317,7 +318,7 @@ #define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) #define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) #define ARGI_SIGNAL_OP ARGI_LIST1 (ARGI_EVENT) -#define ARGI_SIZE_OF_OP ARGI_LIST1 (ARGI_DATAOBJECT) +#define ARGI_SIZE_OF_OP ARGI_LIST1 (ARGI_REFERENCE) /* Force delay of operand resolution */ #define ARGI_SLEEP_OP ARGI_LIST1 (ARGI_INTEGER) #define ARGI_STALL_OP ARGI_LIST1 (ARGI_INTEGER) #define ARGI_STATICSTRING_OP ARGI_INVALID_OPCODE @@ -325,13 +326,14 @@ #define ARGI_STRING_OP ARGI_INVALID_OPCODE #define ARGI_SUBTRACT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) #define ARGI_THERMAL_ZONE_OP ARGI_INVALID_OPCODE +#define ARGI_TIMER_OP ARG_NONE #define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET) #define ARGI_TO_BUFFER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) #define ARGI_TO_DEC_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) #define ARGI_TO_HEX_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) #define ARGI_TO_INTEGER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) #define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_FIXED_TARGET) -#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE) +#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_REFERENCE) /* Force delay of operand resolution */ #define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE) #define ARGI_VAR_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER) #define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_INTEGER) @@ -527,8 +529,8 @@ /* 35 */ ACPI_OP ("CreateByteField", ARGP_CREATE_BYTE_FIELD_OP, ARGI_CREATE_BYTE_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE), /* 36 */ ACPI_OP ("CreateBitField", ARGP_CREATE_BIT_FIELD_OP, ARGI_CREATE_BIT_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE), /* 37 */ ACPI_OP ("ObjectType", ARGP_TYPE_OP, ARGI_TYPE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R, AML_FLAGS_EXEC_1A_0T_1R), -/* 38 */ ACPI_OP ("LAnd", ARGP_LAND_OP, ARGI_LAND_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT), -/* 39 */ ACPI_OP ("LOr", ARGP_LOR_OP, ARGI_LOR_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT), +/* 38 */ ACPI_OP ("LAnd", ARGP_LAND_OP, ARGI_LAND_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL_NUMERIC | AML_CONSTANT), +/* 39 */ ACPI_OP ("LOr", ARGP_LOR_OP, ARGI_LOR_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL_NUMERIC | AML_CONSTANT), /* 3A */ ACPI_OP ("LNot", ARGP_LNOT_OP, ARGI_LNOT_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R, AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT), /* 3B */ ACPI_OP ("LEqual", ARGP_LEQUAL_OP, ARGI_LEQUAL_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT), /* 3C */ ACPI_OP ("LGreater", ARGP_LGREATER_OP, ARGI_LGREATER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT), @@ -588,7 +590,6 @@ /* 6C */ ACPI_OP ("-ASCII_ONLY-", ARG_NONE, ARG_NONE, ACPI_TYPE_ANY, AML_CLASS_ASCII, AML_TYPE_BOGUS, AML_HAS_ARGS), /* 6D */ ACPI_OP ("-PREFIX_ONLY-", ARG_NONE, ARG_NONE, ACPI_TYPE_ANY, AML_CLASS_PREFIX, AML_TYPE_BOGUS, AML_HAS_ARGS), - /* ACPI 2.0 opcodes */ /* 6E */ ACPI_OP ("QwordConst", ARGP_QWORD_OP, ARGI_QWORD_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, AML_CONSTANT), @@ -606,7 +607,11 @@ /* 7A */ ACPI_OP ("Continue", ARGP_CONTINUE_OP, ARGI_CONTINUE_OP, ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, 0), /* 7B */ ACPI_OP ("LoadTable", ARGP_LOAD_TABLE_OP, ARGI_LOAD_TABLE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_6A_0T_1R, AML_FLAGS_EXEC_6A_0T_1R), /* 7C */ ACPI_OP ("DataTableRegion", ARGP_DATA_REGION_OP, ARGI_DATA_REGION_OP, ACPI_TYPE_REGION, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED), -/* 7D */ ACPI_OP ("[EvalSubTree]", ARGP_SCOPE_OP, ARGI_SCOPE_OP, ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_NO_OBJ, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE) +/* 7D */ ACPI_OP ("[EvalSubTree]", ARGP_SCOPE_OP, ARGI_SCOPE_OP, ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_NO_OBJ, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE), + +/* ACPI 3.0 opcodes */ + +/* 7E */ ACPI_OP ("Timer", ARGP_TIMER_OP, ARGI_TIMER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_0A_0T_1R, AML_FLAGS_EXEC_0A_0T_1R) /*! [End] no source code translation !*/ }; @@ -615,7 +620,6 @@ * This table is directly indexed by the opcodes, and returns an * index into the table above */ - static const u8 acpi_gbl_short_op_index[256] = { /* 0 1 2 3 4 5 6 7 */ @@ -654,7 +658,10 @@ /* 0xF8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 0x45, }; - +/* + * This table is indexed by the second opcode of the extended opcode + * pair. It returns an index into the opcode table (acpi_gbl_aml_op_info) + */ static const u8 acpi_gbl_long_op_index[NUM_EXTENDED_OPCODE] = { /* 0 1 2 3 4 5 6 7 */ @@ -665,7 +672,7 @@ /* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 0x7B, /* 0x20 */ 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, /* 0x28 */ 0x52, 0x53, 0x54, _UNK, _UNK, _UNK, _UNK, _UNK, -/* 0x30 */ 0x55, 0x56, 0x57, _UNK, _UNK, _UNK, _UNK, _UNK, +/* 0x30 */ 0x55, 0x56, 0x57, 0x7e, _UNK, _UNK, _UNK, _UNK, /* 0x38 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, /* 0x40 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, /* 0x48 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, @@ -724,7 +731,7 @@ default: - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown extended opcode [%X]\n", opcode)); + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown AML opcode [%4.4X]\n", opcode)); break; } diff -Nru a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c --- a/drivers/acpi/parser/psparse.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/acpi/parser/psparse.c 2004-11-10 17:19:03 -08:00 @@ -164,123 +164,125 @@ /* Delete this op and the subtree below it if asked to */ - if (((walk_state->parse_flags & ACPI_PARSE_TREE_MASK) == ACPI_PARSE_DELETE_TREE) && - (walk_state->op_info->class != AML_CLASS_ARGUMENT)) { - /* Make sure that we only delete this subtree */ + if (((walk_state->parse_flags & ACPI_PARSE_TREE_MASK) != ACPI_PARSE_DELETE_TREE) || + (walk_state->op_info->class == AML_CLASS_ARGUMENT)) { + return_VOID; + } + + /* Make sure that we only delete this subtree */ + + if (op->common.parent) { + /* + * Check if we need to replace the operator and its subtree + * with a return value op (placeholder op) + */ + parent_info = acpi_ps_get_opcode_info (op->common.parent->common.aml_opcode); + + switch (parent_info->class) { + case AML_CLASS_CONTROL: + break; + + case AML_CLASS_CREATE: - if (op->common.parent) { /* - * Check if we need to replace the operator and its subtree - * with a return value op (placeholder op) + * These opcodes contain term_arg operands. The current + * op must be replaced by a placeholder return op */ - parent_info = acpi_ps_get_opcode_info (op->common.parent->common.aml_opcode); - - switch (parent_info->class) { - case AML_CLASS_CONTROL: - break; + replacement_op = acpi_ps_alloc_op (AML_INT_RETURN_VALUE_OP); + if (!replacement_op) { + goto cleanup; + } + break; - case AML_CLASS_CREATE: + case AML_CLASS_NAMED_OBJECT: - /* - * These opcodes contain term_arg operands. The current - * op must be replaced by a placeholder return op - */ + /* + * These opcodes contain term_arg operands. The current + * op must be replaced by a placeholder return op + */ + if ((op->common.parent->common.aml_opcode == AML_REGION_OP) || + (op->common.parent->common.aml_opcode == AML_DATA_REGION_OP) || + (op->common.parent->common.aml_opcode == AML_BUFFER_OP) || + (op->common.parent->common.aml_opcode == AML_PACKAGE_OP) || + (op->common.parent->common.aml_opcode == AML_VAR_PACKAGE_OP)) { replacement_op = acpi_ps_alloc_op (AML_INT_RETURN_VALUE_OP); if (!replacement_op) { - return_VOID; + goto cleanup; } - break; - - case AML_CLASS_NAMED_OBJECT: + } - /* - * These opcodes contain term_arg operands. The current - * op must be replaced by a placeholder return op - */ - if ((op->common.parent->common.aml_opcode == AML_REGION_OP) || - (op->common.parent->common.aml_opcode == AML_DATA_REGION_OP) || - (op->common.parent->common.aml_opcode == AML_BUFFER_OP) || - (op->common.parent->common.aml_opcode == AML_PACKAGE_OP) || - (op->common.parent->common.aml_opcode == AML_VAR_PACKAGE_OP)) { - replacement_op = acpi_ps_alloc_op (AML_INT_RETURN_VALUE_OP); + if ((op->common.parent->common.aml_opcode == AML_NAME_OP) && + (walk_state->descending_callback != acpi_ds_exec_begin_op)) { + if ((op->common.aml_opcode == AML_BUFFER_OP) || + (op->common.aml_opcode == AML_PACKAGE_OP) || + (op->common.aml_opcode == AML_VAR_PACKAGE_OP)) { + replacement_op = acpi_ps_alloc_op (op->common.aml_opcode); if (!replacement_op) { - return_VOID; + goto cleanup; } + + replacement_op->named.data = op->named.data; + replacement_op->named.length = op->named.length; } + } + break; - if ((op->common.parent->common.aml_opcode == AML_NAME_OP) && - (walk_state->descending_callback != acpi_ds_exec_begin_op)) { - if ((op->common.aml_opcode == AML_BUFFER_OP) || - (op->common.aml_opcode == AML_PACKAGE_OP) || - (op->common.aml_opcode == AML_VAR_PACKAGE_OP)) { - replacement_op = acpi_ps_alloc_op (op->common.aml_opcode); - if (!replacement_op) { - return_VOID; - } + default: + replacement_op = acpi_ps_alloc_op (AML_INT_RETURN_VALUE_OP); + if (!replacement_op) { + goto cleanup; + } + } - replacement_op->named.data = op->named.data; - replacement_op->named.length = op->named.length; - } - } - break; + /* We must unlink this op from the parent tree */ - default: - replacement_op = acpi_ps_alloc_op (AML_INT_RETURN_VALUE_OP); - if (!replacement_op) { - return_VOID; - } + prev = op->common.parent->common.value.arg; + if (prev == op) { + /* This op is the first in the list */ + + if (replacement_op) { + replacement_op->common.parent = op->common.parent; + replacement_op->common.value.arg = NULL; + replacement_op->common.node = op->common.node; + op->common.parent->common.value.arg = replacement_op; + replacement_op->common.next = op->common.next; + } + else { + op->common.parent->common.value.arg = op->common.next; } + } - /* We must unlink this op from the parent tree */ + /* Search the parent list */ - prev = op->common.parent->common.value.arg; - if (prev == op) { - /* This op is the first in the list */ + else while (prev) { + /* Traverse all siblings in the parent's argument list */ + next = prev->common.next; + if (next == op) { if (replacement_op) { - replacement_op->common.parent = op->common.parent; - replacement_op->common.value.arg = NULL; - replacement_op->common.node = op->common.node; - op->common.parent->common.value.arg = replacement_op; - replacement_op->common.next = op->common.next; + replacement_op->common.parent = op->common.parent; + replacement_op->common.value.arg = NULL; + replacement_op->common.node = op->common.node; + prev->common.next = replacement_op; + replacement_op->common.next = op->common.next; + next = NULL; } else { - op->common.parent->common.value.arg = op->common.next; + prev->common.next = op->common.next; + next = NULL; } } - /* Search the parent list */ - - else while (prev) { - /* Traverse all siblings in the parent's argument list */ - - next = prev->common.next; - if (next == op) { - if (replacement_op) { - replacement_op->common.parent = op->common.parent; - replacement_op->common.value.arg = NULL; - replacement_op->common.node = op->common.node; - prev->common.next = replacement_op; - replacement_op->common.next = op->common.next; - next = NULL; - } - else { - prev->common.next = op->common.next; - next = NULL; - } - } - - prev = next; - } + prev = next; } + } - /* Now we can actually delete the subtree rooted at op */ - acpi_ps_delete_parse_tree (op); +cleanup: - return_VOID; - } + /* Now we can actually delete the subtree rooted at op */ + acpi_ps_delete_parse_tree (op); return_VOID; } @@ -552,7 +554,8 @@ if (!pre_op) { pre_op = acpi_ps_alloc_op (walk_state->opcode); if (!pre_op) { - return_ACPI_STATUS (AE_NO_MEMORY); + status = AE_NO_MEMORY; + goto close_this_op; } } @@ -578,7 +581,8 @@ /* Make sure that we found a NAME and didn't run out of arguments */ if (!GET_CURRENT_ARG_TYPE (walk_state->arg_types)) { - return_ACPI_STATUS (AE_AML_NO_OPERAND); + status = AE_AML_NO_OPERAND; + goto close_this_op; } /* We know that this arg is a name, move to next arg */ @@ -638,7 +642,8 @@ walk_state->op_info = acpi_ps_get_opcode_info (walk_state->opcode); op = acpi_ps_alloc_op (walk_state->opcode); if (!op) { - return_ACPI_STATUS (AE_NO_MEMORY); + status = AE_NO_MEMORY; + goto close_this_op; } if (walk_state->op_info->flags & AML_CREATE) { @@ -801,7 +806,7 @@ status = acpi_ps_push_scope (parser_state, op, walk_state->arg_types, walk_state->arg_count); if (ACPI_FAILURE (status)) { - return_ACPI_STATUS (status); + goto close_this_op; } op = NULL; continue; @@ -1128,7 +1133,7 @@ else if (status == AE_CTRL_TERMINATE) { status = AE_OK; } - else if (status != AE_OK) { + else if ((status != AE_OK) && (walk_state->method_desc)) { ACPI_REPORT_METHOD_ERROR ("Method execution failed", walk_state->method_node, NULL, status); diff -Nru a/drivers/acpi/parser/psutils.c b/drivers/acpi/parser/psutils.c --- a/drivers/acpi/parser/psutils.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/acpi/parser/psutils.c 2004-11-10 17:19:05 -08:00 @@ -129,10 +129,9 @@ acpi_ps_alloc_op ( u16 opcode) { - union acpi_parse_object *op = NULL; - u32 size; - u8 flags; + union acpi_parse_object *op; const struct acpi_opcode_info *op_info; + u8 flags = ACPI_PARSEOP_GENERIC; ACPI_FUNCTION_ENTRY (); @@ -140,32 +139,28 @@ op_info = acpi_ps_get_opcode_info (opcode); - /* Allocate the minimum required size object */ + /* Determine type of parse_op required */ if (op_info->flags & AML_DEFER) { - size = sizeof (struct acpi_parse_obj_named); flags = ACPI_PARSEOP_DEFERRED; } else if (op_info->flags & AML_NAMED) { - size = sizeof (struct acpi_parse_obj_named); flags = ACPI_PARSEOP_NAMED; } else if (opcode == AML_INT_BYTELIST_OP) { - size = sizeof (struct acpi_parse_obj_named); flags = ACPI_PARSEOP_BYTELIST; } - else { - size = sizeof (struct acpi_parse_obj_common); - flags = ACPI_PARSEOP_GENERIC; - } - if (size == sizeof (struct acpi_parse_obj_common)) { - /* - * The generic op is by far the most common (16 to 1) - */ + /* Allocate the minimum required size object */ + + if (flags == ACPI_PARSEOP_GENERIC) { + /* The generic op (default) is by far the most common (16 to 1) */ + op = acpi_ut_acquire_from_cache (ACPI_MEM_LIST_PSNODE); } else { + /* Extended parseop */ + op = acpi_ut_acquire_from_cache (ACPI_MEM_LIST_PSNODE_EXT); } diff -Nru a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c --- a/drivers/acpi/pci_link.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/acpi/pci_link.c 2004-11-10 17:19:02 -08:00 @@ -110,13 +110,13 @@ switch (resource->id) { case ACPI_RSTYPE_START_DPF: - return AE_OK; + return_ACPI_STATUS(AE_OK); case ACPI_RSTYPE_IRQ: { struct acpi_resource_irq *p = &resource->data.irq; if (!p || !p->number_of_interrupts) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Blank IRQ resource\n")); - return AE_OK; + return_ACPI_STATUS(AE_OK); } for (i = 0; (inumber_of_interrupts && iinterrupts[i]) { @@ -137,7 +137,7 @@ if (!p || !p->number_of_interrupts) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Blank EXT IRQ resource\n")); - return AE_OK; + return_ACPI_STATUS(AE_OK); } for (i = 0; (inumber_of_interrupts && iinterrupts[i]) { @@ -155,10 +155,10 @@ default: ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Resource is not an IRQ entry\n")); - return AE_OK; + return_ACPI_STATUS(AE_OK); } - return AE_CTRL_TERMINATE; + return_ACPI_STATUS(AE_CTRL_TERMINATE); } @@ -207,7 +207,7 @@ */ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Blank IRQ resource\n")); - return AE_OK; + return_ACPI_STATUS(AE_OK); } *irq = p->interrupts[0]; break; @@ -222,7 +222,7 @@ */ ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Blank EXT IRQ resource\n")); - return AE_OK; + return_ACPI_STATUS(AE_OK); } *irq = p->interrupts[0]; break; @@ -230,9 +230,9 @@ default: ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Resource isn't an IRQ\n")); - return AE_OK; + return_ACPI_STATUS(AE_OK); } - return AE_CTRL_TERMINATE; + return_ACPI_STATUS(AE_CTRL_TERMINATE); } /* @@ -786,6 +786,11 @@ return 1; } +void acpi_penalize_isa_irq(int irq) +{ + acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED; +} + /* * Over-ride default table to reserve additional IRQs for use by ISA * e.g. acpi_irq_isa=5 @@ -811,14 +816,14 @@ static int __init acpi_irq_nobalance_set(char *str) { acpi_irq_balance = 0; - return(1); + return 1; } __setup("acpi_irq_nobalance", acpi_irq_nobalance_set); int __init acpi_irq_balance_set(char *str) { acpi_irq_balance = 1; - return(1); + return 1; } __setup("acpi_irq_balance", acpi_irq_balance_set); diff -Nru a/drivers/acpi/power.c b/drivers/acpi/power.c --- a/drivers/acpi/power.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/power.c 2004-11-10 17:19:04 -08:00 @@ -303,7 +303,7 @@ ACPI_FUNCTION_TRACE("acpi_enable_wakeup_device_power"); if (!dev || !dev->wakeup.flags.valid) - return -1; + return_VALUE(-1); arg.integer.value = 1; /* Open power resource */ @@ -313,7 +313,7 @@ ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error transition power state\n")); dev->wakeup.flags.valid = 0; - return -1; + return_VALUE(-1); } } @@ -325,7 +325,7 @@ ret = -1; } - return ret; + return_VALUE(ret); } /* @@ -344,7 +344,7 @@ ACPI_FUNCTION_TRACE("acpi_disable_wakeup_device_power"); if (!dev || !dev->wakeup.flags.valid) - return -1; + return_VALUE(-1); arg.integer.value = 0; /* Execute PSW */ @@ -352,7 +352,7 @@ if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluate _PSW\n")); dev->wakeup.flags.valid = 0; - return -1; + return_VALUE(-1); } /* Close power resource */ @@ -362,11 +362,11 @@ ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error transition power state\n")); dev->wakeup.flags.valid = 0; - return -1; + return_VALUE(-1); } } - return ret; + return_VALUE(ret); } /* -------------------------------------------------------------------------- @@ -513,7 +513,7 @@ resource->references); end: - return 0; + return_VALUE(0); } static int acpi_power_open_fs(struct inode *inode, struct file *file) diff -Nru a/drivers/acpi/processor.c b/drivers/acpi/processor.c --- a/drivers/acpi/processor.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/acpi/processor.c 2004-11-10 17:19:05 -08:00 @@ -39,6 +39,8 @@ #include #include #include +#include +#include #include #include @@ -99,6 +101,8 @@ }, }; +static int c2 = -1; +static int c3 = -1; struct acpi_processor_errata { u8 smp; @@ -140,6 +144,8 @@ static struct acpi_processor *processors[NR_CPUS]; static struct acpi_processor_errata errata; +module_param_named(c2, c2, bool, 0); +module_param_named(c3, c3, bool, 0); static void (*pm_idle_save)(void); @@ -410,8 +416,15 @@ switch (pr->power.state) { case ACPI_STATE_C1: - /* Invoke C1. */ - safe_halt(); + /* + * Invoke C1. + * Use the appropriate idle routine, the one that would + * be used without acpi C-states. + */ + if (pm_idle_save) + pm_idle_save(); + else + safe_halt(); /* * TBD: Can't get time duration while in C1, as resumes * go to an ISR rather than here. Need to instrument @@ -467,8 +480,9 @@ * Track the number of longs (time asleep is greater than threshold) * and promote when the count threshold is reached. Note that bus * mastering activity may prevent promotions. + * Do not promote above acpi_cstate_limit. */ - if (cx->promotion.state) { + if (cx->promotion.state && (cx->promotion.state <= acpi_cstate_limit)) { if (sleep_ticks > cx->promotion.threshold.ticks) { cx->promotion.count++; cx->demotion.count = 0; @@ -506,6 +520,13 @@ end: /* + * Demote if current state exceeds acpi_cstate_limit + */ + if (pr->power.state > acpi_cstate_limit) { + next_state = acpi_cstate_limit; + } + + /* * New Cx State? * ------------- * If we're going to start using a new Cx state we must clean up @@ -656,6 +677,11 @@ else if (errata.smp) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "C2 not supported in SMP mode\n")); + + + else if (!c2) + printk(KERN_INFO "C2 disabled\n"); + /* * Otherwise we've met all of our C2 requirements. * Normalize the C2 latency to expidite policy. @@ -711,6 +737,9 @@ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "C3 not supported on PIIX4 with Type-F DMA\n")); } + else if (!c3) + printk(KERN_INFO "C3 disabled\n"); + /* * Otherwise we've met all of our C3 requirements. * Normalize the C2 latency to expidite policy. Enable @@ -767,7 +796,10 @@ * policy is adjusted accordingly. */ -static int acpi_processor_ppc_is_init = 0; +#define PPC_REGISTERED 1 +#define PPC_IN_USE 2 + +static int acpi_processor_ppc_status = 0; static int acpi_processor_ppc_notifier(struct notifier_block *nb, unsigned long event, @@ -825,6 +857,10 @@ * (e.g. 0 = states 0..n; 1 = states 1..n; etc. */ status = acpi_evaluate_integer(pr->handle, "_PPC", NULL, &ppc); + + if (status != AE_NOT_FOUND) + acpi_processor_ppc_status |= PPC_IN_USE; + if(ACPI_FAILURE(status) && status != AE_NOT_FOUND) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PPC\n")); return_VALUE(-ENODEV); @@ -849,17 +885,17 @@ static void acpi_processor_ppc_init(void) { if (!cpufreq_register_notifier(&acpi_ppc_notifier_block, CPUFREQ_POLICY_NOTIFIER)) - acpi_processor_ppc_is_init = 1; + acpi_processor_ppc_status |= PPC_REGISTERED; else printk(KERN_DEBUG "Warning: Processor Platform Limit not supported.\n"); } static void acpi_processor_ppc_exit(void) { - if (acpi_processor_ppc_is_init) + if (acpi_processor_ppc_status & PPC_REGISTERED) cpufreq_unregister_notifier(&acpi_ppc_notifier_block, CPUFREQ_POLICY_NOTIFIER); - acpi_processor_ppc_is_init = 0; + acpi_processor_ppc_status &= ~PPC_REGISTERED; } /* @@ -1079,6 +1115,73 @@ } +int acpi_processor_notify_smm(struct module *calling_module) { + acpi_status status; + static int is_done = 0; + + ACPI_FUNCTION_TRACE("acpi_processor_notify_smm"); + + if (!(acpi_processor_ppc_status & PPC_REGISTERED)) + return_VALUE(-EBUSY); + + if (!try_module_get(calling_module)) + return_VALUE(-EINVAL); + + /* is_done is set to negative if an error occured, + * and to postitive if _no_ error occured, but SMM + * was already notified. This avoids double notification + * which might lead to unexpected results... + */ + if (is_done > 0) { + module_put(calling_module); + return_VALUE(0); + } + else if (is_done < 0) { + module_put(calling_module); + return_VALUE(is_done); + } + + is_done = -EIO; + + /* Can't write pstate_cnt to smi_cmd if either value is zero */ + if ((!acpi_fadt.smi_cmd) || + (!acpi_fadt.pstate_cnt)) { + ACPI_DEBUG_PRINT((ACPI_DB_INFO, + "No SMI port or pstate_cnt\n")); + module_put(calling_module); + return_VALUE(0); + } + + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Writing pstate_cnt [0x%x] to smi_cmd [0x%x]\n", acpi_fadt.pstate_cnt, acpi_fadt.smi_cmd)); + + /* FADT v1 doesn't support pstate_cnt, many BIOS vendors use + * it anyway, so we need to support it... */ + if (acpi_fadt_is_v1) { + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Using v1.0 FADT reserved value for pstate_cnt\n")); + } + + status = acpi_os_write_port (acpi_fadt.smi_cmd, + (u32) acpi_fadt.pstate_cnt, 8); + if (ACPI_FAILURE (status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Failed to write pstate_cnt [0x%x] to " + "smi_cmd [0x%x]\n", acpi_fadt.pstate_cnt, acpi_fadt.smi_cmd)); + module_put(calling_module); + return_VALUE(status); + } + + /* Success. If there's no _PPC, we need to fear nothing, so + * we can allow the cpufreq driver to be rmmod'ed. */ + is_done = 1; + + if (!(acpi_processor_ppc_status & PPC_IN_USE)) + module_put(calling_module); + + return_VALUE(0); +} +EXPORT_SYMBOL(acpi_processor_notify_smm); + + #ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF /* /proc/acpi/processor/../performance interface (DEPRECATED) */ @@ -1119,7 +1222,7 @@ (u32) pr->performance->states[i].transition_latency); end: - return 0; + return_VALUE(0); } static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file) @@ -1235,7 +1338,7 @@ ACPI_FUNCTION_TRACE("acpi_processor_register_performance"); - if (!acpi_processor_ppc_is_init) + if (!(acpi_processor_ppc_status & PPC_REGISTERED)) return_VALUE(-EINVAL); down(&performance_sem); @@ -1276,9 +1379,6 @@ ACPI_FUNCTION_TRACE("acpi_processor_unregister_performance"); - if (!acpi_processor_ppc_is_init) - return_VOID; - down(&performance_sem); pr = processors[cpu]; @@ -1844,7 +1944,7 @@ pr->flags.limit ? "yes" : "no"); end: - return 0; + return_VALUE(0); } static int acpi_processor_info_open_fs(struct inode *inode, struct file *file) @@ -1899,7 +1999,7 @@ } end: - return 0; + return_VALUE(0); } static int acpi_processor_power_open_fs(struct inode *inode, struct file *file) @@ -1943,7 +2043,7 @@ (pr->throttling.states[i].performance?pr->throttling.states[i].performance/10:0)); end: - return 0; + return_VALUE(0); } static int acpi_processor_throttling_open_fs(struct inode *inode, struct file *file) @@ -2004,7 +2104,7 @@ pr->limit.thermal.px, pr->limit.thermal.tx); end: - return 0; + return_VALUE(0); } static int acpi_processor_limit_open_fs(struct inode *inode, struct file *file) @@ -2379,22 +2479,28 @@ /* * Install the idle handler if processor power management is supported. - * Note that the default idle handler (default_idle) will be used on + * Note that we use previously set idle handler will be used on * platforms that only support C1. */ - if ((pr->id == 0) && (pr->flags.power)) { - pm_idle_save = pm_idle; - pm_idle = acpi_processor_idle; + if ((pr->flags.power) && (!boot_option_idle_override)) { + printk(KERN_INFO PREFIX "%s [%s] (supports", + acpi_device_name(device), acpi_device_bid(device)); + for (i = 1; i < ACPI_C_STATE_COUNT; i++) + if (pr->power.states[i].valid) + printk(" C%d", i); + printk(")\n"); + if (pr->id == 0) { + pm_idle_save = pm_idle; + pm_idle = acpi_processor_idle; + } } - printk(KERN_INFO PREFIX "%s [%s] (supports", - acpi_device_name(device), acpi_device_bid(device)); - for (i=1; ipower.states[i].valid) - printk(" C%d", i); - if (pr->flags.throttling) - printk(", %d throttling states", pr->throttling.state_count); - printk(")\n"); + if (pr->flags.throttling) { + printk(KERN_INFO PREFIX "%s [%s] (supports", + acpi_device_name(device), acpi_device_bid(device)); + printk(" %d throttling states", pr->throttling.state_count); + printk(")\n"); + } end: if (result) { @@ -2448,6 +2554,33 @@ return_VALUE(0); } +/* IBM ThinkPad R40e crashes mysteriously when going into C2 or C3. + For now disable this. Probably a bug somewhere else. */ +static int no_c2c3(struct dmi_system_id *id) +{ + printk(KERN_INFO + "%s detected - C2,C3 disabled. Overwrite with \"processor.c2=1 processor.c3=1\n\"", + id->ident); + if (c2 == -1) + c2 = 0; + if (c3 == -1) + c3 = 0; + return 0; +} + +static struct dmi_system_id __initdata processor_dmi_table[] = { + { no_c2c3, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW") }}, + { no_c2c3, "Medion 41700", { + DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"), + DMI_MATCH(DMI_BIOS_VERSION,"R01-A1J") }}, + {}, +}; + +/* We keep the driver loaded even when ACPI is not running. + This is needed for the powernow-k8 driver, that works even without + ACPI, but needs symbols from this driver */ static int __init acpi_processor_init (void) @@ -2461,19 +2594,21 @@ acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir); if (!acpi_processor_dir) - return_VALUE(-ENODEV); + return_VALUE(0); acpi_processor_dir->owner = THIS_MODULE; result = acpi_bus_register_driver(&acpi_processor_driver); if (result < 0) { remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); - return_VALUE(-ENODEV); + return_VALUE(0); } acpi_thermal_cpufreq_init(); acpi_processor_ppc_init(); + dmi_check_system(processor_dmi_table); + return_VALUE(0); } @@ -2497,5 +2632,6 @@ module_init(acpi_processor_init); module_exit(acpi_processor_exit); +module_param_named(acpi_cstate_limit, acpi_cstate_limit, uint, 0); EXPORT_SYMBOL(acpi_processor_set_thermal_limit); diff -Nru a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c --- a/drivers/acpi/resources/rscalc.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/resources/rscalc.c 2004-11-10 17:19:04 -08:00 @@ -74,7 +74,6 @@ { acpi_size byte_stream_size_needed = 0; acpi_size segment_size; - struct acpi_resource_ext_irq *ex_irq = NULL; u8 done = FALSE; @@ -91,8 +90,8 @@ case ACPI_RSTYPE_IRQ: /* * IRQ Resource - * For an IRQ Resource, Byte 3, although optional, will - * always be created - it holds IRQ information. + * For an IRQ Resource, Byte 3, although optional, will always be + * created - it holds IRQ information. */ segment_size = 4; break; @@ -108,8 +107,8 @@ case ACPI_RSTYPE_START_DPF: /* * Start Dependent Functions Resource - * For a start_dependent_functions Resource, Byte 1, - * although optional, will always be created. + * For a start_dependent_functions Resource, Byte 1, although + * optional, will always be created. */ segment_size = 2; break; @@ -141,10 +140,9 @@ case ACPI_RSTYPE_VENDOR: /* * Vendor Defined Resource - * For a Vendor Specific resource, if the Length is - * between 1 and 7 it will be created as a Small - * Resource data type, otherwise it is a Large - * Resource data type. + * For a Vendor Specific resource, if the Length is between 1 and 7 + * it will be created as a Small Resource data type, otherwise it + * is a Large Resource data type. */ if (linked_list->data.vendor_specific.length > 7) { segment_size = 3; @@ -191,10 +189,9 @@ case ACPI_RSTYPE_ADDRESS16: /* * 16-Bit Address Resource - * The base size of this byte stream is 16. If a - * Resource Source string is not NULL, add 1 for - * the Index + the length of the null terminated - * string Resource Source + 1 for the null. + * The base size of this byte stream is 16. If a Resource Source + * string is not NULL, add 1 for the Index + the length of the null + * terminated string Resource Source + 1 for the null. */ segment_size = 16; @@ -223,10 +220,9 @@ case ACPI_RSTYPE_ADDRESS64: /* * 64-Bit Address Resource - * The base size of this byte stream is 46. If a Resource - * Source string is not NULL, add 1 for the Index + the - * length of the null terminated string Resource Source + - * 1 for the null. + * The base size of this byte stream is 46. If a resource_source + * string is not NULL, add 1 for the Index + the length of the null + * terminated string Resource Source + 1 for the null. */ segment_size = 46; @@ -239,9 +235,8 @@ case ACPI_RSTYPE_EXT_IRQ: /* * Extended IRQ Resource - * The base size of this byte stream is 9. This is for an - * Interrupt table length of 1. For each additional - * interrupt, add 4. + * The base size of this byte stream is 9. This is for an Interrupt + * table length of 1. For each additional interrupt, add 4. * If a Resource Source string is not NULL, add 1 for the * Index + the length of the null terminated string * Resource Source + 1 for the null. @@ -249,7 +244,7 @@ segment_size = 9 + (((acpi_size) linked_list->data.extended_irq.number_of_interrupts - 1) * 4); - if (ex_irq && ex_irq->resource_source.string_ptr) { + if (linked_list->data.extended_irq.resource_source.string_ptr) { segment_size += linked_list->data.extended_irq.resource_source.string_length; segment_size++; } @@ -257,8 +252,7 @@ default: /* - * If we get here, everything is out of sync, - * so exit with an error + * If we get here, everything is out of sync, exit with error */ return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE); @@ -366,7 +360,6 @@ /* * 32-Bit Memory Range Resource */ - bytes_consumed = 20; structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem32); @@ -395,14 +388,12 @@ bytes_consumed = temp16 + 3; /* - * Resource Source Index and Resource Source are - * optional elements. Check the length of the - * Bytestream. If it is greater than 43, that - * means that an Index exists and is followed by - * a null termininated string. Therefore, set - * the temp variable to the length minus the minimum - * byte stream length plus the byte for the Index to - * determine the size of the NULL terminiated string. + * Resource Source Index and Resource Source are optional elements. + * Check the length of the Bytestream. If it is greater than 43, + * that means that an Index exists and is followed by a null + * terminated string. Therefore, set the temp variable to the + * length minus the minimum byte stream length plus the byte for + * the Index to determine the size of the NULL terminated string. */ if (43 < temp16) { temp8 = (u8) (temp16 - 44); @@ -433,14 +424,12 @@ bytes_consumed = temp16 + 3; /* - * Resource Source Index and Resource Source are - * optional elements. Check the length of the - * Bytestream. If it is greater than 23, that - * means that an Index exists and is followed by - * a null termininated string. Therefore, set - * the temp variable to the length minus the minimum - * byte stream length plus the byte for the Index to - * determine the size of the NULL terminiated string. + * Resource Source Index and Resource Source are optional elements. + * Check the length of the Bytestream. If it is greater than 23, + * that means that an Index exists and is followed by a null + * terminated string. Therefore, set the temp variable to the + * length minus the minimum byte stream length plus the byte for + * the Index to determine the size of the NULL terminated string. */ if (23 < temp16) { temp8 = (u8) (temp16 - 24); @@ -471,14 +460,12 @@ bytes_consumed = temp16 + 3; /* - * Resource Source Index and Resource Source are - * optional elements. Check the length of the - * Bytestream. If it is greater than 13, that - * means that an Index exists and is followed by - * a null termininated string. Therefore, set - * the temp variable to the length minus the minimum - * byte stream length plus the byte for the Index to - * determine the size of the NULL terminiated string. + * Resource Source Index and Resource Source are optional elements. + * Check the length of the Bytestream. If it is greater than 13, + * that means that an Index exists and is followed by a null + * terminated string. Therefore, set the temp variable to the + * length minus the minimum byte stream length plus the byte for + * the Index to determine the size of the NULL terminated string. */ if (13 < temp16) { temp8 = (u8) (temp16 - 14); @@ -509,9 +496,8 @@ bytes_consumed = temp16 + 3; /* - * Point past the length field and the - * Interrupt vector flags to save off the - * Interrupt table length to the Temp8 variable. + * Point past the length field and the Interrupt vector flags to + * save off the Interrupt table length to the Temp8 variable. */ buffer += 3; temp8 = *buffer; @@ -523,14 +509,12 @@ additional_bytes = (u8) ((temp8 - 1) * 4); /* - * Resource Source Index and Resource Source are - * optional elements. Check the length of the - * Bytestream. If it is greater than 9, that - * means that an Index exists and is followed by - * a null termininated string. Therefore, set - * the temp variable to the length minus the minimum - * byte stream length plus the byte for the Index to - * determine the size of the NULL terminiated string. + * Resource Source Index and Resource Source are optional elements. + * Check the length of the Bytestream. If it is greater than 9, + * that means that an Index exists and is followed by a null + * terminated string. Therefore, set the temp variable to the + * length minus the minimum byte stream length plus the byte for + * the Index to determine the size of the NULL terminated string. */ if (9 + additional_bytes < temp16) { temp8 = (u8) (temp16 - (9 + additional_bytes)); @@ -565,9 +549,8 @@ bytes_consumed = 3; } - /* - * Point past the descriptor - */ + /* Point past the descriptor */ + ++buffer; /* @@ -595,9 +578,8 @@ buffer = byte_stream_buffer; bytes_consumed = 3; - /* - * Point past the descriptor - */ + /* Point past the descriptor */ + ++buffer; /* diff -Nru a/drivers/acpi/scan.c b/drivers/acpi/scan.c --- a/drivers/acpi/scan.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/scan.c 2004-11-10 17:19:04 -08:00 @@ -158,10 +158,10 @@ device->power.state = ACPI_STATE_UNKNOWN; - return 0; + return_VALUE(0); } -static int +int acpi_match_ids ( struct acpi_device *device, char *ids) @@ -280,7 +280,7 @@ end: if (ACPI_FAILURE(status)) device->flags.wake_capable = 0; - return 0; + return_VALUE(0); } /* -------------------------------------------------------------------------- @@ -314,6 +314,8 @@ struct acpi_device *device, struct acpi_driver *driver) { + if (driver && driver->ops.match) + return driver->ops.match(device, driver); return acpi_match_ids(device, driver->ids); } @@ -494,9 +496,6 @@ struct list_head * node, *next; ACPI_FUNCTION_TRACE("acpi_bus_find_driver"); - - if (!device->flags.hardware_id && !device->flags.compatible_ids) - goto Done; spin_lock(&acpi_device_lock); list_for_each_safe(node,next,&acpi_bus_drivers) { diff -Nru a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c --- a/drivers/acpi/sleep/main.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/acpi/sleep/main.c 2004-11-10 17:19:02 -08:00 @@ -1,6 +1,7 @@ /* * sleep.c - ACPI sleep support. * + * Copyright (c) 2004 David Shaohua Li * Copyright (c) 2000-2003 Patrick Mochel * Copyright (c) 2003 Open Source Development Lab * @@ -13,6 +14,7 @@ #include #include #include +#include #include #include #include "sleep.h" @@ -42,7 +44,7 @@ * wakeup code to the waking vector. */ -static int acpi_pm_prepare(u32 pm_state) +static int acpi_pm_prepare(suspend_state_t pm_state) { u32 acpi_state = acpi_suspend_states[pm_state]; @@ -56,7 +58,8 @@ if (!acpi_wakeup_address) return -EFAULT; acpi_set_firmware_waking_vector( - (acpi_physical_address) acpi_wakeup_address); + (acpi_physical_address) virt_to_phys( + (void *)acpi_wakeup_address)); } ACPI_FLUSH_CPU_CACHE(); acpi_enable_wakeup_device_prep(acpi_state); @@ -74,7 +77,7 @@ * It's unfortunate, but it works. Please fix if you're feeling frisky. */ -static int acpi_pm_enter(u32 pm_state) +static int acpi_pm_enter(suspend_state_t pm_state) { acpi_status status = AE_OK; unsigned long flags = 0; @@ -136,7 +139,7 @@ * failed). */ -static int acpi_pm_finish(u32 pm_state) +static int acpi_pm_finish(suspend_state_t pm_state) { u32 acpi_state = acpi_suspend_states[pm_state]; diff -Nru a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c --- a/drivers/acpi/tables/tbconvrt.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/tables/tbconvrt.c 2004-11-10 17:19:04 -08:00 @@ -50,6 +50,8 @@ ACPI_MODULE_NAME ("tbconvrt") +u8 acpi_fadt_is_v1; + /******************************************************************************* * * FUNCTION: acpi_tb_get_table_count @@ -212,6 +214,7 @@ /* ACPI 1.0 FACS */ /* The BIOS stored FADT should agree with Revision 1.0 */ + acpi_fadt_is_v1 = 1; /* * Copy the table header and the common part of the tables. @@ -240,9 +243,12 @@ /* * Processor Performance State Control. This is the value OSPM writes to * the SMI_CMD register to assume processor performance state control - * responsibility. There isn't any equivalence in 1.0, leave it zeroed. + * responsibility. There isn't any equivalence in 1.0, but as many 1.x + * ACPI tables contain _PCT and _PSS we also keep this value, unless + * acpi_strict is set. */ - local_fadt->pstate_cnt = 0; + if (acpi_strict) + local_fadt->pstate_cnt = 0; /* * Support for the _CST object and C States change notification. @@ -251,10 +257,26 @@ local_fadt->cst_cnt = 0; /* - * Since there isn't any equivalence in 1.0 and since it highly likely - * that a 1.0 system has legacy support. + * FADT Rev 2 was an interim FADT released between ACPI 1.0 and ACPI 2.0. + * It primarily adds the FADT reset mechanism. */ - local_fadt->iapc_boot_arch = BAF_LEGACY_DEVICES; + if ((original_fadt->revision == 2) && + (original_fadt->length == sizeof (struct fadt_descriptor_rev2_minus))) { + /* + * Grab the entire generic address struct, plus the 1-byte reset value + * that immediately follows. + */ + ACPI_MEMCPY (&local_fadt->reset_register, + &((struct fadt_descriptor_rev2_minus *) original_fadt)->reset_register, + sizeof (struct acpi_generic_address) + 1); + } + else { + /* + * Since there isn't any equivalence in 1.0 and since it is highly + * likely that a 1.0 system has legacy support. + */ + local_fadt->iapc_boot_arch = BAF_LEGACY_DEVICES; + } /* * Convert the V1.0 block addresses to V2.0 GAS structures @@ -418,21 +440,19 @@ /* - * acpi_gbl_FADT is valid - * Allocate and zero the 2.0 FADT buffer - */ - local_fadt = ACPI_MEM_CALLOCATE (sizeof (struct fadt_descriptor_rev2)); - if (local_fadt == NULL) { - return_ACPI_STATUS (AE_NO_MEMORY); - } - - /* - * FADT length and version validation. The table must be at least as - * long as the version 1.0 FADT + * acpi_gbl_FADT is valid. Validate the FADT length. The table must be + * at least as long as the version 1.0 FADT */ if (acpi_gbl_FADT->length < sizeof (struct fadt_descriptor_rev1)) { - ACPI_REPORT_ERROR (("Invalid FADT table length: 0x%X\n", acpi_gbl_FADT->length)); + ACPI_REPORT_ERROR (("FADT is invalid, too short: 0x%X\n", acpi_gbl_FADT->length)); return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH); + } + + /* Allocate buffer for the ACPI 2.0(+) FADT */ + + local_fadt = ACPI_MEM_CALLOCATE (sizeof (struct fadt_descriptor_rev2)); + if (!local_fadt) { + return_ACPI_STATUS (AE_NO_MEMORY); } if (acpi_gbl_FADT->revision >= FADT2_REVISION_ID) { diff -Nru a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c --- a/drivers/acpi/tables/tbget.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/acpi/tables/tbget.c 2004-11-10 17:19:05 -08:00 @@ -167,6 +167,9 @@ return_ACPI_STATUS (AE_BAD_PARAMETER); } + ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "Table Signature: [%4.4s]\n", + return_header->signature)); + return_ACPI_STATUS (AE_OK); } diff -Nru a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c --- a/drivers/acpi/tables/tbinstal.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/acpi/tables/tbinstal.c 2004-11-10 17:19:03 -08:00 @@ -266,9 +266,10 @@ if (ACPI_IS_SINGLE_TABLE (acpi_gbl_table_data[table_type].flags)) { /* * Only one table allowed, and a table has alread been installed - * at this location, so return an error. + * at this location, so return an error. */ if (list_head->next) { + ACPI_MEM_FREE (table_desc); return_ACPI_STATUS (AE_ALREADY_EXISTS); } diff -Nru a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c --- a/drivers/acpi/tables/tbxfroot.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/acpi/tables/tbxfroot.c 2004-11-10 17:19:06 -08:00 @@ -87,12 +87,28 @@ return_ACPI_STATUS (AE_AML_STRING_LIMIT); } - /* Find the table */ + if (!ACPI_STRNCMP (signature, DSDT_SIG, ACPI_NAME_SIZE)) { + /* + * The DSDT pointer is contained in the FADT, not the RSDT. + * This code should suffice, because the only code that would perform + * a "find" on the DSDT is the data_table_region() AML opcode -- in + * which case, the DSDT is guaranteed to be already loaded. + * If this becomes insufficient, the FADT will have to be found first. + */ + if (!acpi_gbl_DSDT) { + return_ACPI_STATUS (AE_NO_ACPI_TABLES); + } - status = acpi_get_firmware_table (signature, 1, - ACPI_LOGICAL_ADDRESSING, &table); - if (ACPI_FAILURE (status)) { - return_ACPI_STATUS (status); + table = acpi_gbl_DSDT; + } + else { + /* Find the table */ + + status = acpi_get_firmware_table (signature, 1, + ACPI_LOGICAL_ADDRESSING, &table); + if (ACPI_FAILURE (status)) { + return_ACPI_STATUS (status); + } } /* Check oem_id and oem_table_id */ @@ -102,6 +118,7 @@ return_ACPI_STATUS (AE_AML_NAME_NOT_FOUND); } + ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "Found table [%4.4s]\n", table->signature)); *table_ptr = table; return_ACPI_STATUS (AE_OK); } diff -Nru a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c --- a/drivers/acpi/thermal.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/acpi/thermal.c 2004-11-10 17:19:06 -08:00 @@ -60,7 +60,7 @@ #define ACPI_THERMAL_NOTIFY_HOT 0xF1 #define ACPI_THERMAL_MODE_ACTIVE 0x00 #define ACPI_THERMAL_MODE_PASSIVE 0x01 -#define ACPI_THERMAL_MODE_CRT 0xff +#define ACPI_THERMAL_MODE_CRITICAL 0xff #define ACPI_THERMAL_PATH_POWEROFF "/sbin/poweroff" #define ACPI_THERMAL_MAX_ACTIVE 10 @@ -76,7 +76,7 @@ MODULE_LICENSE("GPL"); static int tzp; -MODULE_PARM(tzp, "i"); +module_param(tzp, int, 0); MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n"); @@ -226,7 +226,7 @@ status = acpi_evaluate_integer(tz->handle, "_TMP", NULL, &tz->temperature); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n", tz->temperature)); @@ -328,7 +328,7 @@ if (ACPI_FAILURE(status)) { tz->trips.critical.flags.valid = 0; ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No critical threshold\n")); - return -ENODEV; + return_VALUE(-ENODEV); } else { tz->trips.critical.flags.valid = 1; @@ -801,7 +801,7 @@ } end: - return 0; + return_VALUE(0); } static int acpi_thermal_state_open_fs(struct inode *inode, struct file *file) @@ -828,7 +828,7 @@ KELVIN_TO_CELSIUS(tz->temperature)); end: - return 0; + return_VALUE(0); } static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file) @@ -881,7 +881,7 @@ } end: - return 0; + return_VALUE(0); } static int acpi_thermal_trip_open_fs(struct inode *inode, struct file *file) @@ -953,14 +953,14 @@ seq_puts(seq, "\n"); } - if ( tz->cooling_mode == ACPI_THERMAL_MODE_CRT ) + if ( tz->cooling_mode == ACPI_THERMAL_MODE_CRITICAL ) seq_printf(seq, "cooling mode: critical\n"); else seq_printf(seq, "cooling mode: %s\n", tz->cooling_mode?"passive":"active"); end: - return 0; + return_VALUE(0); } static int acpi_thermal_cooling_open_fs(struct inode *inode, struct file *file) @@ -1023,7 +1023,7 @@ (tz->polling_frequency / 10)); end: - return 0; + return_VALUE(0); } static int acpi_thermal_polling_open_fs(struct inode *inode, struct file *file) @@ -1262,7 +1262,7 @@ tz->cooling_mode = ACPI_THERMAL_MODE_ACTIVE; } else { /* _ACx and _PSV are optional, but _CRT is required */ - tz->cooling_mode = ACPI_THERMAL_MODE_CRT; + tz->cooling_mode = ACPI_THERMAL_MODE_CRITICAL; } } diff -Nru a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c --- a/drivers/acpi/utilities/utalloc.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/acpi/utilities/utalloc.c 2004-11-10 17:19:02 -08:00 @@ -265,7 +265,7 @@ * RETURN: Status * * DESCRIPTION: Validate that the buffer is of the required length or - * allocate a new buffer. + * allocate a new buffer. Returned buffer is always zeroed. * ******************************************************************************/ @@ -305,24 +305,25 @@ /* Allocate a new buffer with local interface to allow tracking */ - buffer->pointer = ACPI_MEM_ALLOCATE (required_length); + buffer->pointer = ACPI_MEM_CALLOCATE (required_length); if (!buffer->pointer) { return (AE_NO_MEMORY); } - - /* Clear the buffer */ - - ACPI_MEMSET (buffer->pointer, 0, required_length); break; default: - /* Validate the size of the buffer */ + /* Existing buffer: Validate the size of the buffer */ if (buffer->length < required_length) { status = AE_BUFFER_OVERFLOW; + break; } + + /* Clear the buffer */ + + ACPI_MEMSET (buffer->pointer, 0, required_length); break; } @@ -472,7 +473,7 @@ acpi_status status; - allocation = acpi_ut_allocate (size + sizeof (struct acpi_debug_mem_block), component, + allocation = acpi_ut_allocate (size + sizeof (struct acpi_debug_mem_header), component, module, line); if (!allocation) { return (NULL); @@ -518,7 +519,7 @@ acpi_status status; - allocation = acpi_ut_callocate (size + sizeof (struct acpi_debug_mem_block), component, + allocation = acpi_ut_callocate (size + sizeof (struct acpi_debug_mem_header), component, module, line); if (!allocation) { /* Report allocation error */ @@ -712,6 +713,7 @@ allocation->line = line; ACPI_STRNCPY (allocation->module, module, ACPI_MAX_MODULE_NAME); + allocation->module[ACPI_MAX_MODULE_NAME-1] = 0; /* Insert at list head */ diff -Nru a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c --- a/drivers/acpi/utilities/utcopy.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/utilities/utcopy.c 2004-11-10 17:19:04 -08:00 @@ -424,23 +424,21 @@ break; default: - /* - * Whatever other type -- it is not supported - */ + /* All other types are not supported */ + return_ACPI_STATUS (AE_SUPPORT); } - switch (external_object->type) { - /* Must COPY string and buffer contents */ + switch (external_object->type) { case ACPI_TYPE_STRING: internal_object->string.pointer = ACPI_MEM_CALLOCATE ((acpi_size) external_object->string.length + 1); if (!internal_object->string.pointer) { - return_ACPI_STATUS (AE_NO_MEMORY); + goto error_exit; } ACPI_MEMCPY (internal_object->string.pointer, @@ -456,7 +454,7 @@ internal_object->buffer.pointer = ACPI_MEM_CALLOCATE (external_object->buffer.length); if (!internal_object->buffer.pointer) { - return_ACPI_STATUS (AE_NO_MEMORY); + goto error_exit; } ACPI_MEMCPY (internal_object->buffer.pointer, @@ -479,6 +477,11 @@ *ret_internal_object = internal_object; return_ACPI_STATUS (AE_OK); + + +error_exit: + acpi_ut_remove_reference (internal_object); + return_ACPI_STATUS (AE_NO_MEMORY); } @@ -747,7 +750,7 @@ status = acpi_ut_copy_simple_object (source_object, target_object); if (ACPI_FAILURE (status)) { - return (status); + goto error_exit; } *this_target_ptr = target_object; @@ -781,8 +784,8 @@ ACPI_MEM_CALLOCATE (((acpi_size) source_object->package.count + 1) * sizeof (void *)); if (!target_object->package.elements) { - ACPI_MEM_FREE (target_object); - return (AE_NO_MEMORY); + status = AE_NO_MEMORY; + goto error_exit; } /* @@ -801,6 +804,10 @@ return (AE_BAD_PARAMETER); } + return (status); + +error_exit: + acpi_ut_remove_reference (target_object); return (status); } diff -Nru a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c --- a/drivers/acpi/utilities/utdelete.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/acpi/utilities/utdelete.c 2004-11-10 17:19:04 -08:00 @@ -621,6 +621,10 @@ return_VOID; } + ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, + "Obj %p Current Refs=%X [To Be Incremented]\n", + object, object->common.reference_count)); + /* Increment the reference count */ (void) acpi_ut_update_object_reference (object, REF_INCREMENT); @@ -664,8 +668,9 @@ return_VOID; } - ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Obj %p Refs=%X\n", - object, object->common.reference_count)); + ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, + "Obj %p Current Refs=%X [To Be Decremented]\n", + object, object->common.reference_count)); /* * Decrement the reference count, and only actually delete the object diff -Nru a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c --- a/drivers/acpi/utilities/utglobal.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/acpi/utilities/utglobal.c 2004-11-10 17:19:02 -08:00 @@ -142,11 +142,11 @@ */ /* Debug switch - level and trace mask */ -u32 acpi_dbg_level = 0; +u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT; /* Debug switch - layer (component) mask */ -u32 acpi_dbg_layer = 0; +u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; u32 acpi_gbl_nesting_level = 0; @@ -861,6 +861,7 @@ acpi_gbl_system_notify.handler = NULL; acpi_gbl_device_notify.handler = NULL; + acpi_gbl_exception_handler = NULL; acpi_gbl_init_handler = NULL; /* Global "typed" ACPI table pointers */ diff -Nru a/drivers/acpi/utilities/utmath.c b/drivers/acpi/utilities/utmath.c --- a/drivers/acpi/utilities/utmath.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/acpi/utilities/utmath.c 2004-11-10 17:19:07 -08:00 @@ -59,7 +59,7 @@ * * FUNCTION: acpi_ut_short_divide * - * PARAMETERS: in_dividend - Pointer to the dividend + * PARAMETERS: Dividend - 64-bit dividend * Divisor - 32-bit divisor * out_quotient - Pointer to where the quotient is returned * out_remainder - Pointer to where the remainder is returned @@ -74,19 +74,18 @@ acpi_status acpi_ut_short_divide ( - acpi_integer *in_dividend, + acpi_integer dividend, u32 divisor, acpi_integer *out_quotient, u32 *out_remainder) { - union uint64_overlay dividend; + union uint64_overlay dividend_ovl; union uint64_overlay quotient; u32 remainder32; ACPI_FUNCTION_TRACE ("ut_short_divide"); - dividend.full = *in_dividend; /* Always check for a zero divisor */ @@ -95,13 +94,15 @@ return_ACPI_STATUS (AE_AML_DIVIDE_BY_ZERO); } + dividend_ovl.full = dividend; + /* * The quotient is 64 bits, the remainder is always 32 bits, * and is generated by the second divide. */ - ACPI_DIV_64_BY_32 (0, dividend.part.hi, divisor, + ACPI_DIV_64_BY_32 (0, dividend_ovl.part.hi, divisor, quotient.part.hi, remainder32); - ACPI_DIV_64_BY_32 (remainder32, dividend.part.lo, divisor, + ACPI_DIV_64_BY_32 (remainder32, dividend_ovl.part.lo, divisor, quotient.part.lo, remainder32); /* Return only what was requested */ @@ -121,8 +122,8 @@ * * FUNCTION: acpi_ut_divide * - * PARAMETERS: in_dividend - Pointer to the dividend - * in_divisor - Pointer to the divisor + * PARAMETERS: in_dividend - Dividend + * in_divisor - Divisor * out_quotient - Pointer to where the quotient is returned * out_remainder - Pointer to where the remainder is returned * @@ -134,8 +135,8 @@ acpi_status acpi_ut_divide ( - acpi_integer *in_dividend, - acpi_integer *in_divisor, + acpi_integer in_dividend, + acpi_integer in_divisor, acpi_integer *out_quotient, acpi_integer *out_remainder) { @@ -155,13 +156,13 @@ /* Always check for a zero divisor */ - if (*in_divisor == 0) { + if (in_divisor == 0) { ACPI_REPORT_ERROR (("acpi_ut_divide: Divide by zero\n")); return_ACPI_STATUS (AE_AML_DIVIDE_BY_ZERO); } - divisor.full = *in_divisor; - dividend.full = *in_dividend; + divisor.full = in_divisor; + dividend.full = in_dividend; if (divisor.part.hi == 0) { /* * 1) Simplest case is where the divisor is 32 bits, we can @@ -269,7 +270,7 @@ acpi_status acpi_ut_short_divide ( - acpi_integer *in_dividend, + acpi_integer in_dividend, u32 divisor, acpi_integer *out_quotient, u32 *out_remainder) @@ -288,10 +289,10 @@ /* Return only what was requested */ if (out_quotient) { - *out_quotient = *in_dividend / divisor; + *out_quotient = in_dividend / divisor; } if (out_remainder) { - *out_remainder = (u32) *in_dividend % divisor; + *out_remainder = (u32) in_dividend % divisor; } return_ACPI_STATUS (AE_OK); @@ -299,8 +300,8 @@ acpi_status acpi_ut_divide ( - acpi_integer *in_dividend, - acpi_integer *in_divisor, + acpi_integer in_dividend, + acpi_integer in_divisor, acpi_integer *out_quotient, acpi_integer *out_remainder) { @@ -309,7 +310,7 @@ /* Always check for a zero divisor */ - if (*in_divisor == 0) { + if (in_divisor == 0) { ACPI_REPORT_ERROR (("acpi_ut_divide: Divide by zero\n")); return_ACPI_STATUS (AE_AML_DIVIDE_BY_ZERO); } @@ -318,10 +319,10 @@ /* Return only what was requested */ if (out_quotient) { - *out_quotient = *in_dividend / *in_divisor; + *out_quotient = in_dividend / in_divisor; } if (out_remainder) { - *out_remainder = *in_dividend % *in_divisor; + *out_remainder = in_dividend % in_divisor; } return_ACPI_STATUS (AE_OK); diff -Nru a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c --- a/drivers/acpi/utilities/utmisc.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/acpi/utilities/utmisc.c 2004-11-10 17:19:02 -08:00 @@ -356,16 +356,15 @@ * FUNCTION: acpi_ut_strtoul64 * * PARAMETERS: String - Null terminated string - * Terminater - Where a pointer to the terminating byte is returned - * Base - Radix of the string + * Base - Radix of the string: 10, 16, or ACPI_ANY_BASE + * ret_integer - Where the converted integer is returned * - * RETURN: Converted value + * RETURN: Status and Converted value * * DESCRIPTION: Convert a string into an unsigned value. + * NOTE: Does not support Octal strings, not needed. * ******************************************************************************/ -#define NEGATIVE 1 -#define POSITIVE 0 acpi_status acpi_ut_strtoul64 ( @@ -373,50 +372,40 @@ u32 base, acpi_integer *ret_integer) { - u32 index; + u32 this_digit; acpi_integer return_value = 0; - acpi_status status = AE_OK; - acpi_integer dividend; acpi_integer quotient; - *ret_integer = 0; + ACPI_FUNCTION_TRACE ("ut_stroul64"); + switch (base) { - case 0: - case 8: + case ACPI_ANY_BASE: case 10: case 16: break; default: - /* - * The specified Base parameter is not in the domain of - * this function: - */ - return (AE_BAD_PARAMETER); + /* Invalid Base */ + return_ACPI_STATUS (AE_BAD_PARAMETER); } - /* - * skip over any white space in the buffer: - */ + /* Skip over any white space in the buffer */ + while (ACPI_IS_SPACE (*string) || *string == '\t') { ++string; } /* * If the input parameter Base is zero, then we need to - * determine if it is octal, decimal, or hexadecimal: + * determine if it is decimal or hexadecimal: */ if (base == 0) { - if (*string == '0') { - if (ACPI_TOLOWER (*(++string)) == 'x') { - base = 16; - ++string; - } - else { - base = 8; - } + if ((*string == '0') && + (ACPI_TOLOWER (*(++string)) == 'x')) { + base = 16; + ++string; } else { base = 10; @@ -424,76 +413,67 @@ } /* - * For octal and hexadecimal bases, skip over the leading + * For hexadecimal base, skip over the leading * 0 or 0x, if they are present. */ - if (base == 8 && *string == '0') { - string++; - } - if (base == 16 && *string == '0' && ACPI_TOLOWER (*(++string)) == 'x') { string++; } - /* Main loop: convert the string to an unsigned long */ + /* Main loop: convert the string to a 64-bit integer */ while (*string) { if (ACPI_IS_DIGIT (*string)) { - index = ((u8) *string) - '0'; + /* Convert ASCII 0-9 to Decimal value */ + + this_digit = ((u8) *string) - '0'; } else { - index = (u8) ACPI_TOUPPER (*string); - if (ACPI_IS_UPPER ((char) index)) { - index = index - 'A' + 10; + this_digit = (u8) ACPI_TOUPPER (*string); + if (ACPI_IS_UPPER ((char) this_digit)) { + /* Convert ASCII Hex char to value */ + + this_digit = this_digit - 'A' + 10; } else { goto error_exit; } } - if (index >= base) { + /* Check to see if digit is out of range */ + + if (this_digit >= base) { goto error_exit; } - /* Check to see if value is out of range: */ + /* Divide the digit into the correct position */ - dividend = ACPI_INTEGER_MAX - (acpi_integer) index; - (void) acpi_ut_short_divide (÷nd, base, "ient, NULL); + (void) acpi_ut_short_divide ((ACPI_INTEGER_MAX - (acpi_integer) this_digit), + base, "ient, NULL); if (return_value > quotient) { goto error_exit; } return_value *= base; - return_value += index; + return_value += this_digit; ++string; } *ret_integer = return_value; - return (status); + return_ACPI_STATUS (AE_OK); error_exit: - switch (base) { - case 8: - status = AE_BAD_OCTAL_CONSTANT; - break; - - case 10: - status = AE_BAD_DECIMAL_CONSTANT; - break; - - case 16: - status = AE_BAD_HEX_CONSTANT; - break; + /* Base was set/validated above */ - default: - /* Base validated above */ - break; + if (base == 10) { + return_ACPI_STATUS (AE_BAD_DECIMAL_CONSTANT); + } + else { + return_ACPI_STATUS (AE_BAD_HEX_CONSTANT); } - - return (status); } diff -Nru a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c --- a/drivers/acpi/utilities/utobject.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/acpi/utilities/utobject.c 2004-11-10 17:19:05 -08:00 @@ -155,9 +155,8 @@ ACPI_FUNCTION_TRACE_U32 ("ut_create_buffer_object", buffer_size); - /* - * Create a new Buffer object - */ + /* Create a new Buffer object */ + buffer_desc = acpi_ut_create_internal_object (ACPI_TYPE_BUFFER); if (!buffer_desc) { return_PTR (NULL); @@ -186,6 +185,61 @@ /* Return the new buffer descriptor */ return_PTR (buffer_desc); +} + + +/******************************************************************************* + * + * FUNCTION: acpi_ut_create_string_object + * + * PARAMETERS: string_size - Size of string to be created. Does not + * include NULL terminator, this is added + * automatically. + * + * RETURN: Pointer to a new String object + * + * DESCRIPTION: Create a fully initialized string object + * + ******************************************************************************/ + +union acpi_operand_object * +acpi_ut_create_string_object ( + acpi_size string_size) +{ + union acpi_operand_object *string_desc; + char *string; + + + ACPI_FUNCTION_TRACE_U32 ("ut_create_string_object", string_size); + + + /* Create a new String object */ + + string_desc = acpi_ut_create_internal_object (ACPI_TYPE_STRING); + if (!string_desc) { + return_PTR (NULL); + } + + /* + * Allocate the actual string buffer -- (Size + 1) for NULL terminator. + * NOTE: Zero-length strings are NULL terminated + */ + string = ACPI_MEM_CALLOCATE (string_size + 1); + if (!string) { + ACPI_REPORT_ERROR (("create_string: could not allocate size %X\n", + (u32) string_size)); + acpi_ut_remove_reference (string_desc); + return_PTR (NULL); + } + + /* Complete string object initialization */ + + string_desc->string.pointer = string; + string_desc->string.length = (u32) string_size; + + /* Return the new string descriptor */ + + return_PTR (string_desc); } diff -Nru a/drivers/acpi/utils.c b/drivers/acpi/utils.c --- a/drivers/acpi/utils.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/acpi/utils.c 2004-11-10 17:19:07 -08:00 @@ -373,7 +373,7 @@ } if (package->package.count > ACPI_MAX_HANDLES) { - return AE_NO_MEMORY; + return_ACPI_STATUS(AE_NO_MEMORY); } list->count = package->package.count; diff -Nru a/drivers/acpi/video.c b/drivers/acpi/video.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/acpi/video.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,1988 @@ +/* + * video.c - ACPI Video Driver ($Revision:$) + * + * Copyright (C) 2004 Luming Yu + * Copyright (C) 2004 Bruno Ducrot + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#define ACPI_VIDEO_COMPONENT 0x08000000 +#define ACPI_VIDEO_CLASS "video" +#define ACPI_VIDEO_DRIVER_NAME "ACPI Video Driver" +#define ACPI_VIDEO_BUS_NAME "Video Bus" +#define ACPI_VIDEO_DEVICE_NAME "Video Device" +#define ACPI_VIDEO_NOTIFY_SWITCH 0x80 +#define ACPI_VIDEO_NOTIFY_PROBE 0x81 +#define ACPI_VIDEO_NOTIFY_CYCLE 0x82 +#define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83 +#define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84 + +#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x82 +#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x83 +#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x84 +#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x85 +#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x86 + + +#define ACPI_VIDEO_HEAD_INVALID (~0ul - 1) +#define ACPI_VIDEO_HEAD_END (~0ul) + + +#define _COMPONENT ACPI_VIDEO_COMPONENT +ACPI_MODULE_NAME ("acpi_video") + +MODULE_AUTHOR("Bruno Ducrot"); +MODULE_DESCRIPTION(ACPI_VIDEO_DRIVER_NAME); +MODULE_LICENSE("GPL"); + +static int acpi_video_bus_add (struct acpi_device *device); +static int acpi_video_bus_remove (struct acpi_device *device, int type); +static int acpi_video_bus_match (struct acpi_device *device, struct acpi_driver *driver); + +static struct acpi_driver acpi_video_bus = { + .name = ACPI_VIDEO_DRIVER_NAME, + .class = ACPI_VIDEO_CLASS, + .ops = { + .add = acpi_video_bus_add, + .remove = acpi_video_bus_remove, + .match = acpi_video_bus_match, + }, +}; + +struct acpi_video_bus_flags { + u8 multihead:1; /* can switch video heads */ + u8 rom:1; /* can retrieve a video rom */ + u8 post:1; /* can configure the head to */ + u8 reserved:5; +}; + +struct acpi_video_bus_cap { + u8 _DOS:1; /*Enable/Disable output switching*/ + u8 _DOD:1; /*Enumerate all devices attached to display adapter*/ + u8 _ROM:1; /*Get ROM Data*/ + u8 _GPD:1; /*Get POST Device*/ + u8 _SPD:1; /*Set POST Device*/ + u8 _VPO:1; /*Video POST Options*/ + u8 reserved:2; +}; + +struct acpi_video_device_attrib{ + u32 display_index:4; /* A zero-based instance of the Display*/ + u32 display_port_attachment:4; /*This field differenates displays type*/ + u32 display_type:4; /*Describe the specific type in use*/ + u32 vendor_specific:4; /*Chipset Vendor Specifi*/ + u32 bios_can_detect:1; /*BIOS can detect the device*/ + u32 depend_on_vga:1; /*Non-VGA output device whose power is related to + the VGA device.*/ + u32 pipe_id:3; /*For VGA multiple-head devices.*/ + u32 reserved:10; /*Must be 0*/ + u32 device_id_scheme:1; /*Device ID Scheme*/ +}; + +struct acpi_video_enumerated_device { + union { + u32 int_val; + struct acpi_video_device_attrib attrib; + } value; + struct acpi_video_device *bind_info; +}; + +struct acpi_video_bus { + acpi_handle handle; + u8 dos_setting; + struct acpi_video_enumerated_device *attached_array; + u8 attached_count; + struct acpi_video_bus_cap cap; + struct acpi_video_bus_flags flags; + struct semaphore sem; + struct list_head video_device_list; + struct proc_dir_entry *dir; +}; + +struct acpi_video_device_flags { + u8 crt:1; + u8 lcd:1; + u8 tvout:1; + u8 bios:1; + u8 unknown:1; + u8 reserved:3; +}; + +struct acpi_video_device_cap { + u8 _ADR:1; /*Return the unique ID */ + u8 _BCL:1; /*Query list of brightness control levels supported*/ + u8 _BCM:1; /*Set the brightness level*/ + u8 _DDC:1; /*Return the EDID for this device*/ + u8 _DCS:1; /*Return status of output device*/ + u8 _DGS:1; /*Query graphics state*/ + u8 _DSS:1; /*Device state set*/ + u8 _reserved:1; +}; + +struct acpi_video_device_brightness { + int curr; + int count; + int *levels; +}; + +struct acpi_video_device { + acpi_handle handle; + unsigned long device_id; + struct acpi_video_device_flags flags; + struct acpi_video_device_cap cap; + struct list_head entry; + struct acpi_video_bus *video; + struct acpi_device *dev; + struct acpi_video_device_brightness *brightness; +}; + + +/* bus */ +static int acpi_video_bus_info_open_fs(struct inode *inode, struct file *file); +static struct file_operations acpi_video_bus_info_fops = { + .open = acpi_video_bus_info_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file); +static struct file_operations acpi_video_bus_ROM_fops = { + .open = acpi_video_bus_ROM_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static int acpi_video_bus_POST_info_open_fs(struct inode *inode, struct file *file); +static struct file_operations acpi_video_bus_POST_info_fops = { + .open = acpi_video_bus_POST_info_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static int acpi_video_bus_POST_open_fs(struct inode *inode, struct file *file); +static struct file_operations acpi_video_bus_POST_fops = { + .open = acpi_video_bus_POST_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + + +static int acpi_video_bus_DOS_open_fs(struct inode *inode, struct file *file); +static struct file_operations acpi_video_bus_DOS_fops = { + .open = acpi_video_bus_DOS_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +/* device */ +static int acpi_video_device_info_open_fs(struct inode *inode, struct file *file); +static struct file_operations acpi_video_device_info_fops = { + .open = acpi_video_device_info_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static int acpi_video_device_state_open_fs(struct inode *inode, struct file *file); +static struct file_operations acpi_video_device_state_fops = { + .open = acpi_video_device_state_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static int acpi_video_device_brightness_open_fs(struct inode *inode, struct file *file); +static struct file_operations acpi_video_device_brightness_fops = { + .open = acpi_video_device_brightness_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static int acpi_video_device_EDID_open_fs(struct inode *inode, struct file *file); +static struct file_operations acpi_video_device_EDID_fops = { + .open = acpi_video_device_EDID_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static void acpi_video_device_notify ( acpi_handle handle, u32 event, void *data); +static void acpi_video_device_rebind( struct acpi_video_bus *video); +static void acpi_video_device_bind( struct acpi_video_bus *video, struct acpi_video_device *device); +static int acpi_video_device_enumerate(struct acpi_video_bus *video); +static int acpi_video_switch_output( struct acpi_video_bus *video, int event); +static int acpi_video_get_next_level( struct acpi_video_device *device, u32 level_current,u32 event); +static void acpi_video_switch_brightness ( struct acpi_video_device *device, int event); + + +/* -------------------------------------------------------------------------- + Video Management + -------------------------------------------------------------------------- */ + +/* device */ + +static int +acpi_video_device_query ( + struct acpi_video_device *device, + unsigned long *state) +{ + int status; + ACPI_FUNCTION_TRACE("acpi_video_device_query"); + status = acpi_evaluate_integer(device->handle, "_DGS", NULL, state); + + return_VALUE(status); +} + +static int +acpi_video_device_get_state ( + struct acpi_video_device *device, + unsigned long *state) +{ + int status; + + ACPI_FUNCTION_TRACE("acpi_video_device_get_state"); + + status = acpi_evaluate_integer(device->handle, "_DCS", NULL, state); + + return_VALUE(status); +} + +static int +acpi_video_device_set_state ( + struct acpi_video_device *device, + int state) +{ + int status; + union acpi_object arg0 = {ACPI_TYPE_INTEGER}; + struct acpi_object_list args = {1, &arg0}; + + ACPI_FUNCTION_TRACE("acpi_video_device_set_state"); + + arg0.integer.value = state; + status = acpi_evaluate_integer(device->handle, "_DSS", &args, NULL); + + return_VALUE(status); +} + +static int +acpi_video_device_lcd_query_levels ( + struct acpi_video_device *device, + union acpi_object **levels) +{ + int status; + struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; + union acpi_object *obj; + + + ACPI_FUNCTION_TRACE("acpi_video_device_lcd_query_levels"); + + *levels = NULL; + + status = acpi_evaluate_object(device->handle, "_BCL", NULL, &buffer); + if (!ACPI_SUCCESS(status)) + return_VALUE(status); + obj = (union acpi_object *) buffer.pointer; + if (!obj && (obj->type != ACPI_TYPE_PACKAGE)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _BCL data\n")); + status = -EFAULT; + goto err; + } + + *levels = obj; + + return_VALUE(0); + +err: + if (buffer.pointer) + kfree(buffer.pointer); + + return_VALUE(status); +} + +static int +acpi_video_device_lcd_set_level ( + struct acpi_video_device *device, + int level) +{ + int status; + union acpi_object arg0 = {ACPI_TYPE_INTEGER}; + struct acpi_object_list args = {1, &arg0}; + + ACPI_FUNCTION_TRACE("acpi_video_device_lcd_set_level"); + + arg0.integer.value = level; + status = acpi_evaluate_object(device->handle, "_BCM", &args, NULL); + + printk(KERN_DEBUG "set_level status: %x\n", status); + return_VALUE(status); +} + +static int +acpi_video_device_lcd_get_level_current ( + struct acpi_video_device *device, + unsigned long *level) +{ + int status; + ACPI_FUNCTION_TRACE("acpi_video_device_lcd_get_level_current"); + + status = acpi_evaluate_integer(device->handle, "_BQC", NULL, level); + + return_VALUE(status); +} + +static int +acpi_video_device_EDID ( + struct acpi_video_device *device, + union acpi_object **edid, + ssize_t length) +{ + int status; + struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; + union acpi_object *obj; + union acpi_object arg0 = {ACPI_TYPE_INTEGER}; + struct acpi_object_list args = {1, &arg0}; + + ACPI_FUNCTION_TRACE("acpi_video_device_get_EDID"); + + *edid = NULL; + + if (!device) + return_VALUE(-ENODEV); + if (length == 128) + arg0.integer.value = 1; + else if (length == 256) + arg0.integer.value = 2; + else + return_VALUE(-EINVAL); + + status = acpi_evaluate_object(device->handle, "_DDC", &args, &buffer); + if (ACPI_FAILURE(status)) + return_VALUE(-ENODEV); + + obj = (union acpi_object *) buffer.pointer; + + if (obj && obj->type == ACPI_TYPE_BUFFER) + *edid = obj; + else { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _DDC data\n")); + status = -EFAULT; + kfree(obj); + } + + return_VALUE(status); +} + + +/* bus */ + +static int +acpi_video_bus_set_POST ( + struct acpi_video_bus *video, + unsigned long option) +{ + int status; + unsigned long tmp; + union acpi_object arg0 = {ACPI_TYPE_INTEGER}; + struct acpi_object_list args = {1, &arg0}; + + ACPI_FUNCTION_TRACE("acpi_video_bus_set_POST"); + + arg0.integer.value = option; + + status = acpi_evaluate_integer(video->handle, "_SPD", &args, &tmp); + if (ACPI_SUCCESS(status)) + status = tmp ? (-EINVAL):(AE_OK); + + return_VALUE(status); +} + +static int +acpi_video_bus_get_POST ( + struct acpi_video_bus *video, + unsigned long *id) +{ + int status; + + ACPI_FUNCTION_TRACE("acpi_video_bus_get_POST"); + + status = acpi_evaluate_integer(video->handle, "_GPD", NULL, id); + + return_VALUE(status); +} + +static int +acpi_video_bus_POST_options ( + struct acpi_video_bus *video, + unsigned long *options) +{ + int status; + ACPI_FUNCTION_TRACE("acpi_video_bus_POST_options"); + + status = acpi_evaluate_integer(video->handle, "_VPO", NULL, options); + *options &= 3; + + return_VALUE(status); +} + +/* + * Arg: + * video : video bus device pointer + * bios_flag : + * 0. The system BIOS should NOT automatically switch(toggle) + * the active display output. + * 1. The system BIOS should automatically switch (toggle) the + * active display output. No swich event. + * 2. The _DGS value should be locked. + * 3. The system BIOS should not automatically switch (toggle) the + * active display output, but instead generate the display switch + * event notify code. + * lcd_flag : + * 0. The system BIOS should automatically control the brightness level + * of the LCD, when the power changes from AC to DC + * 1. The system BIOS should NOT automatically control the brightness + * level of the LCD, when the power changes from AC to DC. + * Return Value: + * -1 wrong arg. + */ + +static int +acpi_video_bus_DOS( + struct acpi_video_bus *video, + int bios_flag, + int lcd_flag) +{ + acpi_integer status = 0; + union acpi_object arg0 = {ACPI_TYPE_INTEGER}; + struct acpi_object_list args = {1, &arg0}; + + ACPI_FUNCTION_TRACE("acpi_video_bus_DOS"); + + if (bios_flag < 0 || bios_flag >3 || lcd_flag < 0 || lcd_flag > 1){ + status = -1; + goto Failed; + } + arg0.integer.value = (lcd_flag << 2) | bios_flag; + video->dos_setting = arg0.integer.value; + acpi_evaluate_object(video->handle, "_DOS", &args, NULL); + +Failed: + return_VALUE(status); +} + +/* + * Arg: + * device : video output device (LCD, CRT, ..) + * + * Return Value: + * None + * + * Find out all required AML method defined under the output + * device. + */ + +static void +acpi_video_device_find_cap (struct acpi_video_device *device) +{ + acpi_integer status; + acpi_handle h_dummy1; + int i; + union acpi_object *obj = NULL; + struct acpi_video_device_brightness *br = NULL; + + ACPI_FUNCTION_TRACE("acpi_video_device_find_cap"); + + memset( &device->cap, 0, 4); + + if( ACPI_SUCCESS(acpi_get_handle(device->handle, "_ADR", &h_dummy1))) { + device->cap._ADR = 1; + } + if( ACPI_SUCCESS(acpi_get_handle(device->handle, "_BCL", &h_dummy1))) { + device->cap._BCL= 1; + } + if( ACPI_SUCCESS(acpi_get_handle(device->handle, "_BCM", &h_dummy1))) { + device->cap._BCM= 1; + } + if( ACPI_SUCCESS(acpi_get_handle(device->handle, "_DDC", &h_dummy1))) { + device->cap._DDC= 1; + } + if( ACPI_SUCCESS(acpi_get_handle(device->handle, "_DCS", &h_dummy1))) { + device->cap._DCS = 1; + } + if( ACPI_SUCCESS(acpi_get_handle(device->handle, "_DGS", &h_dummy1))) { + device->cap._DGS = 1; + } + if( ACPI_SUCCESS(acpi_get_handle(device->handle, "_DSS", &h_dummy1))) { + device->cap._DSS = 1; + } + + status = acpi_video_device_lcd_query_levels(device, &obj); + + if (obj && obj->type == ACPI_TYPE_PACKAGE && obj->package.count >= 2) { + int count = 0; + union acpi_object *o; + + br = kmalloc(sizeof &br, GFP_KERNEL); + if (!br) { + printk(KERN_ERR "can't allocate memory\n"); + } else { + memset(br, 0, sizeof &br); + br->levels = kmalloc(obj->package.count * sizeof &br->levels, GFP_KERNEL); + if (!br->levels) + goto out; + + for (i = 0; i < obj->package.count; i++) { + o = (union acpi_object *) &obj->package.elements[i]; + if (o->type != ACPI_TYPE_INTEGER) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data\n")); + continue; + } + br->levels[count] = (u32) o->integer.value; + count++; + } +out: + if (count < 2) { + if (br->levels) + kfree(br->levels); + kfree(br); + } else { + br->count = count; + device->brightness = br; + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "found %d brightness levels\n", count)); + } + } + } + + if (obj) + kfree(obj); + + return_VOID; +} + +/* + * Arg: + * device : video output device (VGA) + * + * Return Value: + * None + * + * Find out all required AML method defined under the video bus device. + */ + +static void +acpi_video_bus_find_cap (struct acpi_video_bus *video) +{ + acpi_handle h_dummy1; + + memset(&video->cap ,0, 4); + if( ACPI_SUCCESS(acpi_get_handle(video->handle, "_DOS", &h_dummy1))) { + video->cap._DOS = 1; + } + if( ACPI_SUCCESS(acpi_get_handle(video->handle, "_DOD", &h_dummy1))) { + video->cap._DOD = 1; + } + if( ACPI_SUCCESS(acpi_get_handle(video->handle, "_ROM", &h_dummy1))) { + video->cap._ROM = 1; + } + if( ACPI_SUCCESS(acpi_get_handle(video->handle, "_GPD", &h_dummy1))) { + video->cap._GPD = 1; + } + if( ACPI_SUCCESS(acpi_get_handle(video->handle, "_SPD", &h_dummy1))) { + video->cap._SPD = 1; + } + if( ACPI_SUCCESS(acpi_get_handle(video->handle, "_VPO", &h_dummy1))) { + video->cap._VPO = 1; + } +} + +/* + * Check whether the video bus device has required AML method to + * support the desired features + */ + +static int +acpi_video_bus_check ( + struct acpi_video_bus *video) +{ + acpi_status status = -ENOENT; + + + ACPI_FUNCTION_TRACE("acpi_video_bus_check"); + + if (!video) + return_VALUE(-EINVAL); + + /* Since there is no HID, CID and so on for VGA driver, we have + * to check well known required nodes. + */ + + /* Does this device able to support video switching ? */ + if(video->cap._DOS){ + video->flags.multihead = 1; + status = 0; + } + + /* Does this device able to retrieve a retrieve a video ROM ? */ + if(video->cap._ROM){ + video->flags.rom = 1; + status = 0; + } + + /* Does this device able to configure which video device to POST ? */ + if(video->cap._GPD && video->cap._SPD && video->cap._VPO){ + video->flags.post = 1; + status = 0; + } + + return_VALUE(status); +} + +/* -------------------------------------------------------------------------- + FS Interface (/proc) + -------------------------------------------------------------------------- */ + +struct proc_dir_entry *acpi_video_dir; + +/* video devices */ + +static int +acpi_video_device_info_seq_show ( + struct seq_file *seq, + void *offset) +{ + struct acpi_video_device *dev = (struct acpi_video_device *) seq->private; + + ACPI_FUNCTION_TRACE("acpi_video_device_info_seq_show"); + + if (!dev) + goto end; + + seq_printf(seq, "device_id: 0x%04x\n", (u32) dev->device_id); + seq_printf(seq, "type: "); + if (dev->flags.crt) + seq_printf(seq, "CRT\n"); + else if (dev->flags.lcd) + seq_printf(seq, "LCD\n"); + else if (dev->flags.tvout) + seq_printf(seq, "TVOUT\n"); + else + seq_printf(seq, "UNKNOWN\n"); + + seq_printf(seq,"known by bios: %s\n", + dev->flags.bios ? "yes":"no"); + +end: + return_VALUE(0); +} + +static int +acpi_video_device_info_open_fs ( + struct inode *inode, + struct file *file) +{ + return single_open(file, acpi_video_device_info_seq_show, + PDE(inode)->data); +} + +static int +acpi_video_device_state_seq_show ( + struct seq_file *seq, + void *offset) +{ + int status; + struct acpi_video_device *dev = (struct acpi_video_device *) seq->private; + unsigned long state; + + ACPI_FUNCTION_TRACE("acpi_video_device_state_seq_show"); + + if (!dev) + goto end; + + status = acpi_video_device_get_state(dev, &state); + seq_printf(seq, "state: "); + if (ACPI_SUCCESS(status)) + seq_printf(seq, "0x%02lx\n", state); + else + seq_printf(seq, "\n"); + + status = acpi_video_device_query(dev, &state); + seq_printf(seq, "query: "); + if (ACPI_SUCCESS(status)) + seq_printf(seq, "0x%02lx\n", state); + else + seq_printf(seq, "\n"); + +end: + return_VALUE(0); +} + +static int +acpi_video_device_state_open_fs ( + struct inode *inode, + struct file *file) +{ + return single_open(file, acpi_video_device_state_seq_show, + PDE(inode)->data); +} + +static ssize_t +acpi_video_device_write_state ( + struct file *file, + const char __user *buffer, + size_t count, + loff_t *data) +{ + int status; + struct seq_file *m = (struct seq_file *) file->private_data; + struct acpi_video_device *dev = (struct acpi_video_device *) m->private; + char str[12] = {0}; + u32 state = 0; + + ACPI_FUNCTION_TRACE("acpi_video_device_write_state"); + + if (!dev || count + 1 > sizeof str) + return_VALUE(-EINVAL); + + if (copy_from_user(str, buffer, count)) + return_VALUE(-EFAULT); + + str[count] = 0; + state = simple_strtoul(str, NULL, 0); + state &= ((1ul<<31) | (1ul<<30) | (1ul<<0)); + + status = acpi_video_device_set_state(dev, state); + + if (status) + return_VALUE(-EFAULT); + + return_VALUE(count); +} + +static int +acpi_video_device_brightness_seq_show ( + struct seq_file *seq, + void *offset) +{ + struct acpi_video_device *dev = (struct acpi_video_device *) seq->private; + int i; + + ACPI_FUNCTION_TRACE("acpi_video_device_brightness_seq_show"); + + if (!dev || !dev->brightness) { + seq_printf(seq, "\n"); + return_VALUE(0); + } + + seq_printf(seq, "levels: "); + for (i = 0; i < dev->brightness->count; i++) + seq_printf(seq, " %d", dev->brightness->levels[i]); + seq_printf(seq, "\ncurrent: %d\n", dev->brightness->curr); + + return_VALUE(0); +} + +static int +acpi_video_device_brightness_open_fs ( + struct inode *inode, + struct file *file) +{ + return single_open(file, acpi_video_device_brightness_seq_show, + PDE(inode)->data); +} + +static ssize_t +acpi_video_device_write_brightness ( + struct file *file, + const char __user *buffer, + size_t count, + loff_t *data) +{ + struct seq_file *m = (struct seq_file *) file->private_data; + struct acpi_video_device *dev = (struct acpi_video_device *) m->private; + char str[4] = {0}; + unsigned int level = 0; + int i; + + ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness"); + + if (!dev || count + 1 > sizeof str) + return_VALUE(-EINVAL); + + if (copy_from_user(str, buffer, count)) + return_VALUE(-EFAULT); + + str[count] = 0; + level = simple_strtoul(str, NULL, 0); + + if (level > 100) + return_VALUE(-EFAULT); + + /* validate though the list of available levels */ + for (i = 0; i < dev->brightness->count; i++) + if (level == dev->brightness->levels[i]) { + if (ACPI_SUCCESS(acpi_video_device_lcd_set_level(dev, level))) + dev->brightness->curr = level; + break; + } + + return_VALUE(count); +} + +static int +acpi_video_device_EDID_seq_show ( + struct seq_file *seq, + void *offset) +{ + struct acpi_video_device *dev = (struct acpi_video_device *) seq->private; + int status; + int i; + union acpi_object *edid = NULL; + + ACPI_FUNCTION_TRACE("acpi_video_device_EDID_seq_show"); + + if (!dev) + goto out; + + status = acpi_video_device_EDID (dev, &edid, 128); + if (ACPI_FAILURE(status)) { + status = acpi_video_device_EDID (dev, &edid, 256); + } + + if (ACPI_FAILURE(status)) { + goto out; + } + + if (edid && edid->type == ACPI_TYPE_BUFFER) { + for (i = 0; i < edid->buffer.length; i++) + seq_putc(seq, edid->buffer.pointer[i]); + } + +out: + if (!edid) + seq_printf(seq, "\n"); + else + kfree(edid); + + return_VALUE(0); +} + +static int +acpi_video_device_EDID_open_fs ( + struct inode *inode, + struct file *file) +{ + return single_open(file, acpi_video_device_EDID_seq_show, + PDE(inode)->data); +} + + +static int +acpi_video_device_add_fs ( + struct acpi_device *device) +{ + struct proc_dir_entry *entry = NULL; + struct acpi_video_device *vid_dev; + + ACPI_FUNCTION_TRACE("acpi_video_device_add_fs"); + + if (!device) + return_VALUE(-ENODEV); + + vid_dev = (struct acpi_video_device *) acpi_driver_data(device); + if (!vid_dev) + return_VALUE(-ENODEV); + + if (!acpi_device_dir(device)) { + acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), + vid_dev->video->dir); + if (!acpi_device_dir(device)) + return_VALUE(-ENODEV); + acpi_device_dir(device)->owner = THIS_MODULE; + } + + /* 'info' [R] */ + entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); + if (!entry) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'info' fs entry\n")); + else { + entry->proc_fops = &acpi_video_device_info_fops; + entry->data = acpi_driver_data(device); + entry->owner = THIS_MODULE; + } + + /* 'state' [R/W] */ + entry = create_proc_entry("state", S_IFREG|S_IRUGO|S_IWUSR, acpi_device_dir(device)); + if (!entry) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'state' fs entry\n")); + else { + entry->proc_fops = &acpi_video_device_state_fops; + entry->proc_fops->write = acpi_video_device_write_state; + entry->data = acpi_driver_data(device); + entry->owner = THIS_MODULE; + } + + /* 'brightness' [R/W] */ + entry = create_proc_entry("brightness", S_IFREG|S_IRUGO|S_IWUSR, acpi_device_dir(device)); + if (!entry) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'brightness' fs entry\n")); + else { + entry->proc_fops = &acpi_video_device_brightness_fops; + entry->proc_fops->write = acpi_video_device_write_brightness; + entry->data = acpi_driver_data(device); + entry->owner = THIS_MODULE; + } + + /* 'EDID' [R] */ + entry = create_proc_entry("EDID", S_IRUGO, acpi_device_dir(device)); + if (!entry) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'brightness' fs entry\n")); + else { + entry->proc_fops = &acpi_video_device_EDID_fops; + entry->data = acpi_driver_data(device); + entry->owner = THIS_MODULE; + } + + return_VALUE(0); +} + +static int +acpi_video_device_remove_fs ( + struct acpi_device *device) +{ + struct acpi_video_device *vid_dev; + ACPI_FUNCTION_TRACE("acpi_video_device_remove_fs"); + + vid_dev = (struct acpi_video_device *) acpi_driver_data(device); + if (!vid_dev || !vid_dev->video || !vid_dev->video->dir) + return_VALUE(-ENODEV); + + if (acpi_device_dir(device)) { + remove_proc_entry("info", acpi_device_dir(device)); + remove_proc_entry("state", acpi_device_dir(device)); + remove_proc_entry("brightness", acpi_device_dir(device)); + remove_proc_entry("EDID", acpi_device_dir(device)); + remove_proc_entry(acpi_device_bid(device), + vid_dev->video->dir); + acpi_device_dir(device) = NULL; + } + + return_VALUE(0); +} + + +/* video bus */ +static int +acpi_video_bus_info_seq_show ( + struct seq_file *seq, + void *offset) +{ + struct acpi_video_bus *video = (struct acpi_video_bus *) seq->private; + + ACPI_FUNCTION_TRACE("acpi_video_bus_info_seq_show"); + + if (!video) + goto end; + + seq_printf(seq, "Switching heads: %s\n", + video->flags.multihead ? "yes":"no"); + seq_printf(seq, "Video ROM: %s\n", + video->flags.rom ? "yes":"no"); + seq_printf(seq, "Device to be POSTed on boot: %s\n", + video->flags.post ? "yes":"no"); + +end: + return_VALUE(0); +} + +static int +acpi_video_bus_info_open_fs ( + struct inode *inode, + struct file *file) +{ + return single_open(file, acpi_video_bus_info_seq_show, PDE(inode)->data); +} + +static int +acpi_video_bus_ROM_seq_show ( + struct seq_file *seq, + void *offset) +{ + struct acpi_video_bus *video = (struct acpi_video_bus *) seq->private; + + ACPI_FUNCTION_TRACE("acpi_video_bus_ROM_seq_show"); + + if (!video) + goto end; + + printk(KERN_INFO PREFIX "Please implement %s\n", __FUNCTION__); + seq_printf(seq, "\n"); + +end: + return_VALUE(0); +} + +static int +acpi_video_bus_ROM_open_fs ( + struct inode *inode, + struct file *file) +{ + return single_open(file, acpi_video_bus_ROM_seq_show, PDE(inode)->data); +} + +static int +acpi_video_bus_POST_info_seq_show ( + struct seq_file *seq, + void *offset) +{ + struct acpi_video_bus *video = (struct acpi_video_bus *) seq->private; + unsigned long options; + int status; + + ACPI_FUNCTION_TRACE("acpi_video_bus_POST_info_seq_show"); + + if (!video) + goto end; + + status = acpi_video_bus_POST_options(video, &options); + if (ACPI_SUCCESS(status)) { + if (!(options & 1)) { + printk(KERN_WARNING PREFIX "The motherboard VGA device is not listed as a possible POST device.\n"); + printk(KERN_WARNING PREFIX "This indicate a BIOS bug. Please contact the manufacturer.\n"); + } + printk("%lx\n", options); + seq_printf(seq, "can POST: "); + if (options & 2) + seq_printf(seq, " "); + if (options & 4) + seq_printf(seq, " "); + seq_putc(seq, '\n'); + } else + seq_printf(seq, "\n"); +end: + return_VALUE(0); +} + +static int +acpi_video_bus_POST_info_open_fs ( + struct inode *inode, + struct file *file) +{ + return single_open(file, acpi_video_bus_POST_info_seq_show, PDE(inode)->data); +} + +static int +acpi_video_bus_POST_seq_show ( + struct seq_file *seq, + void *offset) +{ + struct acpi_video_bus *video = (struct acpi_video_bus *) seq->private; + int status; + unsigned long id; + char device_decode[][30] = { + "motherboard VGA device", + "PCI VGA device", + "AGP VGA device", + "UNKNOWN", + }; + + ACPI_FUNCTION_TRACE("acpi_video_bus_POST_seq_show"); + + if (!video) + goto end; + + status = acpi_video_bus_get_POST (video, &id); + if (!ACPI_SUCCESS(status)) { + seq_printf(seq, "\n"); + goto end; + } + seq_printf(seq, "device posted is <%s>\n", device_decode[id & 3]); + +end: + return_VALUE(0); +} + +static int +acpi_video_bus_DOS_seq_show ( + struct seq_file *seq, + void *offset) +{ + struct acpi_video_bus *video = (struct acpi_video_bus *) seq->private; + + ACPI_FUNCTION_TRACE("acpi_video_bus_DOS_seq_show"); + + seq_printf(seq, "DOS setting: <%d>\n", video->dos_setting ); + + return_VALUE(0); +} + +static int +acpi_video_bus_POST_open_fs ( + struct inode *inode, + struct file *file) +{ + return single_open(file, acpi_video_bus_POST_seq_show, PDE(inode)->data); +} + +static int +acpi_video_bus_DOS_open_fs ( + struct inode *inode, + struct file *file) +{ + return single_open(file, acpi_video_bus_DOS_seq_show, PDE(inode)->data); +} + +static ssize_t +acpi_video_bus_write_POST ( + struct file *file, + const char __user *buffer, + size_t count, + loff_t *data) +{ + int status; + struct seq_file *m = (struct seq_file *) file->private_data; + struct acpi_video_bus *video = (struct acpi_video_bus *) m->private; + char str[12] = {0}; + unsigned long opt, options; + + ACPI_FUNCTION_TRACE("acpi_video_bus_write_POST"); + + + if (!video || count + 1 > sizeof str) + return_VALUE(-EINVAL); + + status = acpi_video_bus_POST_options(video, &options); + if (!ACPI_SUCCESS(status)) + return_VALUE(-EINVAL); + + if (copy_from_user(str, buffer, count)) + return_VALUE(-EFAULT); + + str[count] = 0; + opt = strtoul(str, NULL, 0); + if (opt > 3) + return_VALUE(-EFAULT); + + /* just in case an OEM 'forget' the motherboard... */ + options |= 1; + + if (options & (1ul << opt)) { + status = acpi_video_bus_set_POST (video, opt); + if (!ACPI_SUCCESS(status)) + return_VALUE(-EFAULT); + + } + + + return_VALUE(count); +} + +static ssize_t +acpi_video_bus_write_DOS ( + struct file *file, + const char __user *buffer, + size_t count, + loff_t *data) +{ + int status; + struct seq_file *m = (struct seq_file *) file->private_data; + struct acpi_video_bus *video = (struct acpi_video_bus *) m->private; + char str[12] = {0}; + unsigned long opt; + + ACPI_FUNCTION_TRACE("acpi_video_bus_write_DOS"); + + + if (!video || count + 1 > sizeof str) + return_VALUE(-EINVAL); + + if (copy_from_user(str, buffer, count)) + return_VALUE(-EFAULT); + + str[count] = 0; + opt = strtoul(str, NULL, 0); + if (opt > 7) + return_VALUE(-EFAULT); + + status = acpi_video_bus_DOS (video, opt & 0x3, (opt & 0x4)>>2); + + if (!ACPI_SUCCESS(status)) + return_VALUE(-EFAULT); + + return_VALUE(count); +} + +static int +acpi_video_bus_add_fs ( + struct acpi_device *device) +{ + struct proc_dir_entry *entry = NULL; + struct acpi_video_bus *video; + + ACPI_FUNCTION_TRACE("acpi_video_bus_add_fs"); + + video = (struct acpi_video_bus *) acpi_driver_data(device); + + if (!acpi_device_dir(device)) { + acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), + acpi_video_dir); + if (!acpi_device_dir(device)) + return_VALUE(-ENODEV); + video->dir = acpi_device_dir(device); + acpi_device_dir(device)->owner = THIS_MODULE; + } + + /* 'info' [R] */ + entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); + if (!entry) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create 'info' fs entry\n")); + else { + entry->proc_fops = &acpi_video_bus_info_fops; + entry->data = acpi_driver_data(device); + entry->owner = THIS_MODULE; + } + + /* 'ROM' [R] */ + entry = create_proc_entry("ROM", S_IRUGO, acpi_device_dir(device)); + if (!entry) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create 'ROM' fs entry\n")); + else { + entry->proc_fops = &acpi_video_bus_ROM_fops; + entry->data = acpi_driver_data(device); + entry->owner = THIS_MODULE; + } + + /* 'POST_info' [R] */ + entry = create_proc_entry("POST_info", S_IRUGO, acpi_device_dir(device)); + if (!entry) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create 'POST_info' fs entry\n")); + else { + entry->proc_fops = &acpi_video_bus_POST_info_fops; + entry->data = acpi_driver_data(device); + entry->owner = THIS_MODULE; + } + + /* 'POST' [R/W] */ + entry = create_proc_entry("POST", S_IFREG|S_IRUGO|S_IRUSR, acpi_device_dir(device)); + if (!entry) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create 'POST' fs entry\n")); + else { + entry->proc_fops = &acpi_video_bus_POST_fops; + entry->proc_fops->write = acpi_video_bus_write_POST; + entry->data = acpi_driver_data(device); + entry->owner = THIS_MODULE; + } + + /* 'DOS' [R/W] */ + entry = create_proc_entry("DOS", S_IFREG|S_IRUGO|S_IRUSR, acpi_device_dir(device)); + if (!entry) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to create 'DOS' fs entry\n")); + else { + entry->proc_fops = &acpi_video_bus_DOS_fops; + entry->proc_fops->write = acpi_video_bus_write_DOS; + entry->data = acpi_driver_data(device); + entry->owner = THIS_MODULE; + } + + return_VALUE(0); +} + +static int +acpi_video_bus_remove_fs ( + struct acpi_device *device) +{ + struct acpi_video_bus *video; + + ACPI_FUNCTION_TRACE("acpi_video_bus_remove_fs"); + + video = (struct acpi_video_bus *) acpi_driver_data(device); + + if (acpi_device_dir(device)) { + remove_proc_entry("info", acpi_device_dir(device)); + remove_proc_entry("ROM", acpi_device_dir(device)); + remove_proc_entry("POST_info", acpi_device_dir(device)); + remove_proc_entry("POST", acpi_device_dir(device)); + remove_proc_entry("DOS", acpi_device_dir(device)); + remove_proc_entry(acpi_device_bid(device), + acpi_video_dir); + acpi_device_dir(device) = NULL; + } + + return_VALUE(0); +} + +/* -------------------------------------------------------------------------- + Driver Interface + -------------------------------------------------------------------------- */ + +/* device interface */ + +static int +acpi_video_bus_get_one_device ( + struct acpi_device *device, + struct acpi_video_bus *video) +{ + unsigned long device_id; + int status, result; + struct acpi_video_device *data; + + ACPI_FUNCTION_TRACE("acpi_video_bus_get_one_device"); + + if (!device || !video) + return_VALUE(-EINVAL); + + status = acpi_evaluate_integer(device->handle, "_ADR", NULL, &device_id); + if (ACPI_SUCCESS(status)) { + + data = kmalloc(sizeof(struct acpi_video_device), GFP_KERNEL); + if (!data) + return_VALUE(-ENOMEM); + + memset(data, 0, sizeof(struct acpi_video_device)); + + data->handle = device->handle; + strcpy(acpi_device_name(device), ACPI_VIDEO_DEVICE_NAME); + strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS); + acpi_driver_data(device) = data; + + data->device_id = device_id; + data->video = video; + data->dev = device; + + switch (device_id & 0xffff) { + case 0x0100: + data->flags.crt = 1; + break; + case 0x0400: + data->flags.lcd = 1; + break; + case 0x0200: + data->flags.tvout = 1; + break; + default: + data->flags.unknown = 1; + break; + } + + acpi_video_device_bind(video, data); + acpi_video_device_find_cap(data); + + status = acpi_install_notify_handler(data->handle, + ACPI_DEVICE_NOTIFY, acpi_video_device_notify, data); + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error installing notify handler\n")); + result = -ENODEV; + goto end; + } + + down(&video->sem); + list_add_tail(&data->entry, &video->video_device_list); + up(&video->sem); + + acpi_video_device_add_fs(device); + + return_VALUE(0); + } + +end: + return_VALUE(-ENOENT); +} + +/* + * Arg: + * video : video bus device + * + * Return: + * none + * + * Enumerate the video device list of the video bus, + * bind the ids with the corresponding video devices + * under the video bus. + */ + +static void +acpi_video_device_rebind( struct acpi_video_bus *video) +{ + struct list_head * node, * next; + list_for_each_safe(node, next, &video->video_device_list) { + struct acpi_video_device * dev = container_of(node, struct acpi_video_device, entry); + acpi_video_device_bind( video, dev); + } +} + +/* + * Arg: + * video : video bus device + * device : video output device under the video + * bus + * + * Return: + * none + * + * Bind the ids with the corresponding video devices + * under the video bus. + */ + +static void +acpi_video_device_bind( struct acpi_video_bus *video, + struct acpi_video_device *device) +{ + int i; + ACPI_FUNCTION_TRACE("acpi_video_device_bind"); + +#define IDS_VAL(i) video->attached_array[i].value.int_val +#define IDS_BIND(i) video->attached_array[i].bind_info + + for (i = 0; IDS_VAL(i) != ACPI_VIDEO_HEAD_INVALID && + i < video->attached_count; i++) { + if (device->device_id == (IDS_VAL(i)& 0xffff)) { + IDS_BIND(i) = device; + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "device_bind %d\n", i)); + } + } +#undef IDS_VAL +#undef IDS_BIND +} + +/* + * Arg: + * video : video bus device + * + * Return: + * < 0 : error + * + * Call _DOD to enumerate all devices attached to display adapter + * + */ + +static int acpi_video_device_enumerate(struct acpi_video_bus *video) +{ + int status; + int count; + int i; + struct acpi_video_enumerated_device *active_device_list; + struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; + union acpi_object *dod = NULL; + union acpi_object *obj; + + ACPI_FUNCTION_TRACE("acpi_video_device_enumerate"); + + status = acpi_evaluate_object(video->handle, "_DOD", NULL, &buffer); + if (!ACPI_SUCCESS(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _DOD\n")); + return_VALUE(status); + } + + dod = (union acpi_object *) buffer.pointer; + if (!dod || (dod->type != ACPI_TYPE_PACKAGE)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _DOD data\n")); + status = -EFAULT; + goto out; + } + + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d video heads in _DOD\n", + dod->package.count)); + + active_device_list= kmalloc( + dod->package.count*sizeof(struct acpi_video_enumerated_device), + GFP_KERNEL); + + if (!active_device_list) { + status = -ENOMEM; + goto out; + } + + count = 0; + for (i = 0; i < dod->package.count; i++) { + obj = (union acpi_object *) &dod->package.elements[i]; + + if (obj->type != ACPI_TYPE_INTEGER) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _DOD data\n")); + active_device_list[i].value.int_val = ACPI_VIDEO_HEAD_INVALID; + } + active_device_list[i].value.int_val = obj->integer.value; + active_device_list[i].bind_info = NULL; + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "dod element[%d] = %d\n", i, (int) obj->integer.value)); + count++; + } + active_device_list[count].value.int_val = ACPI_VIDEO_HEAD_END; + + if(video->attached_array) + kfree(video->attached_array); + + video->attached_array = active_device_list; + video->attached_count = count; +out: + acpi_os_free(buffer.pointer); + return_VALUE(status); +} + +/* + * Arg: + * video : video bus device + * event : Nontify Event + * + * Return: + * < 0 : error + * + * 1. Find out the current active output device. + * 2. Identify the next output device to switch + * 3. call _DSS to do actual switch. + */ + +static int +acpi_video_switch_output( + struct acpi_video_bus *video, + int event) +{ + struct list_head * node, * next; + struct acpi_video_device *dev=NULL; + struct acpi_video_device *dev_next=NULL; + struct acpi_video_device *dev_prev=NULL; + unsigned long state; + int status = 0; + + ACPI_FUNCTION_TRACE("acpi_video_switch_output"); + + list_for_each_safe(node, next, &video->video_device_list) { + struct acpi_video_device * dev = container_of(node, struct acpi_video_device, entry); + status = acpi_video_device_get_state(dev, &state); + if (state & 0x2){ + dev_next = container_of(node->next, struct acpi_video_device, entry); + dev_prev = container_of(node->prev, struct acpi_video_device, entry); + goto out; + } + } + dev_next = container_of(node->next, struct acpi_video_device, entry); + dev_prev = container_of(node->prev, struct acpi_video_device, entry); +out: + switch (event) { + case ACPI_VIDEO_NOTIFY_CYCLE: + case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: + acpi_video_device_set_state(dev, 0); + acpi_video_device_set_state(dev_next, 0x80000001); + break; + case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: + acpi_video_device_set_state(dev, 0); + acpi_video_device_set_state(dev_prev, 0x80000001); + default: + break; + } + + return_VALUE(status); +} + +static int +acpi_video_get_next_level( + struct acpi_video_device *device, + u32 level_current, + u32 event) +{ + /*Fix me*/ + return level_current; +} + + +static void +acpi_video_switch_brightness ( + struct acpi_video_device *device, + int event) +{ + unsigned long level_current, level_next; + acpi_video_device_lcd_get_level_current(device, &level_current); + level_next = acpi_video_get_next_level(device, level_current, event); + acpi_video_device_lcd_set_level(device, level_next); +} + +static int +acpi_video_bus_get_devices ( + struct acpi_video_bus *video, + struct acpi_device *device) +{ + int status = 0; + struct list_head *node, *next; + + ACPI_FUNCTION_TRACE("acpi_video_get_devices"); + + acpi_video_device_enumerate(video); + + list_for_each_safe(node, next, &device->children) { + struct acpi_device *dev = list_entry(node, struct acpi_device, node); + + if (!dev) + continue; + + status = acpi_video_bus_get_one_device(dev, video); + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Cant attach device\n")); + continue; + } + + } + return_VALUE(status); +} + +static int +acpi_video_bus_put_one_device( + struct acpi_video_device *device) +{ + struct acpi_video_bus *video; + + ACPI_FUNCTION_TRACE("acpi_video_bus_put_one_device"); + + if (!device || !device->video) + return_VALUE(-ENOENT); + + video = device->video; + + down(&video->sem); + list_del(&device->entry); + up(&video->sem); + acpi_video_device_remove_fs(device->dev); + + return_VALUE(0); +} + +static int +acpi_video_bus_put_devices ( + struct acpi_video_bus *video) +{ + int status; + struct list_head *node, *next; + + ACPI_FUNCTION_TRACE("acpi_video_bus_put_devices"); + + list_for_each_safe(node, next, &video->video_device_list) { + struct acpi_video_device *data = list_entry(node, struct acpi_video_device, entry); + if (!data) + continue; + + status = acpi_video_bus_put_one_device(data); + if(ACPI_FAILURE(status)) + printk(KERN_WARNING PREFIX "hhuuhhuu bug in acpi video driver.\n"); + + if (data->brightness) + kfree(data->brightness); + + kfree(data); + } + + return_VALUE(0); +} + +/* acpi_video interface */ + +static int +acpi_video_bus_start_devices( + struct acpi_video_bus *video) +{ + return acpi_video_bus_DOS(video, 1, 0); +} + +static int +acpi_video_bus_stop_devices( + struct acpi_video_bus *video) +{ + return acpi_video_bus_DOS(video, 0, 1); +} + +static void +acpi_video_bus_notify ( + acpi_handle handle, + u32 event, + void *data) +{ + struct acpi_video_bus *video = (struct acpi_video_bus *) data; + struct acpi_device *device = NULL; + + ACPI_FUNCTION_TRACE("acpi_video_bus_notify"); + printk("video bus notify\n"); + + if (!video) + return_VOID; + + if (acpi_bus_get_device(handle, &device)) + return_VOID; + + switch (event) { + case ACPI_VIDEO_NOTIFY_SWITCH: /* User request that a switch occur, + * most likely via hotkey. */ + acpi_bus_generate_event(device, event, 0); + break; + + case ACPI_VIDEO_NOTIFY_PROBE: /* User plug or remove a video + * connector. */ + acpi_video_device_enumerate(video); + acpi_video_device_rebind(video); + acpi_video_switch_output(video, event); + acpi_bus_generate_event(device, event, 0); + break; + + case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed.*/ + case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */ + case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */ + acpi_video_switch_output(video, event); + acpi_bus_generate_event(device, event, 0); + break; + + default: + ACPI_DEBUG_PRINT((ACPI_DB_INFO, + "Unsupported event [0x%x]\n", event)); + break; + } + + return_VOID; +} + +static void +acpi_video_device_notify ( + acpi_handle handle, + u32 event, + void *data) +{ + struct acpi_video_device *video_device = (struct acpi_video_device *) data; + struct acpi_device *device = NULL; + + ACPI_FUNCTION_TRACE("acpi_video_device_notify"); + + printk("video device notify\n"); + if (!video_device) + return_VOID; + + if (acpi_bus_get_device(handle, &device)) + return_VOID; + + switch (event) { + case ACPI_VIDEO_NOTIFY_SWITCH: /* change in status (cycle output device) */ + case ACPI_VIDEO_NOTIFY_PROBE: /* change in status (output device status) */ + acpi_bus_generate_event(device, event, 0); + break; + case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */ + case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */ + case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: /* Decrease brightness */ + case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightnesss */ + case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */ + acpi_video_switch_brightness (video_device, event); + acpi_bus_generate_event(device, event, 0); + break; + default: + ACPI_DEBUG_PRINT((ACPI_DB_INFO, + "Unsupported event [0x%x]\n", event)); + break; + } + return_VOID; +} + +static int +acpi_video_bus_add ( + struct acpi_device *device) +{ + int result = 0; + acpi_status status = 0; + struct acpi_video_bus *video = NULL; + + ACPI_FUNCTION_TRACE("acpi_video_bus_add"); + + if (!device) + return_VALUE(-EINVAL); + + video = kmalloc(sizeof(struct acpi_video_bus), GFP_KERNEL); + if (!video) + return_VALUE(-ENOMEM); + memset(video, 0, sizeof(struct acpi_video_bus)); + + video->handle = device->handle; + strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME); + strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS); + acpi_driver_data(device) = video; + + acpi_video_bus_find_cap(video); + result = acpi_video_bus_check(video); + if (result) + goto end; + + result = acpi_video_bus_add_fs(device); + if (result) + goto end; + + init_MUTEX(&video->sem); + INIT_LIST_HEAD(&video->video_device_list); + + acpi_video_bus_get_devices(video, device); + acpi_video_bus_start_devices(video); + + status = acpi_install_notify_handler(video->handle, + ACPI_DEVICE_NOTIFY, acpi_video_bus_notify, video); + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error installing notify handler\n")); + result = -ENODEV; + goto end; + } + + printk(KERN_INFO PREFIX "%s [%s] (multi-head: %s rom: %s post: %s)\n", + ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(device), + video->flags.multihead ? "yes":"no", + video->flags.rom ? "yes":"no", + video->flags.post ? "yes":"no"); + +end: + if (result) { + acpi_video_bus_remove_fs(device); + kfree(video); + } + + return_VALUE(result); +} + +static int +acpi_video_bus_remove ( + struct acpi_device *device, + int type) +{ + acpi_status status = 0; + struct acpi_video_bus *video = NULL; + + ACPI_FUNCTION_TRACE("acpi_video_bus_remove"); + + if (!device || !acpi_driver_data(device)) + return_VALUE(-EINVAL); + + video = (struct acpi_video_bus *) acpi_driver_data(device); + + acpi_video_bus_stop_devices(video); + + status = acpi_remove_notify_handler(video->handle, + ACPI_DEVICE_NOTIFY, acpi_video_bus_notify); + if (ACPI_FAILURE(status)) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error removing notify handler\n")); + + acpi_video_bus_put_devices(video); + acpi_video_bus_remove_fs(device); + + if (video->attached_array) + kfree(video->attached_array); + kfree(video); + + return_VALUE(0); +} + + +static int +acpi_video_bus_match ( + struct acpi_device *device, + struct acpi_driver *driver) +{ + acpi_handle h_dummy1; + acpi_handle h_dummy2; + acpi_handle h_dummy3; + + ACPI_FUNCTION_TRACE("acpi_video_bus_match"); + + if (!device || !driver) + return_VALUE(-EINVAL); + + /* Since there is no HID, CID for ACPI Video drivers, we have + * to check well known required nodes for each feature we support. + */ + + /* Does this device able to support video switching ? */ + if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy1)) && + ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy2))) + return_VALUE(0); + + /* Does this device able to retrieve a video ROM ? */ + if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy1))) + return_VALUE(0); + + /* Does this device able to configure which video head to be POSTed ? */ + if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy1)) && + ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy2)) && + ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy3))) + return_VALUE(0); + + + return_VALUE(-ENODEV); +} + + +static int __init +acpi_video_init (void) +{ + int result = 0; + + ACPI_FUNCTION_TRACE("acpi_video_init"); + + /* + acpi_dbg_level = 0xFFFFFFFF; + acpi_dbg_layer = 0x08000000; + */ + + acpi_video_dir = proc_mkdir(ACPI_VIDEO_CLASS, acpi_root_dir); + if (!acpi_video_dir) + return_VALUE(-ENODEV); + acpi_video_dir->owner = THIS_MODULE; + + result = acpi_bus_register_driver(&acpi_video_bus); + if (result < 0) { + remove_proc_entry(ACPI_VIDEO_CLASS, acpi_root_dir); + return_VALUE(-ENODEV); + } + + return_VALUE(0); +} + +static void __exit +acpi_video_exit (void) +{ + ACPI_FUNCTION_TRACE("acpi_video_exit"); + + acpi_bus_unregister_driver(&acpi_video_bus); + + remove_proc_entry(ACPI_VIDEO_CLASS, acpi_root_dir); + + return_VOID; +} + +module_init(acpi_video_init); +module_exit(acpi_video_exit); diff -Nru a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c --- a/drivers/atm/ambassador.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/atm/ambassador.c 2004-11-10 17:19:02 -08:00 @@ -2261,7 +2261,7 @@ int err; // read resources from PCI configuration space - u8 irq = pci_dev->irq; + unsigned int irq = pci_dev->irq; if (pci_dev->device == PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD) { PRINTK (KERN_ERR, "skipped broken (PLX rev 2) card"); @@ -2438,6 +2438,8 @@ 0, 0, 0 }, { 0, } }; + +MODULE_DEVICE_TABLE(pci, amb_pci_tbl); static struct pci_driver amb_driver = { .name = "amb", diff -Nru a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c --- a/drivers/atm/atmtcp.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/atm/atmtcp.c 2004-11-10 17:19:05 -08:00 @@ -271,6 +271,28 @@ } } read_unlock(&vcc_sklist_lock); + module_put(THIS_MODULE); +} + + +static struct atm_vcc *find_vcc(struct atm_dev *dev, short vpi, int vci) +{ + struct hlist_head *head; + struct atm_vcc *vcc; + struct hlist_node *node; + struct sock *s; + + head = &vcc_hash[vci & (VCC_HTABLE_SIZE -1)]; + + sk_for_each(s, node, head) { + vcc = atm_sk(s); + if (vcc->dev == dev && + vcc->vci == vci && vcc->vpi == vpi && + vcc->qos.rxtp.traffic_class != ATM_NONE) { + return vcc; + } + } + return NULL; } @@ -278,11 +300,9 @@ { struct atm_dev *dev; struct atmtcp_hdr *hdr; - struct sock *s; - struct hlist_node *node; - struct atm_vcc *out_vcc = NULL; + struct atm_vcc *out_vcc; struct sk_buff *new_skb; - int i, result = 0; + int result = 0; if (!skb->len) return 0; dev = vcc->dev_data; @@ -293,19 +313,7 @@ goto done; } read_lock(&vcc_sklist_lock); - for(i = 0; i < VCC_HTABLE_SIZE; ++i) { - struct hlist_head *head = &vcc_hash[i]; - - sk_for_each(s, node, head) { - out_vcc = atm_sk(s); - if (out_vcc->dev != dev) - continue; - if (out_vcc->vpi == ntohs(hdr->vpi) && - out_vcc->vci == ntohs(hdr->vci) && - out_vcc->qos.rxtp.traffic_class != ATM_NONE) - break; - } - } + out_vcc = find_vcc(dev, ntohs(hdr->vpi), ntohs(hdr->vci)); read_unlock(&vcc_sklist_lock); if (!out_vcc) { atomic_inc(&vcc->stats->tx_err); diff -Nru a/drivers/atm/fore200e.h b/drivers/atm/fore200e.h --- a/drivers/atm/fore200e.h 2004-11-10 17:19:04 -08:00 +++ b/drivers/atm/fore200e.h 2004-11-10 17:19:04 -08:00 @@ -645,7 +645,7 @@ typedef struct fw_header { u32 magic; /* magic number */ - u32 version; /* firware version id */ + u32 version; /* firmware version id */ u32 load_offset; /* fw load offset in board memory */ u32 start_offset; /* fw execution start address in board memory */ } fw_header_t; diff -Nru a/drivers/atm/he.c b/drivers/atm/he.c --- a/drivers/atm/he.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/atm/he.c 2004-11-10 17:19:03 -08:00 @@ -3051,6 +3051,8 @@ { 0, } }; +MODULE_DEVICE_TABLE(pci, he_pci_tbl); + static struct pci_driver he_driver = { .name = "he", .probe = he_init_one, diff -Nru a/drivers/atm/horizon.c b/drivers/atm/horizon.c --- a/drivers/atm/horizon.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/atm/horizon.c 2004-11-10 17:19:02 -08:00 @@ -354,8 +354,7 @@ /********** globals **********/ -static hrz_dev * hrz_devs = NULL; -static struct timer_list housekeeping; +static void do_housekeeping (unsigned long arg); static unsigned short debug = 0; static unsigned short vpi_bits = 0; @@ -1386,7 +1385,7 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id, struct pt_regs *pt_regs) { - hrz_dev * dev = hrz_devs; + hrz_dev * dev = (hrz_dev *) dev_id; u32 int_source; unsigned int irq_ok; (void) pt_regs; @@ -1397,16 +1396,6 @@ PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq); return IRQ_NONE; } - // Did one of our cards generate the interrupt? - while (dev) { - if (dev == dev_id) - break; - dev = dev->prev; - } - if (!dev) { - PRINTD (DBG_IRQ, "irq not for me: %d", irq); - return IRQ_NONE; - } if (irq != dev->irq) { PRINTD (DBG_IRQ|DBG_ERR, "irq mismatch: %d", irq); return IRQ_NONE; @@ -1462,28 +1451,18 @@ /********** housekeeping **********/ -static void set_timer (struct timer_list * timer, unsigned int delay) { - timer->expires = jiffies + delay; - add_timer (timer); - return; -} - static void do_housekeeping (unsigned long arg) { // just stats at the moment - hrz_dev * dev = hrz_devs; - (void) arg; - // data is set to zero at module unload - if (housekeeping.data) { - while (dev) { - // collect device-specific (not driver/atm-linux) stats here - dev->tx_cell_count += rd_regw (dev, TX_CELL_COUNT_OFF); - dev->rx_cell_count += rd_regw (dev, RX_CELL_COUNT_OFF); - dev->hec_error_count += rd_regw (dev, HEC_ERROR_COUNT_OFF); - dev->unassigned_cell_count += rd_regw (dev, UNASSIGNED_CELL_COUNT_OFF); - dev = dev->prev; - } - set_timer (&housekeeping, HZ/10); - } + hrz_dev * dev = (hrz_dev *) arg; + + // collect device-specific (not driver/atm-linux) stats here + dev->tx_cell_count += rd_regw (dev, TX_CELL_COUNT_OFF); + dev->rx_cell_count += rd_regw (dev, RX_CELL_COUNT_OFF); + dev->hec_error_count += rd_regw (dev, HEC_ERROR_COUNT_OFF); + dev->unassigned_cell_count += rd_regw (dev, UNASSIGNED_CELL_COUNT_OFF); + + mod_timer (&dev->housekeeping, jiffies + HZ/10); + return; } @@ -2719,157 +2698,176 @@ .owner = THIS_MODULE, }; -static int __init hrz_probe (void) { - struct pci_dev * pci_dev; - int devs; - - PRINTD (DBG_FLOW, "hrz_probe"); - - devs = 0; - pci_dev = NULL; - while ((pci_dev = pci_find_device - (PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_HORIZON, pci_dev) - )) { - hrz_dev * dev; - - // adapter slot free, read resources from PCI configuration space - u32 iobase = pci_resource_start (pci_dev, 0); - u32 * membase = bus_to_virt (pci_resource_start (pci_dev, 1)); - u8 irq = pci_dev->irq; - - /* XXX DEV_LABEL is a guess */ - if (!request_region (iobase, HRZ_IO_EXTENT, DEV_LABEL)) - continue; - - if (pci_enable_device (pci_dev)) - continue; - - dev = kmalloc (sizeof(hrz_dev), GFP_KERNEL); - if (!dev) { - // perhaps we should be nice: deregister all adapters and abort? - PRINTD (DBG_ERR, "out of memory"); - continue; - } - - memset (dev, 0, sizeof(hrz_dev)); - - // grab IRQ and install handler - move this someplace more sensible - if (request_irq (irq, - interrupt_handler, - SA_SHIRQ, /* irqflags guess */ - DEV_LABEL, /* name guess */ - dev)) { - PRINTD (DBG_WARN, "request IRQ failed!"); - // free_irq is at "endif" - } else { - - PRINTD (DBG_INFO, "found Madge ATM adapter (hrz) at: IO %x, IRQ %u, MEM %p", - iobase, irq, membase); - - dev->atm_dev = atm_dev_register (DEV_LABEL, &hrz_ops, -1, NULL); - if (!(dev->atm_dev)) { - PRINTD (DBG_ERR, "failed to register Madge ATM adapter"); - } else { +static int __devinit hrz_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) +{ + hrz_dev * dev; + int err = 0; + + // adapter slot free, read resources from PCI configuration space + u32 iobase = pci_resource_start (pci_dev, 0); + u32 * membase = bus_to_virt (pci_resource_start (pci_dev, 1)); + u8 irq = pci_dev->irq; unsigned char lat; - - PRINTD (DBG_INFO, "registered Madge ATM adapter (no. %d) (%p) at %p", - dev->atm_dev->number, dev, dev->atm_dev); + + PRINTD (DBG_FLOW, "hrz_probe"); + + /* XXX DEV_LABEL is a guess */ + if (!request_region(iobase, HRZ_IO_EXTENT, DEV_LABEL)) + return -EINVAL; + + if (pci_enable_device(pci_dev)) { + err = -EINVAL; + goto out_release; + } + + dev = kmalloc(sizeof(hrz_dev), GFP_KERNEL); + if (!dev) { + // perhaps we should be nice: deregister all adapters and abort? + PRINTD(DBG_ERR, "out of memory"); + err = -ENOMEM; + goto out_disable; + } + + memset(dev, 0, sizeof(hrz_dev)); + + pci_set_drvdata(pci_dev, dev); + + // grab IRQ and install handler - move this someplace more sensible + if (request_irq(irq, + interrupt_handler, + SA_SHIRQ, /* irqflags guess */ + DEV_LABEL, /* name guess */ + dev)) { + PRINTD(DBG_WARN, "request IRQ failed!"); + err = -EINVAL; + goto out_free; + } + + PRINTD(DBG_INFO, "found Madge ATM adapter (hrz) at: IO %x, IRQ %u, MEM %p", + iobase, irq, membase); + + dev->atm_dev = atm_dev_register(DEV_LABEL, &hrz_ops, -1, NULL); + if (!(dev->atm_dev)) { + PRINTD(DBG_ERR, "failed to register Madge ATM adapter"); + err = -EINVAL; + goto out_free_irq; + } + + PRINTD(DBG_INFO, "registered Madge ATM adapter (no. %d) (%p) at %p", + dev->atm_dev->number, dev, dev->atm_dev); dev->atm_dev->dev_data = (void *) dev; dev->pci_dev = pci_dev; - + // enable bus master accesses - pci_set_master (pci_dev); - + pci_set_master(pci_dev); + // frobnicate latency (upwards, usually) - pci_read_config_byte (pci_dev, PCI_LATENCY_TIMER, &lat); + pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &lat); if (pci_lat) { - PRINTD (DBG_INFO, "%s PCI latency timer from %hu to %hu", - "changing", lat, pci_lat); - pci_write_config_byte (pci_dev, PCI_LATENCY_TIMER, pci_lat); + PRINTD(DBG_INFO, "%s PCI latency timer from %hu to %hu", + "changing", lat, pci_lat); + pci_write_config_byte(pci_dev, PCI_LATENCY_TIMER, pci_lat); } else if (lat < MIN_PCI_LATENCY) { - PRINTK (KERN_INFO, "%s PCI latency timer from %hu to %hu", - "increasing", lat, MIN_PCI_LATENCY); - pci_write_config_byte (pci_dev, PCI_LATENCY_TIMER, MIN_PCI_LATENCY); + PRINTK(KERN_INFO, "%s PCI latency timer from %hu to %hu", + "increasing", lat, MIN_PCI_LATENCY); + pci_write_config_byte(pci_dev, PCI_LATENCY_TIMER, MIN_PCI_LATENCY); } - + dev->iobase = iobase; dev->irq = irq; dev->membase = membase; - + dev->rx_q_entry = dev->rx_q_reset = &memmap->rx_q_entries[0]; dev->rx_q_wrap = &memmap->rx_q_entries[RX_CHANS-1]; - + // these next three are performance hacks dev->last_vc = -1; dev->tx_last = -1; dev->tx_idle = 0; - + dev->tx_regions = 0; dev->tx_bytes = 0; dev->tx_skb = NULL; dev->tx_iovec = NULL; - + dev->tx_cell_count = 0; dev->rx_cell_count = 0; dev->hec_error_count = 0; dev->unassigned_cell_count = 0; - + dev->noof_spare_buffers = 0; - + { - unsigned int i; - for (i = 0; i < TX_CHANS; ++i) - dev->tx_channel_record[i] = -1; + unsigned int i; + for (i = 0; i < TX_CHANS; ++i) + dev->tx_channel_record[i] = -1; } - + dev->flags = 0; - + // Allocate cell rates and remember ASIC version // Fibre: ATM_OC3_PCR = 1555200000/8/270*260/53 - 29/53 // Copper: (WRONG) we want 6 into the above, close to 25Mb/s // Copper: (plagarise!) 25600000/8/270*260/53 - n/53 - - if (hrz_init (dev)) { - // to be really pedantic, this should be ATM_OC3c_PCR - dev->tx_avail = ATM_OC3_PCR; - dev->rx_avail = ATM_OC3_PCR; - set_bit (ultra, &dev->flags); // NOT "|= ultra" ! + + if (hrz_init(dev)) { + // to be really pedantic, this should be ATM_OC3c_PCR + dev->tx_avail = ATM_OC3_PCR; + dev->rx_avail = ATM_OC3_PCR; + set_bit(ultra, &dev->flags); // NOT "|= ultra" ! } else { - dev->tx_avail = ((25600000/8)*26)/(27*53); - dev->rx_avail = ((25600000/8)*26)/(27*53); - PRINTD (DBG_WARN, "Buggy ASIC: no TX bus-mastering."); + dev->tx_avail = ((25600000/8)*26)/(27*53); + dev->rx_avail = ((25600000/8)*26)/(27*53); + PRINTD(DBG_WARN, "Buggy ASIC: no TX bus-mastering."); } - + // rate changes spinlock - spin_lock_init (&dev->rate_lock); - + spin_lock_init(&dev->rate_lock); + // on-board memory access spinlock; we want atomic reads and // writes to adapter memory (handles IRQ and SMP) - spin_lock_init (&dev->mem_lock); - - init_waitqueue_head (&dev->tx_queue); - + spin_lock_init(&dev->mem_lock); + + init_waitqueue_head(&dev->tx_queue); + // vpi in 0..4, vci in 6..10 dev->atm_dev->ci_range.vpi_bits = vpi_bits; dev->atm_dev->ci_range.vci_bits = 10-vpi_bits; - - // update count and linked list - ++devs; - dev->prev = hrz_devs; - hrz_devs = dev; - // success - continue; - - /* not currently reached */ - atm_dev_deregister (dev->atm_dev); - } /* atm_dev_register */ - free_irq (irq, dev); - - } /* request_irq */ - kfree (dev); - release_region(iobase, HRZ_IO_EXTENT); - } /* kmalloc and while */ - return devs; + + init_timer(&dev->housekeeping); + dev->housekeeping.function = do_housekeeping; + dev->housekeeping.data = (unsigned long) dev; + mod_timer(&dev->housekeeping, jiffies); + +out: + return err; + +out_free_irq: + free_irq(dev->irq, dev); +out_free: + kfree(dev); +out_disable: + pci_disable_device(pci_dev); +out_release: + release_region(iobase, HRZ_IO_EXTENT); + goto out; +} + +static void __devexit hrz_remove_one(struct pci_dev *pci_dev) +{ + hrz_dev *dev; + + dev = pci_get_drvdata(pci_dev); + + PRINTD(DBG_INFO, "closing %p (atm_dev = %p)", dev, dev->atm_dev); + del_timer_sync(&dev->housekeeping); + hrz_reset(dev); + atm_dev_deregister(dev->atm_dev); + free_irq(dev->irq, dev); + release_region(dev->iobase, HRZ_IO_EXTENT); + kfree(dev); + + pci_disable_device(pci_dev); } static void __init hrz_check_args (void) { @@ -2909,11 +2907,24 @@ MODULE_PARM_DESC(max_rx_size, "maximum size of RX AAL5 frames"); MODULE_PARM_DESC(pci_lat, "PCI latency in bus cycles"); +static struct pci_device_id hrz_pci_tbl[] = { + { PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_HORIZON, PCI_ANY_ID, PCI_ANY_ID, + 0, 0, 0 }, + { 0, } +}; + +MODULE_DEVICE_TABLE(pci, hrz_pci_tbl); + +static struct pci_driver hrz_driver = { + .name = "horizon", + .probe = hrz_probe, + .remove = __devexit_p(hrz_remove_one), + .id_table = hrz_pci_tbl, +}; + /********** module entry **********/ static int __init hrz_module_init (void) { - int devs; - // sanity check - cast is needed since printk does not support %Zu if (sizeof(struct MEMMAP) != 128*1024/4) { PRINTK (KERN_ERR, "Fix struct MEMMAP (is %lu fakewords).", @@ -2927,44 +2938,15 @@ hrz_check_args(); // get the juice - devs = hrz_probe(); - - if (devs) { - init_timer (&housekeeping); - housekeeping.function = do_housekeeping; - // paranoia - housekeeping.data = 1; - set_timer (&housekeeping, 0); - } else { - PRINTK (KERN_ERR, "no (usable) adapters found"); - } - - return devs ? 0 : -ENODEV; + return pci_module_init(&hrz_driver); } /********** module exit **********/ static void __exit hrz_module_exit (void) { - hrz_dev * dev; PRINTD (DBG_FLOW, "cleanup_module"); - // paranoia - housekeeping.data = 0; - del_timer (&housekeeping); - - while (hrz_devs) { - dev = hrz_devs; - hrz_devs = dev->prev; - - PRINTD (DBG_INFO, "closing %p (atm_dev = %p)", dev, dev->atm_dev); - hrz_reset (dev); - atm_dev_deregister (dev->atm_dev); - free_irq (dev->irq, dev); - release_region (dev->iobase, HRZ_IO_EXTENT); - kfree (dev); - } - - return; + return pci_unregister_driver(&hrz_driver); } module_init(hrz_module_init); diff -Nru a/drivers/atm/horizon.h b/drivers/atm/horizon.h --- a/drivers/atm/horizon.h 2004-11-10 17:19:06 -08:00 +++ b/drivers/atm/horizon.h 2004-11-10 17:19:06 -08:00 @@ -457,7 +457,7 @@ unsigned long unassigned_cell_count; struct pci_dev * pci_dev; - struct hrz_dev * prev; + struct timer_list housekeeping; }; typedef struct hrz_dev hrz_dev; diff -Nru a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c --- a/drivers/atm/idt77252.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/atm/idt77252.c 2004-11-10 17:19:04 -08:00 @@ -3820,6 +3820,8 @@ { 0, } }; +MODULE_DEVICE_TABLE(pci, idt77252_pci_tbl); + static struct pci_driver idt77252_driver = { .name = "idt77252", .id_table = idt77252_pci_tbl, diff -Nru a/drivers/base/Kconfig b/drivers/base/Kconfig --- a/drivers/base/Kconfig 2004-11-10 17:19:03 -08:00 +++ b/drivers/base/Kconfig 2004-11-10 17:19:03 -08:00 @@ -14,7 +14,7 @@ default y help Say yes to avoid building firmware. Firmware is usually shipped - with the driver, and only when updating the firware a rebuild + with the driver, and only when updating the firmware a rebuild should be made. If unsure say Y here. diff -Nru a/drivers/base/bus.c b/drivers/base/bus.c --- a/drivers/base/bus.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/base/bus.c 2004-11-10 17:19:03 -08:00 @@ -135,6 +135,52 @@ decl_subsys(bus, &ktype_bus, NULL); +static int __bus_for_each_dev(struct bus_type *bus, struct device *start, + void *data, int (*fn)(struct device *, void *)) +{ + struct list_head *head; + struct device *dev; + int error = 0; + + if (!(bus = get_bus(bus))) + return -EINVAL; + + head = &bus->devices.list; + dev = list_prepare_entry(start, head, bus_list); + list_for_each_entry_continue(dev, head, bus_list) { + get_device(dev); + error = fn(dev, data); + put_device(dev); + if (error) + break; + } + put_bus(bus); + return error; +} + +static int __bus_for_each_drv(struct bus_type *bus, struct device_driver *start, + void * data, int (*fn)(struct device_driver *, void *)) +{ + struct list_head *head; + struct device_driver *drv; + int error = 0; + + if (!(bus = get_bus(bus))) + return -EINVAL; + + head = &bus->drivers.list; + drv = list_prepare_entry(start, head, kobj.entry); + list_for_each_entry_continue(drv, head, kobj.entry) { + get_driver(drv); + error = fn(drv, data); + put_driver(drv); + if (error) + break; + } + put_bus(bus); + return error; +} + /** * bus_for_each_dev - device iterator. * @bus: bus type. @@ -154,30 +200,16 @@ * to retain this data, it should do, and increment the reference * count in the supplied callback. */ + int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data, int (*fn)(struct device *, void *)) { - struct device *dev; - struct list_head * head; - int error = 0; - - if (!(bus = get_bus(bus))) - return -EINVAL; - - head = &bus->devices.list; - dev = list_prepare_entry(start, head, bus_list); + int ret; down_read(&bus->subsys.rwsem); - list_for_each_entry_continue(dev, head, bus_list) { - get_device(dev); - error = fn(dev, data); - put_device(dev); - if (error) - break; - } + ret = __bus_for_each_dev(bus, start, data, fn); up_read(&bus->subsys.rwsem); - put_bus(bus); - return error; + return ret; } /** @@ -203,27 +235,12 @@ int bus_for_each_drv(struct bus_type * bus, struct device_driver * start, void * data, int (*fn)(struct device_driver *, void *)) { - struct list_head * head; - struct device_driver *drv; - int error = 0; - - if(!(bus = get_bus(bus))) - return -EINVAL; - - head = &bus->drivers.list; - drv = list_prepare_entry(start, head, kobj.entry); + int ret; down_read(&bus->subsys.rwsem); - list_for_each_entry_continue(drv, head, kobj.entry) { - get_driver(drv); - error = fn(drv, data); - put_driver(drv); - if(error) - break; - } + ret = __bus_for_each_drv(bus, start, data, fn); up_read(&bus->subsys.rwsem); - put_bus(bus); - return error; + return ret; } /** @@ -246,38 +263,40 @@ list_add_tail(&dev->driver_list, &dev->driver->devices); sysfs_create_link(&dev->driver->kobj, &dev->kobj, kobject_name(&dev->kobj)); + sysfs_create_link(&dev->kobj, &dev->driver->kobj, "driver"); } /** - * bus_match - check compatibility between device & driver. - * @dev: device. + * driver_probe_device - attempt to bind device & driver. * @drv: driver. + * @dev: device. * - * First, we call the bus's match function, which should compare - * the device IDs the driver supports with the device IDs of the - * device. Note we don't do this ourselves because we don't know - * the format of the ID structures, nor what is to be considered - * a match and what is not. + * First, we call the bus's match function, if one present, which + * should compare the device IDs the driver supports with the + * device IDs of the device. Note we don't do this ourselves + * because we don't know the format of the ID structures, nor what + * is to be considered a match and what is not. * * If we find a match, we call @drv->probe(@dev) if it exists, and - * call attach() above. + * call device_bind_driver() above. */ -static int bus_match(struct device * dev, struct device_driver * drv) +int driver_probe_device(struct device_driver * drv, struct device * dev) { - int error = -ENODEV; - if (dev->bus->match(dev, drv)) { - dev->driver = drv; - if (drv->probe) { - if ((error = drv->probe(dev))) { - dev->driver = NULL; - return error; - } + if (drv->bus->match && !drv->bus->match(dev, drv)) + return -ENODEV; + + dev->driver = drv; + if (drv->probe) { + int error = drv->probe(dev); + if (error) { + dev->driver = NULL; + return error; } - device_bind_driver(dev); - error = 0; } - return error; + + device_bind_driver(dev); + return 0; } @@ -285,10 +304,11 @@ * device_attach - try to attach device to a driver. * @dev: device. * - * Walk the list of drivers that the bus has and call bus_match() - * for each pair. If a compatible pair is found, break out and return. + * Walk the list of drivers that the bus has and call + * driver_probe_device() for each pair. If a compatible + * pair is found, break out and return. */ -static int device_attach(struct device * dev) +int device_attach(struct device * dev) { struct bus_type * bus = dev->bus; struct list_head * entry; @@ -302,7 +322,7 @@ if (bus->match) { list_for_each(entry, &bus->drivers.list) { struct device_driver * drv = to_drv(entry); - error = bus_match(dev, drv); + error = driver_probe_device(drv, dev); if (!error) /* success, driver matched */ return 1; @@ -322,13 +342,13 @@ * driver_attach - try to bind driver to devices. * @drv: driver. * - * Walk the list of devices that the bus has on it and try to match - * the driver with each one. - * If bus_match() returns 0 and the @dev->driver is set, we've found - * a compatible pair. + * Walk the list of devices that the bus has on it and try to + * match the driver with each one. If driver_probe_device() + * returns 0 and the @dev->driver is set, we've found a + * compatible pair. * - * Note that we ignore the -ENODEV error from bus_match(), since it's - * perfectly valid for a driver not to bind to any devices. + * Note that we ignore the -ENODEV error from driver_probe_device(), + * since it's perfectly valid for a driver not to bind to any devices. */ void driver_attach(struct device_driver * drv) { @@ -342,7 +362,7 @@ list_for_each(entry, &bus->devices.list) { struct device * dev = container_of(entry, struct device, bus_list); if (!dev->driver) { - error = bus_match(dev, drv); + error = driver_probe_device(drv, dev); if (error && (error != -ENODEV)) /* driver matched but the probe failed */ printk(KERN_WARNING @@ -368,6 +388,7 @@ struct device_driver * drv = dev->driver; if (drv) { sysfs_remove_link(&drv->kobj, kobject_name(&dev->kobj)); + sysfs_remove_link(&dev->kobj, "driver"); list_del_init(&dev->driver_list); device_detach_shutdown(dev); if (drv->remove) @@ -515,7 +536,7 @@ if (bus) { pr_debug("bus %s: add driver %s\n", bus->name, drv->name); - error = kobject_set_name(&drv->kobj, drv->name); + error = kobject_set_name(&drv->kobj, "%s", drv->name); if (error) { put_bus(bus); return error; @@ -586,7 +607,9 @@ { int count = 0; - bus_for_each_dev(bus, NULL, &count, bus_rescan_devices_helper); + down_write(&bus->subsys.rwsem); + __bus_for_each_dev(bus, NULL, &count, bus_rescan_devices_helper); + up_write(&bus->subsys.rwsem); return count; } @@ -666,7 +689,7 @@ { int retval; - retval = kobject_set_name(&bus->subsys.kset.kobj, bus->name); + retval = kobject_set_name(&bus->subsys.kset.kobj, "%s", bus->name); if (retval) goto out; @@ -726,8 +749,11 @@ EXPORT_SYMBOL_GPL(bus_for_each_dev); EXPORT_SYMBOL_GPL(bus_for_each_drv); +EXPORT_SYMBOL_GPL(driver_probe_device); EXPORT_SYMBOL_GPL(device_bind_driver); EXPORT_SYMBOL_GPL(device_release_driver); +EXPORT_SYMBOL_GPL(device_attach); +EXPORT_SYMBOL_GPL(driver_attach); EXPORT_SYMBOL_GPL(bus_add_device); EXPORT_SYMBOL_GPL(bus_remove_device); diff -Nru a/drivers/base/class.c b/drivers/base/class.c --- a/drivers/base/class.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/base/class.c 2004-11-10 17:19:07 -08:00 @@ -139,7 +139,7 @@ INIT_LIST_HEAD(&cls->children); INIT_LIST_HEAD(&cls->interfaces); - error = kobject_set_name(&cls->subsys.kset.kobj, cls->name); + error = kobject_set_name(&cls->subsys.kset.kobj, "%s", cls->name); if (error) return error; @@ -283,8 +283,34 @@ { struct class_device *class_dev = to_class_dev(kobj); int retval = 0; + int i = 0; + int length = 0; pr_debug("%s - name = %s\n", __FUNCTION__, class_dev->class_id); + + if (class_dev->dev) { + /* add physical device, backing this device */ + struct device *dev = class_dev->dev; + char *path = kobject_get_path(&dev->kobj, GFP_KERNEL); + + add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, + &length, "PHYSDEVPATH=%s", path); + kfree(path); + + /* add bus name of physical device */ + if (dev->bus) + add_hotplug_env_var(envp, num_envp, &i, + buffer, buffer_size, &length, + "PHYSDEVBUS=%s", dev->bus->name); + + /* terminate, set to next free slot, shrink available space */ + envp[i] = NULL; + envp = &envp[i]; + num_envp -= i; + buffer = &buffer[length]; + buffer_size -= length; + } + if (class_dev->class->hotplug) { /* have the bus specific function add its stuff */ retval = class_dev->class->hotplug (class_dev, envp, num_envp, @@ -368,7 +394,7 @@ class_dev->class_id); /* first, register with generic layer. */ - kobject_set_name(&class_dev->kobj, class_dev->class_id); + kobject_set_name(&class_dev->kobj, "%s", class_dev->class_id); if (parent) class_dev->kobj.parent = &parent->subsys.kset.kobj; diff -Nru a/drivers/base/core.c b/drivers/base/core.c --- a/drivers/base/core.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/base/core.c 2004-11-10 17:19:02 -08:00 @@ -209,19 +209,19 @@ */ int device_add(struct device *dev) { - struct device * parent; - int error; + struct device *parent = NULL; + int error = -EINVAL; dev = get_device(dev); if (!dev || !strlen(dev->bus_id)) - return -EINVAL; + goto Error; parent = get_device(dev->parent); pr_debug("DEV: registering device: ID = '%s'\n", dev->bus_id); /* first, register with generic layer. */ - kobject_set_name(&dev->kobj, dev->bus_id); + kobject_set_name(&dev->kobj, "%s", dev->bus_id); if (parent) dev->kobj.parent = &parent->kobj; diff -Nru a/drivers/base/cpu.c b/drivers/base/cpu.c --- a/drivers/base/cpu.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/base/cpu.c 2004-11-10 17:19:03 -08:00 @@ -32,6 +32,8 @@ switch (buf[0]) { case '0': ret = cpu_down(cpu->sysdev.id); + if (!ret) + kobject_hotplug(&dev->kobj, KOBJ_OFFLINE); break; case '1': ret = cpu_up(cpu->sysdev.id); diff -Nru a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c --- a/drivers/base/firmware_class.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/base/firmware_class.c 2004-11-10 17:19:07 -08:00 @@ -94,19 +94,17 @@ int num_envp, char *buffer, int buffer_size) { struct firmware_priv *fw_priv = class_get_devdata(class_dev); - int i = 0; - char *scratch = buffer; + int i = 0, len = 0; if (!test_bit(FW_STATUS_READY, &fw_priv->status)) return -ENODEV; - if (buffer_size < (FIRMWARE_NAME_MAX + 10)) - return -ENOMEM; - if (num_envp < 1) + if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &len, + "FIRMWARE=%s", fw_priv->fw_id)) return -ENOMEM; - envp[i++] = scratch; - scratch += sprintf(scratch, "FIRMWARE=%s", fw_priv->fw_id) + 1; + envp[i++] = NULL; + return 0; } @@ -583,4 +581,3 @@ EXPORT_SYMBOL(request_firmware); EXPORT_SYMBOL(request_firmware_nowait); EXPORT_SYMBOL(register_firmware); -EXPORT_SYMBOL(firmware_class); diff -Nru a/drivers/base/power/main.c b/drivers/base/power/main.c --- a/drivers/base/power/main.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/base/power/main.c 2004-11-10 17:19:06 -08:00 @@ -28,6 +28,7 @@ LIST_HEAD(dpm_off_irq); DECLARE_MUTEX(dpm_sem); +DECLARE_MUTEX(dpm_list_sem); /* * PM Reference Counting. @@ -75,12 +76,12 @@ pr_debug("PM: Adding info for %s:%s\n", dev->bus ? dev->bus->name : "No Bus", dev->kobj.name); atomic_set(&dev->power.pm_users, 0); - down(&dpm_sem); + down(&dpm_list_sem); list_add_tail(&dev->power.entry, &dpm_active); device_pm_set_parent(dev, dev->parent); if ((error = dpm_sysfs_add(dev))) list_del(&dev->power.entry); - up(&dpm_sem); + up(&dpm_list_sem); return error; } @@ -88,11 +89,11 @@ { pr_debug("PM: Removing info for %s:%s\n", dev->bus ? dev->bus->name : "No Bus", dev->kobj.name); - down(&dpm_sem); + down(&dpm_list_sem); dpm_sysfs_remove(dev); device_pm_release(dev->power.pm_parent); - list_del(&dev->power.entry); - up(&dpm_sem); + list_del_init(&dev->power.entry); + up(&dpm_list_sem); } diff -Nru a/drivers/base/power/power.h b/drivers/base/power/power.h --- a/drivers/base/power/power.h 2004-11-10 17:19:07 -08:00 +++ b/drivers/base/power/power.h 2004-11-10 17:19:07 -08:00 @@ -28,6 +28,11 @@ extern struct semaphore dpm_sem; /* + * Used to serialize changes to the dpm_* lists. + */ +extern struct semaphore dpm_list_sem; + +/* * The PM lists. */ extern struct list_head dpm_active; diff -Nru a/drivers/base/power/resume.c b/drivers/base/power/resume.c --- a/drivers/base/power/resume.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/base/power/resume.c 2004-11-10 17:19:06 -08:00 @@ -31,16 +31,22 @@ void dpm_resume(void) { + down(&dpm_list_sem); while(!list_empty(&dpm_off)) { struct list_head * entry = dpm_off.next; struct device * dev = to_device(entry); + + get_device(dev); list_del_init(entry); + list_add_tail(entry, &dpm_active); + up(&dpm_list_sem); if (!dev->power.prev_state) resume_device(dev); - - list_add_tail(entry, &dpm_active); + down(&dpm_list_sem); + put_device(dev); } + up(&dpm_list_sem); } @@ -76,9 +82,13 @@ { while(!list_empty(&dpm_off_irq)) { struct list_head * entry = dpm_off_irq.next; + struct device * dev = to_device(entry); + + get_device(dev); list_del_init(entry); - resume_device(to_device(entry)); list_add_tail(entry, &dpm_active); + resume_device(dev); + put_device(dev); } } diff -Nru a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c --- a/drivers/base/power/suspend.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/base/power/suspend.c 2004-11-10 17:19:06 -08:00 @@ -63,11 +63,6 @@ * If we hit a failure with any of the devices, call device_resume() * above to bring the suspended devices back to life. * - * Note this function leaves dpm_sem held to - * a) block other devices from registering. - * b) prevent other PM operations from happening after we've begun. - * c) make sure we're exclusive when we disable interrupts. - * */ int device_suspend(u32 state) @@ -75,29 +70,40 @@ int error = 0; down(&dpm_sem); - while(!list_empty(&dpm_active)) { + down(&dpm_list_sem); + while (!list_empty(&dpm_active) && error == 0) { struct list_head * entry = dpm_active.prev; struct device * dev = to_device(entry); + + get_device(dev); + up(&dpm_list_sem); + error = suspend_device(dev, state); - if (!error) { - list_del(&dev->power.entry); - list_add(&dev->power.entry, &dpm_off); - } else if (error == -EAGAIN) { - list_del(&dev->power.entry); - list_add(&dev->power.entry, &dpm_off_irq); - } else { + down(&dpm_list_sem); + + /* Check if the device got removed */ + if (!list_empty(&dev->power.entry)) { + /* Move it to the dpm_off or dpm_off_irq list */ + if (!error) { + list_del(&dev->power.entry); + list_add(&dev->power.entry, &dpm_off); + } else if (error == -EAGAIN) { + list_del(&dev->power.entry); + list_add(&dev->power.entry, &dpm_off_irq); + error = 0; + } + } + if (error) printk(KERN_ERR "Could not suspend device %s: " "error %d\n", kobject_name(&dev->kobj), error); - goto Error; - } + put_device(dev); } - Done: + up(&dpm_list_sem); + if (error) + dpm_resume(); up(&dpm_sem); return error; - Error: - dpm_resume(); - goto Done; } EXPORT_SYMBOL_GPL(device_suspend); diff -Nru a/drivers/block/Kconfig b/drivers/block/Kconfig --- a/drivers/block/Kconfig 2004-11-10 17:19:03 -08:00 +++ b/drivers/block/Kconfig 2004-11-10 17:19:03 -08:00 @@ -308,6 +308,8 @@ This driver supports certain USB attached storage devices such as flash keys. + Warning: Enabling this cripples the usb-storage driver. + If unsure, say N. config BLK_DEV_RAM diff -Nru a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c --- a/drivers/block/cfq-iosched.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/block/cfq-iosched.c 2004-11-10 17:19:05 -08:00 @@ -1482,7 +1482,6 @@ static void cfq_put_cfqd(struct cfq_data *cfqd) { request_queue_t *q = cfqd->queue; - elevator_t *e = q->elevator; struct cfq_queue *cfqq; if (!atomic_dec_and_test(&cfqd->ref)) @@ -1500,7 +1499,6 @@ blk_put_queue(q); - e->elevator_data = NULL; mempool_destroy(cfqd->crq_pool); kfree(cfqd->crq_hash); kfree(cfqd->cfq_hash); diff -Nru a/drivers/block/elevator.c b/drivers/block/elevator.c --- a/drivers/block/elevator.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/block/elevator.c 2004-11-10 17:19:06 -08:00 @@ -113,14 +113,28 @@ return e; } +static void elevator_put(struct elevator_type *e) +{ + module_put(e->elevator_owner); +} + +static struct elevator_type *elevator_get(const char *name) +{ + struct elevator_type *e = elevator_find(name); + + if (!e) + return NULL; + if (!try_module_get(e->elevator_owner)) + return NULL; + + return e; +} + static int elevator_attach(request_queue_t *q, struct elevator_type *e, struct elevator_queue *eq) { int ret = 0; - if (!try_module_get(e->elevator_owner)) - return -EINVAL; - memset(eq, 0, sizeof(*eq)); eq->ops = &e->ops; eq->elevator_type = e; @@ -156,7 +170,8 @@ #else #error "You must build at least 1 IO scheduler into the kernel" #endif - printk("elevator: using %s as default io scheduler\n", chosen_elevator); + printk(KERN_INFO "elevator: using %s as default io scheduler\n", + chosen_elevator); } static int __init elevator_setup(char *str) @@ -178,17 +193,21 @@ if (!name) name = chosen_elevator; - e = elevator_find(name); + e = elevator_get(name); if (!e) return -EINVAL; eq = kmalloc(sizeof(struct elevator_queue), GFP_KERNEL); - if (!eq) + if (!eq) { + elevator_put(e->elevator_type); return -ENOMEM; + } ret = elevator_attach(q, e, eq); - if (ret) + if (ret) { kfree(eq); + elevator_put(e->elevator_type); + } return ret; } @@ -198,7 +217,7 @@ if (e->ops->elevator_exit_fn) e->ops->elevator_exit_fn(e); - module_put(e->elevator_type->elevator_owner); + elevator_put(e->elevator_type); e->elevator_type = NULL; kfree(e); } @@ -271,15 +290,24 @@ blk_plug_device(q); rq->q = q; - q->elevator->ops->elevator_add_req_fn(q, rq, where); - if (blk_queue_plugged(q)) { - int nrq = q->rq.count[READ] + q->rq.count[WRITE] - q->in_flight; + if (!test_bit(QUEUE_FLAG_DRAIN, &q->queue_flags)) { + q->elevator->ops->elevator_add_req_fn(q, rq, where); - if (nrq == q->unplug_thresh) - __generic_unplug_device(q); - } + if (blk_queue_plugged(q)) { + int nrq = q->rq.count[READ] + q->rq.count[WRITE] + - q->in_flight; + if (nrq == q->unplug_thresh) + __generic_unplug_device(q); + } + } else + /* + * if drain is set, store the request "locally". when the drain + * is finished, the requests will be handed ordered to the io + * scheduler + */ + list_add_tail(&rq->queuelist, &q->drain_list); } void elv_add_request(request_queue_t *q, struct request *rq, int where, @@ -333,7 +361,8 @@ end_that_request_chunk(rq, 0, nr_bytes); end_that_request_last(rq); } else { - printk("%s: bad return=%d\n", __FUNCTION__, ret); + printk(KERN_ERR "%s: bad return=%d\n", __FUNCTION__, + ret); break; } } @@ -486,7 +515,7 @@ list_add_tail(&e->list, &elv_list); spin_unlock_irq(&elv_list_lock); - printk("io scheduler %s registered\n", e->elevator_name); + printk(KERN_INFO "io scheduler %s registered\n", e->elevator_name); return 0; } EXPORT_SYMBOL_GPL(elv_register); @@ -503,19 +532,25 @@ * switch to new_e io scheduler. be careful not to introduce deadlocks - * we don't free the old io scheduler, before we have allocated what we * need for the new one. this way we have a chance of going back to the old - * one, if the new one fails init for some reason + * one, if the new one fails init for some reason. we also do an intermediate + * switch to noop to ensure safety with stack-allocated requests, since they + * don't originate from the block layer allocator. noop is safe here, because + * it never needs to touch the elevator itself for completion events. DRAIN + * flags will make sure we don't touch it for additions either. */ static void elevator_switch(request_queue_t *q, struct elevator_type *new_e) { elevator_t *e = kmalloc(sizeof(elevator_t), GFP_KERNEL); + struct elevator_type *noop_elevator = NULL; elevator_t *old_elevator; - if (!e) { - printk("elevator: out of memory\n"); - return; - } + if (!e) + goto error; - blk_wait_queue_drained(q); + /* + * first step, drain requests from the block freelist + */ + blk_wait_queue_drained(q, 0); /* * unregister old elevator data @@ -524,6 +559,18 @@ old_elevator = q->elevator; /* + * next step, switch to noop since it uses no private rq structures + * and doesn't allocate any memory for anything. then wait for any + * non-fs requests in-flight + */ + noop_elevator = elevator_get("noop"); + spin_lock_irq(q->queue_lock); + elevator_attach(q, noop_elevator, e); + spin_unlock_irq(q->queue_lock); + + blk_wait_queue_drained(q, 1); + + /* * attach and start new elevator */ if (elevator_attach(q, new_e, e)) @@ -537,6 +584,7 @@ */ elevator_exit(old_elevator); blk_finish_queue_drain(q); + elevator_put(noop_elevator); return; fail_register: @@ -549,7 +597,11 @@ q->elevator = old_elevator; elv_register_queue(q); blk_finish_queue_drain(q); - printk("elevator: switch to %s failed\n", new_e->elevator_name); +error: + if (noop_elevator) + elevator_put(noop_elevator); + elevator_put(new_e); + printk(KERN_ERR "elevator: switch to %s failed\n",new_e->elevator_name); } ssize_t elv_iosched_store(request_queue_t *q, const char *name, size_t count) @@ -563,11 +615,14 @@ if (elevator_name[strlen(elevator_name) - 1] == '\n') elevator_name[strlen(elevator_name) - 1] = '\0'; - e = elevator_find(elevator_name); + e = elevator_get(elevator_name); if (!e) { - printk("elevator: type %s not found\n", elevator_name); + printk(KERN_ERR "elevator: type %s not found\n", elevator_name); return -EINVAL; } + + if (!strcmp(elevator_name, q->elevator->elevator_type->elevator_name)) + return count; elevator_switch(q, e); return count; diff -Nru a/drivers/block/floppy.c b/drivers/block/floppy.c --- a/drivers/block/floppy.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/block/floppy.c 2004-11-10 17:19:03 -08:00 @@ -4286,6 +4286,13 @@ } use_virtual_dma = can_use_virtual_dma & 1; +#if defined(CONFIG_PPC64) + if (check_legacy_ioport(FDC1)) { + del_timer(&fd_timeout); + err = -ENODEV; + goto out_unreg_region; + } +#endif fdc_state[0].address = FDC1; if (fdc_state[0].address == -1) { del_timer(&fd_timeout); diff -Nru a/drivers/block/genhd.c b/drivers/block/genhd.c --- a/drivers/block/genhd.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/block/genhd.c 2004-11-10 17:19:04 -08:00 @@ -438,8 +438,46 @@ return ((ktype == &ktype_block) || (ktype == &ktype_part)); } +static int block_hotplug(struct kset *kset, struct kobject *kobj, char **envp, + int num_envp, char *buffer, int buffer_size) +{ + struct device *dev = NULL; + struct kobj_type *ktype = get_ktype(kobj); + int length = 0; + int i = 0; + + /* get physical device backing disk or partition */ + if (ktype == &ktype_block) { + struct gendisk *disk = container_of(kobj, struct gendisk, kobj); + dev = disk->driverfs_dev; + } else if (ktype == &ktype_part) { + struct gendisk *disk = container_of(kobj->parent, struct gendisk, kobj); + dev = disk->driverfs_dev; + } + + if (dev) { + /* add physical device, backing this device */ + char *path = kobject_get_path(&dev->kobj, GFP_KERNEL); + + add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, + &length, "PHYSDEVPATH=%s", path); + kfree(path); + + /* add bus name of physical device */ + if (dev->bus) + add_hotplug_env_var(envp, num_envp, &i, + buffer, buffer_size, &length, + "PHYSDEVBUS=%s", dev->bus->name); + + envp[i] = NULL; + } + + return 0; +} + static struct kset_hotplug_ops block_hotplug_ops = { - .filter = block_hotplug_filter, + .filter = block_hotplug_filter, + .hotplug = block_hotplug, }; /* declare block_subsys. */ diff -Nru a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c --- a/drivers/block/ll_rw_blk.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/block/ll_rw_blk.c 2004-11-10 17:19:02 -08:00 @@ -100,7 +100,7 @@ nr = q->nr_requests; q->nr_congestion_on = nr; - nr = q->nr_requests - (q->nr_requests / 8) - 1; + nr = q->nr_requests - (q->nr_requests / 8) - (q->nr_requests / 16) - 1; if (nr < 1) nr = 1; q->nr_congestion_off = nr; @@ -261,6 +261,8 @@ blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH); blk_queue_activity_fn(q, NULL, NULL); + + INIT_LIST_HEAD(&q->drain_list); } EXPORT_SYMBOL(blk_queue_make_request); @@ -2481,20 +2483,42 @@ void blk_finish_queue_drain(request_queue_t *q) { struct request_list *rl = &q->rq; + struct request *rq; + spin_lock_irq(q->queue_lock); clear_bit(QUEUE_FLAG_DRAIN, &q->queue_flags); + + while (!list_empty(&q->drain_list)) { + rq = list_entry_rq(q->drain_list.next); + + list_del_init(&rq->queuelist); + __elv_add_request(q, rq, ELEVATOR_INSERT_BACK, 1); + } + + spin_unlock_irq(q->queue_lock); + wake_up(&rl->wait[0]); wake_up(&rl->wait[1]); wake_up(&rl->drain); } +static int wait_drain(request_queue_t *q, struct request_list *rl, int dispatch) +{ + int wait = rl->count[READ] + rl->count[WRITE]; + + if (dispatch) + wait += !list_empty(&q->queue_head); + + return wait; +} + /* * We rely on the fact that only requests allocated through blk_alloc_request() * have io scheduler private data structures associated with them. Any other * type of request (allocated on stack or through kmalloc()) should not go * to the io scheduler core, but be attached to the queue head instead. */ -void blk_wait_queue_drained(request_queue_t *q) +void blk_wait_queue_drained(request_queue_t *q, int wait_dispatch) { struct request_list *rl = &q->rq; DEFINE_WAIT(wait); @@ -2502,10 +2526,10 @@ spin_lock_irq(q->queue_lock); set_bit(QUEUE_FLAG_DRAIN, &q->queue_flags); - while (rl->count[READ] || rl->count[WRITE]) { + while (wait_drain(q, rl, wait_dispatch)) { prepare_to_wait(&rl->drain, &wait, TASK_UNINTERRUPTIBLE); - if (rl->count[READ] || rl->count[WRITE]) { + if (wait_drain(q, rl, wait_dispatch)) { __generic_unplug_device(q); spin_unlock_irq(q->queue_lock); io_schedule(); @@ -2685,22 +2709,36 @@ { struct bio *bio, *prevbio = NULL; int nr_phys_segs, nr_hw_segs; + unsigned int phys_size, hw_size; + request_queue_t *q = rq->q; if (!rq->bio) return; - nr_phys_segs = nr_hw_segs = 0; + phys_size = hw_size = nr_phys_segs = nr_hw_segs = 0; rq_for_each_bio(bio, rq) { /* Force bio hw/phys segs to be recalculated. */ bio->bi_flags &= ~(1 << BIO_SEG_VALID); - nr_phys_segs += bio_phys_segments(rq->q, bio); - nr_hw_segs += bio_hw_segments(rq->q, bio); + nr_phys_segs += bio_phys_segments(q, bio); + nr_hw_segs += bio_hw_segments(q, bio); if (prevbio) { - if (blk_phys_contig_segment(rq->q, prevbio, bio)) + int pseg = phys_size + prevbio->bi_size + bio->bi_size; + int hseg = hw_size + prevbio->bi_size + bio->bi_size; + + if (blk_phys_contig_segment(q, prevbio, bio) && + pseg <= q->max_segment_size) { nr_phys_segs--; - if (blk_hw_contig_segment(rq->q, prevbio, bio)) + phys_size += prevbio->bi_size + bio->bi_size; + } else + phys_size = 0; + + if (blk_hw_contig_segment(q, prevbio, bio) && + hseg <= q->max_segment_size) { nr_hw_segs--; + hw_size += prevbio->bi_size + bio->bi_size; + } else + hw_size = 0; } prevbio = bio; } diff -Nru a/drivers/block/loop.c b/drivers/block/loop.c --- a/drivers/block/loop.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/block/loop.c 2004-11-10 17:19:05 -08:00 @@ -47,7 +47,7 @@ #include #include - +#include #include #include #include @@ -1073,7 +1073,7 @@ /* * And now the modules code and kernel interface. */ -MODULE_PARM(max_loop, "i"); +module_param(max_loop, int, 0); MODULE_PARM_DESC(max_loop, "Maximum number of loop devices (1-256)"); MODULE_LICENSE("GPL"); MODULE_ALIAS_BLOCKDEV_MAJOR(LOOP_MAJOR); diff -Nru a/drivers/block/paride/paride.c b/drivers/block/paride/paride.c --- a/drivers/block/paride/paride.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/block/paride/paride.c 2004-11-10 17:19:02 -08:00 @@ -140,7 +140,7 @@ #endif } -void pi_unclaim(PIA * pi) +static void pi_unclaim(PIA * pi) { pi->claimed = 0; #ifdef CONFIG_PARPORT @@ -148,8 +148,6 @@ parport_release((struct pardevice *) (pi->pardev)); #endif } - -EXPORT_SYMBOL(pi_unclaim); void pi_connect(PIA * pi) { diff -Nru a/drivers/block/paride/paride.h b/drivers/block/paride/paride.h --- a/drivers/block/paride/paride.h 2004-11-10 17:19:03 -08:00 +++ b/drivers/block/paride/paride.h 2004-11-10 17:19:03 -08:00 @@ -88,8 +88,6 @@ extern void pi_read_block(PIA *pi, char * buf, int count); -extern void pi_unclaim(PIA *pi); - extern void pi_connect(PIA *pi); extern void pi_disconnect(PIA *pi); diff -Nru a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c --- a/drivers/block/paride/pg.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/block/paride/pg.c 2004-11-10 17:19:06 -08:00 @@ -262,7 +262,7 @@ int *parm = *drives[unit]; struct pg *dev = &devices[unit]; dev->pi = &dev->pia; - set_bit(0, &dev->access); + clear_bit(0, &dev->access); dev->busy = 0; dev->present = 0; dev->bufptr = NULL; diff -Nru a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c --- a/drivers/block/pktcdvd.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/block/pktcdvd.c 2004-11-10 17:19:02 -08:00 @@ -621,7 +621,7 @@ BUG_ON(len < 0); memcpy(vto, vfrom, len); - kunmap_atomic(src_bvl->bv_page, KM_USER0); + kunmap_atomic(vfrom, KM_USER0); seg++; offs = 0; @@ -649,7 +649,7 @@ void *vfrom = kmap_atomic(pages[f], KM_USER0) + offsets[f]; void *vto = page_address(pkt->pages[p]) + offs; memcpy(vto, vfrom, CD_FRAMESIZE); - kunmap_atomic(pages[f], KM_USER0); + kunmap_atomic(vfrom, KM_USER0); pages[f] = pkt->pages[p]; offsets[f] = offs; } else { diff -Nru a/drivers/block/rd.c b/drivers/block/rd.c --- a/drivers/block/rd.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/block/rd.c 2004-11-10 17:19:05 -08:00 @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -508,9 +509,10 @@ #endif /* options - modular */ -MODULE_PARM (rd_size, "1i"); +module_param(rd_size, int, 0); MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes."); -MODULE_PARM (rd_blocksize, "i"); +module_param(rd_blocksize, int, 0); MODULE_PARM_DESC(rd_blocksize, "Blocksize of each RAM disk in bytes."); +MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR); MODULE_LICENSE("GPL"); diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c --- a/drivers/block/scsi_ioctl.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/block/scsi_ioctl.c 2004-11-10 17:19:07 -08:00 @@ -139,6 +139,7 @@ safe_for_read(GPCMD_PAUSE_RESUME), /* CD/DVD data reading */ + safe_for_read(GPCMD_READ_BUFFER_CAPACITY), safe_for_read(GPCMD_READ_CD), safe_for_read(GPCMD_READ_CD_MSF), safe_for_read(GPCMD_READ_DISC_INFO), diff -Nru a/drivers/block/ub.c b/drivers/block/ub.c --- a/drivers/block/ub.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/block/ub.c 2004-11-10 17:19:07 -08:00 @@ -8,13 +8,11 @@ * and is not licensed separately. See file COPYING for details. * * TODO (sorted by decreasing priority) - * -- ZIP does "ub: resid 18 len 0 act 0" and whole transport quits (toggles?) + * -- Do resets with usb_device_reset (needs a thread context, use khubd) * -- set readonly flag for CDs, set removable flag for CF readers * -- do inquiry and verify we got a disk and not a tape (for LUN mismatch) * -- support pphaneuf's SDDR-75 with two LUNs (also broken capacity...) * -- special case some senses, e.g. 3a/0 -> no media present, reduce retries - * -- do something about spin-down devices, they are extremely dangerous - * (ZIP is one. Needs spin-up command as well.) * -- verify the 13 conditions and do bulk resets * -- normal pool of commands instead of cmdv[]? * -- kill last_pipe and simply do two-state clearing on both pipes @@ -105,13 +103,11 @@ #define UB_MAX_SECTORS 64 /* - * A second ought to be enough for a 32K transfer (UB_MAX_SECTORS) - * even if a webcam hogs the bus (famous last words). - * Some CDs need a second to spin up though. - * ZIP drive rejects commands when it's not spinning, - * so it does not need long timeouts either. + * A second is more than enough for a 32K transfer (UB_MAX_SECTORS) + * even if a webcam hogs the bus, but some devices need time to spin up. */ #define UB_URB_TIMEOUT (HZ*2) +#define UB_DATA_TIMEOUT (HZ*5) /* ZIP does spin-ups in the data phase */ #define UB_CTRL_TIMEOUT (HZ/2) /* 500ms ought to be enough to clear a stall */ /* @@ -188,7 +184,7 @@ */ #define SCMD_ST_HIST_SZ 8 -#define SCMD_TRACE_SZ 15 /* No more than 256 (trace_index) */ +#define SCMD_TRACE_SZ 63 /* Less than 4KB of 61-byte lines */ struct ub_scsi_cmd_trace { int hcur; @@ -267,6 +263,7 @@ int changed; /* Media was changed */ int removable; int readonly; + int first_open; /* Kludge. See ub_bd_open. */ char name[8]; struct usb_device *dev; struct usb_interface *intf; @@ -888,9 +885,6 @@ int pipe; int rc; -/* P3 */ /** printk("ub: urb status %d pipe 0x%08x len %d act %d\n", - urb->status, urb->pipe, urb->transfer_buffer_length, urb->actual_length); **/ - if (atomic_read(&sc->poison)) { /* A little too simplistic, I feel... */ goto Bad_End; @@ -959,9 +953,12 @@ ub_cmdtr_state(sc, cmd); return; } - if (urb->status != 0) + if (urb->status != 0) { + printk("ub: cmd #%d cmd status (%d)\n", cmd->tag, urb->status); /* P3 */ goto Bad_End; + } if (urb->actual_length != US_BULK_CB_WRAP_LEN) { + printk("ub: cmd #%d xferred %d\n", cmd->tag, urb->actual_length); /* P3 */ /* XXX Must do reset here to unconfuse the device */ goto Bad_End; } @@ -993,7 +990,7 @@ return; } - sc->work_timer.expires = jiffies + UB_URB_TIMEOUT; + sc->work_timer.expires = jiffies + UB_DATA_TIMEOUT; add_timer(&sc->work_timer); cmd->state = UB_CMDST_DATA; @@ -1379,12 +1376,7 @@ sc->readonly = 0; /* XXX Query this from the device */ - /* - * XXX sd.c sets capacity to zero in such case. However, it doesn't - * work for us. In case of zero capacity, block layer refuses to - * have the /dev/uba opened (why?) Set capacity to some random value. - */ - sc->capacity.nsec = 50; + sc->capacity.nsec = 0; sc->capacity.bsize = 512; sc->capacity.bshift = 0; @@ -1399,7 +1391,7 @@ * We keep this because sd.c has retries for capacity. */ if (ub_sync_read_cap(sc, &sc->capacity) != 0) { - sc->capacity.nsec = 100; + sc->capacity.nsec = 0; sc->capacity.bsize = 512; sc->capacity.bshift = 0; } @@ -1428,6 +1420,26 @@ sc->openc++; spin_unlock_irqrestore(&ub_lock, flags); + /* + * This is a workaround for a specific problem in our block layer. + * In 2.6.9, register_disk duplicates the code from rescan_partitions. + * However, if we do add_disk with a device which persistently reports + * a changed media, add_disk calls register_disk, which does do_open, + * which will call rescan_paritions for changed media. After that, + * register_disk attempts to do it all again and causes double kobject + * registration and a eventually an oops on module removal. + * + * The bottom line is, Al Viro says that we should not allow + * bdev->bd_invalidated to be set when doing add_disk no matter what. + */ + if (sc->first_open) { + if (sc->changed) { + sc->first_open = 0; + rc = -ENOMEDIUM; + goto err_open; + } + } + if (sc->removable || sc->readonly) check_disk_change(inode->i_bdev); @@ -1467,6 +1479,8 @@ spin_lock_irqsave(&ub_lock, flags); --sc->openc; + if (sc->openc == 0) + sc->first_open = 0; if (sc->openc == 0 && atomic_read(&sc->poison)) ub_cleanup(sc); spin_unlock_irqrestore(&ub_lock, flags); @@ -1559,13 +1573,9 @@ */ if (ub_sync_tur(sc) != 0) { sc->changed = 1; - /* P3 */ printk("%s: made changed\n", sc->name); return 1; } - /* The sd.c clears this before returning (one-shot flag). Why? */ - /* P3 */ printk("%s: %s changed\n", sc->name, - sc->changed? "is": "was not"); return sc->changed; } @@ -1919,6 +1929,8 @@ } sc->removable = 1; /* XXX Query this from the device */ + sc->changed = 1; /* ub_revalidate clears only */ + sc->first_open = 1; ub_revalidate(sc); /* This is pretty much a long term P3 */ diff -Nru a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c --- a/drivers/bluetooth/bcm203x.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/bluetooth/bcm203x.c 2004-11-10 17:19:02 -08:00 @@ -264,7 +264,7 @@ BT_DBG("intf %p", intf); - usb_unlink_urb(data->urb); + usb_kill_urb(data->urb); usb_set_intfdata(intf, NULL); diff -Nru a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c --- a/drivers/bluetooth/bfusb.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/bluetooth/bfusb.c 2004-11-10 17:19:05 -08:00 @@ -123,7 +123,7 @@ while ((skb = skb_dequeue(&bfusb->pending_q))) { urb = ((struct bfusb_scb *) skb->cb)->urb; - usb_unlink_urb(urb); + usb_kill_urb(urb); skb_queue_tail(&bfusb->completed_q, skb); } @@ -680,7 +680,7 @@ bfusb->bulk_out_ep = bulk_out_ep->desc.bEndpointAddress; bfusb->bulk_pkt_size = bulk_out_ep->desc.wMaxPacketSize; - bfusb->lock = RW_LOCK_UNLOCKED; + rwlock_init(&bfusb->lock); bfusb->reassembly = NULL; diff -Nru a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c --- a/drivers/bluetooth/bluecard_cs.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/bluetooth/bluecard_cs.c 2004-11-10 17:19:04 -08:00 @@ -34,6 +34,8 @@ #include #include #include +#include + #include #include @@ -54,11 +56,11 @@ /* Bit map of interrupts to choose from */ -static u_int irq_mask = 0x86bc; +static unsigned int irq_mask = 0x86bc; static int irq_list[4] = { -1 }; -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); +module_param(irq_mask, uint, 0); +module_param_array(irq_list, int, NULL, 0); MODULE_AUTHOR("Marcel Holtmann "); MODULE_DESCRIPTION("Bluetooth driver for the Anycom BlueCard (LSE039/LSE041)"); @@ -90,14 +92,14 @@ } bluecard_info_t; -void bluecard_config(dev_link_t *link); -void bluecard_release(dev_link_t *link); -int bluecard_event(event_t event, int priority, event_callback_args_t *args); +static void bluecard_config(dev_link_t *link); +static void bluecard_release(dev_link_t *link); +static int bluecard_event(event_t event, int priority, event_callback_args_t *args); static dev_info_t dev_info = "bluecard_cs"; -dev_link_t *bluecard_attach(void); -void bluecard_detach(dev_link_t *); +static dev_link_t *bluecard_attach(void); +static void bluecard_detach(dev_link_t *); static dev_link_t *dev_list = NULL; @@ -170,7 +172,7 @@ /* ======================== LED handling routines ======================== */ -void bluecard_activity_led_timeout(u_long arg) +static void bluecard_activity_led_timeout(u_long arg) { bluecard_info_t *info = (bluecard_info_t *)arg; unsigned int iobase = info->link.io.BasePort1; @@ -719,7 +721,7 @@ /* ======================== Card services HCI interaction ======================== */ -int bluecard_open(bluecard_info_t *info) +static int bluecard_open(bluecard_info_t *info) { unsigned int iobase = info->link.io.BasePort1; struct hci_dev *hdev; @@ -837,7 +839,7 @@ } -int bluecard_close(bluecard_info_t *info) +static int bluecard_close(bluecard_info_t *info) { unsigned int iobase = info->link.io.BasePort1; struct hci_dev *hdev = info->hdev; @@ -864,7 +866,7 @@ return 0; } -dev_link_t *bluecard_attach(void) +static dev_link_t *bluecard_attach(void) { bluecard_info_t *info; client_reg_t client_reg; @@ -922,7 +924,7 @@ } -void bluecard_detach(dev_link_t *link) +static void bluecard_detach(dev_link_t *link) { bluecard_info_t *info = link->priv; dev_link_t **linkp; @@ -967,7 +969,7 @@ return pcmcia_parse_tuple(handle, tuple, parse); } -void bluecard_config(dev_link_t *link) +static void bluecard_config(dev_link_t *link) { client_handle_t handle = link->handle; bluecard_info_t *info = link->priv; @@ -1042,7 +1044,7 @@ } -void bluecard_release(dev_link_t *link) +static void bluecard_release(dev_link_t *link) { bluecard_info_t *info = link->priv; @@ -1061,7 +1063,7 @@ } -int bluecard_event(event_t event, int priority, event_callback_args_t *args) +static int bluecard_event(event_t event, int priority, event_callback_args_t *args) { dev_link_t *link = args->client_data; bluecard_info_t *info = link->priv; diff -Nru a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c --- a/drivers/bluetooth/bt3c_cs.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/bluetooth/bt3c_cs.c 2004-11-10 17:19:07 -08:00 @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -63,11 +64,11 @@ /* Bit map of interrupts to choose from */ -static u_int irq_mask = 0xffff; +static unsigned int irq_mask = 0xffff; static int irq_list[4] = { -1 }; -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); +module_param(irq_mask, uint, 0); +module_param_array(irq_list, int, NULL, 0); MODULE_AUTHOR("Marcel Holtmann , Jose Orlando Pereira "); MODULE_DESCRIPTION("Bluetooth driver for the 3Com Bluetooth PCMCIA card"); @@ -95,14 +96,14 @@ } bt3c_info_t; -void bt3c_config(dev_link_t *link); -void bt3c_release(dev_link_t *link); -int bt3c_event(event_t event, int priority, event_callback_args_t *args); +static void bt3c_config(dev_link_t *link); +static void bt3c_release(dev_link_t *link); +static int bt3c_event(event_t event, int priority, event_callback_args_t *args); static dev_info_t dev_info = "bt3c_cs"; -dev_link_t *bt3c_attach(void); -void bt3c_detach(dev_link_t *); +static dev_link_t *bt3c_attach(void); +static void bt3c_detach(dev_link_t *); static dev_link_t *dev_list = NULL; @@ -131,28 +132,28 @@ #define CONTROL 4 -inline void bt3c_address(unsigned int iobase, unsigned short addr) +static inline void bt3c_address(unsigned int iobase, unsigned short addr) { outb(addr & 0xff, iobase + ADDR_L); outb((addr >> 8) & 0xff, iobase + ADDR_H); } -inline void bt3c_put(unsigned int iobase, unsigned short value) +static inline void bt3c_put(unsigned int iobase, unsigned short value) { outb(value & 0xff, iobase + DATA_L); outb((value >> 8) & 0xff, iobase + DATA_H); } -inline void bt3c_io_write(unsigned int iobase, unsigned short addr, unsigned short value) +static inline void bt3c_io_write(unsigned int iobase, unsigned short addr, unsigned short value) { bt3c_address(iobase, addr); bt3c_put(iobase, value); } -inline unsigned short bt3c_get(unsigned int iobase) +static inline unsigned short bt3c_get(unsigned int iobase) { unsigned short value = inb(iobase + DATA_L); @@ -162,7 +163,7 @@ } -inline unsigned short bt3c_read(unsigned int iobase, unsigned short addr) +static inline unsigned short bt3c_read(unsigned int iobase, unsigned short addr) { bt3c_address(iobase, addr); @@ -489,13 +490,10 @@ static struct device *bt3c_device(void) { - static char *kobj_name = "bt3c"; - static struct device dev = { .bus_id = "pcmcia", }; - dev.kobj.k_name = kmalloc(strlen(kobj_name) + 1, GFP_KERNEL); - strcpy(dev.kobj.k_name, kobj_name); + kobject_set_name(&dev.kobj, "bt3c"); kobject_init(&dev.kobj); return &dev; @@ -586,7 +584,7 @@ } -int bt3c_open(bt3c_info_t *info) +static int bt3c_open(bt3c_info_t *info) { const struct firmware *firmware; struct hci_dev *hdev; @@ -656,7 +654,7 @@ } -int bt3c_close(bt3c_info_t *info) +static int bt3c_close(bt3c_info_t *info) { struct hci_dev *hdev = info->hdev; @@ -673,7 +671,7 @@ return 0; } -dev_link_t *bt3c_attach(void) +static dev_link_t *bt3c_attach(void) { bt3c_info_t *info; client_reg_t client_reg; @@ -731,7 +729,7 @@ } -void bt3c_detach(dev_link_t *link) +static void bt3c_detach(dev_link_t *link) { bt3c_info_t *info = link->priv; dev_link_t **linkp; @@ -785,7 +783,7 @@ return get_tuple(handle, tuple, parse); } -void bt3c_config(dev_link_t *link) +static void bt3c_config(dev_link_t *link) { static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; client_handle_t handle = link->handle; @@ -898,7 +896,7 @@ } -void bt3c_release(dev_link_t *link) +static void bt3c_release(dev_link_t *link) { bt3c_info_t *info = link->priv; @@ -915,7 +913,7 @@ } -int bt3c_event(event_t event, int priority, event_callback_args_t *args) +static int bt3c_event(event_t event, int priority, event_callback_args_t *args) { dev_link_t *link = args->client_data; bt3c_info_t *info = link->priv; diff -Nru a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c --- a/drivers/bluetooth/btuart_cs.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/bluetooth/btuart_cs.c 2004-11-10 17:19:07 -08:00 @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -59,11 +60,11 @@ /* Bit map of interrupts to choose from */ -static u_int irq_mask = 0xffff; +static unsigned int irq_mask = 0xffff; static int irq_list[4] = { -1 }; -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); +module_param(irq_mask, uint, 0); +module_param_array(irq_list, int, NULL, 0); MODULE_AUTHOR("Marcel Holtmann "); MODULE_DESCRIPTION("Bluetooth driver for Bluetooth PCMCIA cards with HCI UART interface"); @@ -91,14 +92,14 @@ } btuart_info_t; -void btuart_config(dev_link_t *link); -void btuart_release(dev_link_t *link); -int btuart_event(event_t event, int priority, event_callback_args_t *args); +static void btuart_config(dev_link_t *link); +static void btuart_release(dev_link_t *link); +static int btuart_event(event_t event, int priority, event_callback_args_t *args); static dev_info_t dev_info = "btuart_cs"; -dev_link_t *btuart_attach(void); -void btuart_detach(dev_link_t *); +static dev_link_t *btuart_attach(void); +static void btuart_detach(dev_link_t *); static dev_link_t *dev_list = NULL; @@ -491,7 +492,7 @@ /* ======================== Card services HCI interaction ======================== */ -int btuart_open(btuart_info_t *info) +static int btuart_open(btuart_info_t *info) { unsigned long flags; unsigned int iobase = info->link.io.BasePort1; @@ -560,7 +561,7 @@ } -int btuart_close(btuart_info_t *info) +static int btuart_close(btuart_info_t *info) { unsigned long flags; unsigned int iobase = info->link.io.BasePort1; @@ -589,7 +590,7 @@ return 0; } -dev_link_t *btuart_attach(void) +static dev_link_t *btuart_attach(void) { btuart_info_t *info; client_reg_t client_reg; @@ -647,7 +648,7 @@ } -void btuart_detach(dev_link_t *link) +static void btuart_detach(dev_link_t *link) { btuart_info_t *info = link->priv; dev_link_t **linkp; @@ -701,7 +702,7 @@ return get_tuple(handle, tuple, parse); } -void btuart_config(dev_link_t *link) +static void btuart_config(dev_link_t *link) { static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; client_handle_t handle = link->handle; @@ -815,7 +816,7 @@ } -void btuart_release(dev_link_t *link) +static void btuart_release(dev_link_t *link) { btuart_info_t *info = link->priv; @@ -832,7 +833,7 @@ } -int btuart_event(event_t event, int priority, event_callback_args_t *args) +static int btuart_event(event_t event, int priority, event_callback_args_t *args) { dev_link_t *link = args->client_data; btuart_info_t *info = link->priv; diff -Nru a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c --- a/drivers/bluetooth/dtl1_cs.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/bluetooth/dtl1_cs.c 2004-11-10 17:19:04 -08:00 @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -59,11 +60,11 @@ /* Bit map of interrupts to choose from */ -static u_int irq_mask = 0xffff; +static unsigned int irq_mask = 0xffff; static int irq_list[4] = { -1 }; -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); +module_param(irq_mask, uint, 0); +module_param_array(irq_list, int, NULL, 0); MODULE_AUTHOR("Marcel Holtmann "); MODULE_DESCRIPTION("Bluetooth driver for Nokia Connectivity Card DTL-1"); @@ -94,14 +95,14 @@ } dtl1_info_t; -void dtl1_config(dev_link_t *link); -void dtl1_release(dev_link_t *link); -int dtl1_event(event_t event, int priority, event_callback_args_t *args); +static void dtl1_config(dev_link_t *link); +static void dtl1_release(dev_link_t *link); +static int dtl1_event(event_t event, int priority, event_callback_args_t *args); static dev_info_t dev_info = "dtl1_cs"; -dev_link_t *dtl1_attach(void); -void dtl1_detach(dev_link_t *); +static dev_link_t *dtl1_attach(void); +static void dtl1_detach(dev_link_t *); static dev_link_t *dev_list = NULL; @@ -468,7 +469,7 @@ /* ======================== Card services HCI interaction ======================== */ -int dtl1_open(dtl1_info_t *info) +static int dtl1_open(dtl1_info_t *info) { unsigned long flags; unsigned int iobase = info->link.io.BasePort1; @@ -539,7 +540,7 @@ } -int dtl1_close(dtl1_info_t *info) +static int dtl1_close(dtl1_info_t *info) { unsigned long flags; unsigned int iobase = info->link.io.BasePort1; @@ -568,7 +569,7 @@ return 0; } -dev_link_t *dtl1_attach(void) +static dev_link_t *dtl1_attach(void) { dtl1_info_t *info; client_reg_t client_reg; @@ -626,7 +627,7 @@ } -void dtl1_detach(dev_link_t *link) +static void dtl1_detach(dev_link_t *link) { dtl1_info_t *info = link->priv; dev_link_t **linkp; @@ -680,7 +681,7 @@ return get_tuple(handle, tuple, parse); } -void dtl1_config(dev_link_t *link) +static void dtl1_config(dev_link_t *link) { client_handle_t handle = link->handle; dtl1_info_t *info = link->priv; @@ -767,7 +768,7 @@ } -void dtl1_release(dev_link_t *link) +static void dtl1_release(dev_link_t *link) { dtl1_info_t *info = link->priv; @@ -784,7 +785,7 @@ } -int dtl1_event(event_t event, int priority, event_callback_args_t *args) +static int dtl1_event(event_t event, int priority, event_callback_args_t *args) { dev_link_t *link = args->client_data; dtl1_info_t *info = link->priv; diff -Nru a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c --- a/drivers/bluetooth/hci_usb.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/bluetooth/hci_usb.c 2004-11-10 17:19:06 -08:00 @@ -101,13 +101,18 @@ { USB_DEVICE(0x0a5c, 0x2033), .driver_info = HCI_IGNORE }, /* Broadcom BCM2035 */ + { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_RESET | HCI_BROKEN_ISOC }, { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_BROKEN_ISOC }, + /* Microsoft Wireless Transceiver for Bluetooth 2.0 */ + { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET | HCI_BROKEN_ISOC }, + /* ISSC Bluetooth Adapter v3.1 */ { USB_DEVICE(0x1131, 0x1001), .driver_info = HCI_RESET }, - /* Digianswer device */ + /* Digianswer devices */ { USB_DEVICE(0x08fd, 0x0001), .driver_info = HCI_DIGIANSWER }, + { USB_DEVICE(0x08fd, 0x0002), .driver_info = HCI_IGNORE }, /* RTX Telecom based adapter with buggy SCO support */ { USB_DEVICE(0x0400, 0x0807), .driver_info = HCI_BROKEN_ISOC }, @@ -115,7 +120,7 @@ { } /* Terminating entry */ }; -struct _urb *_urb_alloc(int isoc, int gfp) +static struct _urb *_urb_alloc(int isoc, int gfp) { struct _urb *_urb = kmalloc(sizeof(struct _urb) + sizeof(struct usb_iso_packet_descriptor) * isoc, gfp); @@ -126,7 +131,7 @@ return _urb; } -struct _urb *_urb_dequeue(struct _urb_queue *q) +static struct _urb *_urb_dequeue(struct _urb_queue *q) { struct _urb *_urb = NULL; unsigned long flags; @@ -795,7 +800,12 @@ kfree(husb); } -int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) +static void hci_usb_notify(struct hci_dev *hdev, unsigned int evt) +{ + BT_DBG("%s evt %d", hdev->name, evt); +} + +static int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct usb_device *udev = interface_to_usbdev(intf); struct usb_host_endpoint *bulk_out_ep = NULL; @@ -861,9 +871,9 @@ husb->intr_in_ep = intr_in_ep; if (id->driver_info & HCI_DIGIANSWER) - husb->ctrl_req = HCI_DIGI_REQ; + husb->ctrl_req = USB_TYPE_VENDOR; else - husb->ctrl_req = HCI_CTRL_REQ; + husb->ctrl_req = USB_TYPE_CLASS; /* Find isochronous endpoints that we can use */ size = 0; @@ -911,7 +921,9 @@ BT_ERR("Can't claim isoc interface"); else if (usb_set_interface(udev, isoc_ifnum, isoc_alts)) { BT_ERR("Can't set isoc interface settings"); + husb->isoc_iface = isoc_iface; usb_driver_release_interface(&hci_usb_driver, isoc_iface); + husb->isoc_iface = NULL; } else { husb->isoc_iface = isoc_iface; husb->isoc_in_ep = isoc_in_ep; @@ -921,7 +933,7 @@ } #endif - husb->completion_lock = RW_LOCK_UNLOCKED; + rwlock_init(&husb->completion_lock); for (i = 0; i < 4; i++) { skb_queue_head_init(&husb->transmit_q[i]); @@ -947,6 +959,7 @@ hdev->flush = hci_usb_flush; hdev->send = hci_usb_send_frame; hdev->destruct = hci_usb_destruct; + hdev->notify = hci_usb_notify; hdev->owner = THIS_MODULE; diff -Nru a/drivers/bluetooth/hci_usb.h b/drivers/bluetooth/hci_usb.h --- a/drivers/bluetooth/hci_usb.h 2004-11-10 17:19:06 -08:00 +++ b/drivers/bluetooth/hci_usb.h 2004-11-10 17:19:06 -08:00 @@ -28,9 +28,6 @@ #define HCI_DEV_SUBCLASS 0x01 /* RF subclass */ #define HCI_DEV_PROTOCOL 0x01 /* Bluetooth programming protocol */ -#define HCI_CTRL_REQ 0x20 -#define HCI_DIGI_REQ 0x40 - #define HCI_IGNORE 0x01 #define HCI_RESET 0x02 #define HCI_DIGIANSWER 0x04 @@ -59,8 +56,6 @@ struct urb urb; }; -struct _urb *_urb_alloc(int isoc, int gfp); - static inline void _urb_free(struct _urb *_urb) { kfree(_urb); @@ -98,8 +93,6 @@ spin_unlock_irqrestore(&q->lock, flags); } } - -struct _urb *_urb_dequeue(struct _urb_queue *q); struct hci_usb { struct hci_dev *hdev; diff -Nru a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c --- a/drivers/bluetooth/hci_vhci.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/bluetooth/hci_vhci.c 2004-11-10 17:19:06 -08:00 @@ -338,7 +338,7 @@ &hci_vhci_fops }; -int __init hci_vhci_init(void) +static int __init hci_vhci_init(void) { BT_INFO("VHCI driver ver %s", VERSION); @@ -350,7 +350,7 @@ return 0; } -void hci_vhci_cleanup(void) +static void hci_vhci_cleanup(void) { misc_deregister(&hci_vhci_miscdev); } diff -Nru a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c --- a/drivers/cdrom/cdrom.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/cdrom/cdrom.c 2004-11-10 17:19:02 -08:00 @@ -296,12 +296,12 @@ static int check_media_type; /* automatically restart mrw format */ static int mrw_format_restart = 1; -MODULE_PARM(debug, "i"); -MODULE_PARM(autoclose, "i"); -MODULE_PARM(autoeject, "i"); -MODULE_PARM(lockdoor, "i"); -MODULE_PARM(check_media_type, "i"); -MODULE_PARM(mrw_format_restart, "i"); +module_param(debug, bool, 0); +module_param(autoclose, bool, 0); +module_param(autoeject, bool, 0); +module_param(lockdoor, bool, 0); +module_param(check_media_type, bool, 0); +module_param(mrw_format_restart, bool, 0); static spinlock_t cdrom_lock = SPIN_LOCK_UNLOCKED; @@ -546,6 +546,8 @@ return ret; mfd = (struct mrw_feature_desc *)&buffer[sizeof(struct feature_header)]; + if (be16_to_cpu(mfd->feature_code) != CDF_MRW) + return 1; *write = mfd->write; if ((ret = cdrom_mrw_probe_pc(cdi))) { @@ -868,13 +870,11 @@ cgc.cmd[8] = sizeof(buffer); /* Allocation Length */ cgc.quiet = 1; - if ((ret = cdi->ops->generic_packet(cdi, &cgc))) { + if ((ret = cdi->ops->generic_packet(cdi, &cgc))) mmc3_profile = 0xffff; - } else { + else mmc3_profile = (buffer[6] << 8) | buffer[7]; - printk(KERN_INFO "cdrom: %s: mmc-3 profile capable, current profile: %Xh\n", - cdi->name, mmc3_profile); - } + cdi->mmc3_profile = mmc3_profile; } diff -Nru a/drivers/cdrom/cdu31a.c b/drivers/cdrom/cdu31a.c --- a/drivers/cdrom/cdu31a.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/cdrom/cdu31a.c 2004-11-10 17:19:05 -08:00 @@ -65,14 +65,6 @@ * This section describes features beyond the normal audio and CD-ROM * functions of the drive. * - * 2048 byte buffer mode - * - * If a disk is mounted with -o block=2048, data is copied straight - * from the drive data port to the buffer. Otherwise, the readahead - * buffer must be involved to hold the other 1K of data when a 1K - * block operation is done. Note that with 2048 byte blocks you - * cannot execute files from the CD. - * * XA compatibility * * The driver should support XA disks for both the CDU31A and CDU33A. @@ -147,6 +139,13 @@ * Removed init_module & cleanup_module in favor of * module_init & module_exit. * Torben Mathiasen + * + * 22 October 2004 -- Make the driver work in 2.6.X + * Added workaround to fix hard lockups on eject + * Fixed door locking problem after mounting empty drive + * Set double-speed drives to double speed by default + * Removed all readahead things - not needed anymore + * Ondrej Zary */ #include @@ -179,10 +178,9 @@ #define MAJOR_NR CDU31A_CDROM_MAJOR #include -#define CDU31A_READAHEAD 4 /* 128 sector, 64kB, 32 reads read-ahead */ #define CDU31A_MAX_CONSECUTIVE_ATTENTIONS 10 -#define DEBUG 0 +#define DEBUG 1 /* Define the following if you have data corruption problems. */ #undef SONY_POLL_EACH_BYTE @@ -279,7 +277,6 @@ NULL if none. */ static int is_double_speed = 0; /* does the drive support double speed ? */ -static int is_a_cdu31a = 1; /* Is the drive a CDU31A? */ static int is_auto_eject = 1; /* Door has been locked? 1=No/0=Yes */ @@ -314,12 +311,8 @@ it will be cleared. */ static char disk_changed; -/* Variable for using the readahead buffer. The readahead buffer - is used for raw sector reads and for blocksizes that are smaller - than 2048 bytes. */ -static char readahead_buffer[CD_FRAMESIZE_RAW]; -static int readahead_dataleft = 0; -static int readahead_bad = 0; +/* This was readahead_buffer once... Now it's used only for audio reads */ +static char audio_buffer[CD_FRAMESIZE_RAW]; /* Used to time a short period to abort an operation after the drive has been idle for a while. This keeps the light on @@ -440,7 +433,6 @@ static inline void reset_drive(void) { curr_control_reg = 0; - readahead_dataleft = 0; sony_toc_read = 0; outb(SONY_DRIVE_RESET_BIT, sony_cd_control_reg); } @@ -556,82 +548,47 @@ static unsigned char errbuf[80]; switch (err_code) { - case 0x10: - return "illegal command "; - case 0x11: - return "illegal parameter "; - - case 0x20: - return "not loaded "; - case 0x21: - return "no disc "; - case 0x22: - return "not spinning "; - case 0x23: - return "spinning "; - case 0x25: - return "spindle servo "; - case 0x26: - return "focus servo "; - case 0x29: - return "eject mechanism "; - case 0x2a: - return "audio playing "; - case 0x2c: - return "emergency eject "; - - case 0x30: - return "focus "; - case 0x31: - return "frame sync "; - case 0x32: - return "subcode address "; - case 0x33: - return "block sync "; - case 0x34: - return "header address "; - - case 0x40: - return "illegal track read "; - case 0x41: - return "mode 0 read "; - case 0x42: - return "illegal mode read "; - case 0x43: - return "illegal block size read "; - case 0x44: - return "mode read "; - case 0x45: - return "form read "; - case 0x46: - return "leadout read "; - case 0x47: - return "buffer overrun "; - - case 0x53: - return "unrecoverable CIRC "; - case 0x57: - return "unrecoverable LECC "; - - case 0x60: - return "no TOC "; - case 0x61: - return "invalid subcode data "; - case 0x63: - return "focus on TOC read "; - case 0x64: - return "frame sync on TOC read "; - case 0x65: - return "TOC data "; - - case 0x70: - return "hardware failure "; - case 0x91: - return "leadin "; - case 0x92: - return "leadout "; - case 0x93: - return "data track "; + case 0x10: return "illegal command "; + case 0x11: return "illegal parameter "; + + case 0x20: return "not loaded "; + case 0x21: return "no disc "; + case 0x22: return "not spinning "; + case 0x23: return "spinning "; + case 0x25: return "spindle servo "; + case 0x26: return "focus servo "; + case 0x29: return "eject mechanism "; + case 0x2a: return "audio playing "; + case 0x2c: return "emergency eject "; + + case 0x30: return "focus "; + case 0x31: return "frame sync "; + case 0x32: return "subcode address "; + case 0x33: return "block sync "; + case 0x34: return "header address "; + + case 0x40: return "illegal track read "; + case 0x41: return "mode 0 read "; + case 0x42: return "illegal mode read "; + case 0x43: return "illegal block size read "; + case 0x44: return "mode read "; + case 0x45: return "form read "; + case 0x46: return "leadout read "; + case 0x47: return "buffer overrun "; + + case 0x53: return "unrecoverable CIRC "; + case 0x57: return "unrecoverable LECC "; + + case 0x60: return "no TOC "; + case 0x61: return "invalid subcode data "; + case 0x63: return "focus on TOC read "; + case 0x64: return "frame sync on TOC read "; + case 0x65: return "TOC data "; + + case 0x70: return "hardware failure "; + case 0x91: return "leadin "; + case 0x92: return "leadout "; + case 0x93: return "data track "; } sprintf(errbuf, "unknown 0x%02x ", err_code); return errbuf; @@ -696,8 +653,7 @@ */ static int scd_lock_door(struct cdrom_device_info *cdi, int lock) { - if (lock == 0 && sony_usage == 1) { - /* Unlock the door, only if nobody is using the drive */ + if (lock == 0) { is_auto_eject = 1; } else { is_auto_eject = 0; @@ -1143,10 +1099,9 @@ operation if the requested sector is not the next one from the drive. */ static int -start_request(unsigned int sector, unsigned int nsect, int read_nsect_only) +start_request(unsigned int sector, unsigned int nsect) { unsigned char params[6]; - unsigned int read_size; unsigned long retry_count; @@ -1154,22 +1109,7 @@ printk("Entering start_request\n"); #endif log_to_msf(sector, params); - /* If requested, read exactly what was asked. */ - if (read_nsect_only) { - read_size = nsect; - } - /* - * If the full read-ahead would go beyond the end of the media, trim - * it back to read just till the end of the media. - */ - else if ((sector + nsect) >= sony_toc.lead_out_start_lba) { - read_size = sony_toc.lead_out_start_lba - sector; - } - /* Read the full readahead amount. */ - else { - read_size = CDU31A_READAHEAD / 4; - } - size_to_buf(read_size, ¶ms[3]); + size_to_buf(nsect, ¶ms[3]); /* * Clear any outstanding attentions and wait for the drive to @@ -1198,10 +1138,8 @@ write_params(params, 6); write_cmd(SONY_READ_BLKERR_STAT_CMD); - sony_blocks_left = read_size * 4; + sony_blocks_left = nsect * 4; sony_next_block = sector * 4; - readahead_dataleft = 0; - readahead_bad = 0; #if DEBUG printk("Leaving start_request at %d\n", __LINE__); #endif @@ -1212,8 +1150,7 @@ #endif } -/* Abort a pending read operation. Clear all the drive status and - readahead variables. */ +/* Abort a pending read operation. Clear all the drive status variables. */ static void abort_read(void) { unsigned char result_reg[2]; @@ -1238,8 +1175,6 @@ } sony_blocks_left = 0; - readahead_dataleft = 0; - readahead_bad = 0; } /* Called when the timer times out. This will abort the @@ -1264,8 +1199,6 @@ write_cmd(SONY_ABORT_CMD); sony_blocks_left = 0; - readahead_dataleft = 0; - readahead_bad = 0; abort_read_started = 1; } restore_flags(flags); @@ -1274,60 +1207,30 @@ #endif } -/* Actually get data and status from the drive. */ +/* Actually get one sector of data from the drive. */ static void -input_data(char *buffer, - unsigned int bytesleft, - unsigned int nblocks, unsigned int offset, unsigned int skip) +input_data_sector(char *buffer) { - int i; - volatile unsigned char val; - - #if DEBUG - printk("Entering input_data\n"); + printk("Entering input_data_sector\n"); #endif + /* If an XA disk on a CDU31A, skip the first 12 bytes of data from - the disk. The real data is after that. */ - if (sony_xa_mode) { - for (i = 0; i < CD_XA_HEAD; i++) { - val = read_data_register(); - } - } + the disk. The real data is after that. We can use audio_buffer. */ + if (sony_xa_mode) + insb(sony_cd_read_reg, audio_buffer, CD_XA_HEAD); clear_data_ready(); - if (bytesleft == 2048) { /* 2048 byte direct buffer transfer */ - insb(sony_cd_read_reg, buffer, 2048); - readahead_dataleft = 0; - } else { - /* If the input read did not align with the beginning of the block, - skip the necessary bytes. */ - if (skip != 0) { - insb(sony_cd_read_reg, readahead_buffer, skip); - } - - /* Get the data into the buffer. */ - insb(sony_cd_read_reg, &buffer[offset], bytesleft); - - /* Get the rest of the data into the readahead buffer at the - proper location. */ - readahead_dataleft = (2048 - skip) - bytesleft; - insb(sony_cd_read_reg, - readahead_buffer + bytesleft, readahead_dataleft); - } - sony_blocks_left -= nblocks; - sony_next_block += nblocks; + insb(sony_cd_read_reg, buffer, 2048); /* If an XA disk, we have to clear out the rest of the unused - error correction data. */ - if (sony_xa_mode) { - for (i = 0; i < CD_XA_TAIL; i++) { - val = read_data_register(); - } - } + error correction data. We can use audio_buffer for that. */ + if (sony_xa_mode) + insb(sony_cd_read_reg, audio_buffer, CD_XA_TAIL); + #if DEBUG - printk("Leaving input_data at %d\n", __LINE__); + printk("Leaving input_data_sector\n"); #endif } @@ -1339,10 +1242,6 @@ unsigned char res_reg[], int *res_size) { unsigned long retry_count; - unsigned int bytesleft; - unsigned int offset; - unsigned int skip; - #if DEBUG printk("Entering read_data_block\n"); @@ -1351,67 +1250,6 @@ res_reg[0] = 0; res_reg[1] = 0; *res_size = 0; - bytesleft = nblocks * 512; - offset = 0; - - /* If the data in the read-ahead does not match the block offset, - then fix things up. */ - if (((block % 4) * 512) != ((2048 - readahead_dataleft) % 2048)) { - sony_next_block += block % 4; - sony_blocks_left -= block % 4; - skip = (block % 4) * 512; - } else { - skip = 0; - } - - /* We have readahead data in the buffer, get that first before we - decide if a read is necessary. */ - if (readahead_dataleft != 0) { - if (bytesleft > readahead_dataleft) { - /* The readahead will not fill the requested buffer, but - get the data out of the readahead into the buffer. */ - memcpy(buffer, - readahead_buffer + (2048 - - readahead_dataleft), - readahead_dataleft); - bytesleft -= readahead_dataleft; - offset += readahead_dataleft; - readahead_dataleft = 0; - } else { - /* The readahead will fill the whole buffer, get the data - and return. */ - memcpy(buffer, - readahead_buffer + (2048 - - readahead_dataleft), - bytesleft); - readahead_dataleft -= bytesleft; - bytesleft = 0; - sony_blocks_left -= nblocks; - sony_next_block += nblocks; - - /* If the data in the readahead is bad, return an error so the - driver will abort the buffer. */ - if (readahead_bad) { - res_reg[0] = 0x20; - res_reg[1] = SONY_BAD_DATA_ERR; - *res_size = 2; - } - - if (readahead_dataleft == 0) { - readahead_bad = 0; - } - - /* Final transfer is done for read command, get final result. */ - if (sony_blocks_left == 0) { - get_result(res_reg, res_size); - } -#if DEBUG - printk("Leaving read_data_block at %d\n", - __LINE__); -#endif - return; - } - } /* Wait for the drive to tell us we have something */ retry_count = jiffies + SONY_JIFFIES_TIMEOUT; @@ -1442,7 +1280,9 @@ abort_read(); } } else { - input_data(buffer, bytesleft, nblocks, offset, skip); + input_data_sector(buffer); + sony_blocks_left -= nblocks; + sony_next_block += nblocks; /* Wait for the status from the drive. */ retry_count = jiffies + SONY_JIFFIES_TIMEOUT; @@ -1473,16 +1313,7 @@ SONY_NO_LECC_ERR_BLK_STAT) || (res_reg[0] == SONY_RECOV_LECC_ERR_BLK_STAT)) { - /* The data was successful, but if data was read from - the readahead and it was bad, set the whole - buffer as bad. */ - if (readahead_bad) { - readahead_bad = 0; - res_reg[0] = 0x20; - res_reg[1] = - SONY_BAD_DATA_ERR; - *res_size = 2; - } + /* nothing here */ } else { printk ("CDU31A: Data block error: 0x%x\n", @@ -1490,12 +1321,6 @@ res_reg[0] = 0x20; res_reg[1] = SONY_BAD_DATA_ERR; *res_size = 2; - - /* Data is in the readahead buffer but an error was returned. - Make sure future requests don't use the data. */ - if (bytesleft != 2048) { - readahead_bad = 1; - } } /* Final transfer is done for read command, get final result. */ @@ -1531,11 +1356,9 @@ static void do_cdu31a_request(request_queue_t * q) { struct request *req; - int block; - int nblock; + int block, nblock, num_retries; unsigned char res_reg[12]; unsigned int res_size; - int num_retries; unsigned long flags; @@ -1591,7 +1414,10 @@ block = req->sector; nblock = req->nr_sectors; - +#if DEBUG + printk("CDU31A: request at block %d, length %d blocks\n", + block, nblock); +#endif if (!sony_toc_read) { printk("CDU31A: TOC not read\n"); end_request(req, 0); @@ -1611,17 +1437,14 @@ * If the block address is invalid or the request goes beyond the end of * the media, return an error. */ - if ((block / 4) >= sony_toc.lead_out_start_lba) { - printk("CDU31A: Request past end of media\n"); - end_request(req, 0); - continue; - } if (((block + nblock) / 4) >= sony_toc.lead_out_start_lba) { printk("CDU31A: Request past end of media\n"); end_request(req, 0); continue; } + if (nblock > 4) + nblock = 4; num_retries = 0; try_read_again: @@ -1636,7 +1459,7 @@ /* If no data is left to be read from the drive, start the next request. */ if (sony_blocks_left == 0) { - if (start_request(block / 4, CDU31A_READAHEAD / 4, 0)) { + if (start_request(block / 4, nblock / 4)) { end_request(req, 0); continue; } @@ -1655,7 +1478,7 @@ end_request(req, 0); continue; } - if (start_request(block / 4, CDU31A_READAHEAD / 4, 0)) { + if (start_request(block / 4, nblock / 4)) { printk("CDU31a: start request failed\n"); end_request(req, 0); continue; @@ -1665,7 +1488,12 @@ read_data_block(req->buffer, block, nblock, res_reg, &res_size); if (res_reg[0] != 0x20) { - end_request(req, 1); + if (!end_that_request_first(req, 1, nblock)) { + spin_lock_irq(q->queue_lock); + blkdev_dequeue_request(req); + end_that_request_last(req); + spin_unlock_irq(q->queue_lock); + } continue; } @@ -1774,7 +1602,7 @@ /* This seems to slow things down enough to make it work. This * appears to be a problem in do_sony_cd_cmd. This printk seems * to address the symptoms... -Erik */ -#if 1 +#if DEBUG printk("cdu31a: Trying session %d\n", session); #endif parms[0] = session; @@ -2529,8 +2357,7 @@ return. */ retval = 0; - /* start_request clears out any readahead data, so it should be safe. */ - if (start_request(ra->addr.lba, ra->nframes, 1)) { + if (start_request(ra->addr.lba, ra->nframes)) { retval = -EIO; goto exit_read_audio; } @@ -2538,7 +2365,7 @@ /* For every requested frame. */ cframe = 0; while (cframe < ra->nframes) { - read_audio_data(readahead_buffer, res_reg, &res_size); + read_audio_data(audio_buffer, res_reg, &res_size); if ((res_reg[0] & 0xf0) == 0x20) { if (res_reg[1] == SONY_BAD_DATA_ERR) { printk @@ -2567,7 +2394,7 @@ /* Restart the request on the current frame. */ if (start_request (ra->addr.lba + cframe, - ra->nframes - cframe, 1)) { + ra->nframes - cframe)) { retval = -EIO; goto exit_read_audio; } @@ -2575,7 +2402,7 @@ /* Don't go back to the top because don't want to get into and infinite loop. A lot of code gets duplicated, but that's no big deal, I don't guess. */ - read_audio_data(readahead_buffer, res_reg, + read_audio_data(audio_buffer, res_reg, &res_size); if ((res_reg[0] & 0xf0) == 0x20) { if (res_reg[1] == @@ -2596,7 +2423,7 @@ } else if (copy_to_user(ra->buf + (CD_FRAMESIZE_RAW * cframe), - readahead_buffer, + audio_buffer, CD_FRAMESIZE_RAW)) { retval = -EFAULT; goto exit_read_audio; @@ -2610,7 +2437,7 @@ goto exit_read_audio; } } else if (copy_to_user(ra->buf + (CD_FRAMESIZE_RAW * cframe), - (char *)readahead_buffer, + (char *)audio_buffer, CD_FRAMESIZE_RAW)) { retval = -EFAULT; goto exit_read_audio; @@ -3061,12 +2888,18 @@ * Open the drive for operations. Spin the drive up and read the table of * contents if these have not already been done. */ -static int scd_open(struct cdrom_device_info *cdi, int openmode) +static int scd_open(struct cdrom_device_info *cdi, int purpose) { unsigned char res_reg[12]; unsigned int res_size; unsigned char params[2]; + if (purpose == 1) { + /* Open for IOCTLs only - no media check */ + sony_usage++; + return 0; + } + if (sony_usage == 0) { if (scd_spinup() != 0) return -EIO; @@ -3151,8 +2984,7 @@ .dev_ioctl = scd_dev_ioctl, .capability = CDC_OPEN_TRAY | CDC_CLOSE_TRAY | CDC_LOCK | CDC_SELECT_SPEED | CDC_MULTI_SESSION | - CDC_MULTI_SESSION | CDC_MCN | - CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | + CDC_MCN | CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_RESET | CDC_IOCTLS | CDC_DRIVE_STATUS, .n_minors = 1, }; @@ -3177,7 +3009,19 @@ static int scd_block_ioctl(struct inode *inode, struct file *file, unsigned cmd, unsigned long arg) { - return cdrom_ioctl(file, &scd_info, inode, cmd, arg); + /* The eject and close commands should be handled by Uniform CD-ROM + * driver - but I always got hard lockup instead of eject + * until I put this here. + */ + switch (cmd) { + case CDROMEJECT: + scd_lock_door(&scd_info, 0); + return scd_tray_move(&scd_info, 1); + case CDROMCLOSETRAY: + return scd_tray_move(&scd_info, 0); + default: + return cdrom_ioctl(file, &scd_info, inode, cmd, arg); + } } static int scd_block_media_changed(struct gendisk *disk) @@ -3372,6 +3216,7 @@ tmp_irq = cdu31a_irq; /* Need IRQ 0 because we can't sleep here. */ cdu31a_irq = 0; + sony_speed = is_double_speed; /* Set 2X drives to 2X by default */ set_drive_params(sony_speed); cdu31a_irq = tmp_irq; @@ -3417,13 +3262,12 @@ strcat(msg, buf); } strcat(msg, "\n"); - - is_a_cdu31a = - strcmp("CD-ROM CDU31A", drive_config.product_id) == 0; - + printk("%s",msg); + cdu31a_queue = blk_init_queue(do_cdu31a_request, &cdu31a_lock); if (!cdu31a_queue) goto errout0; + blk_queue_hardsect_size(cdu31a_queue, 2048); init_timer(&cdu31a_abort_timer); cdu31a_abort_timer.function = handle_abort_timeout; diff -Nru a/drivers/cdrom/cdu31a.h b/drivers/cdrom/cdu31a.h --- a/drivers/cdrom/cdu31a.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/cdrom/cdu31a.h 2004-11-10 17:19:02 -08:00 @@ -72,10 +72,10 @@ from drive (in 1/100th's of seconds). */ -#define SONY_JIFFIES_TIMEOUT 1000 /* Maximum number of times the +#define SONY_JIFFIES_TIMEOUT (10*HZ) /* Maximum number of times the drive will wait/try for an operation */ -#define SONY_RESET_TIMEOUT 100 /* Maximum number of times the +#define SONY_RESET_TIMEOUT HZ /* Maximum number of times the drive will wait/try a reset operation */ #define SONY_READY_RETRIES 20000 /* How many times to retry a diff -Nru a/drivers/char/Kconfig b/drivers/char/Kconfig --- a/drivers/char/Kconfig 2004-11-10 17:19:02 -08:00 +++ b/drivers/char/Kconfig 2004-11-10 17:19:02 -08:00 @@ -835,7 +835,7 @@ config SONYPI tristate "Sony Vaio Programmable I/O Control Device support (EXPERIMENTAL)" - depends on EXPERIMENTAL && X86 && PCI && !64BIT + depends on EXPERIMENTAL && X86 && PCI && INPUT && !64BIT ---help--- This driver enables access to the Sony Programmable I/O Control Device which can be found in many (all ?) Sony Vaio laptops. diff -Nru a/drivers/char/README.computone b/drivers/char/README.computone --- a/drivers/char/README.computone 2004-11-10 17:19:06 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,10 +0,0 @@ -Computone Intelliport II/Plus Multiport Serial Driver ------------------------------------------------------ - -Release Notes For Linux Kernel 2.2 and higher - -This file is now deprecated and will be removed at some point. - -Please refer to the file Documentation/computone.txt instead. - -Michael H. Warfield 08/12/2001 diff -Nru a/drivers/char/README.cyclomY b/drivers/char/README.cyclomY --- a/drivers/char/README.cyclomY 2004-11-10 17:19:03 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,23 +0,0 @@ - -NOTE: Earlier versions of the driver mapped ttyC0 to minor -number 32, but this is changed in this distribution. Port ttyC0 -now maps to minor number 0.) The following patch should be -applied to /dev/MAKEDEV and the script should then be re-run -to create new entries for the ports. ---------------------------- CUT HERE ---------------------------- ---- /dev/MAKEDEV Sun Aug 20 10:51:55 1995 -+++ MAKEDEV.new Fri Apr 19 06:48:12 1996 -@@ -206,8 +206,8 @@ - major2=`Major cub` || continue - for i in 0 1 2 3 4 5 6 7 # 8 9 10 11 12 13 14 15 - do -- makedev ttyC$i c $major1 `expr 32 + $i` $tty -- makedev cub$i c $major2 `expr 32 + $i` $dialout -+ makedev ttyC$i c $major1 $i $tty -+ makedev cub$i c $major2 $i $dialout - done - ;; - par[0-2]) ---------------------------- CUT HERE ---------------------------- - - diff -Nru a/drivers/char/README.epca b/drivers/char/README.epca --- a/drivers/char/README.epca 2004-11-10 17:19:06 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,532 +0,0 @@ -user.doc -Digi International driver package for the PC/Xe, PC/Xi, PC/Xr, PC/Xem as well -the EISA and PCI variants of these boards where applicable. -Copyright (C) 1996 Digi International. Written by Ronnie Sanford digilnux@dgii.com - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (At your - option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. - - -This document describes the software used with the Digi/Linux driver package. -The four user programs listed below are described in this document: - - 1. digiConfig -> Application that configures the Digi driver. - - 2. digiDload -> Application which initializes the Digi hardware. - - 3. buildPCI -> Application which provides the user a method of - building device nodes for PCI devices. - - 4. ditty -> Application which provides the user a method of - configuring terminal options on Digi hardware. - - - --------------------------------------------------------------------------- -1. Configuring driver/kernel for Digi products --------------------------------------------------------------------------- - - The Digi driver must be configured each time Digi hardware is added - or removed. There are two supported methods of doing this. The - first method configures the driver dynamically at boot time but requires - the user to utilize the lilo loader. This method is the preffered method - as it does not require the rebuilding of the kernel. In order to use lilo - to configure Digi boards at boot time an appropriate append command should - be added to /etc/lilo.conf below the appropriate label decleration. - See footer 4. The append commands format is a string of comma separated - identifiers or integers used to configure supported boards. These six - values in order are: - - Enable/Disable this card or Override, - Type of card: PC/Xe (AccelePort) (0), PC/Xeve (1), PC/Xem or PC/Xr (2), - EISA/Xem (3), PC/Xe (64K) (4), PC/Xi (5). - Enable/Disable alternate pin arrangement, - Number of ports on this card, - I/O Port where card is configured (in HEX if using string identifiers), - Base of memory window (in HEX if using string identifiers) - - A sample append command is given below which if used would configure and - enable a PC/Xe with 8 ports, at i/o address 200, memory address 0xd0000 - with alt pin turned off. The lilo.conf file should look like this: - - image = /vmlinuz - root = /dev/hda2 - label = vmlinuz - append="digiepca=E,PC/Xe,D,8,200,D0000" - - likewise the below will perform the same function: - - image = /vmlinuz - root = /dev/hda2 - label = vmlinuz - append="digiepca=1,0,0,8,512,851968" - - Note: - - PCI boards are auto-detected and configured (Hence their codes are - not given here). Do not attempt to configure PCI boards with the lilo - append command. - - If configuration data has been specified by using digiConfig (Described - below), and you wish to override this configuration using lilo without - specifying a specific card (Example if there are PCI cards in the system) - the following override command will accomplish this: - - -> append="digiepca=2" - - If lilo is not enabled, the second method of configuring Digi hardware - will have to be used. digiConfig is an application that can be used - to inform the system of any additions, deletions, or modifications - involving Digi hardware. To use this method the operator executes - digiConfig anytime an EISA or ISA card is added that he wishes to use. - This routine is also used to remove cards from the system, and to modify - parameters of those cards already present in the system. Upon being - executed digiConfig modifies files accessed by the Digi driver. To make - these changes permanent; the operating system must be recompiled. After - the operating system has been recompiled and booted, the changes made with - digiConfig will be introduced to the user. This program MUST be executed - every time Digi EISA/ISA hardware configuration changes. Note, it is not - necessary to execute digiConfig in order to configure the Digi PCI cards. - These cards are self-identifying and will be recognized by the driver. - They cannot be displayed using digiConfig nor will digiConfig build the - device nodes their device nodes. See footer 1. - - To execute digiConfig; simply type: digiConfig - - The application will query you for the type, memory address, port - address, number of ports, alt pin disposition and status of each board - that exist on the system. Note, currently this driver only supports - PC/Xe, PC/Xeve, PC/Xi, PC/Xr, and PC/Xem as well as their EISA and PCI - implementations if applicable. All supported cards (Other than PCI) that - are present should be registered via digiConfig. See footer 2. - - After all cards have been configured select exit. The system will then - inform you if any changes have been made, and ask you if it is okay to - make these changes permanent. If the data entered is correct, select okay. - Selecting cancel will prevent the changes from becoming active. digiConfig - can then be re-executed to configure the system again. - --------------------------------------------------------------------------- -2. Initializing Digi hardware with digiDload --------------------------------------------------------------------------- - - digiDload is the application executed after the Digi driver has been - loaded. It is responsible for initializing the hardware and leaving - it in a state such that the Digi board may be operated by the user. - The application may be placed anywhere on the path, but its related - support files must be located in /etc/digi. The related files are: - - sxfep.bin - sxbios.bin - xxfep.bin - xxbios.bin - - The format for this command is "digiDload [v]". If given the "v" - option turns on verbosity. If not given the application runs in quite - mode. To execute the program simply type: - - digiDload - - Upon completion digiDload will generate the below message: - - "digiDload complete: Card initialized" - - At this point the card is configured and ready for normal usage. See - technotes.doc for information on how how ports are determined and - assigned. - --------------------------------------------------------------------------- -3. Build PCI device nodes with buildPCI --------------------------------------------------------------------------- - - buildPCI is an application useful for building the necessary device nodes - for Digi PCI cards. It is reccomended that this tool be used because the - current digiConfig application does not provide this function for PCI cards - (Though it does build device nodes for non-PCI cards). To use this program - execute the following:first install the driver, and execute digiDload (See above). After digiDload - has successfully loaded, execute the following: - - buildPCI - - Where arg1 is the number of ports connected to Digi cards that are not PCI - (As shown by the digiConfig utility), and arg2 is the number of ports - connected to Digi cards that are PCI. - - Note, buildPCI only has to be ran once to build the necessary device - nodes. Though this program may be executed at anytime, we reccomend - delaying execution until the first time you install the package and after - digiDload has been executed. - --------------------------------------------------------------------------- -4. Setting Terminal Options with ditty --------------------------------------------------------------------------- - -ditty is a utility program that sets and displays the terminal options -for Digi intelligent serial products. See man ditty for detailed information. - - -Footnotes: - -1. The 1.2.x kernel does not provide a method of mapping the high - addresses (Normally higher than RAM) associated with PCI. For this - reason, this driver disables PCI support while running under the 1.2.x - kernels. - -2. PCI cards should not and cannot be registered with digiConfig. After - the driver has been loaded buildPCI may be executed to construct the - necessary device nodes. This step is not necessary for system not - having Digi PCI cards. - -3. This is because we forsee a time when buildPCI may auto-detect the - available Digi PCI cards and this would only work if the program is - executed after digiDload. - -4. A complete example is given in install.doc. - --------------CHANGES-------------------- - -All changes should be recorded here. All changes should be explained in -verbose detail. ------------------------------------------------------------------------ -Programmer : Ronnie Sanford -Date : June 1, 1996 -Description (Verbose) : Initial release of driver package. -Files affected : all -Release version : 1.0.0f (BETA) ------------------------------------------------------------------------ ------------------------------------------------------------------------ -Programmer : Ronnie Sanford -Date : August 7, 1996 -Description (Verbose) : Made several modifications to provide PCI and EISA - support: - - 1. We now allocate the termios structures based on - the maximum number of channels that COULD be - available to the system. We no longer use the - number of channels declared in epcaconfig.h - (NBDEVS) as the total channel number. This is - because this value does not represent channels - available to potential PCI cards. This new - larger value is also passed back to the os in - the num field of tty_driver. - - 2. Added code to copy the previous board structure - (Now called static_boards) into a new local - copy of the boards structure. This has been - done so that PCI cards may be added to this - board array and later referenced (And even - queried.). - - 3. Added code to pc_init that checks for supported - PCI cards. If found this code initializes a new - entry into the drivers local board structure - with the PCI cards address, and type, etc.. It - also bumps the card count (num_cards). - - 4. Modified code in post_fep_init so that when this - routine is executed the number of ports supported - by a particular PCI card will be determined and - loaded into the board structure. It would be - much better if this code was placed in pc_init - (Because we could then report to the os the true - number of ports available; not just the max), but - since the card has to be booted to determine the - number of ports it supports, we are forced to do it - after DIGI_INIT has called post_fep_init. In the - future we may attempt to read the num ports - attached directly (address 0x1ac). - - 5. Added board types to epca.h in support of various - PCI boards (Some of which do not exist yet). - Added procedures for these boards throughout the - code. Note, windowing is not necessary for PCI - boards. - - 6. Added code supporting the EISA/XEM. This included - modifying epca.h with the new board type and - adding this type into the driver. The EISA/XEM - is basically identical to the PC/XEM, other than - it's base address does not have to be (And cannot - be configured directly). - - 7. Modified digiConfig to prompt for EISA/XEM cards. - -Files affected : epca.c, epca.h, digi1.h, digiConfig -Release version : 1.0.0g (BETA) ------------------------------------------------------------------------ ------------------------------------------------------------------------ -Programmer : Ronnie Sanford -Date : August 21, 1996 -Description (Verbose) : Made the following modifications: - - 1. A problem affecting hard flow control was found - in the termios2digi_h routine. Specifically, - when the user activated hard flow control using - the CRTSCTS specification, the values used to - program hard flow control on the board were - incorrect. The solution was to change a line - that read "res |= ((ch->m_dtr) | (ch->m_rts));" - to "res |= ((ch->m_cts) | (ch->m_rts));" This - line only applies if cflag & CRTSCTS. Special - thanks to Matt Robinson (matt@mania.com.au) who - found and fixed this problem. - - 2. In previous betas the cud device was set to CLOCAL - on driver boot up. Likewise the ttyD device was - set to ~CLOCAL. This has been fixed in this driver. - Now ttyD is CLOCAL and cud is ~CLOCAL. The fix - for this can be found in pc_init. - - 3. In ditty.c many changes were made to eliminate bugs - and warning messages. Two ioctl calls were eliminated - as well a problem involving using the returned baud - index to determine the drivers baud rate. Newer - Linux kernels support higher baud rates by using - 0x1000 bit. When the returned value (ored with - 0x1000) was used to reference our fbaud table a - serious memory problem occurred. This has been fixed. - - 4. Added a request_region call to post_fep_init. This - should cause the i/o ports being used to be - registered with proc. - - 5. Modified digiConfig to set all cud and ttyD devices - to read/write all permission. - - 6. Developed a new apps called buildPCI that provides - an easy way to build device nodes for PCI cards. - - 7. Modified user.doc and technotes.doc document the - use of buildPCI. - -Files affected : epca.c, ditty.c, digiConfig, user.doc, technotes.doc -Release version : 1.0.0 (Official release) ------------------------------------------------------------------------ -Programmer : Ronnie Sanford -Date : August 21, 1996 -Description (Verbose) : Made the following modifications: - - 1. Removed code from pc_close which closes the - drivers line discipline and restores its original - line discipline. This is currently unnecessary, - though future fast cook enhancements may require - this. - - 2. Removed code in block_til_ready that set the - asyncflags to either ASYNC_CALLOUT_ACTIVE, or - ASYNC_NORMAL_ACTIVE. This code was redundant - as it already existed in block_til_ready. - - 3. Added code in block_til_ready to cause a return - prior to schedule being called if the device - was a CALLOUT device. CALLOUT devices never - block on CD. (This was a serious bug that - prevented the CALLOUT devices (ttyD) from - functioning properly in some instances. - - Make a change in the MODEMCHG_IND case of doevent - such that it does not require ASYNC_CALLOUT_ACTIVE - or ASYNC_NORMAL_ACTIVE to be set in order to - unblock an open (Using wait_interruptible). - - Thanks to Mike McLagan (mike.mclagan@linux.org) - for diagnosing and fixing this problem. - - 4. Made changes to the disposition of CLOCAL on - both SERIAL NORMAL and CALLOUT devices. Both - device types now have CLOCAL active at default. - This may be changed with a stty command. - - 5. Made changes to digiConfig such that it checks - major.h (If valid) for the correct major - numbers to use. - -Files affected : epca.c, digiConfig -Release version : 1.0.1a - - ------------------------------------------------------------------------ -Programmer : Ronnie Sanford -Date : September 17, 1996 -Description (Verbose) : Made the following modifications: - - 1. Modified pc_open such that it no longer checks - the cflag value returned by termios2digi_c for - CLOCAL. Digi hardware does not use this value - and thus termios2digi_c rightly screens this - value out. This driver checks for CLOCAL using - the drivers cflag value as known by the Linux OS. - (The value passed into termios2digi_c) - - 2. Modified termios2digi_c to screen out the - CBAUDEX in CBAUD. This error caused parity to - automaticaly be enabled on at higher baud rates. - - - 3. Added the "disable_bh()" call to the shutdown - subroutine. Hopefully this will allow the driver - to correctly clean up after itself when used as a - module. - - 4. Added support for the PC/XI and 64K PC/XE cards. - This involved primarily modifying digiDload to - initialize and boot the new cards; however - driver modifications were also required to - provide the proper windowing for the newly - supported cards. (Code was also added to - determine the memory segment of the XI card as - that card may have more than 64K. Currently - digiDload assumes a 64K XI card.) - - 5. Added subroutine called epca_setup that can be - called during LILO boot up. This provides the - user an easy way to change cards; without - running digiConfig and without recompiling the - kernel. Added code in pc_init and pc_open to - support the epca_setup routine. pc_init checks - the liloconfig flag (Which is set by epca_setup) - to determine if the driver is using the LILO - arguments. If not pc_init loads the board data - found in epcaconfig.h; if so it DOESN'T load - epcaconfig data depending on epca_setup to handle - board configuration. pc_open has been modified - such that it checks to ensure that no errors - occurred during the LILO boot process. If a - user attempts to boot the driver (via. LILO) - with incorrect data, the open will fail. - - 6. Modified the windowing routines pcxe_rxwinon - and pcxe_txwinon routines. A bug existed such - that those routines checked to see if the rxwin - and txwin flags were reset. If so they assumed - the board was an XI or 64K XE. Furthermore since - these flags were never initialized in our driver - sometimes they were 0 and therefore caused a - memory fault (Or at least a window overrun). This - code has been removed since the pcxe shares - nothing in common with the 64K XI and XE. - - 7. Added code in pc_init to set the memory_seg for - the various boards. This code was necessary to - correct a bug in the PCXE, PCXEVE code where - receive and transmit pointers were being calculated - from an uninitialized variable (memory_seg). - - 8. Modified digiConfig to allow 64K PC/XI and 64K - PC/XE cards to be configured. - - 9. Made changes to support the new 2.1.x development - kernel. In particular this required changing all - references to vremap to ioremap. - - 10. Modified digiConfig such that it now generates - node names corresponding to their internal - as opposed to the label on the port itself. Nodes - (ttyD?? and cud??) now start at 0. Example: - ttyD0 and cud0 represent port 1 on any supported - Digi product. A similar change has been made - in buildPCI.c. - - 12. At the early portion of post_fep_init if a PCI - card is detected a warning message could be given - incorrectly if 64 ports were attached to a PCI - card. The below line : - - epcaassert(bd->numports > 64,"PCI returned a invalid number of ports"); - - was changed to : - - epcaassert(bd->numports <= 64,"PCI returned a invalid number of ports"); - - Remember that epcaassert checks for NOT true. - Special thanks to Daniel Taylor for fixing this. - - 13. Modified the epcaparam routine. In version 100 - and 101a there was a line that looked like the - below: - - if (ch->omodem != mval) - - The problem with this line was that the first time - through omodem was not initialized. Secondly, since - many TIOC commands did not alter mval (They use - a different variable) changes made by these commands - could be lost. This line was changed to: - - mval ^= ch->modemfake & (mval ^ ch->modem); - - if (ch->omodem ^ mval) - - 14. Modified digiConfig in such a way that it checks - the version number of the kernel and if it finds - a 2.x.x kernel or higher it reads the necessary - major numbers for cud and ttyD devices from major.h. - This was also done in prior versions but these - versions required a #define which identified the - kernel as a version which did not have major numbers - assigned to Digi systems. This #define is no - longer required allowing the same source tree for - multiple kernel releases. - - 15. Used macros to replace kernel specific calls such - as put_fs_long, get_fs_long, put_user, and get_user - the kernel version is now detected and the macro - is defined as to correspond with the kernel it - is being compiled into. Again this was done to - allow one source tree for multiple kernel releases. - - 16. Added support for the new 2.1.x development kernels - to digiInstall. - -Files affected : epca.c, digiConfig -Release version : 1.1.0 ------------------------------------------------------------------------ -Programmer : Daniel Taylor -Date : April 25, 1997 -Description (Verbose) : Updated driver: - 1. Fixed DCD bug. (&tq scheduler) - 2. Removed BH handler code, as it was only handling - hangups, and not being called for that. - 3. Namespace cleanup (DIGI_TIMER2 => DIGI_TIMER) - 4. Updated to 2.1.36, removed #ifdefs for earlier - kernel revisions. -Files affected : epca.c -Release version : 1.1.1 (BETA) ------------------------------------------------------------------------ -Programmer : Daniel Taylor -Date : March 11, 1999 -Description (Verbose) : Updated driver: - 1. Simultaneous data and modem change events were - resulting in the modem change events not being - recognized. Fixed. - 2. Modified pc_info device name to work better - with devfs. -Files affected : epca.c -Release version : 1.3.0-K ------------------------------------------------------------------------ -Programmer : Jeff Garzik -Date : February 26, 2000 -Description (Verbose) : Updated driver: - 1. Use new kernel PCI interfaces. - 2. Updated list of includes. -Files affected : epca.c -Release version : 1.3.0.1-LK ------------------------------------------------------------------------ -Programmer : Arjan van de Ven -Date : March 10, 2000 -Description (Verbose) : Fixed includes to make it actually compile - for kernel 2.3.51 -Files affected : epca.c -Release version : 1.3.0.2-LK ------------------------------------------------------------------------ diff -Nru a/drivers/char/README.scc b/drivers/char/README.scc --- a/drivers/char/README.scc 2004-11-10 17:19:03 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,5 +0,0 @@ -The z8530drv is now a network device driver, you can find it in - ../net/scc.c - -A subset of the documentation is in - Documentation/networking/z8530drv.txt diff -Nru a/drivers/char/amiserial.c b/drivers/char/amiserial.c --- a/drivers/char/amiserial.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/char/amiserial.c 2004-11-10 17:19:07 -08:00 @@ -84,7 +84,6 @@ #include #include #include -#include #include #include diff -Nru a/drivers/char/cyclades.c b/drivers/char/cyclades.c --- a/drivers/char/cyclades.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/char/cyclades.c 2004-11-10 17:19:03 -08:00 @@ -5551,7 +5551,7 @@ } for (j = 1; j <= ints[0]; j++){ if ( i < NR_ISA_ADDRS ){ - cy_isa_addresses[i++] = (unsigned char *)(ints[j]); + cy_isa_addresses[i++] = ints[j]; } } #endif /* CONFIG_ISA */ diff -Nru a/drivers/char/hpet.c b/drivers/char/hpet.c --- a/drivers/char/hpet.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/char/hpet.c 2004-11-10 17:19:05 -08:00 @@ -76,6 +76,7 @@ struct hpets { struct hpets *hp_next; struct hpet __iomem *hp_hpet; + struct time_interpolator *hp_interpolator; unsigned long hp_period; unsigned long hp_delta; unsigned int hp_ntimer; @@ -660,15 +661,6 @@ return hpet_ioctl_common(devp, cmd, arg, 1); } -#ifdef CONFIG_TIME_INTERPOLATION - -static struct time_interpolator hpet_interpolator = { - .source = TIME_SOURCE_MMIO64, - .shift = 10 -}; - -#endif - static ctl_table hpet_table[] = { { .ctl_name = 1, @@ -705,6 +697,28 @@ static struct ctl_table_header *sysctl_header; +static void hpet_register_interpolator(struct hpets *hpetp) +{ +#ifdef CONFIG_TIME_INTERPOLATION + struct time_interpolator *ti; + + ti = kmalloc(sizeof(*ti), GFP_KERNEL); + if (!ti) + return; + + memset(ti, 0, sizeof(*ti)); + ti->source = TIME_SOURCE_MMIO64; + ti->shift = 10; + ti->addr = &hpetp->hp_hpet->hpet_mc; + ti->frequency = hpet_time_div(hpets->hp_period); + ti->drift = ti->frequency * HPET_DRIFT / 1000000; + ti->mask = -1; + + hpetp->hp_interpolator = ti; + register_time_interpolator(ti); +#endif +} + /* * Adjustment for when arming the timer with * initial conditions. That is, main counter @@ -712,7 +726,7 @@ */ #define TICK_CALIBRATE (1000UL) -static unsigned long __init hpet_calibrate(struct hpets *hpetp) +static unsigned long hpet_calibrate(struct hpets *hpetp) { struct hpet_timer __iomem *timer = NULL; unsigned long t, m, count, i, flags, start; @@ -749,7 +763,7 @@ return (m - start) / i; } -int __init hpet_alloc(struct hpet_data *hdp) +int hpet_alloc(struct hpet_data *hdp) { u64 cap, mcfg; struct hpet_dev *devp; @@ -757,7 +771,7 @@ struct hpets *hpetp; size_t siz; struct hpet __iomem *hpet; - static struct hpets *last __initdata = (struct hpets *)0; + static struct hpets *last = (struct hpets *)0; unsigned long ns; /* @@ -810,8 +824,9 @@ hpetp->hp_period = (cap & HPET_COUNTER_CLK_PERIOD_MASK) >> HPET_COUNTER_CLK_PERIOD_SHIFT; - printk(KERN_INFO "hpet%d: at MMIO 0x%p, IRQ%s", - hpetp->hp_which, hpet, hpetp->hp_ntimer > 1 ? "s" : ""); + printk(KERN_INFO "hpet%d: at MMIO 0x%lx, IRQ%s", + hpetp->hp_which, hdp->hd_phys_address, + hpetp->hp_ntimer > 1 ? "s" : ""); for (i = 0; i < hpetp->hp_ntimer; i++) printk("%s %d", i > 0 ? "," : "", hdp->hd_irq[i]); printk("\n"); @@ -854,11 +869,12 @@ } hpetp->hp_delta = hpet_calibrate(hpetp); + hpet_register_interpolator(hpetp); return 0; } -static acpi_status __init hpet_resources(struct acpi_resource *res, void *data) +static acpi_status hpet_resources(struct acpi_resource *res, void *data) { struct hpet_data *hdp; acpi_status status; @@ -873,6 +889,7 @@ unsigned long size; size = addr.max_address_range - addr.min_address_range + 1; + hdp->hd_phys_address = addr.min_address_range; hdp->hd_address = ioremap(addr.min_address_range, size); for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next) @@ -898,7 +915,7 @@ return AE_OK; } -static int __init hpet_acpi_add(struct acpi_device *device) +static int hpet_acpi_add(struct acpi_device *device) { acpi_status result; struct hpet_data data; @@ -920,9 +937,10 @@ return hpet_alloc(&data); } -static int __init hpet_acpi_remove(struct acpi_device *device, int type) +static int hpet_acpi_remove(struct acpi_device *device, int type) { - return 0; + /* XXX need to unregister interpolator, dealloc mem, etc */ + return -EINVAL; } static struct acpi_driver hpet_acpi_driver = { @@ -938,37 +956,32 @@ static int __init hpet_init(void) { - (void)acpi_bus_register_driver(&hpet_acpi_driver); + int result; - if (hpets) { - if (misc_register(&hpet_misc)) - return -ENODEV; + result = misc_register(&hpet_misc); + if (result < 0) + return -ENODEV; - sysctl_header = register_sysctl_table(dev_root, 0); + sysctl_header = register_sysctl_table(dev_root, 0); -#ifdef CONFIG_TIME_INTERPOLATION - { - struct hpet *hpet; + result = acpi_bus_register_driver(&hpet_acpi_driver); + if (result < 0) { + if (sysctl_header) + unregister_sysctl_table(sysctl_header); + misc_deregister(&hpet_misc); + return result; + } - hpet = hpets->hp_hpet; - hpet_interpolator.addr = &hpets->hp_hpet->hpet_mc; - hpet_interpolator.frequency = hpet_time_div(hpets->hp_period); - hpet_interpolator.drift = hpet_interpolator.frequency * - HPET_DRIFT / 1000000; - register_time_interpolator(&hpet_interpolator); - } -#endif - return 0; - } else - return -ENODEV; + return 0; } static void __exit hpet_exit(void) { acpi_bus_unregister_driver(&hpet_acpi_driver); - if (hpets) + if (sysctl_header) unregister_sysctl_table(sysctl_header); + misc_deregister(&hpet_misc); return; } diff -Nru a/drivers/char/hvsi.c b/drivers/char/hvsi.c --- a/drivers/char/hvsi.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/char/hvsi.c 2004-11-10 17:19:05 -08:00 @@ -29,11 +29,6 @@ * the OS cannot change the speed of the port through this protocol. */ -/* TODO: - * test FSP reset - * add udbg support for xmon/kdb - */ - #undef DEBUG #include @@ -54,6 +49,7 @@ #include #include #include +#include #define HVSI_MAJOR 229 #define HVSI_MINOR 128 @@ -74,6 +70,7 @@ struct hvsi_struct { struct work_struct writer; + struct work_struct handshaker; wait_queue_head_t emptyq; /* woken when outbuf is emptied */ wait_queue_head_t stateq; /* woken when HVSI state changes */ spinlock_t lock; @@ -109,6 +106,7 @@ HVSI_WAIT_FOR_VER_QUERY, HVSI_OPEN, HVSI_WAIT_FOR_MCTRL_RESPONSE, + HVSI_FSP_DIED, }; #define HVSI_CONSOLE 0x1 @@ -172,6 +170,13 @@ } u; } __attribute__((packed)); + + +static inline int is_console(struct hvsi_struct *hp) +{ + return hp->flags & HVSI_CONSOLE; +} + static inline int is_open(struct hvsi_struct *hp) { /* if we're waiting for an mctrl then we're already open */ @@ -188,6 +193,7 @@ "HVSI_WAIT_FOR_VER_QUERY", "HVSI_OPEN", "HVSI_WAIT_FOR_MCTRL_RESPONSE", + "HVSI_FSP_DIED", }; const char *name = state_names[hp->state]; @@ -296,14 +302,9 @@ return 0; } -/* - * we can't call tty_hangup() directly here because we need to call that - * outside of our lock - */ -static struct tty_struct *hvsi_recv_control(struct hvsi_struct *hp, - uint8_t *packet) +static void hvsi_recv_control(struct hvsi_struct *hp, uint8_t *packet, + struct tty_struct **to_hangup, struct hvsi_struct **to_handshake) { - struct tty_struct *to_hangup = NULL; struct hvsi_control *header = (struct hvsi_control *)packet; switch (header->verb) { @@ -313,15 +314,14 @@ pr_debug("hvsi%i: CD dropped\n", hp->index); hp->mctrl &= TIOCM_CD; if (!(hp->tty->flags & CLOCAL)) - to_hangup = hp->tty; + *to_hangup = hp->tty; } break; case VSV_CLOSE_PROTOCOL: - printk(KERN_DEBUG - "hvsi%i: service processor closed connection!\n", hp->index); - __set_state(hp, HVSI_CLOSED); - to_hangup = hp->tty; - hp->tty = NULL; + pr_debug("hvsi%i: service processor came back\n", hp->index); + if (hp->state != HVSI_CLOSED) { + *to_handshake = hp; + } break; default: printk(KERN_WARNING "hvsi%i: unknown HVSI control packet: ", @@ -329,8 +329,6 @@ dump_packet(packet); break; } - - return to_hangup; } static void hvsi_recv_response(struct hvsi_struct *hp, uint8_t *packet) @@ -388,8 +386,8 @@ switch (hp->state) { case HVSI_WAIT_FOR_VER_QUERY: - __set_state(hp, HVSI_OPEN); hvsi_version_respond(hp, query->seqno); + __set_state(hp, HVSI_OPEN); break; default: printk(KERN_ERR "hvsi%i: unexpected query: ", hp->index); @@ -467,17 +465,20 @@ * incoming data). */ static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct **flip, - struct tty_struct **hangup) + struct tty_struct **hangup, struct hvsi_struct **handshake) { uint8_t *packet = hp->inbuf; int chunklen; *flip = NULL; *hangup = NULL; + *handshake = NULL; chunklen = hvsi_read(hp, hp->inbuf_end, HVSI_MAX_READ); - if (chunklen == 0) + if (chunklen == 0) { + pr_debug("%s: 0-length read\n", __FUNCTION__); return 0; + } pr_debug("%s: got %i bytes\n", __FUNCTION__, chunklen); dbg_dump_hex(hp->inbuf_end, chunklen); @@ -509,7 +510,7 @@ *flip = hvsi_recv_data(hp, packet); break; case VS_CONTROL_PACKET_HEADER: - *hangup = hvsi_recv_control(hp, packet); + hvsi_recv_control(hp, packet, hangup, handshake); break; case VS_QUERY_RESPONSE_PACKET_HEADER: hvsi_recv_response(hp, packet); @@ -526,8 +527,8 @@ packet += len_packet(packet); - if (*hangup) { - pr_debug("%s: hangup\n", __FUNCTION__); + if (*hangup || *handshake) { + pr_debug("%s: hangup or handshake\n", __FUNCTION__); /* * we need to send the hangup now before receiving any more data. * If we get "data, hangup, data", we can't deliver the second @@ -560,16 +561,15 @@ struct hvsi_struct *hp = (struct hvsi_struct *)arg; struct tty_struct *flip; struct tty_struct *hangup; + struct hvsi_struct *handshake; unsigned long flags; - irqreturn_t handled = IRQ_NONE; int again = 1; pr_debug("%s\n", __FUNCTION__); while (again) { spin_lock_irqsave(&hp->lock, flags); - again = hvsi_load_chunk(hp, &flip, &hangup); - handled = IRQ_HANDLED; + again = hvsi_load_chunk(hp, &flip, &hangup, &handshake); spin_unlock_irqrestore(&hp->lock, flags); /* @@ -587,6 +587,11 @@ if (hangup) { tty_hangup(hangup); } + + if (handshake) { + pr_debug("hvsi%i: attempting re-handshake\n", handshake->index); + schedule_work(&handshake->handshaker); + } } spin_lock_irqsave(&hp->lock, flags); @@ -603,7 +608,7 @@ tty_flip_buffer_push(flip); } - return handled; + return IRQ_HANDLED; } /* for boot console, before the irq handler is running */ @@ -757,6 +762,23 @@ return 0; } +static void hvsi_handshaker(void *arg) +{ + struct hvsi_struct *hp = (struct hvsi_struct *)arg; + + if (hvsi_handshake(hp) >= 0) + return; + + printk(KERN_ERR "hvsi%i: re-handshaking failed\n", hp->index); + if (is_console(hp)) { + /* + * ttys will re-attempt the handshake via hvsi_open, but + * the console will not. + */ + printk(KERN_ERR "hvsi%i: lost console!\n", hp->index); + } +} + static int hvsi_put_chars(struct hvsi_struct *hp, const char *buf, int count) { struct hvsi_data packet __ALIGNED__; @@ -808,6 +830,10 @@ tty->driver_data = hp; tty->low_latency = 1; /* avoid throttle/tty_flip_buffer_push race */ + mb(); + if (hp->state == HVSI_FSP_DIED) + return -EIO; + spin_lock_irqsave(&hp->lock, flags); hp->tty = tty; hp->count++; @@ -815,7 +841,7 @@ h_vio_signal(hp->vtermno, VIO_IRQ_ENABLE); spin_unlock_irqrestore(&hp->lock, flags); - if (hp->flags & HVSI_CONSOLE) + if (is_console(hp)) return 0; /* this has already been handshaked as the console */ ret = hvsi_handshake(hp); @@ -889,7 +915,7 @@ hp->inbuf_end = hp->inbuf; /* discard remaining partial packets */ /* only close down connection if it is not the console */ - if (!(hp->flags & HVSI_CONSOLE)) { + if (!is_console(hp)) { h_vio_signal(hp->vtermno, VIO_IRQ_DISABLE); /* no more irqs */ __set_state(hp, HVSI_CLOSED); /* @@ -927,11 +953,17 @@ static void hvsi_hangup(struct tty_struct *tty) { struct hvsi_struct *hp = tty->driver_data; + unsigned long flags; pr_debug("%s\n", __FUNCTION__); + spin_lock_irqsave(&hp->lock, flags); + hp->count = 0; + hp->n_outbuf = 0; hp->tty = NULL; + + spin_unlock_irqrestore(&hp->lock, flags); } /* called with hp->lock held */ @@ -943,12 +975,13 @@ return; n = hvsi_put_chars(hp, hp->outbuf, hp->n_outbuf); - if (n != 0) { - /* - * either all data was sent or there was an error, and we throw away - * data on error. - */ + if (n > 0) { + /* success */ + pr_debug("%s: wrote %i chars\n", __FUNCTION__, n); hp->n_outbuf = 0; + } else if (n == -EIO) { + __set_state(hp, HVSI_FSP_DIED); + printk(KERN_ERR "hvsi%i: service processor died\n", hp->index); } } @@ -966,6 +999,19 @@ spin_lock_irqsave(&hp->lock, flags); + pr_debug("%s: %i chars in buffer\n", __FUNCTION__, hp->n_outbuf); + + if (!is_open(hp)) { + /* + * We could have a non-open connection if the service processor died + * while we were busily scheduling ourselves. In that case, it could + * be minutes before the service processor comes back, so only try + * again once a second. + */ + schedule_delayed_work(&hp->writer, HZ); + goto out; + } + hvsi_push(hp); if (hp->n_outbuf > 0) schedule_delayed_work(&hp->writer, 10); @@ -982,6 +1028,7 @@ wake_up_interruptible(&hp->tty->write_wait); } +out: spin_unlock_irqrestore(&hp->lock, flags); } @@ -1010,6 +1057,8 @@ spin_lock_irqsave(&hp->lock, flags); + pr_debug("%s: %i chars in buffer\n", __FUNCTION__, hp->n_outbuf); + if (!is_open(hp)) { /* we're either closing or not yet open; don't accept data */ pr_debug("%s: not open\n", __FUNCTION__); @@ -1279,6 +1328,7 @@ hp = &hvsi_ports[hvsi_count]; INIT_WORK(&hp->writer, hvsi_write_worker, hp); + INIT_WORK(&hp->handshaker, hvsi_handshaker, hp); init_waitqueue_head(&hp->emptyq); init_waitqueue_head(&hp->stateq); hp->lock = SPIN_LOCK_UNLOCKED; diff -Nru a/drivers/char/hw_random.c b/drivers/char/hw_random.c --- a/drivers/char/hw_random.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/char/hw_random.c 2004-11-10 17:19:04 -08:00 @@ -581,7 +581,7 @@ DPRINTK ("ENTER\n"); /* Probe for Intel, AMD RNGs */ - while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) { + for_each_pci_dev(pdev) { ent = pci_match_device (rng_pci_tbl, pdev); if (ent) { rng_ops = &rng_vendor_ops[ent->driver_data]; diff -Nru a/drivers/char/i8k.c b/drivers/char/i8k.c --- a/drivers/char/i8k.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/char/i8k.c 2004-11-10 17:19:03 -08:00 @@ -65,18 +65,20 @@ static char bios_version [4] = "?"; static char serial_number[16] = "?"; -static int force = 0; -static int restricted = 0; -static int power_status = 0; - MODULE_AUTHOR("Massimo Dal Zotto (dz@debian.org)"); MODULE_DESCRIPTION("Driver for accessing SMM BIOS on Dell laptops"); MODULE_LICENSE("GPL"); -MODULE_PARM(force, "i"); -MODULE_PARM(restricted, "i"); -MODULE_PARM(power_status, "i"); + +static int force; +module_param(force, bool, 0); MODULE_PARM_DESC(force, "Force loading without checking for supported models"); + +static int restricted; +module_param(restricted, bool, 0); MODULE_PARM_DESC(restricted, "Allow fan control if SYS_ADMIN capability set"); + +static int power_status; +module_param(power_status, bool, 600); MODULE_PARM_DESC(power_status, "Report power status in /proc/i8k"); static ssize_t i8k_read(struct file *, char __user *, size_t, loff_t *); diff -Nru a/drivers/char/lp.c b/drivers/char/lp.c --- a/drivers/char/lp.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/char/lp.c 2004-11-10 17:19:02 -08:00 @@ -749,8 +749,8 @@ static char *parport[LP_NO] = { NULL, }; static int reset = 0; -MODULE_PARM(parport, "1-" __MODULE_STRING(LP_NO) "s"); -MODULE_PARM(reset, "i"); +module_param_array(parport, charp, NULL, 0); +module_param(reset, bool, 0); #ifndef MODULE static int __init lp_setup (char *str) diff -Nru a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c --- a/drivers/char/mmtimer.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/char/mmtimer.c 2004-11-10 17:19:05 -08:00 @@ -13,6 +13,9 @@ * * 11/01/01 - jbarnes - initial revision * 9/10/04 - Christoph Lameter - remove interrupt support for kernel inclusion + * 10/1/04 - Christoph Lameter - provide posix clock CLOCK_SGI_CYCLE + * 10/13/04 - Christoph Lameter, Dimitri Sivanich - provide timer interrupt support + * via the posix timer interface */ #include @@ -26,23 +29,34 @@ #include #include #include +#include #include #include -#include +#include #include +#include + +/* This is ugly and jbarnes has promised me to fix this later */ +#include "../../arch/ia64/sn/include/shubio.h" MODULE_AUTHOR("Jesse Barnes "); -MODULE_DESCRIPTION("Multimedia timer support"); +MODULE_DESCRIPTION("SGI Altix RTC Timer"); MODULE_LICENSE("GPL"); /* name of the device, usually in /dev */ #define MMTIMER_NAME "mmtimer" -#define MMTIMER_DESC "IA-PC Multimedia Timer" -#define MMTIMER_VERSION "1.0" +#define MMTIMER_DESC "SGI Altix RTC Timer" +#define MMTIMER_VERSION "2.0" #define RTC_BITS 55 /* 55 bits for this implementation */ +extern unsigned long sn_rtc_cycles_per_second; + +#define RTC_COUNTER_ADDR ((long *)LOCAL_MMR_ADDR(SH_RTC)) + +#define rtc_time() (*RTC_COUNTER_ADDR) + static int mmtimer_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); static int mmtimer_mmap(struct file *file, struct vm_area_struct *vma); @@ -58,6 +72,200 @@ .ioctl = mmtimer_ioctl, }; +/* + * Comparators and their associated info. Shub has + * three comparison registers. + */ + +/* + * We only have comparison registers RTC1-4 currently available per + * node. RTC0 is used by SAL. + */ +#define NUM_COMPARATORS 3 +/* + * Check for an interrupt and clear the pending bit if + * one is waiting. +*/ +static int inline mmtimer_int_pending(int comparator) +{ + int pending = 0; + + switch (comparator) { + case 0: + if (HUB_L((unsigned long *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED)) & + SH_EVENT_OCCURRED_RTC1_INT_MASK) { + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), + SH_EVENT_OCCURRED_RTC1_INT_MASK); + pending = 1; + } + break; + case 1: + if (HUB_L((unsigned long *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED)) & + SH_EVENT_OCCURRED_RTC2_INT_MASK) { + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), + SH_EVENT_OCCURRED_RTC2_INT_MASK); + pending = 1; + } + break; + case 2: + if (HUB_L((unsigned long *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED)) & + SH_EVENT_OCCURRED_RTC3_INT_MASK) { + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), + SH_EVENT_OCCURRED_RTC3_INT_MASK); + pending = 1; + } + break; + default: + return -EFAULT; + } + return pending; +} + +static void inline mmtimer_setup_int_0(u64 expires) +{ + u64 val; + + /* Disable interrupt */ + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC1_INT_ENABLE), 0UL); + + /* Initialize comparator value */ + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_INT_CMPB), -1L); + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), + SH_EVENT_OCCURRED_RTC1_INT_MASK); + + val = ((u64)SGI_MMTIMER_VECTOR << SH_RTC1_INT_CONFIG_IDX_SHFT) | + ((u64)cpu_physical_id(smp_processor_id()) << + SH_RTC1_INT_CONFIG_PID_SHFT); + + /* Set configuration */ + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC1_INT_CONFIG), val); + + /* Enable RTC interrupts */ + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC1_INT_ENABLE), 1UL); + + /* Initialize comparator value */ + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_INT_CMPB), expires); + + +} + +static void inline mmtimer_setup_int_1(u64 expires) +{ + u64 val; + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC2_INT_ENABLE), 0UL); + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_INT_CMPC), -1L); + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), + SH_EVENT_OCCURRED_RTC2_INT_MASK); + + val = ((u64)SGI_MMTIMER_VECTOR << SH_RTC2_INT_CONFIG_IDX_SHFT) | + ((u64)cpu_physical_id(smp_processor_id()) << + SH_RTC2_INT_CONFIG_PID_SHFT); + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC2_INT_CONFIG), val); + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC2_INT_ENABLE), 1UL); + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_INT_CMPC), expires); +} + +static void inline mmtimer_setup_int_2(u64 expires) +{ + u64 val; + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC3_INT_ENABLE), 0UL); + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_INT_CMPD), -1L); + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), + SH_EVENT_OCCURRED_RTC3_INT_MASK); + + val = ((u64)SGI_MMTIMER_VECTOR << SH_RTC3_INT_CONFIG_IDX_SHFT) | + ((u64)cpu_physical_id(smp_processor_id()) << + SH_RTC3_INT_CONFIG_PID_SHFT); + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC3_INT_CONFIG), val); + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC3_INT_ENABLE), 1UL); + + HUB_S((u64 *)LOCAL_MMR_ADDR(SH_INT_CMPD), expires); +} + +/* + * This function must be called with interrupts disabled and preemption off + * in order to insure that the setup succeeds in a deterministic time frame. + * It will check if the interrupt setup succeeded. + * mmtimer_setup will return the cycles that we were too late if the + * initialization failed. + */ +static int inline mmtimer_setup(int comparator, unsigned long expires) +{ + + long diff; + + switch (comparator) { + case 0: + mmtimer_setup_int_0(expires); + break; + case 1: + mmtimer_setup_int_1(expires); + break; + case 2: + mmtimer_setup_int_2(expires); + break; + } + /* We might've missed our expiration time */ + diff = rtc_time() - expires; + if (diff > 0) { + if (HUB_L((unsigned long *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED)) & + (SH_EVENT_OCCURRED_RTC1_INT_MASK << comparator)) { + /* We'll get an interrupt for this once we're done */ + return 0; + } + /* Looks like we missed it */ + return diff; + } + + return 0; +} + +static int inline mmtimer_disable_int(long nasid, int comparator) +{ + switch (comparator) { + case 0: + nasid == -1 ? HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC1_INT_ENABLE), + 0UL) : REMOTE_HUB_S(nasid, SH_RTC1_INT_ENABLE, 0UL); + break; + case 1: + nasid == -1 ? HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC2_INT_ENABLE), + 0UL) : REMOTE_HUB_S(nasid, SH_RTC2_INT_ENABLE, 0UL); + break; + case 2: + nasid == -1 ? HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC3_INT_ENABLE), + 0UL) : REMOTE_HUB_S(nasid, SH_RTC3_INT_ENABLE, 0UL); + break; + default: + return -EFAULT; + } + return 0; +} + +#define TIMER_OFF 0xbadcabLL + +/* There is one of these for each comparator */ +typedef struct mmtimer { + spinlock_t lock ____cacheline_aligned; + struct k_itimer *timer; +} mmtimer_t; + +/* + * Total number of comparators is comparators/node * MAX nodes/running kernel + */ +static mmtimer_t timers[NUM_COMPARATORS*MAX_COMPACT_NODES]; + /** * mmtimer_ioctl - ioctl interface for /dev/mmtimer * @inode: inode of the device @@ -103,13 +311,13 @@ break; case MMTIMER_GETRES: /* resolution of the clock in 10^-15 s */ - if(copy_to_user((unsigned long *)arg, &mmtimer_femtoperiod, - sizeof(unsigned long))) + if(copy_to_user((unsigned long __user *)arg, + &mmtimer_femtoperiod, sizeof(unsigned long))) return -EFAULT; break; case MMTIMER_GETFREQ: /* frequency in Hz */ - if(copy_to_user((unsigned long *)arg, + if(copy_to_user((unsigned long __user *)arg, &sn_rtc_cycles_per_second, sizeof(unsigned long))) return -EFAULT; @@ -125,8 +333,8 @@ break; case MMTIMER_GETCOUNTER: - if(copy_to_user((unsigned long *)arg, RTC_COUNTER_ADDR, - sizeof(unsigned long))) + if(copy_to_user((unsigned long __user *)arg, + RTC_COUNTER_ADDR, sizeof(unsigned long))) return -EFAULT; break; default: @@ -183,22 +391,31 @@ static struct timespec sgi_clock_offset; static int sgi_clock_period; -static int sgi_clock_get(struct timespec *tp) { +/* + * Posix Timer Interface + */ + +static struct timespec sgi_clock_offset; +static int sgi_clock_period; + +static int sgi_clock_get(struct timespec *tp) +{ u64 nsec; - nsec = readq(RTC_COUNTER_ADDR) * sgi_clock_period + nsec = rtc_time() * sgi_clock_period + sgi_clock_offset.tv_nsec; tp->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &tp->tv_nsec) + sgi_clock_offset.tv_sec; return 0; }; -static int sgi_clock_set(struct timespec *tp) { +static int sgi_clock_set(struct timespec *tp) +{ u64 nsec; u64 rem; - nsec = readq(RTC_COUNTER_ADDR) * sgi_clock_period; + nsec = rtc_time() * sgi_clock_period; sgi_clock_offset.tv_sec = tp->tv_sec - div_long_long_rem(nsec, NSEC_PER_SEC, &rem); @@ -211,12 +428,254 @@ return 0; } +/* + * Schedule the next periodic interrupt. This function will attempt + * to schedule a periodic interrupt later if necessary. If the scheduling + * of an interrupt fails then the time to skip is lengthened + * exponentially in order to ensure that the next interrupt + * can be properly scheduled.. + */ +static int inline reschedule_periodic_timer(mmtimer_t *base, struct k_itimer *t, int i) +{ + int n; + + t->it_timer.magic = i; + base[i].timer = t; + t->it_overrun--; + + n = 0; + do { + + t->it_timer.expires += t->it_incr << n; + t->it_overrun += 1 << n; + n++; + if (n > 20) + return 1; + + } while (mmtimer_setup(i, t->it_timer.expires)); + + return 0; +} + +/** + * mmtimer_interrupt - timer interrupt handler + * @irq: irq received + * @dev_id: device the irq came from + * @regs: register state upon receipt of the interrupt + * + * Called when one of the comarators matches the counter, This + * routine will send signals to processes that have requested + * them. + * + * This interrupt is run in an interrupt context + * by the SHUB. It is therefore safe to locally access SHub + * registers. + */ +static irqreturn_t +mmtimer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + int i; + mmtimer_t *base = timers + cpuid_to_cnodeid(smp_processor_id()) * NUM_COMPARATORS; + int result = IRQ_NONE; + + /* + * Do this once for each comparison register + */ + for (i = 0; i < NUM_COMPARATORS; i++) { + unsigned long flags; + + if (mmtimer_int_pending(i) > 0) { + struct k_itimer *t; + int m = 0; + + mmtimer_disable_int(-1, i); + spin_lock(&base[i].lock); + t = base[i].timer; + base[i].timer = NULL; + if (t) { + m = t->it_timer.magic; + t->it_timer.magic = TIMER_OFF; + } + spin_unlock(&base[i].lock); + + if (t == NULL || m == TIMER_OFF) + /* No timer left here, bail out */ + goto out; + + spin_lock_irqsave(&t->it_lock, flags); + t->it_overrun = 0; + + if (posix_timer_event(t, 0) == 0) { + + if(t->it_incr) { + /* Periodic timer */ + spin_lock(&base[i].lock); + if (base[i].timer == NULL) + reschedule_periodic_timer(base, t, i); + spin_unlock(&base[i].lock); + } + + } else { + printk(KERN_WARNING "mmtimer: unable to deliver signal"); + t->it_overrun++; + } + t->it_overrun_last = t->it_overrun; + spin_unlock_irqrestore(&t->it_lock, flags); +out: + result = IRQ_HANDLED; + } + } + return result; +} + +static int sgi_timer_create(struct k_itimer *timer) +{ + /* Insure that a newly created timer is off */ + timer->it_timer.magic = TIMER_OFF; + return 0; +} + +/* This does not really delete a timer. It just insures + * that the timer is not active + * + * Assumption: it_lock is already held with irq's disabled + */ +static int sgi_timer_del(struct k_itimer *timr) +{ + int i = timr->it_timer.magic; + cnodeid_t nodeid = timr->it_timer.data; + mmtimer_t *t = timers + nodeid * NUM_COMPARATORS +i; + unsigned long irqflags; + + if (i != TIMER_OFF) { + spin_lock_irqsave(&t->lock, irqflags); + mmtimer_disable_int(cnodeid_to_nasid(nodeid),i); + t->timer = NULL; + timr->it_timer.magic = TIMER_OFF; + spin_unlock_irqrestore(&t->lock, irqflags); + } + return 0; +} + +#define timespec_to_ns(x) ((x).tv_nsec + (x).tv_sec * NSEC_PER_SEC) +#define ns_to_timespec(ts, nsec) (ts).tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &(ts).tv_nsec) + +/* Assumption: it_lock is already held with irq's disabled */ +static void sgi_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting) +{ + + if (timr->it_timer.magic == TIMER_OFF) { + cur_setting->it_interval.tv_nsec = 0; + cur_setting->it_interval.tv_sec = 0; + cur_setting->it_value.tv_nsec = 0; + cur_setting->it_value.tv_sec =0; + return; + } + + ns_to_timespec(cur_setting->it_interval, timr->it_incr * sgi_clock_period); + ns_to_timespec(cur_setting->it_value, (timr->it_timer.expires - rtc_time())* sgi_clock_period); + return; +} + + +static int sgi_timer_set(struct k_itimer *timr, int flags, + struct itimerspec * new_setting, + struct itimerspec * old_setting) +{ + + int i; + unsigned long when, period, irqflags; + int err = 0; + cnodeid_t nodeid; + mmtimer_t *base; + + if (old_setting) + sgi_timer_get(timr, old_setting); + + sgi_timer_del(timr); + when = timespec_to_ns(new_setting->it_value); + period = timespec_to_ns(new_setting->it_interval); + + if (when == 0) + /* Clear timer */ + return 0; + + if (flags & TIMER_ABSTIME) { + struct timespec n; + + getnstimeofday(&n); + when -= timespec_to_ns(n); + } + + /* + * Convert to sgi clock period. Need to keep rtc_time() as near as possible + * to getnstimeofday() in order to be as faithful as possible to the time + * specified. + */ + when = (when + sgi_clock_period - 1) / sgi_clock_period + rtc_time(); + period = (period + sgi_clock_period - 1) / sgi_clock_period; + + /* + * We are allocating a local SHub comparator. If we would be moved to another + * cpu then another SHub may be local to us. Prohibit that by switching off + * preemption. + */ + preempt_disable(); + + nodeid = cpuid_to_cnodeid(smp_processor_id()); + base = timers + nodeid * NUM_COMPARATORS; +retry: + for(i = 0; i< NUM_COMPARATORS; i++) { + if (!base[i].timer) { + break; + } + } + + if (i == NUM_COMPARATORS) { + preempt_enable(); + return -EBUSY; + } + + spin_lock_irqsave(&base[i].lock, irqflags); + + if (base[i].timer) { + spin_unlock_irqrestore(&base[i].lock, irqflags); + goto retry; + } + base[i].timer = timr; + + timr->it_timer.magic = i; + timr->it_timer.data = nodeid; + timr->it_incr = period; + timr->it_timer.expires = when; + + if (period == 0) { + if (mmtimer_setup(i, when)) { + mmtimer_disable_int(-1, i); + posix_timer_event(timr, 0); + } + } else { + timr->it_timer.expires -= period; + if (reschedule_periodic_timer(base, timr, i)) + err = -EINVAL; + } + + spin_unlock_irqrestore(&base[i].lock, irqflags); + + preempt_enable(); + + return err; +} + static struct k_clock sgi_clock = { .res = 0, .clock_set = sgi_clock_set, .clock_get = sgi_clock_get, - .timer_create = do_posix_clock_notimer_create, - .nsleep = do_posix_clock_nonanosleep + .timer_create = sgi_timer_create, + .nsleep = do_posix_clock_nonanosleep, + .timer_set = sgi_timer_set, + .timer_del = sgi_timer_del, + .timer_get = sgi_timer_get }; /** @@ -226,6 +685,8 @@ */ static int __init mmtimer_init(void) { + unsigned i; + if (!ia64_platform_is("sn2")) return -1; @@ -240,6 +701,17 @@ mmtimer_femtoperiod = ((unsigned long)1E15 + sn_rtc_cycles_per_second / 2) / sn_rtc_cycles_per_second; + + for (i=0; i< NUM_COMPARATORS*MAX_COMPACT_NODES; i++) { + spin_lock_init(&timers[i].lock); + timers[i].timer = NULL; + } + + if (request_irq(SGI_MMTIMER_VECTOR, mmtimer_interrupt, SA_PERCPU_IRQ, MMTIMER_NAME, NULL)) { + printk(KERN_WARNING "%s: unable to allocate interrupt.", + MMTIMER_NAME); + return -1; + } strcpy(mmtimer_miscdev.devfs_name, MMTIMER_NAME); if (misc_register(&mmtimer_miscdev)) { diff -Nru a/drivers/char/moxa.c b/drivers/char/moxa.c --- a/drivers/char/moxa.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/char/moxa.c 2004-11-10 17:19:06 -08:00 @@ -676,7 +676,6 @@ return; MoxaPortFlushData(ch->port, 1); tty_wakeup(tty); - wake_up_interruptible(&tty->write_wait); } static int moxa_chars_in_buffer(struct tty_struct *tty) @@ -935,7 +934,6 @@ if (!tp->stopped) { ch->statusflags &= ~LOWWAIT; tty_wakeup(tp); - wake_up_interruptible(&tp->write_wait); } } } @@ -1102,7 +1100,6 @@ if (MoxaPortTxQueue(ch->port) == 0) { ch->statusflags &= ~EMPTYWAIT; tty_wakeup(ch->tty); - wake_up_interruptible(&ch->tty->write_wait); return; } moxaEmptyTimer[ch->port].expires = jiffies + HZ; diff -Nru a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c --- a/drivers/char/pcmcia/synclink_cs.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/char/pcmcia/synclink_cs.c 2004-11-10 17:19:03 -08:00 @@ -4557,9 +4557,7 @@ memcpy(skb_put(skb, size),buf,size); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - skb->protocol = hdlc_type_trans(skb, skb->dev); + skb->protocol = hdlc_type_trans(skb, info->netdev); stats->rx_packets++; stats->rx_bytes += size; diff -Nru a/drivers/char/random.c b/drivers/char/random.c --- a/drivers/char/random.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/char/random.c 2004-11-10 17:19:02 -08:00 @@ -698,7 +698,7 @@ * hashing calculations during an interrupt in add_timer_randomness(). * Instead, the entropy is only added to the pool by keventd. */ -void batch_entropy_store(u32 a, u32 b, int num) +static void batch_entropy_store(u32 a, u32 b, int num) { int new; unsigned long flags; @@ -729,8 +729,6 @@ spin_unlock_irqrestore(&batch_lock, flags); } -EXPORT_SYMBOL(batch_entropy_store); - /* * Flush out the accumulated entropy operations, adding entropy to the passed * store (normally random_state). If that store has enough entropy, alternate @@ -818,12 +816,10 @@ * jiffies. */ time = get_cycles(); - if (time != 0) { - if (sizeof(time) > 4) - num ^= (u32)(time >> 32); - } else { + if (time) + num ^= (u32)((time >> 31) >> 1); + else time = jiffies; - } /* * Calculate number of bits of randomness we probably added. @@ -876,8 +872,6 @@ } } -EXPORT_SYMBOL(add_keyboard_randomness); - void add_mouse_randomness(__u32 mouse_data) { add_timer_randomness(&mouse_timer_state, mouse_data); @@ -892,8 +886,6 @@ add_timer_randomness(irq_timer_state[irq], 0x100+irq); } - -EXPORT_SYMBOL(add_interrupt_randomness); void add_disk_randomness(struct gendisk *disk) { diff -Nru a/drivers/char/rocket.c b/drivers/char/rocket.c --- a/drivers/char/rocket.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/char/rocket.c 2004-11-10 17:19:05 -08:00 @@ -2453,30 +2453,6 @@ } #endif -/*********************************************************************** - Copyright 1994 Comtrol Corporation. - All Rights Reserved. - -The following source code is subject to Comtrol Corporation's -Developer's License Agreement. - -This source code is protected by United States copyright law and -international copyright treaties. - -This source code may only be used to develop software products that -will operate with Comtrol brand hardware. - -You may not reproduce nor distribute this source code in its original -form but must produce a derivative work which includes portions of -this source code only. - -The portions of this source code which you use in your derivative -work must bear Comtrol's copyright notice: - - Copyright 1994 Comtrol Corporation. - -***********************************************************************/ - #ifndef TRUE #define TRUE 1 #endif diff -Nru a/drivers/char/selection.c b/drivers/char/selection.c --- a/drivers/char/selection.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/char/selection.c 2004-11-10 17:19:07 -08:00 @@ -304,6 +304,3 @@ tty_ldisc_deref(ld); return 0; } - -EXPORT_SYMBOL(set_selection); -EXPORT_SYMBOL(paste_selection); diff -Nru a/drivers/char/serial167.c b/drivers/char/serial167.c --- a/drivers/char/serial167.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/char/serial167.c 2004-11-10 17:19:04 -08:00 @@ -39,6 +39,9 @@ * - don't use the panic function in serial167_init * - do resource release on failure on serial167_init * - include missing restore_flags in mvme167_serial_console_setup + * + * Kars de Jong - 2004/09/06 + * - replace bottom half handler with task queue handler */ #include @@ -89,8 +92,6 @@ #define SERIAL_TYPE_NORMAL 1 -DECLARE_TASK_QUEUE(tq_cyclades); - static struct tty_driver *cy_serial_driver; extern int serial_console; static struct cyclades_port *serial_console_info = NULL; @@ -373,8 +374,7 @@ cy_sched_event(struct cyclades_port *info, int event) { info->event |= 1 << event; /* remember what kind of event and who */ - queue_task(&info->tqueue, &tq_cyclades); /* it belongs to */ - mark_bh(CYCLADES_BH); /* then trigger event */ + schedule_work(&info->tqueue); } /* cy_sched_event */ @@ -467,7 +467,7 @@ and nothing could be done about it!!! */ } } - queue_task(&tty->flip.tqueue, &tq_timer); + schedule_delayed_work(&tty->flip.work, 1); /* end of service */ base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS; return IRQ_HANDLED; @@ -702,7 +702,7 @@ udelay(10L); #endif } - queue_task(&tty->flip.tqueue, &tq_timer); + schedule_delayed_work(&tty->flip.work, 1); } /* end of service */ base_addr[CyREOIR] = save_cnt ? 0 : CyNOTRANS; @@ -713,7 +713,7 @@ * This routine is used to handle the "bottom half" processing for the * serial driver, known also the "software interrupt" processing. * This processing is done at the kernel interrupt level, after the - * cy_interrupt() has returned, BUT WITH INTERRUPTS TURNED ON. This + * cy#/_interrupt() has returned, BUT WITH INTERRUPTS TURNED ON. This * is where time-consuming activities which can not be done in the * interrupt driver proper are done; the interrupt driver schedules * them using cy_sched_event(), and they get done here. @@ -721,9 +721,7 @@ * This is done through one level of indirection--the task queue. * When a hardware interrupt service routine wants service by the * driver's bottom half, it enqueues the appropriate tq_struct (one - * per port) to the tq_cyclades work queue and sets a request flag - * via mark_bh for processing that queue. When the time is right, - * do_cyclades_bh is called (because of the mark_bh) and it requests + * per port) to the keventd work queue and sets a request flag * that the work queue be processed. * * Although this may seem unwieldy, it gives the system a way to @@ -732,12 +730,6 @@ * had to poll every port to see if that port needed servicing. */ static void -do_cyclades_bh(void) -{ - run_task_queue(&tq_cyclades); -} /* do_cyclades_bh */ - -static void do_softint(void *private_) { struct cyclades_port *info = (struct cyclades_port *) private_; @@ -2278,8 +2270,6 @@ return ret; } - init_bh(CYCLADES_BH, do_cyclades_bh); - port_num = 0; info = cy_port; for (index = 0; index < 1; index++) { @@ -2317,8 +2307,7 @@ info->blocked_open = 0; info->default_threshold = 0; info->default_timeout = 0; - info->tqueue.routine = do_softint; - info->tqueue.data = info; + INIT_WORK(&info->tqueue, do_softint, info); init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); /* info->session */ diff -Nru a/drivers/char/sonypi.c b/drivers/char/sonypi.c --- a/drivers/char/sonypi.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/char/sonypi.c 2004-11-10 17:19:05 -08:00 @@ -1,7 +1,7 @@ /* * Sony Programmable I/O Control Device driver for VAIO * - * Copyright (C) 2001-2003 Stelian Pop + * Copyright (C) 2001-2004 Stelian Pop * * Copyright (C) 2001-2002 Alcôve * @@ -19,12 +19,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -44,84 +44,89 @@ #include #include #include -#include +#include #include #include #include -static int verbose; /* = 0 */ - #include "sonypi.h" #include -static struct sonypi_device sonypi_device; +MODULE_AUTHOR("Stelian Pop "); +MODULE_DESCRIPTION("Sony Programmable I/O Control Device driver"); +MODULE_LICENSE("GPL"); +MODULE_VERSION(SONYPI_DRIVER_VERSION); + static int minor = -1; -static int fnkeyinit; /* = 0 */ -static int camera; /* = 0 */ -static int compat; /* = 0 */ -static int useinput = 1; +module_param(minor, int, 0); +MODULE_PARM_DESC(minor, + "minor number of the misc device, default is -1 (automatic)"); + +static int verbose; /* = 0 */ +module_param(verbose, int, 0644); +MODULE_PARM_DESC(verbose, "be verbose, default is 0 (no)"); + +static int fnkeyinit; /* = 0 */ +module_param(fnkeyinit, int, 0444); +MODULE_PARM_DESC(fnkeyinit, + "set this if your Fn keys do not generate any event"); + +static int camera; /* = 0 */ +module_param(camera, int, 0444); +MODULE_PARM_DESC(camera, + "set this if you have a MotionEye camera (PictureBook series)"); + +static int compat; /* = 0 */ +module_param(compat, int, 0444); +MODULE_PARM_DESC(compat, + "set this if you want to enable backward compatibility mode"); + static unsigned long mask = 0xffffffff; +module_param(mask, ulong, 0644); +MODULE_PARM_DESC(mask, + "set this to the mask of event you want to enable (see doc)"); -/* Inits the queue */ -static inline void sonypi_initq(void) { - sonypi_device.queue.head = sonypi_device.queue.tail = 0; - sonypi_device.queue.len = 0; - sonypi_device.queue.s_lock = SPIN_LOCK_UNLOCKED; - init_waitqueue_head(&sonypi_device.queue.proc_list); -} - -/* Pulls an event from the queue */ -static inline unsigned char sonypi_pullq(void) { - unsigned char result; - unsigned long flags; - - spin_lock_irqsave(&sonypi_device.queue.s_lock, flags); - if (!sonypi_device.queue.len) { - spin_unlock_irqrestore(&sonypi_device.queue.s_lock, flags); - return 0; - } - result = sonypi_device.queue.buf[sonypi_device.queue.head]; - sonypi_device.queue.head++; - sonypi_device.queue.head &= (SONYPI_BUF_SIZE - 1); - sonypi_device.queue.len--; - spin_unlock_irqrestore(&sonypi_device.queue.s_lock, flags); - return result; -} - -/* Pushes an event into the queue */ -static inline void sonypi_pushq(unsigned char event) { - unsigned long flags; - - spin_lock_irqsave(&sonypi_device.queue.s_lock, flags); - if (sonypi_device.queue.len == SONYPI_BUF_SIZE) { - /* remove the first element */ - sonypi_device.queue.head++; - sonypi_device.queue.head &= (SONYPI_BUF_SIZE - 1); - sonypi_device.queue.len--; - } - sonypi_device.queue.buf[sonypi_device.queue.tail] = event; - sonypi_device.queue.tail++; - sonypi_device.queue.tail &= (SONYPI_BUF_SIZE - 1); - sonypi_device.queue.len++; - - kill_fasync(&sonypi_device.queue.fasync, SIGIO, POLL_IN); - wake_up_interruptible(&sonypi_device.queue.proc_list); - spin_unlock_irqrestore(&sonypi_device.queue.s_lock, flags); -} - -/* Tests if the queue is empty */ -static inline int sonypi_emptyq(void) { - int result; - unsigned long flags; - - spin_lock_irqsave(&sonypi_device.queue.s_lock, flags); - result = (sonypi_device.queue.len == 0); - spin_unlock_irqrestore(&sonypi_device.queue.s_lock, flags); - return result; +static int useinput = 1; +module_param(useinput, int, 0444); +MODULE_PARM_DESC(useinput, + "set this if you would like sonypi to feed events to the input subsystem"); + +static struct sonypi_device sonypi_device; + +static int sonypi_ec_write(u8 addr, u8 value) +{ +#ifdef CONFIG_ACPI_EC + if (SONYPI_ACPI_ACTIVE) + return ec_write(addr, value); +#endif + wait_on_command(1, inb_p(SONYPI_CST_IOPORT) & 3, ITERATIONS_LONG); + outb_p(0x81, SONYPI_CST_IOPORT); + wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); + outb_p(addr, SONYPI_DATA_IOPORT); + wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); + outb_p(value, SONYPI_DATA_IOPORT); + wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); + return 0; } -static int ec_read16(u8 addr, u16 *value) { +static int sonypi_ec_read(u8 addr, u8 *value) +{ +#ifdef CONFIG_ACPI_EC + if (SONYPI_ACPI_ACTIVE) + return ec_read(addr, value); +#endif + wait_on_command(1, inb_p(SONYPI_CST_IOPORT) & 3, ITERATIONS_LONG); + outb_p(0x80, SONYPI_CST_IOPORT); + wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); + outb_p(addr, SONYPI_DATA_IOPORT); + wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); + *value = inb_p(SONYPI_DATA_IOPORT); + return 0; +} + +static int ec_read16(u8 addr, u16 *value) +{ u8 val_lb, val_hb; if (sonypi_ec_read(addr, &val_lb)) return -1; @@ -132,21 +137,22 @@ } /* Initializes the device - this comes from the AML code in the ACPI bios */ -static void sonypi_type1_srs(void) { +static void sonypi_type1_srs(void) +{ u32 v; pci_read_config_dword(sonypi_device.dev, SONYPI_G10A, &v); - v = (v & 0xFFFF0000) | ((u32)sonypi_device.ioport1); + v = (v & 0xFFFF0000) | ((u32) sonypi_device.ioport1); pci_write_config_dword(sonypi_device.dev, SONYPI_G10A, v); pci_read_config_dword(sonypi_device.dev, SONYPI_G10A, &v); - v = (v & 0xFFF0FFFF) | - (((u32)sonypi_device.ioport1 ^ sonypi_device.ioport2) << 16); + v = (v & 0xFFF0FFFF) | + (((u32) sonypi_device.ioport1 ^ sonypi_device.ioport2) << 16); pci_write_config_dword(sonypi_device.dev, SONYPI_G10A, v); v = inl(SONYPI_IRQ_PORT); - v &= ~(((u32)0x3) << SONYPI_IRQ_SHIFT); - v |= (((u32)sonypi_device.bits) << SONYPI_IRQ_SHIFT); + v &= ~(((u32) 0x3) << SONYPI_IRQ_SHIFT); + v |= (((u32) sonypi_device.bits) << SONYPI_IRQ_SHIFT); outl(v, SONYPI_IRQ_PORT); pci_read_config_dword(sonypi_device.dev, SONYPI_G10A, &v); @@ -154,18 +160,20 @@ pci_write_config_dword(sonypi_device.dev, SONYPI_G10A, v); } -static void sonypi_type2_srs(void) { +static void sonypi_type2_srs(void) +{ if (sonypi_ec_write(SONYPI_SHIB, (sonypi_device.ioport1 & 0xFF00) >> 8)) printk(KERN_WARNING "ec_write failed\n"); - if (sonypi_ec_write(SONYPI_SLOB, sonypi_device.ioport1 & 0x00FF)) + if (sonypi_ec_write(SONYPI_SLOB, sonypi_device.ioport1 & 0x00FF)) printk(KERN_WARNING "ec_write failed\n"); - if (sonypi_ec_write(SONYPI_SIRQ, sonypi_device.bits)) + if (sonypi_ec_write(SONYPI_SIRQ, sonypi_device.bits)) printk(KERN_WARNING "ec_write failed\n"); udelay(10); } /* Disables the device - this comes from the AML code in the ACPI bios */ -static void sonypi_type1_dis(void) { +static void sonypi_type1_dis(void) +{ u32 v; pci_read_config_dword(sonypi_device.dev, SONYPI_G10A, &v); @@ -177,7 +185,8 @@ outl(v, SONYPI_IRQ_PORT); } -static void sonypi_type2_dis(void) { +static void sonypi_type2_dis(void) +{ if (sonypi_ec_write(SONYPI_SHIB, 0)) printk(KERN_WARNING "ec_write failed\n"); if (sonypi_ec_write(SONYPI_SLOB, 0)) @@ -186,7 +195,8 @@ printk(KERN_WARNING "ec_write failed\n"); } -static u8 sonypi_call1(u8 dev) { +static u8 sonypi_call1(u8 dev) +{ u8 v1, v2; wait_on_command(0, inb_p(sonypi_device.ioport2) & 2, ITERATIONS_LONG); @@ -196,7 +206,8 @@ return v2; } -static u8 sonypi_call2(u8 dev, u8 fn) { +static u8 sonypi_call2(u8 dev, u8 fn) +{ u8 v1; wait_on_command(0, inb_p(sonypi_device.ioport2) & 2, ITERATIONS_LONG); @@ -207,7 +218,8 @@ return v1; } -static u8 sonypi_call3(u8 dev, u8 fn, u8 v) { +static u8 sonypi_call3(u8 dev, u8 fn, u8 v) +{ u8 v1; wait_on_command(0, inb_p(sonypi_device.ioport2) & 2, ITERATIONS_LONG); @@ -220,7 +232,8 @@ return v1; } -static u8 sonypi_read(u8 fn) { +static u8 sonypi_read(u8 fn) +{ u8 v1, v2; int n = 100; @@ -234,13 +247,14 @@ } /* Set brightness, hue etc */ -static void sonypi_set(u8 fn, u8 v) { - +static void sonypi_set(u8 fn, u8 v) +{ wait_on_command(0, sonypi_call3(0x90, fn, v), ITERATIONS_SHORT); } /* Tests if the camera is ready */ -static int sonypi_camera_ready(void) { +static int sonypi_camera_ready(void) +{ u8 v; v = sonypi_call2(0x8f, SONYPI_CAMERA_STATUS); @@ -248,19 +262,20 @@ } /* Turns the camera off */ -static void sonypi_camera_off(void) { - +static void sonypi_camera_off(void) +{ sonypi_set(SONYPI_CAMERA_PICTURE, SONYPI_CAMERA_MUTE_MASK); if (!sonypi_device.camera_power) return; - sonypi_call2(0x91, 0); + sonypi_call2(0x91, 0); sonypi_device.camera_power = 0; } /* Turns the camera on */ -static void sonypi_camera_on(void) { +static void sonypi_camera_on(void) +{ int i, j; if (sonypi_device.camera_power) @@ -283,7 +298,7 @@ if (i) break; } - + if (j == 0) { printk(KERN_WARNING "sonypi: failed to power on camera\n"); return; @@ -294,19 +309,42 @@ } /* sets the bluetooth subsystem power state */ -static void sonypi_setbluetoothpower(u8 state) { - +static void sonypi_setbluetoothpower(u8 state) +{ state = !!state; - if (sonypi_device.bluetooth_power == state) + + if (sonypi_device.bluetooth_power == state) return; - + sonypi_call2(0x96, state); sonypi_call1(0x82); sonypi_device.bluetooth_power = state; } +static void input_keyrelease(void *data) +{ + struct input_dev *input_dev; + int key; + + while (1) { + if (kfifo_get(sonypi_device.input_fifo, + (unsigned char *)&input_dev, + sizeof(input_dev)) != sizeof(input_dev)) + return; + if (kfifo_get(sonypi_device.input_fifo, + (unsigned char *)&key, + sizeof(key)) != sizeof(key)) + return; + + msleep(10); + input_report_key(input_dev, key, 0); + input_sync(input_dev); + } +} + /* Interrupt handler: some event is available */ -static irqreturn_t sonypi_irq(int irq, void *dev_id, struct pt_regs *regs) { +static irqreturn_t sonypi_irq(int irq, void *dev_id, struct pt_regs *regs) +{ u8 v1, v2, event = 0; int i, j; @@ -316,9 +354,10 @@ for (i = 0; sonypi_eventtypes[i].model; i++) { if (sonypi_device.model != sonypi_eventtypes[i].model) continue; - if ((v2 & sonypi_eventtypes[i].data) != sonypi_eventtypes[i].data) + if ((v2 & sonypi_eventtypes[i].data) != + sonypi_eventtypes[i].data) continue; - if (! (mask & sonypi_eventtypes[i].mask)) + if (!(mask & sonypi_eventtypes[i].mask)) continue; for (j = 0; sonypi_eventtypes[i].events[j].event; j++) { if (v1 == sonypi_eventtypes[i].events[j].data) { @@ -329,40 +368,75 @@ } if (verbose) - printk(KERN_WARNING - "sonypi: unknown event port1=0x%02x,port2=0x%02x\n",v1,v2); + printk(KERN_WARNING + "sonypi: unknown event port1=0x%02x,port2=0x%02x\n", + v1, v2); /* We need to return IRQ_HANDLED here because there *are* - * events belonging to the sonypi device we don't know about, + * events belonging to the sonypi device we don't know about, * but we still don't want those to pollute the logs... */ return IRQ_HANDLED; found: if (verbose > 1) - printk(KERN_INFO + printk(KERN_INFO "sonypi: event port1=0x%02x,port2=0x%02x\n", v1, v2); -#ifdef SONYPI_USE_INPUT if (useinput) { - struct input_dev *jog_dev = &sonypi_device.jog_dev; - if (event == SONYPI_EVENT_JOGDIAL_PRESSED) - input_report_key(jog_dev, BTN_MIDDLE, 1); - else if (event == SONYPI_EVENT_ANYBUTTON_RELEASED) - input_report_key(jog_dev, BTN_MIDDLE, 0); - else if ((event == SONYPI_EVENT_JOGDIAL_UP) || - (event == SONYPI_EVENT_JOGDIAL_UP_PRESSED)) - input_report_rel(jog_dev, REL_WHEEL, 1); - else if ((event == SONYPI_EVENT_JOGDIAL_DOWN) || - (event == SONYPI_EVENT_JOGDIAL_DOWN_PRESSED)) - input_report_rel(jog_dev, REL_WHEEL, -1); - input_sync(jog_dev); - } -#endif /* SONYPI_USE_INPUT */ - sonypi_pushq(event); + struct input_dev *input_jog_dev = &sonypi_device.input_jog_dev; + struct input_dev *input_key_dev = &sonypi_device.input_key_dev; + switch (event) { + case SONYPI_EVENT_JOGDIAL_UP: + case SONYPI_EVENT_JOGDIAL_UP_PRESSED: + input_report_rel(input_jog_dev, REL_WHEEL, 1); + break; + case SONYPI_EVENT_JOGDIAL_DOWN: + case SONYPI_EVENT_JOGDIAL_DOWN_PRESSED: + input_report_rel(input_jog_dev, REL_WHEEL, -1); + break; + case SONYPI_EVENT_JOGDIAL_PRESSED: { + int key = BTN_MIDDLE; + input_report_key(input_jog_dev, key, 1); + kfifo_put(sonypi_device.input_fifo, + (unsigned char *)&input_jog_dev, + sizeof(input_jog_dev)); + kfifo_put(sonypi_device.input_fifo, + (unsigned char *)&key, sizeof(key)); + break; + } + case SONYPI_EVENT_FNKEY_RELEASED: + /* Nothing, not all VAIOs generate this event */ + break; + } + input_sync(input_jog_dev); + + for (i = 0; sonypi_inputkeys[i].sonypiev; i++) { + int key; + + if (event != sonypi_inputkeys[i].sonypiev) + continue; + + key = sonypi_inputkeys[i].inputev; + input_report_key(input_key_dev, key, 1); + kfifo_put(sonypi_device.input_fifo, + (unsigned char *)&input_key_dev, + sizeof(input_key_dev)); + kfifo_put(sonypi_device.input_fifo, + (unsigned char *)&key, sizeof(key)); + } + input_sync(input_key_dev); + schedule_work(&sonypi_device.input_work); + } + + kfifo_put(sonypi_device.fifo, (unsigned char *)&event, sizeof(event)); + kill_fasync(&sonypi_device.fifo_async, SIGIO, POLL_IN); + wake_up_interruptible(&sonypi_device.fifo_proc_list); + return IRQ_HANDLED; } /* External camera command (exported to the motion eye v4l driver) */ -u8 sonypi_camera_command(int command, u8 value) { +u8 sonypi_camera_command(int command, u8 value) +{ u8 ret = 0; if (!camera) @@ -370,83 +444,87 @@ down(&sonypi_device.lock); - switch(command) { - case SONYPI_COMMAND_GETCAMERA: - ret = sonypi_camera_ready(); - break; - case SONYPI_COMMAND_SETCAMERA: - if (value) - sonypi_camera_on(); - else - sonypi_camera_off(); - break; - case SONYPI_COMMAND_GETCAMERABRIGHTNESS: - ret = sonypi_read(SONYPI_CAMERA_BRIGHTNESS); - break; - case SONYPI_COMMAND_SETCAMERABRIGHTNESS: - sonypi_set(SONYPI_CAMERA_BRIGHTNESS, value); - break; - case SONYPI_COMMAND_GETCAMERACONTRAST: - ret = sonypi_read(SONYPI_CAMERA_CONTRAST); - break; - case SONYPI_COMMAND_SETCAMERACONTRAST: - sonypi_set(SONYPI_CAMERA_CONTRAST, value); - break; - case SONYPI_COMMAND_GETCAMERAHUE: - ret = sonypi_read(SONYPI_CAMERA_HUE); - break; - case SONYPI_COMMAND_SETCAMERAHUE: - sonypi_set(SONYPI_CAMERA_HUE, value); - break; - case SONYPI_COMMAND_GETCAMERACOLOR: - ret = sonypi_read(SONYPI_CAMERA_COLOR); - break; - case SONYPI_COMMAND_SETCAMERACOLOR: - sonypi_set(SONYPI_CAMERA_COLOR, value); - break; - case SONYPI_COMMAND_GETCAMERASHARPNESS: - ret = sonypi_read(SONYPI_CAMERA_SHARPNESS); - break; - case SONYPI_COMMAND_SETCAMERASHARPNESS: - sonypi_set(SONYPI_CAMERA_SHARPNESS, value); - break; - case SONYPI_COMMAND_GETCAMERAPICTURE: - ret = sonypi_read(SONYPI_CAMERA_PICTURE); - break; - case SONYPI_COMMAND_SETCAMERAPICTURE: - sonypi_set(SONYPI_CAMERA_PICTURE, value); - break; - case SONYPI_COMMAND_GETCAMERAAGC: - ret = sonypi_read(SONYPI_CAMERA_AGC); - break; - case SONYPI_COMMAND_SETCAMERAAGC: - sonypi_set(SONYPI_CAMERA_AGC, value); - break; - case SONYPI_COMMAND_GETCAMERADIRECTION: - ret = sonypi_read(SONYPI_CAMERA_STATUS); - ret &= SONYPI_DIRECTION_BACKWARDS; - break; - case SONYPI_COMMAND_GETCAMERAROMVERSION: - ret = sonypi_read(SONYPI_CAMERA_ROMVERSION); - break; - case SONYPI_COMMAND_GETCAMERAREVISION: - ret = sonypi_read(SONYPI_CAMERA_REVISION); - break; + switch (command) { + case SONYPI_COMMAND_GETCAMERA: + ret = sonypi_camera_ready(); + break; + case SONYPI_COMMAND_SETCAMERA: + if (value) + sonypi_camera_on(); + else + sonypi_camera_off(); + break; + case SONYPI_COMMAND_GETCAMERABRIGHTNESS: + ret = sonypi_read(SONYPI_CAMERA_BRIGHTNESS); + break; + case SONYPI_COMMAND_SETCAMERABRIGHTNESS: + sonypi_set(SONYPI_CAMERA_BRIGHTNESS, value); + break; + case SONYPI_COMMAND_GETCAMERACONTRAST: + ret = sonypi_read(SONYPI_CAMERA_CONTRAST); + break; + case SONYPI_COMMAND_SETCAMERACONTRAST: + sonypi_set(SONYPI_CAMERA_CONTRAST, value); + break; + case SONYPI_COMMAND_GETCAMERAHUE: + ret = sonypi_read(SONYPI_CAMERA_HUE); + break; + case SONYPI_COMMAND_SETCAMERAHUE: + sonypi_set(SONYPI_CAMERA_HUE, value); + break; + case SONYPI_COMMAND_GETCAMERACOLOR: + ret = sonypi_read(SONYPI_CAMERA_COLOR); + break; + case SONYPI_COMMAND_SETCAMERACOLOR: + sonypi_set(SONYPI_CAMERA_COLOR, value); + break; + case SONYPI_COMMAND_GETCAMERASHARPNESS: + ret = sonypi_read(SONYPI_CAMERA_SHARPNESS); + break; + case SONYPI_COMMAND_SETCAMERASHARPNESS: + sonypi_set(SONYPI_CAMERA_SHARPNESS, value); + break; + case SONYPI_COMMAND_GETCAMERAPICTURE: + ret = sonypi_read(SONYPI_CAMERA_PICTURE); + break; + case SONYPI_COMMAND_SETCAMERAPICTURE: + sonypi_set(SONYPI_CAMERA_PICTURE, value); + break; + case SONYPI_COMMAND_GETCAMERAAGC: + ret = sonypi_read(SONYPI_CAMERA_AGC); + break; + case SONYPI_COMMAND_SETCAMERAAGC: + sonypi_set(SONYPI_CAMERA_AGC, value); + break; + case SONYPI_COMMAND_GETCAMERADIRECTION: + ret = sonypi_read(SONYPI_CAMERA_STATUS); + ret &= SONYPI_DIRECTION_BACKWARDS; + break; + case SONYPI_COMMAND_GETCAMERAROMVERSION: + ret = sonypi_read(SONYPI_CAMERA_ROMVERSION); + break; + case SONYPI_COMMAND_GETCAMERAREVISION: + ret = sonypi_read(SONYPI_CAMERA_REVISION); + break; } up(&sonypi_device.lock); return ret; } -static int sonypi_misc_fasync(int fd, struct file *filp, int on) { +EXPORT_SYMBOL(sonypi_camera_command); + +static int sonypi_misc_fasync(int fd, struct file *filp, int on) +{ int retval; - retval = fasync_helper(fd, filp, on, &sonypi_device.queue.fasync); + retval = fasync_helper(fd, filp, on, &sonypi_device.fifo_async); if (retval < 0) return retval; return 0; } -static int sonypi_misc_release(struct inode * inode, struct file * file) { +static int sonypi_misc_release(struct inode *inode, struct file *file) +{ sonypi_misc_fasync(-1, file, 0); down(&sonypi_device.lock); sonypi_device.open_count--; @@ -454,59 +532,56 @@ return 0; } -static int sonypi_misc_open(struct inode * inode, struct file * file) { +static int sonypi_misc_open(struct inode *inode, struct file *file) +{ down(&sonypi_device.lock); /* Flush input queue on first open */ if (!sonypi_device.open_count) - sonypi_initq(); + kfifo_reset(sonypi_device.fifo); sonypi_device.open_count++; up(&sonypi_device.lock); return 0; } -static ssize_t sonypi_misc_read(struct file * file, char __user * buf, - size_t count, loff_t *pos) +static ssize_t sonypi_misc_read(struct file *file, char __user *buf, + size_t count, loff_t *pos) { - DECLARE_WAITQUEUE(wait, current); - ssize_t i = count; + ssize_t ret; unsigned char c; - if (sonypi_emptyq()) { - if (file->f_flags & O_NONBLOCK) - return -EAGAIN; - add_wait_queue(&sonypi_device.queue.proc_list, &wait); -repeat: - set_current_state(TASK_INTERRUPTIBLE); - if (sonypi_emptyq() && !signal_pending(current)) { - schedule(); - goto repeat; - } - current->state = TASK_RUNNING; - remove_wait_queue(&sonypi_device.queue.proc_list, &wait); - } - while (i > 0 && !sonypi_emptyq()) { - c = sonypi_pullq(); - put_user(c, buf++); - i--; - } - if (count - i) { - file->f_dentry->d_inode->i_atime = CURRENT_TIME; - return count-i; + if ((kfifo_len(sonypi_device.fifo) == 0) && + (file->f_flags & O_NONBLOCK)) + return -EAGAIN; + + ret = wait_event_interruptible(sonypi_device.fifo_proc_list, + kfifo_len(sonypi_device.fifo) != 0); + if (ret) + return ret; + + while (ret < count && + (kfifo_get(sonypi_device.fifo, &c, sizeof(c)) == sizeof(c))) { + if (put_user(c, buf++)) + return -EFAULT; + ret++; } - if (signal_pending(current)) - return -ERESTARTSYS; - return 0; + + if (ret > 0) + file->f_dentry->d_inode->i_atime = CURRENT_TIME; + + return ret; } -static unsigned int sonypi_misc_poll(struct file *file, poll_table * wait) { - poll_wait(file, &sonypi_device.queue.proc_list, wait); - if (!sonypi_emptyq()) +static unsigned int sonypi_misc_poll(struct file *file, poll_table *wait) +{ + poll_wait(file, &sonypi_device.fifo_proc_list, wait); + if (kfifo_len(sonypi_device.fifo)) return POLLIN | POLLRDNORM; return 0; } -static int sonypi_misc_ioctl(struct inode *ip, struct file *fp, - unsigned int cmd, unsigned long arg) { +static int sonypi_misc_ioctl(struct inode *ip, struct file *fp, + unsigned int cmd, unsigned long arg) +{ int ret = 0; void __user *argp = (void __user *)arg; u8 val8; @@ -601,99 +676,119 @@ }; struct miscdevice sonypi_misc_device = { - -1, "sonypi", &sonypi_misc_fops + .minor = -1, + .name = "sonypi", + .fops = &sonypi_misc_fops, }; -#ifdef CONFIG_PM -static int old_camera_power; - -static int sonypi_suspend(struct sys_device *dev, u32 state) { - sonypi_call2(0x81, 0); /* make sure we don't get any more events */ - if (camera) { - old_camera_power = sonypi_device.camera_power; - sonypi_camera_off(); - } +static void sonypi_enable(unsigned int camera_on) +{ if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2) - sonypi_type2_dis(); + sonypi_type2_srs(); else - sonypi_type1_dis(); - /* disable ACPI mode */ - if (!SONYPI_ACPI_ACTIVE && fnkeyinit) - outb(0xf1, 0xb2); - return 0; -} + sonypi_type1_srs(); + + sonypi_call1(0x82); + sonypi_call2(0x81, 0xff); + sonypi_call1(compat ? 0x92 : 0x82); -static int sonypi_resume(struct sys_device *dev) { /* Enable ACPI mode to get Fn key events */ if (!SONYPI_ACPI_ACTIVE && fnkeyinit) outb(0xf0, 0xb2); + + if (camera && camera_on) + sonypi_camera_on(); +} + +static int sonypi_disable(void) +{ + sonypi_call2(0x81, 0); /* make sure we don't get any more events */ + if (camera) + sonypi_camera_off(); + + /* disable ACPI mode */ + if (!SONYPI_ACPI_ACTIVE && fnkeyinit) + outb(0xf1, 0xb2); + if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2) - sonypi_type2_srs(); - else - sonypi_type1_srs(); - sonypi_call1(0x82); - sonypi_call2(0x81, 0xff); - if (compat) - sonypi_call1(0x92); + sonypi_type2_dis(); else - sonypi_call1(0x82); - if (camera && old_camera_power) - sonypi_camera_on(); + sonypi_type1_dis(); return 0; } -/* Old PM scheme */ -static int sonypi_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data) { +#ifdef CONFIG_PM +static int old_camera_power; - switch (rqst) { - case PM_SUSPEND: - sonypi_suspend(NULL, 0); - break; - case PM_RESUME: - sonypi_resume(NULL); - break; +static int sonypi_suspend(struct device *dev, u32 state, u32 level) +{ + if (level == SUSPEND_DISABLE) { + old_camera_power = sonypi_device.camera_power; + sonypi_disable(); } return 0; } -/* New PM scheme (device model) */ -static struct sysdev_class sonypi_sysclass = { - set_kset_name("sonypi"), - .suspend = sonypi_suspend, - .resume = sonypi_resume, -}; +static int sonypi_resume(struct device *dev, u32 level) +{ + if (level == RESUME_ENABLE) + sonypi_enable(old_camera_power); + return 0; +} +#endif -static struct sys_device sonypi_sysdev = { - .id = 0, - .cls = &sonypi_sysclass, -}; +static void sonypi_shutdown(struct device *dev) +{ + sonypi_disable(); +} + +static struct device_driver sonypi_driver = { + .name = "sonypi", + .bus = &platform_bus_type, +#ifdef CONFIG_PM + .suspend = sonypi_suspend, + .resume = sonypi_resume, #endif + .shutdown = sonypi_shutdown, +}; -static int __devinit sonypi_probe(struct pci_dev *pcidev) { +static int __devinit sonypi_probe(void) +{ int i, ret; struct sonypi_ioport_list *ioport_list; struct sonypi_irq_list *irq_list; + struct pci_dev *pcidev; + + pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, + PCI_DEVICE_ID_INTEL_82371AB_3, NULL); sonypi_device.dev = pcidev; - if (pcidev) - sonypi_device.model = SONYPI_DEVICE_MODEL_TYPE1; - else - sonypi_device.model = SONYPI_DEVICE_MODEL_TYPE2; - sonypi_initq(); + sonypi_device.model = pcidev ? + SONYPI_DEVICE_MODEL_TYPE1 : SONYPI_DEVICE_MODEL_TYPE2; + + sonypi_device.fifo_lock = SPIN_LOCK_UNLOCKED; + sonypi_device.fifo = kfifo_alloc(SONYPI_BUF_SIZE, GFP_KERNEL, + &sonypi_device.fifo_lock); + if (IS_ERR(sonypi_device.fifo)) { + printk(KERN_ERR "sonypi: kfifo_alloc failed\n"); + ret = PTR_ERR(sonypi_device.fifo); + goto out_fifo; + } + + init_waitqueue_head(&sonypi_device.fifo_proc_list); init_MUTEX(&sonypi_device.lock); - sonypi_device.bluetooth_power = 0; - + sonypi_device.bluetooth_power = -1; + if (pcidev && pci_enable_device(pcidev)) { printk(KERN_ERR "sonypi: pci_enable_device failed\n"); ret = -EIO; - goto out1; + goto out_pcienable; } - sonypi_misc_device.minor = (minor == -1) ? - MISC_DYNAMIC_MINOR : minor; + sonypi_misc_device.minor = (minor == -1) ? MISC_DYNAMIC_MINOR : minor; if ((ret = misc_register(&sonypi_misc_device))) { printk(KERN_ERR "sonypi: misc_register failed\n"); - goto out1; + goto out_miscreg; } if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2) { @@ -701,8 +796,7 @@ sonypi_device.region_size = SONYPI_TYPE2_REGION_SIZE; sonypi_device.evtype_offset = SONYPI_TYPE2_EVTYPE_OFFSET; irq_list = sonypi_type2_irq_list; - } - else { + } else { ioport_list = sonypi_type1_ioport_list; sonypi_device.region_size = SONYPI_TYPE1_REGION_SIZE; sonypi_device.evtype_offset = SONYPI_TYPE1_EVTYPE_OFFSET; @@ -710,8 +804,8 @@ } for (i = 0; ioport_list[i].port1; i++) { - if (request_region(ioport_list[i].port1, - sonypi_device.region_size, + if (request_region(ioport_list[i].port1, + sonypi_device.region_size, "Sony Programable I/O Device")) { /* get the ioport */ sonypi_device.ioport1 = ioport_list[i].port1; @@ -722,7 +816,7 @@ if (!sonypi_device.ioport1) { printk(KERN_ERR "sonypi: request_region failed\n"); ret = -ENODEV; - goto out2; + goto out_reqreg; } for (i = 0; irq_list[i].irq; i++) { @@ -730,59 +824,85 @@ sonypi_device.irq = irq_list[i].irq; sonypi_device.bits = irq_list[i].bits; - /* Enable sonypi IRQ settings */ - if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2) - sonypi_type2_srs(); - else - sonypi_type1_srs(); - - sonypi_call1(0x82); - sonypi_call2(0x81, 0xff); - if (compat) - sonypi_call1(0x92); - else - sonypi_call1(0x82); - - /* Now try requesting the irq from the system */ - if (!request_irq(sonypi_device.irq, sonypi_irq, + if (!request_irq(sonypi_device.irq, sonypi_irq, SA_SHIRQ, "sonypi", sonypi_irq)) break; - - /* If request_irq failed, disable sonypi IRQ settings */ - if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2) - sonypi_type2_dis(); - else - sonypi_type1_dis(); } if (!irq_list[i].irq) { printk(KERN_ERR "sonypi: request_irq failed\n"); ret = -ENODEV; - goto out3; + goto out_reqirq; } -#ifdef CONFIG_PM - sonypi_device.pm = pm_register(PM_PCI_DEV, 0, sonypi_pm_callback); - - if (sysdev_class_register(&sonypi_sysclass) != 0) { - printk(KERN_ERR "sonypi: sysdev_class_register failed\n"); - ret = -ENODEV; - goto out4; - } - if (sysdev_register(&sonypi_sysdev) != 0) { - printk(KERN_ERR "sonypi: sysdev_register failed\n"); - ret = -ENODEV; - goto out5; + if (useinput) { + /* Initialize the Input Drivers: jogdial */ + int i; + sonypi_device.input_jog_dev.evbit[0] = + BIT(EV_KEY) | BIT(EV_REL); + sonypi_device.input_jog_dev.keybit[LONG(BTN_MOUSE)] = + BIT(BTN_MIDDLE); + sonypi_device.input_jog_dev.relbit[0] = BIT(REL_WHEEL); + sonypi_device.input_jog_dev.name = + kmalloc(sizeof(SONYPI_JOG_INPUTNAME), GFP_KERNEL); + if (!sonypi_device.input_jog_dev.name) { + printk(KERN_ERR "sonypi: kmalloc failed\n"); + ret = -ENOMEM; + goto out_inkmallocinput1; + } + sprintf(sonypi_device.input_jog_dev.name, SONYPI_JOG_INPUTNAME); + sonypi_device.input_jog_dev.id.bustype = BUS_ISA; + sonypi_device.input_jog_dev.id.vendor = PCI_VENDOR_ID_SONY; + + input_register_device(&sonypi_device.input_jog_dev); + printk(KERN_INFO "%s input method installed.\n", + sonypi_device.input_jog_dev.name); + + /* Initialize the Input Drivers: special keys */ + sonypi_device.input_key_dev.evbit[0] = BIT(EV_KEY); + for (i = 0; sonypi_inputkeys[i].sonypiev; i++) + if (sonypi_inputkeys[i].inputev) + set_bit(sonypi_inputkeys[i].inputev, + sonypi_device.input_key_dev.keybit); + sonypi_device.input_key_dev.name = + kmalloc(sizeof(SONYPI_KEY_INPUTNAME), GFP_KERNEL); + if (!sonypi_device.input_key_dev.name) { + printk(KERN_ERR "sonypi: kmalloc failed\n"); + ret = -ENOMEM; + goto out_inkmallocinput2; + } + sprintf(sonypi_device.input_key_dev.name, SONYPI_KEY_INPUTNAME); + sonypi_device.input_key_dev.id.bustype = BUS_ISA; + sonypi_device.input_key_dev.id.vendor = PCI_VENDOR_ID_SONY; + + input_register_device(&sonypi_device.input_key_dev); + printk(KERN_INFO "%s input method installed.\n", + sonypi_device.input_key_dev.name); + + sonypi_device.input_fifo_lock = SPIN_LOCK_UNLOCKED; + sonypi_device.input_fifo = + kfifo_alloc(SONYPI_BUF_SIZE, GFP_KERNEL, + &sonypi_device.input_fifo_lock); + if (IS_ERR(sonypi_device.input_fifo)) { + printk(KERN_ERR "sonypi: kfifo_alloc failed\n"); + ret = PTR_ERR(sonypi_device.input_fifo); + goto out_infifo; + } + + INIT_WORK(&sonypi_device.input_work, input_keyrelease, NULL); + } + + sonypi_device.pdev = platform_device_register_simple("sonypi", -1, + NULL, 0); + if (IS_ERR(sonypi_device.pdev)) { + ret = PTR_ERR(sonypi_device.pdev); + goto out_platformdev; } -#endif - /* Enable ACPI mode to get Fn key events */ - if (!SONYPI_ACPI_ACTIVE && fnkeyinit) - outb(0xf0, 0xb2); + sonypi_enable(0); - printk(KERN_INFO "sonypi: Sony Programmable I/O Controller Driver v%d.%d.\n", - SONYPI_DRIVER_MAJORVERSION, - SONYPI_DRIVER_MINORVERSION); + printk(KERN_INFO "sonypi: Sony Programmable I/O Controller Driver" + "v%s.\n", SONYPI_DRIVER_VERSION); printk(KERN_INFO "sonypi: detected %s model, " "verbose = %d, fnkeyinit = %s, camera = %s, " "compat = %s, mask = 0x%08lx, useinput = %s, acpi = %s\n", @@ -796,76 +916,60 @@ useinput ? "on" : "off", SONYPI_ACPI_ACTIVE ? "on" : "off"); printk(KERN_INFO "sonypi: enabled at irq=%d, port1=0x%x, port2=0x%x\n", - sonypi_device.irq, + sonypi_device.irq, sonypi_device.ioport1, sonypi_device.ioport2); if (minor == -1) printk(KERN_INFO "sonypi: device allocated minor is %d\n", sonypi_misc_device.minor); -#ifdef SONYPI_USE_INPUT - if (useinput) { - /* Initialize the Input Drivers: */ - sonypi_device.jog_dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REL); - sonypi_device.jog_dev.keybit[LONG(BTN_MOUSE)] = BIT(BTN_MIDDLE); - sonypi_device.jog_dev.relbit[0] = BIT(REL_WHEEL); - sonypi_device.jog_dev.name = (char *) kmalloc( - sizeof(SONYPI_INPUTNAME), GFP_KERNEL); - sprintf(sonypi_device.jog_dev.name, SONYPI_INPUTNAME); - sonypi_device.jog_dev.id.bustype = BUS_ISA; - sonypi_device.jog_dev.id.vendor = PCI_VENDOR_ID_SONY; - - input_register_device(&sonypi_device.jog_dev); - printk(KERN_INFO "%s installed.\n", sonypi_device.jog_dev.name); - } -#endif /* SONYPI_USE_INPUT */ - return 0; -#ifdef CONFIG_PM -out5: - sysdev_class_unregister(&sonypi_sysclass); -out4: +out_platformdev: + kfifo_free(sonypi_device.input_fifo); +out_infifo: + input_unregister_device(&sonypi_device.input_key_dev); + kfree(sonypi_device.input_key_dev.name); +out_inkmallocinput2: + input_unregister_device(&sonypi_device.input_jog_dev); + kfree(sonypi_device.input_jog_dev.name); +out_inkmallocinput1: free_irq(sonypi_device.irq, sonypi_irq); -#endif -out3: +out_reqirq: release_region(sonypi_device.ioport1, sonypi_device.region_size); -out2: +out_reqreg: misc_deregister(&sonypi_misc_device); -out1: +out_miscreg: + if (pcidev) + pci_disable_device(pcidev); +out_pcienable: + kfifo_free(sonypi_device.fifo); +out_fifo: + pci_dev_put(sonypi_device.dev); return ret; } -static void __devexit sonypi_remove(void) { - -#ifdef CONFIG_PM - pm_unregister(sonypi_device.pm); +static void __devexit sonypi_remove(void) +{ + sonypi_disable(); - sysdev_unregister(&sonypi_sysdev); - sysdev_class_unregister(&sonypi_sysclass); -#endif + platform_device_unregister(sonypi_device.pdev); - sonypi_call2(0x81, 0); /* make sure we don't get any more events */ - -#ifdef SONYPI_USE_INPUT if (useinput) { - input_unregister_device(&sonypi_device.jog_dev); - kfree(sonypi_device.jog_dev.name); + input_unregister_device(&sonypi_device.input_key_dev); + kfree(sonypi_device.input_key_dev.name); + input_unregister_device(&sonypi_device.input_jog_dev); + kfree(sonypi_device.input_jog_dev.name); + kfifo_free(sonypi_device.input_fifo); } -#endif /* SONYPI_USE_INPUT */ - if (camera) - sonypi_camera_off(); - if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2) - sonypi_type2_dis(); - else - sonypi_type1_dis(); - /* disable ACPI mode */ - if (!SONYPI_ACPI_ACTIVE && fnkeyinit) - outb(0xf1, 0xb2); free_irq(sonypi_device.irq, sonypi_irq); release_region(sonypi_device.ioport1, sonypi_device.region_size); misc_deregister(&sonypi_misc_device); + if (sonypi_device.dev) + pci_disable_device(sonypi_device.dev); + kfifo_free(sonypi_device.fifo); + pci_dev_put(sonypi_device.dev); printk(KERN_INFO "sonypi: removed.\n"); } @@ -887,78 +991,29 @@ { } }; -static int __init sonypi_init_module(void) +static int __init sonypi_init(void) { - struct pci_dev *pcidev = NULL; - if (dmi_check_system(sonypi_dmi_table)) { - pcidev = pci_find_device(PCI_VENDOR_ID_INTEL, - PCI_DEVICE_ID_INTEL_82371AB_3, - NULL); - return sonypi_probe(pcidev); - } - else + int ret; + + if (!dmi_check_system(sonypi_dmi_table)) return -ENODEV; + + ret = driver_register(&sonypi_driver); + if (ret) + return ret; + + ret = sonypi_probe(); + if (ret) + driver_unregister(&sonypi_driver); + + return ret; } -static void __exit sonypi_cleanup_module(void) { +static void __exit sonypi_exit(void) +{ + driver_unregister(&sonypi_driver); sonypi_remove(); } -#ifndef MODULE -static int __init sonypi_setup(char *str) { - int ints[8]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - if (ints[0] <= 0) - goto out; - minor = ints[1]; - if (ints[0] == 1) - goto out; - verbose = ints[2]; - if (ints[0] == 2) - goto out; - fnkeyinit = ints[3]; - if (ints[0] == 3) - goto out; - camera = ints[4]; - if (ints[0] == 4) - goto out; - compat = ints[5]; - if (ints[0] == 5) - goto out; - mask = ints[6]; - if (ints[0] == 6) - goto out; - useinput = ints[7]; -out: - return 1; -} - -__setup("sonypi=", sonypi_setup); -#endif /* !MODULE */ - -/* Module entry points */ -module_init(sonypi_init_module); -module_exit(sonypi_cleanup_module); - -MODULE_AUTHOR("Stelian Pop "); -MODULE_DESCRIPTION("Sony Programmable I/O Control Device driver"); -MODULE_LICENSE("GPL"); - - -MODULE_PARM(minor,"i"); -MODULE_PARM_DESC(minor, "minor number of the misc device, default is -1 (automatic)"); -MODULE_PARM(verbose,"i"); -MODULE_PARM_DESC(verbose, "be verbose, default is 0 (no)"); -MODULE_PARM(fnkeyinit,"i"); -MODULE_PARM_DESC(fnkeyinit, "set this if your Fn keys do not generate any event"); -MODULE_PARM(camera,"i"); -MODULE_PARM_DESC(camera, "set this if you have a MotionEye camera (PictureBook series)"); -MODULE_PARM(compat,"i"); -MODULE_PARM_DESC(compat, "set this if you want to enable backward compatibility mode"); -MODULE_PARM(mask, "i"); -MODULE_PARM_DESC(mask, "set this to the mask of event you want to enable (see doc)"); -MODULE_PARM(useinput, "i"); -MODULE_PARM_DESC(useinput, "if you have a jogdial, set this if you would like it to use the modern Linux Input Driver system"); - -EXPORT_SYMBOL(sonypi_camera_command); +module_init(sonypi_init); +module_exit(sonypi_exit); diff -Nru a/drivers/char/sonypi.h b/drivers/char/sonypi.h --- a/drivers/char/sonypi.h 2004-11-10 17:19:05 -08:00 +++ b/drivers/char/sonypi.h 2004-11-10 17:19:05 -08:00 @@ -1,7 +1,7 @@ -/* +/* * Sony Programmable I/O Control Device driver for VAIO * - * Copyright (C) 2001-2003 Stelian Pop + * Copyright (C) 2001-2004 Stelian Pop * * Copyright (C) 2001-2002 Alcôve * @@ -14,30 +14,29 @@ * Copyright (C) 2000 Andrew Tridgell * * Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras. - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ -#ifndef _SONYPI_PRIV_H_ +#ifndef _SONYPI_PRIV_H_ #define _SONYPI_PRIV_H_ #ifdef __KERNEL__ -#define SONYPI_DRIVER_MAJORVERSION 1 -#define SONYPI_DRIVER_MINORVERSION 23 +#define SONYPI_DRIVER_VERSION "1.24" #define SONYPI_DEVICE_MODEL_TYPE1 1 #define SONYPI_DEVICE_MODEL_TYPE2 2 @@ -46,9 +45,9 @@ #include #include #include -#include #include -#include "linux/sonypi.h" +#include +#include /* type1 models use those */ #define SONYPI_IRQ_PORT 0x8034 @@ -223,6 +222,7 @@ { 0x1a, SONYPI_EVENT_FNKEY_F10 }, { 0x1b, SONYPI_EVENT_FNKEY_F11 }, { 0x1c, SONYPI_EVENT_FNKEY_F12 }, + { 0x1f, SONYPI_EVENT_FNKEY_RELEASED }, { 0x21, SONYPI_EVENT_FNKEY_1 }, { 0x22, SONYPI_EVENT_FNKEY_2 }, { 0x31, SONYPI_EVENT_FNKEY_D }, @@ -340,30 +340,53 @@ }; #define SONYPI_BUF_SIZE 128 -struct sonypi_queue { - unsigned long head; - unsigned long tail; - unsigned long len; - spinlock_t s_lock; - wait_queue_head_t proc_list; - struct fasync_struct *fasync; - unsigned char buf[SONYPI_BUF_SIZE]; -}; - -/* We enable input subsystem event forwarding if the input - * subsystem is compiled in, but only if sonypi is not into the - * kernel and input as a module... */ -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) -#if ! (defined(CONFIG_SONYPI) && defined(CONFIG_INPUT_MODULE)) -#define SONYPI_USE_INPUT -#endif -#endif -/* The name of the Jog Dial for the input device drivers */ -#define SONYPI_INPUTNAME "Sony VAIO Jog Dial" +/* The name of the devices for the input device drivers */ +#define SONYPI_JOG_INPUTNAME "Sony Vaio Jogdial" +#define SONYPI_KEY_INPUTNAME "Sony Vaio Keys" + +/* Correspondance table between sonypi events and input layer events */ +struct { + int sonypiev; + int inputev; +} sonypi_inputkeys[] = { + { SONYPI_EVENT_CAPTURE_PRESSED, KEY_CAMERA }, + { SONYPI_EVENT_FNKEY_ONLY, KEY_FN }, + { SONYPI_EVENT_FNKEY_ESC, KEY_FN_ESC }, + { SONYPI_EVENT_FNKEY_F1, KEY_FN_F1 }, + { SONYPI_EVENT_FNKEY_F2, KEY_FN_F2 }, + { SONYPI_EVENT_FNKEY_F3, KEY_FN_F3 }, + { SONYPI_EVENT_FNKEY_F4, KEY_FN_F4 }, + { SONYPI_EVENT_FNKEY_F5, KEY_FN_F5 }, + { SONYPI_EVENT_FNKEY_F6, KEY_FN_F6 }, + { SONYPI_EVENT_FNKEY_F7, KEY_FN_F7 }, + { SONYPI_EVENT_FNKEY_F8, KEY_FN_F8 }, + { SONYPI_EVENT_FNKEY_F9, KEY_FN_F9 }, + { SONYPI_EVENT_FNKEY_F10, KEY_FN_F10 }, + { SONYPI_EVENT_FNKEY_F11, KEY_FN_F11 }, + { SONYPI_EVENT_FNKEY_F12, KEY_FN_F12 }, + { SONYPI_EVENT_FNKEY_1, KEY_FN_1 }, + { SONYPI_EVENT_FNKEY_2, KEY_FN_2 }, + { SONYPI_EVENT_FNKEY_D, KEY_FN_D }, + { SONYPI_EVENT_FNKEY_E, KEY_FN_E }, + { SONYPI_EVENT_FNKEY_F, KEY_FN_F }, + { SONYPI_EVENT_FNKEY_S, KEY_FN_S }, + { SONYPI_EVENT_FNKEY_B, KEY_FN_B }, + { SONYPI_EVENT_BLUETOOTH_PRESSED, KEY_BLUE }, + { SONYPI_EVENT_BLUETOOTH_ON, KEY_BLUE }, + { SONYPI_EVENT_PKEY_P1, KEY_PROG1 }, + { SONYPI_EVENT_PKEY_P2, KEY_PROG2 }, + { SONYPI_EVENT_PKEY_P3, KEY_PROG3 }, + { SONYPI_EVENT_BACK_PRESSED, KEY_BACK }, + { SONYPI_EVENT_HELP_PRESSED, KEY_HELP }, + { SONYPI_EVENT_ZOOM_PRESSED, KEY_ZOOM }, + { SONYPI_EVENT_THUMBPHRASE_PRESSED, BTN_THUMB }, + { 0, 0 }, +}; struct sonypi_device { struct pci_dev *dev; + struct platform_device *pdev; u16 irq; u16 bits; u16 ioport1; @@ -373,15 +396,17 @@ int camera_power; int bluetooth_power; struct semaphore lock; - struct sonypi_queue queue; + struct kfifo *fifo; + spinlock_t fifo_lock; + wait_queue_head_t fifo_proc_list; + struct fasync_struct *fifo_async; int open_count; int model; -#ifdef SONYPI_USE_INPUT - struct input_dev jog_dev; -#endif -#ifdef CONFIG_PM - struct pm_dev *pm; -#endif + struct input_dev input_jog_dev; + struct input_dev input_key_dev; + struct work_struct input_work; + struct kfifo *input_fifo; + spinlock_t input_fifo_lock; }; #define ITERATIONS_LONG 10000 @@ -399,37 +424,8 @@ #define SONYPI_ACPI_ACTIVE (!acpi_disabled) #else #define SONYPI_ACPI_ACTIVE 0 -#endif /* CONFIG_ACPI */ - -static inline int sonypi_ec_write(u8 addr, u8 value) { -#ifdef CONFIG_ACPI_EC - if (SONYPI_ACPI_ACTIVE) - return ec_write(addr, value); -#endif - wait_on_command(1, inb_p(SONYPI_CST_IOPORT) & 3, ITERATIONS_LONG); - outb_p(0x81, SONYPI_CST_IOPORT); - wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); - outb_p(addr, SONYPI_DATA_IOPORT); - wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); - outb_p(value, SONYPI_DATA_IOPORT); - wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); - return 0; -} - -static inline int sonypi_ec_read(u8 addr, u8 *value) { -#ifdef CONFIG_ACPI_EC - if (SONYPI_ACPI_ACTIVE) - return ec_read(addr, value); -#endif - wait_on_command(1, inb_p(SONYPI_CST_IOPORT) & 3, ITERATIONS_LONG); - outb_p(0x80, SONYPI_CST_IOPORT); - wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); - outb_p(addr, SONYPI_DATA_IOPORT); - wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG); - *value = inb_p(SONYPI_DATA_IOPORT); - return 0; -} +#endif /* CONFIG_ACPI */ -#endif /* __KERNEL__ */ +#endif /* __KERNEL__ */ -#endif /* _SONYPI_PRIV_H_ */ +#endif /* _SONYPI_PRIV_H_ */ diff -Nru a/drivers/char/synclink.c b/drivers/char/synclink.c --- a/drivers/char/synclink.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/char/synclink.c 2004-11-10 17:19:04 -08:00 @@ -8089,9 +8089,7 @@ memcpy(skb_put(skb, size),buf,size); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - skb->protocol = hdlc_type_trans(skb, skb->dev); + skb->protocol = hdlc_type_trans(skb, info->netdev); stats->rx_packets++; stats->rx_bytes += size; diff -Nru a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c --- a/drivers/char/synclinkmp.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/char/synclinkmp.c 2004-11-10 17:19:03 -08:00 @@ -1954,9 +1954,7 @@ memcpy(skb_put(skb, size),buf,size); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - skb->protocol = hdlc_type_trans(skb, skb->dev); + skb->protocol = hdlc_type_trans(skb, info->netdev); stats->rx_packets++; stats->rx_bytes += size; diff -Nru a/drivers/char/sysrq.c b/drivers/char/sysrq.c --- a/drivers/char/sysrq.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/char/sysrq.c 2004-11-10 17:19:06 -08:00 @@ -216,6 +216,16 @@ /* END SIGNAL SYSRQ HANDLERS BLOCK */ +static void sysrq_handle_unrt(int key, struct pt_regs *pt_regs, + struct tty_struct *tty) +{ + normalize_rt_tasks(); +} +static struct sysrq_key_op sysrq_unrt_op = { + .handler = sysrq_handle_unrt, + .help_msg = "Nice", + .action_msg = "Nice All RT Tasks" +}; /* Key Operations table and lock */ static spinlock_t sysrq_key_table_lock = SPIN_LOCK_UNLOCKED; @@ -250,7 +260,7 @@ #endif /* l */ NULL, /* m */ &sysrq_showmem_op, -/* n */ NULL, +/* n */ &sysrq_unrt_op, /* o */ NULL, /* This will often be registered as 'Off' at init time */ /* p */ &sysrq_showregs_op, @@ -284,14 +294,6 @@ } /* - * table lock and unlocking functions, exposed to modules - */ - -void __sysrq_lock_table (void) { spin_lock(&sysrq_key_table_lock); } - -void __sysrq_unlock_table (void) { spin_unlock(&sysrq_key_table_lock); } - -/* * get and put functions for the table, exposed to modules. */ @@ -323,8 +325,9 @@ struct sysrq_key_op *op_p; int orig_log_level; int i, j; + unsigned long flags; - __sysrq_lock_table(); + spin_lock_irqsave(&sysrq_key_table_lock, flags); orig_log_level = console_loglevel; console_loglevel = 7; printk(KERN_INFO "SysRq : "); @@ -346,7 +349,7 @@ printk ("\n"); console_loglevel = orig_log_level; } - __sysrq_unlock_table(); + spin_unlock_irqrestore(&sysrq_key_table_lock, flags); } /* @@ -361,8 +364,34 @@ __handle_sysrq(key, pt_regs, tty); } +int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p, + struct sysrq_key_op *remove_op_p) { + + int retval; + unsigned long flags; + + spin_lock_irqsave(&sysrq_key_table_lock, flags); + if (__sysrq_get_key_op(key) == remove_op_p) { + __sysrq_put_key_op(key, insert_op_p); + retval = 0; + } else { + retval = -1; + } + spin_unlock_irqrestore(&sysrq_key_table_lock, flags); + + return retval; +} + +int register_sysrq_key(int key, struct sysrq_key_op *op_p) +{ + return __sysrq_swap_key_ops(key, op_p, NULL); +} + +int unregister_sysrq_key(int key, struct sysrq_key_op *op_p) +{ + return __sysrq_swap_key_ops(key, NULL, op_p); +} + EXPORT_SYMBOL(handle_sysrq); -EXPORT_SYMBOL(__sysrq_lock_table); -EXPORT_SYMBOL(__sysrq_unlock_table); -EXPORT_SYMBOL(__sysrq_get_key_op); -EXPORT_SYMBOL(__sysrq_put_key_op); +EXPORT_SYMBOL(register_sysrq_key); +EXPORT_SYMBOL(unregister_sysrq_key); diff -Nru a/drivers/char/tty_io.c b/drivers/char/tty_io.c --- a/drivers/char/tty_io.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/char/tty_io.c 2004-11-10 17:19:05 -08:00 @@ -168,8 +168,7 @@ static inline void free_tty_struct(struct tty_struct *tty) { - if (tty->write_buf) - kfree(tty->write_buf); + kfree(tty->write_buf); kfree(tty); } @@ -1060,6 +1059,7 @@ up(&tty->atomic_write); return -ENOMEM; } + kfree(tty->write_buf); tty->write_cnt = chunk; tty->write_buf = buf; } @@ -2148,11 +2148,11 @@ static int send_break(struct tty_struct *tty, int duration) { - set_current_state(TASK_INTERRUPTIBLE); - tty->driver->break_ctl(tty, -1); - if (!signal_pending(current)) + if (!signal_pending(current)) { + set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(duration); + } tty->driver->break_ctl(tty, 0); if (signal_pending(current)) return -EINTR; diff -Nru a/drivers/char/viocons.c b/drivers/char/viocons.c --- a/drivers/char/viocons.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/char/viocons.c 2004-11-10 17:19:02 -08:00 @@ -83,15 +83,6 @@ u8 data[VIOCHAR_MAX_DATA]; }; -/* - * This is a place where we handle the distribution of memory - * for copy_from_user() calls. The buffer_available array is to - * help us determine which buffer to use. - */ -#define VIOCHAR_NUM_CFU_BUFFERS 7 -static struct viocharlpevent viocons_cfu_buffer[VIOCHAR_NUM_CFU_BUFFERS]; -static atomic_t viocons_cfu_buffer_available[VIOCHAR_NUM_CFU_BUFFERS]; - #define VIOCHAR_WINDOW 10 #define VIOCHAR_HIGHWATERMARK 3 @@ -207,50 +198,6 @@ } /* - * This function should ONLY be called once from viocons_init2 - */ -static void viocons_init_cfu_buffer(void) -{ - int i; - - for (i = 1; i < VIOCHAR_NUM_CFU_BUFFERS; i++) - atomic_set(&viocons_cfu_buffer_available[i], 1); -} - -static struct viocharlpevent *viocons_get_cfu_buffer(void) -{ - int i; - - /* - * Grab the first available buffer. It doesn't matter if we - * are interrupted during this array traversal as long as we - * get an available space. - */ - for (i = 0; i < VIOCHAR_NUM_CFU_BUFFERS; i++) - if (atomic_dec_if_positive(&viocons_cfu_buffer_available[i]) - == 0 ) - return &viocons_cfu_buffer[i]; - hvlog("\n\rviocons: viocons_get_cfu_buffer : no free buffers found"); - return NULL; -} - -static void viocons_free_cfu_buffer(struct viocharlpevent *buffer) -{ - int i; - - i = buffer - &viocons_cfu_buffer[0]; - if (i >= (sizeof(viocons_cfu_buffer) / sizeof(viocons_cfu_buffer[0]))) { - hvlog("\n\rviocons: viocons_free_cfu_buffer : buffer pointer not found in list."); - return; - } - if (atomic_read(&viocons_cfu_buffer_available[i]) != 0) { - hvlog("\n\rviocons: WARNING : returning unallocated cfu buffer."); - return; - } - atomic_set(&viocons_cfu_buffer_available[i], 1); -} - -/* * Add data to our pending-send buffers. * * NOTE: Don't use printk in here because it gets nastily recursive. @@ -438,15 +385,14 @@ * NOTE: Don't use printk in here because it gets nastily recursive. hvlog * can be used to log to the hypervisor buffer */ -static int internal_write(struct port_info *pi, const char *buf, - size_t len, struct viocharlpevent *viochar) +static int internal_write(struct port_info *pi, const char *buf, size_t len) { HvLpEvent_Rc hvrc; size_t bleft; size_t curlen; const char *curbuf; unsigned long flags; - int copy_needed = (viochar == NULL); + struct viocharlpevent *viochar; /* * Write to the hvlog of inbound data are now done prior to @@ -462,25 +408,13 @@ spin_lock_irqsave(&consolelock, flags); - /* - * If the internal_write() was passed a pointer to a - * viocharlpevent then we don't need to allocate a new one - * (this is the case where we are internal_writing user space - * data). If we aren't writing user space data then we need - * to get an event from viopath. - */ - if (copy_needed) { - /* This one is fetched from the viopath data structure */ - viochar = (struct viocharlpevent *) - vio_get_event_buffer(viomajorsubtype_chario); - /* Make sure we got a buffer */ - if (viochar == NULL) { - spin_unlock_irqrestore(&consolelock, flags); - hvlog("\n\rviocons: Can't get viochar buffer in internal_write()."); - return -EAGAIN; - } - initDataEvent(viochar, pi->lp); + viochar = vio_get_event_buffer(viomajorsubtype_chario); + if (viochar == NULL) { + spin_unlock_irqrestore(&consolelock, flags); + hvlog("\n\rviocons: Can't get vio buffer in internal_write()."); + return -EAGAIN; } + initDataEvent(viochar, pi->lp); curbuf = buf; bleft = len; @@ -493,25 +427,16 @@ curlen = bleft; viochar->event.xCorrelationToken = pi->seq++; - - if (copy_needed) { - memcpy(viochar->data, curbuf, curlen); - viochar->len = curlen; - } - + memcpy(viochar->data, curbuf, curlen); + viochar->len = curlen; viochar->event.xSizeMinus1 = offsetof(struct viocharlpevent, data) + curlen; hvrc = HvCallEvent_signalLpEvent(&viochar->event); if (hvrc) { - spin_unlock_irqrestore(&consolelock, flags); - if (copy_needed) - vio_free_event_buffer(viomajorsubtype_chario, viochar); - hvlog("viocons: error sending event! %d\n", (int)hvrc); - return len - bleft; + goto out; } - curbuf += curlen; bleft -= curlen; } @@ -519,14 +444,9 @@ /* If we didn't send it all, buffer as much of it as we can. */ if (bleft > 0) bleft -= buffer_add(pi, curbuf, bleft); - /* - * Since we grabbed it from the viopath data structure, return - * it to the data structure. - */ - if (copy_needed) - vio_free_event_buffer(viomajorsubtype_chario, viochar); +out: + vio_free_event_buffer(viomajorsubtype_chario, viochar); spin_unlock_irqrestore(&consolelock, flags); - return len - bleft; } @@ -603,18 +523,8 @@ hvlogOutput(s, count); - if (!viopath_isactive(pi->lp)) { - /* - * This is a VERY noisy trace message in the case where the - * path manager is not active or in the case where this - * function is called prior to viocons initialization. It is - * being commented out for the sake of a clear trace buffer. - */ -#if 0 - hvlog("\n\rviocons_write: path not active to lp %d", pi->lp); -#endif + if (!viopath_isactive(pi->lp)) return; - } /* * Any newline character found will cause a @@ -627,17 +537,16 @@ * Newline found. Print everything up to and * including the newline */ - internal_write(pi, &s[begin], index - begin + 1, - NULL); + internal_write(pi, &s[begin], index - begin + 1); begin = index + 1; /* Emit a carriage return as well */ - internal_write(pi, &cr, 1, NULL); + internal_write(pi, &cr, 1); } } /* If any characters left to write, write them now */ if ((index - begin) > 0) - internal_write(pi, &s[begin], index - begin, NULL); + internal_write(pi, &s[begin], index - begin); } /* @@ -721,11 +630,9 @@ /* * TTY Write method */ -static int viotty_write(struct tty_struct *tty, - const unsigned char *buf, int count) +static int viotty_write(struct tty_struct *tty, const unsigned char *buf, + int count) { - int ret; - int total = 0; struct port_info *pi; pi = get_port_data(tty); @@ -746,16 +653,10 @@ * viotty_write call and, since the viopath isn't active to this * partition, return count. */ - if (!viopath_isactive(pi->lp)) { - /* Noisy trace. Commented unless needed. */ -#if 0 - hvlog("\n\rviotty_write: viopath NOT active for lp %d.",pi->lp); -#endif + if (!viopath_isactive(pi->lp)) return count; - } - total = internal_write(pi, buf, count, NULL); - return total; + return internal_write(pi, buf, count); } /* @@ -774,7 +675,7 @@ hvlogOutput(&ch, 1); if (viopath_isactive(pi->lp)) - internal_write(pi, &ch, 1, NULL); + internal_write(pi, &ch, 1); } /* @@ -883,7 +784,7 @@ atomic_set(aptr, 1); } else printk(VIOCONS_KERN_WARN - "wierd...got open ack without atomic\n"); + "weird...got open ack without atomic\n"); return; } @@ -1269,8 +1170,6 @@ put_tty_driver(viotty_driver); viotty_driver = NULL; } - - viocons_init_cfu_buffer(); unregister_console(&viocons_early); register_console(&viocons); diff -Nru a/drivers/char/viotape.c b/drivers/char/viotape.c --- a/drivers/char/viotape.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/char/viotape.c 2004-11-10 17:19:06 -08:00 @@ -938,7 +938,7 @@ } break; default: - printk(VIOTAPE_KERN_WARN "wierd ack\n"); + printk(VIOTAPE_KERN_WARN "weird ack\n"); } } diff -Nru a/drivers/char/vt.c b/drivers/char/vt.c --- a/drivers/char/vt.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/char/vt.c 2004-11-10 17:19:06 -08:00 @@ -2153,8 +2153,6 @@ if (!printable || test_and_set_bit(0, &printing)) return; - pm_access(pm_con); - if (kmsg_redirect && vc_cons_allocated(kmsg_redirect - 1)) currcons = kmsg_redirect - 1; @@ -2353,7 +2351,6 @@ { int retval; - pm_access(pm_con); retval = do_con_write(tty, buf, count); con_flush_chars(tty); @@ -2364,7 +2361,6 @@ { if (in_interrupt()) return; /* n_r3964 calls put_char() from interrupt context */ - pm_access(pm_con); do_con_write(tty, &ch, 1); } @@ -2433,8 +2429,6 @@ if (in_interrupt()) /* from flush_to_ldisc */ return; - pm_access(pm_con); - /* if we race with con_close(), vt may be null */ acquire_console_sem(); vt = tty->driver_data; @@ -3255,7 +3249,6 @@ EXPORT_SYMBOL(default_red); EXPORT_SYMBOL(default_grn); EXPORT_SYMBOL(default_blu); -EXPORT_SYMBOL(vc_cons_allocated); EXPORT_SYMBOL(update_region); EXPORT_SYMBOL(redraw_screen); EXPORT_SYMBOL(vc_resize); diff -Nru a/drivers/dio/Makefile b/drivers/dio/Makefile --- a/drivers/dio/Makefile 2004-11-10 17:19:03 -08:00 +++ b/drivers/dio/Makefile 2004-11-10 17:19:03 -08:00 @@ -2,4 +2,4 @@ # Makefile for the linux kernel. # -obj-y := dio.o +obj-y := dio.o dio-driver.o dio-sysfs.o diff -Nru a/drivers/dio/dio-driver.c b/drivers/dio/dio-driver.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/dio/dio-driver.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,163 @@ +/* + * DIO Driver Services + * + * Copyright (C) 2004 Jochen Friedrich + * + * Loosely based on drivers/pci/pci-driver.c and drivers/zorro/zorro-driver.c + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive + * for more details. + */ + +#include +#include +#include + + + /** + * dio_match_device - Tell if a DIO device structure has a matching + * DIO device id structure + * @ids: array of DIO device id structures to search in + * @dev: the DIO device structure to match against + * + * Used by a driver to check whether a DIO device present in the + * system is in its list of supported devices. Returns the matching + * dio_device_id structure or %NULL if there is no match. + */ + +const struct dio_device_id * +dio_match_device(const struct dio_device_id *ids, + const struct dio_dev *d) +{ + while (ids->id) { + if (ids->id == DIO_WILDCARD) + return ids; + if (DIO_NEEDSSECID(ids->id & 0xff)) { + if (ids->id == d->id) + return ids; + } else { + if ((ids->id & 0xff) == (d->id & 0xff)) + return ids; + } + ids++; + } + return NULL; +} + +static int dio_device_probe(struct device *dev) +{ + int error = 0; + struct dio_driver *drv = to_dio_driver(dev->driver); + struct dio_dev *d = to_dio_dev(dev); + + if (!d->driver && drv->probe) { + const struct dio_device_id *id; + + id = dio_match_device(drv->id_table, d); + if (id) + error = drv->probe(d, id); + if (error >= 0) { + d->driver = drv; + error = 0; + } + } + return error; +} + + + /** + * dio_register_driver - register a new DIO driver + * @drv: the driver structure to register + * + * Adds the driver structure to the list of registered drivers + * Returns the number of DIO devices which were claimed by the driver + * during registration. The driver remains registered even if the + * return value is zero. + */ + +int dio_register_driver(struct dio_driver *drv) +{ + int count = 0; + + /* initialize common driver fields */ + drv->driver.name = drv->name; + drv->driver.bus = &dio_bus_type; + drv->driver.probe = dio_device_probe; + + /* register with core */ + count = driver_register(&drv->driver); + return count ? count : 1; +} + + + /** + * dio_unregister_driver - unregister a DIO driver + * @drv: the driver structure to unregister + * + * Deletes the driver structure from the list of registered DIO drivers, + * gives it a chance to clean up by calling its remove() function for + * each device it was responsible for, and marks those devices as + * driverless. + */ + +void dio_unregister_driver(struct dio_driver *drv) +{ + driver_unregister(&drv->driver); +} + + + /** + * dio_bus_match - Tell if a DIO device structure has a matching DIO + * device id structure + * @ids: array of DIO device id structures to search in + * @dev: the DIO device structure to match against + * + * Used by a driver to check whether a DIO device present in the + * system is in its list of supported devices. Returns the matching + * dio_device_id structure or %NULL if there is no match. + */ + +static int dio_bus_match(struct device *dev, struct device_driver *drv) +{ + struct dio_dev *d = to_dio_dev(dev); + struct dio_driver *dio_drv = to_dio_driver(drv); + const struct dio_device_id *ids = dio_drv->id_table; + + if (!ids) + return 0; + + while (ids->id) { + if (ids->id == DIO_WILDCARD) + return 1; + if (DIO_NEEDSSECID(ids->id & 0xff)) { + if (ids->id == d->id) + return 1; + } else { + if ((ids->id & 0xff) == (d->id & 0xff)) + return 1; + } + ids++; + } + return 0; +} + + +struct bus_type dio_bus_type = { + .name = "dio", + .match = dio_bus_match +}; + + +static int __init dio_driver_init(void) +{ + return bus_register(&dio_bus_type); +} + +postcore_initcall(dio_driver_init); + +EXPORT_SYMBOL(dio_match_device); +EXPORT_SYMBOL(dio_register_driver); +EXPORT_SYMBOL(dio_unregister_driver); +EXPORT_SYMBOL(dio_dev_driver); +EXPORT_SYMBOL(dio_bus_type); diff -Nru a/drivers/dio/dio-sysfs.c b/drivers/dio/dio-sysfs.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/dio/dio-sysfs.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,77 @@ +/* + * File Attributes for DIO Devices + * + * Copyright (C) 2004 Jochen Friedrich + * + * Loosely based on drivers/pci/pci-sysfs.c and drivers/zorro/zorro-sysfs.c + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive + * for more details. + */ + + +#include +#include +#include + +/* show configuration fields */ + +static ssize_t dio_show_id(struct device *dev, char *buf) +{ + struct dio_dev *d; + + d = to_dio_dev(dev); + return sprintf(buf, "0x%02x\n", (d->id & 0xff)); +} +static DEVICE_ATTR(id, S_IRUGO, dio_show_id, NULL); + +static ssize_t dio_show_ipl(struct device *dev, char *buf) +{ + struct dio_dev *d; + + d = to_dio_dev(dev); + return sprintf(buf, "0x%02x\n", d->ipl); +} +static DEVICE_ATTR(ipl, S_IRUGO, dio_show_ipl, NULL); + +static ssize_t dio_show_secid(struct device *dev, char *buf) +{ + struct dio_dev *d; + + d = to_dio_dev(dev); + return sprintf(buf, "0x%02x\n", ((d->id >> 8)& 0xff)); +} +static DEVICE_ATTR(secid, S_IRUGO, dio_show_secid, NULL); + +static ssize_t dio_show_name(struct device *dev, char *buf) +{ + struct dio_dev *d; + + d = to_dio_dev(dev); + return sprintf(buf, "%s\n", d->name); +} +static DEVICE_ATTR(name, S_IRUGO, dio_show_name, NULL); + +static ssize_t dio_show_resource(struct device *dev, char *buf) +{ + struct dio_dev *d = to_dio_dev(dev); + + return sprintf(buf, "0x%08lx 0x%08lx 0x%08lx\n", + dio_resource_start(d), dio_resource_end(d), + dio_resource_flags(d)); +} +static DEVICE_ATTR(resource, S_IRUGO, dio_show_resource, NULL); + +void dio_create_sysfs_dev_files(struct dio_dev *d) +{ + struct device *dev = &d->dev; + + /* current configuration's attributes */ + device_create_file(dev, &dev_attr_id); + device_create_file(dev, &dev_attr_ipl); + device_create_file(dev, &dev_attr_secid); + device_create_file(dev, &dev_attr_name); + device_create_file(dev, &dev_attr_resource); +} + diff -Nru a/drivers/dio/dio.c b/drivers/dio/dio.c --- a/drivers/dio/dio.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/dio/dio.c 2004-11-10 17:19:05 -08:00 @@ -1,5 +1,6 @@ -/* Code to support devices on the DIO (and eventually DIO-II) bus +/* Code to support devices on the DIO and DIO-II bus * Copyright (C) 05/1998 Peter Maydell + * Copyright (C) 2004 Jochen Friedrich * * This code has basically these routines at the moment: * int dio_find(u_int deviceid) @@ -9,9 +10,8 @@ * This means that framebuffers should pass it as * DIO_ENCODE_ID(DIO_ID_FBUFFER,DIO_ID2_TOPCAT) * (or whatever); everybody else just uses DIO_ID_FOOBAR. - * void *dio_scodetoviraddr(int scode) - * Return the virtual address corresponding to the given select code. - * NB: DIO-II devices will have to be mapped in in this routine! + * unsigned long dio_scodetophysaddr(int scode) + * Return the physical address corresponding to the given select code. * int dio_scodetoipl(int scode) * Every DIO card has a fixed interrupt priority level. This function * returns it, whatever it is. @@ -24,14 +24,26 @@ * This file is based on the way the Amiga port handles Zorro II cards, * although we aren't so complicated... */ -#include -#include +#include +#include #include +#include +#include #include #include /* kmalloc() */ -#include -#include /* hwreg_present() */ -#include /* readb() */ +#include +#include /* readb() */ + +struct dio_bus dio_bus = { + .resources = { + /* DIO range */ + { .name = "DIO mem", .start = 0x00600000, .end = 0x007fffff }, + /* DIO-II range */ + { .name = "DIO-II mem", .start = 0x01000000, .end = 0x1fffffff } + }, + .name = "DIO bus" +}; + /* not a real config option yet! */ #define CONFIG_DIO_CONSTANTS @@ -59,7 +71,7 @@ DIONAME(DCA0), DIONAME(DCA0REM), DIONAME(DCA1), DIONAME(DCA1REM), DIONAME(DCM), DIONAME(DCMREM), DIONAME(LAN), - DIONAME(FHPIB), DIONAME(NHPIB), DIONAME(IHPIB), + DIONAME(FHPIB), DIONAME(NHPIB), DIONAME(SCSI0), DIONAME(SCSI1), DIONAME(SCSI2), DIONAME(SCSI3), DIONAME(FBUFFER), DIONAME(PARALLEL), DIONAME(VME), DIONAME(DCL), DIONAME(DCLREM), @@ -79,7 +91,7 @@ #define NUMNAMES (sizeof(names) / sizeof(struct dioname)) static const char *unknowndioname - = "unknown DIO board -- please email !"; + = "unknown DIO board -- please email !"; static const char *dio_getname(int id) { @@ -88,7 +100,7 @@ for (i = 0; i < NUMNAMES; i++) if (names[i].id == id) return names[i].name; - + return unknowndioname; } @@ -99,70 +111,59 @@ #endif /* CONFIG_DIO_CONSTANTS */ -/* We represent all the DIO boards in the system with a linked list of these structs. */ -struct dioboard +int __init dio_find(int deviceid) { - struct dioboard *next; /* link to next struct in list */ - int ipl; /* IPL of this board */ - int configured; /* has this board been configured? */ - int scode; /* select code of this board */ - int id; /* encoded ID */ - const char *name; -}; - -static struct dioboard *blist = NULL; - -static int __init dio_find_slow(int deviceid) -{ - /* Called to find a DIO device before the full bus scan has run. Basically - * only used by the console driver. - * We don't do the primary+secondary ID encoding thing here. Maybe we should. - * (that would break the topcat detection, though. I need to think about - * the whole primary/secondary ID thing.) - */ - int scode; - u_char prid; + /* Called to find a DIO device before the full bus scan has run. + * Only used by the console driver. + */ + int scode, id; + u_char prid, secid, i; + mm_segment_t fs; - for (scode = 0; scode < DIO_SCMAX; scode++) - { + for (scode = 0; scode < DIO_SCMAX; scode++) { void *va; + unsigned long pa; if (DIO_SCINHOLE(scode)) continue; - - va = dio_scodetoviraddr(scode); - if (!va || !hwreg_present(va + DIO_IDOFF)) + + pa = dio_scodetophysaddr(scode); + + if (!pa) + continue; + + if (scode < DIOII_SCBASE) + va = (void *)(pa + DIO_VIRADDRBASE); + else + va = ioremap(pa, PAGE_SIZE); + + fs = get_fs(); + set_fs(KERNEL_DS); + + if (get_user(i, (unsigned char *)va + DIO_IDOFF)) { + set_fs(fs); + if (scode >= DIOII_SCBASE) + iounmap(va); continue; /* no board present at that select code */ + } - /* We aren't very likely to want to use this to get at the IHPIB, - * but maybe it's returning the same ID as the card we do want... - */ - if (!DIO_ISIHPIB(scode)) - prid = DIO_ID(va); - else - prid = DIO_ID_IHPIB; + set_fs(fs); + prid = DIO_ID(va); - if (prid == deviceid) + if (DIO_NEEDSSECID(prid)) { + secid = DIO_SECID(va); + id = DIO_ENCODE_ID(prid, secid); + } else + id = prid; + + if (id == deviceid) { + if (scode >= DIOII_SCBASE) + iounmap(va); return scode; + } } - return 0; -} -/* Aargh: we use 0 for an error return code, but select code 0 exists! - * FIXME (trivial, use -1, but requires changes to all the drivers :-< ) - */ -int dio_find(int deviceid) -{ - if (blist) - { - /* fast way */ - struct dioboard *b; - for (b = blist; b; b = b->next) - if (b->id == deviceid && b->configured == 0) - return b->scode; - return 0; - } - return dio_find_slow(deviceid); + return -1; } /* This is the function that scans the DIO space and works out what @@ -170,58 +171,92 @@ */ static int __init dio_init(void) { - int scode; - struct dioboard *b, *bprev = NULL; - - printk("Scanning for DIO devices...\n"); - + int scode; + mm_segment_t fs; + int i; + struct dio_dev *dev; + + if (!MACH_IS_HP300) + return 0; + + printk(KERN_INFO "Scanning for DIO devices...\n"); + + /* Initialize the DIO bus */ + INIT_LIST_HEAD(&dio_bus.devices); + strcpy(dio_bus.dev.bus_id, "dio"); + device_register(&dio_bus.dev); + + /* Request all resources */ + dio_bus.num_resources = (hp300_model == HP_320 ? 1 : 2); + for (i = 0; i < dio_bus.num_resources; i++) + request_resource(&iomem_resource, &dio_bus.resources[i]); + + /* Register all devices */ for (scode = 0; scode < DIO_SCMAX; ++scode) { u_char prid, secid = 0; /* primary, secondary ID bytes */ u_char *va; + unsigned long pa; if (DIO_SCINHOLE(scode)) continue; - - va = dio_scodetoviraddr(scode); - if (!va || !hwreg_present(va + DIO_IDOFF)) + + pa = dio_scodetophysaddr(scode); + + if (!pa) + continue; + + if (scode < DIOII_SCBASE) + va = (void *)(pa + DIO_VIRADDRBASE); + else + va = ioremap(pa, PAGE_SIZE); + + fs = get_fs(); + set_fs(KERNEL_DS); + + if (get_user(i, (unsigned char *)va + DIO_IDOFF)) { + set_fs(fs); + if (scode >= DIOII_SCBASE) + iounmap(va); continue; /* no board present at that select code */ + } + + set_fs(fs); /* Found a board, allocate it an entry in the list */ - b = kmalloc(sizeof(struct dioboard), GFP_KERNEL); - - /* read the ID byte(s) and encode if necessary. Note workaround - * for broken internal HPIB devices... - */ - if (!DIO_ISIHPIB(scode)) - prid = DIO_ID(va); - else - prid = DIO_ID_IHPIB; - - if (DIO_NEEDSSECID(prid)) - { + dev = kmalloc(sizeof(struct dio_dev), GFP_KERNEL); + if (!dev) + return 0; + + memset(dev, 0, sizeof(struct dio_dev)); + dev->bus = &dio_bus; + dev->dev.parent = &dio_bus.dev; + dev->dev.bus = &dio_bus_type; + dev->scode = scode; + dev->resource.start = pa; + dev->resource.end = pa + DIO_SIZE(scode, va); + sprintf(dev->dev.bus_id,"%02x", scode); + + /* read the ID byte(s) and encode if necessary. */ + prid = DIO_ID(va); + + if (DIO_NEEDSSECID(prid)) { secid = DIO_SECID(va); - b->id = DIO_ENCODE_ID(prid, secid); - } - else - b->id = prid; - - b->configured = 0; - b->scode = scode; - b->ipl = DIO_IPL(va); - b->name = dio_getname(b->id); - printk("select code %3d: ipl %d: ID %02X", scode, b->ipl, prid); - if (DIO_NEEDSSECID(b->id)) + dev->id = DIO_ENCODE_ID(prid, secid); + } else + dev->id = prid; + + dev->ipl = DIO_IPL(va); + strcpy(dev->name,dio_getname(dev->id)); + printk(KERN_INFO "select code %3d: ipl %d: ID %02X", dev->scode, dev->ipl, prid); + if (DIO_NEEDSSECID(prid)) printk(":%02X", secid); - printk(": %s\n", b->name); - - b->next = NULL; + printk(": %s\n", dev->name); - if (bprev) - bprev->next = b; - else - blist = b; - bprev = b; + if (scode >= DIOII_SCBASE) + iounmap(va); + device_register(&dev->dev); + dio_create_sysfs_dev_files(dev); } return 0; } @@ -229,84 +264,16 @@ subsys_initcall(dio_init); /* Bear in mind that this is called in the very early stages of initialisation - * in order to get the virtual address of the serial port for the console... + * in order to get the address of the serial port for the console... */ -void *dio_scodetoviraddr(int scode) +unsigned long dio_scodetophysaddr(int scode) { - if (scode > DIOII_SCBASE) - { - printk("dio_scodetoviraddr: don't support DIO-II yet!\n"); - return 0; - } - else if (scode > DIO_SCMAX || scode < 0) + if (scode >= DIOII_SCBASE) { + return (DIOII_BASE + (scode - 132) * DIOII_DEVSIZE); + } else if (scode > DIO_SCMAX || scode < 0) return 0; else if (DIO_SCINHOLE(scode)) return 0; - else if (DIO_ISIHPIB(scode)) - return (void*)DIO_IHPIBADDR; - - return (void*)(DIO_VIRADDRBASE + DIO_BASE + scode * 0x10000); -} -int dio_scodetoipl(int scode) -{ - struct dioboard *b; - for (b = blist; b; b = b->next) - if (b->scode == scode) - break; - - if (!b) - { - printk("dio_scodetoipl: bad select code %d\n", scode); - return 0; - } - else - return b->ipl; -} - -const char *dio_scodetoname(int scode) -{ - struct dioboard *b; - for (b = blist; b; b = b->next) - if (b->scode == scode) - break; - - if (!b) - { - printk("dio_scodetoname: bad select code %d\n", scode); - return NULL; - } - else - return b->name; -} - -void dio_config_board(int scode) -{ - struct dioboard *b; - for (b = blist; b; b = b->next) - if (b->scode == scode) - break; - - if (!b) - printk("dio_config_board: bad select code %d\n", scode); - else if (b->configured) - printk("dio_config_board: board at select code %d already configured\n", scode); - else - b->configured = 1; -} - -void dio_unconfig_board(int scode) -{ - struct dioboard *b; - for (b = blist; b; b = b->next) - if (b->scode == scode) - break; - - if (!b) - printk("dio_unconfig_board: bad select code %d\n", scode); - else if (!b->configured) - printk("dio_unconfig_board: board at select code %d not configured\n", - scode); - else - b->configured = 0; + return (DIO_BASE + scode * DIO_DEVSIZE); } diff -Nru a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c --- a/drivers/firmware/efivars.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/firmware/efivars.c 2004-11-10 17:19:06 -08:00 @@ -640,7 +640,7 @@ *(short_name + strlen(short_name)) = '-'; efi_guid_unparse(vendor_guid, short_name + strlen(short_name)); - kobject_set_name(&new_efivar->kobj, short_name); + kobject_set_name(&new_efivar->kobj, "%s", short_name); kobj_set_kset_s(new_efivar, vars_subsys); kobject_register(&new_efivar->kobj); diff -Nru a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c --- a/drivers/firmware/pcdp.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/firmware/pcdp.c 2004-11-10 17:19:03 -08:00 @@ -98,8 +98,8 @@ if (uart_irq_supported(rev, uart)) { port.irq = acpi_register_gsi(uart->gsi, - uart_active_high_low(rev, uart), - uart_edge_level(rev, uart)); + uart_edge_level(rev, uart), + uart_active_high_low(rev, uart)); port.flags |= UPF_AUTO_IRQ; /* some FW reported wrong GSI */ if (uart_pci(rev, uart)) port.flags |= UPF_SHARE_IRQ; diff -Nru a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c --- a/drivers/i2c/algos/i2c-algo-pca.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/i2c/algos/i2c-algo-pca.c 2004-11-10 17:19:05 -08:00 @@ -249,7 +249,7 @@ break; case 0x20: /* SLA+W has been transmitted; NOT ACK has been received */ - DEB2("NOT ACK recieved after SLA+W\n"); + DEB2("NOT ACK received after SLA+W\n"); pca_stop(adap); return -EREMOTEIO; @@ -277,7 +277,7 @@ return -EREMOTEIO; case 0x30: /* Data byte in I2CDAT has been transmitted; NOT ACK has been received */ - DEB2("NOT ACK recieved after data byte\n"); + DEB2("NOT ACK received after data byte\n"); return -EREMOTEIO; case 0x38: /* Arbitration lost during SLA+W, SLA+R or data bytes */ diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig --- a/drivers/i2c/busses/Kconfig 2004-11-10 17:19:06 -08:00 +++ b/drivers/i2c/busses/Kconfig 2004-11-10 17:19:06 -08:00 @@ -51,6 +51,19 @@ This driver can also be built as a module. If so, the module will be called i2c-amd756. +config I2C_AMD756_S4882 + tristate "SMBus multiplexing on the Tyan S4882" + depends on I2C_AMD756 && EXPERIMENTAL + help + Enabling this option will add specific SMBus support for the Tyan + S4882 motherboard. On this 4-CPU board, the SMBus is multiplexed + over 8 different channels, where the various memory module EEPROMs + and temperature sensors live. Saying yes here will give you access + to these in addition to the trunk. + + This driver can also be built as a module. If so, the module + will be called i2c-amd756-s4882. + config I2C_AMD8111 tristate "AMD 8111" depends on I2C && PCI && EXPERIMENTAL @@ -339,7 +352,7 @@ config SCx200_ACB tristate "NatSemi SCx200 ACCESS.bus" - depends on I2C + depends on I2C && PCI help Enable the use of the ACCESS.bus controllers of a SCx200 processor. diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile --- a/drivers/i2c/busses/Makefile 2004-11-10 17:19:02 -08:00 +++ b/drivers/i2c/busses/Makefile 2004-11-10 17:19:02 -08:00 @@ -6,6 +6,7 @@ obj-$(CONFIG_I2C_ALI1563) += i2c-ali1563.o obj-$(CONFIG_I2C_ALI15X3) += i2c-ali15x3.o obj-$(CONFIG_I2C_AMD756) += i2c-amd756.o +obj-$(CONFIG_I2C_AMD756_S4882) += i2c-amd756-s4882.o obj-$(CONFIG_I2C_AMD8111) += i2c-amd8111.o obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o obj-$(CONFIG_I2C_HYDRA) += i2c-hydra.o diff -Nru a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c --- a/drivers/i2c/busses/i2c-ali1535.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/i2c/busses/i2c-ali1535.c 2004-11-10 17:19:06 -08:00 @@ -137,7 +137,7 @@ static unsigned short ali1535_smba; -DECLARE_MUTEX(i2c_ali1535_sem); +static DECLARE_MUTEX(i2c_ali1535_sem); /* Detect whether a ALI1535 can be found, and initialize it, where necessary. Note the differences between kernels with the old PCI BIOS interface and @@ -465,7 +465,7 @@ } -u32 ali1535_func(struct i2c_adapter *adapter) +static u32 ali1535_func(struct i2c_adapter *adapter) { return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA | diff -Nru a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/busses/i2c-amd756-s4882.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,261 @@ +/* + * i2c-amd756-s4882.c - i2c-amd756 extras for the Tyan S4882 motherboard + * + * Copyright (C) 2004 Jean Delvare + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * We select the channels by sending commands to the Philips + * PCA9556 chip at I2C address 0x18. The main adapter is used for + * the non-multiplexed part of the bus, and 4 virtual adapters + * are defined for the multiplexed addresses: 0x50-0x53 (memory + * module EEPROM) located on channels 1-4, and 0x4c (LM63) + * located on multiplexed channels 0 and 5-7. We define one + * virtual adapter per CPU, which corresponds to two multiplexed + * channels: + * CPU0: virtual adapter 1, channels 1 and 0 + * CPU1: virtual adapter 2, channels 2 and 5 + * CPU2: virtual adapter 3, channels 3 and 6 + * CPU3: virtual adapter 4, channels 4 and 7 + */ + +#include +#include +#include +#include + +extern struct i2c_adapter amd756_smbus; + +static struct i2c_adapter *s4882_adapter; +static struct i2c_algorithm *s4882_algo; + +/* Wrapper access functions for multiplexed SMBus */ +static struct semaphore amd756_lock; + +static s32 amd756_access_virt0(struct i2c_adapter * adap, u16 addr, + unsigned short flags, char read_write, + u8 command, int size, + union i2c_smbus_data * data) +{ + int error; + + /* We exclude the multiplexed addresses */ + if (addr == 0x4c || (addr & 0xfc) == 0x50 || (addr & 0xfc) == 0x30 + || addr == 0x18) + return -1; + + down(&amd756_lock); + + error = amd756_smbus.algo->smbus_xfer(adap, addr, flags, read_write, + command, size, data); + + up(&amd756_lock); + + return error; +} + +/* We remember the last used channels combination so as to only switch + channels when it is really needed. This greatly reduces the SMBus + overhead, but also assumes that nobody will be writing to the PCA9556 + in our back. */ +static u8 last_channels; + +static inline s32 amd756_access_channel(struct i2c_adapter * adap, u16 addr, + unsigned short flags, char read_write, + u8 command, int size, + union i2c_smbus_data * data, + u8 channels) +{ + int error; + + /* We exclude the non-multiplexed addresses */ + if (addr != 0x4c && (addr & 0xfc) != 0x50 && (addr & 0xfc) != 0x30) + return -1; + + down(&amd756_lock); + + if (last_channels != channels) { + union i2c_smbus_data mplxdata; + mplxdata.byte = channels; + + error = amd756_smbus.algo->smbus_xfer(adap, 0x18, 0, + I2C_SMBUS_WRITE, 0x01, + I2C_SMBUS_BYTE_DATA, + &mplxdata); + if (error) + goto UNLOCK; + last_channels = channels; + } + error = amd756_smbus.algo->smbus_xfer(adap, addr, flags, read_write, + command, size, data); + +UNLOCK: + up(&amd756_lock); + return error; +} + +static s32 amd756_access_virt1(struct i2c_adapter * adap, u16 addr, + unsigned short flags, char read_write, + u8 command, int size, + union i2c_smbus_data * data) +{ + /* CPU0: channels 1 and 0 enabled */ + return amd756_access_channel(adap, addr, flags, read_write, command, + size, data, 0x03); +} + +static s32 amd756_access_virt2(struct i2c_adapter * adap, u16 addr, + unsigned short flags, char read_write, + u8 command, int size, + union i2c_smbus_data * data) +{ + /* CPU1: channels 2 and 5 enabled */ + return amd756_access_channel(adap, addr, flags, read_write, command, + size, data, 0x24); +} + +static s32 amd756_access_virt3(struct i2c_adapter * adap, u16 addr, + unsigned short flags, char read_write, + u8 command, int size, + union i2c_smbus_data * data) +{ + /* CPU2: channels 3 and 6 enabled */ + return amd756_access_channel(adap, addr, flags, read_write, command, + size, data, 0x48); +} + +static s32 amd756_access_virt4(struct i2c_adapter * adap, u16 addr, + unsigned short flags, char read_write, + u8 command, int size, + union i2c_smbus_data * data) +{ + /* CPU3: channels 4 and 7 enabled */ + return amd756_access_channel(adap, addr, flags, read_write, command, + size, data, 0x90); +} + +static int __init amd756_s4882_init(void) +{ + int i, error; + union i2c_smbus_data ioconfig; + + /* Unregister physical bus */ + error = i2c_del_adapter(&amd756_smbus); + if (error) { + if (error != -EINVAL) + dev_err(&amd756_smbus.dev, "Physical bus removal " + "failed\n"); + goto ERROR0; + } + + printk(KERN_INFO "Enabling SMBus multiplexing for Tyan S4882\n"); + init_MUTEX(&amd756_lock); + + /* Define the 5 virtual adapters and algorithms structures */ + if (!(s4882_adapter = kmalloc(5 * sizeof(struct i2c_adapter), + GFP_KERNEL))) { + error = -ENOMEM; + goto ERROR1; + } + if (!(s4882_algo = kmalloc(5 * sizeof(struct i2c_algorithm), + GFP_KERNEL))) { + error = -ENOMEM; + goto ERROR2; + } + + /* Fill in the new structures */ + s4882_algo[0] = *(amd756_smbus.algo); + s4882_algo[0].smbus_xfer = amd756_access_virt0; + s4882_adapter[0] = amd756_smbus; + s4882_adapter[0].algo = s4882_algo; + for (i = 1; i < 5; i++) { + s4882_algo[i] = *(amd756_smbus.algo); + s4882_adapter[i] = amd756_smbus; + sprintf(s4882_adapter[i].name, + "SMBus 8111 adapter (CPU%d)", i-1); + s4882_adapter[i].algo = s4882_algo+i; + } + s4882_algo[1].smbus_xfer = amd756_access_virt1; + s4882_algo[2].smbus_xfer = amd756_access_virt2; + s4882_algo[3].smbus_xfer = amd756_access_virt3; + s4882_algo[4].smbus_xfer = amd756_access_virt4; + + /* Configure the PCA9556 multiplexer */ + ioconfig.byte = 0x00; /* All I/O to output mode */ + error = amd756_smbus.algo->smbus_xfer(&amd756_smbus, 0x18, 0, + I2C_SMBUS_WRITE, 0x03, + I2C_SMBUS_BYTE_DATA, &ioconfig); + if (error) { + dev_dbg(&amd756_smbus.dev, "PCA9556 configuration failed\n"); + error = -EIO; + goto ERROR3; + } + + /* Register virtual adapters */ + for (i = 0; i < 5; i++) { + error = i2c_add_adapter(s4882_adapter+i); + if (error) { + dev_err(&amd756_smbus.dev, + "Virtual adapter %d registration " + "failed, module not inserted\n", i); + for (i--; i >= 0; i--) + i2c_del_adapter(s4882_adapter+i); + goto ERROR3; + } + } + + return 0; + +ERROR3: + kfree(s4882_algo); + s4882_algo = NULL; +ERROR2: + kfree(s4882_adapter); + s4882_adapter = NULL; +ERROR1: + i2c_del_adapter(&amd756_smbus); +ERROR0: + return error; +} + +static void __exit amd756_s4882_exit(void) +{ + if (s4882_adapter) { + int i; + + for (i = 0; i < 5; i++) + i2c_del_adapter(s4882_adapter+i); + kfree(s4882_adapter); + s4882_adapter = NULL; + } + if (s4882_algo) { + kfree(s4882_algo); + s4882_algo = NULL; + } + + /* Restore physical bus */ + if (i2c_add_adapter(&amd756_smbus)) + dev_err(&amd756_smbus.dev, "Physical bus restoration " + "failed\n"); +} + +MODULE_AUTHOR("Jean Delvare "); +MODULE_DESCRIPTION("S4882 SMBus multiplexing"); +MODULE_LICENSE("GPL"); + +module_init(amd756_s4882_init); +module_exit(amd756_s4882_exit); diff -Nru a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c --- a/drivers/i2c/busses/i2c-amd756.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/i2c/busses/i2c-amd756.c 2004-11-10 17:19:06 -08:00 @@ -302,7 +302,7 @@ .functionality = amd756_func, }; -static struct i2c_adapter amd756_adapter = { +struct i2c_adapter amd756_smbus = { .owner = THIS_MODULE, .class = I2C_CLASS_HWMON, .algo = &smbus_algorithm, @@ -374,12 +374,12 @@ dev_dbg(&pdev->dev, "AMD756_smba = 0x%X\n", amd756_ioport); /* set up the driverfs linkage to our parent device */ - amd756_adapter.dev.parent = &pdev->dev; + amd756_smbus.dev.parent = &pdev->dev; - sprintf(amd756_adapter.name, "SMBus %s adapter at %04x", + sprintf(amd756_smbus.name, "SMBus %s adapter at %04x", chipname[id->driver_data], amd756_ioport); - error = i2c_add_adapter(&amd756_adapter); + error = i2c_add_adapter(&amd756_smbus); if (error) { dev_err(&pdev->dev, "Adapter registration failed, module not inserted\n"); @@ -395,7 +395,7 @@ static void __devexit amd756_remove(struct pci_dev *dev) { - i2c_del_adapter(&amd756_adapter); + i2c_del_adapter(&amd756_smbus); release_region(amd756_ioport, SMB_IOSIZE); } @@ -419,6 +419,8 @@ MODULE_AUTHOR("Merlin Hughes "); MODULE_DESCRIPTION("AMD756/766/768/8111 and nVidia nForce SMBus driver"); MODULE_LICENSE("GPL"); + +EXPORT_SYMBOL(amd756_smbus); module_init(amd756_init) module_exit(amd756_exit) diff -Nru a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c --- a/drivers/i2c/busses/i2c-amd8111.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/i2c/busses/i2c-amd8111.c 2004-11-10 17:19:06 -08:00 @@ -67,7 +67,7 @@ * ACPI 2.0 chapter 13 access of registers of the EC */ -unsigned int amd_ec_wait_write(struct amd_smbus *smbus) +static unsigned int amd_ec_wait_write(struct amd_smbus *smbus) { int timeout = 500; @@ -82,7 +82,7 @@ return 0; } -unsigned int amd_ec_wait_read(struct amd_smbus *smbus) +static unsigned int amd_ec_wait_read(struct amd_smbus *smbus) { int timeout = 500; @@ -97,7 +97,7 @@ return 0; } -unsigned int amd_ec_read(struct amd_smbus *smbus, unsigned char address, unsigned char *data) +static unsigned int amd_ec_read(struct amd_smbus *smbus, unsigned char address, unsigned char *data) { if (amd_ec_wait_write(smbus)) return -1; @@ -114,7 +114,7 @@ return 0; } -unsigned int amd_ec_write(struct amd_smbus *smbus, unsigned char address, unsigned char data) +static unsigned int amd_ec_write(struct amd_smbus *smbus, unsigned char address, unsigned char data) { if (amd_ec_wait_write(smbus)) return -1; @@ -174,7 +174,7 @@ #define AMD_SMB_PRTCL_PEC 0x80 -s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short flags, +static s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short flags, char read_write, u8 command, int size, union i2c_smbus_data * data) { struct amd_smbus *smbus = adap->algo_data; @@ -315,7 +315,7 @@ } -u32 amd8111_func(struct i2c_adapter *adapter) +static u32 amd8111_func(struct i2c_adapter *adapter) { return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_BLOCK_DATA | diff -Nru a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c --- a/drivers/i2c/busses/i2c-ibm_iic.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/i2c/busses/i2c-ibm_iic.c 2004-11-10 17:19:05 -08:00 @@ -412,18 +412,12 @@ if (dev->irq >= 0){ /* Interrupt mode */ - wait_queue_t wait; - init_waitqueue_entry(&wait, current); - - add_wait_queue(&dev->wq, &wait); - if (in_8(&iic->sts) & STS_PT) - msleep_interruptible(dev->adap.timeout * 1000); - remove_wait_queue(&dev->wq, &wait); - - if (unlikely(signal_pending(current))){ + ret = wait_event_interruptible_timeout(dev->wq, + !(in_8(&iic->sts) & STS_PT), dev->adap.timeout * HZ); + + if (unlikely(ret < 0)) DBG("%d: wait interrupted\n", dev->idx); - ret = -ERESTARTSYS; - } else if (unlikely(in_8(&iic->sts) & STS_PT)){ + else if (unlikely(in_8(&iic->sts) & STS_PT)){ DBG("%d: wait timeout\n", dev->idx); ret = -ETIMEDOUT; } diff -Nru a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c --- a/drivers/i2c/busses/i2c-s3c2410.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/i2c/busses/i2c-s3c2410.c 2004-11-10 17:19:04 -08:00 @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -71,7 +72,7 @@ struct i2c_adapter adap; }; -/* default platform data to use if not supplied in the platfrom_device +/* default platform data to use if not supplied in the platform_device */ static struct s3c2410_platform_i2c s3c24xx_i2c_default_platform = { @@ -79,8 +80,21 @@ .slave_addr = 0x10, .bus_freq = 100*1000, .max_freq = 400*1000, + .sda_delay = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON, }; +/* s3c24xx_i2c_is2440() + * + * return true is this is an s3c2440 +*/ + +static inline int s3c24xx_i2c_is2440(struct s3c24xx_i2c *i2c) +{ + struct platform_device *pdev = to_platform_device(i2c->dev); + + return !strcmp(pdev->name, "s3c2440-i2c"); +} + /* s3c24xx_i2c_get_platformdata * @@ -163,10 +177,9 @@ { unsigned int addr = (msg->addr & 0x7f) << 1; unsigned long stat; + unsigned long iiccon; - stat = readl(i2c->regs + S3C2410_IICSTAT); - stat &= ~S3C2410_IICSTAT_MODEMASK; - stat |= S3C2410_IICSTAT_START; + stat = 0; stat |= S3C2410_IICSTAT_TXRXEN; if (msg->flags & I2C_M_RD) { @@ -178,8 +191,18 @@ // todo - check for wether ack wanted or not s3c24xx_i2c_enable_ack(i2c); + iiccon = readl(i2c->regs + S3C2410_IICCON); + writel(stat, i2c->regs + S3C2410_IICSTAT); + dev_dbg(i2c->dev, "START: %08lx to IICSTAT, %02x to DS\n", stat, addr); writeb(addr, i2c->regs + S3C2410_IICDS); + + // delay a bit and reset iiccon before setting start (per samsung) + udelay(1); + dev_dbg(i2c->dev, "iiccon, %08lx\n", iiccon); + writel(iiccon, i2c->regs + S3C2410_IICCON); + + stat |= S3C2410_IICSTAT_START; writel(stat, i2c->regs + S3C2410_IICSTAT); } @@ -264,6 +287,7 @@ !(i2c->msg->flags & I2C_M_IGNORE_NAK)) { /* ack was not received... */ + dev_err(i2c->dev, "ack was not received\n" ); s3c24xx_i2c_stop(i2c, -EREMOTEIO); goto out_ack; } @@ -407,6 +431,7 @@ if (status & S3C2410_IICSTAT_ARBITR) { // deal with arbitration loss + dev_err(i2c->dev, "deal with arbitration loss\n"); } if (i2c->state == STATE_IDLE) { @@ -534,7 +559,6 @@ static struct i2c_algorithm s3c24xx_i2c_algorithm = { .name = "S3C2410-I2C-Algorithm", - .id = I2C_ALGO_S3C2410, .master_xfer = s3c24xx_i2c_xfer, }; @@ -543,7 +567,6 @@ .wait = __WAIT_QUEUE_HEAD_INITIALIZER(s3c24xx_i2c.wait), .adap = { .name = "s3c2410-i2c", - .id = I2C_ALGO_S3C2410, .algo = &s3c24xx_i2c_algorithm, .retries = 2, }, @@ -576,7 +599,7 @@ *divs = calc_divs; *div1 = calc_div1; - return clkin / (calc_divs + calc_div1); + return clkin / (calc_divs * calc_div1); } /* freq_acceptable @@ -684,6 +707,17 @@ /* todo - check that the i2c lines aren't being dragged anywhere */ dev_info(i2c->dev, "bus frequency set to %d KHz\n", freq); + dev_dbg(i2c->dev, "S3C2410_IICCON=0x%02lx\n", iicon); + + writel(iicon, i2c->regs + S3C2410_IICCON); + + /* check for s3c2440 i2c controller */ + + if (s3c24xx_i2c_is2440(i2c)) { + dev_dbg(i2c->dev, "S3C2440_IICLC=%08x\n", pdata->sda_delay); + + writel(pdata->sda_delay, i2c->regs + S3C2440_IICLC); + } return 0; } @@ -851,7 +885,7 @@ /* device driver for platform bus bits */ -static struct device_driver s3c24xx_i2c_driver = { +static struct device_driver s3c2410_i2c_driver = { .name = "s3c2410-i2c", .bus = &platform_bus_type, .probe = s3c24xx_i2c_probe, @@ -859,14 +893,29 @@ .resume = s3c24xx_i2c_resume, }; +static struct device_driver s3c2440_i2c_driver = { + .name = "s3c2440-i2c", + .bus = &platform_bus_type, + .probe = s3c24xx_i2c_probe, + .remove = s3c24xx_i2c_remove, + .resume = s3c24xx_i2c_resume, +}; + static int __init i2c_adap_s3c_init(void) { - return driver_register(&s3c24xx_i2c_driver); + int ret; + + ret = driver_register(&s3c2410_i2c_driver); + if (ret == 0) + ret = driver_register(&s3c2440_i2c_driver); + + return ret; } -static void i2c_adap_s3c_exit(void) +static void __exit i2c_adap_s3c_exit(void) { - return driver_unregister(&s3c24xx_i2c_driver); + driver_unregister(&s3c2410_i2c_driver); + driver_unregister(&s3c2440_i2c_driver); } module_init(i2c_adap_s3c_init); diff -Nru a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c --- a/drivers/i2c/busses/scx200_acb.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/i2c/busses/scx200_acb.c 2004-11-10 17:19:04 -08:00 @@ -402,9 +402,9 @@ .functionality = scx200_acb_func, }; -struct scx200_acb_iface *scx200_acb_list; +static struct scx200_acb_iface *scx200_acb_list; -int scx200_acb_probe(struct scx200_acb_iface *iface) +static int scx200_acb_probe(struct scx200_acb_iface *iface) { u8 val; diff -Nru a/drivers/i2c/busses/scx200_i2c.c b/drivers/i2c/busses/scx200_i2c.c --- a/drivers/i2c/busses/scx200_i2c.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/i2c/busses/scx200_i2c.c 2004-11-10 17:19:04 -08:00 @@ -86,7 +86,7 @@ .name = "NatSemi SCx200 I2C", }; -int scx200_i2c_init(void) +static int scx200_i2c_init(void) { pr_debug(NAME ": NatSemi SCx200 I2C Driver\n"); @@ -115,7 +115,7 @@ return 0; } -void scx200_i2c_cleanup(void) +static void scx200_i2c_cleanup(void) { i2c_bit_del_bus(&scx200_i2c_ops); } diff -Nru a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig --- a/drivers/i2c/chips/Kconfig 2004-11-10 17:19:04 -08:00 +++ b/drivers/i2c/chips/Kconfig 2004-11-10 17:19:04 -08:00 @@ -97,6 +97,19 @@ This driver can also be built as a module. If so, the module will be called it87. +config SENSORS_LM63 + tristate "National Semiconductor LM63" + depends on I2C && EXPERIMENTAL + select I2C_SENSOR + help + If you say yes here you get support for the National Semiconductor + LM63 remote diode digital temperature sensor with integrated fan + control. Such chips are found on the Tyan S4882 (Thunder K8QS Pro) + motherboard, among others. + + This driver can also be built as a module. If so, the module + will be called lm63. + config SENSORS_LM75 tristate "National Semiconductor LM75 and compatibles" depends on I2C && EXPERIMENTAL @@ -201,6 +214,21 @@ This driver can also be built as a module. If so, the module will be called max1619. + +config SENSORS_PC87360 + tristate "National Semiconductor PC87360 family" + depends on I2C && EXPERIMENTAL + select I2C_SENSOR + select I2C_ISA + help + If you say yes here you get access to the hardware monitoring + functions of the National Semiconductor PC8736x Super-I/O chips. + The PC87360, PC87363 and PC87364 only have fan monitoring and + control. The PC87365 and PC87366 additionally have voltage and + temperature monitoring. + + This driver can also be built as a module. If so, the module + will be called pc87360. config SENSORS_SMSC47M1 tristate "SMSC LPC47M10x and compatibles" diff -Nru a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile --- a/drivers/i2c/chips/Makefile 2004-11-10 17:19:07 -08:00 +++ b/drivers/i2c/chips/Makefile 2004-11-10 17:19:07 -08:00 @@ -15,6 +15,7 @@ obj-$(CONFIG_SENSORS_FSCHER) += fscher.o obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o obj-$(CONFIG_SENSORS_IT87) += it87.o +obj-$(CONFIG_SENSORS_LM63) += lm63.o obj-$(CONFIG_SENSORS_LM75) += lm75.o obj-$(CONFIG_SENSORS_LM77) += lm77.o obj-$(CONFIG_SENSORS_LM78) += lm78.o @@ -24,6 +25,7 @@ obj-$(CONFIG_SENSORS_LM87) += lm87.o obj-$(CONFIG_SENSORS_LM90) += lm90.o obj-$(CONFIG_SENSORS_MAX1619) += max1619.o +obj-$(CONFIG_SENSORS_PC87360) += pc87360.o obj-$(CONFIG_SENSORS_PCF8574) += pcf8574.o obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o obj-$(CONFIG_SENSORS_RTC8564) += rtc8564.o diff -Nru a/drivers/i2c/chips/adm1021.c b/drivers/i2c/chips/adm1021.c --- a/drivers/i2c/chips/adm1021.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/i2c/chips/adm1021.c 2004-11-10 17:19:02 -08:00 @@ -40,12 +40,11 @@ #define ADM1021_ALARM_RTEMP_NA 0x04 /* Addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x18, 0x1a, 0x29, 0x2b, - 0x4c, 0x4e, I2C_CLIENT_END -}; +static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a, + 0x29, 0x2a, 0x2b, + 0x4c, 0x4d, 0x4e, + I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_8(adm1021, adm1023, max1617, max1617a, thmc10, lm84, gl523sm, mc1066); diff -Nru a/drivers/i2c/chips/adm1025.c b/drivers/i2c/chips/adm1025.c --- a/drivers/i2c/chips/adm1025.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/i2c/chips/adm1025.c 2004-11-10 17:19:02 -08:00 @@ -59,10 +59,8 @@ * NE1619 has two possible addresses: 0x2c and 0x2d. */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x2c, 0x2e, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* * Insmod parameters diff -Nru a/drivers/i2c/chips/adm1031.c b/drivers/i2c/chips/adm1031.c --- a/drivers/i2c/chips/adm1031.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/i2c/chips/adm1031.c 2004-11-10 17:19:04 -08:00 @@ -57,10 +57,8 @@ #define ADM1031_CONF2_TEMP_ENABLE(chan) (0x10 << (chan)) /* Addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x2c, 0x2e, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_2(adm1030, adm1031); diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c --- a/drivers/i2c/chips/asb100.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/i2c/chips/asb100.c 2004-11-10 17:19:04 -08:00 @@ -56,12 +56,11 @@ #define ASB100_VERSION "1.0.0" /* I2C addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x28, 0x2f, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, + 0x2e, 0x2f, I2C_CLIENT_END }; /* ISA addresses to scan (none) */ static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_1(asb100); diff -Nru a/drivers/i2c/chips/ds1621.c b/drivers/i2c/chips/ds1621.c --- a/drivers/i2c/chips/ds1621.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/i2c/chips/ds1621.c 2004-11-10 17:19:07 -08:00 @@ -29,10 +29,9 @@ #include "lm75.h" /* Addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x48, 0x4f, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c, + 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_1(ds1621); diff -Nru a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c --- a/drivers/i2c/chips/eeprom.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/i2c/chips/eeprom.c 2004-11-10 17:19:04 -08:00 @@ -36,10 +36,9 @@ #include /* Addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x50, 0x57, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x57, I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_1(eeprom); diff -Nru a/drivers/i2c/chips/fscher.c b/drivers/i2c/chips/fscher.c --- a/drivers/i2c/chips/fscher.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/i2c/chips/fscher.c 2004-11-10 17:19:04 -08:00 @@ -38,9 +38,7 @@ */ static unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* * Insmod parameters diff -Nru a/drivers/i2c/chips/gl518sm.c b/drivers/i2c/chips/gl518sm.c --- a/drivers/i2c/chips/gl518sm.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/i2c/chips/gl518sm.c 2004-11-10 17:19:07 -08:00 @@ -45,9 +45,7 @@ /* Addresses to scan */ static unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_2(gl518sm_r00, gl518sm_r80); diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c --- a/drivers/i2c/chips/it87.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/i2c/chips/it87.c 2004-11-10 17:19:06 -08:00 @@ -42,10 +42,11 @@ /* Addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x20, 0x2f, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, + 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, + 0x2f, I2C_CLIENT_END }; static unsigned int normal_isa[] = { 0x0290, I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_2(it87, it8712); @@ -55,13 +56,6 @@ #define VAL 0x2f /* The value to read/write */ #define PME 0x04 /* The device with the fan registers in it */ #define DEVID 0x20 /* Register: Device ID */ - -static inline void -superio_outb(int reg, int val) -{ - outb(reg, REG); - outb(val, VAL); -} static inline int superio_inb(int reg) diff -Nru a/drivers/i2c/chips/lm63.c b/drivers/i2c/chips/lm63.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/chips/lm63.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,567 @@ +/* + * lm63.c - driver for the National Semiconductor LM63 temperature sensor + * with integrated fan control + * Copyright (C) 2004 Jean Delvare + * Based on the lm90 driver. + * + * The LM63 is a sensor chip made by National Semiconductor. It measures + * two temperatures (its own and one external one) and the speed of one + * fan, those speed it can additionally control. Complete datasheet can be + * obtained from National's website at: + * http://www.national.com/pf/LM/LM63.html + * + * The LM63 is basically an LM86 with fan speed monitoring and control + * capabilities added. It misses some of the LM86 features though: + * - No low limit for local temperature. + * - No critical limit for local temperature. + * - Critical limit for remote temperature can be changed only once. We + * will consider that the critical limit is read-only. + * + * The datasheet isn't very clear about what the tachometer reading is. + * I had a explanation from National Semiconductor though. The two lower + * bits of the read value have to be masked out. The value is still 16 bit + * in width. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include + +/* + * Addresses to scan + * Address is fully defined internally and cannot be changed. + */ + +static unsigned short normal_i2c[] = { 0x4c, I2C_CLIENT_END }; +static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; + +/* + * Insmod parameters + */ + +SENSORS_INSMOD_1(lm63); + +/* + * The LM63 registers + */ + +#define LM63_REG_CONFIG1 0x03 +#define LM63_REG_CONFIG2 0xBF +#define LM63_REG_CONFIG_FAN 0x4A + +#define LM63_REG_TACH_COUNT_MSB 0x47 +#define LM63_REG_TACH_COUNT_LSB 0x46 +#define LM63_REG_TACH_LIMIT_MSB 0x49 +#define LM63_REG_TACH_LIMIT_LSB 0x48 + +#define LM63_REG_PWM_VALUE 0x4C +#define LM63_REG_PWM_FREQ 0x4D + +#define LM63_REG_LOCAL_TEMP 0x00 +#define LM63_REG_LOCAL_HIGH 0x05 + +#define LM63_REG_REMOTE_TEMP_MSB 0x01 +#define LM63_REG_REMOTE_TEMP_LSB 0x10 +#define LM63_REG_REMOTE_OFFSET_MSB 0x11 +#define LM63_REG_REMOTE_OFFSET_LSB 0x12 +#define LM63_REG_REMOTE_HIGH_MSB 0x07 +#define LM63_REG_REMOTE_HIGH_LSB 0x13 +#define LM63_REG_REMOTE_LOW_MSB 0x08 +#define LM63_REG_REMOTE_LOW_LSB 0x14 +#define LM63_REG_REMOTE_TCRIT 0x19 +#define LM63_REG_REMOTE_TCRIT_HYST 0x21 + +#define LM63_REG_ALERT_STATUS 0x02 +#define LM63_REG_ALERT_MASK 0x16 + +#define LM63_REG_MAN_ID 0xFE +#define LM63_REG_CHIP_ID 0xFF + +/* + * Conversions and various macros + * For tachometer counts, the LM63 uses 16-bit values. + * For local temperature and high limit, remote critical limit and hysteresis + * value, it uses signed 8-bit values with LSB = 1 degree Celcius. + * For remote temperature, low and high limits, it uses signed 11-bit values + * with LSB = 0.125 degree Celcius, left-justified in 16-bit registers. + */ + +#define FAN_FROM_REG(reg) ((reg) == 0xFFFC || (reg) == 0 ? 0 : \ + 5400000 / (reg)) +#define FAN_TO_REG(val) ((val) <= 82 ? 0xFFFC : \ + (5400000 / (val)) & 0xFFFC) +#define TEMP8_FROM_REG(reg) ((reg) * 1000) +#define TEMP8_TO_REG(val) ((val) <= -128000 ? -128 : \ + (val) >= 127000 ? 127 : \ + (val) < 0 ? ((val) - 500) / 1000 : \ + ((val) + 500) / 1000) +#define TEMP11_FROM_REG(reg) ((reg) / 32 * 125) +#define TEMP11_TO_REG(val) ((val) <= -128000 ? 0x8000 : \ + (val) >= 127875 ? 0x7FE0 : \ + (val) < 0 ? ((val) - 62) / 125 * 32 : \ + ((val) + 62) / 125 * 32) +#define HYST_TO_REG(val) ((val) <= 0 ? 0 : \ + (val) >= 127000 ? 127 : \ + ((val) + 500) / 1000) + +/* + * Functions declaration + */ + +static int lm63_attach_adapter(struct i2c_adapter *adapter); +static int lm63_detach_client(struct i2c_client *client); + +static struct lm63_data *lm63_update_device(struct device *dev); + +static int lm63_detect(struct i2c_adapter *adapter, int address, int kind); +static void lm63_init_client(struct i2c_client *client); + +/* + * Driver data (common to all clients) + */ + +static struct i2c_driver lm63_driver = { + .owner = THIS_MODULE, + .name = "lm63", + .flags = I2C_DF_NOTIFY, + .attach_adapter = lm63_attach_adapter, + .detach_client = lm63_detach_client, +}; + +/* + * Client data (each client gets its own) + */ + +struct lm63_data { + struct i2c_client client; + struct semaphore update_lock; + char valid; /* zero until following fields are valid */ + unsigned long last_updated; /* in jiffies */ + + /* registers values */ + u8 config, config_fan; + u16 fan1_input; + u16 fan1_low; + u8 pwm1_freq; + u8 pwm1_value; + s8 temp1_input; + s8 temp1_high; + s16 temp2_input; + s16 temp2_high; + s16 temp2_low; + s8 temp2_crit; + u8 temp2_crit_hyst; + u8 alarms; +}; + +/* + * Sysfs callback functions and files + */ + +#define show_fan(value) \ +static ssize_t show_##value(struct device *dev, char *buf) \ +{ \ + struct lm63_data *data = lm63_update_device(dev); \ + return sprintf(buf, "%d\n", FAN_FROM_REG(data->value)); \ +} +show_fan(fan1_input); +show_fan(fan1_low); + +static ssize_t set_fan1_low(struct device *dev, const char *buf, + size_t count) +{ + struct i2c_client *client = to_i2c_client(dev); + struct lm63_data *data = i2c_get_clientdata(client); + unsigned long val = simple_strtoul(buf, NULL, 10); + data->fan1_low = FAN_TO_REG(val); + i2c_smbus_write_byte_data(client, LM63_REG_TACH_LIMIT_LSB, + data->fan1_low & 0xFF); + i2c_smbus_write_byte_data(client, LM63_REG_TACH_LIMIT_MSB, + data->fan1_low >> 8); + return count; +} + +static ssize_t show_pwm1(struct device *dev, char *buf) +{ + struct lm63_data *data = lm63_update_device(dev); + return sprintf(buf, "%d\n", data->pwm1_value >= 2 * data->pwm1_freq ? + 255 : (data->pwm1_value * 255 + data->pwm1_freq) / + (2 * data->pwm1_freq)); +} + +static ssize_t set_pwm1(struct device *dev, const char *buf, size_t count) +{ + struct i2c_client *client = to_i2c_client(dev); + struct lm63_data *data = i2c_get_clientdata(client); + unsigned long val; + + if (!(data->config_fan & 0x20)) /* register is read-only */ + return -EPERM; + + val = simple_strtoul(buf, NULL, 10); + data->pwm1_value = val <= 0 ? 0 : + val >= 255 ? 2 * data->pwm1_freq : + (val * data->pwm1_freq * 2 + 127) / 255; + i2c_smbus_write_byte_data(client, LM63_REG_PWM_VALUE, data->pwm1_value); + return count; +} + +static ssize_t show_pwm1_enable(struct device *dev, char *buf) +{ + struct lm63_data *data = lm63_update_device(dev); + return sprintf(buf, "%d\n", data->config_fan & 0x20 ? 1 : 2); +} + +#define show_temp8(value) \ +static ssize_t show_##value(struct device *dev, char *buf) \ +{ \ + struct lm63_data *data = lm63_update_device(dev); \ + return sprintf(buf, "%d\n", TEMP8_FROM_REG(data->value)); \ +} +#define show_temp11(value) \ +static ssize_t show_##value(struct device *dev, char *buf) \ +{ \ + struct lm63_data *data = lm63_update_device(dev); \ + return sprintf(buf, "%d\n", TEMP11_FROM_REG(data->value)); \ +} +show_temp8(temp1_input); +show_temp8(temp1_high); +show_temp11(temp2_input); +show_temp11(temp2_high); +show_temp11(temp2_low); +show_temp8(temp2_crit); + +#define set_temp8(value, reg) \ +static ssize_t set_##value(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct lm63_data *data = i2c_get_clientdata(client); \ + long val = simple_strtol(buf, NULL, 10); \ + data->value = TEMP8_TO_REG(val); \ + i2c_smbus_write_byte_data(client, reg, data->value); \ + return count; \ +} +#define set_temp11(value, reg_msb, reg_lsb) \ +static ssize_t set_##value(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct lm63_data *data = i2c_get_clientdata(client); \ + long val = simple_strtol(buf, NULL, 10); \ + data->value = TEMP11_TO_REG(val); \ + i2c_smbus_write_byte_data(client, reg_msb, data->value >> 8); \ + i2c_smbus_write_byte_data(client, reg_lsb, data->value & 0xff); \ + return count; \ +} +set_temp8(temp1_high, LM63_REG_LOCAL_HIGH); +set_temp11(temp2_high, LM63_REG_REMOTE_HIGH_MSB, LM63_REG_REMOTE_HIGH_LSB); +set_temp11(temp2_low, LM63_REG_REMOTE_LOW_MSB, LM63_REG_REMOTE_LOW_LSB); + +/* Hysteresis register holds a relative value, while we want to present + an absolute to user-space */ +static ssize_t show_temp2_crit_hyst(struct device *dev, char *buf) +{ + struct lm63_data *data = lm63_update_device(dev); + return sprintf(buf, "%d\n", TEMP8_FROM_REG(data->temp2_crit) + - TEMP8_FROM_REG(data->temp2_crit_hyst)); +} + +/* And now the other way around, user-space provides an absolute + hysteresis value and we have to store a relative one */ +static ssize_t set_temp2_crit_hyst(struct device *dev, const char *buf, + size_t count) +{ + struct i2c_client *client = to_i2c_client(dev); + struct lm63_data *data = i2c_get_clientdata(client); + int hyst = TEMP8_FROM_REG(data->temp2_crit) - + simple_strtol(buf, NULL, 10); + i2c_smbus_write_byte_data(client, LM63_REG_REMOTE_TCRIT_HYST, + HYST_TO_REG(hyst)); + return count; +} + +static ssize_t show_alarms(struct device *dev, char *buf) +{ + struct lm63_data *data = lm63_update_device(dev); + return sprintf(buf, "%u\n", data->alarms); +} + +static DEVICE_ATTR(fan1_input, S_IRUGO, show_fan1_input, NULL); +static DEVICE_ATTR(fan1_min, S_IWUSR | S_IRUGO, show_fan1_low, + set_fan1_low); + +static DEVICE_ATTR(pwm1, S_IWUSR | S_IRUGO, show_pwm1, set_pwm1); +static DEVICE_ATTR(pwm1_enable, S_IRUGO, show_pwm1_enable, NULL); + +static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp1_input, NULL); +static DEVICE_ATTR(temp1_max, S_IWUSR | S_IRUGO, show_temp1_high, + set_temp1_high); + +static DEVICE_ATTR(temp2_input, S_IRUGO, show_temp2_input, NULL); +static DEVICE_ATTR(temp2_min, S_IWUSR | S_IRUGO, show_temp2_low, + set_temp2_low); +static DEVICE_ATTR(temp2_max, S_IWUSR | S_IRUGO, show_temp2_high, + set_temp2_high); +static DEVICE_ATTR(temp2_crit, S_IRUGO, show_temp2_crit, NULL); +static DEVICE_ATTR(temp2_crit_hyst, S_IWUSR | S_IRUGO, show_temp2_crit_hyst, + set_temp2_crit_hyst); + +static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); + +/* + * Real code + */ + +static int lm63_attach_adapter(struct i2c_adapter *adapter) +{ + if (!(adapter->class & I2C_CLASS_HWMON)) + return 0; + return i2c_detect(adapter, &addr_data, lm63_detect); +} + +/* + * The following function does more than just detection. If detection + * succeeds, it also registers the new chip. + */ +static int lm63_detect(struct i2c_adapter *adapter, int address, int kind) +{ + struct i2c_client *new_client; + struct lm63_data *data; + int err = 0; + + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) + goto exit; + + if (!(data = kmalloc(sizeof(struct lm63_data), GFP_KERNEL))) { + err = -ENOMEM; + goto exit; + } + memset(data, 0, sizeof(struct lm63_data)); + + /* The common I2C client data is placed right before the + LM63-specific data. */ + new_client = &data->client; + i2c_set_clientdata(new_client, data); + new_client->addr = address; + new_client->adapter = adapter; + new_client->driver = &lm63_driver; + new_client->flags = 0; + + /* Default to an LM63 if forced */ + if (kind == 0) + kind = lm63; + + if (kind < 0) { /* must identify */ + u8 man_id, chip_id, reg_config1, reg_config2; + u8 reg_alert_status, reg_alert_mask; + + man_id = i2c_smbus_read_byte_data(new_client, + LM63_REG_MAN_ID); + chip_id = i2c_smbus_read_byte_data(new_client, + LM63_REG_CHIP_ID); + reg_config1 = i2c_smbus_read_byte_data(new_client, + LM63_REG_CONFIG1); + reg_config2 = i2c_smbus_read_byte_data(new_client, + LM63_REG_CONFIG2); + reg_alert_status = i2c_smbus_read_byte_data(new_client, + LM63_REG_ALERT_STATUS); + reg_alert_mask = i2c_smbus_read_byte_data(new_client, + LM63_REG_ALERT_MASK); + + if (man_id == 0x01 /* National Semiconductor */ + && chip_id == 0x41 /* LM63 */ + && (reg_config1 & 0x18) == 0x00 + && (reg_config2 & 0xF8) == 0x00 + && (reg_alert_status & 0x20) == 0x00 + && (reg_alert_mask & 0xA4) == 0xA4) { + kind = lm63; + } else { /* failed */ + dev_dbg(&adapter->dev, "Unsupported chip " + "(man_id=0x%02X, chip_id=0x%02X).\n", + man_id, chip_id); + goto exit_free; + } + } + + strlcpy(new_client->name, "lm63", I2C_NAME_SIZE); + data->valid = 0; + init_MUTEX(&data->update_lock); + + /* Tell the I2C layer a new client has arrived */ + if ((err = i2c_attach_client(new_client))) + goto exit_free; + + /* Initialize the LM63 chip */ + lm63_init_client(new_client); + + /* Register sysfs hooks */ + if (data->config & 0x04) { /* tachometer enabled */ + device_create_file(&new_client->dev, &dev_attr_fan1_input); + device_create_file(&new_client->dev, &dev_attr_fan1_min); + } + device_create_file(&new_client->dev, &dev_attr_pwm1); + device_create_file(&new_client->dev, &dev_attr_pwm1_enable); + device_create_file(&new_client->dev, &dev_attr_temp1_input); + device_create_file(&new_client->dev, &dev_attr_temp2_input); + device_create_file(&new_client->dev, &dev_attr_temp2_min); + device_create_file(&new_client->dev, &dev_attr_temp1_max); + device_create_file(&new_client->dev, &dev_attr_temp2_max); + device_create_file(&new_client->dev, &dev_attr_temp2_crit); + device_create_file(&new_client->dev, &dev_attr_temp2_crit_hyst); + device_create_file(&new_client->dev, &dev_attr_alarms); + + return 0; + +exit_free: + kfree(data); +exit: + return err; +} + +/* Idealy we shouldn't have to initialize anything, since the BIOS + should have taken care of everything */ +static void lm63_init_client(struct i2c_client *client) +{ + struct lm63_data *data = i2c_get_clientdata(client); + + data->config = i2c_smbus_read_byte_data(client, LM63_REG_CONFIG1); + data->config_fan = i2c_smbus_read_byte_data(client, + LM63_REG_CONFIG_FAN); + + /* Start converting if needed */ + if (data->config & 0x40) { /* standby */ + dev_dbg(&client->dev, "Switching to operational mode"); + data->config &= 0xA7; + i2c_smbus_write_byte_data(client, LM63_REG_CONFIG1, + data->config); + } + + /* We may need pwm1_freq before ever updating the client data */ + data->pwm1_freq = i2c_smbus_read_byte_data(client, LM63_REG_PWM_FREQ); + if (data->pwm1_freq == 0) + data->pwm1_freq = 1; + + /* Show some debug info about the LM63 configuration */ + dev_dbg(&client->dev, "Alert/tach pin configured for %s\n", + (data->config & 0x04) ? "tachometer input" : + "alert output"); + dev_dbg(&client->dev, "PWM clock %s kHz, output frequency %u Hz\n", + (data->config_fan & 0x04) ? "1.4" : "360", + ((data->config_fan & 0x04) ? 700 : 180000) / data->pwm1_freq); + dev_dbg(&client->dev, "PWM output active %s, %s mode\n", + (data->config_fan & 0x10) ? "low" : "high", + (data->config_fan & 0x20) ? "manual" : "auto"); +} + +static int lm63_detach_client(struct i2c_client *client) +{ + int err; + + if ((err = i2c_detach_client(client))) { + dev_err(&client->dev, "Client deregistration failed, " + "client not detached\n"); + return err; + } + + kfree(i2c_get_clientdata(client)); + return 0; +} + +static struct lm63_data *lm63_update_device(struct device *dev) +{ + struct i2c_client *client = to_i2c_client(dev); + struct lm63_data *data = i2c_get_clientdata(client); + + down(&data->update_lock); + + if ((jiffies - data->last_updated > HZ) || + (jiffies < data->last_updated) || + !data->valid) { + if (data->config & 0x04) { /* tachometer enabled */ + /* order matters for fan1_input */ + data->fan1_input = i2c_smbus_read_byte_data(client, + LM63_REG_TACH_COUNT_LSB) & 0xFC; + data->fan1_input |= i2c_smbus_read_byte_data(client, + LM63_REG_TACH_COUNT_MSB) << 8; + data->fan1_low = (i2c_smbus_read_byte_data(client, + LM63_REG_TACH_LIMIT_LSB) & 0xFC) + | (i2c_smbus_read_byte_data(client, + LM63_REG_TACH_LIMIT_MSB) << 8); + } + + data->pwm1_freq = i2c_smbus_read_byte_data(client, + LM63_REG_PWM_FREQ); + if (data->pwm1_freq == 0) + data->pwm1_freq = 1; + data->pwm1_value = i2c_smbus_read_byte_data(client, + LM63_REG_PWM_VALUE); + + data->temp1_input = i2c_smbus_read_byte_data(client, + LM63_REG_LOCAL_TEMP); + data->temp1_high = i2c_smbus_read_byte_data(client, + LM63_REG_LOCAL_HIGH); + + /* order matters for temp2_input */ + data->temp2_input = i2c_smbus_read_byte_data(client, + LM63_REG_REMOTE_TEMP_MSB) << 8; + data->temp2_input |= i2c_smbus_read_byte_data(client, + LM63_REG_REMOTE_TEMP_LSB); + data->temp2_high = (i2c_smbus_read_byte_data(client, + LM63_REG_REMOTE_HIGH_MSB) << 8) + | i2c_smbus_read_byte_data(client, + LM63_REG_REMOTE_HIGH_LSB); + data->temp2_low = (i2c_smbus_read_byte_data(client, + LM63_REG_REMOTE_LOW_MSB) << 8) + | i2c_smbus_read_byte_data(client, + LM63_REG_REMOTE_LOW_LSB); + data->temp2_crit = i2c_smbus_read_byte_data(client, + LM63_REG_REMOTE_TCRIT); + data->temp2_crit_hyst = i2c_smbus_read_byte_data(client, + LM63_REG_REMOTE_TCRIT_HYST); + + data->alarms = i2c_smbus_read_byte_data(client, + LM63_REG_ALERT_STATUS) & 0x7F; + + data->last_updated = jiffies; + data->valid = 1; + } + + up(&data->update_lock); + + return data; +} + +static int __init sensors_lm63_init(void) +{ + return i2c_add_driver(&lm63_driver); +} + +static void __exit sensors_lm63_exit(void) +{ + i2c_del_driver(&lm63_driver); +} + +MODULE_AUTHOR("Jean Delvare "); +MODULE_DESCRIPTION("LM63 driver"); +MODULE_LICENSE("GPL"); + +module_init(sensors_lm63_init); +module_exit(sensors_lm63_exit); diff -Nru a/drivers/i2c/chips/lm75.c b/drivers/i2c/chips/lm75.c --- a/drivers/i2c/chips/lm75.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/i2c/chips/lm75.c 2004-11-10 17:19:02 -08:00 @@ -28,10 +28,9 @@ /* Addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x48, 0x4f, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c, + 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_1(lm75); diff -Nru a/drivers/i2c/chips/lm77.c b/drivers/i2c/chips/lm77.c --- a/drivers/i2c/chips/lm77.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/i2c/chips/lm77.c 2004-11-10 17:19:07 -08:00 @@ -34,10 +34,8 @@ /* Addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x48, 0x4b, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_1(lm77); diff -Nru a/drivers/i2c/chips/lm78.c b/drivers/i2c/chips/lm78.c --- a/drivers/i2c/chips/lm78.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/i2c/chips/lm78.c 2004-11-10 17:19:06 -08:00 @@ -27,10 +27,11 @@ #include /* Addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x20, 0x2f, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, + 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, + 0x2f, I2C_CLIENT_END }; static unsigned int normal_isa[] = { 0x0290, I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_3(lm78, lm78j, lm79); diff -Nru a/drivers/i2c/chips/lm80.c b/drivers/i2c/chips/lm80.c --- a/drivers/i2c/chips/lm80.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/i2c/chips/lm80.c 2004-11-10 17:19:02 -08:00 @@ -29,10 +29,9 @@ #include /* Addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x28, 0x2f, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, + 0x2d, 0x2e, 0x2f, I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_1(lm80); diff -Nru a/drivers/i2c/chips/lm83.c b/drivers/i2c/chips/lm83.c --- a/drivers/i2c/chips/lm83.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/i2c/chips/lm83.c 2004-11-10 17:19:04 -08:00 @@ -40,11 +40,11 @@ * addresses. */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x18, 0x1a, 0x29, 0x2b, - 0x4c, 0x4e, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a, + 0x29, 0x2a, 0x2b, + 0x4c, 0x4d, 0x4e, + I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* * Insmod parameters diff -Nru a/drivers/i2c/chips/lm85.c b/drivers/i2c/chips/lm85.c --- a/drivers/i2c/chips/lm85.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/i2c/chips/lm85.c 2004-11-10 17:19:03 -08:00 @@ -4,6 +4,7 @@ Copyright (c) 1998, 1999 Frodo Looijaard Copyright (c) 2002, 2003 Philip Pokorny Copyright (c) 2003 Margit Schubert-While + Copyright (c) 2004 Justin Thiessen Chip details at @@ -29,17 +30,10 @@ #include #include #include -/* -#include -*/ - -#undef LM85EXTENDEDFUNC /* Extended functionality */ /* Addresses to scan */ static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_4(lm85b, lm85c, adm1027, adt7463); @@ -163,8 +157,6 @@ #define EXT_FROM_REG(val,sensor) (((val)>>(sensor * 2))&0x03) -#ifdef LM85EXTENDEDFUNC /* Extended functionality */ - /* ZONEs have the following parameters: * Limit (low) temp, 1. degC * Hysteresis (below limit), 1. degC (0-15) @@ -183,20 +175,32 @@ * Filter constant (or disabled) .1 seconds */ -/* These are the zone temperature range encodings */ -static int lm85_range_map[] = { /* .1 degC */ - 20, 25, 33, 40, 50, 66, - 80, 100, 133, 160, 200, 266, - 320, 400, 533, 800 +/* These are the zone temperature range encodings in .001 degree C */ +static int lm85_range_map[] = { + 2000, 2500, 3300, 4000, 5000, 6600, + 8000, 10000, 13300, 16000, 20000, 26600, + 32000, 40000, 53300, 80000 }; static int RANGE_TO_REG( int range ) { int i; - if( range >= lm85_range_map[15] ) { return 15 ; } - for( i = 0 ; i < 15 ; ++i ) - if( range <= lm85_range_map[i] ) - break ; + if ( range < lm85_range_map[0] ) { + return 0 ; + } else if ( range > lm85_range_map[15] ) { + return 15 ; + } else { /* find closest match */ + for ( i = 14 ; i >= 0 ; --i ) { + if ( range > lm85_range_map[i] ) { /* range bracketed */ + if ((lm85_range_map[i+1] - range) < + (range - lm85_range_map[i])) { + i++; + break; + } + break; + } + } + } return( i & 0x0f ); } #define RANGE_FROM_REG(val) (lm85_range_map[(val)&0x0f]) @@ -206,41 +210,9 @@ * MSB (bit 3, value 8). If the enable bit is 0, the encoded value * is ignored, or set to 0. */ -static int lm85_smooth_map[] = { /* .1 sec */ - 350, 176, 118, 70, 44, 30, 16, 8 -/* 35.4 * 1/1, 1/2, 1/3, 1/5, 1/8, 1/12, 1/24, 1/48 */ - }; -static int SMOOTH_TO_REG( int smooth ) -{ - int i; - - if( smooth <= 0 ) { return 0 ; } /* Disabled */ - for( i = 0 ; i < 7 ; ++i ) - if( smooth >= lm85_smooth_map[i] ) - break ; - return( (i & 0x07) | 0x08 ); -} -#define SMOOTH_FROM_REG(val) ((val)&0x08?lm85_smooth_map[(val)&0x07]:0) - -/* These are the fan spinup delay time encodings */ -static int lm85_spinup_map[] = { /* .1 sec */ - 0, 1, 2, 4, 7, 10, 20, 40 - }; -static int SPINUP_TO_REG( int spinup ) -{ - int i; - - if( spinup >= lm85_spinup_map[7] ) { return 7 ; } - for( i = 0 ; i < 7 ; ++i ) - if( spinup <= lm85_spinup_map[i] ) - break ; - return( i & 0x07 ); -} -#define SPINUP_FROM_REG(val) (lm85_spinup_map[(val)&0x07]) - /* These are the PWM frequency encodings */ static int lm85_freq_map[] = { /* .1 Hz */ - 100, 150, 230, 300, 380, 470, 620, 980 + 100, 150, 230, 300, 380, 470, 620, 940 }; static int FREQ_TO_REG( int freq ) { @@ -266,13 +238,9 @@ * -2 -- PWM responds to manual control */ -#endif /* Extended functionality */ - static int lm85_zone_map[] = { 1, 2, 3, -1, 0, 23, 123, -2 }; #define ZONE_FROM_REG(val) (lm85_zone_map[((val)>>5)&0x07]) -#ifdef LM85EXTENDEDFUNC /* Extended functionality */ - static int ZONE_TO_REG( int zone ) { int i; @@ -285,10 +253,8 @@ return( (i & 0x07)<<5 ); } -#endif /* Extended functionality */ - -#define HYST_TO_REG(val) (SENSORS_LIMIT((-(val)+5)/10,0,15)) -#define HYST_FROM_REG(val) (-(val)*10) +#define HYST_TO_REG(val) (SENSORS_LIMIT(((val)+500)/1000,0,15)) +#define HYST_FROM_REG(val) ((val)*1000) #define OFFSET_TO_REG(val) (SENSORS_LIMIT((val)/25,-127,127)) #define OFFSET_FROM_REG(val) ((val)*25) @@ -338,6 +304,14 @@ u8 hyst; /* Low limit hysteresis. (0-15) */ u8 range; /* Temp range, encoded */ s8 critical; /* "All fans ON" temp limit */ + u8 off_desired; /* Actual "off" temperature specified. Preserved + * to prevent "drift" as other autofan control + * values change. + */ + u8 max_desired; /* Actual "max" temperature specified. Preserved + * to prevent "drift" as other autofan control + * values change. + */ }; struct lm85_autofan { @@ -448,7 +422,8 @@ { \ return set_fan_min(dev, buf, count, offset - 1); \ } \ -static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_fan_##offset, NULL);\ +static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_fan_##offset, \ + NULL); \ static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, \ show_fan_##offset##_min, set_fan_##offset##_min); @@ -615,7 +590,8 @@ { \ return set_in_max(dev, buf, count, offset); \ } \ -static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_in_##offset, NULL); \ +static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_in_##offset, \ + NULL); \ static DEVICE_ATTR(in##offset##_min, S_IRUGO | S_IWUSR, \ show_in_##offset##_min, set_in_##offset##_min); \ static DEVICE_ATTR(in##offset##_max, S_IRUGO | S_IWUSR, \ @@ -695,7 +671,8 @@ { \ return set_temp_max(dev, buf, count, offset - 1); \ } \ -static DEVICE_ATTR(temp##offset##_input, S_IRUGO, show_temp_##offset, NULL); \ +static DEVICE_ATTR(temp##offset##_input, S_IRUGO, show_temp_##offset, \ + NULL); \ static DEVICE_ATTR(temp##offset##_min, S_IRUGO | S_IWUSR, \ show_temp_##offset##_min, set_temp_##offset##_min); \ static DEVICE_ATTR(temp##offset##_max, S_IRUGO | S_IWUSR, \ @@ -706,6 +683,330 @@ show_temp_reg(3); +/* Automatic PWM control */ + +static ssize_t show_pwm_auto_channels(struct device *dev, char *buf, int nr) +{ + struct lm85_data *data = lm85_update_device(dev); + return sprintf(buf,"%d\n", ZONE_FROM_REG(data->autofan[nr].config)); +} +static ssize_t set_pwm_auto_channels(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct lm85_data *data = i2c_get_clientdata(client); + int val; + + down(&data->update_lock); + val = simple_strtol(buf, NULL, 10); + data->autofan[nr].config = (data->autofan[nr].config & (~0xe0)) + | ZONE_TO_REG(val) ; + lm85_write_value(client, LM85_REG_AFAN_CONFIG(nr), + data->autofan[nr].config); + up(&data->update_lock); + return count; +} +static ssize_t show_pwm_auto_pwm_min(struct device *dev, char *buf, int nr) +{ + struct lm85_data *data = lm85_update_device(dev); + return sprintf(buf,"%d\n", PWM_FROM_REG(data->autofan[nr].min_pwm)); +} +static ssize_t set_pwm_auto_pwm_min(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct lm85_data *data = i2c_get_clientdata(client); + int val; + + down(&data->update_lock); + val = simple_strtol(buf, NULL, 10); + data->autofan[nr].min_pwm = PWM_TO_REG(val); + lm85_write_value(client, LM85_REG_AFAN_MINPWM(nr), + data->autofan[nr].min_pwm); + up(&data->update_lock); + return count; +} +static ssize_t show_pwm_auto_pwm_minctl(struct device *dev, char *buf, int nr) +{ + struct lm85_data *data = lm85_update_device(dev); + return sprintf(buf,"%d\n", data->autofan[nr].min_off); +} +static ssize_t set_pwm_auto_pwm_minctl(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct lm85_data *data = i2c_get_clientdata(client); + int val; + + down(&data->update_lock); + val = simple_strtol(buf, NULL, 10); + data->autofan[nr].min_off = val; + lm85_write_value(client, LM85_REG_AFAN_SPIKE1, data->smooth[0] + | data->syncpwm3 + | (data->autofan[0].min_off ? 0x20 : 0) + | (data->autofan[1].min_off ? 0x40 : 0) + | (data->autofan[2].min_off ? 0x80 : 0) + ); + up(&data->update_lock); + return count; +} +static ssize_t show_pwm_auto_pwm_freq(struct device *dev, char *buf, int nr) +{ + struct lm85_data *data = lm85_update_device(dev); + return sprintf(buf,"%d\n", FREQ_FROM_REG(data->autofan[nr].freq)); +} +static ssize_t set_pwm_auto_pwm_freq(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct lm85_data *data = i2c_get_clientdata(client); + int val; + + down(&data->update_lock); + val = simple_strtol(buf, NULL, 10); + data->autofan[nr].freq = FREQ_TO_REG(val); + lm85_write_value(client, LM85_REG_AFAN_RANGE(nr), + (data->zone[nr].range << 4) + | data->autofan[nr].freq + ); + up(&data->update_lock); + return count; +} +#define pwm_auto(offset) \ +static ssize_t show_pwm##offset##_auto_channels (struct device *dev, \ + char *buf) \ +{ \ + return show_pwm_auto_channels(dev, buf, offset - 1); \ +} \ +static ssize_t set_pwm##offset##_auto_channels (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_pwm_auto_channels(dev, buf, count, offset - 1); \ +} \ +static ssize_t show_pwm##offset##_auto_pwm_min (struct device *dev, \ + char *buf) \ +{ \ + return show_pwm_auto_pwm_min(dev, buf, offset - 1); \ +} \ +static ssize_t set_pwm##offset##_auto_pwm_min (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_pwm_auto_pwm_min(dev, buf, count, offset - 1); \ +} \ +static ssize_t show_pwm##offset##_auto_pwm_minctl (struct device *dev, \ + char *buf) \ +{ \ + return show_pwm_auto_pwm_minctl(dev, buf, offset - 1); \ +} \ +static ssize_t set_pwm##offset##_auto_pwm_minctl (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_pwm_auto_pwm_minctl(dev, buf, count, offset - 1); \ +} \ +static ssize_t show_pwm##offset##_auto_pwm_freq (struct device *dev, \ + char *buf) \ +{ \ + return show_pwm_auto_pwm_freq(dev, buf, offset - 1); \ +} \ +static ssize_t set_pwm##offset##_auto_pwm_freq(struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_pwm_auto_pwm_freq(dev, buf, count, offset - 1); \ +} \ +static DEVICE_ATTR(pwm##offset##_auto_channels, S_IRUGO | S_IWUSR, \ + show_pwm##offset##_auto_channels, \ + set_pwm##offset##_auto_channels); \ +static DEVICE_ATTR(pwm##offset##_auto_pwm_min, S_IRUGO | S_IWUSR, \ + show_pwm##offset##_auto_pwm_min, \ + set_pwm##offset##_auto_pwm_min); \ +static DEVICE_ATTR(pwm##offset##_auto_pwm_minctl, S_IRUGO | S_IWUSR, \ + show_pwm##offset##_auto_pwm_minctl, \ + set_pwm##offset##_auto_pwm_minctl); \ +static DEVICE_ATTR(pwm##offset##_auto_pwm_freq, S_IRUGO | S_IWUSR, \ + show_pwm##offset##_auto_pwm_freq, \ + set_pwm##offset##_auto_pwm_freq); +pwm_auto(1); +pwm_auto(2); +pwm_auto(3); + +/* Temperature settings for automatic PWM control */ + +static ssize_t show_temp_auto_temp_off(struct device *dev, char *buf, int nr) +{ + struct lm85_data *data = lm85_update_device(dev); + return sprintf(buf,"%d\n", TEMP_FROM_REG(data->zone[nr].limit) - + HYST_FROM_REG(data->zone[nr].hyst)); +} +static ssize_t set_temp_auto_temp_off(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct lm85_data *data = i2c_get_clientdata(client); + int min, val; + + down(&data->update_lock); + val = simple_strtol(buf, NULL, 10); + min = TEMP_FROM_REG(data->zone[nr].limit); + data->zone[nr].off_desired = TEMP_TO_REG(val); + data->zone[nr].hyst = HYST_TO_REG(min - val); + if ( nr == 0 || nr == 1 ) { + lm85_write_value(client, LM85_REG_AFAN_HYST1, + (data->zone[0].hyst << 4) + | data->zone[1].hyst + ); + } else { + lm85_write_value(client, LM85_REG_AFAN_HYST2, + (data->zone[2].hyst << 4) + ); + } + up(&data->update_lock); + return count; +} +static ssize_t show_temp_auto_temp_min(struct device *dev, char *buf, int nr) +{ + struct lm85_data *data = lm85_update_device(dev); + return sprintf(buf,"%d\n", TEMP_FROM_REG(data->zone[nr].limit) ); +} +static ssize_t set_temp_auto_temp_min(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct lm85_data *data = i2c_get_clientdata(client); + int val; + + down(&data->update_lock); + val = simple_strtol(buf, NULL, 10); + data->zone[nr].limit = TEMP_TO_REG(val); + lm85_write_value(client, LM85_REG_AFAN_LIMIT(nr), + data->zone[nr].limit); + +/* Update temp_auto_max and temp_auto_range */ + data->zone[nr].range = RANGE_TO_REG( + TEMP_FROM_REG(data->zone[nr].max_desired) - + TEMP_FROM_REG(data->zone[nr].limit)); + lm85_write_value(client, LM85_REG_AFAN_RANGE(nr), + ((data->zone[nr].range & 0x0f) << 4) + | (data->autofan[nr].freq & 0x07)); + +/* Update temp_auto_hyst and temp_auto_off */ + data->zone[nr].hyst = HYST_TO_REG(TEMP_FROM_REG( + data->zone[nr].limit) - TEMP_FROM_REG( + data->zone[nr].off_desired)); + if ( nr == 0 || nr == 1 ) { + lm85_write_value(client, LM85_REG_AFAN_HYST1, + (data->zone[0].hyst << 4) + | data->zone[1].hyst + ); + } else { + lm85_write_value(client, LM85_REG_AFAN_HYST2, + (data->zone[2].hyst << 4) + ); + } + up(&data->update_lock); + return count; +} +static ssize_t show_temp_auto_temp_max(struct device *dev, char *buf, int nr) +{ + struct lm85_data *data = lm85_update_device(dev); + return sprintf(buf,"%d\n", TEMP_FROM_REG(data->zone[nr].limit) + + RANGE_FROM_REG(data->zone[nr].range)); +} +static ssize_t set_temp_auto_temp_max(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct lm85_data *data = i2c_get_clientdata(client); + int min, val; + + down(&data->update_lock); + min = TEMP_FROM_REG(data->zone[nr].limit); + val = simple_strtol(buf, NULL, 10); + data->zone[nr].max_desired = TEMP_TO_REG(val); + data->zone[nr].range = RANGE_TO_REG( + val - min); + lm85_write_value(client, LM85_REG_AFAN_RANGE(nr), + ((data->zone[nr].range & 0x0f) << 4) + | (data->autofan[nr].freq & 0x07)); + up(&data->update_lock); + return count; +} +static ssize_t show_temp_auto_temp_crit(struct device *dev, char *buf, int nr) +{ + struct lm85_data *data = lm85_update_device(dev); + return sprintf(buf,"%d\n", TEMP_FROM_REG(data->zone[nr].critical)); +} +static ssize_t set_temp_auto_temp_crit(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct lm85_data *data = i2c_get_clientdata(client); + int val; + + down(&data->update_lock); + val = simple_strtol(buf, NULL, 10); + data->zone[nr].critical = TEMP_TO_REG(val); + lm85_write_value(client, LM85_REG_AFAN_CRITICAL(nr), + data->zone[nr].critical); + up(&data->update_lock); + return count; +} +#define temp_auto(offset) \ +static ssize_t show_temp##offset##_auto_temp_off (struct device *dev, \ + char *buf) \ +{ \ + return show_temp_auto_temp_off(dev, buf, offset - 1); \ +} \ +static ssize_t set_temp##offset##_auto_temp_off (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_temp_auto_temp_off(dev, buf, count, offset - 1); \ +} \ +static ssize_t show_temp##offset##_auto_temp_min (struct device *dev, \ + char *buf) \ +{ \ + return show_temp_auto_temp_min(dev, buf, offset - 1); \ +} \ +static ssize_t set_temp##offset##_auto_temp_min (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_temp_auto_temp_min(dev, buf, count, offset - 1); \ +} \ +static ssize_t show_temp##offset##_auto_temp_max (struct device *dev, \ + char *buf) \ +{ \ + return show_temp_auto_temp_max(dev, buf, offset - 1); \ +} \ +static ssize_t set_temp##offset##_auto_temp_max (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_temp_auto_temp_max(dev, buf, count, offset - 1); \ +} \ +static ssize_t show_temp##offset##_auto_temp_crit (struct device *dev, \ + char *buf) \ +{ \ + return show_temp_auto_temp_crit(dev, buf, offset - 1); \ +} \ +static ssize_t set_temp##offset##_auto_temp_crit (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_temp_auto_temp_crit(dev, buf, count, offset - 1); \ +} \ +static DEVICE_ATTR(temp##offset##_auto_temp_off, S_IRUGO | S_IWUSR, \ + show_temp##offset##_auto_temp_off, \ + set_temp##offset##_auto_temp_off); \ +static DEVICE_ATTR(temp##offset##_auto_temp_min, S_IRUGO | S_IWUSR, \ + show_temp##offset##_auto_temp_min, \ + set_temp##offset##_auto_temp_min); \ +static DEVICE_ATTR(temp##offset##_auto_temp_max, S_IRUGO | S_IWUSR, \ + show_temp##offset##_auto_temp_max, \ + set_temp##offset##_auto_temp_max); \ +static DEVICE_ATTR(temp##offset##_auto_temp_crit, S_IRUGO | S_IWUSR, \ + show_temp##offset##_auto_temp_crit, \ + set_temp##offset##_auto_temp_crit); +temp_auto(1); +temp_auto(2); +temp_auto(3); + int lm85_attach_adapter(struct i2c_adapter *adapter) { if (!(adapter->class & I2C_CLASS_HWMON)) @@ -879,6 +1180,30 @@ device_create_file(&new_client->dev, &dev_attr_vrm); device_create_file(&new_client->dev, &dev_attr_cpu0_vid); device_create_file(&new_client->dev, &dev_attr_alarms); + device_create_file(&new_client->dev, &dev_attr_pwm1_auto_channels); + device_create_file(&new_client->dev, &dev_attr_pwm2_auto_channels); + device_create_file(&new_client->dev, &dev_attr_pwm3_auto_channels); + device_create_file(&new_client->dev, &dev_attr_pwm1_auto_pwm_min); + device_create_file(&new_client->dev, &dev_attr_pwm2_auto_pwm_min); + device_create_file(&new_client->dev, &dev_attr_pwm3_auto_pwm_min); + device_create_file(&new_client->dev, &dev_attr_pwm1_auto_pwm_minctl); + device_create_file(&new_client->dev, &dev_attr_pwm2_auto_pwm_minctl); + device_create_file(&new_client->dev, &dev_attr_pwm3_auto_pwm_minctl); + device_create_file(&new_client->dev, &dev_attr_pwm1_auto_pwm_freq); + device_create_file(&new_client->dev, &dev_attr_pwm2_auto_pwm_freq); + device_create_file(&new_client->dev, &dev_attr_pwm3_auto_pwm_freq); + device_create_file(&new_client->dev, &dev_attr_temp1_auto_temp_off); + device_create_file(&new_client->dev, &dev_attr_temp2_auto_temp_off); + device_create_file(&new_client->dev, &dev_attr_temp3_auto_temp_off); + device_create_file(&new_client->dev, &dev_attr_temp1_auto_temp_min); + device_create_file(&new_client->dev, &dev_attr_temp2_auto_temp_min); + device_create_file(&new_client->dev, &dev_attr_temp3_auto_temp_min); + device_create_file(&new_client->dev, &dev_attr_temp1_auto_temp_max); + device_create_file(&new_client->dev, &dev_attr_temp2_auto_temp_max); + device_create_file(&new_client->dev, &dev_attr_temp3_auto_temp_max); + device_create_file(&new_client->dev, &dev_attr_temp1_auto_temp_crit); + device_create_file(&new_client->dev, &dev_attr_temp2_auto_temp_crit); + device_create_file(&new_client->dev, &dev_attr_temp3_auto_temp_crit); return 0; @@ -1162,7 +1487,7 @@ * post 2.7.0 CVS changes. */ MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Philip Pokorny , Margit Schubert-While "); +MODULE_AUTHOR("Philip Pokorny , Margit Schubert-While , Justin Thiessen -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x18, 0x1a, 0x29, 0x2b, - 0x4c, 0x4e, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a, + 0x29, 0x2a, 0x2b, + 0x4c, 0x4d, 0x4e, + I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* * Insmod parameters diff -Nru a/drivers/i2c/chips/pc87360.c b/drivers/i2c/chips/pc87360.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/chips/pc87360.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,1298 @@ +/* + * pc87360.c - Part of lm_sensors, Linux kernel modules + * for hardware monitoring + * Copyright (C) 2004 Jean Delvare + * + * Copied from smsc47m1.c: + * Copyright (C) 2002 Mark D. Studebaker + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Supports the following chips: + * + * Chip #vin #fan #pwm #temp devid + * PC87360 - 2 2 - 0xE1 + * PC87363 - 2 2 - 0xE8 + * PC87364 - 3 3 - 0xE4 + * PC87365 11 3 3 2 0xE5 + * PC87366 11 3 3 3-4 0xE9 + * + * This driver assumes that no more than one chip is present, and one of + * the standard Super-I/O addresses is used (0x2E/0x2F or 0x4E/0x4F). + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +static unsigned short normal_i2c[] = { I2C_CLIENT_END }; +static unsigned int normal_isa[] = { 0, I2C_CLIENT_ISA_END }; +static struct i2c_force_data forces[] = {{ NULL }}; +static u8 devid; +static unsigned int extra_isa[3]; +static u8 confreg[4]; + +enum chips { any_chip, pc87360, pc87363, pc87364, pc87365, pc87366 }; +static struct i2c_address_data addr_data = { + .normal_i2c = normal_i2c, + .normal_isa = normal_isa, + .forces = forces, +}; + +static int init = 1; +module_param(init, int, 0); +MODULE_PARM_DESC(init, + "Chip initialization level:\n" + " 0: None\n" + "*1: Forcibly enable internal voltage and temperature channels, except in9\n" + " 2: Forcibly enable all voltage and temperature channels, except in9\n" + " 3: Forcibly enable all voltage and temperature channels, including in9"); + +/* + * Super-I/O registers and operations + */ + +#define DEV 0x07 /* Register: Logical device select */ +#define DEVID 0x20 /* Register: Device ID */ +#define ACT 0x30 /* Register: Device activation */ +#define BASE 0x60 /* Register: Base address */ + +#define FSCM 0x09 /* Logical device: fans */ +#define VLM 0x0d /* Logical device: voltages */ +#define TMS 0x0e /* Logical device: temperatures */ +static const u8 logdev[3] = { FSCM, VLM, TMS }; + +#define LD_FAN 0 +#define LD_IN 1 +#define LD_TEMP 2 + +static inline void superio_outb(int sioaddr, int reg, int val) +{ + outb(reg, sioaddr); + outb(val, sioaddr+1); +} + +static inline int superio_inb(int sioaddr, int reg) +{ + outb(reg, sioaddr); + return inb(sioaddr+1); +} + +static inline void superio_exit(int sioaddr) +{ + outb(0x02, sioaddr); + outb(0x02, sioaddr+1); +} + +/* + * Logical devices + */ + +#define PC87360_EXTENT 0x10 +#define PC87365_REG_BANK 0x09 +#define NO_BANK 0xff + +/* + * Fan registers and conversions + */ + +/* nr has to be 0 or 1 (PC87360/87363) or 2 (PC87364/87365/87366) */ +#define PC87360_REG_PRESCALE(nr) (0x00 + 2 * (nr)) +#define PC87360_REG_PWM(nr) (0x01 + 2 * (nr)) +#define PC87360_REG_FAN_MIN(nr) (0x06 + 3 * (nr)) +#define PC87360_REG_FAN(nr) (0x07 + 3 * (nr)) +#define PC87360_REG_FAN_STATUS(nr) (0x08 + 3 * (nr)) + +#define FAN_FROM_REG(val,div) ((val) == 0 ? 0: \ + 480000 / ((val)*(div))) +#define FAN_TO_REG(val,div) ((val) <= 100 ? 0 : \ + 480000 / ((val)*(div))) +#define FAN_DIV_FROM_REG(val) (1 << ((val >> 5) & 0x03)) +#define FAN_STATUS_FROM_REG(val) ((val) & 0x07) + +#define FAN_CONFIG_MONITOR(val,nr) (((val) >> (2 + nr * 3)) & 1) +#define FAN_CONFIG_CONTROL(val,nr) (((val) >> (3 + nr * 3)) & 1) +#define FAN_CONFIG_INVERT(val,nr) (((val) >> (4 + nr * 3)) & 1) + +#define PWM_FROM_REG(val,inv) ((inv) ? 255 - (val) : (val)) +static inline u8 PWM_TO_REG(int val, int inv) +{ + if (inv) + val = 255 - val; + if (val < 0) + return 0; + if (val > 255) + return 255; + return val; +} + +/* + * Voltage registers and conversions + */ + +#define PC87365_REG_IN_CONVRATE 0x07 +#define PC87365_REG_IN_CONFIG 0x08 +#define PC87365_REG_IN 0x0B +#define PC87365_REG_IN_MIN 0x0D +#define PC87365_REG_IN_MAX 0x0C +#define PC87365_REG_IN_STATUS 0x0A +#define PC87365_REG_IN_ALARMS1 0x00 +#define PC87365_REG_IN_ALARMS2 0x01 +#define PC87365_REG_VID 0x06 + +#define IN_FROM_REG(val,ref) (((val) * (ref) + 128) / 256) +#define IN_TO_REG(val,ref) ((val) < 0 ? 0 : \ + (val)*256 >= (ref)*255 ? 255: \ + ((val) * 256 + (ref)/2) / (ref)) + +/* + * Temperature registers and conversions + */ + +#define PC87365_REG_TEMP_CONFIG 0x08 +#define PC87365_REG_TEMP 0x0B +#define PC87365_REG_TEMP_MIN 0x0D +#define PC87365_REG_TEMP_MAX 0x0C +#define PC87365_REG_TEMP_CRIT 0x0E +#define PC87365_REG_TEMP_STATUS 0x0A +#define PC87365_REG_TEMP_ALARMS 0x00 + +#define TEMP_FROM_REG(val) ((val) * 1000) +#define TEMP_TO_REG(val) ((val) < -55000 ? -55 : \ + (val) > 127000 ? 127 : \ + (val) < 0 ? ((val) - 500) / 1000 : \ + ((val) + 500) / 1000) + +/* + * Client data (each client gets its own) + */ + +struct pc87360_data { + struct i2c_client client; + struct semaphore lock; + struct semaphore update_lock; + char valid; /* !=0 if following fields are valid */ + unsigned long last_updated; /* In jiffies */ + + int address[3]; + + u8 fannr, innr, tempnr; + + u8 fan[3]; /* Register value */ + u8 fan_min[3]; /* Register value */ + u8 fan_status[3]; /* Register value */ + u8 pwm[3]; /* Register value */ + u16 fan_conf; /* Configuration register values, combined */ + + u16 in_vref; /* 1 mV/bit */ + u8 in[14]; /* Register value */ + u8 in_min[14]; /* Register value */ + u8 in_max[14]; /* Register value */ + u8 in_crit[3]; /* Register value */ + u8 in_status[14]; /* Register value */ + u16 in_alarms; /* Register values, combined, masked */ + u8 vid_conf; /* Configuration register value */ + u8 vrm; + u8 vid; /* Register value */ + + s8 temp[3]; /* Register value */ + s8 temp_min[3]; /* Register value */ + s8 temp_max[3]; /* Register value */ + s8 temp_crit[3]; /* Register value */ + u8 temp_status[3]; /* Register value */ + u8 temp_alarms; /* Register value, masked */ +}; + +/* + * Functions declaration + */ + +static int pc87360_attach_adapter(struct i2c_adapter *adapter); +static int pc87360_detect(struct i2c_adapter *adapter, int address, int kind); +static int pc87360_detach_client(struct i2c_client *client); + +static int pc87360_read_value(struct pc87360_data *data, u8 ldi, u8 bank, + u8 reg); +static void pc87360_write_value(struct pc87360_data *data, u8 ldi, u8 bank, + u8 reg, u8 value); +static void pc87360_init_client(struct i2c_client *client, int use_thermistors); +static struct pc87360_data *pc87360_update_device(struct device *dev); + +/* + * Driver data (common to all clients) + */ + +static struct i2c_driver pc87360_driver = { + .owner = THIS_MODULE, + .name = "pc87360", + .flags = I2C_DF_NOTIFY, + .attach_adapter = pc87360_attach_adapter, + .detach_client = pc87360_detach_client, +}; + +/* + * Sysfs stuff + */ + +static ssize_t set_fan_min(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct pc87360_data *data = i2c_get_clientdata(client); + long fan_min = simple_strtol(buf, NULL, 10); + + fan_min = FAN_TO_REG(fan_min, FAN_DIV_FROM_REG(data->fan_status[nr])); + + /* If it wouldn't fit, change clock divisor */ + while (fan_min > 255 + && (data->fan_status[nr] & 0x60) != 0x60) { + fan_min >>= 1; + data->fan[nr] >>= 1; + data->fan_status[nr] += 0x20; + } + data->fan_min[nr] = fan_min > 255 ? 255 : fan_min; + pc87360_write_value(data, LD_FAN, NO_BANK, PC87360_REG_FAN_MIN(nr), + data->fan_min[nr]); + + /* Write new divider, preserve alarm bits */ + pc87360_write_value(data, LD_FAN, NO_BANK, PC87360_REG_FAN_STATUS(nr), + data->fan_status[nr] & 0xF9); + + return count; +} + +#define show_and_set_fan(offset) \ +static ssize_t show_fan##offset##_input(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", FAN_FROM_REG(data->fan[offset-1], \ + FAN_DIV_FROM_REG(data->fan_status[offset-1]))); \ +} \ +static ssize_t show_fan##offset##_min(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", FAN_FROM_REG(data->fan_min[offset-1], \ + FAN_DIV_FROM_REG(data->fan_status[offset-1]))); \ +} \ +static ssize_t show_fan##offset##_div(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", \ + FAN_DIV_FROM_REG(data->fan_status[offset-1])); \ +} \ +static ssize_t show_fan##offset##_status(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", \ + FAN_STATUS_FROM_REG(data->fan_status[offset-1])); \ +} \ +static ssize_t set_fan##offset##_min(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + return set_fan_min(dev, buf, count, offset-1); \ +} \ +static DEVICE_ATTR(fan##offset##_input, S_IRUGO, \ + show_fan##offset##_input, NULL); \ +static DEVICE_ATTR(fan##offset##_min, S_IWUSR | S_IRUGO, \ + show_fan##offset##_min, set_fan##offset##_min); \ +static DEVICE_ATTR(fan##offset##_div, S_IRUGO, \ + show_fan##offset##_div, NULL); \ +static DEVICE_ATTR(fan##offset##_status, S_IRUGO, \ + show_fan##offset##_status, NULL); +show_and_set_fan(1) +show_and_set_fan(2) +show_and_set_fan(3) + +#define show_and_set_pwm(offset) \ +static ssize_t show_pwm##offset(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", \ + PWM_FROM_REG(data->pwm[offset-1], \ + FAN_CONFIG_INVERT(data->fan_conf, \ + offset-1))); \ +} \ +static ssize_t set_pwm##offset(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct pc87360_data *data = i2c_get_clientdata(client); \ + long val = simple_strtol(buf, NULL, 10); \ + data->pwm[offset-1] = PWM_TO_REG(val, \ + FAN_CONFIG_INVERT(data->fan_conf, offset-1)); \ + pc87360_write_value(data, LD_FAN, NO_BANK, PC87360_REG_PWM(offset-1), \ + data->pwm[offset-1]); \ + return count; \ +} \ +static DEVICE_ATTR(pwm##offset, S_IWUSR | S_IRUGO, \ + show_pwm##offset, set_pwm##offset); +show_and_set_pwm(1) +show_and_set_pwm(2) +show_and_set_pwm(3) + +#define show_and_set_in(offset) \ +static ssize_t show_in##offset##_input(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", IN_FROM_REG(data->in[offset], \ + data->in_vref)); \ +} \ +static ssize_t show_in##offset##_min(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", IN_FROM_REG(data->in_min[offset], \ + data->in_vref)); \ +} \ +static ssize_t show_in##offset##_max(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", IN_FROM_REG(data->in_max[offset], \ + data->in_vref)); \ +} \ +static ssize_t show_in##offset##_status(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", data->in_status[offset]); \ +} \ +static ssize_t set_in##offset##_min(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct pc87360_data *data = i2c_get_clientdata(client); \ + long val = simple_strtol(buf, NULL, 10); \ + data->in_min[offset] = IN_TO_REG(val, data->in_vref); \ + pc87360_write_value(data, LD_IN, offset, PC87365_REG_IN_MIN, \ + data->in_min[offset]); \ + return count; \ +} \ +static ssize_t set_in##offset##_max(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct pc87360_data *data = i2c_get_clientdata(client); \ + long val = simple_strtol(buf, NULL, 10); \ + data->in_max[offset] = IN_TO_REG(val, \ + data->in_vref); \ + pc87360_write_value(data, LD_IN, offset, PC87365_REG_IN_MAX, \ + data->in_max[offset]); \ + return count; \ +} \ +static DEVICE_ATTR(in##offset##_input, S_IRUGO, \ + show_in##offset##_input, NULL); \ +static DEVICE_ATTR(in##offset##_min, S_IWUSR | S_IRUGO, \ + show_in##offset##_min, set_in##offset##_min); \ +static DEVICE_ATTR(in##offset##_max, S_IWUSR | S_IRUGO, \ + show_in##offset##_max, set_in##offset##_max); \ +static DEVICE_ATTR(in##offset##_status, S_IRUGO, \ + show_in##offset##_status, NULL); +show_and_set_in(0) +show_and_set_in(1) +show_and_set_in(2) +show_and_set_in(3) +show_and_set_in(4) +show_and_set_in(5) +show_and_set_in(6) +show_and_set_in(7) +show_and_set_in(8) +show_and_set_in(9) +show_and_set_in(10) + +#define show_and_set_therm(offset) \ +static ssize_t show_temp##offset##_input(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", IN_FROM_REG(data->in[offset+7], \ + data->in_vref)); \ +} \ +static ssize_t show_temp##offset##_min(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", IN_FROM_REG(data->in_min[offset+7], \ + data->in_vref)); \ +} \ +static ssize_t show_temp##offset##_max(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", IN_FROM_REG(data->in_max[offset+7], \ + data->in_vref)); \ +} \ +static ssize_t show_temp##offset##_crit(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", IN_FROM_REG(data->in_crit[offset-4], \ + data->in_vref)); \ +} \ +static ssize_t show_temp##offset##_status(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%u\n", data->in_status[offset+7]); \ +} \ +static ssize_t set_temp##offset##_min(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct pc87360_data *data = i2c_get_clientdata(client); \ + long val = simple_strtol(buf, NULL, 10); \ + data->in_min[offset+7] = IN_TO_REG(val, data->in_vref); \ + pc87360_write_value(data, LD_IN, offset+7, PC87365_REG_TEMP_MIN, \ + data->in_min[offset+7]); \ + return count; \ +} \ +static ssize_t set_temp##offset##_max(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct pc87360_data *data = i2c_get_clientdata(client); \ + long val = simple_strtol(buf, NULL, 10); \ + data->in_max[offset+7] = IN_TO_REG(val, data->in_vref); \ + pc87360_write_value(data, LD_IN, offset+7, PC87365_REG_TEMP_MAX, \ + data->in_max[offset+7]); \ + return count; \ +} \ +static ssize_t set_temp##offset##_crit(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct pc87360_data *data = i2c_get_clientdata(client); \ + long val = simple_strtol(buf, NULL, 10); \ + data->in_crit[offset-4] = IN_TO_REG(val, data->in_vref); \ + pc87360_write_value(data, LD_IN, offset+7, PC87365_REG_TEMP_CRIT, \ + data->in_crit[offset-4]); \ + return count; \ +} \ +static DEVICE_ATTR(temp##offset##_input, S_IRUGO, \ + show_temp##offset##_input, NULL); \ +static DEVICE_ATTR(temp##offset##_min, S_IWUSR | S_IRUGO, \ + show_temp##offset##_min, set_temp##offset##_min); \ +static DEVICE_ATTR(temp##offset##_max, S_IWUSR | S_IRUGO, \ + show_temp##offset##_max, set_temp##offset##_max); \ +static DEVICE_ATTR(temp##offset##_crit, S_IWUSR | S_IRUGO, \ + show_temp##offset##_crit, set_temp##offset##_crit); \ +static DEVICE_ATTR(temp##offset##_status, S_IRUGO, \ + show_temp##offset##_status, NULL); +show_and_set_therm(4) +show_and_set_therm(5) +show_and_set_therm(6) + +static ssize_t show_vid(struct device *dev, char *buf) +{ + struct pc87360_data *data = pc87360_update_device(dev); + return sprintf(buf, "%u\n", vid_from_reg(data->vid, data->vrm)); +} +static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL); + +static ssize_t show_vrm(struct device *dev, char *buf) +{ + struct pc87360_data *data = pc87360_update_device(dev); + return sprintf(buf, "%u\n", data->vrm); +} +static ssize_t set_vrm(struct device *dev, const char *buf, size_t count) +{ + struct i2c_client *client = to_i2c_client(dev); + struct pc87360_data *data = i2c_get_clientdata(client); + data->vrm = simple_strtoul(buf, NULL, 10); + return count; +} +static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm, set_vrm); + +static ssize_t show_in_alarms(struct device *dev, char *buf) +{ + struct pc87360_data *data = pc87360_update_device(dev); + return sprintf(buf, "%u\n", data->in_alarms); +} +static DEVICE_ATTR(alarms_in, S_IRUGO, show_in_alarms, NULL); + +#define show_and_set_temp(offset) \ +static ssize_t show_temp##offset##_input(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[offset-1])); \ +} \ +static ssize_t show_temp##offset##_min(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_min[offset-1])); \ +} \ +static ssize_t show_temp##offset##_max(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max[offset-1])); \ +}\ +static ssize_t show_temp##offset##_crit(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_crit[offset-1])); \ +}\ +static ssize_t show_temp##offset##_status(struct device *dev, char *buf) \ +{ \ + struct pc87360_data *data = pc87360_update_device(dev); \ + return sprintf(buf, "%d\n", data->temp_status[offset-1]); \ +}\ +static ssize_t set_temp##offset##_min(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct pc87360_data *data = i2c_get_clientdata(client); \ + long val = simple_strtol(buf, NULL, 10); \ + data->temp_min[offset-1] = TEMP_TO_REG(val); \ + pc87360_write_value(data, LD_TEMP, offset-1, PC87365_REG_TEMP_MIN, \ + data->temp_min[offset-1]); \ + return count; \ +} \ +static ssize_t set_temp##offset##_max(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct pc87360_data *data = i2c_get_clientdata(client); \ + long val = simple_strtol(buf, NULL, 10); \ + data->temp_max[offset-1] = TEMP_TO_REG(val); \ + pc87360_write_value(data, LD_TEMP, offset-1, PC87365_REG_TEMP_MAX, \ + data->temp_max[offset-1]); \ + return count; \ +} \ +static ssize_t set_temp##offset##_crit(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct pc87360_data *data = i2c_get_clientdata(client); \ + long val = simple_strtol(buf, NULL, 10); \ + data->temp_crit[offset-1] = TEMP_TO_REG(val); \ + pc87360_write_value(data, LD_TEMP, offset-1, PC87365_REG_TEMP_CRIT, \ + data->temp_crit[offset-1]); \ + return count; \ +} \ +static DEVICE_ATTR(temp##offset##_input, S_IRUGO, \ + show_temp##offset##_input, NULL); \ +static DEVICE_ATTR(temp##offset##_min, S_IWUSR | S_IRUGO, \ + show_temp##offset##_min, set_temp##offset##_min); \ +static DEVICE_ATTR(temp##offset##_max, S_IWUSR | S_IRUGO, \ + show_temp##offset##_max, set_temp##offset##_max); \ +static DEVICE_ATTR(temp##offset##_crit, S_IWUSR | S_IRUGO, \ + show_temp##offset##_crit, set_temp##offset##_crit); \ +static DEVICE_ATTR(temp##offset##_status, S_IRUGO, \ + show_temp##offset##_status, NULL); +show_and_set_temp(1) +show_and_set_temp(2) +show_and_set_temp(3) + +static ssize_t show_temp_alarms(struct device *dev, char *buf) +{ + struct pc87360_data *data = pc87360_update_device(dev); + return sprintf(buf, "%u\n", data->temp_alarms); +} +static DEVICE_ATTR(alarms_temp, S_IRUGO, show_temp_alarms, NULL); + +/* + * Device detection, registration and update + */ + +static int pc87360_attach_adapter(struct i2c_adapter *adapter) +{ + return i2c_detect(adapter, &addr_data, pc87360_detect); +} + +static int pc87360_find(int sioaddr, u8 *devid, int *address) +{ + u16 val; + int i; + int nrdev; /* logical device count */ + + /* No superio_enter */ + + /* Identify device */ + val = superio_inb(sioaddr, DEVID); + switch (val) { + case 0xE1: /* PC87360 */ + case 0xE8: /* PC87363 */ + case 0xE4: /* PC87364 */ + nrdev = 1; + break; + case 0xE5: /* PC87365 */ + case 0xE9: /* PC87366 */ + nrdev = 3; + break; + default: + superio_exit(sioaddr); + return -ENODEV; + } + /* Remember the device id */ + *devid = val; + + for (i = 0; i < nrdev; i++) { + /* select logical device */ + superio_outb(sioaddr, DEV, logdev[i]); + + val = superio_inb(sioaddr, ACT); + if (!(val & 0x01)) { + printk(KERN_INFO "pc87360: Device 0x%02x not " + "activated\n", logdev[i]); + continue; + } + + val = (superio_inb(sioaddr, BASE) << 8) + | superio_inb(sioaddr, BASE + 1); + if (!val) { + printk(KERN_INFO "pc87360: Base address not set for " + "device 0x%02x\n", logdev[i]); + continue; + } + + address[i] = val; + + if (i==0) { /* Fans */ + confreg[0] = superio_inb(sioaddr, 0xF0); + confreg[1] = superio_inb(sioaddr, 0xF1); + +#ifdef DEBUG + printk(KERN_DEBUG "pc87360: Fan 1: mon=%d " + "ctrl=%d inv=%d\n", (confreg[0]>>2)&1, + (confreg[0]>>3)&1, (confreg[0]>>4)&1); + printk(KERN_DEBUG "pc87360: Fan 2: mon=%d " + "ctrl=%d inv=%d\n", (confreg[0]>>5)&1, + (confreg[0]>>6)&1, (confreg[0]>>7)&1); + printk(KERN_DEBUG "pc87360: Fan 3: mon=%d " + "ctrl=%d inv=%d\n", confreg[1]&1, + (confreg[1]>>1)&1, (confreg[1]>>2)&1); +#endif + } else if (i==1) { /* Voltages */ + /* Are we using thermistors? */ + if (*devid == 0xE9) { /* PC87366 */ + /* These registers are not logical-device + specific, just that we won't need them if + we don't use the VLM device */ + confreg[2] = superio_inb(sioaddr, 0x2B); + confreg[3] = superio_inb(sioaddr, 0x25); + + if (confreg[2] & 0x40) { + printk(KERN_INFO "pc87360: Using " + "thermistors for temperature " + "monitoring\n"); + } + if (confreg[3] & 0xE0) { + printk(KERN_INFO "pc87360: VID " + "inputs routed (mode %u)\n", + confreg[3] >> 5); + } + } + } + } + + superio_exit(sioaddr); + return 0; +} + +/* We don't really care about the address. + Read from extra_isa instead. */ +int pc87360_detect(struct i2c_adapter *adapter, int address, int kind) +{ + int i; + struct i2c_client *new_client; + struct pc87360_data *data; + int err = 0; + const char *name = "pc87360"; + int use_thermistors = 0; + + if (!i2c_is_isa_adapter(adapter)) + return -ENODEV; + + if (!(data = kmalloc(sizeof(struct pc87360_data), GFP_KERNEL))) + return -ENOMEM; + memset(data, 0x00, sizeof(struct pc87360_data)); + + new_client = &data->client; + i2c_set_clientdata(new_client, data); + new_client->addr = address; + init_MUTEX(&data->lock); + new_client->adapter = adapter; + new_client->driver = &pc87360_driver; + new_client->flags = 0; + + data->fannr = 2; + data->innr = 0; + data->tempnr = 0; + + switch (devid) { + case 0xe8: + name = "pc87363"; + break; + case 0xe4: + name = "pc87364"; + data->fannr = 3; + break; + case 0xe5: + name = "pc87365"; + data->fannr = extra_isa[0] ? 3 : 0; + data->innr = extra_isa[1] ? 11 : 0; + data->tempnr = extra_isa[2] ? 2 : 0; + break; + case 0xe9: + name = "pc87366"; + data->fannr = extra_isa[0] ? 3 : 0; + data->innr = extra_isa[1] ? 14 : 0; + data->tempnr = extra_isa[2] ? 3 : 0; + break; + } + + strcpy(new_client->name, name); + data->valid = 0; + init_MUTEX(&data->update_lock); + + for (i = 0; i < 3; i++) { + if (((data->address[i] = extra_isa[i])) + && !request_region(extra_isa[i], PC87360_EXTENT, "pc87360")) { + dev_err(&new_client->dev, "Region 0x%x-0x%x already " + "in use!\n", extra_isa[i], + extra_isa[i]+PC87360_EXTENT-1); + for (i--; i >= 0; i--) + release_region(extra_isa[i], PC87360_EXTENT); + err = -EBUSY; + goto ERROR1; + } + } + + /* Retrieve the fans configuration from Super-I/O space */ + if (data->fannr) + data->fan_conf = confreg[0] | (confreg[1] << 8); + + if ((err = i2c_attach_client(new_client))) + goto ERROR2; + + /* Use the correct reference voltage + Unless both the VLM and the TMS logical devices agree to + use an external Vref, the internal one is used. */ + if (data->innr) { + i = pc87360_read_value(data, LD_IN, NO_BANK, + PC87365_REG_IN_CONFIG); + if (data->tempnr) { + i &= pc87360_read_value(data, LD_TEMP, NO_BANK, + PC87365_REG_TEMP_CONFIG); + } + data->in_vref = (i&0x02) ? 3025 : 2966; + dev_dbg(&new_client->dev, "Using %s reference voltage\n", + (i&0x02) ? "external" : "internal"); + + data->vid_conf = confreg[3]; + data->vrm = 90; + } + + /* Fan clock dividers may be needed before any data is read */ + for (i = 0; i < data->fannr; i++) { + data->fan_status[i] = pc87360_read_value(data, LD_FAN, + NO_BANK, PC87360_REG_FAN_STATUS(i)); + } + + if (init > 0) { + if (devid == 0xe9 && data->address[1]) /* PC87366 */ + use_thermistors = confreg[2] & 0x40; + + pc87360_init_client(new_client, use_thermistors); + } + + /* Register sysfs hooks */ + if (data->innr) { + device_create_file(&new_client->dev, &dev_attr_in0_input); + device_create_file(&new_client->dev, &dev_attr_in1_input); + device_create_file(&new_client->dev, &dev_attr_in2_input); + device_create_file(&new_client->dev, &dev_attr_in3_input); + device_create_file(&new_client->dev, &dev_attr_in4_input); + device_create_file(&new_client->dev, &dev_attr_in5_input); + device_create_file(&new_client->dev, &dev_attr_in6_input); + device_create_file(&new_client->dev, &dev_attr_in7_input); + device_create_file(&new_client->dev, &dev_attr_in8_input); + device_create_file(&new_client->dev, &dev_attr_in9_input); + device_create_file(&new_client->dev, &dev_attr_in10_input); + device_create_file(&new_client->dev, &dev_attr_in0_min); + device_create_file(&new_client->dev, &dev_attr_in1_min); + device_create_file(&new_client->dev, &dev_attr_in2_min); + device_create_file(&new_client->dev, &dev_attr_in3_min); + device_create_file(&new_client->dev, &dev_attr_in4_min); + device_create_file(&new_client->dev, &dev_attr_in5_min); + device_create_file(&new_client->dev, &dev_attr_in6_min); + device_create_file(&new_client->dev, &dev_attr_in7_min); + device_create_file(&new_client->dev, &dev_attr_in8_min); + device_create_file(&new_client->dev, &dev_attr_in9_min); + device_create_file(&new_client->dev, &dev_attr_in10_min); + device_create_file(&new_client->dev, &dev_attr_in0_max); + device_create_file(&new_client->dev, &dev_attr_in1_max); + device_create_file(&new_client->dev, &dev_attr_in2_max); + device_create_file(&new_client->dev, &dev_attr_in3_max); + device_create_file(&new_client->dev, &dev_attr_in4_max); + device_create_file(&new_client->dev, &dev_attr_in5_max); + device_create_file(&new_client->dev, &dev_attr_in6_max); + device_create_file(&new_client->dev, &dev_attr_in7_max); + device_create_file(&new_client->dev, &dev_attr_in8_max); + device_create_file(&new_client->dev, &dev_attr_in9_max); + device_create_file(&new_client->dev, &dev_attr_in10_max); + device_create_file(&new_client->dev, &dev_attr_in0_status); + device_create_file(&new_client->dev, &dev_attr_in1_status); + device_create_file(&new_client->dev, &dev_attr_in2_status); + device_create_file(&new_client->dev, &dev_attr_in3_status); + device_create_file(&new_client->dev, &dev_attr_in4_status); + device_create_file(&new_client->dev, &dev_attr_in5_status); + device_create_file(&new_client->dev, &dev_attr_in6_status); + device_create_file(&new_client->dev, &dev_attr_in7_status); + device_create_file(&new_client->dev, &dev_attr_in8_status); + device_create_file(&new_client->dev, &dev_attr_in9_status); + device_create_file(&new_client->dev, &dev_attr_in10_status); + + device_create_file(&new_client->dev, &dev_attr_cpu0_vid); + device_create_file(&new_client->dev, &dev_attr_vrm); + device_create_file(&new_client->dev, &dev_attr_alarms_in); + } + + if (data->tempnr) { + device_create_file(&new_client->dev, &dev_attr_temp1_input); + device_create_file(&new_client->dev, &dev_attr_temp2_input); + device_create_file(&new_client->dev, &dev_attr_temp1_min); + device_create_file(&new_client->dev, &dev_attr_temp2_min); + device_create_file(&new_client->dev, &dev_attr_temp1_max); + device_create_file(&new_client->dev, &dev_attr_temp2_max); + device_create_file(&new_client->dev, &dev_attr_temp1_crit); + device_create_file(&new_client->dev, &dev_attr_temp2_crit); + device_create_file(&new_client->dev, &dev_attr_temp1_status); + device_create_file(&new_client->dev, &dev_attr_temp2_status); + + device_create_file(&new_client->dev, &dev_attr_alarms_temp); + } + if (data->tempnr == 3) { + device_create_file(&new_client->dev, &dev_attr_temp3_input); + device_create_file(&new_client->dev, &dev_attr_temp3_min); + device_create_file(&new_client->dev, &dev_attr_temp3_max); + device_create_file(&new_client->dev, &dev_attr_temp3_crit); + device_create_file(&new_client->dev, &dev_attr_temp3_status); + } + if (data->innr == 14) { + device_create_file(&new_client->dev, &dev_attr_temp4_input); + device_create_file(&new_client->dev, &dev_attr_temp5_input); + device_create_file(&new_client->dev, &dev_attr_temp6_input); + device_create_file(&new_client->dev, &dev_attr_temp4_min); + device_create_file(&new_client->dev, &dev_attr_temp5_min); + device_create_file(&new_client->dev, &dev_attr_temp6_min); + device_create_file(&new_client->dev, &dev_attr_temp4_max); + device_create_file(&new_client->dev, &dev_attr_temp5_max); + device_create_file(&new_client->dev, &dev_attr_temp6_max); + device_create_file(&new_client->dev, &dev_attr_temp4_crit); + device_create_file(&new_client->dev, &dev_attr_temp5_crit); + device_create_file(&new_client->dev, &dev_attr_temp6_crit); + device_create_file(&new_client->dev, &dev_attr_temp4_status); + device_create_file(&new_client->dev, &dev_attr_temp5_status); + device_create_file(&new_client->dev, &dev_attr_temp6_status); + } + + if (data->fannr) { + device_create_file(&new_client->dev, &dev_attr_fan1_input); + device_create_file(&new_client->dev, &dev_attr_fan2_input); + device_create_file(&new_client->dev, &dev_attr_fan1_min); + device_create_file(&new_client->dev, &dev_attr_fan2_min); + device_create_file(&new_client->dev, &dev_attr_fan1_div); + device_create_file(&new_client->dev, &dev_attr_fan2_div); + device_create_file(&new_client->dev, &dev_attr_fan1_status); + device_create_file(&new_client->dev, &dev_attr_fan2_status); + + if (FAN_CONFIG_CONTROL(data->fan_conf, 0)) + device_create_file(&new_client->dev, &dev_attr_pwm1); + if (FAN_CONFIG_CONTROL(data->fan_conf, 1)) + device_create_file(&new_client->dev, &dev_attr_pwm2); + } + if (data->fannr == 3) { + device_create_file(&new_client->dev, &dev_attr_fan3_input); + device_create_file(&new_client->dev, &dev_attr_fan3_min); + device_create_file(&new_client->dev, &dev_attr_fan3_div); + device_create_file(&new_client->dev, &dev_attr_fan3_status); + + if (FAN_CONFIG_CONTROL(data->fan_conf, 2)) + device_create_file(&new_client->dev, &dev_attr_pwm3); + } + + return 0; + +ERROR2: + for (i = 0; i < 3; i++) { + if (data->address[i]) { + release_region(data->address[i], PC87360_EXTENT); + } + } +ERROR1: + kfree(data); + return err; +} + +static int pc87360_detach_client(struct i2c_client *client) +{ + struct pc87360_data *data = i2c_get_clientdata(client); + int i; + + if ((i = i2c_detach_client(client))) { + dev_err(&client->dev, "Client deregistration failed, " + "client not detached.\n"); + return i; + } + + for (i = 0; i < 3; i++) { + if (data->address[i]) { + release_region(data->address[i], PC87360_EXTENT); + } + } + kfree(data); + + return 0; +} + +/* ldi is the logical device index + bank is for voltages and temperatures only */ +static int pc87360_read_value(struct pc87360_data *data, u8 ldi, u8 bank, + u8 reg) +{ + int res; + + down(&(data->lock)); + if (bank != NO_BANK) + outb_p(bank, data->address[ldi] + PC87365_REG_BANK); + res = inb_p(data->address[ldi] + reg); + up(&(data->lock)); + + return res; +} + +static void pc87360_write_value(struct pc87360_data *data, u8 ldi, u8 bank, + u8 reg, u8 value) +{ + down(&(data->lock)); + if (bank != NO_BANK) + outb_p(bank, data->address[ldi] + PC87365_REG_BANK); + outb_p(value, data->address[ldi] + reg); + up(&(data->lock)); +} + +static void pc87360_init_client(struct i2c_client *client, int use_thermistors) +{ + struct pc87360_data *data = i2c_get_clientdata(client); + int i, nr; + const u8 init_in[14] = { 2, 2, 2, 2, 2, 2, 2, 1, 1, 3, 1, 2, 2, 2 }; + const u8 init_temp[3] = { 2, 2, 1 }; + u8 reg; + + if (init >= 2 && data->innr) { + reg = pc87360_read_value(data, LD_IN, NO_BANK, + PC87365_REG_IN_CONVRATE); + dev_info(&client->dev, "VLM conversion set to" + "1s period, 160us delay\n"); + pc87360_write_value(data, LD_IN, NO_BANK, + PC87365_REG_IN_CONVRATE, + (reg & 0xC0) | 0x11); + } + + nr = data->innr < 11 ? data->innr : 11; + for (i=0; i= init_in[i]) { + /* Forcibly enable voltage channel */ + reg = pc87360_read_value(data, LD_IN, i, + PC87365_REG_IN_STATUS); + if (!(reg & 0x01)) { + dev_dbg(&client->dev, "Forcibly " + "enabling in%d\n", i); + pc87360_write_value(data, LD_IN, i, + PC87365_REG_IN_STATUS, + (reg & 0x68) | 0x87); + } + } + } + + /* We can't blindly trust the Super-I/O space configuration bit, + most BIOS won't set it properly */ + for (i=11; iinnr; i++) { + reg = pc87360_read_value(data, LD_IN, i, + PC87365_REG_TEMP_STATUS); + use_thermistors = use_thermistors || (reg & 0x01); + } + + i = use_thermistors ? 2 : 0; + for (; itempnr; i++) { + if (init >= init_temp[i]) { + /* Forcibly enable temperature channel */ + reg = pc87360_read_value(data, LD_TEMP, i, + PC87365_REG_TEMP_STATUS); + if (!(reg & 0x01)) { + dev_dbg(&client->dev, "Forcibly " + "enabling temp%d\n", i+1); + pc87360_write_value(data, LD_TEMP, i, + PC87365_REG_TEMP_STATUS, + 0xCF); + } + } + } + + if (use_thermistors) { + for (i=11; iinnr; i++) { + if (init >= init_in[i]) { + /* The pin may already be used by thermal + diodes */ + reg = pc87360_read_value(data, LD_TEMP, + (i-11)/2, PC87365_REG_TEMP_STATUS); + if (reg & 0x01) { + dev_dbg(&client->dev, "Skipping " + "temp%d, pin already in use " + "by temp%d\n", i-7, (i-11)/2); + continue; + } + + /* Forcibly enable thermistor channel */ + reg = pc87360_read_value(data, LD_IN, i, + PC87365_REG_IN_STATUS); + if (!(reg & 0x01)) { + dev_dbg(&client->dev, "Forcibly " + "enabling temp%d\n", i-7); + pc87360_write_value(data, LD_IN, i, + PC87365_REG_TEMP_STATUS, + (reg & 0x60) | 0x8F); + } + } + } + } + + if (data->innr) { + reg = pc87360_read_value(data, LD_IN, NO_BANK, + PC87365_REG_IN_CONFIG); + if (reg & 0x01) { + dev_dbg(&client->dev, "Forcibly " + "enabling monitoring (VLM)\n"); + pc87360_write_value(data, LD_IN, NO_BANK, + PC87365_REG_IN_CONFIG, + reg & 0xFE); + } + } + + if (data->tempnr) { + reg = pc87360_read_value(data, LD_TEMP, NO_BANK, + PC87365_REG_TEMP_CONFIG); + if (reg & 0x01) { + dev_dbg(&client->dev, "Forcibly enabling " + "monitoring (TMS)\n"); + pc87360_write_value(data, LD_TEMP, NO_BANK, + PC87365_REG_TEMP_CONFIG, + reg & 0xFE); + } + + if (init >= 2) { + /* Chip config as documented by National Semi. */ + pc87360_write_value(data, LD_TEMP, 0xF, 0xA, 0x08); + /* We voluntarily omit the bank here, in case the + sequence itself matters. It shouldn't be a problem, + since nobody else is supposed to access the + device at that point. */ + pc87360_write_value(data, LD_TEMP, NO_BANK, 0xB, 0x04); + pc87360_write_value(data, LD_TEMP, NO_BANK, 0xC, 0x35); + pc87360_write_value(data, LD_TEMP, NO_BANK, 0xD, 0x05); + pc87360_write_value(data, LD_TEMP, NO_BANK, 0xE, 0x05); + } + } +} + +static void pc87360_autodiv(struct i2c_client *client, int nr) +{ + struct pc87360_data *data = i2c_get_clientdata(client); + u8 old_min = data->fan_min[nr]; + + /* Increase clock divider if needed and possible */ + if ((data->fan_status[nr] & 0x04) /* overflow flag */ + || (data->fan[nr] >= 224)) { /* next to overflow */ + if ((data->fan_status[nr] & 0x60) != 0x60) { + data->fan_status[nr] += 0x20; + data->fan_min[nr] >>= 1; + data->fan[nr] >>= 1; + dev_dbg(&client->dev, "Increasing " + "clock divider to %d for fan %d\n", + FAN_DIV_FROM_REG(data->fan_status[nr]), nr+1); + } + } else { + /* Decrease clock divider if possible */ + while (!(data->fan_min[nr] & 0x80) /* min "nails" divider */ + && data->fan[nr] < 85 /* bad accuracy */ + && (data->fan_status[nr] & 0x60) != 0x00) { + data->fan_status[nr] -= 0x20; + data->fan_min[nr] <<= 1; + data->fan[nr] <<= 1; + dev_dbg(&client->dev, "Decreasing " + "clock divider to %d for fan %d\n", + FAN_DIV_FROM_REG(data->fan_status[nr]), + nr+1); + } + } + + /* Write new fan min if it changed */ + if (old_min != data->fan_min[nr]) { + pc87360_write_value(data, LD_FAN, NO_BANK, + PC87360_REG_FAN_MIN(nr), + data->fan_min[nr]); + } +} + +static struct pc87360_data *pc87360_update_device(struct device *dev) +{ + struct i2c_client *client = to_i2c_client(dev); + struct pc87360_data *data = i2c_get_clientdata(client); + u8 i; + + down(&data->update_lock); + + if ((jiffies - data->last_updated > HZ * 2) + || (jiffies < data->last_updated) || !data->valid) { + dev_dbg(&client->dev, "Data update\n"); + + /* Fans */ + for (i = 0; i < data->fannr; i++) { + if (FAN_CONFIG_MONITOR(data->fan_conf, i)) { + data->fan_status[i] = + pc87360_read_value(data, LD_FAN, + NO_BANK, PC87360_REG_FAN_STATUS(i)); + data->fan[i] = pc87360_read_value(data, LD_FAN, + NO_BANK, PC87360_REG_FAN(i)); + data->fan_min[i] = pc87360_read_value(data, + LD_FAN, NO_BANK, + PC87360_REG_FAN_MIN(i)); + /* Change clock divider if needed */ + pc87360_autodiv(client, i); + /* Clear bits and write new divider */ + pc87360_write_value(data, LD_FAN, NO_BANK, + PC87360_REG_FAN_STATUS(i), + data->fan_status[i]); + } + if (FAN_CONFIG_CONTROL(data->fan_conf, i)) + data->pwm[i] = pc87360_read_value(data, LD_FAN, + NO_BANK, PC87360_REG_PWM(i)); + } + + /* Voltages */ + for (i = 0; i < data->innr; i++) { + data->in_status[i] = pc87360_read_value(data, LD_IN, i, + PC87365_REG_IN_STATUS); + /* Clear bits */ + pc87360_write_value(data, LD_IN, i, + PC87365_REG_IN_STATUS, + data->in_status[i]); + if ((data->in_status[i] & 0x81) == 0x81) { + data->in[i] = pc87360_read_value(data, LD_IN, + i, PC87365_REG_IN); + } + if (data->in_status[i] & 0x01) { + data->in_min[i] = pc87360_read_value(data, + LD_IN, i, + PC87365_REG_IN_MIN); + data->in_max[i] = pc87360_read_value(data, + LD_IN, i, + PC87365_REG_IN_MAX); + if (i >= 11) + data->in_crit[i-11] = + pc87360_read_value(data, LD_IN, + i, PC87365_REG_TEMP_CRIT); + } + } + if (data->innr) { + data->in_alarms = pc87360_read_value(data, LD_IN, + NO_BANK, PC87365_REG_IN_ALARMS1) + | ((pc87360_read_value(data, LD_IN, + NO_BANK, PC87365_REG_IN_ALARMS2) + & 0x07) << 8); + data->vid = (data->vid_conf & 0xE0) ? + pc87360_read_value(data, LD_IN, + NO_BANK, PC87365_REG_VID) : 0x1F; + } + + /* Temperatures */ + for (i = 0; i < data->tempnr; i++) { + data->temp_status[i] = pc87360_read_value(data, + LD_TEMP, i, + PC87365_REG_TEMP_STATUS); + /* Clear bits */ + pc87360_write_value(data, LD_TEMP, i, + PC87365_REG_TEMP_STATUS, + data->temp_status[i]); + if ((data->temp_status[i] & 0x81) == 0x81) { + data->temp[i] = pc87360_read_value(data, + LD_TEMP, i, + PC87365_REG_TEMP); + } + if (data->temp_status[i] & 0x01) { + data->temp_min[i] = pc87360_read_value(data, + LD_TEMP, i, + PC87365_REG_TEMP_MIN); + data->temp_max[i] = pc87360_read_value(data, + LD_TEMP, i, + PC87365_REG_TEMP_MAX); + data->temp_crit[i] = pc87360_read_value(data, + LD_TEMP, i, + PC87365_REG_TEMP_CRIT); + } + } + if (data->tempnr) { + data->temp_alarms = pc87360_read_value(data, LD_TEMP, + NO_BANK, PC87365_REG_TEMP_ALARMS) + & 0x3F; + } + + data->last_updated = jiffies; + data->valid = 1; + } + + up(&data->update_lock); + + return data; +} + +static int __init pc87360_init(void) +{ + int i; + + if (pc87360_find(0x2e, &devid, extra_isa) + && pc87360_find(0x4e, &devid, extra_isa)) { + printk(KERN_WARNING "pc87360: PC8736x not detected, " + "module not inserted.\n"); + return -ENODEV; + } + + /* Arbitrarily pick one of the addresses */ + for (i = 0; i < 3; i++) { + if (extra_isa[i] != 0x0000) { + normal_isa[0] = extra_isa[i]; + break; + } + } + + if (normal_isa[0] == 0x0000) { + printk(KERN_WARNING "pc87360: No active logical device, " + "module not inserted.\n"); + return -ENODEV; + } + + return i2c_add_driver(&pc87360_driver); +} + +static void __exit pc87360_exit(void) +{ + i2c_del_driver(&pc87360_driver); +} + + +MODULE_AUTHOR("Jean Delvare "); +MODULE_DESCRIPTION("PC8736x hardware monitor"); +MODULE_LICENSE("GPL"); + +module_init(pc87360_init); +module_exit(pc87360_exit); diff -Nru a/drivers/i2c/chips/pcf8574.c b/drivers/i2c/chips/pcf8574.c --- a/drivers/i2c/chips/pcf8574.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/i2c/chips/pcf8574.c 2004-11-10 17:19:02 -08:00 @@ -42,10 +42,10 @@ #include /* Addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x20, 0x27, 0x38, 0x3f, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_2(pcf8574, pcf8574a); diff -Nru a/drivers/i2c/chips/pcf8591.c b/drivers/i2c/chips/pcf8591.c --- a/drivers/i2c/chips/pcf8591.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/i2c/chips/pcf8591.c 2004-11-10 17:19:07 -08:00 @@ -27,10 +27,9 @@ #include /* Addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x48, 0x4f, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c, + 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_1(pcf8591); diff -Nru a/drivers/i2c/chips/rtc8564.c b/drivers/i2c/chips/rtc8564.c --- a/drivers/i2c/chips/rtc8564.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/i2c/chips/rtc8564.c 2004-11-10 17:19:02 -08:00 @@ -66,11 +66,8 @@ static struct i2c_client_address_data addr_data = { .normal_i2c = normal_addr, - .normal_i2c_range = ignore, .probe = ignore, - .probe_range = ignore, .ignore = ignore, - .ignore_range = ignore, .force = ignore, }; diff -Nru a/drivers/i2c/chips/smsc47m1.c b/drivers/i2c/chips/smsc47m1.c --- a/drivers/i2c/chips/smsc47m1.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/i2c/chips/smsc47m1.c 2004-11-10 17:19:03 -08:00 @@ -34,22 +34,14 @@ #include static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; /* Address is autodetected, there is no default value */ static unsigned int normal_isa[] = { 0x0000, I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; static struct i2c_force_data forces[] = {{NULL}}; enum chips { any_chip, smsc47m1 }; static struct i2c_address_data addr_data = { .normal_i2c = normal_i2c, - .normal_i2c_range = normal_i2c_range, .normal_isa = normal_isa, - .normal_isa_range = normal_isa_range, - .probe = normal_i2c, /* cheat */ - .probe_range = normal_i2c_range, /* cheat */ - .ignore = normal_i2c, /* cheat */ - .ignore_range = normal_i2c_range, /* cheat */ .forces = forces, }; diff -Nru a/drivers/i2c/chips/via686a.c b/drivers/i2c/chips/via686a.c --- a/drivers/i2c/chips/via686a.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/i2c/chips/via686a.c 2004-11-10 17:19:02 -08:00 @@ -52,9 +52,7 @@ Note that we can't determine the ISA address until we have initialized our module */ static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; static unsigned int normal_isa[] = { 0x0000, I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_1(via686a); diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c --- a/drivers/i2c/chips/w83627hf.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/i2c/chips/w83627hf.c 2004-11-10 17:19:06 -08:00 @@ -57,9 +57,7 @@ /* Addresses to scan */ static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; static unsigned int normal_isa[] = { 0, I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_4(w83627hf, w83627thf, w83697hf, w83637hf); diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c --- a/drivers/i2c/chips/w83781d.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/i2c/chips/w83781d.c 2004-11-10 17:19:02 -08:00 @@ -49,10 +49,10 @@ #define W83781D_RT 1 /* Addresses to scan */ -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x20, 0x2f, I2C_CLIENT_END }; +static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, + 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, + 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END }; static unsigned int normal_isa[] = { 0x0290, I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* Insmod parameters */ SENSORS_INSMOD_6(w83781d, w83782d, w83783s, w83627hf, as99127f, w83697hf); diff -Nru a/drivers/i2c/chips/w83l785ts.c b/drivers/i2c/chips/w83l785ts.c --- a/drivers/i2c/chips/w83l785ts.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/i2c/chips/w83l785ts.c 2004-11-10 17:19:03 -08:00 @@ -47,9 +47,7 @@ */ static unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; -static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END }; /* * Insmod parameters diff -Nru a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c --- a/drivers/i2c/i2c-core.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/i2c/i2c-core.c 2004-11-10 17:19:02 -08:00 @@ -177,12 +177,25 @@ int i2c_del_adapter(struct i2c_adapter *adap) { struct list_head *item, *_n; + struct i2c_adapter *adap_from_list; struct i2c_driver *driver; struct i2c_client *client; int res = 0; down(&core_lists); + /* First make sure that this adapter was ever added */ + list_for_each_entry(adap_from_list, &adapters, list) { + if (adap_from_list == adap) + break; + } + if (adap_from_list != adap) { + pr_debug("I2C: Attempting to delete an unregistered " + "adapter\n"); + res = -EINVAL; + goto out_unlock; + } + list_for_each(item,&drivers) { driver = list_entry(item, struct i2c_driver, list); if (driver->detach_adapter) @@ -1008,48 +1021,6 @@ I2C_SMBUS_WORD_DATA,&data); } -s32 i2c_smbus_process_call(struct i2c_client *client, u8 command, u16 value) -{ - union i2c_smbus_data data; - data.word = value; - if (i2c_smbus_xfer(client->adapter,client->addr,client->flags, - I2C_SMBUS_WRITE,command, - I2C_SMBUS_PROC_CALL, &data)) - return -1; - else - return 0x0FFFF & data.word; -} - -/* Returns the number of read bytes */ -s32 i2c_smbus_read_block_data(struct i2c_client *client, u8 command, u8 *values) -{ - union i2c_smbus_data data; - int i; - if (i2c_smbus_xfer(client->adapter,client->addr,client->flags, - I2C_SMBUS_READ,command, - I2C_SMBUS_BLOCK_DATA,&data)) - return -1; - else { - for (i = 1; i <= data.block[0]; i++) - values[i-1] = data.block[i]; - return data.block[0]; - } -} - -s32 i2c_smbus_write_block_data(struct i2c_client *client, u8 command, u8 length, u8 *values) -{ - union i2c_smbus_data data; - int i; - if (length > I2C_SMBUS_BLOCK_MAX) - length = I2C_SMBUS_BLOCK_MAX; - for (i = 1; i <= length; i++) - data.block[i] = values[i-1]; - data.block[0] = length; - return i2c_smbus_xfer(client->adapter,client->addr,client->flags, - I2C_SMBUS_WRITE,command, - I2C_SMBUS_BLOCK_DATA,&data); -} - /* Returns the number of read bytes */ s32 i2c_smbus_block_process_call(struct i2c_client *client, u8 command, u8 length, u8 *values) { @@ -1085,20 +1056,6 @@ } } -s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client, u8 command, u8 length, u8 *values) -{ - union i2c_smbus_data data; - int i; - if (length > I2C_SMBUS_I2C_BLOCK_MAX) - length = I2C_SMBUS_I2C_BLOCK_MAX; - for (i = 1; i <= length; i++) - data.block[i] = values[i-1]; - data.block[0] = length; - return i2c_smbus_xfer(client->adapter,client->addr,client->flags, - I2C_SMBUS_WRITE,command, - I2C_SMBUS_I2C_BLOCK_DATA,&data); -} - /* Simulate a SMBus command using the i2c protocol No checking of parameters is done! */ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter * adapter, u16 addr, @@ -1322,11 +1279,7 @@ EXPORT_SYMBOL(i2c_smbus_write_byte_data); EXPORT_SYMBOL(i2c_smbus_read_word_data); EXPORT_SYMBOL(i2c_smbus_write_word_data); -EXPORT_SYMBOL(i2c_smbus_process_call); -EXPORT_SYMBOL(i2c_smbus_read_block_data); -EXPORT_SYMBOL(i2c_smbus_write_block_data); EXPORT_SYMBOL(i2c_smbus_read_i2c_block_data); -EXPORT_SYMBOL(i2c_smbus_write_i2c_block_data); EXPORT_SYMBOL(i2c_get_functionality); EXPORT_SYMBOL(i2c_check_functionality); diff -Nru a/drivers/i2c/i2c-sensor-detect.c b/drivers/i2c/i2c-sensor-detect.c --- a/drivers/i2c/i2c-sensor-detect.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/i2c/i2c-sensor-detect.c 2004-11-10 17:19:04 -08:00 @@ -31,6 +31,8 @@ #include #include +static unsigned short empty[] = {I2C_CLIENT_END}; +static unsigned int empty_isa[] = {I2C_CLIENT_ISA_END}; /* Very inefficient for ISA detects, and won't work for 10-bit addresses! */ int i2c_detect(struct i2c_adapter *adapter, @@ -42,11 +44,27 @@ int is_isa = i2c_is_isa_adapter(adapter); int adapter_id = is_isa ? ANY_I2C_ISA_BUS : i2c_adapter_id(adapter); + unsigned short *normal_i2c; + unsigned int *normal_isa; + unsigned short *probe; + unsigned short *ignore; /* Forget it if we can't probe using SMBUS_QUICK */ if ((!is_isa) && !i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) return -1; + + /* Use default "empty" list if the adapter doesn't specify any */ + normal_i2c = probe = ignore = empty; + normal_isa = empty_isa; + if (address_data->normal_i2c) + normal_i2c = address_data->normal_i2c; + if (address_data->normal_isa) + normal_isa = address_data->normal_isa; + if (address_data->probe) + probe = address_data->probe; + if (address_data->ignore) + ignore = address_data->ignore; for (addr = 0x00; addr <= (is_isa ? 0xffff : 0x7f); addr++) { if (!is_isa && i2c_check_addr(adapter, addr)) @@ -72,79 +90,44 @@ /* If this address is in one of the ignores, we can forget about it right now */ - for (i = 0; !found && (address_data->ignore[i] != I2C_CLIENT_END); i += 2) { - if ( ((adapter_id == address_data->ignore[i]) || - ((address_data->ignore[i] == ANY_I2C_BUS) && + for (i = 0; !found && (ignore[i] != I2C_CLIENT_END); i += 2) { + if ( ((adapter_id == ignore[i]) || + ((ignore[i] == ANY_I2C_BUS) && !is_isa)) && - (addr == address_data->ignore[i + 1])) { + (addr == ignore[i + 1])) { dev_dbg(&adapter->dev, "found ignore parameter for adapter %d, addr %04x\n", adapter_id, addr); found = 1; } } - for (i = 0; !found && (address_data->ignore_range[i] != I2C_CLIENT_END); i += 3) { - if ( ((adapter_id == address_data->ignore_range[i]) || - ((address_data-> ignore_range[i] == ANY_I2C_BUS) & - !is_isa)) && - (addr >= address_data->ignore_range[i + 1]) && - (addr <= address_data->ignore_range[i + 2])) { - dev_dbg(&adapter->dev, "found ignore_range parameter for adapter %d, addr %04x\n", adapter_id, addr); - found = 1; - } - } if (found) continue; /* Now, we will do a detection, but only if it is in the normal or probe entries */ if (is_isa) { - for (i = 0; !found && (address_data->normal_isa[i] != I2C_CLIENT_ISA_END); i += 1) { - if (addr == address_data->normal_isa[i]) { + for (i = 0; !found && (normal_isa[i] != I2C_CLIENT_ISA_END); i += 1) { + if (addr == normal_isa[i]) { dev_dbg(&adapter->dev, "found normal isa entry for adapter %d, addr %04x\n", adapter_id, addr); found = 1; } } - for (i = 0; !found && (address_data->normal_isa_range[i] != I2C_CLIENT_ISA_END); i += 3) { - if ((addr >= address_data->normal_isa_range[i]) && - (addr <= address_data->normal_isa_range[i + 1]) && - ((addr - address_data->normal_isa_range[i]) % address_data->normal_isa_range[i + 2] == 0)) { - dev_dbg(&adapter->dev, "found normal isa_range entry for adapter %d, addr %04x", adapter_id, addr); - found = 1; - } - } } else { - for (i = 0; !found && (address_data->normal_i2c[i] != I2C_CLIENT_END); i += 1) { - if (addr == address_data->normal_i2c[i]) { + for (i = 0; !found && (normal_i2c[i] != I2C_CLIENT_END); i += 1) { + if (addr == normal_i2c[i]) { found = 1; dev_dbg(&adapter->dev, "found normal i2c entry for adapter %d, addr %02x", adapter_id, addr); } } - for (i = 0; !found && (address_data->normal_i2c_range[i] != I2C_CLIENT_END); i += 2) { - if ((addr >= address_data->normal_i2c_range[i]) && - (addr <= address_data->normal_i2c_range[i + 1])) { - dev_dbg(&adapter->dev, "found normal i2c_range entry for adapter %d, addr %04x\n", adapter_id, addr); - found = 1; - } - } } for (i = 0; - !found && (address_data->probe[i] != I2C_CLIENT_END); + !found && (probe[i] != I2C_CLIENT_END); i += 2) { - if (((adapter_id == address_data->probe[i]) || - ((address_data-> - probe[i] == ANY_I2C_BUS) && !is_isa)) - && (addr == address_data->probe[i + 1])) { + if (((adapter_id == probe[i]) || + ((probe[i] == ANY_I2C_BUS) && !is_isa)) + && (addr == probe[i + 1])) { dev_dbg(&adapter->dev, "found probe parameter for adapter %d, addr %04x\n", adapter_id, addr); found = 1; - } - } - for (i = 0; !found && (address_data->probe_range[i] != I2C_CLIENT_END); i += 3) { - if ( ((adapter_id == address_data->probe_range[i]) || - ((address_data->probe_range[i] == ANY_I2C_BUS) && !is_isa)) && - (addr >= address_data->probe_range[i + 1]) && - (addr <= address_data->probe_range[i + 2])) { - found = 1; - dev_dbg(&adapter->dev, "found probe_range parameter for adapter %d, addr %04x\n", adapter_id, addr); } } if (!found) diff -Nru a/drivers/ide/Kconfig b/drivers/ide/Kconfig --- a/drivers/ide/Kconfig 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/Kconfig 2004-11-10 17:19:04 -08:00 @@ -772,17 +772,6 @@ This option enables the use of the sleep LED as a hard drive activity LED. -config BLK_DEV_IDEDMA_PMAC_AUTO - bool "Use DMA by default" - depends on BLK_DEV_IDEDMA_PMAC - help - This option allows the driver for the built-in IDE controller on - Power Macintoshes and PowerBooks to use DMA automatically, without - it having to be explicitly enabled. This option is provided because - of concerns about a couple of cases where using DMA on buggy PC - hardware may have caused damage. Saying Y should be safe on all - Apple machines. - config IDE_ARM def_bool ARM && (ARCH_A5K || ARCH_CLPS7500 || ARCH_RPC || ARCH_SHARK) @@ -1037,7 +1026,7 @@ It is normally safe to answer Y; however, the default is N. config IDEDMA_AUTO - def_bool IDEDMA_PCI_AUTO || BLK_DEV_IDEDMA_PMAC_AUTO || IDEDMA_ICS_AUTO + def_bool IDEDMA_PCI_AUTO || IDEDMA_ICS_AUTO endif diff -Nru a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c --- a/drivers/ide/arm/icside.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/arm/icside.c 2004-11-10 17:19:04 -08:00 @@ -197,6 +197,11 @@ } #ifdef CONFIG_BLK_DEV_IDEDMA_ICS + +#ifndef CONFIG_IDEDMA_ICS_AUTO +#warning CONFIG_IDEDMA_ICS_AUTO=n support is obsolete, and will be removed soon. +#endif + /* * SG-DMA support. * @@ -212,33 +217,18 @@ ide_hwif_t *hwif = drive->hwif; struct icside_state *state = hwif->hwif_data; struct scatterlist *sg = hwif->sg_table; - int nents; - if (rq->flags & REQ_DRIVE_TASKFILE) { - ide_task_t *args = rq->special; + ide_map_sg(drive, rq); - if (args->command_type == IDE_DRIVE_TASK_RAW_WRITE) - hwif->sg_dma_direction = DMA_TO_DEVICE; - else - hwif->sg_dma_direction = DMA_FROM_DEVICE; - - sg_init_one(sg, rq->buffer, rq->nr_sectors * SECTOR_SIZE); - nents = 1; - } else { - nents = blk_rq_map_sg(drive->queue, rq, sg); - - if (rq_data_dir(rq) == READ) - hwif->sg_dma_direction = DMA_FROM_DEVICE; - else - hwif->sg_dma_direction = DMA_TO_DEVICE; - } - - nents = dma_map_sg(state->dev, sg, nents, hwif->sg_dma_direction); + if (rq_data_dir(rq) == READ) + hwif->sg_dma_direction = DMA_FROM_DEVICE; + else + hwif->sg_dma_direction = DMA_TO_DEVICE; - hwif->sg_nents = nents; + hwif->sg_nents = dma_map_sg(state->dev, sg, hwif->sg_nents, + hwif->sg_dma_direction); } - /* * Configure the IOMD to give the appropriate timings for the transfer * mode being requested. We take the advice of the ATA standards, and @@ -481,7 +471,7 @@ return 0; } -static void icside_dma_exec_cmd(ide_drive_t *drive, u8 command) +static void icside_dma_exec_cmd(ide_drive_t *drive, u8 cmd) { /* issue cmd to drive */ ide_execute_command(drive, cmd, icside_dmaintr, 2*WAIT_CMD, NULL); @@ -498,14 +488,6 @@ ICS_ARCIN_V6_INTRSTAT_1)) & 1; } -static int icside_dma_verbose(ide_drive_t *drive) -{ - printk(", %s (peak %dMB/s)", - ide_xfer_verbose(drive->current_speed), - 2000 / drive->drive_data); - return 1; -} - static int icside_dma_timeout(ide_drive_t *drive) { printk(KERN_ERR "%s: DMA timeout occurred: ", drive->name); @@ -554,7 +536,6 @@ hwif->dma_start = icside_dma_start; hwif->ide_dma_end = icside_dma_end; hwif->ide_dma_test_irq = icside_dma_test_irq; - hwif->ide_dma_verbose = icside_dma_verbose; hwif->ide_dma_timeout = icside_dma_timeout; hwif->ide_dma_lostirq = icside_dma_lostirq; diff -Nru a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c --- a/drivers/ide/ide-cd.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/ide-cd.c 2004-11-10 17:19:04 -08:00 @@ -3039,10 +3039,9 @@ printk(", %dkB Cache", be16_to_cpu(cap.buffer_size)); -#ifdef CONFIG_BLK_DEV_IDEDMA if (drive->using_dma) - (void) HWIF(drive)->ide_dma_verbose(drive); -#endif /* CONFIG_BLK_DEV_IDEDMA */ + ide_dma_verbose(drive); + printk("\n"); return nslots; @@ -3433,7 +3432,7 @@ /* options */ char *ignore = NULL; -MODULE_PARM(ignore, "s"); +module_param(ignore, charp, 0400); MODULE_DESCRIPTION("ATAPI CD-ROM Driver"); static int ide_cdrom_attach (ide_drive_t *drive) diff -Nru a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c --- a/drivers/ide/ide-disk.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/ide-disk.c 2004-11-10 17:19:04 -08:00 @@ -643,9 +643,6 @@ capacity, sectors_to_MB(capacity), set_max, sectors_to_MB(set_max)); - if (!drive->stroke) - return; - if (lba48) set_max = idedisk_set_max_address_ext(drive, set_max); else @@ -815,6 +812,7 @@ args.tfRegister[IDE_HCYL_OFFSET] = SMART_HCYL_PASS; args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SMART; args.command_type = IDE_DRIVE_TASK_IN; + args.data_phase = TASKFILE_IN; args.handler = &task_in_intr; (void) smart_enable(drive); return ide_raw_taskfile(drive, &args, buf); @@ -1244,7 +1242,7 @@ printk(", CHS=%d/%d/%d", drive->bios_cyl, drive->bios_head, drive->bios_sect); if (drive->using_dma) - (void) HWIF(drive)->ide_dma_verbose(drive); + ide_dma_verbose(drive); printk("\n"); drive->mult_count = 0; diff -Nru a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c --- a/drivers/ide/ide-dma.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/ide-dma.c 2004-11-10 17:19:04 -08:00 @@ -207,67 +207,23 @@ { ide_hwif_t *hwif = HWIF(drive); struct scatterlist *sg = hwif->sg_table; - int nents; - nents = blk_rq_map_sg(drive->queue, rq, hwif->sg_table); - + if ((rq->flags & REQ_DRIVE_TASKFILE) && rq->nr_sectors > 256) + BUG(); + + ide_map_sg(drive, rq); + if (rq_data_dir(rq) == READ) hwif->sg_dma_direction = PCI_DMA_FROMDEVICE; else hwif->sg_dma_direction = PCI_DMA_TODEVICE; - return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction); + return pci_map_sg(hwif->pci_dev, sg, hwif->sg_nents, hwif->sg_dma_direction); } EXPORT_SYMBOL_GPL(ide_build_sglist); /** - * ide_raw_build_sglist - map IDE scatter gather for DMA - * @drive: the drive to build the DMA table for - * @rq: the request holding the sg list - * - * Perform the PCI mapping magic necessary to access the source or - * target buffers of a taskfile request via PCI DMA. The lower layers - * of the kernel provide the necessary cache management so that we can - * operate in a portable fashion - */ - -int ide_raw_build_sglist(ide_drive_t *drive, struct request *rq) -{ - ide_hwif_t *hwif = HWIF(drive); - struct scatterlist *sg = hwif->sg_table; - int nents = 0; - ide_task_t *args = rq->special; - u8 *virt_addr = rq->buffer; - int sector_count = rq->nr_sectors; - - if (args->command_type == IDE_DRIVE_TASK_RAW_WRITE) - hwif->sg_dma_direction = PCI_DMA_TODEVICE; - else - hwif->sg_dma_direction = PCI_DMA_FROMDEVICE; - -#if 1 - if (sector_count > 256) - BUG(); - - if (sector_count > 128) { -#else - while (sector_count > 128) { -#endif - sg_init_one(&sg[nents], virt_addr, 128 * SECTOR_SIZE); - nents++; - virt_addr = virt_addr + (128 * SECTOR_SIZE); - sector_count -= 128; - } - sg_init_one(&sg[nents], virt_addr, sector_count * SECTOR_SIZE); - nents++; - - return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction); -} - -EXPORT_SYMBOL_GPL(ide_raw_build_sglist); - -/** * ide_build_dmatable - build IDE DMA table * * ide_build_dmatable() prepares a dma request. We map the command @@ -288,10 +244,7 @@ int i; struct scatterlist *sg; - if (HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) - hwif->sg_nents = i = ide_raw_build_sglist(drive, rq); - else - hwif->sg_nents = i = ide_build_sglist(drive, rq); + hwif->sg_nents = i = ide_build_sglist(drive, rq); if (!i) return 0; @@ -728,17 +681,46 @@ EXPORT_SYMBOL(__ide_dma_good_drive); -#ifdef CONFIG_BLK_DEV_IDEDMA_PCI -int __ide_dma_verbose (ide_drive_t *drive) +int ide_use_dma(ide_drive_t *drive) +{ + struct hd_driveid *id = drive->id; + ide_hwif_t *hwif = drive->hwif; + + /* consult the list of known "bad" drives */ + if (__ide_dma_bad_drive(drive)) + return 0; + + /* capable of UltraDMA modes */ + if (id->field_valid & 4) { + if (hwif->ultra_mask & id->dma_ultra) + return 1; + } + + /* capable of regular DMA modes */ + if (id->field_valid & 2) { + if (hwif->mwdma_mask & id->dma_mword) + return 1; + if (hwif->swdma_mask & id->dma_1word) + return 1; + } + + /* consult the list of known "good" drives */ + if (__ide_dma_good_drive(drive) && id->eide_dma_time < 150) + return 1; + + return 0; +} + +EXPORT_SYMBOL_GPL(ide_use_dma); + +void ide_dma_verbose(ide_drive_t *drive) { struct hd_driveid *id = drive->id; ide_hwif_t *hwif = HWIF(drive); if (id->field_valid & 4) { - if ((id->dma_ultra >> 8) && (id->dma_mword >> 8)) { - printk(", BUG DMA OFF"); - return hwif->ide_dma_off_quietly(drive); - } + if ((id->dma_ultra >> 8) && (id->dma_mword >> 8)) + goto bug_dma_off; if (id->dma_ultra & ((id->dma_ultra >> 8) & hwif->ultra_mask)) { if (((id->dma_ultra >> 11) & 0x1F) && eighty_ninty_three(drive)) { @@ -768,19 +750,22 @@ printk(", (U)DMA"); /* Can be BIOS-enabled! */ } } else if (id->field_valid & 2) { - if ((id->dma_mword >> 8) && (id->dma_1word >> 8)) { - printk(", BUG DMA OFF"); - return hwif->ide_dma_off_quietly(drive); - } + if ((id->dma_mword >> 8) && (id->dma_1word >> 8)) + goto bug_dma_off; printk(", DMA"); } else if (id->field_valid & 1) { printk(", BUG"); } - return 1; + return; +bug_dma_off: + printk(", BUG DMA OFF"); + hwif->ide_dma_off_quietly(drive); + return; } -EXPORT_SYMBOL(__ide_dma_verbose); +EXPORT_SYMBOL(ide_dma_verbose); +#ifdef CONFIG_BLK_DEV_IDEDMA_PCI int __ide_dma_lostirq (ide_drive_t *drive) { printk("%s: DMA interrupt recovery\n", drive->name); @@ -955,8 +940,6 @@ hwif->ide_dma_end = &__ide_dma_end; if (!hwif->ide_dma_test_irq) hwif->ide_dma_test_irq = &__ide_dma_test_irq; - if (!hwif->ide_dma_verbose) - hwif->ide_dma_verbose = &__ide_dma_verbose; if (!hwif->ide_dma_timeout) hwif->ide_dma_timeout = &__ide_dma_timeout; if (!hwif->ide_dma_lostirq) diff -Nru a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c --- a/drivers/ide/ide-io.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/ide/ide-io.c 2004-11-10 17:19:06 -08:00 @@ -543,8 +543,6 @@ return ide_stopped; } -EXPORT_SYMBOL(ide_error); - /** * ide_abort - abort pending IDE operatins * @drive: drive the error occurred on @@ -585,8 +583,6 @@ return ide_stopped; } -EXPORT_SYMBOL(ide_abort); - /** * ide_cmd - issue a simple drive command * @drive: drive the command is for @@ -598,7 +594,8 @@ * The drive must be selected beforehand. */ -void ide_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, ide_handler_t *handler) +static void ide_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, + ide_handler_t *handler) { ide_hwif_t *hwif = HWIF(drive); if (IDE_CONTROL_REG) @@ -608,8 +605,6 @@ ide_execute_command(drive, cmd, handler, WAIT_CMD, NULL); } -EXPORT_SYMBOL(ide_cmd); - /** * drive_cmd_intr - drive command completion interrupt * @drive: drive the completion interrupt occurred on @@ -620,7 +615,7 @@ * the request */ -ide_startstop_t drive_cmd_intr (ide_drive_t *drive) +static ide_startstop_t drive_cmd_intr (ide_drive_t *drive) { struct request *rq = HWGROUP(drive)->rq; ide_hwif_t *hwif = HWIF(drive); @@ -645,8 +640,6 @@ return ide_stopped; } -EXPORT_SYMBOL(drive_cmd_intr); - /** * do_special - issue some special commands * @drive: drive the command is for @@ -656,7 +649,7 @@ * back. */ -ide_startstop_t do_special (ide_drive_t *drive) +static ide_startstop_t do_special (ide_drive_t *drive) { special_t *s = &drive->special; @@ -673,13 +666,14 @@ return DRIVER(drive)->special(drive); } -EXPORT_SYMBOL(do_special); - void ide_map_sg(ide_drive_t *drive, struct request *rq) { ide_hwif_t *hwif = drive->hwif; struct scatterlist *sg = hwif->sg_table; + if (hwif->sg_mapped) /* needed by ide-scsi */ + return; + if ((rq->flags & REQ_DRIVE_TASKFILE) == 0) { hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg); } else { @@ -712,7 +706,8 @@ * all commands to finish. Don't do this as that is due to change */ -ide_startstop_t execute_drive_cmd (ide_drive_t *drive, struct request *rq) +static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, + struct request *rq) { ide_hwif_t *hwif = HWIF(drive); if (rq->flags & REQ_DRIVE_TASKFILE) { @@ -802,8 +797,6 @@ return ide_stopped; } -EXPORT_SYMBOL(execute_drive_cmd); - /** * start_request - start of I/O and command issuing for IDE * @@ -815,7 +808,7 @@ * FIXME: this function needs a rename */ -ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) +static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) { ide_startstop_t startstop; sector_t block; @@ -906,8 +899,6 @@ return ide_stopped; } -EXPORT_SYMBOL(start_request); - /** * ide_stall_queue - pause an IDE device * @drive: drive to stall @@ -1030,10 +1021,7 @@ * the driver. This makes the driver much more friendlier to shared IRQs * than previous designs, while remaining 100% (?) SMP safe and capable. */ -/* --BenH: made non-static as ide-pmac.c uses it to kick the hwgroup back - * into life on wakeup from machine sleep. - */ -void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq) +static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq) { ide_drive_t *drive; ide_hwif_t *hwif; @@ -1165,8 +1153,6 @@ } } -EXPORT_SYMBOL(ide_do_request); - /* * Passes the stuff to ide_do_request */ @@ -1219,12 +1205,15 @@ HWGROUP(drive)->rq = NULL; rq->errors = 0; + + if (!rq->bio) + goto out; + rq->sector = rq->bio->bi_sector; rq->current_nr_sectors = bio_iovec(rq->bio)->bv_len >> 9; rq->hard_cur_sectors = rq->current_nr_sectors; - if (rq->bio) - rq->buffer = NULL; - + rq->buffer = NULL; +out: return ret; } @@ -1328,8 +1317,6 @@ spin_unlock_irqrestore(&ide_lock, flags); } -EXPORT_SYMBOL(ide_timer_expiry); - /** * unexpected_intr - handle an unexpected IDE interrupt * @irq: interrupt line @@ -1526,8 +1513,6 @@ spin_unlock_irqrestore(&ide_lock, flags); return IRQ_HANDLED; } - -EXPORT_SYMBOL(ide_intr); /** * ide_init_drive_cmd - initialize a drive command request diff -Nru a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c --- a/drivers/ide/ide-iops.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/ide/ide-iops.c 2004-11-10 17:19:03 -08:00 @@ -221,24 +221,18 @@ HWIF(drive)->OUTB(drive->ctl|2, IDE_CONTROL_REG); } -EXPORT_SYMBOL(SELECT_INTERRUPT); - void SELECT_MASK (ide_drive_t *drive, int mask) { if (HWIF(drive)->maskproc) HWIF(drive)->maskproc(drive, mask); } -EXPORT_SYMBOL(SELECT_MASK); - void QUIRK_LIST (ide_drive_t *drive) { if (HWIF(drive)->quirkproc) drive->quirk_list = HWIF(drive)->quirkproc(drive); } -EXPORT_SYMBOL(QUIRK_LIST); - /* * Some localbus EIDE interfaces require a special access sequence * when using 32-bit I/O instructions to transfer data. We call this @@ -253,8 +247,6 @@ (void) HWIF(drive)->INB(port); } -EXPORT_SYMBOL(ata_vlb_sync); - /* * This is used for most PIO data transfers *from* the IDE interface */ @@ -277,8 +269,6 @@ } } -EXPORT_SYMBOL(ata_input_data); - /* * This is used for most PIO data transfers *to* the IDE interface */ @@ -301,8 +291,6 @@ } } -EXPORT_SYMBOL(ata_output_data); - /* * The following routines are mainly used by the ATAPI drivers. * @@ -685,8 +673,6 @@ return 0; } -EXPORT_SYMBOL(ide_ata66_check); - /* * Backside of HDIO_DRIVE_CMD call of SETFEATURES_XFER. * 1 : Safe to update drive->id DMA registers. @@ -705,9 +691,8 @@ return 0; } -EXPORT_SYMBOL(set_transfer); - -u8 ide_auto_reduce_xfer (ide_drive_t *drive) +#ifdef CONFIG_BLK_DEV_IDEDMA +static u8 ide_auto_reduce_xfer (ide_drive_t *drive) { if (!drive->crc_count) return drive->current_speed; @@ -731,8 +716,7 @@ default: return XFER_PIO_4; } } - -EXPORT_SYMBOL(ide_auto_reduce_xfer); +#endif /* CONFIG_BLK_DEV_IDEDMA */ /* * Update the @@ -807,8 +791,6 @@ #endif } -EXPORT_SYMBOL(ide_driveid_update); - /* * Similar to ide_wait_stat(), except it never calls ide_error internally. * This is a kludge to handle the new ide_config_drive_speed() function, @@ -948,7 +930,7 @@ * * See also ide_execute_command */ -void __ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, +static void __ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry) { ide_hwgroup_t *hwgroup = HWGROUP(drive); @@ -963,8 +945,6 @@ hwgroup->timer.expires = jiffies + timeout; add_timer(&hwgroup->timer); } - -EXPORT_SYMBOL(__ide_set_handler); void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry) diff -Nru a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c --- a/drivers/ide/ide-lib.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/ide/ide-lib.c 2004-11-10 17:19:07 -08:00 @@ -421,8 +421,6 @@ blk_queue_bounce_limit(drive->queue, addr); } -EXPORT_SYMBOL(ide_toggle_bounce); - /** * ide_set_xfer_rate - set transfer rate * @drive: drive to set diff -Nru a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c --- a/drivers/ide/ide-probe.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/ide/ide-probe.c 2004-11-10 17:19:05 -08:00 @@ -652,6 +652,43 @@ return rc; } +/** + * ide_undecoded_slave - look for bad CF adapters + * @hwif: interface + * + * Analyse the drives on the interface and attempt to decide if we + * have the same drive viewed twice. This occurs with crap CF adapters + * and PCMCIA sometimes. + */ + +void ide_undecoded_slave(ide_hwif_t *hwif) +{ + ide_drive_t *drive0 = &hwif->drives[0]; + ide_drive_t *drive1 = &hwif->drives[1]; + + if (drive0->present == 0 || drive1->present == 0) + return; + + /* If the models don't match they are not the same product */ + if (strcmp(drive0->id->model, drive1->id->model)) + return; + + /* Serial numbers do not match */ + if (strncmp(drive0->id->serial_no, drive1->id->serial_no, 20)) + return; + + /* No serial number, thankfully very rare for CF */ + if (drive0->id->serial_no[0] == 0) + return; + + /* Appears to be an IDE flash adapter with decode bugs */ + printk(KERN_WARNING "ide-probe: ignoring undecoded slave\n"); + + drive1->present = 0; +} + +EXPORT_SYMBOL_GPL(ide_undecoded_slave); + /* * This routine only knows how to look for drive units 0 and 1 * on an interface, so any setting of MAX_DRIVES > 2 won't work here. @@ -723,18 +760,6 @@ ide_drive_t *drive = &hwif->drives[unit]; drive->dn = (hwif->channel ? 2 : 0) + unit; (void) probe_for_drive(drive); - if (drive->present && hwif->present && unit == 1) { - if (strcmp(hwif->drives[0].id->model, drive->id->model) == 0 && - /* Don't do this for noprobe or non ATA */ - strcmp(drive->id->model, "UNKNOWN") && - /* And beware of confused Maxtor drives that go "M0000000000" - "The SN# is garbage in the ID block..." [Eric] */ - strncmp(drive->id->serial_no, "M0000000000000000000", 20) && - strncmp(hwif->drives[0].id->serial_no, drive->id->serial_no, 20) == 0) { - printk(KERN_WARNING "ide-probe: ignoring undecoded slave\n"); - drive->present = 0; - } - } if (drive->present && !hwif->present) { hwif->present = 1; if (hwif->chipset != ide_4drives || @@ -808,9 +833,14 @@ } static int hwif_init(ide_hwif_t *hwif); -int probe_hwif_init (ide_hwif_t *hwif) + +int probe_hwif_init_with_fixup(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif)) { probe_hwif(hwif); + + if (fixup) + fixup(hwif); + hwif_init(hwif); if (hwif->present) { @@ -826,6 +856,11 @@ } } return 0; +} + +int probe_hwif_init(ide_hwif_t *hwif) +{ + return probe_hwif_init_with_fixup(hwif, NULL); } EXPORT_SYMBOL(probe_hwif_init); diff -Nru a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c --- a/drivers/ide/ide-proc.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/ide-proc.c 2004-11-10 17:19:04 -08:00 @@ -8,37 +8,6 @@ /* * This is the /proc/ide/ filesystem implementation. * - * The major reason this exists is to provide sufficient access - * to driver and config data, such that user-mode programs can - * be developed to handle chipset tuning for most PCI interfaces. - * This should provide better utilities, and less kernel bloat. - * - * The entire pci config space for a PCI interface chipset can be - * retrieved by just reading it. e.g. "cat /proc/ide3/config" - * - * To modify registers *safely*, do something like: - * echo "P40:88" >/proc/ide/ide3/config - * That expression writes 0x88 to pci config register 0x40 - * on the chip which controls ide3. Multiple tuples can be issued, - * and the writes will be completed as an atomic set: - * echo "P40:88 P41:35 P42:00 P43:00" >/proc/ide/ide3/config - * - * All numbers must be specified using pairs of ascii hex digits. - * It is important to note that these writes will be performed - * after waiting for the IDE controller (both interfaces) - * to be completely idle, to ensure no corruption of I/O in progress. - * - * Non-PCI registers can also be written, using "R" in place of "P" - * in the above examples. The size of the port transfer is determined - * by the number of pairs of hex digits given for the data. If a two - * digit value is given, the write will be a byte operation; if four - * digits are used, the write will be performed as a 16-bit operation; - * and if eight digits are specified, a 32-bit "dword" write will be - * performed. Odd numbers of digits are not permitted. - * - * If there is an error *anywhere* in the string of registers/data - * then *none* of the writes will be performed. - * * Drive/Driver settings can be retrieved by reading the drive's * "settings" files. e.g. "cat /proc/ide0/hda/settings" * To write a new value "val" into a specific setting "name", use: @@ -51,10 +20,6 @@ * returned data as 256 16-bit words. The "hdparm" utility will * be updated someday soon to use this mechanism. * - * Feel free to develop and distribute fancy GUI configuration - * utilities for your favorite PCI chipsets. I'll be working on - * one for the Promise 20246 someday soon. -ml - * */ #include @@ -74,227 +39,6 @@ #include -static int proc_ide_write_config(struct file *file, const char __user *buffer, - unsigned long count, void *data) -{ - ide_hwif_t *hwif = (ide_hwif_t *)data; - ide_hwgroup_t *mygroup = (ide_hwgroup_t *)(hwif->hwgroup); - ide_hwgroup_t *mategroup = NULL; - unsigned long timeout; - unsigned long flags; - const char *start = NULL, *msg = NULL; - struct entry { u32 val; u16 reg; u8 size; u8 pci; } *prog, *q, *r; - int want_pci = 0; - char *buf, *s; - int err; - - if (hwif->mate && hwif->mate->hwgroup) - mategroup = (ide_hwgroup_t *)(hwif->mate->hwgroup); - - if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) - return -EACCES; - - if (count >= PAGE_SIZE) - return -EINVAL; - - s = buf = (char *)__get_free_page(GFP_USER); - if (!buf) - return -ENOMEM; - - err = -ENOMEM; - q = prog = (struct entry *)__get_free_page(GFP_USER); - if (!prog) - goto out; - - err = -EFAULT; - if (copy_from_user(buf, buffer, count)) - goto out1; - - buf[count] = '\0'; - - while (isspace(*s)) - s++; - - while (*s) { - char *p; - int digits; - - start = s; - - if ((char *)(q + 1) > (char *)prog + PAGE_SIZE) { - msg = "too many entries"; - goto parse_error; - } - - switch (*s++) { - case 'R': q->pci = 0; - break; - case 'P': q->pci = 1; - want_pci = 1; - break; - default: msg = "expected 'R' or 'P'"; - goto parse_error; - } - - q->reg = simple_strtoul(s, &p, 16); - digits = p - s; - if (!digits || digits > 4 || (q->pci && q->reg > 0xff)) { - msg = "bad/missing register number"; - goto parse_error; - } - if (*p++ != ':') { - msg = "missing ':'"; - goto parse_error; - } - q->val = simple_strtoul(p, &s, 16); - digits = s - p; - if (digits != 2 && digits != 4 && digits != 8) { - msg = "bad data, 2/4/8 digits required"; - goto parse_error; - } - q->size = digits / 2; - - if (q->pci) { -#ifdef CONFIG_BLK_DEV_IDEPCI - if (q->reg & (q->size - 1)) { - msg = "misaligned access"; - goto parse_error; - } -#else - msg = "not a PCI device"; - goto parse_error; -#endif /* CONFIG_BLK_DEV_IDEPCI */ - } - - q++; - - if (*s && !isspace(*s++)) { - msg = "expected whitespace after data"; - goto parse_error; - } - while (isspace(*s)) - s++; - } - - /* - * What follows below is fucking insane, even for IDE people. - * For now I've dealt with the obvious problems on the parsing - * side, but IMNSHO we should simply remove the write access - * to /proc/ide/.../config, killing that FPOS completely. - */ - - err = -EBUSY; - timeout = jiffies + (3 * HZ); - spin_lock_irqsave(&ide_lock, flags); - while (mygroup->busy || - (mategroup && mategroup->busy)) { - spin_unlock_irqrestore(&ide_lock, flags); - if (time_after(jiffies, timeout)) { - printk("/proc/ide/%s/config: channel(s) busy, cannot write\n", hwif->name); - goto out1; - } - spin_lock_irqsave(&ide_lock, flags); - } - -#ifdef CONFIG_BLK_DEV_IDEPCI - if (want_pci && (!hwif->pci_dev || hwif->pci_dev->vendor)) { - spin_unlock_irqrestore(&ide_lock, flags); - printk("proc_ide: PCI registers not accessible for %s\n", - hwif->name); - err = -EINVAL; - goto out1; - } -#endif /* CONFIG_BLK_DEV_IDEPCI */ - - for (r = prog; r < q; r++) { - unsigned int reg = r->reg, val = r->val; - if (r->pci) { -#ifdef CONFIG_BLK_DEV_IDEPCI - int rc = 0; - struct pci_dev *dev = hwif->pci_dev; - switch (q->size) { - case 1: msg = "byte"; - rc = pci_write_config_byte(dev, reg, val); - break; - case 2: msg = "word"; - rc = pci_write_config_word(dev, reg, val); - break; - case 4: msg = "dword"; - rc = pci_write_config_dword(dev, reg, val); - break; - } - if (rc) { - spin_unlock_irqrestore(&ide_lock, flags); - printk("proc_ide_write_config: error writing %s at bus %02x dev %02x reg 0x%x value 0x%x\n", - msg, dev->bus->number, dev->devfn, reg, val); - printk("proc_ide_write_config: error %d\n", rc); - err = -EIO; - goto out1; - } -#endif /* CONFIG_BLK_DEV_IDEPCI */ - } else { /* not pci */ - switch (r->size) { - case 1: hwif->OUTB(val, reg); - break; - case 2: hwif->OUTW(val, reg); - break; - case 4: hwif->OUTL(val, reg); - break; - } - } - } - spin_unlock_irqrestore(&ide_lock, flags); - err = count; -out1: - free_page((unsigned long)prog); -out: - free_page((unsigned long)buf); - return err; - -parse_error: - printk("parse error\n"); - printk("proc_ide: error: %s: '%s'\n", msg, start); - err = -EINVAL; - goto out1; -} - -static int proc_ide_read_config - (char *page, char **start, off_t off, int count, int *eof, void *data) -{ - char *out = page; - int len; - -#ifdef CONFIG_BLK_DEV_IDEPCI - ide_hwif_t *hwif = (ide_hwif_t *)data; - struct pci_dev *dev = hwif->pci_dev; - if ((hwif->pci_dev && hwif->pci_dev->vendor) && dev && dev->bus) { - int reg = 0; - - out += sprintf(out, "pci bus %02x device %02x vendor %04x " - "device %04x channel %d\n", - dev->bus->number, dev->devfn, - hwif->pci_dev->vendor, hwif->pci_dev->device, - hwif->channel); - do { - u8 val; - int rc = pci_read_config_byte(dev, reg, &val); - if (rc) { - printk("proc_ide_read_config: error %d reading" - " bus %02x dev %02x reg 0x%02x\n", - rc, dev->bus->number, dev->devfn, reg); - out += sprintf(out, "??%c", - (++reg & 0xf) ? ' ' : '\n'); - } else - out += sprintf(out, "%02x%c", - val, (++reg & 0xf) ? ' ' : '\n'); - } while (reg < 0x100); - } else -#endif /* CONFIG_BLK_DEV_IDEPCI */ - out += sprintf(out, "(none)\n"); - len = out - page; - PROC_IDE_READ_RETURN(page,start,off,count,eof,len); -} - static int proc_ide_read_imodel (char *page, char **start, off_t off, int count, int *eof, void *data) { @@ -388,6 +132,9 @@ char *out = page; int len, rc, mul_factor, div_factor; + printk(KERN_WARNING "Warning: /proc/ide/hd?/settings interface is " + "obsolete, and will be removed soon!\n"); + down(&ide_setting_sem); out += sprintf(out, "name\t\t\tvalue\t\tmin\t\tmax\t\tmode\n"); out += sprintf(out, "----\t\t\t-----\t\t---\t\t---\t\t----\n"); @@ -424,6 +171,9 @@ ide_settings_t *setting; char *buf, *s; + printk(KERN_WARNING "Warning: /proc/ide/hd?/settings interface is " + "obsolete, and will be removed soon!\n"); + if (!capable(CAP_SYS_ADMIN)) return -EACCES; @@ -674,7 +424,7 @@ } } -void destroy_proc_ide_drives(ide_hwif_t *hwif) +static void destroy_proc_ide_drives(ide_hwif_t *hwif) { int d; @@ -687,7 +437,6 @@ static ide_proc_entry_t hwif_entries[] = { { "channel", S_IFREG|S_IRUGO, proc_ide_read_channel, NULL }, - { "config", S_IFREG|S_IRUGO|S_IWUSR,proc_ide_read_config, proc_ide_write_config }, { "mate", S_IFREG|S_IRUGO, proc_ide_read_mate, NULL }, { "model", S_IFREG|S_IRUGO, proc_ide_read_imodel, NULL }, { NULL, 0, NULL, NULL } @@ -723,28 +472,29 @@ EXPORT_SYMBOL_GPL(ide_pci_create_host_proc); #endif -void destroy_proc_ide_interfaces(void) +void destroy_proc_ide_interface(ide_hwif_t *hwif) +{ + if (hwif->proc) { + destroy_proc_ide_drives(hwif); + ide_remove_proc_entries(hwif->proc, hwif_entries); + remove_proc_entry(hwif->name, proc_ide_root); + hwif->proc = NULL; + } +} + +static void destroy_proc_ide_interfaces(void) { int h; for (h = 0; h < MAX_HWIFS; h++) { ide_hwif_t *hwif = &ide_hwifs[h]; - int exist = (hwif->proc != NULL); #if 0 if (!hwif->present) continue; #endif - if (exist) { - destroy_proc_ide_drives(hwif); - ide_remove_proc_entries(hwif->proc, hwif_entries); - remove_proc_entry(hwif->name, proc_ide_root); - hwif->proc = NULL; - } else - continue; + destroy_proc_ide_interface(hwif); } } - -EXPORT_SYMBOL(destroy_proc_ide_interfaces); extern struct seq_operations ide_drivers_op; static int ide_drivers_open(struct inode *inode, struct file *file) diff -Nru a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c --- a/drivers/ide/ide-taskfile.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/ide/ide-taskfile.c 2004-11-10 17:19:02 -08:00 @@ -63,17 +63,14 @@ } } - -void taskfile_input_data (ide_drive_t *drive, void *buffer, u32 wcount) +static void taskfile_input_data(ide_drive_t *drive, void *buffer, u32 wcount) { HWIF(drive)->ata_input_data(drive, buffer, wcount); if (drive->bswap) ata_bswap_data(buffer, wcount); } -EXPORT_SYMBOL(taskfile_input_data); - -void taskfile_output_data (ide_drive_t *drive, void *buffer, u32 wcount) +static void taskfile_output_data(ide_drive_t *drive, void *buffer, u32 wcount) { if (drive->bswap) { ata_bswap_data(buffer, wcount); @@ -84,8 +81,6 @@ } } -EXPORT_SYMBOL(taskfile_output_data); - int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf) { ide_task_t args; @@ -101,8 +96,6 @@ return ide_raw_taskfile(drive, &args, buf); } -EXPORT_SYMBOL(taskfile_lib_get_identify); - ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) { ide_hwif_t *hwif = HWIF(drive); @@ -281,14 +274,20 @@ #ifdef CONFIG_HIGHMEM unsigned long flags; #endif + unsigned int offset; u8 *buf; page = sg[hwif->cursg].page; + offset = sg[hwif->cursg].offset + hwif->cursg_ofs * SECTOR_SIZE; + + /* get the current page and offset */ + page = nth_page(page, (offset >> PAGE_SHIFT)); + offset %= PAGE_SIZE; + #ifdef CONFIG_HIGHMEM local_irq_save(flags); #endif - buf = kmap_atomic(page, KM_BIO_SRC_IRQ) + - sg[hwif->cursg].offset + (hwif->cursg_ofs * SECTOR_SIZE); + buf = kmap_atomic(page, KM_BIO_SRC_IRQ) + offset; hwif->nleft--; hwif->cursg_ofs++; @@ -304,7 +303,7 @@ else taskfile_input_data(drive, buf, SECTOR_WORDS); - kunmap_atomic(page, KM_BIO_SRC_IRQ); + kunmap_atomic(buf, KM_BIO_SRC_IRQ); #ifdef CONFIG_HIGHMEM local_irq_restore(flags); #endif @@ -420,7 +419,7 @@ /* * Handler for command with PIO data-out phase (Write/Write Multiple). */ -ide_startstop_t task_out_intr (ide_drive_t *drive) +static ide_startstop_t task_out_intr (ide_drive_t *drive) { ide_hwif_t *hwif = drive->hwif; struct request *rq = HWGROUP(drive)->rq; @@ -445,8 +444,6 @@ return ide_started; } -EXPORT_SYMBOL(task_out_intr); - ide_startstop_t pre_task_out_intr (ide_drive_t *drive, struct request *rq) { ide_startstop_t startstop; @@ -470,7 +467,7 @@ } EXPORT_SYMBOL(pre_task_out_intr); -int ide_diag_taskfile (ide_drive_t *drive, ide_task_t *args, unsigned long data_size, u8 *buf) +static int ide_diag_taskfile(ide_drive_t *drive, ide_task_t *args, unsigned long data_size, u8 *buf) { struct request rq; @@ -507,8 +504,6 @@ return ide_do_drive_cmd(drive, &rq, ide_wait); } -EXPORT_SYMBOL(ide_diag_taskfile); - int ide_raw_taskfile (ide_drive_t *drive, ide_task_t *args, u8 *buf) { return ide_diag_taskfile(drive, args, 0, buf); @@ -516,10 +511,6 @@ EXPORT_SYMBOL(ide_raw_taskfile); -#define MAX_DMA (256*SECTOR_WORDS) - -ide_startstop_t flagged_taskfile(ide_drive_t *, ide_task_t *); - int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) { ide_task_request_t *req_task; @@ -670,8 +661,6 @@ return err; } -EXPORT_SYMBOL(ide_taskfile_ioctl); - int ide_wait_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors, u8 *buf) { struct request rq; @@ -689,8 +678,6 @@ return ide_do_drive_cmd(drive, &rq, ide_wait); } -EXPORT_SYMBOL(ide_wait_cmd); - /* * FIXME : this needs to map into at taskfile. */ @@ -748,9 +735,7 @@ return err; } -EXPORT_SYMBOL(ide_cmd_ioctl); - -int ide_wait_cmd_task (ide_drive_t *drive, u8 *buf) +static int ide_wait_cmd_task(ide_drive_t *drive, u8 *buf) { struct request rq; @@ -760,8 +745,6 @@ return ide_do_drive_cmd(drive, &rq, ide_wait); } -EXPORT_SYMBOL(ide_wait_cmd_task); - /* * FIXME : this needs to map into at taskfile. */ @@ -780,8 +763,6 @@ return err; } -EXPORT_SYMBOL(ide_task_ioctl); - /* * NOTICE: This is additions from IBM to provide a discrete interface, * for selective taskregister access operations. Nice JOB Klaus!!! @@ -902,5 +883,3 @@ return ide_started; } - -EXPORT_SYMBOL(flagged_taskfile); diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c --- a/drivers/ide/ide.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/ide/ide.c 2004-11-10 17:19:03 -08:00 @@ -694,7 +694,6 @@ hwif->ide_dma_test_irq = tmp_hwif->ide_dma_test_irq; hwif->ide_dma_host_on = tmp_hwif->ide_dma_host_on; hwif->ide_dma_host_off = tmp_hwif->ide_dma_host_off; - hwif->ide_dma_verbose = tmp_hwif->ide_dma_verbose; hwif->ide_dma_lostirq = tmp_hwif->ide_dma_lostirq; hwif->ide_dma_timeout = tmp_hwif->ide_dma_timeout; @@ -797,9 +796,7 @@ DRIVER(drive)->cleanup(drive); } -#ifdef CONFIG_PROC_FS - destroy_proc_ide_drives(hwif); -#endif + destroy_proc_ide_interface(hwif); hwgroup = hwif->hwgroup; /* @@ -988,9 +985,10 @@ } /** - * ide_register_hw - register IDE interface + * ide_register_hw_with_fixup - register IDE interface * @hw: hardware registers * @hwifp: pointer to returned hwif + * @fixup: fixup function * * Register an IDE interface, specifying exactly the registers etc. * Set init=1 iff calling before probes have taken place. @@ -998,7 +996,7 @@ * Returns -1 on error. */ -int ide_register_hw (hw_regs_t *hw, ide_hwif_t **hwifp) +int ide_register_hw_with_fixup(hw_regs_t *hw, ide_hwif_t **hwifp, void(*fixup)(ide_hwif_t *hwif)) { int index, retry = 1; ide_hwif_t *hwif; @@ -1037,7 +1035,7 @@ hwif->chipset = hw->chipset; if (!initializing) { - probe_hwif_init(hwif); + probe_hwif_init_with_fixup(hwif, fixup); create_proc_ide_interfaces(); } @@ -1047,6 +1045,13 @@ return (initializing || hwif->present) ? index : -1; } +EXPORT_SYMBOL(ide_register_hw_with_fixup); + +int ide_register_hw(hw_regs_t *hw, ide_hwif_t **hwifp) +{ + return ide_register_hw_with_fixup(hw, hwifp, NULL); +} + EXPORT_SYMBOL(ide_register_hw); /* @@ -1855,7 +1860,7 @@ if (s[0] == 'h' && s[1] == 'd' && s[2] >= 'a' && s[2] <= max_drive) { const char *hd_words[] = { "none", "noprobe", "nowerr", "cdrom", "serialize", - "autotune", "noautotune", "stroke", "swapdata", "bswap", + "autotune", "noautotune", "minus8", "swapdata", "bswap", "minus11", "remap", "remap63", "scsi", NULL }; unit = s[2] - 'a'; hw = unit / MAX_DRIVES; @@ -1885,13 +1890,10 @@ goto do_serialize; case -6: /* "autotune" */ drive->autotune = IDE_TUNE_AUTO; - goto done; + goto obsolete_option; case -7: /* "noautotune" */ drive->autotune = IDE_TUNE_NOAUTO; - goto done; - case -8: /* stroke */ - drive->stroke = 1; - goto done; + goto obsolete_option; case -9: /* "swapdata" */ case -10: /* "bswap" */ drive->bswap = 1; @@ -2023,30 +2025,30 @@ case -7: /* ata66 */ #ifdef CONFIG_BLK_DEV_IDEPCI hwif->udma_four = 1; - goto done; + goto obsolete_option; #else goto bad_hwif; #endif case -6: /* dma */ hwif->autodma = 1; - goto done; + goto obsolete_option; case -5: /* "reset" */ hwif->reset = 1; - goto done; + goto obsolete_option; case -4: /* "noautotune" */ hwif->drives[0].autotune = IDE_TUNE_NOAUTO; hwif->drives[1].autotune = IDE_TUNE_NOAUTO; - goto done; + goto obsolete_option; case -3: /* "autotune" */ hwif->drives[0].autotune = IDE_TUNE_AUTO; hwif->drives[1].autotune = IDE_TUNE_AUTO; - goto done; + goto obsolete_option; case -2: /* "serialize" */ do_serialize: hwif->mate = &ide_hwifs[hw^1]; hwif->mate->mate = hwif; hwif->serialized = hwif->mate->serialized = 1; - goto done; + goto obsolete_option; case -1: /* "noprobe" */ hwif->noprobe = 1; @@ -2063,7 +2065,7 @@ hwif->irq = vals[2]; hwif->noprobe = 0; hwif->chipset = ide_forced; - goto done; + goto obsolete_option; case 0: goto bad_option; default: @@ -2073,6 +2075,9 @@ } bad_option: printk(" -- BAD OPTION\n"); + return 1; +obsolete_option: + printk(" -- OBSOLETE OPTION, WILL BE REMOVED SOON!\n"); return 1; bad_hwif: printk("-- NOT SUPPORTED ON ide%d", hw); diff -Nru a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c --- a/drivers/ide/legacy/ide-cs.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/ide/legacy/ide-cs.c 2004-11-10 17:19:05 -08:00 @@ -206,7 +206,7 @@ ide_init_hwif_ports(&hw, io, ctl, NULL); hw.irq = irq; hw.chipset = ide_pci; - return ide_register_hw(&hw, NULL); + return ide_register_hw_with_fixup(&hw, NULL, ide_undecoded_slave); } /*====================================================================== diff -Nru a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c --- a/drivers/ide/pci/aec62xx.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/ide/pci/aec62xx.c 2004-11-10 17:19:06 -08:00 @@ -18,52 +18,7 @@ #include "aec62xx.h" -#if defined(DISPLAY_AEC62XX_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 aec62xx_proc = 0; - -#define AEC_MAX_DEVS 5 - -static struct pci_dev *aec_devs[AEC_MAX_DEVS]; -static int n_aec_devs; - -static int aec62xx_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - char *chipset_nums[] = {"error", "error", "error", "error", - "error", "error", "850UF", "860", - "860R", "865", "865R", "error" }; - int len; - int i; - - for (i = 0; i < n_aec_devs; i++) { - struct pci_dev *dev = aec_devs[i]; - unsigned long iobase = pci_resource_start(dev, 4); - u8 c0 = 0, c1 = 0, art = 0; - - c0 = inb(iobase + 0x02); - c1 = inb(iobase + 0x0a); - - p += sprintf(p, "\nController: %d\n", i); - p += sprintf(p, "Chipset: AEC%s\n", chipset_nums[dev->device]); - - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - (void) pci_read_config_byte(dev, 0x4a, &art); - p += sprintf(p, " %sabled ", - (art&0x02)?" en":"dis"); - p += sprintf(p, " %sabled\n", - (art&0x04)?" en":"dis"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s ", - (c0&0x20)?"yes":"no ",(c0&0x40)?"yes":"no "); - p += sprintf(p, " %s %s\n", - (c1&0x20)?"yes":"no ",(c1&0x40)?"yes":"no "); - +#if 0 if (dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) { (void) pci_read_config_byte(dev, 0x54, &art); p += sprintf(p, "DMA Mode: %s(%s)", @@ -79,59 +34,7 @@ (c1&0x40)?((art&0xc0)?"UDMA":" DMA"):" PIO", (art&0x80)?"2":(art&0x40)?"1":"0"); } else { - /* - * case PCI_DEVICE_ID_ARTOP_ATP860: - * case PCI_DEVICE_ID_ARTOP_ATP860R: - * case PCI_DEVICE_ID_ARTOP_ATP865: - * case PCI_DEVICE_ID_ARTOP_ATP865R: - */ - (void) pci_read_config_byte(dev, 0x44, &art); - p += sprintf(p, "DMA Mode: %s(%s)", - (c0&0x20)?((art&0x07)?"UDMA":" DMA"):" PIO", - ((art&0x07)==0x07)?"6": - ((art&0x06)==0x06)?"5": - ((art&0x05)==0x05)?"4": - ((art&0x04)==0x04)?"3": - ((art&0x03)==0x03)?"2": - ((art&0x02)==0x02)?"1": - ((art&0x01)==0x01)?"0":"?"); - p += sprintf(p, " %s(%s)", - (c0&0x40)?((art&0x70)?"UDMA":" DMA"):" PIO", - ((art&0x70)==0x70)?"6": - ((art&0x60)==0x60)?"5": - ((art&0x50)==0x50)?"4": - ((art&0x40)==0x40)?"3": - ((art&0x30)==0x30)?"2": - ((art&0x20)==0x20)?"1": - ((art&0x10)==0x10)?"0":"?"); - (void) pci_read_config_byte(dev, 0x45, &art); - p += sprintf(p, " %s(%s)", - (c1&0x20)?((art&0x07)?"UDMA":" DMA"):" PIO", - ((art&0x07)==0x07)?"6": - ((art&0x06)==0x06)?"5": - ((art&0x05)==0x05)?"4": - ((art&0x04)==0x04)?"3": - ((art&0x03)==0x03)?"2": - ((art&0x02)==0x02)?"1": - ((art&0x01)==0x01)?"0":"?"); - p += sprintf(p, " %s(%s)\n", - (c1&0x40)?((art&0x70)?"UDMA":" DMA"):" PIO", - ((art&0x70)==0x70)?"6": - ((art&0x60)==0x60)?"5": - ((art&0x50)==0x50)?"4": - ((art&0x40)==0x40)?"3": - ((art&0x30)==0x30)?"2": - ((art&0x20)==0x20)?"1": - ((art&0x10)==0x10)?"0":"?"); - } - } - /* p - buffer must be less than 4k! */ - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* defined(DISPLAY_AEC62xx_TIMINGS) && defined(CONFIG_PROC_FS) */ +#endif /* * TO DO: active tuning and correction of cards without a bios. @@ -286,36 +189,16 @@ struct hd_driveid *id = drive->id; if ((id->capability & 1) && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - if (id->field_valid & 4) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - int dma = config_chipset_for_dma(drive); - if ((id->field_valid & 2) && !dma) - goto try_dma_modes; - } - } else if (id->field_valid & 2) { -try_dma_modes: - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - /* Force if Capable regular DMA modes */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - /* Consult the list of known "good" drives */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } else { - goto fast_ata_pio; + + if (ide_use_dma(drive)) { + if (config_chipset_for_dma(drive)) + return hwif->ide_dma_on(drive); } - return hwif->ide_dma_on(drive); + + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: aec62xx_tune_drive(drive, 5); return hwif->ide_dma_off_quietly(drive); } @@ -374,15 +257,6 @@ pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start); } - -#if defined(DISPLAY_AEC62XX_TIMINGS) && defined(CONFIG_PROC_FS) - aec_devs[n_aec_devs++] = dev; - - if (!aec62xx_proc) { - aec62xx_proc = 1; - ide_pci_create_host_proc("aec62xx", aec62xx_get_info); - } -#endif /* DISPLAY_AEC62XX_TIMINGS && CONFIG_PROC_FS */ if (bus_speed <= 33) pci_set_drvdata(dev, (void *) aec6xxx_33_base); diff -Nru a/drivers/ide/pci/aec62xx.h b/drivers/ide/pci/aec62xx.h --- a/drivers/ide/pci/aec62xx.h 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/pci/aec62xx.h 2004-11-10 17:19:04 -08:00 @@ -5,8 +5,6 @@ #include #include -#define DISPLAY_AEC62XX_TIMINGS - struct chipset_bus_clock_list_entry { byte xfer_speed; byte chipset_settings; diff -Nru a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c --- a/drivers/ide/pci/amd74xx.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/ide/pci/amd74xx.c 2004-11-10 17:19:07 -08:00 @@ -416,8 +416,8 @@ { int i; - if (!hwif->irq) - hwif->irq = hwif->channel ? 15 : 14; + if (hwif->irq == 0) /* 0 is bogus but will do for now */ + hwif->irq = pci_get_legacy_ide_irq(hwif->pci_dev, hwif->channel); hwif->autodma = 0; diff -Nru a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c --- a/drivers/ide/pci/atiixp.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/pci/atiixp.c 2004-11-10 17:19:04 -08:00 @@ -47,102 +47,6 @@ static int save_mdma_mode[4]; -#define DISPLAY_ATIIXP_TIMINGS - -#if defined(DISPLAY_ATIIXP_TIMINGS) && defined(CONFIG_PROC_FS) - -#include -#include - -static u8 atiixp_proc; -static struct pci_dev *bmide_dev; - -/** - * atiixp_get_info - fill in /proc for ATIIXP IDE - * @buffer: buffer to fill - * @addr: address of user start in buffer - * @offset: offset into 'file' - * @count: buffer count - * - * Output summary data on the tuning. - */ - -static int atiixp_get_info(char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - struct pci_dev *dev = bmide_dev; - unsigned long bibma = pci_resource_start(dev, 4); - u32 mdma_timing = 0; - u16 udma_mode = 0, pio_mode = 0; - u8 c0, c1, udma_control = 0; - - p += sprintf(p, "\n ATI "); - p += sprintf(p, "ATIIXP Ultra100 IDE Chipset.\n"); - - pci_read_config_byte(dev, ATIIXP_IDE_UDMA_CONTROL, &udma_control); - pci_read_config_word(dev, ATIIXP_IDE_UDMA_MODE, &udma_mode); - pci_read_config_word(dev, ATIIXP_IDE_PIO_MODE, &pio_mode); - pci_read_config_dword(dev, ATIIXP_IDE_MDMA_TIMING, &mdma_timing); - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - c0 = inb(bibma + 0x02); - c1 = inb(bibma + 0x0a); - - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled " - " %sabled\n", - (c0 & 0x80) ? "dis" : " en", - (c1 & 0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s " - " %s %s\n", - (c0 & 0x20) ? "yes" : "no ", - (c0 & 0x40) ? "yes" : "no ", - (c1 & 0x20) ? "yes" : "no ", - (c1 & 0x40) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s " - " %s %s\n", - (udma_control & 0x01) ? "yes" : "no ", - (udma_control & 0x02) ? "yes" : "no ", - (udma_control & 0x04) ? "yes" : "no ", - (udma_control & 0x08) ? "yes" : "no " ); - p += sprintf(p, "UDMA mode: %c %c " - " %c %c\n", - (udma_control & 0x01) ? - ((udma_mode & 0x07) + 48) : 'X', - (udma_control & 0x02) ? - (((udma_mode >> 4) & 0x07) + 48) : 'X', - (udma_control & 0x04) ? - (((udma_mode >> 8) & 0x07) + 48) : 'X', - (udma_control & 0x08) ? - (((udma_mode >> 12) & 0x07) + 48) : 'X'); - p += sprintf(p, "MDMA mode: %c %c " - " %c %c\n", - (save_mdma_mode[0] && (c0 & 0x20)) ? - ((save_mdma_mode[0] & 0xf) + 48) : 'X', - (save_mdma_mode[1] && (c0 & 0x40)) ? - ((save_mdma_mode[1] & 0xf) + 48) : 'X', - (save_mdma_mode[2] && (c1 & 0x20)) ? - ((save_mdma_mode[2] & 0xf) + 48) : 'X', - (save_mdma_mode[3] && (c1 & 0x40)) ? - ((save_mdma_mode[3] & 0xf) + 48) : 'X'); - p += sprintf(p, "PIO mode: %c %c " - " %c %c\n", - (c0 & 0x20) ? 'X' : ((pio_mode & 0x07) + 48), - (c0 & 0x40) ? 'X' : (((pio_mode >> 4) & 0x07) + 48), - (c1 & 0x20) ? 'X' : (((pio_mode >> 8) & 0x07) + 48), - (c1 & 0x40) ? 'X' : (((pio_mode >> 12) & 0x07) + 48)); - - return p - buffer; /* => must be less than 4k! */ -} -#endif /* defined(DISPLAY_ATIIXP_TIMINGS) && defined(CONFIG_PROC_FS) */ - /** * atiixp_ratemask - compute rate mask for ATIIXP IDE * @drive: IDE drive to compute for @@ -357,36 +261,16 @@ drive->init_speed = 0; if ((id->capability & 1) && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - if (id->field_valid & 4) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - if ((id->field_valid & 2) && - (!atiixp_config_drive_for_dma(drive))) - goto try_dma_modes; - } - } else if (id->field_valid & 2) { -try_dma_modes: - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - /* Force if Capable regular DMA modes */ - if (!atiixp_config_drive_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - /* Consult the list of known "good" drives */ - if (!atiixp_config_drive_for_dma(drive)) - goto no_dma_set; - } else { - goto fast_ata_pio; + + if (ide_use_dma(drive)) { + if (atiixp_config_drive_for_dma(drive)) + return hwif->ide_dma_on(drive); } - return hwif->ide_dma_on(drive); + + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: tspeed = ide_get_best_pio_mode(drive, 255, 5, NULL); speed = atiixp_dma_2_pio(XFER_PIO_0 + tspeed) + XFER_PIO_0; hwif->speedproc(drive, speed); @@ -397,27 +281,6 @@ } /** - * init_chipset_atiixp - set up the ATIIXP chipset - * @dev: PCI device to set up - * @name: Name of the device - * - * Initialize the PCI device as required. For the ATIIXP this turns - * out to be nice and simple - */ - -static unsigned int __devinit init_chipset_atiixp(struct pci_dev *dev, const char *name) -{ -#if defined(DISPLAY_ATIIXP_TIMINGS) && defined(CONFIG_PROC_FS) - if (!atiixp_proc) { - atiixp_proc = 1; - bmide_dev = dev; - ide_pci_create_host_proc("atiixp", atiixp_get_info); - } -#endif /* DISPLAY_ATIIXP_TIMINGS && CONFIG_PROC_FS */ - return 0; -} - -/** * init_hwif_atiixp - fill in the hwif for the ATIIXP * @hwif: IDE interface * @@ -459,7 +322,6 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = { { /* 0 */ .name = "ATIIXP", - .init_chipset = init_chipset_atiixp, .init_hwif = init_hwif_atiixp, .channels = 2, .autodma = AUTODMA, diff -Nru a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c --- a/drivers/ide/pci/cmd64x.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/ide/pci/cmd64x.c 2004-11-10 17:19:06 -08:00 @@ -441,36 +441,16 @@ struct hd_driveid *id = drive->id; if ((id != NULL) && ((id->capability & 1) != 0) && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - if ((id->field_valid & 4) && cmd64x_ratemask(drive)) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - int dma = config_chipset_for_dma(drive); - if ((id->field_valid & 2) && !dma) - goto try_dma_modes; - } - } else if (id->field_valid & 2) { -try_dma_modes: - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - /* Force if Capable regular DMA modes */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - /* Consult the list of known "good" drives */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } else { - goto fast_ata_pio; + + if (ide_use_dma(drive)) { + if (config_chipset_for_dma(drive)) + return hwif->ide_dma_on(drive); } - return hwif->ide_dma_on(drive); + + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: config_chipset_for_pio(drive, 1); return hwif->ide_dma_off_quietly(drive); } diff -Nru a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c --- a/drivers/ide/pci/cs5520.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/ide/pci/cs5520.c 2004-11-10 17:19:02 -08:00 @@ -51,57 +51,6 @@ #include #include -#define DISPLAY_CS5520_TIMINGS - -#if defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 cs5520_proc = 0; -static struct pci_dev *bmide_dev; - -static int cs5520_get_info(char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - unsigned long bmiba = pci_resource_start(bmide_dev, 2); - int len; - u8 c0 = 0, c1 = 0; - u16 reg16; - u32 reg32; - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - c0 = inb(bmiba + 0x02); - c1 = inb(bmiba + 0x0a); - - p += sprintf(p, "\nCyrix CS55x0 IDE\n"); - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled " - " %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - - p += sprintf(p, "\n\nTimings: \n"); - - pci_read_config_word(bmide_dev, 0x62, ®16); - p += sprintf(p, "8bit CAT/CRT : %04x\n", reg16); - pci_read_config_dword(bmide_dev, 0x64, ®32); - p += sprintf(p, "16bit Primary : %08x\n", reg32); - pci_read_config_dword(bmide_dev, 0x68, ®32); - p += sprintf(p, "16bit Secondary: %08x\n", reg32); - - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} - -#endif - struct pio_clocks { int address; @@ -144,12 +93,14 @@ printk("PIO clocking = %d\n", pio); /* FIXME: if DMA = 1 do we need to set the DMA bit here ? */ - - /* 8bit command timing for channel */ + + /* 8bit CAT/CRT - 8bit command timing for channel */ pci_write_config_byte(pdev, 0x62 + controller, (cs5520_pio_clocks[pio].recovery << 4) | (cs5520_pio_clocks[pio].assert)); - + + /* 0x64 - 16bit Primary, 0x68 - 16bit Secondary */ + /* FIXME: should these use address ? */ /* Data read timing */ pci_write_config_byte(pdev, 0x64 + 4*controller + (drive->dn&1), @@ -188,19 +139,6 @@ /* Then tell the core to use DMA operations */ return hwif->ide_dma_on(drive); } - - -static unsigned int __devinit init_chipset_cs5520(struct pci_dev *dev, const char *name) -{ -#if defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS) - if (!cs5520_proc) { - cs5520_proc = 1; - bmide_dev = dev; - ide_pci_create_host_proc("cs5520", cs5520_get_info); - } -#endif /* DISPLAY_CS5520_TIMINGS && CONFIG_PROC_FS */ - return 0; -} /* * We provide a callback for our nonstandard DMA location @@ -255,7 +193,6 @@ #define DECLARE_CS_DEV(name_str) \ { \ .name = name_str, \ - .init_chipset = init_chipset_cs5520, \ .init_setup_dma = cs5520_init_setup_dma, \ .init_hwif = init_hwif_cs5520, \ .channels = 2, \ @@ -294,7 +231,6 @@ printk(KERN_WARNING "cs5520: No suitable DMA available.\n"); return -ENODEV; } - init_chipset_cs5520(dev, d->name); index.all = 0xf0f0; @@ -303,10 +239,8 @@ * do all the device setup for us */ - ide_pci_setup_ports(dev, d, 1, 14, &index); + ide_pci_setup_ports(dev, d, 14, &index); - printk("Index.b %d %d\n", index.b.low, index.b.high); - mdelay(2000); if((index.b.low & 0xf0) != 0xf0) probe_hwif_init(&ide_hwifs[index.b.low]); if((index.b.high & 0xf0) != 0xf0) diff -Nru a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c --- a/drivers/ide/pci/cs5530.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/ide/pci/cs5530.c 2004-11-10 17:19:03 -08:00 @@ -31,56 +31,6 @@ #include #include -#define DISPLAY_CS5530_TIMINGS - -#if defined(DISPLAY_CS5530_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 cs5530_proc = 0; - -static struct pci_dev *bmide_dev; - -static int cs5530_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - unsigned long bibma = pci_resource_start(bmide_dev, 4); - u8 c0 = 0, c1 = 0; - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - - c0 = inb_p((u16)bibma + 0x02); - c1 = inb_p((u16)bibma + 0x0a); - - p += sprintf(p, "\n " - "Cyrix 5530 Chipset.\n"); - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled " - " %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s " - " %s %s\n", - (c0&0x20) ? "yes" : "no ", - (c0&0x40) ? "yes" : "no ", - (c1&0x20) ? "yes" : "no ", - (c1&0x40) ? "yes" : "no " ); - - p += sprintf(p, "UDMA\n"); - p += sprintf(p, "DMA\n"); - p += sprintf(p, "PIO\n"); - - return p-buffer; -} -#endif /* DISPLAY_CS5530_TIMINGS && CONFIG_PROC_FS */ - /** * cs5530_xfer_set_mode - set a new transfer mode at the drive * @drive: drive to tune @@ -272,14 +222,6 @@ struct pci_dev *master_0 = NULL, *cs5530_0 = NULL; unsigned long flags; -#if defined(DISPLAY_CS5530_TIMINGS) && defined(CONFIG_PROC_FS) - if (!cs5530_proc) { - cs5530_proc = 1; - bmide_dev = dev; - ide_pci_create_host_proc("cs5530", cs5530_get_info); - } -#endif /* DISPLAY_CS5530_TIMINGS && CONFIG_PROC_FS */ - dev = NULL; while ((dev = pci_find_device(PCI_VENDOR_ID_CYRIX, PCI_ANY_ID, dev)) != NULL) { switch (dev->device) { @@ -411,7 +353,6 @@ .channels = 2, .autodma = AUTODMA, .bootable = ON_BOARD, - .flags = IDEPCI_FLAG_FORCE_MASTER, }; static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id) diff -Nru a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c --- a/drivers/ide/pci/hpt34x.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/pci/hpt34x.c 2004-11-10 17:19:04 -08:00 @@ -42,7 +42,7 @@ #include #include -#include "hpt34x.h" +#define HPT343_DEBUG_DRIVE_INFO 0 static u8 hpt34x_ratemask (ide_drive_t *drive) { @@ -69,7 +69,8 @@ u32 reg1= 0, tmp1 = 0, reg2 = 0, tmp2 = 0; u8 hi_speed, lo_speed; - SPLIT_BYTE(speed, hi_speed, lo_speed); + hi_speed = speed >> 4; + lo_speed = speed & 0x0f; if (hi_speed & 7) { hi_speed = (hi_speed & 4) ? 0x01 : 0x10; @@ -130,40 +131,20 @@ drive->init_speed = 0; if (id && (id->capability & 1) && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - if (id->field_valid & 4) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - int dma = config_chipset_for_dma(drive); - if ((id->field_valid & 2) && dma) - goto try_dma_modes; - } - } else if (id->field_valid & 2) { -try_dma_modes: - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - /* Force if Capable regular DMA modes */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - /* Consult the list of known "good" drives */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } else { - goto fast_ata_pio; - } + + if (ide_use_dma(drive)) { + if (config_chipset_for_dma(drive)) #ifndef CONFIG_HPT34X_AUTODMA - return hwif->ide_dma_off_quietly(drive); + return hwif->ide_dma_off_quietly(drive); #else - return hwif->ide_dma_on(drive); + return hwif->ide_dma_on(drive); #endif + } + + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: hpt34x_tune_drive(drive, 255); return hwif->ide_dma_off_quietly(drive); } @@ -249,9 +230,19 @@ hwif->drives[1].autodma = hwif->autodma; } +static ide_pci_device_t hpt34x_chipset __devinitdata = { + .name = "HPT34X", + .init_chipset = init_chipset_hpt34x, + .init_hwif = init_hwif_hpt34x, + .channels = 2, + .autodma = NOAUTODMA, + .bootable = NEVER_BOARD, + .extra = 16 +}; + static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_device_id *id) { - ide_pci_device_t *d = &hpt34x_chipsets[id->driver_data]; + ide_pci_device_t *d = &hpt34x_chipset; static char *chipset_names[] = {"HPT343", "HPT345"}; u16 pcicmd = 0; diff -Nru a/drivers/ide/pci/hpt34x.h b/drivers/ide/pci/hpt34x.h --- a/drivers/ide/pci/hpt34x.h 2004-11-10 17:19:07 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,29 +0,0 @@ -#ifndef HPT34X_H -#define HPT34X_H - -#include -#include -#include - -#define HPT343_DEBUG_DRIVE_INFO 0 - -#ifndef SPLIT_BYTE -#define SPLIT_BYTE(B,H,L) ((H)=(B>>4), (L)=(B-((B>>4)<<4))) -#endif - -static unsigned int init_chipset_hpt34x(struct pci_dev *, const char *); -static void init_hwif_hpt34x(ide_hwif_t *); - -static ide_pci_device_t hpt34x_chipsets[] __devinitdata = { - { /* 0 */ - .name = "HPT34X", - .init_chipset = init_chipset_hpt34x, - .init_hwif = init_hwif_hpt34x, - .channels = 2, - .autodma = NOAUTODMA, - .bootable = NEVER_BOARD, - .extra = 16 - } -}; - -#endif /* HPT34X_H */ diff -Nru a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c --- a/drivers/ide/pci/hpt366.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/ide/pci/hpt366.c 2004-11-10 17:19:07 -08:00 @@ -72,49 +72,6 @@ #include "hpt366.h" -#if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include -#endif /* defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) */ - -static unsigned int hpt_revision(struct pci_dev *dev); -static unsigned int hpt_minimum_revision(struct pci_dev *dev, int revision); - -#if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) - -static u8 hpt366_proc = 0; -static struct pci_dev *hpt_devs[HPT366_MAX_DEVS]; -static int n_hpt_devs; - -static int hpt366_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - char *chipset_nums[] = {"366", "366", "368", - "370", "370A", "372", - "302", "371", "374" }; - int i, len; - - p += sprintf(p, "\n " - "HighPoint HPT366/368/370/372/374\n"); - for (i = 0; i < n_hpt_devs; i++) { - struct pci_dev *dev = hpt_devs[i]; - unsigned long iobase = dev->resource[4].start; - u32 class_rev = hpt_revision(dev); - u8 c0, c1; - - p += sprintf(p, "\nController: %d\n", i); - p += sprintf(p, "Chipset: HPT%s\n", chipset_nums[class_rev]); - p += sprintf(p, "--------------- Primary Channel " - "--------------- Secondary Channel " - "--------------\n"); - - /* get the bus master status registers */ - c0 = inb(iobase + 0x2); - c1 = inb(iobase + 0xa); - p += sprintf(p, "Enabled: %s" - " %s\n", - (c0 & 0x80) ? "no" : "yes", - (c1 & 0x80) ? "no" : "yes"); #if 0 if (hpt_minimum_revision(dev, 3)) { u8 cbl; @@ -128,16 +85,6 @@ (cbl & 0x01) ? 33 : 66); p += sprintf(p, "\n"); } -#endif - p += sprintf(p, "--------------- drive0 --------- drive1 " - "------- drive0 ---------- drive1 -------\n"); - p += sprintf(p, "DMA capable: %s %s" - " %s %s\n", - (c0 & 0x20) ? "yes" : "no ", - (c0 & 0x40) ? "yes" : "no ", - (c1 & 0x20) ? "yes" : "no ", - (c1 & 0x40) ? "yes" : "no "); - { u8 c2, c3; /* older revs don't have these registers mapped @@ -159,15 +106,7 @@ (c3 & 0x80) ? "PIO " : "off "); } } - p += sprintf(p, "\n"); - - /* p - buffer must be less than 4k! */ - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) */ +#endif static u32 hpt_revision (struct pci_dev *dev) { @@ -521,35 +460,16 @@ drive->init_speed = 0; if (id && (id->capability & 1) && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - if (id->field_valid & 4) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - int dma = config_chipset_for_dma(drive); - if ((id->field_valid & 2) && !dma) - goto try_dma_modes; - } - } else if (id->field_valid & 2) { -try_dma_modes: - if (id->dma_mword & hwif->mwdma_mask) { - /* Force if Capable regular DMA modes */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - /* Consult the list of known "good" drives */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } else { - goto fast_ata_pio; + + if (ide_use_dma(drive)) { + if (config_chipset_for_dma(drive)) + return hwif->ide_dma_on(drive); } - return hwif->ide_dma_on(drive); + + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: hpt3xx_tune_drive(drive, 5); return hwif->ide_dma_off_quietly(drive); } @@ -1105,15 +1025,6 @@ } if (ret) return ret; - -#if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) - hpt_devs[n_hpt_devs++] = dev; - - if (!hpt366_proc) { - hpt366_proc = 1; - ide_pci_create_host_proc("hpt366", hpt366_get_info); - } -#endif /* DISPLAY_HPT366_TIMINGS && CONFIG_PROC_FS */ return dev->irq; } diff -Nru a/drivers/ide/pci/hpt366.h b/drivers/ide/pci/hpt366.h --- a/drivers/ide/pci/hpt366.h 2004-11-10 17:19:05 -08:00 +++ b/drivers/ide/pci/hpt366.h 2004-11-10 17:19:05 -08:00 @@ -5,8 +5,6 @@ #include #include -#define DISPLAY_HPT366_TIMINGS - /* various tuning parameters */ #define HPT_RESET_STATE_ENGINE #undef HPT_DELAY_INTERRUPT diff -Nru a/drivers/ide/pci/it8172.c b/drivers/ide/pci/it8172.c --- a/drivers/ide/pci/it8172.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/ide/pci/it8172.c 2004-11-10 17:19:06 -08:00 @@ -201,36 +201,16 @@ drive->init_speed = 0; if (id && (id->capability & 1) && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - if (id->field_valid & 4) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - int dma = it8172_config_chipset_for_dma(drive); - if ((id->field_valid & 2) && !dma) - goto try_dma_modes; - } - } else if (id->field_valid & 2) { -try_dma_modes: - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - /* Force if Capable regular DMA modes */ - if (!it8172_config_chipset_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - /* Consult the list of known "good" drives */ - if (!it8172_config_chipset_for_dma(drive)) - goto no_dma_set; - } else { - goto fast_ata_pio; + + if (ide_use_dma(drive)) { + if (it8172_config_chipset_for_dma(drive)) + return hwif->ide_dma_on(drive); } - return hwif->ide_dma_on(drive); + + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: it8172_tune_drive(drive, 5); return hwif->ide_dma_off_quietly(drive); } diff -Nru a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c --- a/drivers/ide/pci/ns87415.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/pci/ns87415.c 2004-11-10 17:19:04 -08:00 @@ -4,6 +4,7 @@ * Copyright (C) 1997-1998 Mark Lord * Copyright (C) 1998 Eddie C. Dost * Copyright (C) 1999-2000 Andre Hedrick + * Copyright (C) 2004 Grant Grundler * * Inspired by an earlier effort from David S. Miller */ @@ -25,6 +26,81 @@ #include +#ifdef CONFIG_SUPERIO +/* SUPERIO 87560 is a PoS chip that NatSem denies exists. + * Unfortunately, it's built-in on all Astro-based PA-RISC workstations + * which use the integrated NS87514 cell for CD-ROM support. + * i.e we have to support for CD-ROM installs. + * See drivers/parisc/superio.c for more gory details. + */ +#include + +static unsigned long superio_ide_status[2]; +static unsigned long superio_ide_select[2]; +static unsigned long superio_ide_dma_status[2]; + +#define SUPERIO_IDE_MAX_RETRIES 25 + +/* Because of a defect in Super I/O, all reads of the PCI DMA status + * registers, IDE status register and the IDE select register need to be + * retried + */ +static u8 superio_ide_inb (unsigned long port) +{ + if (port == superio_ide_status[0] || + port == superio_ide_status[1] || + port == superio_ide_select[0] || + port == superio_ide_select[1] || + port == superio_ide_dma_status[0] || + port == superio_ide_dma_status[1]) { + u8 tmp; + int retries = SUPERIO_IDE_MAX_RETRIES; + + /* printk(" [ reading port 0x%x with retry ] ", port); */ + + do { + tmp = inb(port); + if (tmp == 0) + udelay(50); + } while (tmp == 0 && retries-- > 0); + + return tmp; + } + + return inb(port); +} + +static void __devinit superio_ide_init_iops (struct hwif_s *hwif) +{ + u32 base, dmabase; + u8 tmp; + struct pci_dev *pdev = hwif->pci_dev; + u8 port = hwif->channel; + + base = pci_resource_start(pdev, port * 2) & ~3; + dmabase = pci_resource_start(pdev, 4) & ~3; + + superio_ide_status[port] = base + IDE_STATUS_OFFSET; + superio_ide_select[port] = base + IDE_SELECT_OFFSET; + superio_ide_dma_status[port] = dmabase + (!port ? 2 : 0xa); + + /* Clear error/interrupt, enable dma */ + tmp = superio_ide_inb(superio_ide_dma_status[port]); + outb(tmp | 0x66, superio_ide_dma_status[port]); + + /* We need to override inb to workaround a SuperIO errata */ + hwif->INB = superio_ide_inb; +} + +static void __devinit init_iops_ns87415(ide_hwif_t *hwif) +{ + if (PCI_SLOT(hwif->pci_dev->devfn) == 0xE) { + /* Built-in - assume it's under superio. */ + superio_ide_init_iops(hwif); + } +} +#endif + static unsigned int ns87415_count = 0, ns87415_control[MAX_HWIFS] = { 0 }; /* @@ -132,10 +208,6 @@ hwif->autodma = 0; hwif->selectproc = &ns87415_selectproc; - /* Set a good latency timer and cache line size value. */ - (void) pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64); - /* FIXME: use pci_set_master() to ensure good latency timer value */ - /* * We cannot probe for IRQ: both ports share common IRQ on INTA. * Also, leave IRQ masked during drive probing, to prevent infinite @@ -205,6 +277,9 @@ static ide_pci_device_t ns87415_chipset __devinitdata = { .name = "NS87415", +#ifdef CONFIG_SUPERIO + .init_iops = init_iops_ns87415, +#endif .init_hwif = init_hwif_ns87415, .channels = 2, .autodma = AUTODMA, diff -Nru a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c --- a/drivers/ide/pci/pdc202xx_new.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/ide/pci/pdc202xx_new.c 2004-11-10 17:19:05 -08:00 @@ -41,61 +41,6 @@ #define PDC202_DEBUG_CABLE 0 -#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 pdcnew_proc = 0; -#define PDC202_MAX_DEVS 5 -static struct pci_dev *pdc202_devs[PDC202_MAX_DEVS]; -static int n_pdc202_devs; - -static char * pdcnew_info(char *buf, struct pci_dev *dev) -{ - char *p = buf; - - p += sprintf(p, "\n "); - switch(dev->device) { - case PCI_DEVICE_ID_PROMISE_20277: - p += sprintf(p, "SBFastTrak 133 Lite"); break; - case PCI_DEVICE_ID_PROMISE_20276: - p += sprintf(p, "MBFastTrak 133 Lite"); break; - case PCI_DEVICE_ID_PROMISE_20275: - p += sprintf(p, "MBUltra133"); break; - case PCI_DEVICE_ID_PROMISE_20271: - p += sprintf(p, "FastTrak TX2000"); break; - case PCI_DEVICE_ID_PROMISE_20270: - p += sprintf(p, "FastTrak LP/TX2/TX4"); break; - case PCI_DEVICE_ID_PROMISE_20269: - p += sprintf(p, "Ultra133 TX2"); break; - case PCI_DEVICE_ID_PROMISE_20268: - p += sprintf(p, "Ultra100 TX2"); break; - default: - p += sprintf(p, "Ultra series"); break; - break; - } - p += sprintf(p, " Chipset.\n"); - return (char *)p; -} - -static int pdcnew_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - int i, len; - - for (i = 0; i < n_pdc202_devs; i++) { - struct pci_dev *dev = pdc202_devs[i]; - p = pdcnew_info(buffer, dev); - } - /* p - buffer must be less than 4k! */ - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) */ - - static u8 pdcnew_ratemask (ide_drive_t *drive) { u8 mode; @@ -244,37 +189,16 @@ drive->init_speed = 0; if (id && (id->capability & 1) && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - if (id->field_valid & 4) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - int dma = config_chipset_for_dma(drive); - if ((id->field_valid & 2) && !dma) - goto try_dma_modes; - } - } else if (id->field_valid & 2) { -try_dma_modes: - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - /* Force if Capable regular DMA modes */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - goto no_dma_set; - /* Consult the list of known "good" drives */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } else { - goto fast_ata_pio; + + if (ide_use_dma(drive)) { + if (config_chipset_for_dma(drive)) + return hwif->ide_dma_on(drive); } - return hwif->ide_dma_on(drive); + + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: hwif->tuneproc(drive, 5); return hwif->ide_dma_off_quietly(drive); } @@ -416,15 +340,6 @@ #ifdef CONFIG_PPC_PMAC apple_kiwi_init(dev); #endif - -#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) - pdc202_devs[n_pdc202_devs++] = dev; - - if (!pdcnew_proc) { - pdcnew_proc = 1; - ide_pci_create_host_proc("pdcnew", pdcnew_get_info); - } -#endif /* DISPLAY_PDC202XX_TIMINGS && CONFIG_PROC_FS */ return dev->irq; } diff -Nru a/drivers/ide/pci/pdc202xx_new.h b/drivers/ide/pci/pdc202xx_new.h --- a/drivers/ide/pci/pdc202xx_new.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/ide/pci/pdc202xx_new.h 2004-11-10 17:19:02 -08:00 @@ -43,8 +43,6 @@ set_2regs(0x13,(c)); \ } while(0) -#define DISPLAY_PDC202XX_TIMINGS - static void init_setup_pdcnew(struct pci_dev *, ide_pci_device_t *); static void init_setup_pdc20270(struct pci_dev *, ide_pci_device_t *); static void init_setup_pdc20276(struct pci_dev *dev, ide_pci_device_t *d); diff -Nru a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c --- a/drivers/ide/pci/pdc202xx_old.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/ide/pci/pdc202xx_old.c 2004-11-10 17:19:07 -08:00 @@ -50,68 +50,14 @@ #define PDC202_DEBUG_CABLE 0 -#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 pdc202xx_proc = 0; -#define PDC202_MAX_DEVS 5 -static struct pci_dev *pdc202_devs[PDC202_MAX_DEVS]; -static int n_pdc202_devs; - -static char * pdc202xx_info (char *buf, struct pci_dev *dev) -{ - char *p = buf; - +#if 0 unsigned long bibma = pci_resource_start(dev, 4); - u32 reg60h = 0, reg64h = 0, reg68h = 0, reg6ch = 0; - u16 reg50h = 0, pmask = (1<<10), smask = (1<<11); u8 hi = 0, lo = 0; - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - u8 c0 = inb_p((u16)bibma + 0x02); - u8 c1 = inb_p((u16)bibma + 0x0a); - - u8 sc11 = inb_p((u16)bibma + 0x11); - u8 sc1a = inb_p((u16)bibma + 0x1a); - u8 sc1b = inb_p((u16)bibma + 0x1b); u8 sc1c = inb_p((u16)bibma + 0x1c); - u8 sc1d = inb_p((u16)bibma + 0x1d); u8 sc1e = inb_p((u16)bibma + 0x1e); u8 sc1f = inb_p((u16)bibma + 0x1f); - pci_read_config_word(dev, 0x50, ®50h); - pci_read_config_dword(dev, 0x60, ®60h); - pci_read_config_dword(dev, 0x64, ®64h); - pci_read_config_dword(dev, 0x68, ®68h); - pci_read_config_dword(dev, 0x6c, ®6ch); - - p += sprintf(p, "\n "); - switch(dev->device) { - case PCI_DEVICE_ID_PROMISE_20267: - p += sprintf(p, "Ultra100"); break; - case PCI_DEVICE_ID_PROMISE_20265: - p += sprintf(p, "Ultra100 on M/B"); break; - case PCI_DEVICE_ID_PROMISE_20263: - p += sprintf(p, "FastTrak 66"); break; - case PCI_DEVICE_ID_PROMISE_20262: - p += sprintf(p, "Ultra66"); break; - case PCI_DEVICE_ID_PROMISE_20246: - p += sprintf(p, "Ultra33"); - reg50h |= 0x0c00; - break; - default: - p += sprintf(p, "Ultra Series"); break; - } - p += sprintf(p, " Chipset.\n"); - - p += sprintf(p, "------------------------------- General Status " - "---------------------------------\n"); - p += sprintf(p, "Burst Mode : %sabled\n", - (sc1f & 0x01) ? "en" : "dis"); p += sprintf(p, "Host Mode : %s\n", (sc1f & 0x08) ? "Tri-Stated" : "Normal"); p += sprintf(p, "Bus Clocking : %s\n", @@ -126,70 +72,7 @@ SPLIT_BYTE(sc1e, hi, lo); p += sprintf(p, "Status Polling Period : %d\n", hi); p += sprintf(p, "Interrupt Check Status Polling Delay : %d\n", lo); - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %s %s\n", - (c0&0x80)?"disabled":"enabled ", - (c1&0x80)?"disabled":"enabled "); - p += sprintf(p, "66 Clocking %s %s\n", - (sc11&0x02)?"enabled ":"disabled", - (sc11&0x08)?"enabled ":"disabled"); - p += sprintf(p, " Mode %s Mode %s\n", - (sc1a & 0x01) ? "MASTER" : "PCI ", - (sc1b & 0x01) ? "MASTER" : "PCI "); - p += sprintf(p, " %s %s\n", - (sc1d & 0x08) ? "Error " : - ((sc1d & 0x05) == 0x05) ? "Not My INTR " : - (sc1d & 0x04) ? "Interrupting" : - (sc1d & 0x02) ? "FIFO Full " : - (sc1d & 0x01) ? "FIFO Empty " : "????????????", - (sc1d & 0x80) ? "Error " : - ((sc1d & 0x50) == 0x50) ? "Not My INTR " : - (sc1d & 0x40) ? "Interrupting" : - (sc1d & 0x20) ? "FIFO Full " : - (sc1d & 0x10) ? "FIFO Empty " : "????????????"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s " - " %s %s\n", - (c0&0x20)?"yes":"no ", (c0&0x40)?"yes":"no ", - (c1&0x20)?"yes":"no ", (c1&0x40)?"yes":"no "); - p += sprintf(p, "DMA Mode: %s %s " - " %s %s\n", - pdc202xx_ultra_verbose(reg60h, (reg50h & pmask)), - pdc202xx_ultra_verbose(reg64h, (reg50h & pmask)), - pdc202xx_ultra_verbose(reg68h, (reg50h & smask)), - pdc202xx_ultra_verbose(reg6ch, (reg50h & smask))); - p += sprintf(p, "PIO Mode: %s %s " - " %s %s\n", - pdc202xx_pio_verbose(reg60h), - pdc202xx_pio_verbose(reg64h), - pdc202xx_pio_verbose(reg68h), - pdc202xx_pio_verbose(reg6ch)); -#if 0 - p += sprintf(p, "--------------- Can ATAPI DMA ---------------\n"); #endif - return (char *)p; -} - -static int pdc202xx_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - int i, len; - - for (i = 0; i < n_pdc202_devs; i++) { - struct pci_dev *dev = pdc202_devs[i]; - p = pdc202xx_info(buffer, dev); - } - /* p - buffer must be less than 4k! */ - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) */ - static u8 pdc202xx_ratemask (ide_drive_t *drive) { @@ -451,37 +334,16 @@ drive->init_speed = 0; if (id && (id->capability & 1) && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - if (id->field_valid & 4) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - int dma = config_chipset_for_dma(drive); - if ((id->field_valid & 2) && !dma) - goto try_dma_modes; - } - } else if (id->field_valid & 2) { -try_dma_modes: - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - /* Force if Capable regular DMA modes */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - goto no_dma_set; - /* Consult the list of known "good" drives */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } else { - goto fast_ata_pio; + + if (ide_use_dma(drive)) { + if (config_chipset_for_dma(drive)) + return hwif->ide_dma_on(drive); } - return hwif->ide_dma_on(drive); + + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: hwif->tuneproc(drive, 5); return hwif->ide_dma_off_quietly(drive); } @@ -546,11 +408,13 @@ u8 sc1d = hwif->INB((high_16 + 0x001d)); if (hwif->channel) { + /* bit7: Error, bit6: Interrupting, bit5: FIFO Full, bit4: FIFO Empty */ if ((sc1d & 0x50) == 0x50) goto somebody_else; else if ((sc1d & 0x40) == 0x40) return (dma_stat & 4) == 4; } else { + /* bit3: Error, bit2: Interrupting, bit1: FIFO Full, bit0: FIFO Empty */ if ((sc1d & 0x05) == 0x05) goto somebody_else; else if ((sc1d & 0x04) == 0x04) @@ -668,15 +532,6 @@ name, dev->resource[PCI_ROM_RESOURCE].start); } -#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) - pdc202_devs[n_pdc202_devs++] = dev; - - if (!pdc202xx_proc) { - pdc202xx_proc = 1; - ide_pci_create_host_proc("pdc202xx", pdc202xx_get_info); - } -#endif /* DISPLAY_PDC202XX_TIMINGS && CONFIG_PROC_FS */ - /* * software reset - this is required because the bios * will set UDMA timing on if the hdd supports it. The @@ -709,7 +564,8 @@ struct pci_dev *dev = hwif->pci_dev; /* PDC20265 has problems with large LBA48 requests */ - if (dev->device == PCI_DEVICE_ID_PROMISE_20265) + if ((dev->device == PCI_DEVICE_ID_PROMISE_20267) || + (dev->device == PCI_DEVICE_ID_PROMISE_20265)) hwif->rqsize = 256; hwif->autodma = 0; diff -Nru a/drivers/ide/pci/pdc202xx_old.h b/drivers/ide/pci/pdc202xx_old.h --- a/drivers/ide/pci/pdc202xx_old.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/ide/pci/pdc202xx_old.h 2004-11-10 17:19:02 -08:00 @@ -23,41 +23,6 @@ NULL }; -static inline u8 *pdc202xx_pio_verbose (u32 drive_pci) -{ - if ((drive_pci & 0x000ff000) == 0x000ff000) return("NOTSET"); - if ((drive_pci & 0x00000401) == 0x00000401) return("PIO 4"); - if ((drive_pci & 0x00000602) == 0x00000602) return("PIO 3"); - if ((drive_pci & 0x00000803) == 0x00000803) return("PIO 2"); - if ((drive_pci & 0x00000C05) == 0x00000C05) return("PIO 1"); - if ((drive_pci & 0x00001309) == 0x00001309) return("PIO 0"); - return("PIO ?"); -} - -static inline u8 *pdc202xx_dma_verbose (u32 drive_pci) -{ - if ((drive_pci & 0x00036000) == 0x00036000) return("MWDMA 2"); - if ((drive_pci & 0x00046000) == 0x00046000) return("MWDMA 1"); - if ((drive_pci & 0x00056000) == 0x00056000) return("MWDMA 0"); - if ((drive_pci & 0x00056000) == 0x00056000) return("SWDMA 2"); - if ((drive_pci & 0x00068000) == 0x00068000) return("SWDMA 1"); - if ((drive_pci & 0x000BC000) == 0x000BC000) return("SWDMA 0"); - return("PIO---"); -} - -static inline u8 *pdc202xx_ultra_verbose (u32 drive_pci, u16 slow_cable) -{ - if ((drive_pci & 0x000ff000) == 0x000ff000) - return("NOTSET"); - if ((drive_pci & 0x00012000) == 0x00012000) - return((slow_cable) ? "UDMA 2" : "UDMA 4"); - if ((drive_pci & 0x00024000) == 0x00024000) - return((slow_cable) ? "UDMA 1" : "UDMA 3"); - if ((drive_pci & 0x00036000) == 0x00036000) - return("UDMA 0"); - return(pdc202xx_dma_verbose(drive_pci)); -} - /* A Register */ #define SYNC_ERRDY_EN 0xC0 @@ -97,8 +62,6 @@ #define MC2 0x04 /* DMA"C" timing */ #define MC1 0x02 /* DMA"C" timing */ #define MC0 0x01 /* DMA"C" timing */ - -#define DISPLAY_PDC202XX_TIMINGS static void init_setup_pdc202ata4(struct pci_dev *dev, ide_pci_device_t *d); static void init_setup_pdc20265(struct pci_dev *, ide_pci_device_t *); diff -Nru a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c --- a/drivers/ide/pci/piix.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/ide/pci/piix.c 2004-11-10 17:19:02 -08:00 @@ -106,165 +106,6 @@ #include "piix.h" static int no_piix_dma; -#if defined(DISPLAY_PIIX_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 piix_proc = 0; -#define PIIX_MAX_DEVS 5 -static struct pci_dev *piix_devs[PIIX_MAX_DEVS]; -static int n_piix_devs; - -/** - * piix_get_info - fill in /proc for PIIX ide - * @buffer: buffer to fill - * @addr: address of user start in buffer - * @offset: offset into 'file' - * @count: buffer count - * - * Walks the PIIX devices and outputs summary data on the tuning and - * anything else that will help with debugging - */ - -static int piix_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - int i; - - for (i = 0; i < n_piix_devs; i++) { - struct pci_dev *dev = piix_devs[i]; - unsigned long bibma = pci_resource_start(dev, 4); - u16 reg40 = 0, psitre = 0, reg42 = 0, ssitre = 0; - u8 c0 = 0, c1 = 0, reg54 = 0, reg55 = 0; - u8 reg44 = 0, reg48 = 0, reg4a = 0, reg4b = 0; - - p += sprintf(p, "\nController: %d\n", i); - p += sprintf(p, "\n Intel "); - switch(dev->device) { - case PCI_DEVICE_ID_INTEL_82801EB_1: - p += sprintf(p, "PIIX4 SATA 150 "); - break; - case PCI_DEVICE_ID_INTEL_82801BA_8: - case PCI_DEVICE_ID_INTEL_82801BA_9: - case PCI_DEVICE_ID_INTEL_82801CA_10: - case PCI_DEVICE_ID_INTEL_82801CA_11: - case PCI_DEVICE_ID_INTEL_82801DB_10: - case PCI_DEVICE_ID_INTEL_82801DB_11: - case PCI_DEVICE_ID_INTEL_82801EB_11: - case PCI_DEVICE_ID_INTEL_82801E_11: - case PCI_DEVICE_ID_INTEL_ESB_2: - case PCI_DEVICE_ID_INTEL_ICH6_19: - p += sprintf(p, "PIIX4 Ultra 100 "); - break; - case PCI_DEVICE_ID_INTEL_82372FB_1: - case PCI_DEVICE_ID_INTEL_82801AA_1: - p += sprintf(p, "PIIX4 Ultra 66 "); - break; - case PCI_DEVICE_ID_INTEL_82451NX: - case PCI_DEVICE_ID_INTEL_82801AB_1: - case PCI_DEVICE_ID_INTEL_82443MX_1: - case PCI_DEVICE_ID_INTEL_82371AB: - p += sprintf(p, "PIIX4 Ultra 33 "); - break; - case PCI_DEVICE_ID_INTEL_82371SB_1: - p += sprintf(p, "PIIX3 "); - break; - case PCI_DEVICE_ID_INTEL_82371MX: - p += sprintf(p, "MPIIX "); - break; - case PCI_DEVICE_ID_INTEL_82371FB_1: - case PCI_DEVICE_ID_INTEL_82371FB_0: - default: - p += sprintf(p, "PIIX "); - break; - } - p += sprintf(p, "Chipset.\n"); - - if (dev->device == PCI_DEVICE_ID_INTEL_82371MX) - continue; - - pci_read_config_word(dev, 0x40, ®40); - pci_read_config_word(dev, 0x42, ®42); - pci_read_config_byte(dev, 0x44, ®44); - pci_read_config_byte(dev, 0x48, ®48); - pci_read_config_byte(dev, 0x4a, ®4a); - pci_read_config_byte(dev, 0x4b, ®4b); - pci_read_config_byte(dev, 0x54, ®54); - pci_read_config_byte(dev, 0x55, ®55); - - psitre = (reg40 & 0x4000) ? 1 : 0; - ssitre = (reg42 & 0x4000) ? 1 : 0; - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - c0 = inb(bibma + 0x02); - c1 = inb(bibma + 0x0a); - - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled " - " %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s " - " %s %s\n", - (c0&0x20) ? "yes" : "no ", - (c0&0x40) ? "yes" : "no ", - (c1&0x20) ? "yes" : "no ", - (c1&0x40) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s " - " %s %s\n", - (reg48&0x01) ? "yes" : "no ", - (reg48&0x02) ? "yes" : "no ", - (reg48&0x04) ? "yes" : "no ", - (reg48&0x08) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s " - " %s %s\n", - ((reg54&0x11) && - (reg55&0x10) && (reg4a&0x01)) ? "5" : - ((reg54&0x11) && (reg4a&0x02)) ? "4" : - ((reg54&0x11) && (reg4a&0x01)) ? "3" : - (reg4a&0x02) ? "2" : - (reg4a&0x01) ? "1" : - (reg4a&0x00) ? "0" : "X", - ((reg54&0x22) && - (reg55&0x20) && (reg4a&0x10)) ? "5" : - ((reg54&0x22) && (reg4a&0x20)) ? "4" : - ((reg54&0x22) && (reg4a&0x10)) ? "3" : - (reg4a&0x20) ? "2" : - (reg4a&0x10) ? "1" : - (reg4a&0x00) ? "0" : "X", - ((reg54&0x44) && - (reg55&0x40) && (reg4b&0x03)) ? "5" : - ((reg54&0x44) && (reg4b&0x02)) ? "4" : - ((reg54&0x44) && (reg4b&0x01)) ? "3" : - (reg4b&0x02) ? "2" : - (reg4b&0x01) ? "1" : - (reg4b&0x00) ? "0" : "X", - ((reg54&0x88) && - (reg55&0x80) && (reg4b&0x30)) ? "5" : - ((reg54&0x88) && (reg4b&0x20)) ? "4" : - ((reg54&0x88) && (reg4b&0x10)) ? "3" : - (reg4b&0x20) ? "2" : - (reg4b&0x10) ? "1" : - (reg4b&0x00) ? "0" : "X"); - - p += sprintf(p, "UDMA\n"); - p += sprintf(p, "DMA\n"); - p += sprintf(p, "PIO\n"); - - /* - * FIXME.... Add configuration junk data....blah blah...... - */ - } - return p-buffer; /* => must be less than 4k! */ -} -#endif /* defined(DISPLAY_PIIX_TIMINGS) && defined(CONFIG_PROC_FS) */ /** * piix_ratemask - compute rate mask for PIIX IDE @@ -562,25 +403,11 @@ if ((id->capability & 1) && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - - /** - * Try to turn DMA on if: - * - UDMA or EIDE modes are supported or - * - drive is a known "good" drive - * - * Checks for best mode supported are down later by - * piix_config_drive_for_dma() -> ide_dma_speed() - */ - if ((id->field_valid & (4 | 2)) || - (__ide_dma_good_drive(drive) && id->eide_dma_time < 150)) { + if (ide_use_dma(drive)) { if (piix_config_drive_for_dma(drive)) return hwif->ide_dma_on(drive); } - /* For some reason DMA wasn't turned on, so try PIO. */ goto fast_ata_pio; } else if ((id->capability & 8) || (id->field_valid & 2)) { @@ -627,14 +454,6 @@ break; } -#if defined(DISPLAY_PIIX_TIMINGS) && defined(CONFIG_PROC_FS) - piix_devs[n_piix_devs++] = dev; - - if (!piix_proc) { - piix_proc = 1; - ide_pci_create_host_proc("piix", piix_get_info); - } -#endif /* DISPLAY_PIIX_TIMINGS && CONFIG_PROC_FS */ return 0; } diff -Nru a/drivers/ide/pci/piix.h b/drivers/ide/pci/piix.h --- a/drivers/ide/pci/piix.h 2004-11-10 17:19:03 -08:00 +++ b/drivers/ide/pci/piix.h 2004-11-10 17:19:03 -08:00 @@ -5,10 +5,6 @@ #include #include -#define PIIX_DEBUG_DRIVE_INFO 0 - -#define DISPLAY_PIIX_TIMINGS - static void init_setup_piix(struct pci_dev *, ide_pci_device_t *); static unsigned int __devinit init_chipset_piix(struct pci_dev *, const char *); static void init_hwif_piix(ide_hwif_t *); diff -Nru a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c --- a/drivers/ide/pci/sc1200.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/ide/pci/sc1200.c 2004-11-10 17:19:05 -08:00 @@ -67,55 +67,6 @@ return pci_clock; } -#define DISPLAY_SC1200_TIMINGS - -#if defined(DISPLAY_SC1200_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static int sc1200_get_info(char *, char **, off_t, int); -extern int (*sc1200_display_info)(char *, char **, off_t, int); /* ide-proc.c */ -extern char *ide_media_verbose(ide_drive_t *); -static u8 sc1200_proc = 0; - -static struct pci_dev *bmide_dev; - -static int sc1200_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - unsigned long bibma = pci_resource_start(bmide_dev, 4); - int len; - u8 c0 = 0, c1 = 0; - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - - c0 = inb_p(bibma + 0x02); - c1 = inb_p(bibma + 0x0a); - - p += sprintf(p, "\n National SCx200 Chipset.\n"); - p += sprintf(p, "--------------- Primary Channel ---------------- Secondary Channel -------------\n"); - p += sprintf(p, " %sabled %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 -------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s %s %s\n", - (c0&0x20) ? "yes" : "no ", (c0&0x40) ? "yes" : "no ", - (c1&0x20) ? "yes" : "no ", (c1&0x40) ? "yes" : "no " ); - - p += sprintf(p, "UDMA\n"); - p += sprintf(p, "DMA\n"); - p += sprintf(p, "PIO\n"); - - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* DISPLAY_SC1200_TIMINGS && CONFIG_PROC_FS */ - extern char *ide_xfer_verbose (byte xfer_rate); /* @@ -505,21 +456,6 @@ } /* - * Initialize the sc1200 bridge for reliable IDE DMA operation. - */ -static unsigned int __init init_chipset_sc1200 (struct pci_dev *dev, const char *name) -{ -#if defined(DISPLAY_SC1200_TIMINGS) && defined(CONFIG_PROC_FS) - if (!bmide_dev) { - sc1200_proc = 1; - bmide_dev = dev; - ide_pci_create_host_proc("sc1200", sc1200_get_info); - } -#endif /* DISPLAY_SC1200_TIMINGS && CONFIG_PROC_FS */ - return 0; -} - -/* * This gets invoked by the IDE driver once for each channel, * and performs channel-specific pre-initialization before drive probing. */ @@ -545,7 +481,6 @@ static ide_pci_device_t sc1200_chipset __devinitdata = { .name = "SC1200", - .init_chipset = init_chipset_sc1200, .init_hwif = init_hwif_sc1200, .channels = 2, .autodma = AUTODMA, diff -Nru a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c --- a/drivers/ide/pci/serverworks.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/ide/pci/serverworks.c 2004-11-10 17:19:02 -08:00 @@ -44,164 +44,6 @@ static u8 svwks_revision = 0; static struct pci_dev *isa_dev; -#if defined(DISPLAY_SVWKS_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 svwks_proc = 0; -#define SVWKS_MAX_DEVS 2 -static struct pci_dev *svwks_devs[SVWKS_MAX_DEVS]; -static int n_svwks_devs; - -static int svwks_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - int i, len; - - p += sprintf(p, "\n " - "ServerWorks OSB4/CSB5/CSB6\n"); - - for (i = 0; i < n_svwks_devs; i++) { - struct pci_dev *dev = svwks_devs[i]; - unsigned long bibma = pci_resource_start(dev, 4); - u32 reg40, reg44; - u16 reg48, reg56; - u8 reg54, c0=0, c1=0; - - pci_read_config_dword(dev, 0x40, ®40); - pci_read_config_dword(dev, 0x44, ®44); - pci_read_config_word(dev, 0x48, ®48); - pci_read_config_byte(dev, 0x54, ®54); - pci_read_config_word(dev, 0x56, ®56); - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - c0 = inb_p(bibma + 0x02); - c1 = inb_p(bibma + 0x0a); - - p += sprintf(p, "\n ServerWorks "); - switch(dev->device) { - case PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2: - case PCI_DEVICE_ID_SERVERWORKS_CSB6IDE: - p += sprintf(p, "CSB6 "); - break; - case PCI_DEVICE_ID_SERVERWORKS_CSB5IDE: - p += sprintf(p, "CSB5 "); - break; - case PCI_DEVICE_ID_SERVERWORKS_OSB4IDE: - p += sprintf(p, "OSB4 "); - break; - default: - p += sprintf(p, "%04x ", dev->device); - break; - } - p += sprintf(p, "Chipset (rev %02x)\n", svwks_revision); - - p += sprintf(p, "------------------------------- " - "General Status " - "---------------------------------\n"); - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled" - " %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s" - " %s %s\n", - (c0&0x20) ? "yes" : "no ", - (c0&0x40) ? "yes" : "no ", - (c1&0x20) ? "yes" : "no ", - (c1&0x40) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s" - " %s %s\n", - (reg54 & 0x01) ? "yes" : "no ", - (reg54 & 0x02) ? "yes" : "no ", - (reg54 & 0x04) ? "yes" : "no ", - (reg54 & 0x08) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s" - " %s %s\n", - ((reg56&0x0005)==0x0005)?"5": - ((reg56&0x0004)==0x0004)?"4": - ((reg56&0x0003)==0x0003)?"3": - ((reg56&0x0002)==0x0002)?"2": - ((reg56&0x0001)==0x0001)?"1": - ((reg56&0x000F))?"?":"0", - ((reg56&0x0050)==0x0050)?"5": - ((reg56&0x0040)==0x0040)?"4": - ((reg56&0x0030)==0x0030)?"3": - ((reg56&0x0020)==0x0020)?"2": - ((reg56&0x0010)==0x0010)?"1": - ((reg56&0x00F0))?"?":"0", - ((reg56&0x0500)==0x0500)?"5": - ((reg56&0x0400)==0x0400)?"4": - ((reg56&0x0300)==0x0300)?"3": - ((reg56&0x0200)==0x0200)?"2": - ((reg56&0x0100)==0x0100)?"1": - ((reg56&0x0F00))?"?":"0", - ((reg56&0x5000)==0x5000)?"5": - ((reg56&0x4000)==0x4000)?"4": - ((reg56&0x3000)==0x3000)?"3": - ((reg56&0x2000)==0x2000)?"2": - ((reg56&0x1000)==0x1000)?"1": - ((reg56&0xF000))?"?":"0"); - p += sprintf(p, "DMA enabled: %s %s" - " %s %s\n", - ((reg44&0x00002000)==0x00002000)?"2": - ((reg44&0x00002100)==0x00002100)?"1": - ((reg44&0x00007700)==0x00007700)?"0": - ((reg44&0x0000FF00)==0x0000FF00)?"X":"?", - ((reg44&0x00000020)==0x00000020)?"2": - ((reg44&0x00000021)==0x00000021)?"1": - ((reg44&0x00000077)==0x00000077)?"0": - ((reg44&0x000000FF)==0x000000FF)?"X":"?", - ((reg44&0x20000000)==0x20000000)?"2": - ((reg44&0x21000000)==0x21000000)?"1": - ((reg44&0x77000000)==0x77000000)?"0": - ((reg44&0xFF000000)==0xFF000000)?"X":"?", - ((reg44&0x00200000)==0x00200000)?"2": - ((reg44&0x00210000)==0x00210000)?"1": - ((reg44&0x00770000)==0x00770000)?"0": - ((reg44&0x00FF0000)==0x00FF0000)?"X":"?"); - - p += sprintf(p, "PIO enabled: %s %s" - " %s %s\n", - ((reg40&0x00002000)==0x00002000)?"4": - ((reg40&0x00002200)==0x00002200)?"3": - ((reg40&0x00003400)==0x00003400)?"2": - ((reg40&0x00004700)==0x00004700)?"1": - ((reg40&0x00005D00)==0x00005D00)?"0":"?", - ((reg40&0x00000020)==0x00000020)?"4": - ((reg40&0x00000022)==0x00000022)?"3": - ((reg40&0x00000034)==0x00000034)?"2": - ((reg40&0x00000047)==0x00000047)?"1": - ((reg40&0x0000005D)==0x0000005D)?"0":"?", - ((reg40&0x20000000)==0x20000000)?"4": - ((reg40&0x22000000)==0x22000000)?"3": - ((reg40&0x34000000)==0x34000000)?"2": - ((reg40&0x47000000)==0x47000000)?"1": - ((reg40&0x5D000000)==0x5D000000)?"0":"?", - ((reg40&0x00200000)==0x00200000)?"4": - ((reg40&0x00220000)==0x00220000)?"3": - ((reg40&0x00340000)==0x00340000)?"2": - ((reg40&0x00470000)==0x00470000)?"1": - ((reg40&0x005D0000)==0x005D0000)?"0":"?"); - - } - p += sprintf(p, "\n"); - - /* p - buffer must be less than 4k! */ - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* defined(DISPLAY_SVWKS_TIMINGS) && defined(CONFIG_PROC_FS) */ - static int check_in_drive_lists (ide_drive_t *drive, const char **list) { while (*list) @@ -463,38 +305,16 @@ drive->init_speed = 0; if ((id->capability & 1) && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - if (id->field_valid & 4) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - int dma = config_chipset_for_dma(drive); - if ((id->field_valid & 2) && !dma) - goto try_dma_modes; - } else - /* UDMA disabled by mask, try other DMA modes */ - goto try_dma_modes; - } else if (id->field_valid & 2) { -try_dma_modes: - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - /* Force if Capable regular DMA modes */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - /* Consult the list of known "good" drives */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } else { - goto no_dma_set; + + if (ide_use_dma(drive)) { + if (config_chipset_for_dma(drive)) + return hwif->ide_dma_on(drive); } - return hwif->ide_dma_on(drive); + + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: config_chipset_for_pio(drive); // hwif->tuneproc(drive, 5); return hwif->ide_dma_off_quietly(drive); @@ -616,16 +436,6 @@ btr |= (svwks_revision >= SVWKS_CSB5_REVISION_NEW) ? 0x3 : 0x2; pci_write_config_byte(dev, 0x5A, btr); } - - -#if defined(DISPLAY_SVWKS_TIMINGS) && defined(CONFIG_PROC_FS) - svwks_devs[n_svwks_devs++] = dev; - - if (!svwks_proc) { - svwks_proc = 1; - ide_pci_create_host_proc("svwks", svwks_get_info); - } -#endif /* DISPLAY_SVWKS_TIMINGS && CONFIG_PROC_FS */ return (dev->irq) ? dev->irq : 0; } diff -Nru a/drivers/ide/pci/serverworks.h b/drivers/ide/pci/serverworks.h --- a/drivers/ide/pci/serverworks.h 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/pci/serverworks.h 2004-11-10 17:19:04 -08:00 @@ -21,8 +21,6 @@ NULL }; -#define DISPLAY_SVWKS_TIMINGS 1 - static void init_setup_svwks(struct pci_dev *, ide_pci_device_t *); static void init_setup_csb6(struct pci_dev *, ide_pci_device_t *); static unsigned int init_chipset_svwks(struct pci_dev *, const char *); diff -Nru a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c --- a/drivers/ide/pci/sgiioc4.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/pci/sgiioc4.c 2004-11-10 17:19:04 -08:00 @@ -332,17 +332,6 @@ } static int -sgiioc4_ide_dma_verbose(ide_drive_t * drive) -{ - if (drive->using_dma == 1) - printk(", UDMA(16)"); - else - printk(", PIO"); - - return 1; -} - -static int sgiioc4_ide_dma_lostirq(ide_drive_t * drive) { HWIF(drive)->resetproc(drive); @@ -379,7 +368,7 @@ } /* Creates a dma map for the scatter-gather list entries */ -static void __init +static void __devinit ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base) { int num_ports = sizeof (ioc4_dma_regs_t); @@ -501,10 +490,7 @@ unsigned int count = 0, i = 1; struct scatterlist *sg; - if (HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) - hwif->sg_nents = i = ide_raw_build_sglist(drive, rq); - else - hwif->sg_nents = i = ide_build_sglist(drive, rq); + hwif->sg_nents = i = ide_build_sglist(drive, rq); if (!i) return 0; /* sglist of length Zero */ @@ -593,7 +579,7 @@ return 0; } -static void __init +static void __devinit ide_init_sgiioc4(ide_hwif_t * hwif) { hwif->mmio = 2; @@ -623,13 +609,12 @@ hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq; hwif->ide_dma_host_on = &sgiioc4_ide_dma_host_on; hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off; - hwif->ide_dma_verbose = &sgiioc4_ide_dma_verbose; hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; hwif->ide_dma_timeout = &__ide_dma_timeout; hwif->INB = &sgiioc4_INB; } -static int __init +static int __devinit sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d) { unsigned long base, ctl, dma_base, irqport; @@ -692,7 +677,7 @@ return 0; } -static unsigned int __init +static unsigned int __devinit pci_init_sgiioc4(struct pci_dev *dev, ide_pci_device_t * d) { unsigned int class_rev; @@ -745,13 +730,13 @@ }; MODULE_DEVICE_TABLE(pci, sgiioc4_pci_tbl); -static struct pci_driver driver = { +static struct pci_driver __devinitdata driver = { .name = "SGI-IOC4_IDE", .id_table = sgiioc4_pci_tbl, .probe = sgiioc4_init_one, }; -static int +static int __devinit sgiioc4_ide_init(void) { return ide_pci_register_driver(&driver); diff -Nru a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c --- a/drivers/ide/pci/siimage.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/pci/siimage.c 2004-11-10 17:19:04 -08:00 @@ -420,37 +420,16 @@ struct hd_driveid *id = drive->id; if ((id->capability & 1) != 0 && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - - if ((id->field_valid & 4) && siimage_ratemask(drive)) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - int dma = config_chipset_for_dma(drive); - if ((id->field_valid & 2) && !dma) - goto try_dma_modes; - } - } else if (id->field_valid & 2) { -try_dma_modes: - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - /* Force if Capable regular DMA modes */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - /* Consult the list of known "good" drives */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } else { - goto fast_ata_pio; + + if (ide_use_dma(drive)) { + if (config_chipset_for_dma(drive)) + return hwif->ide_dma_on(drive); } - return hwif->ide_dma_on(drive); + + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: config_chipset_for_pio(drive, 1); return hwif->ide_dma_off_quietly(drive); } @@ -554,12 +533,6 @@ return 0; } -static int siimage_mmio_ide_dma_verbose (ide_drive_t *drive) -{ - int temp = __ide_dma_verbose(drive); - return temp; -} - /** * siimage_busproc - bus isolation ioctl * @drive: drive to isolate/restore @@ -898,12 +871,11 @@ * the MMIO layout isnt the same as the the standard port * based I/O */ - + memset(&hw, 0, sizeof(hw_regs_t)); - hw.priv = addr; - base = (unsigned long)addr; - if(ch) + base = (unsigned long)addr; + if (ch) base += 0xC0; else base += 0x80; @@ -928,16 +900,16 @@ hw.io_ports[IDE_IRQ_OFFSET] = 0; - if (pdev_is_sata(dev)) { - base = (unsigned long) addr; - if(ch) - base += 0x80; - hw.sata_scr[SATA_STATUS_OFFSET] = base + 0x104; - hw.sata_scr[SATA_ERROR_OFFSET] = base + 0x108; - hw.sata_scr[SATA_CONTROL_OFFSET]= base + 0x100; - hw.sata_misc[SATA_MISC_OFFSET] = base + 0x140; - hw.sata_misc[SATA_PHY_OFFSET] = base + 0x144; - hw.sata_misc[SATA_IEN_OFFSET] = base + 0x148; + if (pdev_is_sata(dev)) { + base = (unsigned long)addr; + if (ch) + base += 0x80; + hwif->sata_scr[SATA_STATUS_OFFSET] = base + 0x104; + hwif->sata_scr[SATA_ERROR_OFFSET] = base + 0x108; + hwif->sata_scr[SATA_CONTROL_OFFSET] = base + 0x100; + hwif->sata_misc[SATA_MISC_OFFSET] = base + 0x140; + hwif->sata_misc[SATA_PHY_OFFSET] = base + 0x144; + hwif->sata_misc[SATA_IEN_OFFSET] = base + 0x148; } hw.irq = hwif->pci_dev->irq; @@ -945,11 +917,6 @@ memcpy(&hwif->hw, &hw, sizeof(hw)); memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->hw.io_ports)); - if (is_sata(hwif)) { - memcpy(hwif->sata_scr, hwif->hw.sata_scr, sizeof(hwif->hw.sata_scr)); - memcpy(hwif->sata_misc, hwif->hw.sata_misc, sizeof(hwif->hw.sata_misc)); - } - hwif->irq = hw.irq; base = (unsigned long) addr; @@ -988,6 +955,22 @@ } /** + * siimage_fixup - post probe fixups + * @hwif: interface to fix up + * + * Called after drive probe we use this to decide whether the + * Seagate fixup must be applied. This used to be in init_iops but + * that can occur before we know what drives are present. + */ + +static void __devinit siimage_fixup(ide_hwif_t *hwif) +{ + /* Try and raise the rqsize */ + if (!is_sata(hwif) || !is_dev_seagate_sata(&hwif->drives[0])) + hwif->rqsize = 128; +} + +/** * init_iops_siimage - set up iops * @hwif: interface to set up * @@ -1007,9 +990,8 @@ hwif->hwif_data = NULL; - hwif->rqsize = 128; - if (is_sata(hwif) && is_dev_seagate_sata(&hwif->drives[0])) - hwif->rqsize = 15; + /* Pessimal until we finish probing */ + hwif->rqsize = 15; if (pci_get_drvdata(dev) == NULL) return; @@ -1077,7 +1059,6 @@ if (hwif->mmio) { hwif->ide_dma_test_irq = &siimage_mmio_ide_dma_test_irq; - hwif->ide_dma_verbose = &siimage_mmio_ide_dma_verbose; } else { hwif->ide_dma_test_irq = & siimage_io_ide_dma_test_irq; } @@ -1098,6 +1079,7 @@ .init_chipset = init_chipset_siimage, \ .init_iops = init_iops_siimage, \ .init_hwif = init_hwif_siimage, \ + .fixup = siimage_fixup, \ .channels = 2, \ .autodma = AUTODMA, \ .bootable = ON_BOARD, \ diff -Nru a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c --- a/drivers/ide/pci/sis5513.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/pci/sis5513.c 2004-11-10 17:19:04 -08:00 @@ -671,36 +671,16 @@ drive->init_speed = 0; if (id && (id->capability & 1) && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - if (id->field_valid & 4) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - int dma = config_chipset_for_dma(drive); - if ((id->field_valid & 2) && !dma) - goto try_dma_modes; - } - } else if (id->field_valid & 2) { -try_dma_modes: - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - /* Force if Capable regular DMA modes */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - /* Consult the list of known "good" drives */ - if (!config_chipset_for_dma(drive)) - goto no_dma_set; - } else { - goto fast_ata_pio; + + if (ide_use_dma(drive)) { + if (config_chipset_for_dma(drive)) + return hwif->ide_dma_on(drive); } - return hwif->ide_dma_on(drive); + + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: sis5513_tune_drive(drive, 5); return hwif->ide_dma_off_quietly(drive); } diff -Nru a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c --- a/drivers/ide/pci/slc90e66.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/ide/pci/slc90e66.c 2004-11-10 17:19:06 -08:00 @@ -21,103 +21,6 @@ #include -#define DISPLAY_SLC90E66_TIMINGS - -#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 slc90e66_proc = 0; -static struct pci_dev *bmide_dev; - -static int slc90e66_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - int len; - unsigned long bibma = pci_resource_start(bmide_dev, 4); - u16 reg40 = 0, psitre = 0, reg42 = 0, ssitre = 0; - u8 c0 = 0, c1 = 0; - u8 reg44 = 0, reg47 = 0, reg48 = 0, reg4a = 0, reg4b = 0; - - pci_read_config_word(bmide_dev, 0x40, ®40); - pci_read_config_word(bmide_dev, 0x42, ®42); - pci_read_config_byte(bmide_dev, 0x44, ®44); - pci_read_config_byte(bmide_dev, 0x47, ®47); - pci_read_config_byte(bmide_dev, 0x48, ®48); - pci_read_config_byte(bmide_dev, 0x4a, ®4a); - pci_read_config_byte(bmide_dev, 0x4b, ®4b); - - psitre = (reg40 & 0x4000) ? 1 : 0; - ssitre = (reg42 & 0x4000) ? 1 : 0; - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - c0 = inb_p(bibma + 0x02); - c1 = inb_p(bibma + 0x0a); - - p += sprintf(p, " SLC90E66 Chipset.\n"); - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled " - " %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s " - " %s %s\n", - (c0&0x20) ? "yes" : "no ", - (c0&0x40) ? "yes" : "no ", - (c1&0x20) ? "yes" : "no ", - (c1&0x40) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s " - " %s %s\n", - (reg48&0x01) ? "yes" : "no ", - (reg48&0x02) ? "yes" : "no ", - (reg48&0x04) ? "yes" : "no ", - (reg48&0x08) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s " - " %s %s\n", - ((reg4a&0x04)==0x04) ? "4" : - ((reg4a&0x03)==0x03) ? "3" : - (reg4a&0x02) ? "2" : - (reg4a&0x01) ? "1" : - (reg4a&0x00) ? "0" : "X", - ((reg4a&0x40)==0x40) ? "4" : - ((reg4a&0x30)==0x30) ? "3" : - (reg4a&0x20) ? "2" : - (reg4a&0x10) ? "1" : - (reg4a&0x00) ? "0" : "X", - ((reg4b&0x04)==0x04) ? "4" : - ((reg4b&0x03)==0x03) ? "3" : - (reg4b&0x02) ? "2" : - (reg4b&0x01) ? "1" : - (reg4b&0x00) ? "0" : "X", - ((reg4b&0x40)==0x40) ? "4" : - ((reg4b&0x30)==0x30) ? "3" : - (reg4b&0x20) ? "2" : - (reg4b&0x10) ? "1" : - (reg4b&0x00) ? "0" : "X"); - - p += sprintf(p, "UDMA\n"); - p += sprintf(p, "DMA\n"); - p += sprintf(p, "PIO\n"); - -/* - * FIXME.... Add configuration junk data....blah blah...... - */ - - /* p - buffer must be less than 4k! */ - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) */ - static u8 slc90e66_ratemask (ide_drive_t *drive) { u8 mode = 2; @@ -236,6 +139,7 @@ if (speed >= XFER_UDMA_0) { if (!(reg48 & u_flag)) pci_write_config_word(dev, 0x48, reg48|u_flag); + /* FIXME: (reg4a & a_speed) ? */ if ((reg4a & u_speed) != u_speed) { pci_write_config_word(dev, 0x4a, reg4a & ~a_speed); pci_read_config_word(dev, 0x4a, ®4a); @@ -274,37 +178,16 @@ drive->init_speed = 0; if (id && (id->capability & 1) && drive->autodma) { - /* Consult the list of known "bad" drives */ - if (__ide_dma_bad_drive(drive)) - goto fast_ata_pio; - - if (id->field_valid & 4) { - if (id->dma_ultra & hwif->ultra_mask) { - /* Force if Capable UltraDMA */ - int dma = slc90e66_config_drive_for_dma(drive); - if ((id->field_valid & 2) && !dma) - goto try_dma_modes; - } - } else if (id->field_valid & 2) { -try_dma_modes: - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - /* Force if Capable regular DMA modes */ - if (!slc90e66_config_drive_for_dma(drive)) - goto no_dma_set; - } - } else if (__ide_dma_good_drive(drive) && - (id->eide_dma_time < 150)) { - /* Consult the list of known "good" drives */ - if (!slc90e66_config_drive_for_dma(drive)) - goto no_dma_set; - } else { - goto fast_ata_pio; + + if (ide_use_dma(drive)) { + if (slc90e66_config_drive_for_dma(drive)) + return hwif->ide_dma_on(drive); } - return hwif->ide_dma_on(drive); + + goto fast_ata_pio; + } else if ((id->capability & 8) || (id->field_valid & 2)) { fast_ata_pio: -no_dma_set: hwif->tuneproc(drive, 5); return hwif->ide_dma_off_quietly(drive); } @@ -313,18 +196,6 @@ } #endif /* CONFIG_BLK_DEV_IDEDMA */ -static unsigned int __init init_chipset_slc90e66 (struct pci_dev *dev, const char *name) -{ -#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) - if (!slc90e66_proc) { - slc90e66_proc = 1; - bmide_dev = dev; - ide_pci_create_host_proc("slc90e66", slc90e66_get_info); - } -#endif /* DISPLAY_SLC90E66_TIMINGS && CONFIG_PROC_FS */ - return 0; -} - static void __init init_hwif_slc90e66 (ide_hwif_t *hwif) { u8 reg47 = 0; @@ -366,7 +237,6 @@ static ide_pci_device_t slc90e66_chipset __devinitdata = { .name = "SLC90E66", - .init_chipset = init_chipset_slc90e66, .init_hwif = init_hwif_slc90e66, .channels = 2, .autodma = AUTODMA, diff -Nru a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c --- a/drivers/ide/pci/triflex.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/ide/pci/triflex.c 2004-11-10 17:19:03 -08:00 @@ -118,25 +118,16 @@ { ide_hwif_t *hwif = HWIF(drive); struct hd_driveid *id = drive->id; - - if (id && (id->capability & 1) && drive->autodma) { - if (__ide_dma_bad_drive(drive)) - goto tune_pio; - if (id->field_valid & 2) { - if ((id->dma_mword & hwif->mwdma_mask) || - (id->dma_1word & hwif->swdma_mask)) { - if (!triflex_config_drive_for_dma(drive)) - goto tune_pio; - } - } else - goto tune_pio; - } else { -tune_pio: - hwif->tuneproc(drive, 255); - return hwif->ide_dma_off_quietly(drive); + + if ((id->capability & 1) && drive->autodma) { + if (ide_use_dma(drive)) { + if (triflex_config_drive_for_dma(drive)) + return hwif->ide_dma_on(drive); + } } - return hwif->ide_dma_on(drive); + hwif->tuneproc(drive, 255); + return hwif->ide_dma_off_quietly(drive); } static void __init init_hwif_triflex(ide_hwif_t *hwif) diff -Nru a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c --- a/drivers/ide/ppc/pmac.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/ide/ppc/pmac.c 2004-11-10 17:19:02 -08:00 @@ -52,8 +52,6 @@ #include "ide-timing.h" -extern void ide_do_request(ide_hwgroup_t *hwgroup, int masked_irq); - #define IDE_PMAC_DEBUG #define DMA_WAIT_TIMEOUT 50 @@ -1560,56 +1558,6 @@ #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC /* - * We build & map the sglist for a given request. - */ -static int __pmac -pmac_ide_build_sglist(ide_drive_t *drive, struct request *rq) -{ - ide_hwif_t *hwif = HWIF(drive); - struct scatterlist *sg = hwif->sg_table; - int nents; - - nents = blk_rq_map_sg(drive->queue, rq, sg); - - if (rq_data_dir(rq) == READ) - hwif->sg_dma_direction = PCI_DMA_FROMDEVICE; - else - hwif->sg_dma_direction = PCI_DMA_TODEVICE; - - return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction); -} - -/* - * Same as above but for a "raw" taskfile request - */ -static int __pmac -pmac_ide_raw_build_sglist(ide_drive_t *drive, struct request *rq) -{ - ide_hwif_t *hwif = HWIF(drive); - struct scatterlist *sg = hwif->sg_table; - int nents = 0; - ide_task_t *args = rq->special; - unsigned char *virt_addr = rq->buffer; - int sector_count = rq->nr_sectors; - - if (args->command_type == IDE_DRIVE_TASK_RAW_WRITE) - hwif->sg_dma_direction = PCI_DMA_TODEVICE; - else - hwif->sg_dma_direction = PCI_DMA_FROMDEVICE; - - if (sector_count > 128) { - sg_init_one(&sg[nents], virt_addr, 128 * SECTOR_SIZE); - nents++; - virt_addr = virt_addr + (128 * SECTOR_SIZE); - sector_count -= 128; - } - sg_init_one(&sg[nents], virt_addr, sector_count * SECTOR_SIZE); - nents++; - - return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction); -} - -/* * pmac_ide_build_dmatable builds the DBDMA command list * for a transfer and sets the DBDMA channel to point to it. */ @@ -1632,11 +1580,8 @@ while (readl(&dma->status) & RUN) udelay(1); - /* Build sglist */ - if (HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) - hwif->sg_nents = i = pmac_ide_raw_build_sglist(drive, rq); - else - hwif->sg_nents = i = pmac_ide_build_sglist(drive, rq); + hwif->sg_nents = i = ide_build_sglist(drive, rq); + if (!i) return 0; @@ -2078,16 +2023,8 @@ hwif->ide_dma_test_irq = &pmac_ide_dma_test_irq; hwif->ide_dma_host_off = &pmac_ide_dma_host_off; hwif->ide_dma_host_on = &pmac_ide_dma_host_on; - hwif->ide_dma_verbose = &__ide_dma_verbose; hwif->ide_dma_timeout = &__ide_dma_timeout; hwif->ide_dma_lostirq = &pmac_ide_dma_lostirq; - -#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO - if (!noautodma) - hwif->autodma = 1; -#endif - hwif->drives[0].autodma = hwif->autodma; - hwif->drives[1].autodma = hwif->autodma; hwif->atapi_dma = 1; switch(pmif->kind) { diff -Nru a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c --- a/drivers/ide/setup-pci.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/ide/setup-pci.c 2004-11-10 17:19:04 -08:00 @@ -185,19 +185,16 @@ second_chance_to_dma: #endif /* CONFIG_BLK_DEV_IDEDMA_FORCED */ - if ((hwif->mmio) && (hwif->dma_base)) + if (hwif->mmio) return hwif->dma_base; if (hwif->mate && hwif->mate->dma_base) { dma_base = hwif->mate->dma_base - (hwif->channel ? 0 : 8); } else { - dma_base = (hwif->mmio) ? - ((unsigned long) hwif->hwif_data) : - (pci_resource_start(dev, 4)); + dma_base = pci_resource_start(dev, 4); if (!dma_base) { - printk(KERN_ERR "%s: dma_base is invalid (0x%04lx)\n", - hwif->cds->name, dma_base); - dma_base = 0; + printk(KERN_ERR "%s: dma_base is invalid\n", + hwif->cds->name); } } @@ -251,7 +248,6 @@ simplex_stat = hwif->INB(dma_base + 2); if (simplex_stat & 0x80) { /* simplex device? */ -#if 0 /* * At this point we haven't probed the drives so we can't make the * appropriate decision. Really we should defer this problem @@ -259,18 +255,7 @@ * to be the DMA end. This has to be become dynamic to handle hot * plug. */ - /* Don't enable DMA on a simplex channel with no drives */ - if (!hwif->drives[0].present && !hwif->drives[1].present) - { - printk(KERN_INFO "%s: simplex device with no drives: DMA disabled\n", - hwif->cds->name); - dma_base = 0; - } - /* If our other channel has DMA then we cannot */ - else -#endif - if(hwif->mate && hwif->mate->dma_base) - { + if (hwif->mate && hwif->mate->dma_base) { printk(KERN_INFO "%s: simplex device: " "DMA disabled\n", hwif->cds->name); @@ -488,13 +473,8 @@ * Set up BM-DMA capability * (PnP BIOS should have done this) */ - if ((d->flags & IDEPCI_FLAG_FORCE_MASTER) == 0) { - /* - * default DMA off if we had to - * configure it here - */ - hwif->autodma = 0; - } + /* default DMA off if we had to configure it here */ + hwif->autodma = 0; pci_set_master(dev); if (pci_read_config_word(dev, PCI_COMMAND, &pcicmd) || !(pcicmd & PCI_COMMAND_MASTER)) { printk(KERN_ERR "%s: %s error updating PCICMD\n", @@ -514,6 +494,11 @@ } } } + +#ifndef CONFIG_IDEDMA_PCI_AUTO +#warning CONFIG_IDEDMA_PCI_AUTO=n support is obsolete, and will be removed soon. +#endif + #endif /* CONFIG_BLK_DEV_IDEDMA_PCI*/ /** @@ -530,13 +515,9 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, int noisy, int *config) { - int ret = 0; u32 class_rev; u16 pcicmd; - if (!noautodma) - ret = 1; - if (noisy) ide_setup_pci_noise(dev, d); @@ -550,8 +531,6 @@ if (!(pcicmd & PCI_COMMAND_IO)) { /* is device disabled? */ if (ide_pci_configure(dev, d)) return -ENODEV; - /* default DMA off if we had to configure it here */ - ret = 0; *config = 1; printk(KERN_INFO "%s: device enabled (Linux)\n", d->name); } @@ -560,14 +539,13 @@ class_rev &= 0xff; if (noisy) printk(KERN_INFO "%s: chipset revision %d\n", d->name, class_rev); - return ret; + return 0; } /** * ide_pci_setup_ports - configure ports/devices on PCI IDE * @dev: PCI device * @d: IDE pci device info - * @autodma: Should we enable DMA * @pciirq: IRQ line * @index: ata index to update * @@ -580,7 +558,7 @@ * where the chipset setup is not the default PCI IDE one. */ -void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int autodma, int pciirq, ata_index_t *index) +void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, ata_index_t *index) { int port; int at_least_one_hwif_enabled = 0; @@ -634,11 +612,7 @@ if (d->autodma == NODMA) goto bypass_legacy_dma; - if (d->autodma == NOAUTODMA) - autodma = 0; - if (autodma) - hwif->autodma = 1; - + if(d->init_setup_dma) d->init_setup_dma(dev, d, hwif); else @@ -671,12 +645,11 @@ */ static ata_index_t do_ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_t *d, u8 noisy) { - int autodma = 0; int pciirq = 0; int tried_config = 0; ata_index_t index = { .b = { .low = 0xff, .high = 0xff } }; - if((autodma = ide_setup_pci_controller(dev, d, noisy, &tried_config)) < 0) + if (ide_setup_pci_controller(dev, d, noisy, &tried_config) < 0) return index; /* @@ -724,7 +697,7 @@ if(pciirq < 0) /* Error not an IRQ */ return index; - ide_pci_setup_ports(dev, d, autodma, pciirq, &index); + ide_pci_setup_ports(dev, d, pciirq, &index); return index; } @@ -734,9 +707,9 @@ ata_index_t index_list = do_ide_setup_pci_device(dev, d, 1); if ((index_list.b.low & 0xf0) != 0xf0) - probe_hwif_init(&ide_hwifs[index_list.b.low]); + probe_hwif_init_with_fixup(&ide_hwifs[index_list.b.low], d->fixup); if ((index_list.b.high & 0xf0) != 0xf0) - probe_hwif_init(&ide_hwifs[index_list.b.high]); + probe_hwif_init_with_fixup(&ide_hwifs[index_list.b.high], d->fixup); create_proc_ide_interfaces(); } diff -Nru a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c --- a/drivers/ieee1394/nodemgr.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/ieee1394/nodemgr.c 2004-11-10 17:19:05 -08:00 @@ -1488,8 +1488,10 @@ break; } - if (hi->kill_me) + if (hi->kill_me) { + up(&nodemgr_serialize); break; + } /* Pause for 1/4 second in 1/16 second intervals, * to make sure things settle down. */ @@ -1513,8 +1515,10 @@ i = 0; /* Check the kill_me again */ - if (hi->kill_me) + if (hi->kill_me) { + up(&nodemgr_serialize); goto caught_signal; + } } if (!nodemgr_check_irm_capability(host, reset_cycles)) { diff -Nru a/drivers/input/input.c b/drivers/input/input.c --- a/drivers/input/input.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/input/input.c 2004-11-10 17:19:04 -08:00 @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff -Nru a/drivers/input/mouse/pc110pad.c b/drivers/input/mouse/pc110pad.c --- a/drivers/input/mouse/pc110pad.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/input/mouse/pc110pad.c 2004-11-10 17:19:03 -08:00 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -107,8 +108,22 @@ return 0; } +/* + * We try to avoid enabling the hardware if it's not + * there, but we don't know how to test. But we do know + * that the PC110 is not a PCI system. So if we find any + * PCI devices in the machine, we don't have a PC110. + */ static int __init pc110pad_init(void) { + struct pci_dev *dev; + + dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL); + if (dev) { + pci_dev_put(dev); + return -ENOENT; + } + if (!request_region(pc110pad_io, 4, "pc110pad")) { printk(KERN_ERR "pc110pad: I/O area %#x-%#x in use.\n", pc110pad_io, pc110pad_io + 4); diff -Nru a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig --- a/drivers/input/serio/Kconfig 2004-11-10 17:19:04 -08:00 +++ b/drivers/input/serio/Kconfig 2004-11-10 17:19:04 -08:00 @@ -20,7 +20,7 @@ tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 default y select SERIO - depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) + depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K ---help--- i8042 is the chip over which the standard AT keyboard and PS/2 mouse are connected to the computer. If you use these devices, diff -Nru a/drivers/input/serio/i8042-io.h b/drivers/input/serio/i8042-io.h --- a/drivers/input/serio/i8042-io.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/input/serio/i8042-io.h 2004-11-10 17:19:02 -08:00 @@ -35,6 +35,7 @@ # define I8042_AUX_IRQ 12 #endif + /* * Register numbers. */ @@ -96,7 +97,7 @@ * On ix86 platforms touching the i8042 data register region can do really * bad things. Because of this the region is always reserved on ix86 boxes. */ -#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__) && !defined(__x86_64__) && !defined(__mips__) +#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__) && !defined(__x86_64__) && !defined(__mips__) && !defined (CONFIG_PPC64) if (!request_region(I8042_DATA_REG, 16, "i8042")) return -1; #endif @@ -110,12 +111,18 @@ i8042_noloop = 1; #endif +#if defined(CONFIG_PPC64) + if (check_legacy_ioport(I8042_DATA_REG)) + return -1; + if (!request_region(I8042_DATA_REG, 16, "i8042")) + return -1; +#endif return 0; } static inline void i8042_platform_exit(void) { -#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__) && !defined(__x86_64__) +#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__) && !defined(__x86_64__) && !defined(CONFIG_PPC64) release_region(I8042_DATA_REG, 16); #endif } diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c --- a/drivers/input/serio/i8042.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/input/serio/i8042.c 2004-11-10 17:19:02 -08:00 @@ -813,6 +813,41 @@ } +static int blink_frequency = 500; +module_param_named(panicblink, blink_frequency, int, 0600); + +/* Catch the case when the kbd interrupt is off */ +#define DELAY do { mdelay(1); if (++delay > 10) return delay; } while(0) + +/* Tell the user who may be running in X and not see the console that we have + panic'ed. This is to distingush panics from "real" lockups. */ +static long i8042_panic_blink(long count) +{ + long delay = 0; + static long last_blink; + static char led; + /* Roughly 1/2s frequency. KDB uses about 1s. Make sure it is + different. */ + if (!blink_frequency) + return 0; + if (count - last_blink < blink_frequency) + return 0; + led ^= 0x01 | 0x04; + while (i8042_read_status() & I8042_STR_IBF) + DELAY; + i8042_write_data(0xed); /* set leds */ + DELAY; + while (i8042_read_status() & I8042_STR_IBF) + DELAY; + DELAY; + i8042_write_data(led); + DELAY; + last_blink = count; + return delay; +} + +#undef DELAY + /* * Here we try to restore the original BIOS settings */ @@ -863,6 +898,8 @@ */ mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD); + panic_blink = i8042_panic_blink; + return 0; } @@ -1077,6 +1114,8 @@ driver_unregister(&i8042_driver); i8042_platform_exit(); + + panic_blink = NULL; } module_init(i8042_init); diff -Nru a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c --- a/drivers/input/serio/rpckbd.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/input/serio/rpckbd.c 2004-11-10 17:19:02 -08:00 @@ -45,9 +45,6 @@ MODULE_DESCRIPTION("Acorn RiscPC PS/2 keyboard controller driver"); MODULE_LICENSE("GPL"); -static struct serio *rpckbd_port; -static struct platform_device *rpckbd_device; - static int rpckbd_write(struct serio *port, unsigned char val) { while (!(iomd_readb(IOMD_KCTRL) & (1 << 7))) @@ -109,45 +106,50 @@ * Allocate and initialize serio structure for subsequent registration * with serio core. */ - -static struct serio * __init rpckbd_allocate_port(void) +static int __devinit rpckbd_probe(struct device *dev) { struct serio *serio; serio = kmalloc(sizeof(struct serio), GFP_KERNEL); - if (serio) { - memset(serio, 0, sizeof(struct serio)); - serio->type = SERIO_8042; - serio->write = rpckbd_write; - serio->open = rpckbd_open; - serio->close = rpckbd_close; - serio->dev.parent = &rpckbd_device->dev; - strlcpy(serio->name, "RiscPC PS/2 kbd port", sizeof(serio->name)); - strlcpy(serio->phys, "rpckbd/serio0", sizeof(serio->phys)); - } + if (!serio) + return -ENOMEM; - return serio; + memset(serio, 0, sizeof(struct serio)); + serio->type = SERIO_8042; + serio->write = rpckbd_write; + serio->open = rpckbd_open; + serio->close = rpckbd_close; + serio->dev.parent = dev; + strlcpy(serio->name, "RiscPC PS/2 kbd port", sizeof(serio->name)); + strlcpy(serio->phys, "rpckbd/serio0", sizeof(serio->phys)); + + dev_set_drvdata(dev, serio); + serio_register_port(serio); + return 0; } -static int __init rpckbd_init(void) +static int __devexit rpckbd_remove(struct device *dev) { - rpckbd_device = platform_device_register_simple("rpckbd", -1, NULL, 0); - if (IS_ERR(rpckbd_device)) - return PTR_ERR(rpckbd_device); + struct serio *serio = dev_get_drvdata(dev); + serio_unregister_port(serio); + return 0; +} - if (!(rpckbd_port = rpckbd_allocate_port())) { - platform_device_unregister(rpckbd_device); - return -ENOMEM; - } +static struct device_driver rpckbd_driver = { + .name = "kart", + .bus = &platform_bus_type, + .probe = rpckbd_probe, + .remove = __devexit_p(rpckbd_remove), +}; - serio_register_port(rpckbd_port); - return 0; +static int __init rpckbd_init(void) +{ + return driver_register(&rpckbd_driver); } static void __exit rpckbd_exit(void) { - serio_unregister_port(rpckbd_port); - platform_device_unregister(rpckbd_device); + driver_unregister(&rpckbd_driver); } module_init(rpckbd_init); diff -Nru a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c --- a/drivers/input/serio/serio.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/input/serio/serio.c 2004-11-10 17:19:02 -08:00 @@ -246,11 +246,6 @@ return sprintf(buf, "%s\n", serio->name); } -static ssize_t serio_show_driver(struct device *dev, char *buf) -{ - return sprintf(buf, "%s\n", dev->driver ? dev->driver->name : "(none)"); -} - static ssize_t serio_rebind_driver(struct device *dev, const char *buf, size_t count) { struct serio *serio = to_serio_port(dev); @@ -307,7 +302,7 @@ static struct device_attribute serio_device_attrs[] = { __ATTR(description, S_IRUGO, serio_show_description, NULL), - __ATTR(driver, S_IWUSR | S_IRUGO, serio_show_driver, serio_rebind_driver), + __ATTR(drvctl, S_IWUSR, NULL, serio_rebind_driver), __ATTR(bind_mode, S_IWUSR | S_IRUGO, serio_show_bind_mode, serio_set_bind_mode), __ATTR_NULL }; diff -Nru a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c --- a/drivers/isdn/capi/capi.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/isdn/capi/capi.c 2004-11-10 17:19:07 -08:00 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -67,10 +68,10 @@ int capi_ttyminors = CAPINC_NR_PORTS; #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ -MODULE_PARM(capi_major, "i"); +module_param_named(major, capi_major, uint, 0); #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE -MODULE_PARM(capi_ttymajor, "i"); -MODULE_PARM(capi_ttyminors, "i"); +module_param_named(ttymajor, capi_ttymajor, uint, 0); +module_param_named(ttyminors, capi_ttyminors, uint, 0); #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ /* -------- defines ------------------------------------------------- */ diff -Nru a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c --- a/drivers/isdn/capi/capidrv.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/isdn/capi/capidrv.c 2004-11-10 17:19:04 -08:00 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -40,7 +41,7 @@ MODULE_DESCRIPTION("CAPI4Linux: Interface to ISDN4Linux"); MODULE_AUTHOR("Carsten Paeth"); MODULE_LICENSE("GPL"); -MODULE_PARM(debugmode, "i"); +module_param(debugmode, uint, 0); /* -------- type definitions ----------------------------------------- */ diff -Nru a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c --- a/drivers/isdn/capi/kcapi.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/isdn/capi/kcapi.c 2004-11-10 17:19:06 -08:00 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -41,7 +42,7 @@ MODULE_DESCRIPTION("CAPI4Linux: kernel CAPI layer"); MODULE_AUTHOR("Carsten Paeth"); MODULE_LICENSE("GPL"); -MODULE_PARM(showcapimsgs, "i"); +module_param(showcapimsgs, uint, 0); /* ------------------------------------------------------------- */ diff -Nru a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c --- a/drivers/isdn/hisax/amd7930_fn.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/isdn/hisax/amd7930_fn.c 2004-11-10 17:19:05 -08:00 @@ -316,14 +316,14 @@ QuickHex(t, cs->rcvbuf, cs->rcvidx); debugl1(cs, cs->dlog); } - /* moves recieved data in sk-buffer */ + /* moves received data in sk-buffer */ memcpy(skb_put(skb, cs->rcvidx), cs->rcvbuf, cs->rcvidx); skb_queue_tail(&cs->rq, skb); } } } - /* throw damaged packets away, reset recieve-buffer, indicate RX */ + /* throw damaged packets away, reset receive-buffer, indicate RX */ ptr = cs->rcvbuf; cs->rcvidx = 0; schedule_event(cs, D_RCVBUFREADY); diff -Nru a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c --- a/drivers/isdn/hisax/hisax_fcpcipnp.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c 2004-11-10 17:19:06 -08:00 @@ -996,7 +996,7 @@ static int __init hisax_fcpcipnp_init(void) { - int retval, pci_nr_found; + int retval; printk(KERN_INFO "hisax_fcpcipnp: Fritz!Card PCI/PCIv2/PnP ISDN driver v0.0.1\n"); diff -Nru a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c --- a/drivers/isdn/i4l/isdn_x25iface.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/isdn/i4l/isdn_x25iface.c 2004-11-10 17:19:03 -08:00 @@ -21,6 +21,7 @@ #include #include #include +#include #include "isdn_x25iface.h" /* for debugging messages not to cause an oops when device pointer is NULL*/ @@ -191,12 +192,9 @@ IX25DEBUG( "isdn_x25iface_receive %s \n", MY_DEVNAME(cprot->net_dev) ); if ( ( (ix25_pdata_t*) (cprot->proto_data) ) -> state == WAN_CONNECTED ){ - skb -> dev = cprot -> net_dev; - skb -> protocol = htons(ETH_P_X25); - skb -> pkt_type = PACKET_HOST; if( skb_push(skb, 1)){ skb -> data[0]=0x00; - skb -> mac.raw = skb -> data; + skb->protocol = x25_type_trans(skb, cprot->net_dev); netif_rx(skb); return 0; } @@ -224,10 +222,7 @@ *state_p = WAN_CONNECTED; if( skb ){ *( skb_put(skb, 1) ) = 0x01; - skb -> mac.raw = skb -> data; - skb -> dev = cprot -> net_dev; - skb -> protocol = htons(ETH_P_X25); - skb -> pkt_type = PACKET_HOST; + skb->protocol = x25_type_trans(skb, cprot->net_dev); netif_rx(skb); return 0; } else { @@ -256,10 +251,7 @@ skb = dev_alloc_skb(1); if( skb ){ *( skb_put(skb, 1) ) = 0x02; - skb -> mac.raw = skb -> data; - skb -> dev = cprot -> net_dev; - skb -> protocol = htons(ETH_P_X25); - skb -> pkt_type = PACKET_HOST; + skb->protocol = x25_type_trans(skb, cprot->net_dev); netif_rx(skb); return 0; } else { diff -Nru a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c --- a/drivers/macintosh/therm_adt746x.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/macintosh/therm_adt746x.c 2004-11-10 17:19:06 -08:00 @@ -23,6 +23,7 @@ #include #include #include + #include #include #include @@ -51,21 +52,26 @@ static int fan_speed = -1; MODULE_AUTHOR("Colin Leroy "); -MODULE_DESCRIPTION("Driver for ADT746x thermostat in iBook G4 and Powerbook G4 Alu"); +MODULE_DESCRIPTION("Driver for ADT746x thermostat in iBook G4 and " + "Powerbook G4 Alu"); MODULE_LICENSE("GPL"); MODULE_PARM(limit_adjust,"i"); -MODULE_PARM_DESC(limit_adjust,"Adjust maximum temperatures (50 cpu, 70 gpu) by N degrees."); +MODULE_PARM_DESC(limit_adjust,"Adjust maximum temperatures (50 cpu, 70 gpu) " + "by N degrees."); + MODULE_PARM(fan_speed,"i"); -MODULE_PARM_DESC(fan_speed,"Specify fan speed (0-255) when lim < temp < lim+8 (default 128)"); +MODULE_PARM_DESC(fan_speed,"Specify starting fan speed (0-255) " + "(default 64)"); struct thermostat { struct i2c_client clt; + u8 temps[3]; u8 cached_temp[3]; u8 initial_limits[3]; u8 limits[3]; int last_speed[2]; - int overriding[2]; + int last_var[2]; }; static enum {ADT7460, ADT7467} therm_type; @@ -74,7 +80,9 @@ static struct thermostat* thermostat; static struct task_struct *thread_therm = NULL; -static int attach_one_thermostat(struct i2c_adapter *adapter, int addr, int busno); +static int attach_one_thermostat(struct i2c_adapter *adapter, int addr, + int busno); + static void write_both_fan_speed(struct thermostat *th, int speed); static void write_fan_speed(struct thermostat *th, int speed, int fan); @@ -140,10 +148,11 @@ kthread_stop(thread_therm); } - printk(KERN_INFO "adt746x: Putting max temperatures back from %d, %d, %d," - " to %d, %d, %d\n", + printk(KERN_INFO "adt746x: Putting max temperatures back from " + "%d, %d, %d to %d, %d, %d\n", th->limits[0], th->limits[1], th->limits[2], - th->initial_limits[0], th->initial_limits[1], th->initial_limits[2]); + th->initial_limits[0], th->initial_limits[1], + th->initial_limits[2]); for (i = 0; i < 3; i++) write_reg(th, LIMIT_REG[i], th->initial_limits[i]); @@ -202,11 +211,11 @@ if (th->last_speed[fan] != speed) { if (speed == -1) - printk(KERN_INFO "adt746x: Setting speed to: automatic for %s fan.\n", - fan?"GPU":"CPU"); + printk(KERN_DEBUG "adt746x: Setting speed to automatic " + "for %s fan.\n", fan?"GPU":"CPU"); else - printk(KERN_INFO "adt746x: Setting speed to: %d for %s fan.\n", - speed, fan?"GPU":"CPU"); + printk(KERN_DEBUG "adt746x: Setting speed to %d " + "for %s fan.\n", speed, fan?"GPU":"CPU"); } else return; @@ -217,8 +226,11 @@ } else { /* back to automatic */ if(therm_type == ADT7460) { - manual = read_reg(th, MANUAL_MODE[fan]) & (~MANUAL_MASK); - write_reg(th, MANUAL_MODE[fan], manual|REM_CONTROL[fan]); + manual = read_reg(th, + MANUAL_MODE[fan]) & (~MANUAL_MASK); + + write_reg(th, + MANUAL_MODE[fan], manual|REM_CONTROL[fan]); } else { manual = read_reg(th, MANUAL_MODE[fan]); write_reg(th, MANUAL_MODE[fan], manual&(~AUTO_MASK)); @@ -228,99 +240,117 @@ th->last_speed[fan] = speed; } -static int monitor_task(void *arg) +static void read_sensors(struct thermostat *th) { - struct thermostat* th = arg; - u8 temps[3]; - u8 lims[3]; - int i; + int i = 0; + + for (i = 0; i < 3; i++) + th->temps[i] = read_reg(th, TEMP_REG[i]); +} + #ifdef DEBUG - int mfan_speed; +static void display_stats(struct thermostat *th) +{ + if (th->temps[0] != th->cached_temp[0] + || th->temps[1] != th->cached_temp[1] + || th->temps[2] != th->cached_temp[2]) { + printk(KERN_INFO "adt746x: Temperature infos:" + " thermostats: %d,%d,%d;" + " limits: %d,%d,%d;" + " fan speed: %d RPM\n", + th->temps[0], th->temps[1], th->temps[2], + th->limits[0], th->limits[1], th->limits[2], + read_fan_speed(th, FAN_SPEED[0])); + } + th->cached_temp[0] = th->temps[0]; + th->cached_temp[1] = th->temps[1]; + th->cached_temp[2] = th->temps[2]; +} #endif + +static void update_fans_speed (struct thermostat *th) +{ + int lastvar = 0; /* last variation, for iBook */ + int i = 0; + + /* we don't care about local sensor, so we start at sensor 1 */ + for (i = 1; i < 3; i++) { + int started = 0; + int fan_number = (therm_type == ADT7460 && i == 2); + int var = th->temps[i] - th->limits[i]; + + if (var > -1) { + int step = (255 - fan_speed) / 7; + int new_speed = 0; + + /* hysteresis : change fan speed only if variation is + * more than two degrees */ + if (abs(var - th->last_var[fan_number]) < 2) + continue; + + started = 1; + new_speed = fan_speed + ((var-1)*step); + + if (new_speed < fan_speed) + new_speed = fan_speed; + if (new_speed > 255) + new_speed = 255; + + printk(KERN_DEBUG "adt746x: setting fans speed to %d " + "(limit exceeded by %d on %s) \n", + new_speed, var, + fan_number?"GPU/pwr":"CPU"); + write_both_fan_speed(th, new_speed); + th->last_var[fan_number] = var; + } else if (var < -2) { + /* don't stop fan if GPU/power is cold and CPU is not + * so cold (lastvar >= -1) */ + if (i == 2 && lastvar < -1) { + if (th->last_speed[fan_number] != 0) + printk(KERN_DEBUG "adt746x: Stopping " + "fans.\n"); + write_both_fan_speed(th, 0); + } + } + + lastvar = var; + + if (started) + return; /* we don't want to re-stop the fan + * if CPU is heating and GPU/power is not */ + } +} + +static int monitor_task(void *arg) +{ + struct thermostat* th = arg; + while(!kthread_should_stop()) { if (current->flags & PF_FREEZE) refrigerator(PF_FREEZE); msleep_interruptible(2000); - /* Check status */ - /* local : chip */ - /* remote 1: CPU ?*/ - /* remote 2: GPU ?*/ #ifndef DEBUG - if (fan_speed != -1) { -#endif - for (i = 0; i < 3; i++) { - temps[i] = read_reg(th, TEMP_REG[i]); - lims[i] = th->limits[i]; - } -#ifndef DEBUG - } + if (fan_speed != -1) + read_sensors(th); +#else + read_sensors(th); #endif - if (fan_speed != -1) { - int lastvar = 0; /* for iBook */ - for (i = 1; i < 3; i++) { /* we don't care about local sensor */ - int started = 0; - int fan_number = (therm_type == ADT7460 && i == 2); - int var = temps[i] - lims[i]; - if (var > 8) { - if (th->overriding[fan_number] == 0) - printk(KERN_INFO "adt746x: Limit exceeded by %d, overriding specified fan speed for %s.\n", - var, fan_number?"GPU":"CPU"); - th->overriding[fan_number] = 1; - write_fan_speed(th, 255, fan_number); - started = 1; - } else if ((!th->overriding[fan_number] || var < 6) && var > 0) { - if (th->overriding[fan_number] == 1) - printk(KERN_INFO "adt746x: Limit exceeded by %d, setting speed to specified for %s.\n", - var, fan_number?"GPU":"CPU"); - th->overriding[fan_number] = 0; - write_fan_speed(th, fan_speed, fan_number); - started = 1; - } else if (var < -1) { - /* don't stop iBook fan if GPU is cold and CPU is not - * so cold (lastvar >= -1) */ - if (therm_type == ADT7460 || lastvar < -1 || i == 1) { - if (th->last_speed[fan_number] != 0) - printk(KERN_INFO "adt746x: Stopping %s fan.\n", - fan_number?"GPU":"CPU"); - write_fan_speed(th, 0, fan_number); - } - } - - lastvar = var; - - if (started && therm_type == ADT7467) - break; /* we don't want to re-stop the fan - * if CPU is heating and GPU is not */ - } - } + + if (fan_speed != -1) + update_fans_speed(th); + #ifdef DEBUG - mfan_speed = read_fan_speed(th, FAN_SPEED[0]); - /* only one fan in the iBook G4 */ - - if (temps[0] != th->cached_temp[0] - || temps[1] != th->cached_temp[1] - || temps[2] != th->cached_temp[2]) { - printk(KERN_INFO "adt746x: Temperature infos:" - " thermostats: %d,%d,%d;" - " limits: %d,%d,%d;" - " fan speed: %d RPM\n", - temps[0], temps[1], temps[2], - lims[0], lims[1], lims[2], - mfan_speed); - } - th->cached_temp[0] = temps[0]; - th->cached_temp[1] = temps[1]; - th->cached_temp[2] = temps[2]; -#endif + display_stats(th); +#endif + } return 0; } -static void -set_limit(struct thermostat *th, int i) +static void set_limit(struct thermostat *th, int i) { /* Set CPU limit higher to avoid powerdowns */ th->limits[i] = default_limits_chip[i] + limit_adjust; @@ -329,9 +359,9 @@ /* set our limits to normal */ th->limits[i] = default_limits_local[i] + limit_adjust; } - -static int -attach_one_thermostat(struct i2c_adapter *adapter, int addr, int busno) + +static int attach_one_thermostat(struct i2c_adapter *adapter, int addr, + int busno) { struct thermostat* th; int rc; @@ -339,9 +369,13 @@ if (thermostat) return 0; - th = (struct thermostat *)kmalloc(sizeof(struct thermostat), GFP_KERNEL); + + th = (struct thermostat *) + kmalloc(sizeof(struct thermostat), GFP_KERNEL); + if (!th) return -ENOMEM; + memset(th, 0, sizeof(*th)); th->clt.addr = addr; th->clt.adapter = adapter; @@ -351,15 +385,16 @@ rc = read_reg(th, 0); if (rc < 0) { - printk(KERN_ERR "adt746x: Thermostat failed to read config from bus %d !\n", - busno); + printk(KERN_ERR "adt746x: Thermostat failed to read config " + "from bus %d !\n", + busno); kfree(th); return -ENODEV; } + /* force manual control to start the fan quieter */ - if (fan_speed == -1) - fan_speed=128; + fan_speed = 64; if(therm_type == ADT7460) { printk(KERN_INFO "adt746x: ADT7460 initializing\n"); @@ -374,14 +409,16 @@ } printk(KERN_INFO "adt746x: Lowering max temperatures from %d, %d, %d" - " to %d, %d, %d\n", - th->initial_limits[0], th->initial_limits[1], th->initial_limits[2], - th->limits[0], th->limits[1], th->limits[2]); + " to %d, %d, %d\n", + th->initial_limits[0], th->initial_limits[1], + th->initial_limits[2], th->limits[0], th->limits[1], + th->limits[2]); thermostat = th; if (i2c_attach_client(&th->clt)) { - printk(KERN_INFO "adt746x: Thermostat failed to attach client !\n"); + printk(KERN_INFO "adt746x: Thermostat failed to attach " + "client !\n"); thermostat = NULL; kfree(th); return -ENODEV; @@ -390,10 +427,14 @@ /* be sure to really write fan speed the first time */ th->last_speed[0] = -2; th->last_speed[1] = -2; - + th->last_var[0] = -80; + th->last_var[1] = -80; + if (fan_speed != -1) { + /* manual mode, stop fans */ write_both_fan_speed(th, 0); } else { + /* automatic mode */ write_both_fan_speed(th, -1); } @@ -510,8 +551,9 @@ therm_bus = ((*prop) >> 8) & 0x0f; therm_address = ((*prop) & 0xff) >> 1; - printk(KERN_INFO "adt746x: Thermostat bus: %d, address: 0x%02x, limit_adjust: %d, fan_speed: %d\n", - therm_bus, therm_address, limit_adjust, fan_speed); + printk(KERN_INFO "adt746x: Thermostat bus: %d, address: 0x%02x, " + "limit_adjust: %d, fan_speed: %d\n", + therm_bus, therm_address, limit_adjust, fan_speed); of_dev = of_platform_device_create(np, "temperatures"); @@ -548,8 +590,11 @@ device_remove_file(&of_dev->dev, &dev_attr_limit_adjust); device_remove_file(&of_dev->dev, &dev_attr_specified_fan_speed); device_remove_file(&of_dev->dev, &dev_attr_cpu_fan_speed); + if(therm_type == ADT7460) - device_remove_file(&of_dev->dev, &dev_attr_gpu_fan_speed); + device_remove_file(&of_dev->dev, + &dev_attr_gpu_fan_speed); + of_device_unregister(of_dev); } i2c_del_driver(&thermostat_driver); diff -Nru a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c --- a/drivers/macintosh/via-pmu.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/macintosh/via-pmu.c 2004-11-10 17:19:06 -08:00 @@ -153,8 +153,8 @@ static int option_lid_wakeup = 1; static int sleep_in_progress; static int can_sleep; -static unsigned long async_req_locks; #endif /* CONFIG_PMAC_PBOOK */ +static unsigned long async_req_locks; static unsigned int pmu_irq_stats[11]; static struct proc_dir_entry *proc_pmu_root; diff -Nru a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c --- a/drivers/md/dm-crypt.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/md/dm-crypt.c 2004-11-10 17:19:02 -08:00 @@ -1,5 +1,6 @@ /* * Copyright (C) 2003 Christophe Saout + * Copyright (C) 2004 Clemens Fruhwirth * * This file is released under the GPL. */ @@ -15,6 +16,7 @@ #include #include #include +#include #include "dm.h" @@ -40,12 +42,22 @@ struct bio *bio_out; unsigned int offset_in; unsigned int offset_out; - int idx_in; - int idx_out; + unsigned int idx_in; + unsigned int idx_out; sector_t sector; int write; }; +struct crypt_config; + +struct crypt_iv_operations { + int (*ctr)(struct crypt_config *cc, struct dm_target *ti, + const char *opts); + void (*dtr)(struct crypt_config *cc); + const char *(*status)(struct crypt_config *cc); + int (*generator)(struct crypt_config *cc, u8 *iv, sector_t sector); +}; + /* * Crypt: maps a linear range of a block device * and encrypts / decrypts at the same time. @@ -64,11 +76,14 @@ /* * crypto related data */ - struct crypto_tfm *tfm; + struct crypt_iv_operations *iv_gen_ops; + char *iv_mode; + void *iv_gen_private; sector_t iv_offset; - int (*iv_generator)(struct crypt_config *cc, u8 *iv, sector_t sector); - int iv_size; - int key_size; + unsigned int iv_size; + + struct crypto_tfm *tfm; + unsigned int key_size; u8 key[0]; }; @@ -93,18 +108,129 @@ /* - * Different IV generation algorithms + * Different IV generation algorithms: + * + * plain: the initial vector is the 32-bit low-endian version of the sector + * number, padded with zeros if neccessary. + * + * ess_iv: "encrypted sector|salt initial vector", the sector number is + * encrypted with the bulk cipher using a salt as key. The salt + * should be derived from the bulk cipher's key via hashing. + * + * plumb: unimplemented, see: + * http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/454 */ -static int crypt_iv_plain(struct crypt_config *cc, u8 *iv, sector_t sector) + +static int crypt_iv_plain_gen(struct crypt_config *cc, u8 *iv, sector_t sector) { + memset(iv, 0, cc->iv_size); *(u32 *)iv = cpu_to_le32(sector & 0xffffffff); - if (cc->iv_size > sizeof(u32) / sizeof(u8)) - memset(iv + (sizeof(u32) / sizeof(u8)), 0, - cc->iv_size - (sizeof(u32) / sizeof(u8))); return 0; } +static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, + const char *opts) +{ + struct crypto_tfm *essiv_tfm; + struct crypto_tfm *hash_tfm; + struct scatterlist sg; + unsigned int saltsize; + u8 *salt; + + if (opts == NULL) { + ti->error = PFX "Digest algorithm missing for ESSIV mode"; + return -EINVAL; + } + + /* Hash the cipher key with the given hash algorithm */ + hash_tfm = crypto_alloc_tfm(opts, 0); + if (hash_tfm == NULL) { + ti->error = PFX "Error initializing ESSIV hash"; + return -EINVAL; + } + + if (crypto_tfm_alg_type(hash_tfm) != CRYPTO_ALG_TYPE_DIGEST) { + ti->error = PFX "Expected digest algorithm for ESSIV hash"; + crypto_free_tfm(hash_tfm); + return -EINVAL; + } + + saltsize = crypto_tfm_alg_digestsize(hash_tfm); + salt = kmalloc(saltsize, GFP_KERNEL); + if (salt == NULL) { + ti->error = PFX "Error kmallocing salt storage in ESSIV"; + crypto_free_tfm(hash_tfm); + return -ENOMEM; + } + + sg.page = virt_to_page(cc->key); + sg.offset = offset_in_page(cc->key); + sg.length = cc->key_size; + crypto_digest_digest(hash_tfm, &sg, 1, salt); + crypto_free_tfm(hash_tfm); + + /* Setup the essiv_tfm with the given salt */ + essiv_tfm = crypto_alloc_tfm(crypto_tfm_alg_name(cc->tfm), + CRYPTO_TFM_MODE_ECB); + if (essiv_tfm == NULL) { + ti->error = PFX "Error allocating crypto tfm for ESSIV"; + kfree(salt); + return -EINVAL; + } + if (crypto_tfm_alg_blocksize(essiv_tfm) + != crypto_tfm_alg_ivsize(cc->tfm)) { + ti->error = PFX "Block size of ESSIV cipher does " + "not match IV size of block cipher"; + crypto_free_tfm(essiv_tfm); + kfree(salt); + return -EINVAL; + } + if (crypto_cipher_setkey(essiv_tfm, salt, saltsize) < 0) { + ti->error = PFX "Failed to set key for ESSIV cipher"; + crypto_free_tfm(essiv_tfm); + kfree(salt); + return -EINVAL; + } + kfree(salt); + + cc->iv_gen_private = (void *)essiv_tfm; + return 0; +} + +static void crypt_iv_essiv_dtr(struct crypt_config *cc) +{ + crypto_free_tfm((struct crypto_tfm *)cc->iv_gen_private); + cc->iv_gen_private = NULL; +} + +static int crypt_iv_essiv_gen(struct crypt_config *cc, u8 *iv, sector_t sector) +{ + struct scatterlist sg = { NULL, }; + + memset(iv, 0, cc->iv_size); + *(u64 *)iv = cpu_to_le64(sector); + + sg.page = virt_to_page(iv); + sg.offset = offset_in_page(iv); + sg.length = cc->iv_size; + crypto_cipher_encrypt((struct crypto_tfm *)cc->iv_gen_private, + &sg, &sg, cc->iv_size); + + return 0; +} + +static struct crypt_iv_operations crypt_iv_plain_ops = { + .generator = crypt_iv_plain_gen +}; + +static struct crypt_iv_operations crypt_iv_essiv_ops = { + .ctr = crypt_iv_essiv_ctr, + .dtr = crypt_iv_essiv_dtr, + .generator = crypt_iv_essiv_gen +}; + + static inline int crypt_convert_scatterlist(struct crypt_config *cc, struct scatterlist *out, struct scatterlist *in, unsigned int length, @@ -113,8 +239,8 @@ u8 iv[cc->iv_size]; int r; - if (cc->iv_generator) { - r = cc->iv_generator(cc, iv, sector); + if (cc->iv_gen_ops) { + r = cc->iv_gen_ops->generator(cc, iv, sector); if (r < 0) return r; @@ -200,13 +326,13 @@ */ static struct bio * crypt_alloc_buffer(struct crypt_config *cc, unsigned int size, - struct bio *base_bio, int *bio_vec_idx) + struct bio *base_bio, unsigned int *bio_vec_idx) { struct bio *bio; - int nr_iovecs = dm_div_up(size, PAGE_SIZE); + unsigned int nr_iovecs = dm_div_up(size, PAGE_SIZE); int gfp_mask = GFP_NOIO | __GFP_HIGHMEM; - int flags = current->flags; - int i; + unsigned long flags = current->flags; + unsigned int i; /* * Tell VM to act less aggressively and fail earlier. @@ -280,9 +406,8 @@ static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *bio, unsigned int bytes) { - unsigned int start, end; + unsigned int i, start, end; struct bio_vec *bv; - int i; /* * This is ugly, but Jens Axboe thinks that using bi_idx in the @@ -366,11 +491,11 @@ /* * Decode key from its hex representation */ -static int crypt_decode_key(u8 *key, char *hex, int size) +static int crypt_decode_key(u8 *key, char *hex, unsigned int size) { char buffer[3]; char *endp; - int i; + unsigned int i; buffer[2] = '\0'; @@ -393,9 +518,9 @@ /* * Encode key into its hex representation */ -static void crypt_encode_key(char *hex, u8 *key, int size) +static void crypt_encode_key(char *hex, u8 *key, unsigned int size) { - int i; + unsigned int i; for(i = 0; i < size; i++) { sprintf(hex, "%02x", *key); @@ -414,9 +539,11 @@ struct crypto_tfm *tfm; char *tmp; char *cipher; - char *mode; - int crypto_flags; - int key_size; + char *chainmode; + char *ivmode; + char *ivopts; + unsigned int crypto_flags; + unsigned int key_size; if (argc != 5) { ti->error = PFX "Not enough arguments"; @@ -425,7 +552,9 @@ tmp = argv[0]; cipher = strsep(&tmp, "-"); - mode = strsep(&tmp, "-"); + chainmode = strsep(&tmp, "-"); + ivopts = strsep(&tmp, "-"); + ivmode = strsep(&ivopts, ":"); if (tmp) DMWARN(PFX "Unexpected additional cipher options"); @@ -439,19 +568,33 @@ return -ENOMEM; } - if (!mode || strcmp(mode, "plain") == 0) - cc->iv_generator = crypt_iv_plain; - else if (strcmp(mode, "ecb") == 0) - cc->iv_generator = NULL; - else { - ti->error = PFX "Invalid chaining mode"; + cc->key_size = key_size; + if ((key_size == 0 && strcmp(argv[1], "-") != 0) + || crypt_decode_key(cc->key, argv[1], key_size) < 0) { + ti->error = PFX "Error decoding key"; goto bad1; } - if (cc->iv_generator) + /* Compatiblity mode for old dm-crypt cipher strings */ + if (!chainmode || (strcmp(chainmode, "plain") == 0 && !ivmode)) { + chainmode = "cbc"; + ivmode = "plain"; + } + + /* Choose crypto_flags according to chainmode */ + if (strcmp(chainmode, "cbc") == 0) crypto_flags = CRYPTO_TFM_MODE_CBC; - else + else if (strcmp(chainmode, "ecb") == 0) crypto_flags = CRYPTO_TFM_MODE_ECB; + else { + ti->error = PFX "Unknown chaining mode"; + goto bad1; + } + + if (crypto_flags != CRYPTO_TFM_MODE_ECB && !ivmode) { + ti->error = PFX "This chaining mode requires an IV mechanism"; + goto bad1; + } tfm = crypto_alloc_tfm(cipher, crypto_flags); if (!tfm) { @@ -463,15 +606,39 @@ goto bad2; } + cc->tfm = tfm; + + /* + * Choose ivmode. Valid modes: "plain", "essiv:". + * See comments at iv code + */ + + if (ivmode == NULL) + cc->iv_gen_ops = NULL; + else if (strcmp(ivmode, "plain") == 0) + cc->iv_gen_ops = &crypt_iv_plain_ops; + else if (strcmp(ivmode, "essiv") == 0) + cc->iv_gen_ops = &crypt_iv_essiv_ops; + else { + ti->error = PFX "Invalid IV mode"; + goto bad2; + } + + if (cc->iv_gen_ops && cc->iv_gen_ops->ctr && + cc->iv_gen_ops->ctr(cc, ti, ivopts) < 0) + goto bad2; + if (tfm->crt_cipher.cit_decrypt_iv && tfm->crt_cipher.cit_encrypt_iv) - /* at least a 32 bit sector number should fit in our buffer */ + /* at least a 64 bit sector number should fit in our buffer */ cc->iv_size = max(crypto_tfm_alg_ivsize(tfm), - (unsigned int)(sizeof(u32) / sizeof(u8))); + (unsigned int)(sizeof(u64) / sizeof(u8))); else { cc->iv_size = 0; - if (cc->iv_generator) { + if (cc->iv_gen_ops) { DMWARN(PFX "Selected cipher does not support IVs"); - cc->iv_generator = NULL; + if (cc->iv_gen_ops->dtr) + cc->iv_gen_ops->dtr(cc); + cc->iv_gen_ops = NULL; } } @@ -479,52 +646,59 @@ mempool_free_slab, _crypt_io_pool); if (!cc->io_pool) { ti->error = PFX "Cannot allocate crypt io mempool"; - goto bad2; + goto bad3; } cc->page_pool = mempool_create(MIN_POOL_PAGES, mempool_alloc_page, mempool_free_page, NULL); if (!cc->page_pool) { ti->error = PFX "Cannot allocate page mempool"; - goto bad3; - } - - cc->tfm = tfm; - cc->key_size = key_size; - if ((key_size == 0 && strcmp(argv[1], "-") != 0) - || crypt_decode_key(cc->key, argv[1], key_size) < 0) { - ti->error = PFX "Error decoding key"; goto bad4; } if (tfm->crt_cipher.cit_setkey(tfm, cc->key, key_size) < 0) { ti->error = PFX "Error setting key"; - goto bad4; + goto bad5; } if (sscanf(argv[2], SECTOR_FORMAT, &cc->iv_offset) != 1) { ti->error = PFX "Invalid iv_offset sector"; - goto bad4; + goto bad5; } if (sscanf(argv[4], SECTOR_FORMAT, &cc->start) != 1) { ti->error = PFX "Invalid device sector"; - goto bad4; + goto bad5; } if (dm_get_device(ti, argv[3], cc->start, ti->len, dm_table_get_mode(ti->table), &cc->dev)) { ti->error = PFX "Device lookup failed"; - goto bad4; + goto bad5; } + if (ivmode && cc->iv_gen_ops) { + if (ivopts) + *(ivopts - 1) = ':'; + cc->iv_mode = kmalloc(strlen(ivmode) + 1, GFP_KERNEL); + if (!cc->iv_mode) { + ti->error = PFX "Error kmallocing iv_mode string"; + goto bad5; + } + strcpy(cc->iv_mode, ivmode); + } else + cc->iv_mode = NULL; + ti->private = cc; return 0; -bad4: +bad5: mempool_destroy(cc->page_pool); -bad3: +bad4: mempool_destroy(cc->io_pool); +bad3: + if (cc->iv_gen_ops && cc->iv_gen_ops->dtr) + cc->iv_gen_ops->dtr(cc); bad2: crypto_free_tfm(tfm); bad1: @@ -539,6 +713,10 @@ mempool_destroy(cc->page_pool); mempool_destroy(cc->io_pool); + if (cc->iv_mode) + kfree(cc->iv_mode); + if (cc->iv_gen_ops && cc->iv_gen_ops->dtr) + cc->iv_gen_ops->dtr(cc); crypto_free_tfm(cc->tfm); dm_put_device(ti, cc->dev); kfree(cc); @@ -577,7 +755,8 @@ static inline struct bio * crypt_clone(struct crypt_config *cc, struct crypt_io *io, struct bio *bio, - sector_t sector, int *bvec_idx, struct convert_context *ctx) + sector_t sector, unsigned int *bvec_idx, + struct convert_context *ctx) { struct bio *clone; @@ -630,7 +809,7 @@ struct bio *clone; unsigned int remaining = bio->bi_size; sector_t sector = bio->bi_sector - ti->begin; - int bvec_idx = 0; + unsigned int bvec_idx = 0; io->target = ti; io->bio = bio; @@ -692,8 +871,8 @@ struct crypt_config *cc = (struct crypt_config *) ti->private; char buffer[32]; const char *cipher; - const char *mode = NULL; - int offset; + const char *chainmode = NULL; + unsigned int sz = 0; switch (type) { case STATUSTYPE_INFO: @@ -705,34 +884,35 @@ switch(cc->tfm->crt_cipher.cit_mode) { case CRYPTO_TFM_MODE_CBC: - mode = "plain"; + chainmode = "cbc"; break; case CRYPTO_TFM_MODE_ECB: - mode = "ecb"; + chainmode = "ecb"; break; default: BUG(); } - snprintf(result, maxlen, "%s-%s ", cipher, mode); - offset = strlen(result); + if (cc->iv_mode) + DMEMIT("%s-%s-%s ", cipher, chainmode, cc->iv_mode); + else + DMEMIT("%s-%s ", cipher, chainmode); if (cc->key_size > 0) { - if ((maxlen - offset) < ((cc->key_size << 1) + 1)) + if ((maxlen - sz) < ((cc->key_size << 1) + 1)) return -ENOMEM; - crypt_encode_key(result + offset, cc->key, cc->key_size); - offset += cc->key_size << 1; + crypt_encode_key(result + sz, cc->key, cc->key_size); + sz += cc->key_size << 1; } else { - if (offset >= maxlen) + if (sz >= maxlen) return -ENOMEM; - result[offset++] = '-'; + result[sz++] = '-'; } format_dev_t(buffer, cc->dev->bdev->bd_dev); - snprintf(result + offset, maxlen - offset, " " SECTOR_FORMAT - " %s " SECTOR_FORMAT, cc->iv_offset, - buffer, cc->start); + DMEMIT(" " SECTOR_FORMAT " %s " SECTOR_FORMAT, + cc->iv_offset, buffer, cc->start); break; } return 0; @@ -740,7 +920,7 @@ static struct target_type crypt_target = { .name = "crypt", - .version= {1, 0, 0}, + .version= {1, 1, 0}, .module = THIS_MODULE, .ctr = crypt_ctr, .dtr = crypt_dtr, diff -Nru a/drivers/md/dm-io.c b/drivers/md/dm-io.c --- a/drivers/md/dm-io.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/md/dm-io.c 2004-11-10 17:19:07 -08:00 @@ -267,7 +267,7 @@ /* create new pool */ _io_pool = mempool_create(new_ios, alloc_io, free_io, NULL); if (!_io_pool) - r = -ENOMEM; + return -ENOMEM; r = bio_set_init(&_bios, "dm-io", 512, 1); if (r) { diff -Nru a/drivers/md/dm-target.c b/drivers/md/dm-target.c --- a/drivers/md/dm-target.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/md/dm-target.c 2004-11-10 17:19:07 -08:00 @@ -120,10 +120,9 @@ return -ENOMEM; down_write(&_lock); - if (__find_target_type(t->name)) { - kfree(ti); + if (__find_target_type(t->name)) rv = -EEXIST; - } else + else list_add(&ti->list, &_targets); up_write(&_lock); diff -Nru a/drivers/md/dm.c b/drivers/md/dm.c --- a/drivers/md/dm.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/md/dm.c 2004-11-10 17:19:06 -08:00 @@ -805,7 +805,7 @@ { struct mapped_device *md = (struct mapped_device *) context; - atomic_inc(&md->event_nr);; + atomic_inc(&md->event_nr); wake_up(&md->eventq); } diff -Nru a/drivers/md/linear.c b/drivers/md/linear.c --- a/drivers/md/linear.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/md/linear.c 2004-11-10 17:19:04 -08:00 @@ -99,17 +99,14 @@ linear_conf_t *conf = mddev_to_conf(mddev); int i, ret = 0; - for (i=0; i < mddev->raid_disks; i++) { + for (i=0; i < mddev->raid_disks && ret == 0; i++) { struct block_device *bdev = conf->disks[i].rdev->bdev; request_queue_t *r_queue = bdev_get_queue(bdev); - if (!r_queue->issue_flush_fn) { + if (!r_queue->issue_flush_fn) ret = -EOPNOTSUPP; - break; - } - ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; + else + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); } return ret; } diff -Nru a/drivers/md/md.c b/drivers/md/md.c --- a/drivers/md/md.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/md/md.c 2004-11-10 17:19:03 -08:00 @@ -154,38 +154,6 @@ tmp = tmp->next;}) \ ) -int md_flush_mddev(mddev_t *mddev, sector_t *error_sector) -{ - struct list_head *tmp; - mdk_rdev_t *rdev; - int ret = 0; - - /* - * this list iteration is done without any locking in md?! - */ - ITERATE_RDEV(mddev, rdev, tmp) { - request_queue_t *r_queue = bdev_get_queue(rdev->bdev); - int err; - - if (!r_queue->issue_flush_fn) - err = -EOPNOTSUPP; - else - err = r_queue->issue_flush_fn(r_queue, rdev->bdev->bd_disk, error_sector); - - if (!ret) - ret = err; - } - - return ret; -} - -static int md_flush_all(request_queue_t *q, struct gendisk *disk, - sector_t *error_sector) -{ - mddev_t *mddev = q->queuedata; - - return md_flush_mddev(mddev, error_sector); -} static int md_fail_request (request_queue_t *q, struct bio *bio) { @@ -472,30 +440,6 @@ return csum; } -/* csum_partial is not consistent between different architectures. - * Some (i386) do a 32bit csum. Some (alpha) do 16 bit. - * This makes it hard for user-space to know what to do. - * So we use calc_sb_csum to set the checksum to allow working - * with older kernels, but allow calc_sb_csum_common to - * be used when checking if a checksum is correct, to - * make life easier for user-space tools that might write - * a superblock. - */ -static unsigned int calc_sb_csum_common(mdp_super_t *super) -{ - unsigned int disk_csum = super->sb_csum; - unsigned long long newcsum = 0; - unsigned int csum; - int i; - unsigned int *superc = (int*) super; - super->sb_csum = 0; - - for (i=0; i>32); - super->sb_csum = disk_csum; - return csum; -} /* * Handle superblock details. @@ -579,8 +523,7 @@ if (sb->raid_disks <= 0) goto abort; - if (calc_sb_csum(sb) != sb->sb_csum && - calc_sb_csum_common(sb) != sb->sb_csum) { + if (csum_fold(calc_sb_csum(sb)) != csum_fold(sb->sb_csum)) { printk(KERN_WARNING "md: invalid superblock checksum on %s\n", b); goto abort; @@ -805,7 +748,7 @@ { unsigned int disk_csum, csum; unsigned long long newcsum; - int size = 256 + sb->max_dev*2; + int size = 256 + le32_to_cpu(sb->max_dev)*2; unsigned int *isuper = (unsigned int*)sb; int i; @@ -820,7 +763,7 @@ csum = (newcsum & 0xffffffff) + (newcsum >> 32); sb->sb_csum = disk_csum; - return csum; + return cpu_to_le32(csum); } static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version) @@ -842,7 +785,7 @@ case 0: sb_offset = rdev->bdev->bd_inode->i_size >> 9; sb_offset -= 8*2; - sb_offset &= ~(4*2); + sb_offset &= ~(4*2-1); /* convert from sectors to K */ sb_offset /= 2; break; @@ -875,6 +818,11 @@ bdevname(rdev->bdev,b)); return -EINVAL; } + if (le64_to_cpu(sb->data_size) < 10) { + printk("md: data_size too small on %s\n", + bdevname(rdev->bdev,b)); + return -EINVAL; + } rdev->preferred_minor = 0xffff; rdev->data_offset = le64_to_cpu(sb->data_offset); @@ -919,7 +867,6 @@ if (mddev->raid_disks == 0) { mddev->major_version = 1; - mddev->minor_version = 0; mddev->patch_version = 0; mddev->persistent = 1; mddev->chunk_size = le32_to_cpu(sb->chunksize) << 9; @@ -928,7 +875,7 @@ mddev->level = le32_to_cpu(sb->level); mddev->layout = le32_to_cpu(sb->layout); mddev->raid_disks = le32_to_cpu(sb->raid_disks); - mddev->size = (u32)le64_to_cpu(sb->size); + mddev->size = le64_to_cpu(sb->size)/2; mddev->events = le64_to_cpu(sb->events); mddev->recovery_cp = le64_to_cpu(sb->resync_offset); @@ -996,7 +943,7 @@ if (rdev2->desc_nr > max_dev) max_dev = rdev2->desc_nr; - sb->max_dev = max_dev; + sb->max_dev = cpu_to_le32(max_dev); for (i=0; idev_roles[max_dev] = cpu_to_le16(0xfffe); @@ -1491,17 +1438,6 @@ } - /* - * Check if we can support this RAID array - */ - if (mddev->major_version != MD_MAJOR_VERSION || - mddev->minor_version > MD_MINOR_VERSION) { - printk(KERN_ALERT - "md: %s: unsupported raid array version %d.%d.%d\n", - mdname(mddev), mddev->major_version, - mddev->minor_version, mddev->patch_version); - goto abort; - } if ((mddev->recovery_cp != MaxSector) && ((mddev->level == 1) || @@ -1511,8 +1447,6 @@ mdname(mddev)); return 0; -abort: - return 1; } int mdp_major = 0; @@ -1714,7 +1648,6 @@ */ mddev->queue->queuedata = mddev; mddev->queue->make_request_fn = mddev->pers->make_request; - mddev->queue->issue_flush_fn = md_flush_all; mddev->changed = 1; return 0; @@ -1846,7 +1779,7 @@ err = do_md_run (mddev); if (err) { - printk(KERN_WARNING "md :do_md_run() returned %d\n", err); + printk(KERN_WARNING "md: do_md_run() returned %d\n", err); do_md_stop (mddev, 0); } } @@ -2036,7 +1969,7 @@ info.major_version = mddev->major_version; info.minor_version = mddev->minor_version; - info.patch_version = 1; + info.patch_version = MD_PATCHLEVEL_VERSION; info.ctime = mddev->ctime; info.level = mddev->level; info.size = mddev->size; @@ -2436,7 +2369,7 @@ /* The "size" is the amount of each device that is used. * This can only make sense for arrays with redundancy. * linear and raid0 always use whatever space is available - * We can only consider changing the size of no resync + * We can only consider changing the size if no resync * or reconstruction is happening, and if the new size * is acceptable. It must fit before the sb_offset or, * if that is curr_resync = 2; + try_again: + if (signal_pending(current)) { + flush_signals(current); + goto skip; + } ITERATE_MDDEV(mddev2,tmp) { + printk("."); if (mddev2 == mddev) continue; if (mddev2->curr_resync && match_mddev_units(mddev,mddev2)) { - printk(KERN_INFO "md: delaying resync of %s" - " until %s has finished resync (they" - " share one or more physical units)\n", - mdname(mddev), mdname(mddev2)); - if (mddev < mddev2) {/* arbitrarily yield */ + DEFINE_WAIT(wq); + if (mddev < mddev2 && mddev->curr_resync == 2) { + /* arbitrarily yield */ mddev->curr_resync = 1; wake_up(&resync_wait); } - if (wait_event_interruptible(resync_wait, - mddev2->curr_resync < mddev->curr_resync)) { - flush_signals(current); + if (mddev > mddev2 && mddev->curr_resync == 1) + /* no need to wait here, we can wait the next + * time 'round when curr_resync == 2 + */ + continue; + prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE); + if (!signal_pending(current) + && mddev2->curr_resync >= mddev->curr_resync) { + printk(KERN_INFO "md: delaying resync of %s" + " until %s has finished resync (they" + " share one or more physical units)\n", + mdname(mddev), mdname(mddev2)); mddev_put(mddev2); - goto skip; + schedule(); + finish_wait(&resync_wait, &wq); + goto try_again; } - } - if (mddev->curr_resync == 1) { - mddev_put(mddev2); - break; + finish_wait(&resync_wait, &wq); } } } while (mddev->curr_resync < 2); @@ -3500,6 +3454,7 @@ md_enter_safemode(mddev); skip: mddev->curr_resync = 0; + wake_up(&resync_wait); set_bit(MD_RECOVERY_DONE, &mddev->recovery); md_wakeup_thread(mddev->thread); } @@ -3567,14 +3522,11 @@ mddev->recovery = 0; /* flag recovery needed just to double check */ set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); - wake_up(&resync_wait); goto unlock; } - if (mddev->recovery) { + if (mddev->recovery) /* probably just the RECOVERY_NEEDED flag */ mddev->recovery = 0; - wake_up(&resync_wait); - } /* no recovery is running. * remove any failed drives, then diff -Nru a/drivers/md/multipath.c b/drivers/md/multipath.c --- a/drivers/md/multipath.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/md/multipath.c 2004-11-10 17:19:04 -08:00 @@ -36,8 +36,6 @@ static mdk_personality_t multipath_personality; -static spinlock_t retry_list_lock = SPIN_LOCK_UNLOCKED; -struct multipath_bh *multipath_retry_list = NULL, **multipath_retry_tail; static void *mp_pool_alloc(int gfp_flags, void *data) @@ -63,16 +61,16 @@ * now we use the first available disk. */ - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); for (i = 0; i < disks; i++) { mdk_rdev_t *rdev = conf->multipaths[i].rdev; if (rdev && rdev->in_sync) { atomic_inc(&rdev->nr_pending); - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); return i; } } - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); printk(KERN_ERR "multipath_map(): no more operational IO paths?\n"); return (-1); @@ -82,14 +80,11 @@ { unsigned long flags; mddev_t *mddev = mp_bh->mddev; + multipath_conf_t *conf = mddev_to_conf(mddev); - spin_lock_irqsave(&retry_list_lock, flags); - if (multipath_retry_list == NULL) - multipath_retry_tail = &multipath_retry_list; - *multipath_retry_tail = mp_bh; - multipath_retry_tail = &mp_bh->next_mp; - mp_bh->next_mp = NULL; - spin_unlock_irqrestore(&retry_list_lock, flags); + spin_lock_irqsave(&conf->device_lock, flags); + list_add(&mp_bh->retry_list, &conf->retry_list); + spin_unlock_irqrestore(&conf->device_lock, flags); md_wakeup_thread(mddev->thread); } @@ -140,26 +135,26 @@ { multipath_conf_t *conf = mddev_to_conf(mddev); int i; - unsigned long flags; - spin_lock_irqsave(&conf->device_lock, flags); + rcu_read_lock(); for (i=0; iraid_disks; i++) { mdk_rdev_t *rdev = conf->multipaths[i].rdev; - if (rdev && !rdev->faulty) { + if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { request_queue_t *r_queue = bdev_get_queue(rdev->bdev); atomic_inc(&rdev->nr_pending); - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); if (r_queue->unplug_fn) r_queue->unplug_fn(r_queue); - spin_lock_irqsave(&conf->device_lock, flags); - atomic_dec(&rdev->nr_pending); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); } + static void multipath_unplug(request_queue_t *q) { unplug_slaves(q->queuedata); @@ -195,6 +190,7 @@ multipath = conf->multipaths + mp_bh->path; mp_bh->bio = *bio; + mp_bh->bio.bi_sector += multipath->rdev->data_offset; mp_bh->bio.bi_bdev = multipath->rdev->bdev; mp_bh->bio.bi_rw |= (1 << BIO_RW_FAILFAST); mp_bh->bio.bi_end_io = multipath_end_request; @@ -224,22 +220,26 @@ multipath_conf_t *conf = mddev_to_conf(mddev); int i, ret = 0; - for (i=0; iraid_disks; i++) { + rcu_read_lock(); + for (i=0; iraid_disks && ret == 0; i++) { mdk_rdev_t *rdev = conf->multipaths[i].rdev; if (rdev && !rdev->faulty) { struct block_device *bdev = rdev->bdev; request_queue_t *r_queue = bdev_get_queue(bdev); - if (!r_queue->issue_flush_fn) { + if (!r_queue->issue_flush_fn) ret = -EOPNOTSUPP; - break; + else { + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, + error_sector); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } - - ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; } } + rcu_read_unlock(); return ret; } @@ -310,10 +310,9 @@ struct multipath_info *p; print_multipath_conf(conf); - spin_lock_irq(&conf->device_lock); + for (path=0; pathraid_disks; path++) if ((p=conf->multipaths+path)->rdev == NULL) { - p->rdev = rdev; blk_queue_stack_limits(mddev->queue, rdev->bdev->bd_disk->queue); @@ -330,9 +329,9 @@ conf->working_disks++; rdev->raid_disk = path; rdev->in_sync = 1; + p->rdev = rdev; found = 1; } - spin_unlock_irq(&conf->device_lock); print_multipath_conf(conf); return found; @@ -341,26 +340,29 @@ static int multipath_remove_disk(mddev_t *mddev, int number) { multipath_conf_t *conf = mddev->private; - int err = 1; + int err = 0; + mdk_rdev_t *rdev; struct multipath_info *p = conf->multipaths + number; print_multipath_conf(conf); - spin_lock_irq(&conf->device_lock); - if (p->rdev) { - if (p->rdev->in_sync || - atomic_read(&p->rdev->nr_pending)) { + rdev = p->rdev; + if (rdev) { + if (rdev->in_sync || + atomic_read(&rdev->nr_pending)) { printk(KERN_ERR "hot-remove-disk, slot %d is identified" " but is still operational!\n", number); err = -EBUSY; goto abort; } p->rdev = NULL; - err = 0; + synchronize_kernel(); + if (atomic_read(&rdev->nr_pending)) { + /* lost the race, try later */ + err = -EBUSY; + p->rdev = rdev; + } } - if (err) - MD_BUG(); abort: - spin_unlock_irq(&conf->device_lock); print_multipath_conf(conf); return err; @@ -382,18 +384,18 @@ struct bio *bio; unsigned long flags; multipath_conf_t *conf = mddev_to_conf(mddev); + struct list_head *head = &conf->retry_list; md_check_recovery(mddev); for (;;) { char b[BDEVNAME_SIZE]; - spin_lock_irqsave(&retry_list_lock, flags); - mp_bh = multipath_retry_list; - if (!mp_bh) + spin_lock_irqsave(&conf->device_lock, flags); + if (list_empty(head)) break; - multipath_retry_list = mp_bh->next_mp; - spin_unlock_irqrestore(&retry_list_lock, flags); + mp_bh = list_entry(head->prev, struct multipath_bh, retry_list); + list_del(head->prev); + spin_unlock_irqrestore(&conf->device_lock, flags); - mddev = mp_bh->mddev; bio = &mp_bh->bio; bio->bi_sector = mp_bh->master_bio->bi_sector; @@ -409,6 +411,7 @@ bdevname(bio->bi_bdev,b), (unsigned long long)bio->bi_sector); *bio = *(mp_bh->master_bio); + bio->bi_sector += conf->multipaths[mp_bh->path].rdev->data_offset; bio->bi_bdev = conf->multipaths[mp_bh->path].rdev->bdev; bio->bi_rw |= (1 << BIO_RW_FAILFAST); bio->bi_end_io = multipath_end_request; @@ -416,7 +419,7 @@ generic_make_request(bio); } } - spin_unlock_irqrestore(&retry_list_lock, flags); + spin_unlock_irqrestore(&conf->device_lock, flags); } static int multipath_run (mddev_t *mddev) @@ -489,6 +492,7 @@ mddev->sb_dirty = 1; conf->mddev = mddev; conf->device_lock = SPIN_LOCK_UNLOCKED; + INIT_LIST_HEAD(&conf->retry_list); if (!conf->working_disks) { printk(KERN_ERR "multipath: no operational IO paths for %s\n", diff -Nru a/drivers/md/raid0.c b/drivers/md/raid0.c --- a/drivers/md/raid0.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/md/raid0.c 2004-11-10 17:19:04 -08:00 @@ -48,18 +48,14 @@ mdk_rdev_t **devlist = conf->strip_zone[0].dev; int i, ret = 0; - for (i=0; iraid_disks; i++) { + for (i=0; iraid_disks && ret == 0; i++) { struct block_device *bdev = devlist[i]->bdev; request_queue_t *r_queue = bdev_get_queue(bdev); - if (!r_queue->issue_flush_fn) { + if (!r_queue->issue_flush_fn) ret = -EOPNOTSUPP; - break; - } - - ret =r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; + else + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); } return ret; } diff -Nru a/drivers/md/raid1.c b/drivers/md/raid1.c --- a/drivers/md/raid1.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/md/raid1.c 2004-11-10 17:19:04 -08:00 @@ -30,8 +30,6 @@ #define NR_RAID1_BIOS 256 static mdk_personality_t raid1_personality; -static spinlock_t retry_list_lock = SPIN_LOCK_UNLOCKED; -static LIST_HEAD(retry_list_head); static void unplug_slaves(mddev_t *mddev); @@ -188,10 +186,11 @@ { unsigned long flags; mddev_t *mddev = r1_bio->mddev; + conf_t *conf = mddev_to_conf(mddev); - spin_lock_irqsave(&retry_list_lock, flags); - list_add(&r1_bio->retry_list, &retry_list_head); - spin_unlock_irqrestore(&retry_list_lock, flags); + spin_lock_irqsave(&conf->device_lock, flags); + list_add(&r1_bio->retry_list, &conf->retry_list); + spin_unlock_irqrestore(&conf->device_lock, flags); md_wakeup_thread(mddev->thread); } @@ -340,7 +339,7 @@ const int sectors = r1_bio->sectors; sector_t new_distance, current_distance; - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); /* * Check if it if we can balance. We can balance on the whole * device if no resync is going on, or below the resync window. @@ -417,7 +416,7 @@ conf->last_used = new_disk; atomic_inc(&conf->mirrors[new_disk].rdev->nr_pending); } - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); return new_disk; } @@ -426,26 +425,26 @@ { conf_t *conf = mddev_to_conf(mddev); int i; - unsigned long flags; - spin_lock_irqsave(&conf->device_lock, flags); + rcu_read_lock(); for (i=0; iraid_disks; i++) { mdk_rdev_t *rdev = conf->mirrors[i].rdev; - if (rdev && atomic_read(&rdev->nr_pending)) { + if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { request_queue_t *r_queue = bdev_get_queue(rdev->bdev); atomic_inc(&rdev->nr_pending); - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); if (r_queue->unplug_fn) r_queue->unplug_fn(r_queue); - spin_lock_irqsave(&conf->device_lock, flags); - atomic_dec(&rdev->nr_pending); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); } + static void raid1_unplug(request_queue_t *q) { unplug_slaves(q->queuedata); @@ -456,24 +455,28 @@ { mddev_t *mddev = q->queuedata; conf_t *conf = mddev_to_conf(mddev); - unsigned long flags; int i, ret = 0; - spin_lock_irqsave(&conf->device_lock, flags); - for (i=0; iraid_disks; i++) { + rcu_read_lock(); + for (i=0; iraid_disks && ret == 0; i++) { mdk_rdev_t *rdev = conf->mirrors[i].rdev; if (rdev && !rdev->faulty) { struct block_device *bdev = rdev->bdev; request_queue_t *r_queue = bdev_get_queue(bdev); - if (r_queue->issue_flush_fn) { - ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; + if (!r_queue->issue_flush_fn) + ret = -EOPNOTSUPP; + else { + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, + error_sector); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); return ret; } @@ -580,7 +583,7 @@ * bios[x] to bio */ disks = conf->raid_disks; - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); for (i = 0; i < disks; i++) { if (conf->mirrors[i].rdev && !conf->mirrors[i].rdev->faulty) { @@ -589,7 +592,7 @@ } else r1_bio->bios[i] = NULL; } - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); atomic_set(&r1_bio->remaining, 1); md_write_start(mddev); @@ -711,7 +714,6 @@ conf_t *conf = mddev->private; mirror_info_t *tmp; - spin_lock_irq(&conf->device_lock); /* * Find all failed disks within the RAID1 configuration * and mark them readable @@ -726,7 +728,6 @@ tmp->rdev->in_sync = 1; } } - spin_unlock_irq(&conf->device_lock); print_conf(conf); return 0; @@ -740,10 +741,8 @@ int mirror; mirror_info_t *p; - spin_lock_irq(&conf->device_lock); for (mirror=0; mirror < mddev->raid_disks; mirror++) if ( !(p=conf->mirrors+mirror)->rdev) { - p->rdev = rdev; blk_queue_stack_limits(mddev->queue, rdev->bdev->bd_disk->queue); @@ -758,9 +757,9 @@ p->head_position = 0; rdev->raid_disk = mirror; found = 1; + p->rdev = rdev; break; } - spin_unlock_irq(&conf->device_lock); print_conf(conf); return found; @@ -769,24 +768,27 @@ static int raid1_remove_disk(mddev_t *mddev, int number) { conf_t *conf = mddev->private; - int err = 1; + int err = 0; + mdk_rdev_t *rdev; mirror_info_t *p = conf->mirrors+ number; print_conf(conf); - spin_lock_irq(&conf->device_lock); - if (p->rdev) { - if (p->rdev->in_sync || - atomic_read(&p->rdev->nr_pending)) { + rdev = p->rdev; + if (rdev) { + if (rdev->in_sync || + atomic_read(&rdev->nr_pending)) { err = -EBUSY; goto abort; } p->rdev = NULL; - err = 0; + synchronize_kernel(); + if (atomic_read(&rdev->nr_pending)) { + /* lost the race, try later */ + err = -EBUSY; + p->rdev = rdev; + } } - if (err) - MD_BUG(); abort: - spin_unlock_irq(&conf->device_lock); print_conf(conf); return err; @@ -904,11 +906,11 @@ static void raid1d(mddev_t *mddev) { - struct list_head *head = &retry_list_head; r1bio_t *r1_bio; struct bio *bio; unsigned long flags; conf_t *conf = mddev_to_conf(mddev); + struct list_head *head = &conf->retry_list; int unplug=0; mdk_rdev_t *rdev; @@ -917,12 +919,12 @@ for (;;) { char b[BDEVNAME_SIZE]; - spin_lock_irqsave(&retry_list_lock, flags); + spin_lock_irqsave(&conf->device_lock, flags); if (list_empty(head)) break; r1_bio = list_entry(head->prev, r1bio_t, retry_list); list_del(head->prev); - spin_unlock_irqrestore(&retry_list_lock, flags); + spin_unlock_irqrestore(&conf->device_lock, flags); mddev = r1_bio->mddev; conf = mddev_to_conf(mddev); @@ -941,6 +943,8 @@ } else { r1_bio->bios[r1_bio->read_disk] = NULL; r1_bio->read_disk = disk; + bio_put(bio); + bio = bio_clone(r1_bio->master_bio, GFP_NOIO); r1_bio->bios[r1_bio->read_disk] = bio; rdev = conf->mirrors[disk].rdev; if (printk_ratelimit()) @@ -948,15 +952,17 @@ " another mirror\n", bdevname(rdev->bdev,b), (unsigned long long)r1_bio->sector); - bio->bi_bdev = rdev->bdev; bio->bi_sector = r1_bio->sector + rdev->data_offset; + bio->bi_bdev = rdev->bdev; + bio->bi_end_io = raid1_end_read_request; bio->bi_rw = READ; + bio->bi_private = r1_bio; unplug = 1; generic_make_request(bio); } } } - spin_unlock_irqrestore(&retry_list_lock, flags); + spin_unlock_irqrestore(&conf->device_lock, flags); if (unplug) unplug_slaves(mddev); } @@ -1023,7 +1029,7 @@ */ disk = conf->last_used; /* make sure disk is operational */ - spin_lock_irq(&conf->device_lock); + while (conf->mirrors[disk].rdev == NULL || !conf->mirrors[disk].rdev->in_sync) { if (disk <= 0) @@ -1034,7 +1040,7 @@ } conf->last_used = disk; atomic_inc(&conf->mirrors[disk].rdev->nr_pending); - spin_unlock_irq(&conf->device_lock); + mirror = conf->mirrors + disk; @@ -1087,7 +1093,7 @@ int rv = max_sector - sector_nr; md_done_sync(mddev, rv, 1); put_buf(r1_bio); - atomic_dec(&conf->mirrors[disk].rdev->nr_pending); + rdev_dec_pending(conf->mirrors[disk].rdev, mddev); return rv; } @@ -1205,6 +1211,7 @@ conf->raid_disks = mddev->raid_disks; conf->mddev = mddev; conf->device_lock = SPIN_LOCK_UNLOCKED; + INIT_LIST_HEAD(&conf->retry_list); if (conf->working_disks == 1) mddev->recovery_cp = MaxSector; diff -Nru a/drivers/md/raid10.c b/drivers/md/raid10.c --- a/drivers/md/raid10.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/md/raid10.c 2004-11-10 17:19:06 -08:00 @@ -36,7 +36,7 @@ * device of the previous section. * Thus there are (near_copies*far_copies) of each chunk, and each is on a different * drive. - * near_copies and far_copies must be at least one, and there product is at most + * near_copies and far_copies must be at least one, and their product is at most * raid_disks. */ @@ -498,7 +498,7 @@ sector_t new_distance, current_distance; raid10_find_phys(conf, r10_bio); - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); /* * Check if we can balance. We can balance on the whole * device if no resync is going on, or below the resync window. @@ -570,7 +570,7 @@ if (disk >= 0 && conf->mirrors[disk].rdev) atomic_inc(&conf->mirrors[disk].rdev->nr_pending); - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); return disk; } @@ -579,26 +579,26 @@ { conf_t *conf = mddev_to_conf(mddev); int i; - unsigned long flags; - spin_lock_irqsave(&conf->device_lock, flags); + rcu_read_lock(); for (i=0; iraid_disks; i++) { mdk_rdev_t *rdev = conf->mirrors[i].rdev; - if (rdev && atomic_read(&rdev->nr_pending)) { + if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { request_queue_t *r_queue = bdev_get_queue(rdev->bdev); atomic_inc(&rdev->nr_pending); - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); if (r_queue->unplug_fn) r_queue->unplug_fn(r_queue); - spin_lock_irqsave(&conf->device_lock, flags); - atomic_dec(&rdev->nr_pending); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); } + static void raid10_unplug(request_queue_t *q) { unplug_slaves(q->queuedata); @@ -609,24 +609,28 @@ { mddev_t *mddev = q->queuedata; conf_t *conf = mddev_to_conf(mddev); - unsigned long flags; int i, ret = 0; - spin_lock_irqsave(&conf->device_lock, flags); - for (i=0; iraid_disks; i++) { + rcu_read_lock(); + for (i=0; iraid_disks && ret == 0; i++) { mdk_rdev_t *rdev = conf->mirrors[i].rdev; if (rdev && !rdev->faulty) { struct block_device *bdev = rdev->bdev; request_queue_t *r_queue = bdev_get_queue(bdev); - if (r_queue->issue_flush_fn) { - ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; + if (!r_queue->issue_flush_fn) + ret = -EOPNOTSUPP; + else { + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, + error_sector); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); return ret; } @@ -757,7 +761,7 @@ * bios[x] to bio */ raid10_find_phys(conf, r10_bio); - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); for (i = 0; i < conf->copies; i++) { int d = r10_bio->devs[i].devnum; if (conf->mirrors[d].rdev && @@ -767,7 +771,7 @@ } else r10_bio->devs[i].bio = NULL; } - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); atomic_set(&r10_bio->remaining, 1); md_write_start(mddev); @@ -900,7 +904,6 @@ conf_t *conf = mddev->private; mirror_info_t *tmp; - spin_lock_irq(&conf->device_lock); /* * Find all non-in_sync disks within the RAID10 configuration * and mark them in_sync @@ -915,7 +918,6 @@ tmp->rdev->in_sync = 1; } } - spin_unlock_irq(&conf->device_lock); print_conf(conf); return 0; @@ -934,10 +936,9 @@ * very different from resync */ return 0; - spin_lock_irq(&conf->device_lock); + for (mirror=0; mirror < mddev->raid_disks; mirror++) if ( !(p=conf->mirrors+mirror)->rdev) { - p->rdev = rdev; blk_queue_stack_limits(mddev->queue, rdev->bdev->bd_disk->queue); @@ -952,9 +953,9 @@ p->head_position = 0; rdev->raid_disk = mirror; found = 1; + p->rdev = rdev; break; } - spin_unlock_irq(&conf->device_lock); print_conf(conf); return found; @@ -963,24 +964,27 @@ static int raid10_remove_disk(mddev_t *mddev, int number) { conf_t *conf = mddev->private; - int err = 1; + int err = 0; + mdk_rdev_t *rdev; mirror_info_t *p = conf->mirrors+ number; print_conf(conf); - spin_lock_irq(&conf->device_lock); - if (p->rdev) { - if (p->rdev->in_sync || - atomic_read(&p->rdev->nr_pending)) { + rdev = p->rdev; + if (rdev) { + if (rdev->in_sync || + atomic_read(&rdev->nr_pending)) { err = -EBUSY; goto abort; } p->rdev = NULL; - err = 0; + synchronize_kernel(); + if (atomic_read(&rdev->nr_pending)) { + /* lost the race, try later */ + err = -EBUSY; + p->rdev = rdev; + } } - if (err) - MD_BUG(); abort: - spin_unlock_irq(&conf->device_lock); print_conf(conf); return err; @@ -1145,6 +1149,7 @@ atomic_inc(&r10_bio->remaining); md_sync_acct(conf->mirrors[d].rdev->bdev, tbio->bi_size >> 9); + tbio->bi_sector += conf->mirrors[d].rdev->data_offset; generic_make_request(tbio); } @@ -1233,8 +1238,8 @@ int mirror; bio = r10_bio->devs[r10_bio->read_slot].bio; r10_bio->devs[r10_bio->read_slot].bio = NULL; + bio_put(bio); mirror = read_balance(conf, r10_bio); - r10_bio->devs[r10_bio->read_slot].bio = bio; if (mirror == -1) { printk(KERN_ALERT "raid10: %s: unrecoverable I/O" " read error for block %llu\n", @@ -1248,15 +1253,14 @@ " another mirror\n", bdevname(rdev->bdev,b), (unsigned long long)r10_bio->sector); - bio->bi_bdev = rdev->bdev; + bio = bio_clone(r10_bio->master_bio, GFP_NOIO); + r10_bio->devs[r10_bio->read_slot].bio = bio; bio->bi_sector = r10_bio->devs[r10_bio->read_slot].addr + rdev->data_offset; - bio->bi_next = NULL; - bio->bi_flags &= (1<bi_flags |= 1 << BIO_UPTODATE; - bio->bi_idx = 0; - bio->bi_size = r10_bio->sectors << 9; + bio->bi_bdev = rdev->bdev; bio->bi_rw = READ; + bio->bi_private = r10_bio; + bio->bi_end_io = raid10_end_read_request; unplug = 1; generic_make_request(bio); } @@ -1468,7 +1472,7 @@ set_bit(R10BIO_IsSync, &r10_bio->state); raid10_find_phys(conf, r10_bio); r10_bio->sectors = (sector_nr | conf->chunk_mask) - sector_nr +1; - spin_lock_irq(&conf->device_lock); + for (i=0; icopies; i++) { int d = r10_bio->devs[i].devnum; bio = r10_bio->devs[i].bio; @@ -1488,14 +1492,15 @@ bio->bi_bdev = conf->mirrors[d].rdev->bdev; count++; } - spin_unlock_irq(&conf->device_lock); + if (count < 2) { for (i=0; icopies; i++) { int d = r10_bio->devs[i].devnum; if (r10_bio->devs[i].bio->bi_end_io) - atomic_dec(&conf->mirrors[d].rdev->nr_pending); + rdev_dec_pending(conf->mirrors[d].rdev, mddev); } put_buf(r10_bio); + biolist = NULL; goto giveup; } } @@ -1557,7 +1562,7 @@ } } - return nr_sectors; + return sectors_skipped + nr_sectors; giveup: /* There is nowhere to write, so all non-sync * drives must be failed, so try the next chunk... diff -Nru a/drivers/md/raid5.c b/drivers/md/raid5.c --- a/drivers/md/raid5.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/md/raid5.c 2004-11-10 17:19:03 -08:00 @@ -1247,13 +1247,13 @@ else bi->bi_end_io = raid5_end_read_request; - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); rdev = conf->disks[i].rdev; if (rdev && rdev->faulty) rdev = NULL; if (rdev) atomic_inc(&rdev->nr_pending); - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); if (rdev) { if (test_bit(R5_Syncio, &sh->dev[i].flags)) @@ -1302,25 +1302,24 @@ { raid5_conf_t *conf = mddev_to_conf(mddev); int i; - unsigned long flags; - spin_lock_irqsave(&conf->device_lock, flags); + rcu_read_lock(); for (i=0; iraid_disks; i++) { mdk_rdev_t *rdev = conf->disks[i].rdev; - if (rdev && atomic_read(&rdev->nr_pending)) { + if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { request_queue_t *r_queue = bdev_get_queue(rdev->bdev); atomic_inc(&rdev->nr_pending); - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); - if (r_queue && r_queue->unplug_fn) + if (r_queue->unplug_fn) r_queue->unplug_fn(r_queue); - spin_lock_irqsave(&conf->device_lock, flags); - atomic_dec(&rdev->nr_pending); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); } static void raid5_unplug_device(request_queue_t *q) @@ -1347,29 +1346,26 @@ raid5_conf_t *conf = mddev_to_conf(mddev); int i, ret = 0; - for (i=0; iraid_disks; i++) { + rcu_read_lock(); + for (i=0; iraid_disks && ret == 0; i++) { mdk_rdev_t *rdev = conf->disks[i].rdev; if (rdev && !rdev->faulty) { struct block_device *bdev = rdev->bdev; - request_queue_t *r_queue; + request_queue_t *r_queue = bdev_get_queue(bdev); - if (!bdev) - continue; - - r_queue = bdev_get_queue(bdev); - if (!r_queue) - continue; - - if (!r_queue->issue_flush_fn) { + if (!r_queue->issue_flush_fn) ret = -EOPNOTSUPP; - break; + else { + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, + error_sector); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } - - ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; } } + rcu_read_unlock(); return ret; } @@ -1799,7 +1795,6 @@ raid5_conf_t *conf = mddev->private; struct disk_info *tmp; - spin_lock_irq(&conf->device_lock); for (i = 0; i < conf->raid_disks; i++) { tmp = conf->disks + i; if (tmp->rdev @@ -1811,7 +1806,6 @@ tmp->rdev->in_sync = 1; } } - spin_unlock_irq(&conf->device_lock); print_raid5_conf(conf); return 0; } @@ -1819,25 +1813,28 @@ static int raid5_remove_disk(mddev_t *mddev, int number) { raid5_conf_t *conf = mddev->private; - int err = 1; + int err = 0; + mdk_rdev_t *rdev; struct disk_info *p = conf->disks + number; print_raid5_conf(conf); - spin_lock_irq(&conf->device_lock); - - if (p->rdev) { - if (p->rdev->in_sync || - atomic_read(&p->rdev->nr_pending)) { + rdev = p->rdev; + if (rdev) { + if (rdev->in_sync || + atomic_read(&rdev->nr_pending)) { err = -EBUSY; goto abort; } p->rdev = NULL; - err = 0; + synchronize_kernel(); + if (atomic_read(&rdev->nr_pending)) { + /* lost the race, try later */ + err = -EBUSY; + p->rdev = rdev; + } } - if (err) - MD_BUG(); abort: - spin_unlock_irq(&conf->device_lock); + print_raid5_conf(conf); return err; } @@ -1849,19 +1846,17 @@ int disk; struct disk_info *p; - spin_lock_irq(&conf->device_lock); /* * find the disk ... */ for (disk=0; disk < mddev->raid_disks; disk++) if ((p=conf->disks + disk)->rdev == NULL) { - p->rdev = rdev; rdev->in_sync = 0; rdev->raid_disk = disk; found = 1; + p->rdev = rdev; break; } - spin_unlock_irq(&conf->device_lock); print_raid5_conf(conf); return found; } diff -Nru a/drivers/md/raid6main.c b/drivers/md/raid6main.c --- a/drivers/md/raid6main.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/md/raid6main.c 2004-11-10 17:19:02 -08:00 @@ -1409,13 +1409,13 @@ else bi->bi_end_io = raid6_end_read_request; - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); rdev = conf->disks[i].rdev; if (rdev && rdev->faulty) rdev = NULL; if (rdev) atomic_inc(&rdev->nr_pending); - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); if (rdev) { if (test_bit(R5_Syncio, &sh->dev[i].flags)) @@ -1464,25 +1464,24 @@ { raid6_conf_t *conf = mddev_to_conf(mddev); int i; - unsigned long flags; - spin_lock_irqsave(&conf->device_lock, flags); + rcu_read_lock(); for (i=0; iraid_disks; i++) { mdk_rdev_t *rdev = conf->disks[i].rdev; - if (rdev && atomic_read(&rdev->nr_pending)) { + if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { request_queue_t *r_queue = bdev_get_queue(rdev->bdev); atomic_inc(&rdev->nr_pending); - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); - if (r_queue && r_queue->unplug_fn) + if (r_queue->unplug_fn) r_queue->unplug_fn(r_queue); - spin_lock_irqsave(&conf->device_lock, flags); - atomic_dec(&rdev->nr_pending); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); } static void raid6_unplug_device(request_queue_t *q) @@ -1509,29 +1508,26 @@ raid6_conf_t *conf = mddev_to_conf(mddev); int i, ret = 0; - for (i=0; iraid_disks; i++) { + rcu_read_lock(); + for (i=0; iraid_disks && ret == 0; i++) { mdk_rdev_t *rdev = conf->disks[i].rdev; if (rdev && !rdev->faulty) { struct block_device *bdev = rdev->bdev; - request_queue_t *r_queue; + request_queue_t *r_queue = bdev_get_queue(bdev); - if (!bdev) - continue; - - r_queue = bdev_get_queue(bdev); - if (!r_queue) - continue; - - if (!r_queue->issue_flush_fn) { + if (!r_queue->issue_flush_fn) ret = -EOPNOTSUPP; - break; + else { + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, + error_sector); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } - - ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; } } + rcu_read_unlock(); return ret; } @@ -1968,7 +1964,6 @@ raid6_conf_t *conf = mddev->private; struct disk_info *tmp; - spin_lock_irq(&conf->device_lock); for (i = 0; i < conf->raid_disks; i++) { tmp = conf->disks + i; if (tmp->rdev @@ -1980,7 +1975,6 @@ tmp->rdev->in_sync = 1; } } - spin_unlock_irq(&conf->device_lock); print_raid6_conf(conf); return 0; } @@ -1988,25 +1982,29 @@ static int raid6_remove_disk(mddev_t *mddev, int number) { raid6_conf_t *conf = mddev->private; - int err = 1; + int err = 0; + mdk_rdev_t *rdev; struct disk_info *p = conf->disks + number; print_raid6_conf(conf); - spin_lock_irq(&conf->device_lock); - - if (p->rdev) { - if (p->rdev->in_sync || - atomic_read(&p->rdev->nr_pending)) { + rdev = p->rdev; + if (rdev) { + if (rdev->in_sync || + atomic_read(&rdev->nr_pending)) { err = -EBUSY; goto abort; } p->rdev = NULL; - err = 0; + synchronize_kernel(); + if (atomic_read(&rdev->nr_pending)) { + /* lost the race, try later */ + err = -EBUSY; + p->rdev = rdev; + } } - if (err) - MD_BUG(); + abort: - spin_unlock_irq(&conf->device_lock); + print_raid6_conf(conf); return err; } @@ -2018,19 +2016,17 @@ int disk; struct disk_info *p; - spin_lock_irq(&conf->device_lock); /* * find the disk ... */ for (disk=0; disk < mddev->raid_disks; disk++) if ((p=conf->disks + disk)->rdev == NULL) { - p->rdev = rdev; rdev->in_sync = 0; rdev->raid_disk = disk; found = 1; + p->rdev = rdev; break; } - spin_unlock_irq(&conf->device_lock); print_raid6_conf(conf); return found; } diff -Nru a/drivers/media/Kconfig b/drivers/media/Kconfig --- a/drivers/media/Kconfig 2004-11-10 17:19:07 -08:00 +++ b/drivers/media/Kconfig 2004-11-10 17:19:07 -08:00 @@ -34,27 +34,15 @@ config VIDEO_TUNER tristate - default y if VIDEO_BT848=y || VIDEO_SAA7134=y || VIDEO_MXB=y || VIDEO_CX88=y - default m if VIDEO_BT848=m || VIDEO_SAA7134=m || VIDEO_MXB=m || VIDEO_CX88=m - depends on VIDEO_DEV config VIDEO_BUF tristate - default y if VIDEO_BT848=y || VIDEO_SAA7134=y || VIDEO_SAA7146=y || VIDEO_CX88=y - default m if VIDEO_BT848=m || VIDEO_SAA7134=m || VIDEO_SAA7146=m || VIDEO_CX88=m - depends on VIDEO_DEV config VIDEO_BTCX tristate - default y if VIDEO_BT848=y || VIDEO_CX88=y - default m if VIDEO_BT848=m || VIDEO_CX88=m - depends on VIDEO_DEV config VIDEO_IR tristate - default y if VIDEO_BT848=y || VIDEO_SAA7134=y - default m if VIDEO_BT848=m || VIDEO_SAA7134=m - depends on VIDEO_DEV endmenu diff -Nru a/drivers/media/common/ir-common.c b/drivers/media/common/ir-common.c --- a/drivers/media/common/ir-common.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/common/ir-common.c 2004-11-10 17:19:05 -08:00 @@ -1,4 +1,6 @@ /* + * $Id: ir-common.c,v 1.4 2004/10/13 10:39:00 kraxel Exp $ + * * some common structs and functions to handle infrared remotes via * input layer ... * @@ -100,7 +102,7 @@ [ 0x2a ] = KEY_RESERVED, // timed page/channel clck [ 0x2b ] = KEY_RESERVED, // increment (USA) [ 0x2c ] = KEY_RESERVED, // decrement (USA) - [ 0x2d ] = KEY_RESERVED, // + [ 0x2d ] = KEY_RESERVED, // [ 0x2f ] = KEY_RESERVED, // PIP shift [ 0x31 ] = KEY_RESERVED, // erase [ 0x34 ] = KEY_RESERVED, // wind @@ -141,7 +143,7 @@ int ir_type, IR_KEYTAB_TYPE *ir_codes) { int i; - + ir->ir_type = ir_type; if (ir_codes) memcpy(ir->ir_codes, ir_codes, sizeof(ir->ir_codes)); @@ -171,7 +173,7 @@ u32 ir_key, u32 ir_raw) { u32 keycode = IR_KEYCODE(ir->ir_codes, ir_key); - + if (ir->keypressed && ir->keycode != keycode) { ir->keypressed = 0; ir_input_key_event(dev,ir); diff -Nru a/drivers/media/dvb/Kconfig b/drivers/media/dvb/Kconfig --- a/drivers/media/dvb/Kconfig 2004-11-10 17:19:03 -08:00 +++ b/drivers/media/dvb/Kconfig 2004-11-10 17:19:03 -08:00 @@ -32,6 +32,7 @@ source "drivers/media/dvb/ttusb-budget/Kconfig" source "drivers/media/dvb/ttusb-dec/Kconfig" source "drivers/media/dvb/dibusb/Kconfig" +source "drivers/media/dvb/cinergyT2/Kconfig" comment "Supported FlexCopII (B2C2) Adapters" depends on DVB_CORE && PCI diff -Nru a/drivers/media/dvb/Makefile b/drivers/media/dvb/Makefile --- a/drivers/media/dvb/Makefile 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/dvb/Makefile 2004-11-10 17:19:05 -08:00 @@ -2,4 +2,4 @@ # Makefile for the kernel multimedia device drivers. # -obj-y := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/ dibusb/ +obj-y := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/ dibusb/ cinergyT2/ diff -Nru a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c --- a/drivers/media/dvb/bt8xx/bt878.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/dvb/bt8xx/bt878.c 2004-11-10 17:19:04 -08:00 @@ -511,7 +511,7 @@ printk("bt878(%d): unloading\n", bt->nr); /* turn off all capturing, DMA and IRQs */ - btand(~13, BT878_AGPIO_DMA_CTL); + btand(~0x13, BT878_AGPIO_DMA_CTL); /* first disable interrupts before unmapping the memory! */ btwrite(0, BT878_AINT_MASK); @@ -554,7 +554,7 @@ .name = "bt878", .id_table = bt878_pci_tbl, .probe = bt878_probe, - .remove = __devexit_p(bt878_remove), + .remove = bt878_remove, }; static int bt878_pci_driver_registered = 0; diff -Nru a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c 2004-11-10 17:19:03 -08:00 @@ -68,20 +68,21 @@ { struct dvb_demux *dvbdmx = dvbdmxfeed->demux; struct dvb_bt8xx_card *card = dvbdmx->priv; + int rc; dprintk("dvb_bt8xx: start_feed\n"); if (!dvbdmx->dmx.frontend) return -EINVAL; - if (card->active) - return 0; - - card->active = 1; - -// bt878_start(card->bt, card->gpio_mode); - - return 0; + down(&card->lock); + card->nfeeds++; + rc = card->nfeeds; + if (card->nfeeds == 1) + bt878_start(card->bt, card->gpio_mode, + card->op_sync_orin, card->irq_err_ignore); + up(&card->lock); + return rc; } static int dvb_bt8xx_stop_feed(struct dvb_demux_feed *dvbdmxfeed) @@ -94,12 +95,11 @@ if (!dvbdmx->dmx.frontend) return -EINVAL; - if (!card->active) - return 0; - -// bt878_stop(card->bt); - - card->active = 0; + down(&card->lock); + card->nfeeds--; + if (card->nfeeds == 0) + bt878_stop(card->bt); + up(&card->lock); return 0; } @@ -207,8 +207,6 @@ tasklet_init(&card->bt->tasklet, dvb_bt8xx_task, (unsigned long) card); - bt878_start(card->bt, card->gpio_mode, card->op_sync_orin, card->irq_err_ignore); - return 0; } @@ -223,6 +221,7 @@ return -ENOMEM; memset(card, 0, sizeof(*card)); + init_MUTEX(&card->lock); card->bttv_nr = sub->core->nr; strncpy(card->card_name, sub->core->name, sizeof(sub->core->name)); card->i2c_adapter = &sub->core->i2c_adap; @@ -230,6 +229,9 @@ switch(sub->core->type) { case BTTV_PINNACLESAT: +#ifdef BTTV_DVICO_DVBT_LITE + case BTTV_DVICO_DVBT_LITE: +#endif card->gpio_mode = 0x0400C060; card->op_sync_orin = 0; card->irq_err_ignore = 0; @@ -287,7 +289,10 @@ } if (!(card->bt = dvb_bt8xx_878_match(card->bttv_nr, bttv_pci_dev))) { - printk("dvb_bt8xx: unable to determine DMA core of card %d\n", card->bttv_nr); + printk("dvb_bt8xx: unable to determine DMA core of card %d,\n", + card->bttv_nr); + printk("dvb_bt8xx: if you have the ALSA bt87x audio driver " + "installed, try removing it.\n"); kfree(card); return -EFAULT; @@ -321,7 +326,6 @@ dvb_dmx_release(&card->demux); dvb_unregister_adapter(card->dvb_adapter); - list_del(&card->list); kfree(card); return 0; diff -Nru a/drivers/media/dvb/bt8xx/dvb-bt8xx.h b/drivers/media/dvb/bt8xx/dvb-bt8xx.h --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.h 2004-11-10 17:19:07 -08:00 +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.h 2004-11-10 17:19:07 -08:00 @@ -28,8 +28,8 @@ #include "bttv.h" struct dvb_bt8xx_card { - struct list_head list; - u8 active; + struct semaphore lock; + int nfeeds; char card_name[32]; struct dvb_adapter *dvb_adapter; struct bt878 *bt; diff -Nru a/drivers/media/dvb/cinergyT2/Kconfig b/drivers/media/dvb/cinergyT2/Kconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/media/dvb/cinergyT2/Kconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,59 @@ +config DVB_CINERGYT2 + tristate "Terratec CinergyT2/qanu USB2 DVB-T receiver" + depends on DVB_CORE && USB + help + Support for "TerraTec CinergyT2" USB2.0 Highspeed DVB Receivers + + Say Y if you own such a device and want to use it. + + +config DVB_CINERGYT2_TUNING + bool "sophisticated fine-tuning for CinergyT2 cards" + depends on DVB_CINERGYT2 + help + Here you can fine-tune some parameters of the CinergyT2 driver. + + Normally you don't need to touch this, but in exotic setups you + may fine-tune your setup and adjust e.g. DMA buffer sizes for + a particular application. + + +config DVB_CINERGYT2_STREAM_URB_COUNT + int "Number of queued USB Request Blocks for Highspeed Stream Transfers" + depends on DVB_CINERGYT2_TUNING + default "32" + help + USB Request Blocks for Highspeed Stream transfers are queued in a + for the Host Controller. Usually the default value is a safe choice. + + You may increase this number if you are using this device in a + Server Environment with many high-traffic USB Highspeed devices + sharing the same USB bus. + + +config DVB_CINERGYT2_STREAM_BUF_SIZE + int "Size of URB Stream Buffers for Highspeed Transfers" + depends on DVB_CINERGYT2_TUNING + default "512" + help + Should be a multiple of native buffer size of 512 bytes. + Default value is a safe choice. + + You may increase this number if you are using this device in a + Server Environment with many high-traffic USB Highspeed devices + sharing the same USB bus. + + +config DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE + bool "Register the onboard IR Remote Control Receiver as Input Device" + depends on DVB_CINERGYT2_TUNING + default "yes" + help + Enable this option if you want to use the onboard Infrared Remote + Control Receiver as Linux-Input device. + + Right now only the keycode table for the default Remote Control + delivered with the device is supported, please see the driver + source code to find out how to add support for other controls. + + diff -Nru a/drivers/media/dvb/cinergyT2/Makefile b/drivers/media/dvb/cinergyT2/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/media/dvb/cinergyT2/Makefile 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,3 @@ +obj-$(CONFIG_DVB_CINERGYT2) += cinergyT2.o + +EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ diff -Nru a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,811 @@ +/* + * TerraTec Cinergy T²/qanu USB2 DVB-T adapter. + * + * Copyright (C) 2004 Daniel Mack and + * Holger Waechtler + * + * Protocol Spec published on http://qanu.de/specs/terratec_cinergyT2.pdf + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dmxdev.h" +#include "dvb_demux.h" +#include "dvb_net.h" + +#ifdef CONFIG_DVB_CINERGYT2_TUNING + #define STREAM_URB_COUNT (CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT) + #define STREAM_BUF_SIZE (CONFIG_DVB_CINERGYT2_STREAM_BUF_SIZE) + #ifdef CONFIG_DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE + #define ENABLE_RC (1) + #endif +#else + #define STREAM_URB_COUNT (32) + #define STREAM_BUF_SIZE (512) + #define ENABLE_RC (1) +#endif + +#define DRIVER_NAME "TerraTec/qanu USB2.0 Highspeed DVB-T Receiver" + +static int debug; +module_param_named(debug, debug, int, 0644); +MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off)."); + +#define dprintk(level, args...) \ + do { if ((debug & level)) { printk("%s: %s(): ",__stringify(KBUILD_MODNAME), __FUNCTION__); printk(args); } } while (0) + +enum cinergyt2_ep1_cmd { + CINERGYT2_EP1_PID_TABLE_RESET = 0x01, + CINERGYT2_EP1_PID_SETUP = 0x02, + CINERGYT2_EP1_CONTROL_STREAM_TRANSFER = 0x03, + CINERGYT2_EP1_SET_TUNER_PARAMETERS = 0x04, + CINERGYT2_EP1_GET_TUNER_STATUS = 0x05, + CINERGYT2_EP1_START_SCAN = 0x06, + CINERGYT2_EP1_CONTINUE_SCAN = 0x07, + CINERGYT2_EP1_GET_RC_EVENTS = 0x08, + CINERGYT2_EP1_SLEEP_MODE = 0x09 +}; + +static struct dvb_frontend_info cinergyt2_fe_info = { + .name = DRIVER_NAME, + .type = FE_OFDM, + .frequency_min = 174000000, + .frequency_max = 862000000, + .frequency_stepsize = 166667, + .notifier_delay = 0, + .caps = FE_CAN_INVERSION_AUTO | FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | + FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | + FE_CAN_FEC_AUTO | + FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO | + FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO | + FE_CAN_HIERARCHY_AUTO | FE_CAN_RECOVER | FE_CAN_MUTE_TS +}; + +struct cinergyt2 { + struct dvb_demux demux; + struct usb_device *udev; + struct semaphore sem; + struct dvb_adapter *adapter; + struct dvb_device *fedev; + struct dmxdev dmxdev; + struct dvb_net dvbnet; + + int streaming; + + void *streambuf; + dma_addr_t streambuf_dmahandle; + struct urb *stream_urb[STREAM_URB_COUNT]; + +#ifdef ENABLE_RC + struct input_dev rc_input_dev; + struct work_struct rc_query_work; + int rc_input_event; +#endif +}; + +enum { + CINERGYT2_RC_EVENT_TYPE_NONE = 0x00, + CINERGYT2_RC_EVENT_TYPE_NEC = 0x01, + CINERGYT2_RC_EVENT_TYPE_RC5 = 0x02 +}; + +struct cinergyt2_rc_event { + char type; + uint32_t value; +} __attribute__((packed)); + +static const uint32_t rc_keys [] = { + CINERGYT2_RC_EVENT_TYPE_NEC, 0xfe01eb04, KEY_POWER, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xfd02eb04, KEY_1, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xfc03eb04, KEY_2, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xfb04eb04, KEY_3, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xfa05eb04, KEY_4, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xf906eb04, KEY_5, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xf807eb04, KEY_6, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xf708eb04, KEY_7, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xf609eb04, KEY_8, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xf50aeb04, KEY_9, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xf30ceb04, KEY_0, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xf40beb04, KEY_VIDEO, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xf20deb04, KEY_REFRESH, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xf10eeb04, KEY_SELECT, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xf00feb04, KEY_EPG, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xef10eb04, KEY_UP, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xeb14eb04, KEY_DOWN, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xee11eb04, KEY_LEFT, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xec13eb04, KEY_RIGHT, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xed12eb04, KEY_OK, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xea15eb04, KEY_TEXT, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xe916eb04, KEY_INFO, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xe817eb04, KEY_RED, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xe718eb04, KEY_GREEN, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xe619eb04, KEY_YELLOW, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xe51aeb04, KEY_BLUE, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xe31ceb04, KEY_VOLUMEUP, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xe11eeb04, KEY_VOLUMEDOWN, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xe21deb04, KEY_MUTE, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xe41beb04, KEY_CHANNELUP, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xe01feb04, KEY_CHANNELDOWN, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xbf40eb04, KEY_PAUSE, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xb34ceb04, KEY_PLAY, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xa758eb04, KEY_RECORD, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xab54eb04, KEY_PREVIOUS, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xb748eb04, KEY_STOP, + CINERGYT2_RC_EVENT_TYPE_NEC, 0xa35ceb04, KEY_NEXT +}; + +static void cinergyt2_stream_irq (struct urb *urb, struct pt_regs *regs); + +static int cinergyt2_submit_stream_urb (struct cinergyt2 *cinergyt2, struct urb *urb) +{ + int err; + + usb_fill_bulk_urb(urb, + cinergyt2->udev, + usb_rcvbulkpipe(cinergyt2->udev, 0x2), + urb->transfer_buffer, + STREAM_BUF_SIZE, + cinergyt2_stream_irq, + cinergyt2); + + if ((err = usb_submit_urb(urb, GFP_ATOMIC))) + dprintk(1, "urb submission failed (err = %i)!\n", err); + + return err; +} + +static void cinergyt2_stream_irq (struct urb *urb, struct pt_regs *regs) +{ + struct cinergyt2 *cinergyt2 = urb->context; + + if (urb->actual_length > 0) + dvb_dmx_swfilter(&cinergyt2->demux, + urb->transfer_buffer, urb->actual_length); + + if (cinergyt2->streaming) + cinergyt2_submit_stream_urb(cinergyt2, urb); +} + +static void cinergyt2_free_stream_urbs (struct cinergyt2 *cinergyt2) +{ + int i; + + for (i=0; istream_urb[i]) + usb_free_urb(cinergyt2->stream_urb[i]); + + pci_free_consistent(NULL, STREAM_URB_COUNT*STREAM_BUF_SIZE, + cinergyt2->streambuf, cinergyt2->streambuf_dmahandle); +} + +static int cinergyt2_alloc_stream_urbs (struct cinergyt2 *cinergyt2) +{ + int i; + + cinergyt2->streambuf = pci_alloc_consistent(NULL, + STREAM_URB_COUNT*STREAM_BUF_SIZE, + &cinergyt2->streambuf_dmahandle); + if (!cinergyt2->streambuf) { + dprintk(1, "failed to alloc consistent stream memory area, bailing out!\n"); + return -ENOMEM; + } + + memset(cinergyt2->streambuf, 0, STREAM_URB_COUNT*STREAM_BUF_SIZE); + + for (i=0; itransfer_buffer = cinergyt2->streambuf + i * STREAM_BUF_SIZE; + urb->transfer_buffer_length = STREAM_BUF_SIZE; + + cinergyt2->stream_urb[i] = urb; + } + + return 0; +} + +static void cinergyt2_stop_stream_xfer (struct cinergyt2 *cinergyt2) +{ + int i; + + for (i=0; istream_urb[i]) + usb_unlink_urb(cinergyt2->stream_urb[i]); +} + +static int cinergyt2_start_stream_xfer (struct cinergyt2 *cinergyt2) +{ + int i, err; + + for (i=0; istream_urb[i]))) { + cinergyt2_stop_stream_xfer(cinergyt2); + dprintk(1, "failed urb submission (%i: err = %i)!\n", i, err); + return err; + } + } + + return 0; +} + +static int cinergyt2_command (struct cinergyt2 *cinergyt2, + char *send_buf, int send_buf_len, + char *rec_buf, int rec_buf_len) +{ + int ret; + int actual_len; + char dummy; + + if (down_interruptible(&cinergyt2->sem)) + return -EBUSY; + + ret = usb_bulk_msg(cinergyt2->udev, usb_sndbulkpipe(cinergyt2->udev, 1), + send_buf, send_buf_len, &actual_len, HZ); + + if (ret) + dprintk(1, "usb_bulk_msg() (send) failed, err %i\n", ret); + + if (!rec_buf) + rec_buf = &dummy; + + ret = usb_bulk_msg(cinergyt2->udev, usb_rcvbulkpipe(cinergyt2->udev, 1), + rec_buf, rec_buf_len, &actual_len, HZ); + + if (ret) + dprintk(1, "usb_bulk_msg() (read) failed, err %i\n", ret); + + up(&cinergyt2->sem); + + return ret ? ret : actual_len; +} + +static void cinergyt2_control_stream_transfer (struct cinergyt2 *cinergyt2, int enable) +{ + char buf [] = { CINERGYT2_EP1_CONTROL_STREAM_TRANSFER, enable ? 1 : 0 }; + cinergyt2_command(cinergyt2, buf, sizeof(buf), NULL, 0); +} + +static void cinergyt2_control_sleep_mode (struct cinergyt2 *cinergyt2, int sleep) +{ + char buf [] = { CINERGYT2_EP1_SLEEP_MODE, sleep ? 1 : 0 }; + cinergyt2_command(cinergyt2, buf, sizeof(buf), NULL, 0); +} + +static int cinergyt2_start_feed(struct dvb_demux_feed *dvbdmxfeed) +{ + struct dvb_demux *demux = dvbdmxfeed->demux; + struct cinergyt2 *cinergyt2 = demux->priv; + + + if (cinergyt2->streaming == 0) { + if (cinergyt2_start_stream_xfer (cinergyt2) == 0) + cinergyt2_control_stream_transfer (cinergyt2, 1); + } + + cinergyt2->streaming++; + + return 0; +} + +static int cinergyt2_stop_feed(struct dvb_demux_feed *dvbdmxfeed) +{ + struct dvb_demux *demux = dvbdmxfeed->demux; + struct cinergyt2 *cinergyt2 = demux->priv; + + if (--cinergyt2->streaming == 0) { + cinergyt2_control_stream_transfer(cinergyt2, 0); + cinergyt2_stop_stream_xfer(cinergyt2); + } + + return 0; +} + +/** + * convert linux-dvb frontend parameter set into TPS. + * See ETSI ETS-300744, section 4.6.2, table 9 for details. + * + * This function is probably reusable and may better get placed in a support + * library. + * + * We replace errornous fields by default TPS fields (the ones with value 0). + */ + +static uint16_t compute_tps (struct dvb_frontend_parameters *param) +{ + uint16_t tps = 0; + struct dvb_ofdm_parameters *op = ¶m->u.ofdm; + + switch (op->code_rate_HP) { + case FEC_2_3: + tps |= (1 << 7); + break; + case FEC_3_4: + tps |= (2 << 7); + break; + case FEC_5_6: + tps |= (3 << 7); + break; + case FEC_7_8: + tps |= (4 << 7); + break; + case FEC_1_2: + case FEC_AUTO: + default: + /* tps |= (0 << 7) */; + } + + switch (op->code_rate_LP) { + case FEC_2_3: + tps |= (1 << 4); + break; + case FEC_3_4: + tps |= (2 << 4); + break; + case FEC_5_6: + tps |= (3 << 4); + break; + case FEC_7_8: + tps |= (4 << 4); + break; + case FEC_1_2: + case FEC_AUTO: + default: + /* tps |= (0 << 4) */; + } + + switch (op->constellation) { + case QAM_16: + tps |= (1 << 13); + break; + case QAM_64: + tps |= (2 << 13); + break; + case QPSK: + default: + /* tps |= (0 << 13) */; + } + + switch (op->transmission_mode) { + case TRANSMISSION_MODE_8K: + tps |= (1 << 0); + break; + case TRANSMISSION_MODE_2K: + default: + /* tps |= (0 << 0) */; + } + + switch (op->guard_interval) { + case GUARD_INTERVAL_1_16: + tps |= (1 << 2); + break; + case GUARD_INTERVAL_1_8: + tps |= (2 << 2); + break; + case GUARD_INTERVAL_1_4: + tps |= (3 << 2); + break; + case GUARD_INTERVAL_1_32: + default: + /* tps |= (0 << 2) */; + } + + switch (op->hierarchy_information) { + case HIERARCHY_1: + tps |= (1 << 10); + break; + case HIERARCHY_2: + tps |= (2 << 10); + break; + case HIERARCHY_4: + tps |= (3 << 10); + break; + case HIERARCHY_NONE: + default: + /* tps |= (0 << 10) */; + } + + return tps; +} + +struct dvbt_set_parameters_msg { + uint8_t cmd; + uint32_t freq; + uint8_t bandwidth; + uint16_t tps; + uint8_t flags; +} __attribute__((packed)); + +struct dvbt_get_parameters_msg { + uint32_t freq; + uint8_t bandwidth; + uint16_t tps; + uint8_t flags; + uint16_t gain; + uint8_t snr; + uint32_t viterbi_error_rate; + uint32_t rs_error_rate; + uint32_t uncorrected_block_count; + uint8_t lock_bits; + uint8_t prev_lock_bits; +} __attribute__((packed)); + +static int cinergyt2_fe_open (struct inode *inode, struct file *file) +{ + struct dvb_device *dvbdev = file->private_data; + cinergyt2_control_sleep_mode((struct cinergyt2 *) dvbdev->priv, 0); + return dvb_generic_open(inode, file); +} + +static int cinergyt2_fe_release (struct inode *inode, struct file *file) +{ + struct dvb_device *dvbdev = file->private_data; + cinergyt2_control_sleep_mode((struct cinergyt2 *) dvbdev->priv, 1); + return dvb_generic_release (inode, file); +} + +static int cinergyt2_fe_ioctl (struct inode *inode, struct file *file, + unsigned int cmd, void *arg) +{ + struct dvb_device *dvbdev = file->private_data; + struct cinergyt2 *cinergyt2 = dvbdev->priv; + int ret = 0; + + switch (cmd) { + case FE_GET_INFO: + memcpy (arg, &cinergyt2_fe_info, sizeof(struct dvb_frontend_info)); + break; + + case FE_READ_STATUS: + { + struct dvbt_get_parameters_msg msg; + char cmd = CINERGYT2_EP1_GET_TUNER_STATUS; + fe_status_t *status = arg; + + *status = 0; + + cinergyt2_command(cinergyt2, &cmd, 1, (char *) &msg, sizeof(msg)); + + if (msg.lock_bits & (1 << 6)) + *status |= FE_HAS_LOCK; + if (msg.lock_bits & (1 << 5)) + *status |= FE_HAS_SYNC; + if (msg.lock_bits & (1 << 4)) + *status |= FE_HAS_CARRIER; + if (msg.lock_bits & (1 << 1)) + *status |= FE_HAS_VITERBI; + + break; + } + + case FE_READ_BER: + { + struct dvbt_get_parameters_msg msg; + char cmd = CINERGYT2_EP1_GET_TUNER_STATUS; + u32 *ber = (u32 *) arg; + + cinergyt2_command(cinergyt2, &cmd, 1, (char *) &msg, sizeof(msg)); + + *ber = le32_to_cpu(msg.viterbi_error_rate); + + break; + } + + case FE_READ_SIGNAL_STRENGTH: + { + struct dvbt_get_parameters_msg msg; + char cmd = CINERGYT2_EP1_GET_TUNER_STATUS; + u16 *signal = (u16 *) arg; + + cinergyt2_command(cinergyt2, &cmd, 1, (char *) &msg, sizeof(msg)); + + *signal = ~(le16_to_cpu(msg.gain)); + + break; + } + + case FE_READ_SNR: + { + struct dvbt_get_parameters_msg msg; + char cmd = CINERGYT2_EP1_GET_TUNER_STATUS; + u16 *snr = (u16 *) arg; + + cinergyt2_command(cinergyt2, &cmd, 1, (char *) &msg, sizeof(msg)); + + *snr = (msg.snr << 8) | msg.snr; + + break; + } + + case FE_READ_UNCORRECTED_BLOCKS: + { + struct dvbt_get_parameters_msg msg; + char cmd = CINERGYT2_EP1_GET_TUNER_STATUS; + u32 *ubc = (u32 *) arg; + + cinergyt2_command(cinergyt2, &cmd, 1, (char *) &msg, sizeof(msg)); + + *ubc = le32_to_cpu(msg.uncorrected_block_count); + + break; + } + + case FE_SET_FRONTEND: + { + struct dvb_frontend_parameters *p = (void*) arg; + struct dvb_ofdm_parameters *op = &p->u.ofdm; + struct dvbt_set_parameters_msg msg; + + msg.cmd = CINERGYT2_EP1_SET_TUNER_PARAMETERS; + msg.tps = cpu_to_le16(compute_tps(p)); + msg.freq = cpu_to_le32(p->frequency / 1000); + msg.bandwidth = 8 - op->bandwidth - BANDWIDTH_8_MHZ; + + cinergyt2_command(cinergyt2, (char *) &msg, sizeof(msg), NULL, 0); + + break; + } + + case FE_GET_FRONTEND: + /** + * trivial to implement (see struct dvbt_get_parameters_msg). + * equivalent to FE_READ ioctls, but needs + * TPS -> linux-dvb parameter set conversion. Feel free + * to implement this and send us a patch if you need this + * functionality. + */ + break; + + default: + ret = -EINVAL; + break; + } + + return ret; +} + +static +struct file_operations cinergyt2_fe_fops = { + .owner = THIS_MODULE, + .ioctl = dvb_generic_ioctl, + /** + * do we really need this? If so, let's implement it via + * schedule_delayed_work() similiar to the IR code. + */ + /*.poll = cinergyt2_fe_poll, */ + .open = cinergyt2_fe_open, + .release = cinergyt2_fe_release +}; + +static struct dvb_device cinergyt2_fe_template = { + .users = ~0, + .writers = 1, + .readers = (~0)-1, + .fops = &cinergyt2_fe_fops, + .kernel_ioctl = cinergyt2_fe_ioctl +}; + +#ifdef ENABLE_RC +static void cinergyt2_query_rc (void *data) +{ + struct cinergyt2 *cinergyt2 = (struct cinergyt2 *) data; + char buf [1] = { CINERGYT2_EP1_GET_RC_EVENTS }; + struct cinergyt2_rc_event rc_events[12]; + int n, len; + + len = cinergyt2_command(cinergyt2, buf, sizeof(buf), + (char *) rc_events, sizeof(rc_events)); + + for (n=0; len>0 && n<(len/sizeof(rc_events[0])); n++) { + int i; + + if (rc_events[n].type == CINERGYT2_RC_EVENT_TYPE_NEC && + rc_events[n].value == ~0) + { + /** + * keyrepeat bit. If we would handle this properly + * we would need to emit down events as long the + * keyrepeat goes, a up event if no further + * repeat bits occur. Would need a timer to implement + * and no other driver does this, so we simply + * emit the last key up/down sequence again. + */ + } else { + cinergyt2->rc_input_event = KEY_MAX; + for (i=0; irc_input_event = rc_keys[i+2]; + break; + } + } + } + + if (cinergyt2->rc_input_event != KEY_MAX) { + input_report_key(&cinergyt2->rc_input_dev, cinergyt2->rc_input_event, 1); + input_report_key(&cinergyt2->rc_input_dev, cinergyt2->rc_input_event, 0); + input_sync(&cinergyt2->rc_input_dev); + } + } + + schedule_delayed_work(&cinergyt2->rc_query_work, (HZ/5)); +} +#endif + +static int cinergyt2_probe (struct usb_interface *intf, const struct usb_device_id *id) +{ + struct cinergyt2 *cinergyt2; + int i, err; + + if (!(cinergyt2 = kmalloc (sizeof(struct cinergyt2), GFP_KERNEL))) { + dprintk(1, "out of memory?!?\n"); + return -ENOMEM; + } + + memset (cinergyt2, 0, sizeof (struct cinergyt2)); + usb_set_intfdata (intf, (void *) cinergyt2); + + init_MUTEX(&cinergyt2->sem); + + cinergyt2->udev = interface_to_usbdev(intf); + + if (cinergyt2_alloc_stream_urbs (cinergyt2) < 0) { + dprintk(1, "unable to allocate stream urbs\n"); + kfree(cinergyt2); + return -ENOMEM; + } + + dvb_register_adapter(&cinergyt2->adapter, DRIVER_NAME, THIS_MODULE); + + cinergyt2->demux.priv = cinergyt2; + cinergyt2->demux.filternum = 256; + cinergyt2->demux.feednum = 256; + cinergyt2->demux.start_feed = cinergyt2_start_feed; + cinergyt2->demux.stop_feed = cinergyt2_stop_feed; + cinergyt2->demux.dmx.capabilities = DMX_TS_FILTERING | + DMX_SECTION_FILTERING | + DMX_MEMORY_BASED_FILTERING; + + if ((err = dvb_dmx_init(&cinergyt2->demux)) < 0) { + dprintk(1, "dvb_dmx_init() failed (err = %d)\n", err); + goto bailout; + } + + cinergyt2->dmxdev.filternum = cinergyt2->demux.filternum; + cinergyt2->dmxdev.demux = &cinergyt2->demux.dmx; + cinergyt2->dmxdev.capabilities = 0; + + if ((err = dvb_dmxdev_init(&cinergyt2->dmxdev, cinergyt2->adapter)) < 0) { + dprintk(1, "dvb_dmxdev_init() failed (err = %d)\n", err); + goto bailout; + } + + if (dvb_net_init(cinergyt2->adapter, &cinergyt2->dvbnet, &cinergyt2->demux.dmx)) + dprintk(1, "dvb_net_init() failed!\n"); + + dvb_register_device(cinergyt2->adapter, &cinergyt2->fedev, + &cinergyt2_fe_template, cinergyt2, + DVB_DEVICE_FRONTEND); + +#ifdef ENABLE_RC + init_input_dev(&cinergyt2->rc_input_dev); + + cinergyt2->rc_input_dev.evbit[0] = BIT(EV_KEY); + cinergyt2->rc_input_dev.keycodesize = sizeof(unsigned char); + cinergyt2->rc_input_dev.keycodemax = KEY_MAX; + cinergyt2->rc_input_dev.name = DRIVER_NAME " remote control"; + cinergyt2->rc_input_dev.id.bustype = BUS_USB; + cinergyt2->rc_input_dev.id.vendor = 0x0001; + cinergyt2->rc_input_dev.id.product = 0x0001; + cinergyt2->rc_input_dev.id.version = 0x0100; + + for (i=0; irc_input_dev.keybit); + + input_register_device(&cinergyt2->rc_input_dev); + + cinergyt2->rc_input_event = KEY_MAX; + + INIT_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc, cinergyt2); + schedule_delayed_work(&cinergyt2->rc_query_work, HZ); +#endif + + return 0; + +bailout: + dvb_dmxdev_release(&cinergyt2->dmxdev); + dvb_dmx_release(&cinergyt2->demux); + dvb_unregister_adapter (cinergyt2->adapter); + cinergyt2_free_stream_urbs (cinergyt2); + kfree(cinergyt2); + return -ENOMEM; +} + +static void cinergyt2_disconnect (struct usb_interface *intf) +{ + struct cinergyt2 *cinergyt2 = usb_get_intfdata (intf); + +#ifdef ENABLE_RC + cancel_delayed_work(&cinergyt2->rc_query_work); + flush_scheduled_work(); + input_unregister_device(&cinergyt2->rc_input_dev); +#endif + + cinergyt2->demux.dmx.close(&cinergyt2->demux.dmx); + dvb_net_release(&cinergyt2->dvbnet); + dvb_dmxdev_release(&cinergyt2->dmxdev); + dvb_dmx_release(&cinergyt2->demux); + + dvb_unregister_device(cinergyt2->fedev); + dvb_unregister_adapter(cinergyt2->adapter); + + cinergyt2_free_stream_urbs(cinergyt2); + kfree(cinergyt2); +} + +static const struct usb_device_id cinergyt2_table [] __devinitdata = { + { USB_DEVICE(0x0ccd, 0x0038) }, + { 0 } +}; + +MODULE_DEVICE_TABLE(usb, cinergyt2_table); + +static struct usb_driver cinergyt2_driver = { + .owner = THIS_MODULE, + .name = "cinergyt2", + .probe = cinergyt2_probe, + .disconnect = cinergyt2_disconnect, + .id_table = cinergyt2_table +}; + +static int __init cinergyt2_init (void) +{ + int err; + + if ((err = usb_register(&cinergyt2_driver)) < 0) { + dprintk(1, "usb_register() failed! (err %i)\n", err); + return err; + } + + return 0; +} + +static void __exit cinergyt2_exit (void) +{ + usb_deregister(&cinergyt2_driver); +} + +module_init (cinergyt2_init); +module_exit (cinergyt2_exit); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Holger Waechtler, Daniel Mack"); + diff -Nru a/drivers/media/dvb/dibusb/Kconfig b/drivers/media/dvb/dibusb/Kconfig --- a/drivers/media/dvb/dibusb/Kconfig 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/dvb/dibusb/Kconfig 2004-11-10 17:19:04 -08:00 @@ -1,5 +1,5 @@ config DVB_DIBUSB - tristate "Twinhan/KWorld/Hama/Artec USB DVB-T devices" + tristate "DiBcom/Twinhan/KWorld/Hama/Artec/Compro USB DVB-T devices" depends on DVB_CORE && USB select FW_LOADER help @@ -8,11 +8,13 @@ Devices supported by this driver: - Twinhan VisionPlus VisionDTV USB-Ter (VP7041) + TwinhanDTV USB-Ter (VP7041) + TwinhanDTV Magic Box (VP7041e) KWorld V-Stream XPERT DTV - DVB-T USB Hama DVB-T USB-Box DiBcom reference device (non-public) Ultima Electronic/Artec T1 USB TVBOX + Compro Videomate DVB-U2000 - DVB-T USB The VP7041 seems to be identical to "CTS Portable" (Chinese Television System). @@ -20,7 +22,7 @@ These devices can be understood as budget ones, they "only" deliver the MPEG data. - Currently all known copies of the DiBcom reference design have the DiBcom 3000MB + Currently all known copies of the DiBcom reference design have the DiBcom 3000-MB frontend onboard. Please enable and load this one manually in order to use this device. diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb.c b/drivers/media/dvb/dibusb/dvb-dibusb.c --- a/drivers/media/dvb/dibusb/dvb-dibusb.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/media/dvb/dibusb/dvb-dibusb.c 2004-11-10 17:19:02 -08:00 @@ -20,9 +20,7 @@ * Amaury Demol (ademol@dibcom.fr) from DiBcom for providing specs and driver * sources, on which this driver (and the dib3000mb frontend) are based. * - * TODO - * - probing for i2c addresses, it is possible, that they have been changed - * by the vendor + * * * see Documentation/dvb/README.dibusb for more information */ @@ -57,7 +55,7 @@ static int debug; module_param(debug, int, 0x644); -MODULE_PARM_DESC(debug, "set debugging level (1=info,2=xfer,4=alotmore (|-able))."); +MODULE_PARM_DESC(debug, "set debugging level (1=info,2=xfer,4=alotmore,8=ts,16=err (|-able))."); #else #define dprintk_new(args...) #define debug_dump(b,l) @@ -66,31 +64,14 @@ #define deb_info(args...) dprintk_new(0x01,args) #define deb_xfer(args...) dprintk_new(0x02,args) #define deb_alot(args...) dprintk_new(0x04,args) +#define deb_ts(args...) dprintk_new(0x08,args) +#define deb_err(args...) dprintk_new(0x10,args) /* Version information */ #define DRIVER_VERSION "0.0" -#define DRIVER_DESC "DiBcom based USB Budget DVB-T device" +#define DRIVER_DESC "Driver for DiBcom based USB Budget DVB-T device" #define DRIVER_AUTHOR "Patrick Boettcher, patrick.boettcher@desy.de" -/* USB Driver stuff */ - -/* table of devices that work with this driver */ -static struct usb_device_id dibusb_table [] = { - { USB_DEVICE(USB_TWINHAN_VENDOR_ID, USB_VP7041_PRODUCT_PREFW_ID) }, - { USB_DEVICE(USB_TWINHAN_VENDOR_ID, USB_VP7041_PRODUCT_ID) }, - { USB_DEVICE(USB_IMC_NETWORKS_VENDOR_ID, USB_VP7041_PRODUCT_PREFW_ID) }, - { USB_DEVICE(USB_IMC_NETWORKS_VENDOR_ID, USB_VP7041_PRODUCT_ID) }, - { USB_DEVICE(USB_KWORLD_VENDOR_ID, USB_VSTREAM_PRODUCT_PREFW_ID) }, - { USB_DEVICE(USB_KWORLD_VENDOR_ID, USB_VSTREAM_PRODUCT_ID) }, - { USB_DEVICE(USB_DIBCOM_VENDOR_ID, USB_DIBCOM_PRODUCT_PREFW_ID) }, - { USB_DEVICE(USB_DIBCOM_VENDOR_ID, USB_DIBCOM_PRODUCT_ID) }, - { USB_DEVICE(USB_ULTIMA_ELECTRONIC_ID, USB_ULTIMA_ELEC_PROD_PREFW_ID) }, - { USB_DEVICE(USB_ULTIMA_ELECTRONIC_ID, USB_ULTIMA_ELEC_PROD_ID) }, - { } /* Terminating entry */ -}; - -MODULE_DEVICE_TABLE (usb, dibusb_table); - static int dibusb_readwrite_usb(struct usb_dibusb *dib, u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) { @@ -99,12 +80,14 @@ if (wbuf == NULL || wlen == 0) return -EINVAL; -/* if (dib->disconnecting) - return -EINVAL;*/ - if ((ret = down_interruptible(&dib->usb_sem))) return ret; + if (dib->streaming && wbuf[0] == DIBUSB_REQ_I2C_WRITE) + deb_err("BUG: writing to i2c, while TS-streaming destroys the stream. What" + " did you do ? Please enable debugging and send the syslog to the author. (%x reg: %x %x)", + wbuf[0],wbuf[2],wbuf[3]); + debug_dump(wbuf,wlen); ret = usb_bulk_msg(dib->udev,COMMAND_PIPE, @@ -189,6 +172,8 @@ (DIB3000MB_FIFO_ACTIVATE >> 8) & 0xff, (DIB3000MB_FIFO_ACTIVATE) & 0xff }; + dib->streaming = 1; + deb_ts("start streaming\n"); return dibusb_i2c_msg(dib,DIBUSB_DEMOD_I2C_ADDR_DEFAULT,b,4,NULL,0); } @@ -200,11 +185,14 @@ (DIB3000MB_FIFO_INHIBIT >> 8) & 0xff, (DIB3000MB_FIFO_INHIBIT) & 0xff }; + dib->streaming = 0; + deb_ts("stop streaming\n"); return dibusb_i2c_msg(dib,DIBUSB_DEMOD_I2C_ADDR_DEFAULT,b,4,NULL,0); } static int dibusb_set_pid(struct dibusb_pid *dpid) { + struct usb_dibusb *dib = dpid->dib; u16 pid = dpid->pid | (dpid->active ? DIB3000MB_ACTIVATE_FILTERING : 0); u8 b[4] = { (dpid->reg >> 8) & 0xff, @@ -212,25 +200,50 @@ (pid >> 8) & 0xff, (pid) & 0xff }; + int ret; + + /* firmware bug, i2c write during mpeg transfer */ + if (dib->feedcount) { + deb_info("stop streaming\n"); + ret = dibusb_stop_xfer(dib); + } + + if (dpid->active) + dib->feedcount++; + else + dib->feedcount--; - return dibusb_i2c_msg(dpid->dib,DIBUSB_DEMOD_I2C_ADDR_DEFAULT,b,4,NULL,0); + ret = dibusb_i2c_msg(dib,DIBUSB_DEMOD_I2C_ADDR_DEFAULT,b,4,NULL,0); + + if (ret == 0 && dib->feedcount) { + deb_info("start streaming\n"); + ret = dibusb_start_xfer(dib); + } + return ret; } static void dibusb_urb_complete(struct urb *urb, struct pt_regs *ptregs) { struct usb_dibusb *dib = urb->context; - if (!dib->streaming) - return; + deb_xfer("urb complete feedcount: %d, status: %d\n",dib->feedcount,urb->status); - if (urb->status == 0) { - deb_info("URB return len: %d\n",urb->actual_length); + if (dib->feedcount > 0 && urb->status == 0) { + deb_xfer("URB return len: %d\n",urb->actual_length); if (urb->actual_length % 188) - deb_info("TS Packets: %d, %d\n", urb->actual_length/188,urb->actual_length % 188); + deb_xfer("TS Packets: %d, %d\n", urb->actual_length/188,urb->actual_length % 188); + + /* Francois recommends to drop not full-filled packets, even if they may + * contain valid TS packets + */ + if (urb->actual_length == DIBUSB_TS_DEFAULT_SIZE && dib->dvb_is_ready) dvb_dmx_swfilter_packets(&dib->demux, (u8*) urb->transfer_buffer,urb->actual_length/188); - } + else + deb_ts("URB dropped because of the " + "actual_length or !dvb_is_ready (%d).\n",dib->dvb_is_ready); + } else + deb_ts("URB dropped because of feedcount or status.\n"); - if (dib->streaming) usb_submit_urb(urb,GFP_KERNEL); } @@ -240,9 +253,8 @@ // struct dvb_demux *dvbdmx = dvbdmxfeed->demux; struct usb_dibusb *dib = dvbdmxfeed->demux->priv; struct dibusb_pid *dpid; - int ret = 0; - deb_info("pid: 0x%04x, feedtype: %d\n", dvbdmxfeed->pid,dvbdmxfeed->type); + deb_ts("pid: 0x%04x, feedtype: %d\n", dvbdmxfeed->pid,dvbdmxfeed->type); if ((dpid = dibusb_get_free_pid(dib)) == NULL) { err("no free pid in list."); @@ -253,32 +265,14 @@ dibusb_set_pid(dpid); - if (0 == dib->feed_count++) { - usb_fill_bulk_urb( dib->buf_urb, dib->udev, DATA_PIPE, - dib->buffer, 8192, dibusb_urb_complete, dib); - dib->buf_urb->transfer_flags = 0; - - - if ((ret = usb_submit_urb(dib->buf_urb,GFP_KERNEL))) { - dibusb_stop_xfer(dib); - err("could not submit buffer urb."); - return ret; - } - - if ((ret = dibusb_start_xfer(dib))) - return ret; - - dib->streaming = 1; - } return 0; } static int dibusb_stop_feed(struct dvb_demux_feed *dvbdmxfeed) { - struct usb_dibusb *dib = dvbdmxfeed->demux->priv; struct dibusb_pid *dpid = (struct dibusb_pid *) dvbdmxfeed->priv; - deb_info("stopfeed pid: 0x%04x, feedtype: %d",dvbdmxfeed->pid, dvbdmxfeed->type); + deb_ts("stopfeed pid: 0x%04x, feedtype: %d\n",dvbdmxfeed->pid, dvbdmxfeed->type); if (dpid == NULL) err("channel in dmxfeed->priv was NULL"); @@ -288,11 +282,6 @@ dibusb_set_pid(dpid); } - if (--dib->feed_count == 0) { - dib->streaming = 0; - usb_unlink_urb(dib->buf_urb); - dibusb_stop_xfer(dib); - } return 0; } @@ -302,7 +291,7 @@ /* * do not use this, just a workaround for a bug, - * which will never occur :). + * which will hopefully never occur :). */ static int dibusb_interrupt_read_loop(struct usb_dibusb *dib) { @@ -312,7 +301,8 @@ /* * TODO: a tasklet should run with a delay of 1/10 second - * and fill an appropriate event device ? + * and feed an appropriate event device ? + * NEC protocol is used for remote controlls */ static int dibusb_read_remote_control(struct usb_dibusb *dib) { @@ -321,6 +311,18 @@ if ((ret = dibusb_readwrite_usb(dib,b,1,rb,5))) return ret; + + + switch (rb[0]) { + case DIBUSB_RC_NEC_KEY_PRESSED: + + break; + case DIBUSB_RC_NEC_EMPTY: + case DIBUSB_RC_NEC_KEY_REPEATED: + default: + break; + } + return 0; } @@ -474,11 +476,13 @@ err: return ret; success: + dib->dvb_is_ready = 1; return 0; } static int dibusb_dvb_exit(struct usb_dibusb *dib) { + dib->dvb_is_ready = 0; deb_info("unregistering DVB part\n"); dvb_net_release(&dib->dvb_net); dib->demux.dmx.close(&dib->demux.dmx); @@ -492,8 +496,16 @@ static int dibusb_exit(struct usb_dibusb *dib) { - usb_free_urb(dib->buf_urb); - pci_free_consistent(NULL,8192,dib->buffer,dib->dma_handle); + int i; + for (i = 0; i < DIBUSB_TS_NUM_URBS; i++) + if (dib->buf_urb[i] != NULL) { + deb_info("killing URB no. %d.\n",i); + usb_kill_urb(dib->buf_urb[i]); // TODO kernel version ifdef for unlink_urb + + deb_info("freeing URB no. %d.\n",i); + usb_free_urb(dib->buf_urb[i]); + } + pci_free_consistent(NULL,DIBUSB_TS_BUFFER_SIZE,dib->buffer,dib->dma_handle); return 0; } @@ -513,12 +525,28 @@ /* dibusb_reset_cpu(dib); */ - dib->buffer = pci_alloc_consistent(NULL,8192, &dib->dma_handle); - memset(dib->buffer,0,8192); - if (!(dib->buf_urb = usb_alloc_urb(0,GFP_KERNEL))) { + if ((dib->buffer = pci_alloc_consistent(NULL,DIBUSB_TS_BUFFER_SIZE, &dib->dma_handle)) == NULL) { + return -ENOMEM; + } + memset(dib->buffer,0,DIBUSB_TS_BUFFER_SIZE); + for (i = 0; i < DIBUSB_TS_NUM_URBS; i++) { + if (!(dib->buf_urb[i] = usb_alloc_urb(0,GFP_KERNEL))) { dibusb_exit(dib); return -ENOMEM; } + deb_info("submitting URB no. %d\n",i); + + usb_fill_bulk_urb( dib->buf_urb[i], dib->udev, DATA_PIPE, + &dib->buffer[i*DIBUSB_TS_URB_BUFFER_SIZE], DIBUSB_TS_URB_BUFFER_SIZE, + dibusb_urb_complete, dib); + dib->buf_urb[i]->transfer_flags = 0; + + if ((ret = usb_submit_urb(dib->buf_urb[i],GFP_KERNEL))) { + err("could not submit buffer urb no. %d\n",i); + dibusb_exit(dib); + return ret; + } + } for (i=0; i < DIBUSB_MAX_PIDS; i++) { dib->pid_list[i].reg = i+DIB3000MB_REG_FIRST_PID; @@ -527,8 +555,9 @@ dib->pid_list[i].dib = dib; } + dib->feedcount = 0; dib->streaming = 0; - dib->feed_count = 0; + dib->dvb_is_ready = 0; if ((ret = dibusb_dvb_init(dib))) { dibusb_exit(dib); @@ -591,19 +620,23 @@ if (ret != b[0]) { err("error while transferring firmware " "(transferred size: %d, block size: %d)", - ret,b[1]); + ret,b[0]); ret = -EINVAL; break; } i += 5 + b[0]; } + /* length in ret */ + if (ret > 0) + ret = 0; /* restart the CPU */ reset = 0; - if ((ret = dibusb_writemem(udev,DIBUSB_CPU_CSREG,&reset,1)) != 1) + if (ret || dibusb_writemem(udev,DIBUSB_CPU_CSREG,&reset,1) != 1) { err("could not restart the USB controller CPU."); + ret = -EINVAL; + } kfree(p); - ret = 0; } else { ret = -ENOMEM; } diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb.h b/drivers/media/dvb/dibusb/dvb-dibusb.h --- a/drivers/media/dvb/dibusb/dvb-dibusb.h 2004-11-10 17:19:03 -08:00 +++ b/drivers/media/dvb/dibusb/dvb-dibusb.h 2004-11-10 17:19:03 -08:00 @@ -7,6 +7,7 @@ * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, version 2. * + * * * for more information see dvb-dibusb.c . */ @@ -14,24 +15,102 @@ #ifndef __DVB_DIBUSB_H__ #define __DVB_DIBUSB_H__ +#define DIBUSB_DEMOD_I2C_ADDR_DEFAULT 0x10 + /* Vendor IDs */ -#define USB_TWINHAN_VENDOR_ID 0x1822 -#define USB_IMC_NETWORKS_VENDOR_ID 0x13d3 -#define USB_KWORLD_VENDOR_ID 0xeb1a -#define USB_DIBCOM_VENDOR_ID 0x10b8 -#define USB_ULTIMA_ELECTRONIC_ID 0x05d8 +#define USB_VID_TWINHAN_ID 0x1822 +#define USB_VID_IMC_NETWORKS_ID 0x13d3 +#define USB_VID_EMPIA_ID 0xeb1a +#define USB_VID_DIBCOM_ID 0x10b8 +#define USB_VID_ULTIMA_ELECTRONIC_ID 0x05d8 +#define USB_VID_COMPRO_ID 0x185b +#define USB_VID_HYPER_PALTEK 0x1025 /* Product IDs before loading the firmware */ -#define USB_VP7041_PRODUCT_PREFW_ID 0x3201 -#define USB_VSTREAM_PRODUCT_PREFW_ID 0x17de -#define USB_DIBCOM_PRODUCT_PREFW_ID 0x0bb8 -#define USB_ULTIMA_ELEC_PROD_PREFW_ID 0x8105 +#define USB_PID_TWINHAN_VP7041_COLD_ID 0x3201 +#define USB_PID_KWORLD_VSTREAM_COLD_ID 0x17de +#define USB_PID_DIBCOM_MOD3000_COLD_ID 0x0bb8 +#define USB_PID_ULTIMA_TVBOX_COLD_ID 0x8105 +#define USB_PID_COMPRO_DVBU2000_COLD_ID 0xd000 +#define USB_PID_UNK_HYPER_PALTEK_COLD_ID 0x005e /* product ID afterwards */ -#define USB_VP7041_PRODUCT_ID 0x3202 -#define USB_VSTREAM_PRODUCT_ID 0x17df -#define USB_DIBCOM_PRODUCT_ID 0x0bb9 -#define USB_ULTIMA_ELEC_PROD_ID 0x8106 +#define USB_PID_TWINHAN_VP7041_WARM_ID 0x3202 +#define USB_PID_KWORLD_VSTREAM_WARM_ID 0x17df +#define USB_PID_DIBCOM_MOD3000_WARM_ID 0x0bb9 +#define USB_PID_ULTIMA_TVBOX_WARM_ID 0x8106 +#define USB_PID_COMPRO_DVBU2000_WARM_ID 0xd001 +#define USB_PID_UNK_HYPER_PALTEK_WARM_ID 0x005f + +/* static array of valid firmware names, the best one first */ +static const char * valid_firmware_filenames[] = { + "dvb-dibusb-5.0.0.11.fw", +}; + +struct dibusb_device { + u16 cold_product_id; + u16 warm_product_id; + u8 demod_addr; + const char *name; +}; + +#define DIBUSB_SUPPORTED_DEVICES 6 + +/* USB Driver stuff */ +static struct dibusb_device dibusb_devices[DIBUSB_SUPPORTED_DEVICES] = { + { .cold_product_id = USB_PID_TWINHAN_VP7041_COLD_ID, + .warm_product_id = USB_PID_TWINHAN_VP7041_WARM_ID, + .name = "TwinhanDTV USB-Ter/Magic Box / HAMA USB DVB-T device", + .demod_addr = DIBUSB_DEMOD_I2C_ADDR_DEFAULT, + }, + { .cold_product_id = USB_PID_KWORLD_VSTREAM_COLD_ID, + .warm_product_id = USB_PID_KWORLD_VSTREAM_WARM_ID, + .name = "KWorld V-Stream XPERT DTV - DVB-T USB", + .demod_addr = DIBUSB_DEMOD_I2C_ADDR_DEFAULT, + }, + { .cold_product_id = USB_PID_DIBCOM_MOD3000_COLD_ID, + .warm_product_id = USB_PID_DIBCOM_MOD3000_WARM_ID, + .name = "DiBcom USB DVB-T reference design (MOD300)", + .demod_addr = DIBUSB_DEMOD_I2C_ADDR_DEFAULT, + }, + { .cold_product_id = USB_PID_ULTIMA_TVBOX_COLD_ID, + .warm_product_id = USB_PID_ULTIMA_TVBOX_WARM_ID, + .name = "Ultima Electronic/Artec T1 USB TVBOX", + .demod_addr = DIBUSB_DEMOD_I2C_ADDR_DEFAULT, + }, + { .cold_product_id = USB_PID_COMPRO_DVBU2000_COLD_ID, + .warm_product_id = USB_PID_COMPRO_DVBU2000_WARM_ID, + .name = "Compro Videomate DVB-U2000 - DVB-T USB", + .demod_addr = DIBUSB_DEMOD_I2C_ADDR_DEFAULT, + }, + { .cold_product_id = USB_PID_UNK_HYPER_PALTEK_COLD_ID, + .warm_product_id = USB_PID_UNK_HYPER_PALTEK_WARM_ID, + .name = "Unkown USB DVB-T device ???? please report the name to linux-dvb or to the author", + .demod_addr = DIBUSB_DEMOD_I2C_ADDR_DEFAULT, + } +}; + +/* USB Driver stuff */ +/* table of devices that work with this driver */ +static struct usb_device_id dibusb_table [] = { + { USB_DEVICE(USB_VID_TWINHAN_ID, USB_PID_TWINHAN_VP7041_COLD_ID) }, + { USB_DEVICE(USB_VID_TWINHAN_ID, USB_PID_TWINHAN_VP7041_WARM_ID) }, + { USB_DEVICE(USB_VID_IMC_NETWORKS_ID,USB_PID_TWINHAN_VP7041_COLD_ID) }, + { USB_DEVICE(USB_VID_IMC_NETWORKS_ID,USB_PID_TWINHAN_VP7041_WARM_ID) }, + { USB_DEVICE(USB_VID_EMPIA_ID, USB_PID_KWORLD_VSTREAM_COLD_ID) }, + { USB_DEVICE(USB_VID_EMPIA_ID, USB_PID_KWORLD_VSTREAM_WARM_ID) }, + { USB_DEVICE(USB_VID_DIBCOM_ID, USB_PID_DIBCOM_MOD3000_COLD_ID) }, + { USB_DEVICE(USB_VID_DIBCOM_ID, USB_PID_DIBCOM_MOD3000_WARM_ID) }, + { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC_ID, USB_PID_ULTIMA_TVBOX_COLD_ID) }, + { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC_ID, USB_PID_ULTIMA_TVBOX_WARM_ID) }, + { USB_DEVICE(USB_VID_COMPRO_ID, USB_PID_COMPRO_DVBU2000_COLD_ID) }, + { USB_DEVICE(USB_VID_COMPRO_ID, USB_PID_COMPRO_DVBU2000_WARM_ID) }, + { USB_DEVICE(USB_VID_HYPER_PALTEK, USB_PID_UNK_HYPER_PALTEK_COLD_ID) }, + { USB_DEVICE(USB_VID_HYPER_PALTEK, USB_PID_UNK_HYPER_PALTEK_WARM_ID) }, + { } /* Terminating entry */ +}; + +MODULE_DEVICE_TABLE (usb, dibusb_table); /* CS register start/stop the usb controller cpu */ #define DIBUSB_CPU_CSREG 0x7F92 @@ -53,15 +132,20 @@ struct usb_dibusb *dib; }; +#define DIBUSB_TS_NUM_URBS 3 +#define DIBUSB_TS_URB_BUFFER_SIZE 4096 +#define DIBUSB_TS_BUFFER_SIZE (DIBUSB_TS_NUM_URBS * DIBUSB_TS_URB_BUFFER_SIZE) +#define DIBUSB_TS_DEFAULT_SIZE (188*21) + struct usb_dibusb { /* usb */ struct usb_device * udev; struct dibusb_device * dibdev; + int feedcount; int streaming; - int feed_count; - struct urb *buf_urb; + struct urb * buf_urb[DIBUSB_TS_NUM_URBS]; u8 *buffer; dma_addr_t dma_handle; @@ -77,52 +161,13 @@ struct semaphore i2c_sem; /* dvb */ + int dvb_is_ready; struct dvb_adapter *adapter; struct dmxdev dmxdev; struct dvb_demux demux; struct dvb_net dvb_net; }; - -struct dibusb_device { - u16 cold_product_id; - u16 warm_product_id; - u8 demod_addr; - const char *name; -}; - -/* static array of valid firmware names, the best one first */ -static const char * valid_firmware_filenames[] = { - "dvb-dibusb-5.0.0.11.fw", -}; - -#define DIBUSB_SUPPORTED_DEVICES 4 - -/* USB Driver stuff */ -static struct dibusb_device dibusb_devices[DIBUSB_SUPPORTED_DEVICES] = { - { .cold_product_id = USB_VP7041_PRODUCT_PREFW_ID, - .warm_product_id = USB_VP7041_PRODUCT_ID, - .name = "Twinhan VisionDTV USB-Ter/HAMA USB DVB-T device", - .demod_addr = DIBUSB_DEMOD_I2C_ADDR_DEFAULT, - }, - { .cold_product_id = USB_VSTREAM_PRODUCT_PREFW_ID, - .warm_product_id = USB_VSTREAM_PRODUCT_ID, - .name = "KWorld V-Stream XPERT DTV - DVB-T USB", - .demod_addr = DIBUSB_DEMOD_I2C_ADDR_DEFAULT, - }, - { .cold_product_id = USB_DIBCOM_PRODUCT_PREFW_ID, - .warm_product_id = USB_DIBCOM_PRODUCT_ID, - .name = "DiBcom USB reference design", - .demod_addr = DIBUSB_DEMOD_I2C_ADDR_DEFAULT, - }, - { - .cold_product_id = USB_ULTIMA_ELEC_PROD_PREFW_ID, - .warm_product_id = USB_ULTIMA_ELEC_PROD_ID, - .name = "Ultima Electronic/Artec T1 USB TVBOX", - .demod_addr = DIBUSB_DEMOD_I2C_ADDR_DEFAULT, - }, -}; - #define COMMAND_PIPE usb_sndbulkpipe(dib->udev, 0x01) #define RESULT_PIPE usb_rcvbulkpipe(dib->udev, 0x81) #define DATA_PIPE usb_rcvbulkpipe(dib->udev, 0x82) @@ -141,6 +186,10 @@ /* prefix for reading the current RC key */ #define DIBUSB_REQ_POLL_REMOTE 0x04 + +#define DIBUSB_RC_NEC_EMPTY 0x00 +#define DIBUSB_RC_NEC_KEY_PRESSED 0x01 +#define DIBUSB_RC_NEC_KEY_REPEATED 0x02 /* 0x05 0xXX */ #define DIBUSB_REQ_SET_STREAMING_MODE 0x05 diff -Nru a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c --- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c 2004-11-10 17:19:03 -08:00 @@ -1500,6 +1500,7 @@ }; static struct dvb_device dvbdev_ca = { + .priv = NULL, .users = 1, .readers= 1, .writers= 1, diff -Nru a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c --- a/drivers/media/dvb/dvb-core/dvb_net.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/media/dvb/dvb-core/dvb_net.c 2004-11-10 17:19:03 -08:00 @@ -37,10 +37,18 @@ #include #include #include +#include #include "dvb_demux.h" #include "dvb_net.h" +static int dvb_net_debug; +module_param(dvb_net_debug, int, 0444); +MODULE_PARM_DESC(dvb_net_debug, "enable debug messages"); + +#define dprintk(x...) do { if (dvb_net_debug) printk(x); } while (0) + + static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt ) { unsigned int j; @@ -50,13 +58,6 @@ } -#if 1 -#define dprintk(x...) printk(x) -#else -#define dprintk(x...) -#endif - - #define DVB_NET_MULTICAST_MAX 10 #define isprint(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) @@ -917,14 +918,6 @@ } -static int dvb_net_set_config(struct net_device *dev, struct ifmap *map) -{ - if (netif_running(dev)) - return -EBUSY; - return 0; -} - - static void wq_restart_net_feed (void *data) { struct net_device *dev = data; @@ -983,7 +976,6 @@ dev->hard_start_xmit = dvb_net_tx; dev->get_stats = dvb_net_get_stats; dev->set_multicast_list = dvb_net_set_multicast_list; - dev->set_config = dvb_net_set_config; dev->set_mac_address = dvb_net_set_mac; dev->mtu = 4096; dev->mc_count = 0; diff -Nru a/drivers/media/dvb/frontends/dib3000mb.c b/drivers/media/dvb/frontends/dib3000mb.c --- a/drivers/media/dvb/frontends/dib3000mb.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/media/dvb/frontends/dib3000mb.c 2004-11-10 17:19:03 -08:00 @@ -17,6 +17,8 @@ * Amaury Demol (ademol@dibcom.fr) from DiBcom for providing specs and driver * sources, on which this driver (and the dvb-dibusb) are based. * + * + * * see Documentation/dvb/README.dibusb for more information * */ @@ -36,19 +38,21 @@ /* debug */ #ifdef CONFIG_DVB_DIBCOM_DEBUG -#define dprintk_new(level,args...) \ +#define dprintk(level,args...) \ do { if ((debug & level)) { printk(args); } } while (0) static int debug; module_param(debug, int, 0x644); -MODULE_PARM_DESC(debug, "set debugging level (1=info,2=xfer,4=alotmore (|-able))."); +MODULE_PARM_DESC(debug, "set debugging level (1=info,2=xfer,4=alotmore,8=setfe,16=getfe (|-able))."); #else -#define dprintk_new(args...) +#define dprintk(args...) do { } while (0); #endif -#define deb_info(args...) dprintk_new(0x01,args) -#define deb_xfer(args...) dprintk_new(0x02,args) -#define deb_alot(args...) dprintk_new(0x04,args) +#define deb_info(args...) dprintk(0x01,args) +#define deb_xfer(args...) dprintk(0x02,args) +#define deb_alot(args...) dprintk(0x04,args) +#define deb_setf(args...) dprintk(0x08,args) +#define deb_getf(args...) dprintk(0x10,args) /* Version information */ #define DRIVER_VERSION "0.1" @@ -63,7 +67,7 @@ }; static struct dvb_frontend_info dib3000mb_info = { - .name = "DiBcom 3000-MB DVB-T frontend", + .name = "DiBcom 3000-MB DVB-T", .type = FE_OFDM, .frequency_min = 44250000, .frequency_max = 867250000, @@ -72,8 +76,8 @@ FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO | - FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO | + FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_HIERARCHY_AUTO, }; @@ -149,7 +153,7 @@ u32 dds_val, threshold = 0x800000; if (!rd(DIB3000MB_REG_TPS_LOCK)) - return -EINVAL; + return 0; dds_val = ((rd(DIB3000MB_REG_DDS_VALUE_MSB) & 0xff) << 16) + rd(DIB3000MB_REG_DDS_VALUE_LSB); if (dds_val & threshold) @@ -172,56 +176,56 @@ || ((inv_test2 == 0) && (inv_test1==1 || inv_test1==2)); - deb_info("inversion %d %d, %d\n",inv_test2,inv_test1, fep->inversion); + deb_getf("inversion %d %d, %d\n",inv_test2,inv_test1, fep->inversion); switch ((tps_val = rd(DIB3000MB_REG_TPS_QAM))) { case DIB3000MB_QAM_QPSK: - deb_info("QPSK "); + deb_getf("QPSK "); ofdm->constellation = QPSK; break; case DIB3000MB_QAM_QAM16: - deb_info("QAM16 "); + deb_getf("QAM16 "); ofdm->constellation = QAM_16; break; case DIB3000MB_QAM_QAM64: - deb_info("QAM64 "); + deb_getf("QAM64 "); ofdm->constellation = QAM_64; break; default: err("Unexpected constellation returned by TPS (%d)",tps_val); break; } - deb_info("TPS: %d\n",tps_val); + deb_getf("TPS: %d\n",tps_val); if (rd(DIB3000MB_REG_TPS_HRCH)) { - deb_info("HRCH ON\n"); + deb_getf("HRCH ON\n"); tps_val = rd(DIB3000MB_REG_TPS_CODE_RATE_LP); cr = &ofdm->code_rate_LP; ofdm->code_rate_HP = FEC_NONE; switch ((tps_val = rd(DIB3000MB_REG_TPS_VIT_ALPHA))) { case DIB3000MB_VIT_ALPHA_OFF: - deb_info("HIERARCHY_NONE "); + deb_getf("HIERARCHY_NONE "); ofdm->hierarchy_information = HIERARCHY_NONE; break; case DIB3000MB_VIT_ALPHA_1: - deb_info("HIERARCHY_1 "); + deb_getf("HIERARCHY_1 "); ofdm->hierarchy_information = HIERARCHY_1; break; case DIB3000MB_VIT_ALPHA_2: - deb_info("HIERARCHY_2 "); + deb_getf("HIERARCHY_2 "); ofdm->hierarchy_information = HIERARCHY_2; break; case DIB3000MB_VIT_ALPHA_4: - deb_info("HIERARCHY_4 "); + deb_getf("HIERARCHY_4 "); ofdm->hierarchy_information = HIERARCHY_4; break; default: err("Unexpected ALPHA value returned by TPS (%d)",tps_val); } - deb_info("TPS: %d\n",tps_val); + deb_getf("TPS: %d\n",tps_val); } else { - deb_info("HRCH OFF\n"); + deb_getf("HRCH OFF\n"); tps_val = rd(DIB3000MB_REG_TPS_CODE_RATE_HP); cr = &ofdm->code_rate_HP; ofdm->code_rate_LP = FEC_NONE; @@ -230,67 +234,67 @@ switch (tps_val) { case DIB3000MB_FEC_1_2: - deb_info("FEC_1_2 "); + deb_getf("FEC_1_2 "); *cr = FEC_1_2; break; case DIB3000MB_FEC_2_3: - deb_info("FEC_2_3 "); + deb_getf("FEC_2_3 "); *cr = FEC_2_3; break; case DIB3000MB_FEC_3_4: - deb_info("FEC_3_4 "); + deb_getf("FEC_3_4 "); *cr = FEC_3_4; break; case DIB3000MB_FEC_5_6: - deb_info("FEC_5_6 "); + deb_getf("FEC_5_6 "); *cr = FEC_4_5; break; case DIB3000MB_FEC_7_8: - deb_info("FEC_7_8 "); + deb_getf("FEC_7_8 "); *cr = FEC_7_8; break; default: err("Unexpected FEC returned by TPS (%d)",tps_val); break; } - deb_info("TPS: %d\n",tps_val); + deb_getf("TPS: %d\n",tps_val); switch ((tps_val = rd(DIB3000MB_REG_TPS_GUARD_TIME))) { case DIB3000MB_GUARD_TIME_1_32: - deb_info("GUARD_INTERVAL_1_32 "); + deb_getf("GUARD_INTERVAL_1_32 "); ofdm->guard_interval = GUARD_INTERVAL_1_32; break; case DIB3000MB_GUARD_TIME_1_16: - deb_info("GUARD_INTERVAL_1_16 "); + deb_getf("GUARD_INTERVAL_1_16 "); ofdm->guard_interval = GUARD_INTERVAL_1_16; break; case DIB3000MB_GUARD_TIME_1_8: - deb_info("GUARD_INTERVAL_1_8 "); + deb_getf("GUARD_INTERVAL_1_8 "); ofdm->guard_interval = GUARD_INTERVAL_1_8; break; case DIB3000MB_GUARD_TIME_1_4: - deb_info("GUARD_INTERVAL_1_4 "); + deb_getf("GUARD_INTERVAL_1_4 "); ofdm->guard_interval = GUARD_INTERVAL_1_4; break; default: err("Unexpected Guard Time returned by TPS (%d)",tps_val); break; } - deb_info("TPS: %d\n",tps_val); + deb_getf("TPS: %d\n",tps_val); switch ((tps_val = rd(DIB3000MB_REG_TPS_FFT))) { case DIB3000MB_FFT_2K: - deb_info("TRANSMISSION_MODE_2K "); + deb_getf("TRANSMISSION_MODE_2K "); ofdm->transmission_mode = TRANSMISSION_MODE_2K; break; case DIB3000MB_FFT_8K: - deb_info("TRANSMISSION_MODE_8K "); + deb_getf("TRANSMISSION_MODE_8K "); ofdm->transmission_mode = TRANSMISSION_MODE_8K; break; default: err("unexpected transmission mode return by TPS (%d)",tps_val); } - deb_info("TPS: %d\n",tps_val); + deb_getf("TPS: %d\n",tps_val); return 0; } @@ -307,18 +311,18 @@ if (irq & 0x02) { if (rd(DIB3000MB_REG_LOCK2_VALUE) & 0x01) { if (dib3000mb_get_frontend(state,&fep) == 0) { - deb_info("reading tuning data from frontend succeeded.\n"); + deb_setf("reading tuning data from frontend succeeded.\n"); return dib3000mb_set_frontend(state,&fep,0) == 0; } else { - deb_info("reading tuning data failed -> tuning failed.\n"); + deb_setf("reading tuning data failed -> tuning failed.\n"); return 0; } } else { - deb_info("AS IRQ was pending, but LOCK2 was not & 0x01.\n"); + deb_setf("AS IRQ was pending, but LOCK2 was not & 0x01.\n"); return 0; } } else if (irq & 0x01) { - deb_info("Autosearch failed.\n"); + deb_setf("Autosearch failed.\n"); return 0; } @@ -329,7 +333,7 @@ struct dvb_frontend_parameters *fep, int tuner) { struct dvb_ofdm_parameters *ofdm = &fep->u.ofdm; - fe_code_rate_t fe_cr; + fe_code_rate_t fe_cr = FEC_NONE; int search_state,seq; if (tuner) { @@ -342,82 +346,105 @@ wr(DIB3000MB_REG_TUNER, DIB3000MB_DEACTIVATE_TUNER_XFER( DIB3000MB_TUNER_ADDR_DEFAULT ) ); + deb_setf("bandwidth: "); switch (ofdm->bandwidth) { case BANDWIDTH_8_MHZ: - case BANDWIDTH_AUTO: + deb_setf("8 MHz\n"); wr_foreach(dib3000mb_reg_timing_freq,dib3000mb_timing_freq[2]); wr_foreach(dib3000mb_reg_bandwidth,dib3000mb_bandwidth_8mhz); break; case BANDWIDTH_7_MHZ: + deb_setf("7 MHz\n"); wr_foreach(dib3000mb_reg_timing_freq,dib3000mb_timing_freq[1]); wr_foreach(dib3000mb_reg_bandwidth,dib3000mb_bandwidth_7mhz); break; case BANDWIDTH_6_MHZ: + deb_setf("6 MHz\n"); wr_foreach(dib3000mb_reg_timing_freq,dib3000mb_timing_freq[0]); wr_foreach(dib3000mb_reg_bandwidth,dib3000mb_bandwidth_6mhz); break; + case BANDWIDTH_AUTO: + return -EOPNOTSUPP; default: err("unkown bandwidth value."); return -EINVAL; - break; } } wr(DIB3000MB_REG_LOCK1_MASK,DIB3000MB_LOCK1_SEARCH_4); + deb_setf("transmission mode: "); switch (ofdm->transmission_mode) { case TRANSMISSION_MODE_2K: + deb_setf("2k\n"); wr(DIB3000MB_REG_FFT,DIB3000MB_FFT_2K); break; case TRANSMISSION_MODE_8K: + deb_setf("8k\n"); wr(DIB3000MB_REG_FFT,DIB3000MB_FFT_8K); break; case TRANSMISSION_MODE_AUTO: + deb_setf("auto\n"); wr(DIB3000MB_REG_FFT,DIB3000MB_FFT_AUTO); break; default: return -EINVAL; } + deb_setf("guard: "); switch (ofdm->guard_interval) { case GUARD_INTERVAL_1_32: + deb_setf("1_32\n"); wr(DIB3000MB_REG_GUARD_TIME,DIB3000MB_GUARD_TIME_1_32); break; case GUARD_INTERVAL_1_16: + deb_setf("1_16\n"); wr(DIB3000MB_REG_GUARD_TIME,DIB3000MB_GUARD_TIME_1_16); break; case GUARD_INTERVAL_1_8: + deb_setf("1_8\n"); wr(DIB3000MB_REG_GUARD_TIME,DIB3000MB_GUARD_TIME_1_8); break; case GUARD_INTERVAL_1_4: + deb_setf("1_4\n"); wr(DIB3000MB_REG_GUARD_TIME,DIB3000MB_GUARD_TIME_1_4); break; case GUARD_INTERVAL_AUTO: + deb_setf("auto\n"); wr(DIB3000MB_REG_GUARD_TIME,DIB3000MB_GUARD_TIME_AUTO); break; default: return -EINVAL; } + deb_setf("invsersion: "); switch (fep->inversion) { + case INVERSION_AUTO: + deb_setf("auto\n"); + break; case INVERSION_OFF: + deb_setf("on\n"); wr(DIB3000MB_REG_DDS_INV,DIB3000MB_DDS_INV_OFF); break; - case INVERSION_AUTO: case INVERSION_ON: + deb_setf("on\n"); wr(DIB3000MB_REG_DDS_INV,DIB3000MB_DDS_INV_ON); break; default: return -EINVAL; } + deb_setf("constellation: "); switch (ofdm->constellation) { case QPSK: + deb_setf("qpsk\n"); wr(DIB3000MB_REG_QAM,DIB3000MB_QAM_QPSK); break; case QAM_16: + deb_setf("qam16\n"); wr(DIB3000MB_REG_QAM,DIB3000MB_QAM_QAM16); break; case QAM_64: + deb_setf("qam64\n"); wr(DIB3000MB_REG_QAM,DIB3000MB_QAM_QAM64); break; case QAM_AUTO: @@ -425,53 +452,69 @@ default: return -EINVAL; } - + deb_setf("hierachy: "); switch (ofdm->hierarchy_information) { case HIERARCHY_NONE: + deb_setf("none "); + /* fall through alpha is 1, even when HIERARCHY is NONE */ case HIERARCHY_1: + deb_setf("alpha=1\n"); wr(DIB3000MB_REG_VIT_ALPHA,DIB3000MB_VIT_ALPHA_1); break; case HIERARCHY_2: + deb_setf("alpha=2\n"); wr(DIB3000MB_REG_VIT_ALPHA,DIB3000MB_VIT_ALPHA_2); break; case HIERARCHY_4: + deb_setf("alpha=4\n"); wr(DIB3000MB_REG_VIT_ALPHA,DIB3000MB_VIT_ALPHA_4); break; case HIERARCHY_AUTO: + deb_setf("alpha=auto\n"); wr(DIB3000MB_REG_VIT_ALPHA,DIB3000MB_VIT_ALPHA_AUTO); break; default: return -EINVAL; } + deb_setf("hierarchy: "); if (ofdm->hierarchy_information == HIERARCHY_NONE) { + deb_setf("none\n"); wr(DIB3000MB_REG_VIT_HRCH,DIB3000MB_VIT_HRCH_OFF); wr(DIB3000MB_REG_VIT_HP,DIB3000MB_VIT_HP); fe_cr = ofdm->code_rate_HP; - } else { + } else if (ofdm->hierarchy_information != HIERARCHY_AUTO) { + deb_setf("on\n"); wr(DIB3000MB_REG_VIT_HRCH,DIB3000MB_VIT_HRCH_ON); wr(DIB3000MB_REG_VIT_HP,DIB3000MB_VIT_LP); fe_cr = ofdm->code_rate_LP; } - + deb_setf("fec: "); switch (fe_cr) { case FEC_1_2: + deb_setf("1_2\n"); wr(DIB3000MB_REG_VIT_CODE_RATE,DIB3000MB_FEC_1_2); break; case FEC_2_3: + deb_setf("2_3\n"); wr(DIB3000MB_REG_VIT_CODE_RATE,DIB3000MB_FEC_2_3); break; case FEC_3_4: + deb_setf("3_4\n"); wr(DIB3000MB_REG_VIT_CODE_RATE,DIB3000MB_FEC_3_4); break; case FEC_5_6: + deb_setf("5_6\n"); wr(DIB3000MB_REG_VIT_CODE_RATE,DIB3000MB_FEC_5_6); break; case FEC_7_8: + deb_setf("7_8\n"); wr(DIB3000MB_REG_VIT_CODE_RATE,DIB3000MB_FEC_7_8); break; case FEC_NONE: + deb_setf("none "); case FEC_AUTO: + deb_setf("auto\n"); break; default: return -EINVAL; @@ -482,7 +525,7 @@ [ofdm->guard_interval == GUARD_INTERVAL_AUTO] [fep->inversion == INVERSION_AUTO]; - deb_info("seq? %d\n",seq); + deb_setf("seq? %d\n",seq); wr(DIB3000MB_REG_SEQ,seq); @@ -522,7 +565,7 @@ fe_cr == FEC_AUTO || fep->inversion == INVERSION_AUTO) { - deb_info("autosearch enabled.\n"); + deb_setf("autosearch enabled.\n"); wr(DIB3000MB_REG_ISI,DIB3000MB_ISI_INHIBIT); @@ -530,7 +573,7 @@ wr(DIB3000MB_REG_RESTART,DIB3000MB_RESTART_OFF); while ((search_state = dib3000mb_fe_read_search_status(state)) < 0); - + deb_info("search_state after autosearch %d\n",search_state); return search_state ? 0 : -EINVAL; } else { wr(DIB3000MB_REG_RESTART,DIB3000MB_RESTART_CTRL); @@ -622,14 +665,25 @@ static int dib3000mb_read_status(struct dib3000mb_state *state,fe_status_t *stat) { *stat = 0; - *stat |= rd(DIB3000MB_REG_AGC_LOCK) ? FE_HAS_SIGNAL : 0; - *stat |= rd(DIB3000MB_REG_CARRIER_LOCK) ? FE_HAS_CARRIER : 0; - *stat |= rd(DIB3000MB_REG_VIT_LCK) ? FE_HAS_VITERBI : 0; - *stat |= rd(DIB3000MB_REG_TS_SYNC_LOCK) ? FE_HAS_SYNC : 0; - *stat |= *stat ? FE_HAS_LOCK : 0; + + if (rd(DIB3000MB_REG_AGC_LOCK)) + *stat |= FE_HAS_SIGNAL; + if (rd(DIB3000MB_REG_CARRIER_LOCK)) + *stat |= FE_HAS_CARRIER; + if (rd(DIB3000MB_REG_VIT_LCK)) + *stat |= FE_HAS_VITERBI; + if (rd(DIB3000MB_REG_TS_SYNC_LOCK)) + *stat |= (FE_HAS_SYNC | FE_HAS_LOCK); deb_info("actual status is %2x\n",*stat); + deb_getf("tps %x %x %x %x %x\n", + rd(DIB3000MB_REG_TPS_1), + rd(DIB3000MB_REG_TPS_2), + rd(DIB3000MB_REG_TPS_3), + rd(DIB3000MB_REG_TPS_4), + rd(DIB3000MB_REG_TPS_5)); + deb_info("autoval: tps: %d, qam: %d, hrch: %d, alpha: %d, hp: %d, lp: %d, guard: %d, fft: %d cell: %d\n", rd(DIB3000MB_REG_TPS_LOCK), rd(DIB3000MB_REG_TPS_QAM), @@ -647,15 +701,75 @@ static int dib3000mb_read_ber(struct dib3000mb_state *state,u32 *ber) { - *ber = - (((rd(DIB3000MB_REG_BER_MSB) << 16) & 0x1f) | rd(DIB3000MB_REG_BER_LSB) ) / - 100000000; + *ber = ((rd(DIB3000MB_REG_BER_MSB) << 16) | rd(DIB3000MB_REG_BER_LSB) ); + return 0; +} +/* + * Amaury: + * signal strength is measured with dBm (power compared to mW) + * the standard range is -90dBm(low power) to -10 dBm (strong power), + * but the calibration is done for -100 dBm to 0dBm + */ + +#define DIB3000MB_AGC_REF_dBm -14 +#define DIB3000MB_GAIN_SLOPE_dBm 100 +#define DIB3000MB_GAIN_DELTA_dBm -2 +static int dib3000mb_read_signal_strength(struct dib3000mb_state *state, u16 *strength) +{ +/* TODO log10 + u16 sigpow = rd(DIB3000MB_REG_SIGNAL_POWER), + n_agc_power = rd(DIB3000MB_REG_AGC_POWER), + rf_power = rd(DIB3000MB_REG_RF_POWER); + double rf_power_dBm, ad_power_dBm, minar_power_dBm; + + if (n_agc_power == 0 ) + n_agc_power = 1 ; + + ad_power_dBm = 10 * log10 ( (float)n_agc_power / (float)(1<<16) ); + minor_power_dBm = ad_power_dBm - DIB3000MB_AGC_REF_dBm; + rf_power_dBm = (-DIB3000MB_GAIN_SLOPE_dBm * (float)rf_power / (float)(1<<16) + + DIB3000MB_GAIN_DELTA_dBm) + minor_power_dBm; + // relative rf_power + *strength = (u16) ((rf_power_dBm + 100) / 100 * 0xffff); +*/ + *strength = rd(DIB3000MB_REG_SIGNAL_POWER) * 0xffff / 0x170; return 0; } -static int dib3000mb_signal_strength(struct dib3000mb_state *state, u16 *strength) +/* + * Amaury: + * snr is the signal quality measured in dB. + * snr = 10*log10(signal power / noise power) + * the best quality is near 35dB (cable transmission & good modulator) + * the minimum without errors depend of transmission parameters + * some indicative values are given in en300744 Annex A + * ex : 16QAM 2/3 (Gaussian) = 11.1 dB + * + * If SNR is above 20dB, BER should be always 0. + * choose 0dB as the minimum + */ +static int dib3000mb_read_snr(struct dib3000mb_state *state,u16 *snr) +{ + short sigpow = rd(DIB3000MB_REG_SIGNAL_POWER); + int icipow = ((rd(DIB3000MB_REG_NOISE_POWER_MSB) & 0xff) << 16) | + rd(DIB3000MB_REG_NOISE_POWER_LSB); +/* + float snr_dBm=0; + + if (sigpow > 0 && icipow > 0) + snr_dBm = 10.0 * log10( (float) (sigpow<<8) / (float)icipow ) ; + else if (sigpow > 0) + snr_dBm = 35; + + *snr = (u16) ((snr_dBm / 35) * 0xffff); +*/ + *snr = (sigpow<<8) / (icipow > 0 ? icipow : 1); + return 0; +} + +static int dib3000mb_read_unc_blocks(struct dib3000mb_state *state,u32 *unc) { -// *stength = DIB3000MB_REG_SIGNAL_POWER + *unc = rd(DIB3000MB_REG_UNC); return 0; } @@ -665,63 +779,81 @@ return 0; } +static int dib3000mb_fe_get_tune_settings(struct dib3000mb_state *state, + struct dvb_frontend_tune_settings *tune) +{ + tune->min_delay_ms = 800; + tune->step_size = 166667; + tune->max_drift = 166667*2; + + return 0; +} + static int dib3000mb_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) { struct dib3000mb_state *state = fe->data; - int ret = 0; switch (cmd) { case FE_GET_INFO: deb_info("FE_GET_INFO\n"); memcpy(arg, &dib3000mb_info, sizeof(struct dvb_frontend_info)); + return 0; break; case FE_READ_STATUS: deb_info("FE_READ_STATUS\n"); - ret = dib3000mb_read_status(state,(fe_status_t *)arg); + return dib3000mb_read_status(state,(fe_status_t *)arg); break; case FE_READ_BER: deb_info("FE_READ_BER\n"); - ret = dib3000mb_read_ber(state,(u32 *)arg); + return dib3000mb_read_ber(state,(u32 *)arg); break; case FE_READ_SIGNAL_STRENGTH: deb_info("FE_READ_SIG_STRENGTH\n"); - ret = dib3000mb_signal_strength(state,(u16 *) arg); + return dib3000mb_read_signal_strength(state,(u16 *) arg); break; case FE_READ_SNR: deb_info("FE_READ_SNR\n"); + return dib3000mb_read_snr(state,(u16 *) arg); break; case FE_READ_UNCORRECTED_BLOCKS: deb_info("FE_READ_UNCORRECTED_BLOCKS\n"); + return dib3000mb_read_unc_blocks(state,(u32 *) arg); break; case FE_SET_FRONTEND: deb_info("FE_SET_FRONTEND\n"); - ret = dib3000mb_set_frontend(state,(struct dvb_frontend_parameters *) arg,1); + return dib3000mb_set_frontend(state,(struct dvb_frontend_parameters *) arg,1); break; case FE_GET_FRONTEND: deb_info("FE_GET_FRONTEND\n"); - ret = dib3000mb_get_frontend(state,(struct dvb_frontend_parameters *) arg); + return dib3000mb_get_frontend(state,(struct dvb_frontend_parameters *) arg); break; case FE_SLEEP: deb_info("FE_SLEEP\n"); - ret = dib3000mb_sleep(state); + return dib3000mb_sleep(state); break; case FE_INIT: deb_info("FE_INIT\n"); - ret = dib3000mb_fe_init(state,0); + return dib3000mb_fe_init(state,0); break; + case FE_GET_TUNE_SETTINGS: + deb_info("GET_TUNE_SETTINGS"); + return dib3000mb_fe_get_tune_settings(state, (struct + dvb_frontend_tune_settings *) arg); + + break; case FE_SET_TONE: case FE_SET_VOLTAGE: default: - ret = -EOPNOTSUPP; + return -EOPNOTSUPP; break; } return 0; @@ -753,16 +885,20 @@ i2c_set_clientdata(client,state); state->manufactor_id = dib3000mb_read_reg(client, DIB3000MB_REG_MANUFACTOR_ID); + if (state->manufactor_id != 0x01b3) { + ret = -ENODEV; + goto probe_err; + } + state->device_id = dib3000mb_read_reg(client,DIB3000MB_REG_DEVICE_ID); - if (state->manufactor_id == 0x01b3 && state->device_id == 0x3000) - info("found a DiBCom (0x%04x) 3000-MB DVB-T frontend (ver: %x).", - state->manufactor_id, state->device_id); - else { - err("did not found a DiBCom 3000-MB."); + if (state->device_id != 0x3000) { ret = -ENODEV; goto probe_err; } + info("found a DiBCom (0x%04x) 3000-MB DVB-T frontend (ver: %x).", + state->manufactor_id, state->device_id); + if ((ret = i2c_attach_client(client))) goto i2c_attach_err; diff -Nru a/drivers/media/dvb/frontends/dib3000mb.h b/drivers/media/dvb/frontends/dib3000mb.h --- a/drivers/media/dvb/frontends/dib3000mb.h 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/dvb/frontends/dib3000mb.h 2004-11-10 17:19:04 -08:00 @@ -7,6 +7,7 @@ * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, version 2. * + * * * for more information see dib3000mb.c . */ @@ -320,7 +321,7 @@ #define DIB3000MB_REG_UNK_108 ( 108) #define DIB3000MB_UNK_108 (0x0080) -/* fft ??? */ +/* fft */ #define DIB3000MB_REG_UNK_121 ( 121) #define DIB3000MB_UNK_121_2K ( 7) #define DIB3000MB_UNK_121_DEFAULT ( 5) @@ -351,12 +352,11 @@ #define DIB3000MB_REG_VIT_CODE_RATE ( 129) /* forward error correction code rates */ -#define DIB3000MB_FEC_1_2 ( 0) -#define DIB3000MB_FEC_2_3 ( 1) -#define DIB3000MB_FEC_3_4 ( 2) -#define DIB3000MB_FEC_4_5 ( 3) -#define DIB3000MB_FEC_5_6 ( 4) -#define DIB3000MB_FEC_7_8 ( 5) +#define DIB3000MB_FEC_1_2 ( 1) +#define DIB3000MB_FEC_2_3 ( 2) +#define DIB3000MB_FEC_3_4 ( 3) +#define DIB3000MB_FEC_5_6 ( 5) +#define DIB3000MB_FEC_7_8 ( 7) /* vit select hp */ #define DIB3000MB_REG_VIT_HP ( 130) @@ -627,8 +627,8 @@ /* packet error rate (uncorrected TS packets) (16) */ #define DIB3000MB_REG_PACKET_ERROR_RATE ( 417) -/* packet error count (16) */ -#define DIB3000MB_REG_PACKET_ERROR_COUNT ( 420) +/* uncorrected packet count (16) */ +#define DIB3000MB_REG_UNC ( 420) /* viterbi locked (1) */ #define DIB3000MB_REG_VIT_LCK ( 421) diff -Nru a/drivers/media/dvb/frontends/grundig_29504-401.c b/drivers/media/dvb/frontends/grundig_29504-401.c --- a/drivers/media/dvb/frontends/grundig_29504-401.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/media/dvb/frontends/grundig_29504-401.c 2004-11-10 17:19:02 -08:00 @@ -4,7 +4,7 @@ Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH - Marko Kohtala + Marko Kohtala This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru a/drivers/media/dvb/frontends/mt352.c b/drivers/media/dvb/frontends/mt352.c --- a/drivers/media/dvb/frontends/mt352.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/media/dvb/frontends/mt352.c 2004-11-10 17:19:02 -08:00 @@ -8,10 +8,12 @@ * Wolfram Joost * * Support for Samsung TDTC9251DH01C(M) tuner - * * Copyright (C) 2004 Antonio Mancuso * Amauri Celani * + * DVICO FusionHDTV DVB-T1 and DVICO FusionHDTV DVB-T Lite support by + * Christopher Pascoe + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -45,22 +47,23 @@ } while (0) static int debug; -static int force_card = -1; -static int card_type = -1; +#define MAX_CARDS 4 +static int force_card[MAX_CARDS] = { -1, -1, -1, -1 }; +static int force_card_count = 0; module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off)."); -//FIXME: Should be an array. -module_param(force_card, int, 0444); -MODULE_PARM_DESC(force_card, "Force card type.\n\t(0 == AVDVBT771, 1 == TUA6034, " - "2 == TDTC9251DH01C).\n\tDefault is that AVDVBT771 is attempted " - "to be autodetected,\n\tif you do not have this card, you must " - "specify the card type here."); - +module_param_array(force_card, int, &force_card_count, 0444); +MODULE_PARM_DESC(force_card, "Forces the type of each attached mt352 frontend.\n\t" + "If your card is not autodetected, then you must specify its type here.\n\t" + "Valid card types are: 0 == AVDVBT771, 1 == TUA6034, 2 == TDTC9251DH01C,\n\t" + "3 == DVICO FusionHDTV DVB-T1, 4 == DVICO FusionHDTV DVB-T Lite."); struct mt352_state { struct i2c_adapter *i2c; struct dvb_adapter *dvb; + struct dvb_frontend_info fe_info; + int card_type; }; #define mt352_write(ibuf, ilen) \ @@ -75,60 +78,60 @@ } \ } while (0) -// FIXME: static struct _tuner_info tuner_info [] = { - //AVERMEDIA 771 board { + .fe_name = "AverMedia DVB-T 771", .fe_frequency_min = 174000000, .fe_frequency_max = 862000000, - .fe_frequency_stepsize = 83333, - .coderate_hp_shift = 7, - .coderate_lp_shift = 4, - .constellation_shift = 13, - .tx_mode_shift = 0, - .guard_interval_shift = 2, - .hierarchy_shift = 10, - .read_reg_flag = I2C_M_NOSTART, + .fe_frequency_stepsize = 166667, + .pll_i2c_addr = 0xc2, .mt352_init = mt352_init_AVERMEDIA771, .mt352_charge_pump = mt352_cp_AVERMEDIA771, .mt352_band_select = mt352_bs_AVERMEDIA771 }, - //TUA6034 tuner { + .fe_name = "Zarlink MT352 + TUA6034 DVB-T", .fe_frequency_min = 174000000, .fe_frequency_max = 862000000, .fe_frequency_stepsize = 166667, - .coderate_hp_shift = 9, - .coderate_lp_shift = 6, - .constellation_shift = 14, - .tx_mode_shift = 1, - .guard_interval_shift = 3, - .hierarchy_shift = 12, - .read_reg_flag = I2C_M_NOSTART, + .pll_i2c_addr = 0xc2, .mt352_init = mt352_init_TUA6034, .mt352_charge_pump = mt352_cp_TUA6034, .mt352_band_select = mt352_bs_TUA6034 }, - //TDTC9251DH01C tuner { + .fe_name = "Zarlink MT352 + Samsung TDTC9251DH01C DVB-T", .fe_frequency_min = 474000000, .fe_frequency_max = 858000000, .fe_frequency_stepsize = 166667, - .coderate_hp_shift = 9, - .coderate_lp_shift = 6, - .constellation_shift = 4, - .tx_mode_shift = 1, - .guard_interval_shift = 3, - .hierarchy_shift = 12, - .read_reg_flag = 0, + .pll_i2c_addr = 0xc2, .mt352_init = mt352_init_TDTC9251DH01C, .mt352_charge_pump = mt352_cp_TDTC9251DH01C, .mt352_band_select = mt352_bs_TDTC9251DH01C + }, + { + .fe_name = "DVICO FusionHDTV DVB-T1", + .fe_frequency_min = 174000000, + .fe_frequency_max = 862000000, + .fe_frequency_stepsize = 166667, + .pll_i2c_addr = 0xc2, + .mt352_init = mt352_init_DVICODVBT1, + .mt352_charge_pump = mt352_cp_DVICODVBT1, + .mt352_band_select = mt352_bs_DVICODVBT1, + }, + { + .fe_name = "DVICO FusionHDTV DVB-T Lite", + .fe_frequency_min = 174000000, + .fe_frequency_max = 862000000, + .fe_frequency_stepsize = 166667, + .pll_i2c_addr = 0xc0, + .mt352_init = mt352_init_DVICODVBTLITE, + .mt352_charge_pump = mt352_cp_DVICODVBTLITE, + .mt352_band_select = mt352_bs_DVICODVBTLITE, } }; - -static struct dvb_frontend_info mt352_info = { +static struct dvb_frontend_info mt352_info_template = { .name = "DVB-T Zarlink MT352 demodulator driver", .type = FE_OFDM, /* @@ -150,63 +153,95 @@ FE_CAN_MUTE_TS }; +static u8 mt352_reset [] = { RESET, 0x80 }; +static u8 mt352_adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 }; +static u8 mt352_capt_range_cfg[] = { CAPT_RANGE, 0x32 }; + static int mt352_init_TUA6034(struct i2c_adapter *i2c) { - static u8 mt352_reset [] = { RESET, 0x80 }; static u8 mt352_clock_config [] = { CLOCK_CTL, 0x38, 0x2d }; - static u8 mt352_adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 }; static u8 mt352_agc_cfg [] = { AGC_TARGET, 0x19, 0xa0 }; - static u8 mt352_acq_ctl [] = { ACQ_CTL, 0x50 }; mt352_write(mt352_clock_config, sizeof(mt352_clock_config)); udelay(2000); mt352_write(mt352_reset, sizeof(mt352_reset)); mt352_write(mt352_adc_ctl_1_cfg, sizeof(mt352_adc_ctl_1_cfg)); - mt352_write(mt352_acq_ctl, sizeof(mt352_acq_ctl)); mt352_write(mt352_agc_cfg, sizeof(mt352_agc_cfg)); + mt352_write(mt352_capt_range_cfg, sizeof(mt352_capt_range_cfg)); return 0; } static int mt352_init_AVERMEDIA771(struct i2c_adapter *i2c) { - static u8 mt352_reset [] = { RESET, 0x80 }; static u8 mt352_clock_config [] = { CLOCK_CTL, 0x38, 0x2d }; - static u8 mt352_adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 }; static u8 mt352_agc_cfg [] = { AGC_TARGET, 0x10, 0x23, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0x40, 0x40 }; - static u8 mt352_acq_ctl [] = { ACQ_CTL, 0x50 }; static u8 mt352_av771_extra[] = { 0xB5, 0x7A }; + static u8 mt352_capt_range_cfg[] = { CAPT_RANGE, 0x32 }; mt352_write(mt352_clock_config, sizeof(mt352_clock_config)); udelay(2000); mt352_write(mt352_reset, sizeof(mt352_reset)); mt352_write(mt352_adc_ctl_1_cfg, sizeof(mt352_adc_ctl_1_cfg)); - mt352_write(mt352_acq_ctl, sizeof(mt352_acq_ctl)); mt352_write(mt352_agc_cfg,sizeof(mt352_agc_cfg)); udelay(2000); mt352_write(mt352_av771_extra,sizeof(mt352_av771_extra)); + mt352_write(mt352_capt_range_cfg, sizeof(mt352_capt_range_cfg)); return 0; } static int mt352_init_TDTC9251DH01C(struct i2c_adapter *i2c) { - static u8 mt352_reset [] = { RESET, 0x80 }; static u8 mt352_clock_config [] = { CLOCK_CTL, 0x10, 0x2d }; - static u8 mt352_adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 }; static u8 mt352_agc_cfg [] = { AGC_TARGET, 0x28, 0xa1 }; - static u8 mt352_acq_ctl [] = { ACQ_CTL, 0x50 }; mt352_write(mt352_clock_config, sizeof(mt352_clock_config)); udelay(2000); mt352_write(mt352_reset, sizeof(mt352_reset)); mt352_write(mt352_adc_ctl_1_cfg, sizeof(mt352_adc_ctl_1_cfg)); - mt352_write(mt352_acq_ctl, sizeof(mt352_acq_ctl)); mt352_write(mt352_agc_cfg, sizeof(mt352_agc_cfg)); + mt352_write(mt352_capt_range_cfg, sizeof(mt352_capt_range_cfg)); + + return 0; +} + +static int mt352_init_DVICODVBT1(struct i2c_adapter *i2c) +{ + static u8 mt352_clock_config [] = { CLOCK_CTL, 0x38, 0x39 }; + static u8 mt352_agc_cfg [] = { AGC_TARGET, 0x24, 0x20 }; + static u8 mt352_gpp_ctl_cfg [] = { GPP_CTL, 0x33 }; + + mt352_write(mt352_clock_config, sizeof(mt352_clock_config)); + udelay(200); + mt352_write(mt352_reset, sizeof(mt352_reset)); + mt352_write(mt352_adc_ctl_1_cfg, sizeof(mt352_adc_ctl_1_cfg)); + + mt352_write(mt352_agc_cfg, sizeof(mt352_agc_cfg)); + mt352_write(mt352_gpp_ctl_cfg, sizeof(mt352_gpp_ctl_cfg)); + mt352_write(mt352_capt_range_cfg, sizeof(mt352_capt_range_cfg)); + + return 0; +} + +static int mt352_init_DVICODVBTLITE(struct i2c_adapter *i2c) +{ + static u8 mt352_clock_config [] = { CLOCK_CTL, 0x38, 0x38 }; + static u8 mt352_agc_cfg [] = { AGC_TARGET, 0x28, 0x20 }; + static u8 mt352_gpp_ctl_cfg [] = { GPP_CTL, 0x33 }; + + mt352_write(mt352_clock_config, sizeof(mt352_clock_config)); + udelay(200); + mt352_write(mt352_reset, sizeof(mt352_reset)); + mt352_write(mt352_adc_ctl_1_cfg, sizeof(mt352_adc_ctl_1_cfg)); + + mt352_write(mt352_agc_cfg, sizeof(mt352_agc_cfg)); + mt352_write(mt352_gpp_ctl_cfg, sizeof(mt352_gpp_ctl_cfg)); + mt352_write(mt352_capt_range_cfg, sizeof(mt352_capt_range_cfg)); return 0; } @@ -215,9 +250,9 @@ { unsigned char cp = 0; - if (freq < 542) + if (freq < 542000000) cp = 0xbe; - else if (freq < 830) + else if (freq < 830000000) cp = 0xf6; else cp = 0xfe; @@ -229,21 +264,21 @@ { unsigned char cp = 0; - if (freq < 150) + if (freq < 150000000) cp = 0xB4; - else if (freq < 173) + else if (freq < 173000000) cp = 0xBC; - else if (freq < 250) + else if (freq < 250000000) cp = 0xB4; - else if (freq < 400) + else if (freq < 400000000) cp = 0xBC; - else if (freq < 420) + else if (freq < 420000000) cp = 0xF4; - else if (freq < 470) + else if (freq < 470000000) cp = 0xFC; - else if (freq < 600) + else if (freq < 600000000) cp = 0xBC; - else if (freq < 730) + else if (freq < 730000000) cp = 0xF4; else cp = 0xFC; @@ -256,11 +291,39 @@ return(0xcc); } +static unsigned char mt352_cp_DVICODVBT1(u32 freq) +{ + unsigned char cp = 0; + + if (freq < 542000000) + cp = 0xbc; + else if (freq < 830000000) + cp = 0xf4; + else + cp = 0xfc; + + return cp; +} + +static unsigned char mt352_cp_DVICODVBTLITE(u32 freq) +{ + unsigned char cp = 0; + + if (freq < 542000000) + cp = 0xb4; + else if (freq < 771000000) + cp = 0xbc; + else + cp = 0xf4; + + return cp; +} + static unsigned char mt352_bs_TUA6034(u32 freq) { unsigned char bs = 0; - if (freq < 250) + if (freq < 250000000) bs = 0x01; else bs = 0x08; @@ -272,21 +335,21 @@ { unsigned char bs = 0; - if (freq < 150) + if (freq < 150000000) bs = 0x01; - else if (freq < 173) + else if (freq < 173000000) bs = 0x01; - else if (freq < 250) + else if (freq < 250000000) bs = 0x02; - else if (freq < 400) + else if (freq < 400000000) bs = 0x02; - else if (freq < 420) + else if (freq < 420000000) bs = 0x02; - else if (freq < 470) + else if (freq < 470000000) bs = 0x02; - else if (freq < 600) + else if (freq < 600000000) bs = 0x08; - else if (freq < 730) + else if (freq < 730000000) bs = 0x08; else bs = 0x08; @@ -298,54 +361,79 @@ { unsigned char bs = 0; - if ((freq >= 48) && (freq <= 154)) /* low band */ + if (freq >= 48000000 && freq <= 154000000) /* low band */ bs = 0x09; - if ((freq >= 161) && (freq <= 439)) /* medium band */ + if (freq >= 161000000 && freq <= 439000000) /* medium band */ bs = 0x0a; - if ((freq >= 447) && (freq <= 863)) /* high band */ + if (freq >= 447000000 && freq <= 863000000) /* high band */ bs = 0x08; return bs; } +static unsigned char mt352_bs_DVICODVBT1(u32 freq) +{ + unsigned char bs = 0; + + if (freq == 0) /* power down PLL */ + bs = 0x03; + else if (freq < 157500000) /* low band */ + bs = 0x01; + else if (freq < 443250000) /* mid band */ + bs = 0x02; + else /* high band */ + bs = 0x04; + + return bs; +} -static int mt352_detect_avermedia_771(struct i2c_adapter *i2c) +static unsigned char mt352_bs_DVICODVBTLITE(u32 freq) { - int i; - u8 reg; - u8 id[4]; - const u8 pciid[4] = { 0x07, 0x71, 0x14, 0x61 }; - struct i2c_msg msg[2] = + unsigned char bs = 0; + + if (freq == 0) /* power down PLL */ + bs = 0x03; + else if (freq < 443250000) /* mid band */ + bs = 0x02; + else /* high band */ + bs = 0x08; + + return bs; +} + +static u32 mt352_read_eeprom_dword(struct i2c_adapter *i2c, int dword_base) { + int i; + u32 dword = 0; + u8 reg, val; + struct i2c_msg msg[2] = { { .addr = 0x50, - .flags = I2C_M_NOSTART, + .flags = 0, .buf = ®, .len = 1 }, { .addr = 0x50, .flags = I2C_M_RD, + .buf = &val, .len = 1 } }; - for (i = 0; i < 4; i++) - { - reg = i + 0xFC; - msg[1].buf = id + i; + for (i = 0; i < 4; i++) { + reg = dword_base + i; if (i2c_transfer(i2c,msg,2) != 2) - { return 0; - } + dword = (dword << 8) | val; } - return *((u32 *) id) == *((u32 *) pciid); + return dword; } -static int mt352_init(struct i2c_adapter *i2c) +static int mt352_init(struct i2c_adapter *i2c, int card_type) { /** * all register write sequence have the register address of the @@ -366,7 +454,7 @@ static int mt352_sleep(struct i2c_adapter *i2c) { - static u8 mt352_softdown[] = { 0x89, 0x20, 0x08 }; + static u8 mt352_softdown[] = { CLOCK_CTL, 0x20, 0x08 }; mt352_write(mt352_softdown, sizeof(mt352_softdown)); @@ -374,26 +462,27 @@ } static int mt352_set_parameters(struct i2c_adapter *i2c, - struct dvb_frontend_parameters *param) + struct dvb_frontend_parameters *param, + int card_type) { unsigned char buf[14]; unsigned int tps = 0; struct dvb_ofdm_parameters *op = ¶m->u.ofdm; - u32 freq = param->frequency / 1000000; uint16_t tmp; + int i; switch (op->code_rate_HP) { case FEC_2_3: - tps |= (1 << CODERATE_HP_SHIFT); + tps |= (1 << 7); break; case FEC_3_4: - tps |= (2 << CODERATE_HP_SHIFT); + tps |= (2 << 7); break; case FEC_5_6: - tps |= (3 << CODERATE_HP_SHIFT); + tps |= (3 << 7); break; case FEC_7_8: - tps |= (4 << CODERATE_HP_SHIFT); + tps |= (4 << 7); break; case FEC_1_2: case FEC_AUTO: @@ -404,20 +493,24 @@ switch (op->code_rate_LP) { case FEC_2_3: - tps |= (1 << CODERATE_LP_SHIFT); + tps |= (1 << 4); break; case FEC_3_4: - tps |= (2 << CODERATE_LP_SHIFT); + tps |= (2 << 4); break; case FEC_5_6: - tps |= (3 << CODERATE_LP_SHIFT); + tps |= (3 << 4); break; case FEC_7_8: - tps |= (4 << CODERATE_LP_SHIFT); + tps |= (4 << 4); break; case FEC_1_2: case FEC_AUTO: break; + case FEC_NONE: + if (op->hierarchy_information == HIERARCHY_AUTO || + op->hierarchy_information == HIERARCHY_NONE) + break; default: return -EINVAL; } @@ -427,10 +520,10 @@ break; case QAM_AUTO: case QAM_16: - tps |= (1 << CONSTELLATION_SHIFT); + tps |= (1 << 13); break; case QAM_64: - tps |= (2 << CONSTELLATION_SHIFT); + tps |= (2 << 13); break; default: return -EINVAL; @@ -441,7 +534,7 @@ case TRANSMISSION_MODE_AUTO: break; case TRANSMISSION_MODE_8K: - tps |= (1 << TX_MODE_SHIFT); + tps |= (1 << 0); break; default: return -EINVAL; @@ -452,13 +545,13 @@ case GUARD_INTERVAL_AUTO: break; case GUARD_INTERVAL_1_16: - tps |= (1 << GUARD_INTERVAL_SHIFT); + tps |= (1 << 2); break; case GUARD_INTERVAL_1_8: - tps |= (2 << GUARD_INTERVAL_SHIFT); + tps |= (2 << 2); break; case GUARD_INTERVAL_1_4: - tps |= (3 << GUARD_INTERVAL_SHIFT); + tps |= (3 << 2); break; default: return -EINVAL; @@ -469,13 +562,13 @@ case HIERARCHY_NONE: break; case HIERARCHY_1: - tps |= (1 << HIERARCHY_SHIFT); + tps |= (1 << 10); break; case HIERARCHY_2: - tps |= (2 << HIERARCHY_SHIFT); + tps |= (2 << 10); break; case HIERARCHY_4: - tps |= (3 << HIERARCHY_SHIFT); + tps |= (3 << 10); break; default: return -EINVAL; @@ -507,7 +600,7 @@ buf[6] = 0x31; /* INPUT_FREQ_(1|0), 20.48MHz clock, 36.166667MHz IF */ buf[7] = 0x05; /* see MT352 Design Manual page 32 for details */ - buf[8] = I2C_TUNER_ADDR; + buf[8] = PLL_I2C_ADDR; /** * All the following settings are tuner module dependent, @@ -516,17 +609,24 @@ /* here we assume 1/6MHz == 166.66kHz stepsize */ #define IF_FREQUENCYx6 217 /* 6 * 36.16666666667MHz */ - tmp = ((param->frequency*3)/500000) + IF_FREQUENCYx6; + tmp = (((param->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6; buf[9] = msb(tmp); /* CHAN_START_(1|0) */ buf[10] = lsb(tmp); - buf[11] = MT352_CHARGE_PUMP(freq); - buf[12] = MT352_BAND_SELECT(freq); + buf[11] = MT352_CHARGE_PUMP(param->frequency); + buf[12] = MT352_BAND_SELECT(param->frequency); buf[13] = 0x01; /* TUNER_GO!! */ + /* Only send the tuning request if the tuner doesn't have the requested + * parameters already set. Enhances tuning time and prevents stream + * breakup when retuning the same transponder. */ + for (i = 1; i < 13; i++) + if (buf[i] != mt352_read_register(i2c, i + 0x50)) { mt352_write(buf, sizeof(buf)); + break; + } return 0; } @@ -537,7 +637,7 @@ u8 b0 [] = { reg }; u8 b1 [] = { 0 }; struct i2c_msg msg [] = { { .addr = I2C_MT352_ADDR, - .flags = READ_REG_FLAG, + .flags = 0, .buf = b0, .len = 1 }, { .addr = I2C_MT352_ADDR, .flags = I2C_M_RD, @@ -672,6 +772,7 @@ { struct mt352_state *state = fe->data; struct i2c_adapter *i2c = state->i2c; + int card_type = state->card_type; u8 r,snr; fe_status_t *status; u16 signal; @@ -679,7 +780,7 @@ switch (cmd) { case FE_GET_INFO: - memcpy (arg, &mt352_info, sizeof(struct dvb_frontend_info)); + memcpy(arg, &state->fe_info, sizeof(struct dvb_frontend_info)); break; case FE_READ_STATUS: @@ -727,7 +828,8 @@ case FE_SET_FRONTEND: return mt352_set_parameters (i2c, - (struct dvb_frontend_parameters *) arg); + (struct dvb_frontend_parameters *) arg, + card_type); case FE_GET_FRONTEND: return mt352_get_parameters (i2c, @@ -744,7 +846,13 @@ return mt352_sleep(i2c); case FE_INIT: - return mt352_init(i2c); + /* Only send the initialisation command if the demodulator + * isn't already enabled. Greatly enhances tuning time. */ + if ((mt352_read_register(i2c, CLOCK_CTL) & 0x10) == 0 || + (mt352_read_register(i2c, CONFIG) & 0x20) == 0) + return mt352_init(i2c, card_type); + else + return 0; default: return -EOPNOTSUPP; @@ -757,56 +865,83 @@ static int mt352_attach_adapter(struct i2c_adapter *i2c) { + static int num_cards_probed; struct mt352_state *state; struct i2c_client *client; - static u8 mt352_reset_attach [] = { 0x50, 0xC0 }; + static u8 mt352_reset_attach [] = { RESET, 0xC0 }; int ret; + int card_type, forced_card = -1; dprintk("Trying to attach to adapter 0x%x:%s.\n", i2c->id, i2c->name); - /* set the proper MT352 frequency range */ - mt352_info.frequency_min = FE_FREQ_MIN; - mt352_info.frequency_max = FE_FREQ_MAX; - mt352_info.frequency_stepsize = FE_FREQ_STEPSIZE; + if (mt352_read_register(i2c, CHIP_ID) != ID_MT352) + return -ENODEV; if ( !(state = kmalloc(sizeof(struct mt352_state), GFP_KERNEL)) ) return -ENOMEM; memset(state, 0, sizeof(struct mt352_state)); state->i2c = i2c; + state->card_type = -1; + memcpy(&state->fe_info, &mt352_info_template, sizeof(struct dvb_frontend_info)); - if (mt352_detect_avermedia_771(i2c)) { - card_type = CARD_AVDVBT771; - } else if (force_card < 0) { - dprintk("Avermedia 771 not detected, maybe you should try the " - "'force_card' module parameter?.\n"); - kfree(state); - return -ENODEV; + /* Attempt autodetection of card type based on PCI ID information + * stored in any on-board EEPROM. */ + switch (mt352_read_eeprom_dword(i2c, 0xFC)) { /* BT878A chipset */ + case 0x07711461: + state->card_type = CARD_AVDVBT771; + break; + case 0xdb1018ac: + state->card_type = CARD_DVICODVBTLITE; + break; + default: + break; } - if (force_card > 0) { - if (card_type >= 0 && force_card != card_type) - printk(KERN_WARNING "dvbfe_mt352: Warning, overriding" - " detected card.\n"); - card_type = force_card; + switch (mt352_read_eeprom_dword(i2c, 0x04)) { /* CX2388x chipset */ + case 0xac1800db: + state->card_type = CARD_DVICODVBT1; + break; + default: + break; } - if (mt352_read_register(i2c, CHIP_ID) != ID_MT352) { + if (num_cards_probed < force_card_count) + forced_card = force_card[num_cards_probed++]; + + if (state->card_type == -1 && forced_card < 0) { + dprintk("Card type not automatically detected. You " + "must use the 'force_card' module parameter.\n"); kfree(state); return -ENODEV; } - if (card_type == CARD_AVDVBT771) - printk(KERN_INFO FRONTEND_NAME ": Setup for Avermedia 771.\n"); - else if (card_type == CARD_TUA6034) - printk(KERN_INFO FRONTEND_NAME ": Setup for TUA6034.\n"); - else if (card_type == CARD_TDTC9251DH01C) - printk(KERN_INFO FRONTEND_NAME ": Setup for TDTC9251DH01C.\n"); + if (forced_card >= 0) { + if (state->card_type >= 0 && forced_card != state->card_type) + printk(KERN_WARNING FRONTEND_NAME ": Warning, overriding" + " detected card type.\n"); + state->card_type = forced_card; + } + + card_type = state->card_type; + printk(KERN_INFO FRONTEND_NAME ": Setup for %s\n", FE_NAME); + + /* set the frontend name and card-specific frequency info */ + strlcpy(state->fe_info.name, FE_NAME, sizeof(state->fe_info.name)); + state->fe_info.frequency_min = FE_FREQ_MIN; + state->fe_info.frequency_max = FE_FREQ_MAX; + state->fe_info.frequency_stepsize = FE_FREQ_STEPSIZE; /* Do a "hard" reset */ mt352_write(mt352_reset_attach, sizeof(mt352_reset_attach)); + /* Try to intiialise the device */ + if (mt352_init(i2c, card_type) != 0) { + kfree(state); + return -ENODEV; + } + if ( !(client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL)) ) { kfree(state); return -ENOMEM; @@ -823,16 +958,6 @@ return ret; } - BUG_ON(!state->dvb); - - if ((ret = dvb_register_frontend(mt352_ioctl, state->dvb, state, - &mt352_info, THIS_MODULE))) { - i2c_detach_client(client); - kfree(client); - kfree(state); - return ret; - } - return 0; } @@ -840,9 +965,9 @@ { struct mt352_state *state = i2c_get_clientdata(client); + if (state->dvb) dvb_unregister_frontend (mt352_ioctl, state->dvb); i2c_detach_client(client); - BUG_ON(state->dvb); kfree(client); kfree(state); return 0; @@ -851,13 +976,23 @@ static int mt352_command (struct i2c_client *client, unsigned int cmd, void *arg) { struct mt352_state *state = i2c_get_clientdata(client); + int ret; switch (cmd) { case FE_REGISTER: + if (!state->dvb) { + if ((ret = dvb_register_frontend(mt352_ioctl, arg, + state, &state->fe_info, + THIS_MODULE))) + return ret; state->dvb = arg; + } break; case FE_UNREGISTER: + if (state->dvb == arg) { + dvb_unregister_frontend(mt352_ioctl, state->dvb); state->dvb = NULL; + } break; default: return -EOPNOTSUPP; diff -Nru a/drivers/media/dvb/frontends/mt352.h b/drivers/media/dvb/frontends/mt352.h --- a/drivers/media/dvb/frontends/mt352.h 2004-11-10 17:19:06 -08:00 +++ b/drivers/media/dvb/frontends/mt352.h 2004-11-10 17:19:06 -08:00 @@ -4,11 +4,16 @@ * Written by Holger Waechtler * and Daniel Mack * - * Support for Samsung TDTC9251DH01C(M) tuner + * AVerMedia AVerTV DVB-T 771 support by + * Wolfram Joost * + * Support for Samsung TDTC9251DH01C(M) tuner * Copyright (C) 2004 Antonio Mancuso * Amauri Celani * + * DVICO FusionHDTV DVB-T1 and DVICO FusionHDTV DVB-T Lite support by + * Christopher Pascoe + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -29,12 +34,13 @@ #define _MT352_ #define I2C_MT352_ADDR 0x0f -#define I2C_TUNER_ADDR 0xc2 #define ID_MT352 0x13 #define CARD_AVDVBT771 0x00 #define CARD_TUA6034 0x01 #define CARD_TDTC9251DH01C 0x02 +#define CARD_DVICODVBT1 0x03 +#define CARD_DVICODVBTLITE 0x04 #define msb(x) (((x) >> 8) & 0xff) #define lsb(x) ((x) & 0xff) @@ -123,6 +129,9 @@ }; struct _tuner_info { + char *fe_name; +#define FE_NAME tuner_info[card_type].fe_name + __u32 fe_frequency_min; #define FE_FREQ_MIN tuner_info[card_type].fe_frequency_min @@ -132,26 +141,8 @@ __u32 fe_frequency_stepsize; //verificare se u32 e' corretto #define FE_FREQ_STEPSIZE tuner_info[card_type].fe_frequency_stepsize - __u32 coderate_hp_shift; //verificare se u32 giusto -#define CODERATE_HP_SHIFT tuner_info[card_type].coderate_hp_shift - - __u32 coderate_lp_shift; -#define CODERATE_LP_SHIFT tuner_info[card_type].coderate_lp_shift - - int constellation_shift; -#define CONSTELLATION_SHIFT tuner_info[card_type].constellation_shift - - int tx_mode_shift; -#define TX_MODE_SHIFT tuner_info[card_type].tx_mode_shift - - int guard_interval_shift; -#define GUARD_INTERVAL_SHIFT tuner_info[card_type].guard_interval_shift - - int hierarchy_shift; -#define HIERARCHY_SHIFT tuner_info[card_type].hierarchy_shift - - int read_reg_flag; -#define READ_REG_FLAG tuner_info[card_type].read_reg_flag + u8 pll_i2c_addr; +#define PLL_I2C_ADDR tuner_info[card_type].pll_i2c_addr int (* mt352_init) (struct i2c_adapter *i2c); #define MT352_INIT tuner_info[card_type].mt352_init @@ -166,12 +157,18 @@ static int mt352_init_TUA6034(struct i2c_adapter *i2c); static int mt352_init_AVERMEDIA771(struct i2c_adapter *i2c); static int mt352_init_TDTC9251DH01C(struct i2c_adapter *i2c); +static int mt352_init_DVICODVBT1(struct i2c_adapter *i2c); +static int mt352_init_DVICODVBTLITE(struct i2c_adapter *i2c); static unsigned char mt352_cp_TUA6034(u32 freq); static unsigned char mt352_cp_AVERMEDIA771(u32 freq); static unsigned char mt352_cp_TDTC9251DH01C(u32 freq); +static unsigned char mt352_cp_DVICODVBT1(u32 freq); +static unsigned char mt352_cp_DVICODVBTLITE(u32 freq); static unsigned char mt352_bs_TUA6034(u32 freq); static unsigned char mt352_bs_AVERMEDIA771(u32 freq); static unsigned char mt352_bs_TDTC9251DH01C(u32 freq); -static int mt352_detect_avermedia_771(struct i2c_adapter *i2c); +static unsigned char mt352_bs_DVICODVBT1(u32 freq); +static unsigned char mt352_bs_DVICODVBTLITE(u32 freq); +static u8 mt352_read_register(struct i2c_adapter *i2c, u8 reg); #endif /* _MT352_ */ diff -Nru a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c --- a/drivers/media/dvb/frontends/stv0299.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/media/dvb/frontends/stv0299.c 2004-11-10 17:19:07 -08:00 @@ -885,6 +885,43 @@ } +static int stv0299_send_legacy_dish_cmd(struct i2c_adapter *i2c, u32 cmd, + int tuner_type) +{ + u8 last = 1; + int i; + + /* reset voltage at the end + if((0x50 & stv0299_readreg (i2c, 0x0c)) == 0x50) + cmd |= 0x80; + else + cmd &= 0x7F; + */ + + cmd = cmd << 1; + dprintk("%s switch command: 0x%04x\n",__FUNCTION__, cmd); + + stv0299_set_voltage(i2c,SEC_VOLTAGE_18,tuner_type); + msleep(32); + + for (i=0; i<9; i++) { + if((cmd & 0x01) != last) { + stv0299_set_voltage(i2c, + last ? SEC_VOLTAGE_13 : + SEC_VOLTAGE_18, + tuner_type); + last = (last) ? 0 : 1; + } + + cmd = cmd >> 1; + + if (i != 8) + msleep(8); + } + + return 0; +} + static int stv0299_set_symbolrate (struct i2c_adapter *i2c, u32 srate, int tuner_type) { u64 big = srate; @@ -1229,6 +1266,10 @@ return stv0299_set_voltage (i2c, (fe_sec_voltage_t) arg, state->tuner_type); + case FE_DISHNETWORK_SEND_LEGACY_CMD: + return stv0299_send_legacy_dish_cmd (i2c, (u32) arg, + state->tuner_type); + case FE_GET_TUNE_SETTINGS: { struct dvb_frontend_tune_settings* fesettings = (struct dvb_frontend_tune_settings*) arg; @@ -1276,12 +1317,12 @@ u8 stat [] = { 0 }; u8 tda6100_buf [] = { 0, 0 }; int ret; - struct i2c_msg msg1 [] = {{ .addr = 0x68, .buf = rpt, .len = 2 }, + struct i2c_msg msg1 [] = {{ .addr = 0x68, .flags = 0, .buf = rpt, len: 2 }, { .addr = 0x60, .flags = I2C_M_RD, .buf = stat, .len = 1 }}; - struct i2c_msg msg2 [] = {{ .addr = 0x68, .buf = rpt, .len = 2 }, + struct i2c_msg msg2 [] = {{ .addr = 0x68, .flags = 0, .buf = rpt, len: 2 }, { .addr = 0x61, .flags = I2C_M_RD, .buf = stat, .len = 1 }}; - struct i2c_msg msg3 [] = {{ .addr = 0x68, .buf = rpt, .len = 2 }, - { .addr = 0x60, .buf = tda6100_buf, .len = 2 }}; + struct i2c_msg msg3 [] = {{ .addr = 0x68, .flags = 0, .buf = rpt, len: 2 }, + { .addr = 0x60, .flags = 0, .buf = tda6100_buf, .len = 2 }}; stv0299_writereg (i2c, 0x01, 0x15); stv0299_writereg (i2c, 0x02, 0x30); diff -Nru a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c --- a/drivers/media/dvb/ttpci/av7110.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/dvb/ttpci/av7110.c 2004-11-10 17:19:05 -08:00 @@ -67,7 +67,8 @@ #include "av7110_ca.h" #include "av7110_ipack.h" -static int av7110_debug; +int av7110_debug; + static int vidmode=CVBS_RGB_OUT; static int pids_off; static int adac=DVB_ADAC_TI; @@ -110,7 +111,7 @@ av7110->has_analog_tuner = 0; av7110->current_input = 0; if (i2c_writereg(av7110, 0x20, 0x00, 0x00) == 1) { - printk ("av7110(%d): Crystal audio DAC detected\n", + printk ("dvb-ttpci: Crystal audio DAC @ card %d detected\n", av7110->dvb_adapter->num); av7110->adac_type = DVB_ADAC_CRYSTAL; i2c_writereg(av7110, 0x20, 0x01, 0xd2); @@ -125,13 +126,13 @@ /* done. */ } else if (dev->pci->subsystem_vendor == 0x110a) { - printk("av7110(%d): DVB-C w/o analog module detected\n", + printk("dvb-ttpci: DVB-C w/o analog module @ card %d detected\n", av7110->dvb_adapter->num); av7110->adac_type = DVB_ADAC_NONE; } else { av7110->adac_type = adac; - printk("av7110(%d): adac type set to %d\n", + printk("dvb-ttpci: adac type set to %d @ card %d\n", av7110->dvb_adapter->num, av7110->adac_type); } @@ -150,7 +151,7 @@ static void recover_arm(struct av7110 *av7110) { - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n",av7110); av7110_bootarm(av7110); msleep(100); @@ -160,7 +161,7 @@ static void arm_error(struct av7110 *av7110) { - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n",av7110); av7110->arm_errors++; av7110->arm_ready=0; @@ -173,7 +174,7 @@ u16 newloops = 0; int timeout; - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n",av7110); lock_kernel (); daemonize ("arm_mon"); @@ -199,7 +200,7 @@ up(&av7110->dcomlock); if (newloops==av7110->arm_loops) { - printk(KERN_ERR "av7110%d: ARM crashed!\n", + printk(KERN_ERR "dvb-ttpci: ARM crashed @ card %d\n", av7110->dvb_adapter->num); arm_error(av7110); @@ -231,7 +232,7 @@ { static struct av7110 *last; - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n",av7110); if (!av7110) av7110 = last; @@ -248,13 +249,13 @@ void av7110_register_irc_handler(void (*func)(u32)) { - DEB_EE(("registering %p\n", func)); + dprintk(4, "registering %p\n", func); irc_handler = func; } void av7110_unregister_irc_handler(void (*func)(u32)) { - DEB_EE(("unregistering %p\n", func)); + dprintk(4, "unregistering %p\n", func); irc_handler = NULL; } @@ -268,7 +269,7 @@ void IR_handle(struct av7110 *av7110, u32 ircom) { - DEB_S(("av7110: ircommand = %08x\n", ircom)); + dprintk(4, "ircommand = %08x\n", ircom); irtask.data = (unsigned long) ircom; tasklet_schedule(&irtask); } @@ -283,8 +284,6 @@ enum dmx_success success, struct av7110 *av7110) { - DEB_INT(("av7110: %p\n",av7110)); - if (!dvbdmxfilter->feed->demux->dmx.frontend) return 0; if (dvbdmxfilter->feed->demux->dmx.frontend->source==DMX_MEMORY_FE) @@ -344,7 +343,7 @@ int type=av7110->debitype; int handle=(type>>8)&0x1f; -// DEB_EE(("av7110: %p\n",av7110)); +// dprintk(4, "%p\n",av7110); print_time("debi"); saa7146_write(av7110->dev, IER, @@ -476,10 +475,8 @@ u32 rxbuf, txbuf; int len; - //printk("GPIO0 irq\n"); - if (av7110->debitype !=-1) - printk("GPIO0 irq oops @ %ld, psr:0x%08x, ssr:0x%08x\n", + printk("dvb-ttpci: GPIO0 irq oops @ %ld, psr:0x%08x, ssr:0x%08x\n", jiffies, saa7146_read(av7110->dev, PSR), saa7146_read(av7110->dev, SSR)); @@ -497,10 +494,10 @@ txbuf=irdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); len = (av7110->debilen + 3) & ~3; -// DEB_D(("GPIO0 irq %d %d\n", av7110->debitype, av7110->debilen)); +// dprintk(8, "GPIO0 irq %d %d\n", av7110->debitype, av7110->debilen); print_time("gpio"); -// DEB_D(("GPIO0 irq %02x\n", av7110->debitype&0xff)); +// dprintk(8, "GPIO0 irq %02x\n", av7110->debitype&0xff); switch (av7110->debitype&0xff) { case DATA_TS_PLAY: @@ -519,10 +516,10 @@ iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); av7110->video_size.h = h_ar & 0xfff; - DEB_D(("GPIO0 irq: DATA_MPEG_VIDEO_EVENT: w/h/ar = %u/%u/%u\n", + dprintk(8, "GPIO0 irq: DATA_MPEG_VIDEO_EVENT: w/h/ar = %u/%u/%u\n", av7110->video_size.w, av7110->video_size.h, - av7110->video_size.aspect_ratio)); + av7110->video_size.aspect_ratio); event.type = VIDEO_EVENT_SIZE_CHANGED; event.u.size.w = av7110->video_size.w; @@ -610,7 +607,7 @@ iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); break; } - DEB_D(("GPIO0 PES_PLAY len=%04x\n", len)); + dprintk(8, "GPIO0 PES_PLAY len=%04x\n", len); iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2); iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2); saa7146_wait_for_debi_done(av7110->dev); @@ -688,7 +685,7 @@ break; default: - printk("gpioirq unknown type=%d len=%d\n", + printk("dvb-ttpci: gpioirq unknown type=%d len=%d\n", av7110->debitype, av7110->debilen); break; } @@ -705,7 +702,7 @@ struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); if (cmd == OSD_SEND_CMD) return av7110_osd_cmd(av7110, (osd_cmd_t *) parg); @@ -736,7 +733,7 @@ static inline int SetPIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, u16 subpid, u16 pcrpid) { - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); if (vpid == 0x1fff || apid == 0x1fff || ttpid == 0x1fff || subpid == 0x1fff || pcrpid == 0x1fff) { @@ -754,7 +751,7 @@ void ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, u16 subpid, u16 pcrpid) { - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); if (down_interruptible(&av7110->pid_mutex)) return; @@ -793,7 +790,7 @@ // u16 mode=0x0320; u16 mode=0xb96a; - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n", av7110); if (dvbdmxfilter->type == DMX_TYPE_SEC) { if (hw_sections) { @@ -817,7 +814,7 @@ ret = av7110_fw_request(av7110, buf, 20, &handle, 1); if (ret < 0) { - printk("StartHWFilter error\n"); + dprintk(1, "StartHWFilter error\n"); return ret; } @@ -835,13 +832,11 @@ int ret; u16 handle; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); handle = dvbdmxfilter->hw_handle; if (handle > 32) { - DEB_S(("dvb: StopHWFilter tried to stop invalid filter %d.\n", - handle)); - DEB_S(("dvb: filter type = %d\n", dvbdmxfilter->type)); + dprintk(1, "StopHWFilter tried to stop invalid filter %d, filter type = %d\n", handle, dvbdmxfilter->type); return 0; } @@ -852,10 +847,10 @@ buf[2] = handle; ret = av7110_fw_request(av7110, buf, 3, answ, 2); if (ret) - printk("StopHWFilter error\n"); + dprintk(1, "StopHWFilter error\n"); if (answ[1] != handle) { - DEB_S(("dvb: filter %d shutdown error :%d\n", handle, answ[1])); + dprintk(2, "filter %d shutdown error :%d\n", handle, answ[1]); ret = -1; } return ret; @@ -869,7 +864,7 @@ u16 *pid = dvbdmx->pids, npids[5]; int i; - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n", av7110); npids[0] = npids[1] = npids[2] = npids[3] = npids[4] = 0xffff; i = dvbdmxfeed->pes_type; @@ -902,7 +897,7 @@ u16 *pid = dvbdmx->pids, npids[5]; int i; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); if (dvbdmxfeed->pes_type <= 1) { av7110_av_stop(av7110, dvbdmxfeed->pes_type ? RP_VIDEO : RP_AUDIO); @@ -935,7 +930,7 @@ struct dvb_demux *demux = feed->demux; struct av7110 *av7110 = (struct av7110 *) demux->priv; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); if (!demux->dmx.frontend) return -EINVAL; @@ -993,7 +988,7 @@ struct dvb_demux *demux = feed->demux; struct av7110 *av7110 = (struct av7110 *) demux->priv; - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n", av7110); if (feed->type == DMX_TYPE_TS) { if (feed->ts_type & TS_DECODER) { @@ -1035,7 +1030,7 @@ int mode; int i; - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n", av7110); mode = av7110->playing; av7110->playing = 0; @@ -1068,7 +1063,7 @@ BUG(); av7110 = (struct av7110 *) dvbdemux->priv; - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n", av7110); if (num != 0) return -EINVAL; @@ -1078,14 +1073,14 @@ printk(KERN_ERR "%s: av7110_fw_request error\n", __FUNCTION__); return -EIO; } - DEB_EE(("av7110: fwstc = %04hx %04hx %04hx %04hx\n", - fwstc[0], fwstc[1], fwstc[2], fwstc[3])); + dprintk(2, "fwstc = %04hx %04hx %04hx %04hx\n", + fwstc[0], fwstc[1], fwstc[2], fwstc[3]); *stc = (((uint64_t) ((fwstc[3] & 0x8000) >> 15)) << 32) | (((uint64_t) fwstc[1]) << 16) | ((uint64_t) fwstc[0]); *base = 1; - DEB_EE(("av7110: stc = %lu\n", (unsigned long)*stc)); + dprintk(4, "stc = %lu\n", (unsigned long)*stc); return 0; } @@ -1099,7 +1094,7 @@ { struct av7110 *av7110 = fe->before_after_data; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); switch (cmd) { case FE_SET_TONE: @@ -1138,7 +1133,7 @@ { struct av7110 *av7110 = data; - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n", av7110); av7110->fe_synced = (s & FE_HAS_LOCK) ? 1 : 0; @@ -1168,7 +1163,7 @@ int ret, i; struct dvb_demux *dvbdemux=&av7110->demux; - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n", av7110); if (av7110->registered) return -1; @@ -1243,7 +1238,7 @@ { struct dvb_demux *dvbdemux=&av7110->demux; - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n", av7110); if (!av7110->registered) return; @@ -1397,7 +1392,7 @@ /* check if the firmware is available */ av7110->bin_fw = (unsigned char*) vmalloc(fw->size); if (NULL == av7110->bin_fw) { - DEB_D(("out of memory\n")); + dprintk(1, "out of memory\n"); release_firmware(fw); return -ENOMEM; } @@ -1440,14 +1435,14 @@ struct av7110 *av7110 = NULL; int ret = 0; - DEB_EE(("dev: %p\n", dev)); + dprintk(4, "dev: %p\n", dev); /* prepare the av7110 device struct */ if (!(av7110 = kmalloc (sizeof (struct av7110), GFP_KERNEL))) { - printk ("%s: out of memory!\n", __FUNCTION__); + dprintk(1, "out of memory\n"); return -ENOMEM; } - DEB_EE(("av7110: %p\n", av7110)); + memset(av7110, 0, sizeof(struct av7110)); av7110->card_name = (char*)pci_ext->ext_priv; @@ -1547,11 +1542,11 @@ } if (FW_VERSION(av7110->arm_app)<0x2501) - printk ("av7110: Warning, firmware version 0x%04x is too old. " + printk ("dvb-ttpci: Warning, firmware version 0x%04x is too old. " "System might be unstable!\n", FW_VERSION(av7110->arm_app)); if (kernel_thread(arm_thread, (void *) av7110, 0) < 0) { - printk(KERN_ERR "av7110(%d): faile to start arm_mon kernel thread\n", + printk("dvb-ttpci: failed to start arm_mon kernel thread @ card %d\n", av7110->dvb_adapter->num); goto err2; } @@ -1572,7 +1567,7 @@ if (ret) goto err3; - printk(KERN_INFO "av7110: found av7110-%d.\n",av7110_num); + printk(KERN_INFO "dvb-ttpci: found av7110-%d.\n", av7110_num); av7110->device_initialized = 1; av7110_num++; return 0; @@ -1604,7 +1599,7 @@ static int av7110_detach (struct saa7146_dev* saa) { struct av7110 *av7110 = (struct av7110*)saa->ext_priv; - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n", av7110); if( 0 == av7110->device_initialized ) { return 0; @@ -1652,8 +1647,6 @@ static void av7110_irq(struct saa7146_dev* dev, u32 *isr) { struct av7110 *av7110 = (struct av7110*)dev->ext_priv; - -// DEB_INT(("dev: %p, av7110: %p\n",dev,av7110)); if (*isr & MASK_19) tasklet_schedule (&av7110->debi_tasklet); diff -Nru a/drivers/media/dvb/ttpci/av7110.h b/drivers/media/dvb/ttpci/av7110.h --- a/drivers/media/dvb/ttpci/av7110.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/media/dvb/ttpci/av7110.h 2004-11-10 17:19:02 -08:00 @@ -27,6 +27,11 @@ #include +extern int av7110_debug; + +#define dprintk(level,args...) \ + do { if ((av7110_debug & level)) { printk("dvb-ttpci: %s(): ", __FUNCTION__); printk(args); } } while (0) + #define MAXFILT 32 enum {AV_PES_STREAM, PS_STREAM, TS_STREAM, PES_STREAM}; diff -Nru a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c --- a/drivers/media/dvb/ttpci/av7110_av.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/media/dvb/ttpci/av7110_av.c 2004-11-10 17:19:03 -08:00 @@ -98,8 +98,6 @@ { struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) p2t->priv; -// DEB_EE(("struct dvb_filter_pes2ts:%p\n", p2t)); - if (!(dvbdmxfeed->ts_type & TS_PACKET)) return 0; if (buf[3] == 0xe0) // video PES do not have a length in TS @@ -115,8 +113,6 @@ { struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) priv; -// DEB_EE(("dvb_demux_feed:%p\n", dvbdmxfeed)); - dvbdmxfeed->cb.ts(data, 188, NULL, 0, &dvbdmxfeed->feed.ts, DMX_OK); return 0; @@ -127,7 +123,7 @@ { struct dvb_demux *dvbdmx = dvbdmxfeed->demux; - DEB_EE(("av7110: %p, dvb_demux_feed:%p\n", av7110, dvbdmxfeed)); + dprintk(2, "av7110:%p, , dvb_demux_feed:%p\n", av7110, dvbdmxfeed); if (av7110->playing || (av7110->rec_mode & av)) return -EBUSY; @@ -169,7 +165,7 @@ int av7110_av_start_play(struct av7110 *av7110, int av) { - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if (av7110->rec_mode) return -EBUSY; @@ -202,7 +198,7 @@ void av7110_av_stop(struct av7110 *av7110, int av) { - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if (!(av7110->playing & av) && !(av7110->rec_mode & av)) return; @@ -243,8 +239,6 @@ u32 sync; u16 blen; - DEB_EE(("dvb_ring_buffer_t: %p\n", buf)); - if (!dlen) { wake_up(&buf->queue); return -1; @@ -275,8 +269,8 @@ dvb_ringbuffer_read(buf, dest, (size_t) blen, 0); - DEB_S(("pread=0x%08lx, pwrite=0x%08lx\n", - (unsigned long) buf->pread, (unsigned long) buf->pwrite)); + dprintk(2, "pread=0x%08lx, pwrite=0x%08lx\n", + (unsigned long) buf->pread, (unsigned long) buf->pwrite); wake_up(&buf->queue); return blen; } @@ -286,7 +280,7 @@ { int err, vol, val, balance = 0; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); av7110->mixer.volume_left = volleft; av7110->mixer.volume_right = volright; @@ -325,7 +319,7 @@ void av7110_set_vidmode(struct av7110 *av7110, int mode) { - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); av7110_fw_cmd(av7110, COMTYPE_ENCODER, LoadVidCode, 1, mode); @@ -353,7 +347,7 @@ int sw; u8 *p; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if (av7110->sinfo) return; @@ -366,7 +360,7 @@ vsize = ((p[1] &0x0F) << 8) | (p[2]); sw = (p[3] & 0x0F); av7110_set_vidmode(av7110, sw2mode[sw]); - DEB_S(("dvb: playback %dx%d fr=%d\n", hsize, vsize, sw)); + dprintk(2, "playback %dx%d fr=%d\n", hsize, vsize, sw); av7110->sinfo = 1; break; } @@ -403,7 +397,7 @@ static void play_video_cb(u8 *buf, int count, void *priv) { struct av7110 *av7110 = (struct av7110 *) priv; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if ((buf[3] & 0xe0) == 0xe0) { get_video_format(av7110, buf, count); @@ -415,7 +409,7 @@ static void play_audio_cb(u8 *buf, int count, void *priv) { struct av7110 *av7110 = (struct av7110 *) priv; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); aux_ring_buffer_write(&av7110->aout, buf, count); } @@ -427,7 +421,7 @@ unsigned long count, int nonblock, int type) { unsigned long todo = count, n; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if (!av7110->kbuf[type]) return -ENOBUFS; @@ -460,7 +454,7 @@ unsigned long count, int nonblock, int type) { unsigned long todo = count, n; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if (!av7110->kbuf[type]) return -ENOBUFS; @@ -490,7 +484,7 @@ unsigned long count, int nonblock, int type) { unsigned long todo = count, n; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if (!av7110->kbuf[type]) return -ENOBUFS; @@ -769,7 +763,7 @@ struct av7110 *av7110 = (struct av7110 *) demux->priv; struct ipack *ipack = &av7110->ipack[feed->pes_type]; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); switch (feed->pes_type) { case 0: @@ -810,8 +804,6 @@ struct dvb_video_events *events = &av7110->video_events; int wp; - DEB_D(("\n")); - spin_lock_bh(&events->lock); wp = (events->eventw + 1) % MAX_VIDEO_EVENT; @@ -834,8 +826,6 @@ { struct dvb_video_events *events = &av7110->video_events; - DEB_D(("\n")); - if (events->overflow) { events->overflow = 0; return -EOVERFLOW; @@ -874,7 +864,7 @@ struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; unsigned int mask = 0; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if ((file->f_flags & O_ACCMODE) != O_RDONLY) poll_wait(file, &av7110->avout.queue, wait); @@ -901,7 +891,7 @@ struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if ((file->f_flags & O_ACCMODE) == O_RDONLY) return -EPERM; @@ -918,7 +908,7 @@ struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; unsigned int mask = 0; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); poll_wait(file, &av7110->aout.queue, wait); @@ -937,7 +927,7 @@ struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if (av7110->audiostate.stream_source != AUDIO_SOURCE_MEMORY) { printk(KERN_ERR "not audio source memory\n"); @@ -954,7 +944,7 @@ { int i, n; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if (!(av7110->playing & RP_VIDEO)) { if (av7110_av_start_play(av7110, RP_VIDEO) < 0) @@ -984,7 +974,7 @@ unsigned long arg = (unsigned long) parg; int ret = 0; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if ((file->f_flags & O_ACCMODE) == O_RDONLY) { if ( cmd != VIDEO_GET_STATUS && cmd != VIDEO_GET_EVENT && @@ -1180,7 +1170,7 @@ unsigned long arg = (unsigned long) parg; int ret = 0; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if (((file->f_flags & O_ACCMODE) == O_RDONLY) && (cmd != AUDIO_GET_STATUS)) @@ -1296,7 +1286,7 @@ struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; int err; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if ((err = dvb_generic_open(inode, file)) < 0) return err; @@ -1320,7 +1310,7 @@ struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if ((file->f_flags & O_ACCMODE) != O_RDONLY) { av7110_av_stop(av7110, RP_VIDEO); @@ -1335,7 +1325,7 @@ struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; int err=dvb_generic_open(inode, file); - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); if (err < 0) return err; @@ -1349,7 +1339,7 @@ struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(2, "av7110:%p, \n", av7110); av7110_av_stop(av7110, RP_AUDIO); return dvb_generic_release(inode, file); diff -Nru a/drivers/media/dvb/ttpci/av7110_ca.c b/drivers/media/dvb/ttpci/av7110_ca.c --- a/drivers/media/dvb/ttpci/av7110_ca.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/dvb/ttpci/av7110_ca.c 2004-11-10 17:19:05 -08:00 @@ -44,7 +44,7 @@ void CI_handle(struct av7110 *av7110, u8 *data, u16 len) { - DEB_EE(("av7110: %p\n", av7110)); + dprintk(8, "av7110:%p\n",av7110); if (len < 3) return; @@ -207,7 +207,7 @@ struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; int err = dvb_generic_open(inode, file); - DEB_EE(("av7110: %p\n", av7110)); + dprintk(8, "av7110:%p\n",av7110); if (err < 0) return err; @@ -223,13 +223,16 @@ struct dvb_ringbuffer *wbuf = &av7110->ci_wbuffer; unsigned int mask = 0; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(8, "av7110:%p\n",av7110); poll_wait(file, &rbuf->queue, wait); + poll_wait(file, &wbuf->queue, wait); + if (!dvb_ringbuffer_empty(rbuf)) - mask |= POLLIN; - if (dvb_ringbuffer_avail(wbuf) > 1024) - mask |= POLLOUT; + mask |= (POLLIN | POLLRDNORM); + + if (dvb_ringbuffer_free(wbuf) > 1024) + mask |= (POLLOUT | POLLWRNORM); return mask; } @@ -241,7 +244,7 @@ struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; unsigned long arg = (unsigned long) parg; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(8, "av7110:%p\n",av7110); switch (cmd) { case CA_RESET: @@ -318,7 +321,7 @@ struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(8, "av7110:%p\n",av7110); return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos); } @@ -328,7 +331,7 @@ struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(8, "av7110:%p\n",av7110); return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos); } diff -Nru a/drivers/media/dvb/ttpci/av7110_hw.c b/drivers/media/dvb/ttpci/av7110_hw.c --- a/drivers/media/dvb/ttpci/av7110_hw.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/dvb/ttpci/av7110_hw.c 2004-11-10 17:19:05 -08:00 @@ -110,7 +110,7 @@ IER_ENABLE(av7110->dev, MASK_03); av7110->arm_ready = 1; - printk("av7110: ARM RESET\n"); + dprintk(1, "reset ARM\n"); } @@ -118,7 +118,7 @@ { int k; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); for (k = 0; k < 100; k++) { if (irdebi(av7110, DEBINOSWAP, adr, 0, 2) == state) @@ -134,7 +134,7 @@ int blocks, rest; u32 base, bootblock = BOOT_BLOCK; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); blocks = len / BOOT_MAX_SIZE; rest = len % BOOT_MAX_SIZE; @@ -143,7 +143,7 @@ for (i = 0; i < blocks; i++) { if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) return -1; - DEB_D(("Writing DRAM block %d\n", i)); + dprintk(4, "writing DRAM block %d\n", i); mwdebi(av7110, DEBISWAB, bootblock, ((char*)data) + i * BOOT_MAX_SIZE, BOOT_MAX_SIZE); bootblock ^= 0x1400; @@ -206,7 +206,7 @@ u32 ret; int i; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTLO); @@ -222,17 +222,17 @@ /* test DEBI */ iwdebi(av7110, DEBISWAP, DPRAM_BASE, 0x76543210, 4); if ((ret=irdebi(av7110, DEBINOSWAP, DPRAM_BASE, 0, 4)) != 0x10325476) { - printk(KERN_ERR "dvb: debi test in av7110_bootarm() failed: " - "%08x != %08x (check your BIOS hotplug settings)\n", + printk(KERN_ERR "dvb-ttpci: debi test in av7110_bootarm() failed: " + "%08x != %08x (check your BIOS 'Plug&Play OS' settings)\n", ret, 0x10325476); return -1; } for (i = 0; i < 8192; i += 4) iwdebi(av7110, DEBISWAP, DPRAM_BASE + i, 0x00, 4); - DEB_D(("av7110_bootarm: debi test OK\n")); + dprintk(2, "debi test OK\n"); /* boot */ - DEB_D(("av7110_bootarm: load boot code\n")); + dprintk(1, "load boot code\n"); saa7146_setgpio(dev, ARM_IRQ_LINE, SAA7146_GPIO_IRQLO); //saa7146_setgpio(dev, DEBI_DONE_LINE, SAA7146_GPIO_INPUT); //saa7146_setgpio(dev, 3, SAA7146_GPIO_INPUT); @@ -241,25 +241,25 @@ iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); if (saa7146_wait_for_debi_done(av7110->dev)) { - printk(KERN_ERR "dvb: av7110_bootarm(): " + printk(KERN_ERR "dvb-ttpci: av7110_bootarm(): " "saa7146_wait_for_debi_done() timed out\n"); return -1; } saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTHI); mdelay(1); - DEB_D(("av7110_bootarm: load dram code\n")); + dprintk(1, "load dram code\n"); if (load_dram(av7110, (u32 *)av7110->bin_root, av7110->size_root) < 0) return -1; saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTLO); mdelay(1); - DEB_D(("av7110_bootarm: load dpram code\n")); + dprintk(1, "load dpram code\n"); mwdebi(av7110, DEBISWAB, DPRAM_BASE, av7110->bin_dpram, av7110->size_dpram); if (saa7146_wait_for_debi_done(av7110->dev)) { - printk(KERN_ERR "dvb: av7110_bootarm(): " + printk(KERN_ERR "dvb-ttpci: av7110_bootarm(): " "saa7146_wait_for_debi_done() timed out after loading DRAM\n"); return -1; } @@ -289,10 +289,10 @@ u32 stat; #endif -// DEB_EE(("av7110: %p\n", av7110)); +// dprintk(4, "%p\n", av7110); if (!av7110->arm_ready) { - DEB_D(("arm not ready.\n")); + dprintk(1, "arm not ready.\n"); return -1; } @@ -300,7 +300,7 @@ while (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2 )) { msleep(1); if (time_after(jiffies, start + ARM_WAIT_FREE)) { - printk(KERN_ERR "%s: timeout waiting for COMMAND idle\n", __FUNCTION__); + printk(KERN_ERR "dvb-ttpci: %s(): timeout waiting for COMMAND idle\n", __FUNCTION__); return -1; } } @@ -310,7 +310,7 @@ while (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2 )) { msleep(1); if (time_after(jiffies, start + ARM_WAIT_SHAKE)) { - printk(KERN_ERR "%s: timeout waiting for HANDSHAKE_REG\n", __FUNCTION__); + printk(KERN_ERR "dvb-ttpci: %s(): timeout waiting for HANDSHAKE_REG\n", __FUNCTION__); return -1; } } @@ -320,7 +320,7 @@ while (rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2) & OSDQFull) { msleep(1); if (time_after(jiffies, start + ARM_WAIT_OSD)) { - printk(KERN_ERR "%s: timeout waiting for !OSDQFull\n", __FUNCTION__); + printk(KERN_ERR "dvb-ttpci: %s(): timeout waiting for !OSDQFull\n", __FUNCTION__); return -1; } } @@ -339,7 +339,7 @@ while (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2 )) { msleep(1); if (time_after(jiffies, start + ARM_WAIT_FREE)) { - printk(KERN_ERR "%s: timeout waiting for COMMAND to complete\n", + printk(KERN_ERR "dvb-ttpci: %s(): timeout waiting for COMMAND to complete\n", __FUNCTION__); return -1; } @@ -347,11 +347,11 @@ stat = rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2); if (stat & GPMQOver) { - printk(KERN_ERR "%s: GPMQOver\n", __FUNCTION__); + printk(KERN_ERR "dvb-ttpci: %s(): GPMQOver\n", __FUNCTION__); return -1; } else if (stat & OSDQOver) { - printk(KERN_ERR "%s: OSDQOver\n", __FUNCTION__); + printk(KERN_ERR "dvb-ttpci: %s(): OSDQOver\n", __FUNCTION__); return -1; } #endif @@ -363,10 +363,10 @@ { int ret; -// DEB_EE(("av7110: %p\n", av7110)); +// dprintk(4, "%p\n", av7110); if (!av7110->arm_ready) { - DEB_D(("arm not ready.\n")); + dprintk(1, "arm not ready.\n"); return -1; } if (down_interruptible(&av7110->dcomlock)) @@ -375,7 +375,7 @@ ret = __av7110_send_fw_cmd(av7110, buf, length); up(&av7110->dcomlock); if (ret) - printk("av7110_send_fw_cmd error\n"); + printk("dvb-ttpci: %s(): av7110_send_fw_cmd error\n", __FUNCTION__); return ret; } @@ -385,7 +385,7 @@ u16 buf[num + 2]; int i, ret; -// DEB_EE(("av7110: %p\n",av7110)); +// dprintk(4, "%p\n", av7110); buf[0] = ((type << 8) | com); buf[1] = num; @@ -399,7 +399,7 @@ ret = av7110_send_fw_cmd(av7110, buf, num + 2); if (ret) - printk("av7110_fw_cmd error\n"); + printk("dvb-ttpci: av7110_fw_cmd error\n"); return ret; } @@ -409,7 +409,7 @@ u16 cmd[18] = { ((COMTYPE_COMMON_IF << 8) + subcom), 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); for(i = 0; i < len && i < 32; i++) { @@ -421,7 +421,7 @@ ret = av7110_send_fw_cmd(av7110, cmd, 18); if (ret) - printk("av7110_send_ci_cmd error\n"); + printk("dvb-ttpci: av7110_send_ci_cmd error\n"); return ret; } @@ -435,10 +435,10 @@ u32 stat; #endif - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); if (!av7110->arm_ready) { - DEB_D(("arm not ready.\n")); + dprintk(1, "arm not ready.\n"); return -1; } @@ -447,7 +447,7 @@ if ((err = __av7110_send_fw_cmd(av7110, request_buf, request_buf_len)) < 0) { up(&av7110->dcomlock); - printk("av7110_fw_request error\n"); + printk("dvb-ttpci: av7110_fw_request error\n"); return err; } @@ -457,7 +457,7 @@ msleep(1); #endif if (time_after(jiffies, start + ARM_WAIT_FREE)) { - printk("%s: timeout waiting for COMMAND to complete\n", __FUNCTION__); + printk(KERN_ERR "%s: timeout waiting for COMMAND to complete\n", __FUNCTION__); up(&av7110->dcomlock); return -1; } @@ -501,7 +501,7 @@ int ret; ret = av7110_fw_request(av7110, &tag, 0, buf, length); if (ret) - printk("av7110_fw_query error\n"); + printk("dvb-ttpci: av7110_fw_query error\n"); return ret; } @@ -516,10 +516,10 @@ u16 buf[20]; u16 tag = ((COMTYPE_REQUEST << 8) + ReqVersion); - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); if (av7110_fw_query(av7110, tag, buf, 16)) { - printk("DVB: AV7110-%d: ERROR: Failed to boot firmware\n", + printk("dvb-ttpci: failed to boot firmware @ card %d\n", av7110->dvb_adapter->num); return -EIO; } @@ -530,17 +530,17 @@ av7110->arm_app = (buf[6] << 16) + buf[7]; av7110->avtype = (buf[8] << 16) + buf[9]; - printk("DVB: AV711%d(%d) - firm %08x, rtsl %08x, vid %08x, app %08x\n", - av7110->avtype, av7110->dvb_adapter->num, av7110->arm_fw, + printk("dvb-ttpci: info @ card %d: firm %08x, rtsl %08x, vid %08x, app %08x\n", + av7110->dvb_adapter->num, av7110->arm_fw, av7110->arm_rtsl, av7110->arm_vid, av7110->arm_app); /* print firmware capabilities */ if (FW_CI_LL_SUPPORT(av7110->arm_app)) - printk("DVB: AV711%d(%d) - firmware supports CI link layer interface\n", - av7110->avtype, av7110->dvb_adapter->num); + printk("dvb-ttpci: firmware @ card %d supports CI link layer interface\n", + av7110->dvb_adapter->num); else - printk("DVB: AV711%d(%d) - no firmware support for CI link layer interface\n", - av7110->avtype, av7110->dvb_adapter->num); + printk("dvb-ttpci: no firmware support for CI link layer interface @ card %d\n", + av7110->dvb_adapter->num); return 0; } @@ -552,7 +552,7 @@ u16 buf[18] = { ((COMTYPE_AUDIODAC << 8) + SendDiSEqC), 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); if (len > 10) len = 10; @@ -569,7 +569,7 @@ buf[i + 4] = msg[i]; if (av7110_send_fw_cmd(av7110, buf, 18)) - printk("av7110_diseqc_send error\n"); + printk("dvb-ttpci: av7110_diseqc_send error\n"); return 0; } @@ -628,7 +628,7 @@ while (rdebi(av7110, DEBINOSWAP, BUFF1_BASE, 0, 2)) { msleep(1); if (time_after(jiffies, start + ARM_WAIT_OSD)) { - printk(KERN_ERR "%s: timeout waiting for BUFF1_BASE == 0\n", + printk(KERN_ERR "dvb-ttpci: %s(): timeout waiting for BUFF1_BASE == 0\n", __FUNCTION__); up(&av7110->dcomlock); return -1; @@ -652,7 +652,7 @@ while (rdebi(av7110, DEBINOSWAP, BUFF1_BASE, 0, 2)) { msleep(1); if (time_after(jiffies, start + ARM_WAIT_OSD)) { - printk(KERN_ERR "%s: timeout waiting for BUFF1_BASE == 0\n", + printk(KERN_ERR "dvb-ttpci: %s: timeout waiting for BUFF1_BASE == 0\n", __FUNCTION__); up(&av7110->dcomlock); return -1; @@ -663,7 +663,7 @@ while (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2)) { msleep(1); if (time_after(jiffies, start + ARM_WAIT_SHAKE)) { - printk(KERN_ERR "%s: timeout waiting for HANDSHAKE_REG\n", + printk(KERN_ERR "dvb-ttpci: %s: timeout waiting for HANDSHAKE_REG\n", __FUNCTION__); up(&av7110->dcomlock); return -1; @@ -678,7 +678,7 @@ ret = __av7110_send_fw_cmd(av7110, cbuf, 5); up(&av7110->dcomlock); if (ret) - printk("WriteText error\n"); + printk("dvb-ttpci: WriteText error\n"); return ret; } @@ -741,7 +741,7 @@ u8 c; int ret; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); ret = wait_event_interruptible_timeout(av7110->bmpq, av7110->bmp_state != BMP_LOADING, HZ); if (ret == -ERESTARTSYS || ret == 0) { @@ -794,7 +794,7 @@ { int ret; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); BUG_ON (av7110->bmp_state == BMP_NONE); @@ -812,7 +812,7 @@ static inline int ReleaseBitmap(struct av7110 *av7110) { - DEB_EE(("av7110: %p\n",av7110)); + dprintk(4, "%p\n", av7110); if (av7110->bmp_state != BMP_LOADED) return -1; diff -Nru a/drivers/media/dvb/ttpci/av7110_ir.c b/drivers/media/dvb/ttpci/av7110_ir.c --- a/drivers/media/dvb/ttpci/av7110_ir.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/media/dvb/ttpci/av7110_ir.c 2004-11-10 17:19:03 -08:00 @@ -4,18 +4,13 @@ #include #include #include -#include +#include #include "av7110.h" #define UP_TIMEOUT (HZ/4) -static int av7110_ir_debug; - -module_param_named(debug_ir, av7110_ir_debug, int, 0644); -MODULE_PARM_DESC(av7110_ir_debug, "Turn on/off IR debugging (default:off)."); - -#define dprintk(x...) do { if (av7110_ir_debug) printk (x); } while (0) +/* enable ir debugging by or'ing av7110_debug with 16 */ static struct input_dev input_dev; @@ -78,7 +73,7 @@ keycode = key_map[data]; - dprintk ("#########%08x######### addr %i data 0x%02x (keycode %i)\n", + dprintk(16, "#########%08x######### addr %i data 0x%02x (keycode %i)\n", ircom, addr, data, keycode); /* check device address (if selected) */ diff -Nru a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c --- a/drivers/media/dvb/ttpci/av7110_v4l.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/dvb/ttpci/av7110_v4l.c 2004-11-10 17:19:04 -08:00 @@ -45,8 +45,8 @@ struct i2c_msg msgs = { .flags = 0, .addr = 0x40, .len = 5, .buf = msg }; if (i2c_transfer(&av7110->i2c_adap, &msgs, 1) != 1) { - printk("av7110(%d): %s(%u = %u) failed\n", - av7110->dvb_adapter->num, __FUNCTION__, reg, val); + dprintk(1, "dvb-ttpci: failed @ card %d, %u = %u\n", + av7110->dvb_adapter->num, reg, val); return -EIO; } return 0; @@ -62,8 +62,8 @@ }; if (i2c_transfer(&av7110->i2c_adap, &msgs[0], 2) != 2) { - printk("av7110(%d): %s(%u) failed\n", - av7110->dvb_adapter->num, __FUNCTION__, reg); + dprintk(1, "dvb-ttpci: failed @ card %d, %u\n", + av7110->dvb_adapter->num, reg); return -EIO; } *val = (msg2[0] << 8) | msg2[1]; @@ -99,7 +99,7 @@ u8 buf[] = { 0x00, reg, data }; struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = 3 }; - DEB_EE(("av7710: dev: %p\n", dev)); + dprintk(4, "dev: %p\n", dev); if (1 != saa7146_i2c_transfer(dev, &msg, 1, 1)) return -1; @@ -110,7 +110,7 @@ { struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = data, .len = 4 }; - DEB_EE(("av7710: dev: %p\n", dev)); + dprintk(4, "dev: %p\n", dev); if (1 != saa7146_i2c_transfer(dev, &msg, 1, 1)) return -1; @@ -128,7 +128,7 @@ u8 config; u8 buf[4]; - DEB_EE(("av7710: freq: 0x%08x\n", freq)); + dprintk(4, "freq: 0x%08x\n", freq); /* magic number: 614. tuning with the frequency given by v4l2 is always off by 614*62.5 = 38375 kHz...*/ @@ -171,13 +171,13 @@ u8 band = 0; int source, sync, err; - DEB_EE(("av7110: %p\n", av7110)); + dprintk(4, "%p\n", av7110); if ((vv->video_status & STATUS_OVERLAY) != 0) { vv->ov_suspend = vv->video_fh; err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL */ if (err != 0) { - DEB_D(("warning: suspending video failed\n")); + dprintk(2, "suspending video failed\n"); vv->ov_suspend = NULL; } } @@ -188,7 +188,7 @@ source = SAA7146_HPS_SOURCE_PORT_B; sync = SAA7146_HPS_SYNC_PORT_B; memcpy(standard, analog_standard, sizeof(struct saa7146_standard) * 2); - printk("av7110: switching to analog TV\n"); + dprintk(1, "switching to analog TV\n"); msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0000); // loudspeaker source msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0000); // headphone source msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0000); // SCART 1 source @@ -201,7 +201,7 @@ source = SAA7146_HPS_SOURCE_PORT_A; sync = SAA7146_HPS_SYNC_PORT_A; memcpy(standard, dvb_standard, sizeof(struct saa7146_standard) * 2); - printk("av7110: switching DVB mode\n"); + dprintk(1, "switching DVB mode\n"); msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); // loudspeaker source msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0220); // headphone source msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0220); // SCART 1 source @@ -212,10 +212,11 @@ /* hmm, this does not do anything!? */ if (av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, adswitch)) - printk("ADSwitch error\n"); + dprintk(1, "ADSwitch error\n"); if (ves1820_writereg(dev, 0x0f, band)) - printk("setting band in demodulator failed.\n"); + dprintk(1, "setting band in demodulator failed.\n"); + saa7146_set_hps_source_and_sync(dev, source, sync); if (vv->ov_suspend != NULL) { @@ -230,7 +231,7 @@ { struct saa7146_dev *dev = fh->dev; struct av7110 *av7110 = (struct av7110*) dev->ext_priv; - DEB_EE(("saa7146_dev: %p\n", dev)); + dprintk(4, "saa7146_dev: %p\n", dev); switch (cmd) { case VIDIOC_G_TUNER: @@ -239,7 +240,7 @@ u16 stereo_det; s8 stereo; - DEB_EE(("VIDIOC_G_TUNER: %d\n", t->index)); + dprintk(2, "VIDIOC_G_TUNER: %d\n", t->index); if (!av7110->has_analog_tuner || t->index != 0) return -EINVAL; @@ -258,10 +259,10 @@ // FIXME: standard / stereo detection is still broken msp_readreg(av7110, MSP_RD_DEM, 0x007e, &stereo_det); -printk("VIDIOC_G_TUNER: msp3400 TV standard detection: 0x%04x\n", stereo_det); + dprintk(1, "VIDIOC_G_TUNER: msp3400 TV standard detection: 0x%04x\n", stereo_det); msp_readreg(av7110, MSP_RD_DSP, 0x0018, &stereo_det); - printk("VIDIOC_G_TUNER: msp3400 stereo detection: 0x%04x\n", stereo_det); + dprintk(1, "VIDIOC_G_TUNER: msp3400 stereo detection: 0x%04x\n", stereo_det); stereo = (s8)(stereo_det >> 8); if (stereo > 0x10) { /* stereo */ @@ -282,29 +283,29 @@ { struct v4l2_tuner *t = arg; u16 fm_matrix, src; - DEB_EE(("VIDIOC_S_TUNER: %d\n", t->index)); + dprintk(2, "VIDIOC_S_TUNER: %d\n", t->index); if (!av7110->has_analog_tuner || av7110->current_input != 1) return -EINVAL; switch (t->audmode) { case V4L2_TUNER_MODE_STEREO: - DEB_D(("VIDIOC_S_TUNER: V4L2_TUNER_MODE_STEREO\n")); + dprintk(2, "VIDIOC_S_TUNER: V4L2_TUNER_MODE_STEREO\n"); fm_matrix = 0x3001; // stereo src = 0x0020; break; case V4L2_TUNER_MODE_LANG1: - DEB_D(("VIDIOC_S_TUNER: V4L2_TUNER_MODE_LANG1\n")); + dprintk(2, "VIDIOC_S_TUNER: V4L2_TUNER_MODE_LANG1\n"); fm_matrix = 0x3000; // mono src = 0x0000; break; case V4L2_TUNER_MODE_LANG2: - DEB_D(("VIDIOC_S_TUNER: V4L2_TUNER_MODE_LANG2\n")); + dprintk(2, "VIDIOC_S_TUNER: V4L2_TUNER_MODE_LANG2\n"); fm_matrix = 0x3000; // mono src = 0x0010; break; default: /* case V4L2_TUNER_MODE_MONO: {*/ - DEB_D(("VIDIOC_S_TUNER: TDA9840_SET_MONO\n")); + dprintk(2, "VIDIOC_S_TUNER: TDA9840_SET_MONO\n"); fm_matrix = 0x3000; // mono src = 0x0030; break; @@ -319,7 +320,7 @@ { struct v4l2_frequency *f = arg; - DEB_EE(("VIDIOC_G_FREQ: freq:0x%08x.\n", f->frequency)); + dprintk(2, "VIDIOC_G_FREQ: freq:0x%08x.\n", f->frequency); if (!av7110->has_analog_tuner || av7110->current_input != 1) return -EINVAL; @@ -333,7 +334,7 @@ { struct v4l2_frequency *f = arg; - DEB_EE(("VIDIOC_S_FREQUENCY: freq:0x%08x.\n", f->frequency)); + dprintk(2, "VIDIOC_S_FREQUENCY: freq:0x%08x.\n", f->frequency); if (!av7110->has_analog_tuner || av7110->current_input != 1) return -EINVAL; @@ -358,7 +359,7 @@ { struct v4l2_input *i = arg; - DEB_EE(("VIDIOC_ENUMINPUT: %d\n", i->index)); + dprintk(2, "VIDIOC_ENUMINPUT: %d\n", i->index); if (av7110->has_analog_tuner ) { if (i->index < 0 || i->index >= 2) @@ -376,14 +377,14 @@ { int *input = (int *)arg; *input = av7110->current_input; - DEB_EE(("VIDIOC_G_INPUT: %d\n", *input)); + dprintk(2, "VIDIOC_G_INPUT: %d\n", *input); return 0; } case VIDIOC_S_INPUT: { int input = *(int *)arg; - DEB_EE(("VIDIOC_S_INPUT: %d\n", input)); + dprintk(2, "VIDIOC_S_INPUT: %d\n", input); if (!av7110->has_analog_tuner ) return 0; @@ -399,7 +400,7 @@ { struct v4l2_audio *a = arg; - DEB_EE(("VIDIOC_G_AUDIO: %d\n", a->index)); + dprintk(2, "VIDIOC_G_AUDIO: %d\n", a->index); if (a->index != 0) return -EINVAL; memcpy(a, &msp3400_v4l2_audio, sizeof(struct v4l2_audio)); @@ -408,7 +409,7 @@ case VIDIOC_S_AUDIO: { struct v4l2_audio *a = arg; - DEB_EE(("VIDIOC_S_AUDIO: %d\n", a->index)); + dprintk(2, "VIDIOC_S_AUDIO: %d\n", a->index); break; } default: @@ -506,13 +507,13 @@ || i2c_writereg(av7110, 0x80, 0x0, 0) != 1) return -ENODEV; - printk("av7110(%d): DVB-C analog module detected, initializing MSP3400\n", + printk("dvb-ttpci: DVB-C analog module @ card %d detected, initializing MSP3400\n", av7110->dvb_adapter->num); av7110->adac_type = DVB_ADAC_MSP; msleep(100); // the probing above resets the msp... msp_readreg(av7110, MSP_RD_DSP, 0x001e, &version1); msp_readreg(av7110, MSP_RD_DSP, 0x001f, &version2); - printk("av7110(%d): MSP3400 version 0x%04x 0x%04x\n", + dprintk(1, "dvb-ttpci: @ card %d MSP3400 version 0x%04x 0x%04x\n", av7110->dvb_adapter->num, version1, version2); msp_writereg(av7110, MSP_WR_DSP, 0x0013, 0x0c00); msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x7f00); // loudspeaker + headphone @@ -531,8 +532,7 @@ /* init the saa7113 */ while (*i != 0xff) { if (i2c_writereg(av7110, 0x48, i[0], i[1]) != 1) { - printk("av7110(%d): saa7113 initialization failed", - av7110->dvb_adapter->num); + dprintk(1, "saa7113 initialization failed @ card %d", av7110->dvb_adapter->num); break; } i += 2; diff -Nru a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c --- a/drivers/media/dvb/ttpci/budget-av.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/media/dvb/ttpci/budget-av.c 2004-11-10 17:19:06 -08:00 @@ -127,19 +127,18 @@ const u8 *data = saa7113_tab; if (i2c_writereg (&budget->i2c_adap, 0x4a, 0x01, 0x08) != 1) { - DEB_D(("saa7113: not found on KNC card\n")); + dprintk(1, "saa7113 not found on KNC card\n"); return -ENODEV; } - INFO(("saa7113: detected and initializing\n")); + dprintk(1, "saa7113 detected and initializing\n"); while (*data != 0xff) { i2c_writereg(&budget->i2c_adap, 0x4a, *data, *(data+1)); data += 2; } - DEB_D(("saa7113: status=%02x\n", - i2c_readreg(&budget->i2c_adap, 0x4a, 0x1f))); + dprintk(1, "saa7113 status=%02x\n", i2c_readreg(&budget->i2c_adap, 0x4a, 0x1f)); return 0; } @@ -171,7 +170,7 @@ struct budget_av *budget_av = (struct budget_av*) dev->ext_priv; int err; - DEB_EE(("dev: %p\n",dev)); + dprintk(2, "dev: %p\n", dev); if ( 1 == budget_av->has_saa7113 ) { saa7146_setgpio(dev, 0, SAA7146_GPIO_OUTLO); @@ -198,7 +197,7 @@ u8 *mac; int err; - DEB_EE(("dev: %p\n",dev)); + dprintk(2, "dev: %p\n", dev); if (bi->type != BUDGET_KNC1 && bi->type != BUDGET_CIN1200) { return -ENODEV; @@ -299,7 +298,7 @@ { struct v4l2_input *i = arg; - DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index)); + dprintk(1, "VIDIOC_ENUMINPUT %d.\n", i->index); if( i->index < 0 || i->index >= KNC1_INPUTS) { return -EINVAL; } @@ -312,19 +311,16 @@ *input = budget_av->cur_input; - DEB_EE(("VIDIOC_G_INPUT %d.\n",*input)); + dprintk(1, "VIDIOC_G_INPUT %d.\n", *input); return 0; } case VIDIOC_S_INPUT: { int input = *(int *)arg; - DEB_EE(("VIDIOC_S_INPUT %d.\n", input)); + dprintk(1, "VIDIOC_S_INPUT %d.\n", input); return saa7113_setinput (budget_av, input); } default: -/* - DEB2(printk("does not handle this ioctl.\n")); -*/ return -ENOIOCTLCMD; } return 0; @@ -384,21 +380,13 @@ .irq_func = ttpci_budget_irq10_handler, }; - static int __init budget_av_init(void) { - DEB_EE((".\n")); - - if (saa7146_register_extension(&budget_extension)) - return -ENODEV; - - return 0; + return saa7146_register_extension(&budget_extension); } - static void __exit budget_av_exit(void) { - DEB_EE((".\n")); saa7146_unregister_extension(&budget_extension); } diff -Nru a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c --- a/drivers/media/dvb/ttpci/budget-ci.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/media/dvb/ttpci/budget-ci.c 2004-11-10 17:19:02 -08:00 @@ -500,7 +500,7 @@ { struct budget_ci *budget_ci = (struct budget_ci*) dev->ext_priv; - DEB_EE(("dev: %p, budget_ci: %p\n", dev, budget_ci)); + dprintk(8, "dev: %p, budget_ci: %p\n", dev, budget_ci); if (*isr & MASK_06) tasklet_schedule (&budget_ci->msp430_irq_tasklet); @@ -523,7 +523,7 @@ if (!(budget_ci = kmalloc (sizeof(struct budget_ci), GFP_KERNEL))) return -ENOMEM; - DEB_EE(("budget_ci: %p\n", budget_ci)); + dprintk(2, "budget_ci: %p\n", budget_ci); spin_lock_init(&budget_ci->debilock); budget_ci->budget.ci_present = 0; @@ -606,10 +606,8 @@ return saa7146_register_extension(&budget_extension); } - static void __exit budget_ci_exit(void) { - DEB_EE((".\n")); saa7146_unregister_extension(&budget_extension); } diff -Nru a/drivers/media/dvb/ttpci/budget-core.c b/drivers/media/dvb/ttpci/budget-core.c --- a/drivers/media/dvb/ttpci/budget-core.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/media/dvb/ttpci/budget-core.c 2004-11-10 17:19:03 -08:00 @@ -50,7 +50,7 @@ static int stop_ts_capture(struct budget *budget) { - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); if (--budget->feeding) return budget->feeding; @@ -65,7 +65,7 @@ { struct saa7146_dev *dev=budget->dev; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); if (budget->feeding) return ++budget->feeding; @@ -171,7 +171,7 @@ struct budget *budget = (struct budget*) demux->priv; int status; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); if (!demux->dmx.frontend) return -EINVAL; @@ -188,7 +188,7 @@ struct budget *budget = (struct budget *) demux->priv; int status; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); spin_lock(&budget->feedlock); status = stop_ts_capture (budget); @@ -202,7 +202,7 @@ struct dvb_demux *dvbdemux=&budget->demux; int ret; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); dvbdemux->priv = (void *) budget; @@ -251,7 +251,7 @@ { struct dvb_demux *dvbdemux=&budget->demux; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); dvb_net_release(&budget->dvb_net); @@ -294,7 +294,7 @@ memset(budget, 0, sizeof(struct budget)); - DEB_EE(("dev: %p, budget: %p\n", dev, budget)); + dprintk(2, "dev: %p, budget: %p\n", dev, budget); budget->card = bi; budget->dev = (struct saa7146_dev *) dev; @@ -377,7 +377,7 @@ { struct saa7146_dev *dev = budget->dev; - DEB_EE(("budget: %p\n", budget)); + dprintk(2, "budget: %p\n", budget); budget_unregister (budget); @@ -398,7 +398,7 @@ { struct budget *budget = (struct budget*)dev->ext_priv; - DEB_EE(("dev: %p, budget: %p\n",dev,budget)); + dprintk(8, "dev: %p, budget: %p\n",dev,budget); if (*isr & MASK_10) tasklet_schedule (&budget->vpe_tasklet); diff -Nru a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c --- a/drivers/media/dvb/ttpci/budget-patch.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/media/dvb/ttpci/budget-patch.c 2004-11-10 17:19:02 -08:00 @@ -30,9 +30,9 @@ * the project's page is at http://www.linuxtv.org/dvb/ */ -#include "budget.h" #include "av7110.h" #include "av7110_hw.h" +#include "budget.h" #define budget_patch budget @@ -51,7 +51,7 @@ { struct saa7146_dev *dev=budget->dev; - DEB_EE(("budget: %p\n", budget)); + dprintk(2, "budget: %p\n", budget); if (count <= 0 || count > 4) return -1; @@ -71,7 +71,7 @@ { int i; - DEB_EE(("budget: %p\n", budget)); + dprintk(2, "budget: %p\n", budget); for (i = 2; i < length; i++) budget_wdebi(budget, DEBINOSWAP, COMMAND + 2*i, (u32) buf[i], 2); @@ -90,7 +90,7 @@ { u16 buf[2] = {( COMTYPE_AUDIODAC << 8) | (state ? ON22K : OFF22K), 0}; - DEB_EE(("budget: %p\n", budget)); + dprintk(2, "budget: %p\n", budget); budget_av7110_send_fw_cmd(budget, buf, 2); } @@ -101,7 +101,7 @@ u16 buf[18] = { ((COMTYPE_AUDIODAC << 8) | SendDiSEqC), 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - DEB_EE(("budget: %p\n", budget)); + dprintk(2, "budget: %p\n", budget); if (len>10) len=10; @@ -126,7 +126,7 @@ { struct budget_patch *budget = fe->before_after_data; - DEB_EE(("budget: %p\n", budget)); + dprintk(2, "budget: %p\n", budget); switch (cmd) { case FE_SET_TONE: @@ -171,7 +171,7 @@ if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL))) return -ENOMEM; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); if ((err = ttpci_budget_init (budget, dev, info))) { kfree (budget); @@ -251,10 +251,8 @@ return saa7146_register_extension(&budget_extension); } - static void __exit budget_patch_exit(void) { - DEB_EE((".\n")); saa7146_unregister_extension(&budget_extension); } diff -Nru a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c --- a/drivers/media/dvb/ttpci/budget.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/dvb/ttpci/budget.c 2004-11-10 17:19:05 -08:00 @@ -39,7 +39,7 @@ static void Set22K (struct budget *budget, int state) { struct saa7146_dev *dev=budget->dev; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); saa7146_setgpio(dev, 3, (state ? SAA7146_GPIO_OUTHI : SAA7146_GPIO_OUTLO)); } @@ -51,7 +51,7 @@ static void DiseqcSendBit (struct budget *budget, int data) { struct saa7146_dev *dev=budget->dev; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); udelay(data ? 500 : 1000); @@ -64,7 +64,7 @@ { int i, par=1, d; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); for (i=7; i>=0; i--) { d = (data>>i)&1; @@ -81,7 +81,7 @@ struct saa7146_dev *dev=budget->dev; int i; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); mdelay(16); @@ -110,7 +110,7 @@ { struct budget *budget = fe->before_after_data; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); switch (cmd) { case FE_SET_TONE: @@ -155,7 +155,7 @@ { struct saa7146_dev *dev=budget->dev; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); switch (voltage) { case SEC_VOLTAGE_13: @@ -176,7 +176,7 @@ { struct budget *budget = fe->before_after_data; - DEB_EE(("budget: %p\n",budget)); + dprintk(2, "budget: %p\n", budget); switch (cmd) { case FE_SET_VOLTAGE: @@ -199,7 +199,7 @@ return -ENOMEM; } - DEB_EE(("dev:%p, info:%p, budget:%p\n",dev,info,budget)); + dprintk(2, "dev:%p, info:%p, budget:%p\n", dev, info, budget); dev->ext_priv = budget; @@ -289,7 +289,6 @@ static void __exit budget_exit(void) { - DEB_EE((".\n")); saa7146_unregister_extension(&budget_extension); } diff -Nru a/drivers/media/dvb/ttpci/budget.h b/drivers/media/dvb/ttpci/budget.h --- a/drivers/media/dvb/ttpci/budget.h 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/dvb/ttpci/budget.h 2004-11-10 17:19:05 -08:00 @@ -13,6 +13,13 @@ extern int budget_debug; +#ifdef dprintk +#undef dprintk +#endif + +#define dprintk(level,args...) \ + do { if ((budget_debug & level)) { printk("%s: %s(): ",__stringify(KBUILD_MODNAME), __FUNCTION__); printk(args); } } while (0) + struct budget_info { char *name; int type; diff -Nru a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c --- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c 2004-11-10 17:19:06 -08:00 @@ -1293,6 +1293,7 @@ ttusb_dec_set_model(dec, TTUSB_DEC3000S); break; case 0x00070009: + case 0x00070013: ttusb_dec_set_model(dec, TTUSB_DEC2000T); break; case 0x00070011: diff -Nru a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig --- a/drivers/media/video/Kconfig 2004-11-10 17:19:06 -08:00 +++ b/drivers/media/video/Kconfig 2004-11-10 17:19:06 -08:00 @@ -9,8 +9,13 @@ config VIDEO_BT848 tristate "BT848 Video For Linux" - depends on VIDEO_DEV && PCI && I2C && FW_LOADER + depends on VIDEO_DEV && PCI && I2C select I2C_ALGOBIT + select FW_LOADER + select VIDEO_BTCX + select VIDEO_BUF + select VIDEO_IR + select VIDEO_TUNER ---help--- Support for BT848 based frame grabber/overlay boards. This includes the Miro, Hauppauge and STB boards. Please read the material in @@ -214,8 +219,8 @@ module will be called zr36120. config VIDEO_MEYE - tristate "Sony Vaio Picturebook Motion Eye Video For Linux (EXPERIMENTAL)" - depends on VIDEO_DEV && SONYPI && !HIGHMEM64G + tristate "Sony Vaio Picturebook Motion Eye Video For Linux" + depends on VIDEO_DEV && PCI && SONYPI && !HIGHMEM64G ---help--- This is the video4linux driver for the Motion Eye camera found in the Vaio Picturebook laptops. Please read the material in @@ -230,6 +235,9 @@ config VIDEO_SAA7134 tristate "Philips SAA7134 support" depends on VIDEO_DEV && PCI && I2C + select VIDEO_BUF + select VIDEO_IR + select VIDEO_TUNER ---help--- This is a video4linux driver for Philips SAA7130/7134 based TV cards. @@ -241,6 +249,7 @@ tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" depends on VIDEO_DEV && PCI select VIDEO_SAA7146_VV + select VIDEO_TUNER ---help--- This is a video4linux driver for the 'Multimedia eXtension Board' TV card by Siemens-Nixdorf. @@ -287,7 +296,11 @@ config VIDEO_CX88 tristate "Conexant 2388x (bt878 successor) support" - depends on VIDEO_DEV && PCI && I2C_ALGOBIT && EXPERIMENTAL + depends on VIDEO_DEV && PCI && EXPERIMENTAL + select I2C_ALGOBIT + select VIDEO_BTCX + select VIDEO_BUF + select VIDEO_TUNER ---help--- This is a video4linux driver for Conexant 2388x based TV cards. diff -Nru a/drivers/media/video/bt848.h b/drivers/media/video/bt848.h --- a/drivers/media/video/bt848.h 2004-11-10 17:19:03 -08:00 +++ b/drivers/media/video/bt848.h 2004-11-10 17:19:03 -08:00 @@ -1,4 +1,4 @@ -/* +/* bt848.h - Bt848 register offsets Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de) @@ -22,10 +22,10 @@ #define _BT848_H_ #ifndef PCI_VENDOR_ID_BROOKTREE -#define PCI_VENDOR_ID_BROOKTREE 0x109e +#define PCI_VENDOR_ID_BROOKTREE 0x109e #endif #ifndef PCI_DEVICE_ID_BT848 -#define PCI_DEVICE_ID_BT848 0x350 +#define PCI_DEVICE_ID_BT848 0x350 #endif #ifndef PCI_DEVICE_ID_BT849 #define PCI_DEVICE_ID_BT849 0x351 @@ -50,7 +50,7 @@ #define BT848_DSTATUS_LOF (1<<1) #define BT848_DSTATUS_COF (1<<0) -#define BT848_IFORM 0x004 +#define BT848_IFORM 0x004 #define BT848_IFORM_HACTIVE (1<<7) #define BT848_IFORM_MUXSEL (3<<5) #define BT848_IFORM_MUX0 (2<<5) @@ -71,7 +71,7 @@ #define BT848_IFORM_AUTO 0 #define BT848_IFORM_NORM 7 -#define BT848_TDEC 0x008 +#define BT848_TDEC 0x008 #define BT848_TDEC_DEC_FIELD (1<<7) #define BT848_TDEC_FLDALIGN (1<<6) #define BT848_TDEC_DEC_RAT (0x1f) diff -Nru a/drivers/media/video/btcx-risc.c b/drivers/media/video/btcx-risc.c --- a/drivers/media/video/btcx-risc.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/media/video/btcx-risc.c 2004-11-10 17:19:02 -08:00 @@ -1,5 +1,5 @@ /* - $Id: btcx-risc.c,v 1.2 2004/09/15 16:15:24 kraxel Exp $ + $Id: btcx-risc.c,v 1.3 2004/10/13 10:39:00 kraxel Exp $ btcx-risc.c @@ -189,7 +189,7 @@ { unsigned int clip,skip; int end,maxline; - + skip=0; maxline = 9999; for (clip = 0; clip < nclips; clip++) { @@ -199,7 +199,7 @@ continue; if (clips[clip].c.left > (signed)width) break; - + /* vertical range */ if (line > clips[clip].c.top+clips[clip].c.height-1) continue; diff -Nru a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c --- a/drivers/media/video/bttv-cards.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/video/bttv-cards.c 2004-11-10 17:19:04 -08:00 @@ -1,5 +1,5 @@ /* - $Id: bttv-cards.c,v 1.28 2004/10/06 13:45:14 kraxel Exp $ + $Id: bttv-cards.c,v 1.29 2004/10/13 10:39:00 kraxel Exp $ bttv-cards.c @@ -143,7 +143,7 @@ int __init bttv_parse(char *str, int max, int *vals) { int i,number,res = 2; - + for (i = 0; res == 2 && i < max; i++) { res = get_option(&str,&number); if (res) @@ -192,7 +192,7 @@ { 0x3000121a, BTTV_VOODOOTV_FM, "3Dfx VoodooTV FM/ VoodooTV 200" }, { 0x263710b4, BTTV_VOODOOTV_FM, "3Dfx VoodooTV FM/ VoodooTV 200" }, { 0x3060121a, BTTV_STB2, "3Dfx VoodooTV 100/ STB OEM" }, - + { 0x3000144f, BTTV_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" }, { 0x3002144f, BTTV_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" }, { 0x3005144f, BTTV_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" }, @@ -210,7 +210,7 @@ { 0x1118153b, BTTV_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" }, { 0x1119153b, BTTV_TERRATVALUE, "Terratec TValue (Philips PAL I)" }, { 0x111a153b, BTTV_TERRATVALUE, "Terratec TValue (Temic PAL I)" }, - + { 0x1123153b, BTTV_TERRATVRADIO, "Terratec TV Radio+" }, { 0x1127153b, BTTV_TERRATV, "Terratec TV+ (V1.05)" }, // clashes with FlyVideo @@ -246,7 +246,7 @@ { 0xa1550000, BTTV_IVC200, "IVC-200" }, { 0xa1550001, BTTV_IVC200, "IVC-200" }, { 0xa1550002, BTTV_IVC200, "IVC-200" }, - { 0xa1550003, BTTV_IVC200, "IVC-200" }, + { 0xa1550003, BTTV_IVC200, "IVC-200" }, { 0xa1550100, BTTV_IVC200, "IVC-200G" }, { 0xa1550101, BTTV_IVC200, "IVC-200G" }, { 0xa1550102, BTTV_IVC200, "IVC-200G" }, @@ -267,10 +267,10 @@ { 0xa182ff0d, BTTV_IVC120, "IVC-120G" }, { 0xa182ff0e, BTTV_IVC120, "IVC-120G" }, { 0xa182ff0f, BTTV_IVC120, "IVC-120G" }, - + { 0x41424344, BTTV_GRANDTEC, "GrandTec Multi Capture" }, { 0x01020304, BTTV_XGUARD, "Grandtec Grand X-Guard" }, - + { 0x18501851, BTTV_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" }, { 0xa0501851, BTTV_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" }, { 0x18511851, BTTV_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" }, @@ -302,7 +302,7 @@ // likely broken, vendor id doesn't match the other magic views ... //{ 0xa0fca04f, BTTV_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, - + // DVB cards (using pci function .1 for mpeg data xfer) { 0x01010071, BTTV_NEBULA_DIGITV, "Nebula Electronics DigiTV" }, { 0x07611461, BTTV_AVDVBT_761, "AverMedia AverTV DVB-T" }, @@ -311,7 +311,7 @@ { 0xfc00270f, BTTV_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" }, { 0x07711461, BTTV_AVDVBT_771, "AVermedia DVB-T 771" }, { 0xdb1018ac, BTTV_DVICO_DVBT_LITE, "DVICO FusionHDTV DVB-T Lite" }, - + { 0, -1, NULL } }; @@ -702,7 +702,7 @@ 10000 : ext. Video audio input 20000 : TV Mono a0000 : TV Mono/2 - 1a0000 : TV Stereo + 1a0000 : TV Stereo 30000 : Radio 40000 : Mute */ @@ -1117,7 +1117,7 @@ .pll = PLL_28, .tuner_type = 5, },{ - /* This is the ultimate cheapo capture card + /* This is the ultimate cheapo capture card * just a BT848A on a small PCB! * Steve Hosgood */ .name = "GrandTec 'Grand Video Capture' (Bt848)", @@ -1188,7 +1188,7 @@ .tuner_type = -1, },{ /* Miguel Angel Alvarez - new Easy TV BT878 version (model CPH061) + new Easy TV BT878 version (model CPH061) special thanks to Informatica Mieres for providing the card */ .name = "Askey CPH061/ BESTBUY Easy TV (bt878)", .video_inputs = 3, @@ -1392,7 +1392,7 @@ },{ .name = "Powercolor MTV878/ MTV878R/ MTV878F", .video_inputs = 3, - .audio_inputs = 2, + .audio_inputs = 2, .tuner = 0, .svhs = 2, .gpiomask = 0x1C800F, // Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset @@ -1570,7 +1570,7 @@ .no_tda9875 = 1, .no_tda7432 = 1, },{ - + /* ---- card 0x58 ---------------------------------- */ .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */ .video_inputs = 2, @@ -1663,11 +1663,11 @@ .tuner_type = -1, .no_msp34xx = 1, .no_tda9875 = 1, - .no_tda7432 = 1, + .no_tda7432 = 1, .gpiomask = 0x01, .audiomux = { 0, 0, 0, 0, 1 }, .muxsel = { 3, 0, 1, 2}, - .needs_tvaudio = 0, + .needs_tvaudio = 0, .pll = PLL_28, .no_gpioirq = 1, },{ @@ -1679,7 +1679,7 @@ .gpiomask = 2, // TV, Comp1, Composite over SVID con, SVID .muxsel = { 2, 3, 1, 1}, - .audiomux = { 2, 2, 0, 0, 0 }, + .audiomux = { 2, 2, 0, 0, 0 }, .pll = PLL_28, .has_radio = 1, .tuner_type = TUNER_PHILIPS_PAL, @@ -1764,7 +1764,7 @@ /* Notes: - card lacks subsystem ID - stereo variant w/ daughter board with tda9874a @0xb0 - - Audio Routing: + - Audio Routing: always from tda9874 independent of GPIO (?) external line in: unknown - Other chips: em78p156elp @ 0x96 (probably IR remote control) @@ -1848,7 +1848,7 @@ .audio_inputs = 0, .tuner = -1, /* card has no tuner */ .svhs = 3, - .gpiomask = 0x00, + .gpiomask = 0x00, .muxsel = { 2, 3, 1, 0}, .audiomux = { 0, 0, 0, 0, 0, 0 }, /* card has no audio */ .needs_tvaudio = 1, @@ -1921,7 +1921,7 @@ .no_tda9875 = 1, .no_tda7432 = 1, .gpiomask = 0x00, - .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 }, .muxsel_hook = ivc120_muxsel, .pll = PLL_28, @@ -2206,7 +2206,7 @@ for (type = -1, i = 0; cards[i].id != 0; i++) if (cards[i].id == btv->cardid) type = i; - + if (type != -1) { /* found it */ printk(KERN_INFO "bttv%d: detected: %s [card=%d], " @@ -2223,12 +2223,12 @@ printk(KERN_DEBUG "please mail id, board name and " "the correct card= insmod option to kraxel@bytesex.org\n"); } - } + } /* let the user override the autodetected type */ if (card[btv->c.nr] < bttv_num_tvcards) btv->c.type=card[btv->c.nr]; - + /* print which card config we are using */ printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type, @@ -2268,7 +2268,7 @@ void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256]) { int type = -1; - + if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13)) type = BTTV_MODTEC_205; else if (0 == strncmp(eeprom_data+20,"Picolo",7)) @@ -2284,7 +2284,7 @@ } static void flyvideo_gpio(struct bttv *btv) -{ +{ int gpio,has_remote,has_radio,is_capture_only,is_lr90,has_tda9820_tda9821; int tuner=-1,ttype; @@ -2298,10 +2298,10 @@ // CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1. // GPIO14-12: n.c. // LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878) - + // lowest 3 bytes are remote control codes (no handshake needed) // xxxFFF: No remote control chip soldered - // xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered + // xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered // Note: Some bits are Audio_Mask ! ttype=(gpio&0x0f0000)>>16; @@ -2329,18 +2329,18 @@ is_lr90 = !(gpio & 0x002000); // else LR26/LR50 (LR38/LR51 f. capture only) // gpio & 0x001000 // output bit for audio routing - if(is_capture_only) - tuner=4; // No tuner present + if(is_capture_only) + tuner=4; // No tuner present - printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n", - btv->c.nr, has_radio? "yes":"no ", has_remote? "yes":"no ", tuner, gpio); + printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n", + btv->c.nr, has_radio? "yes":"no ", has_remote? "yes":"no ", tuner, gpio); printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n", - btv->c.nr, is_lr90?"yes":"no ", has_tda9820_tda9821?"yes":"no ", + btv->c.nr, is_lr90?"yes":"no ", has_tda9820_tda9821?"yes":"no ", is_capture_only?"yes":"no "); if(tuner!= -1) // only set if known tuner autodetected, else let insmod option through btv->tuner_type = tuner; - btv->has_radio = has_radio; + btv->has_radio = has_radio; // LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80 // LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00 @@ -2439,13 +2439,13 @@ { gpio_inout(0xffffff,0xFFFF37); gpio_write(0x200020); - + /* flash strobe inverter ?! */ gpio_write(0x200024); - + /* switch sync drive off */ gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE); - + /* set BT848 muxel to 2 */ btaor((2)<<5, ~(2<<5), BT848_IFORM); } @@ -2534,7 +2534,7 @@ */ if (btv->id != 878) return; - + if (bttv_debug) printk("bttv%d: BT878A ARESET\n",btv->c.nr); btwrite((1<<7), 0x058); @@ -2581,7 +2581,7 @@ case BTTV_MIRO: case BTTV_MIROPRO: case BTTV_PINNACLE: - case BTTV_PINNACLEPRO: + case BTTV_PINNACLEPRO: /* miro/pinnacle */ miro_pinnacle_gpio(btv); break; @@ -2705,7 +2705,7 @@ /* tuner configuration (from card list / autodetect / insmod option) */ if (UNSET != bttv_tvcards[btv->c.type].tuner_type) - if(UNSET == btv->tuner_type) + if(UNSET == btv->tuner_type) btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type; if (UNSET != tuner[btv->c.nr]) btv->tuner_type = tuner[btv->c.nr]; @@ -2753,7 +2753,7 @@ bttv_I2CRead(btv, I2C_TDA9875, "TDA9875") >=0) request_module("tda9875"); - if (!bttv_tvcards[btv->c.type].no_tda7432 && + if (!bttv_tvcards[btv->c.type].no_tda7432 && bttv_I2CRead(btv, I2C_TDA7432, "TDA7432") >=0) request_module("tda7432"); @@ -2777,12 +2777,12 @@ /* ----------------------------------------------------------------------- */ /* some hauppauge specific stuff */ -static struct HAUPPAUGE_TUNER +static struct HAUPPAUGE_TUNER { int id; char *name; -} -hauppauge_tuner[] __devinitdata = +} +hauppauge_tuner[] __devinitdata = { { TUNER_ABSENT, "" }, { TUNER_ABSENT, "External" }, @@ -2832,7 +2832,7 @@ { TUNER_ABSENT, "Philips TD1536D_FH_44"}, { TUNER_LG_NTSC_FM, "LG TPI8NSR01F"}, { TUNER_LG_PAL_FM, "LG TPI8PSB01D"}, - { TUNER_LG_PAL, "LG TPI8PSB11D"}, + { TUNER_LG_PAL, "LG TPI8PSB11D"}, { TUNER_LG_PAL_I_FM, "LG TAPC-I001D"}, { TUNER_LG_PAL_I, "LG TAPC-I701D"} }; @@ -2872,12 +2872,12 @@ model = eeprom_data[12] << 8 | eeprom_data[11]; tuner = eeprom_data[9]; radio = eeprom_data[blk2-1] & 0x01; - + if (tuner < ARRAY_SIZE(hauppauge_tuner)) btv->tuner_type = hauppauge_tuner[tuner].id; if (radio) btv->has_radio = 1; - + if (bttv_verbose) printk(KERN_INFO "bttv%d: Hauppauge eeprom: model=%d, " "tuner=%s (%d), radio=%s\n", @@ -2914,7 +2914,7 @@ btv->has_matchbox = 0; } return 0; -} +} /* ----------------------------------------------------------------------- */ @@ -2941,7 +2941,7 @@ gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG); gpio_write(0); udelay(PVR_GPIO_DELAY); - + gpio_write(BTTV_ALT_NCONFIG); udelay(PVR_GPIO_DELAY); @@ -2951,7 +2951,7 @@ gpio_bits(BTTV_ALT_DCLK,0); if (bits & 0x01) gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA); - else + else gpio_bits(BTTV_ALT_DATA,0); gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK); bits >>= 1; @@ -2959,7 +2959,7 @@ } gpio_bits(BTTV_ALT_DCLK,0); udelay(PVR_GPIO_DELAY); - + /* begin Altera init loop (Not necessary,but doesn't hurt) */ for (i = 0 ; i < 30 ; i++) { gpio_bits(BTTV_ALT_DCLK,0); @@ -2971,7 +2971,7 @@ #if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE) /* old 2.4.x way -- via soundcore's mod_firmware_load */ - + static char *firm_altera = "/usr/lib/video4linux/hcwamc.rbf"; MODULE_PARM(firm_altera,"s"); MODULE_PARM_DESC(firm_altera,"WinTV/PVR firmware " @@ -2991,7 +2991,7 @@ btv->c.nr, firm_altera); return -1; } - + printk(KERN_INFO "bttv%d: uploading altera firmware [%s] ...\n", btv->c.nr, firm_altera); result = pvr_altera_load(btv, micro, microlen); @@ -3019,7 +3019,7 @@ btv->c.nr, (rc < 0) ? "failed" : "ok"); release_firmware(fw_entry); return rc; -} +} #endif /* ----------------------------------------------------------------------- */ @@ -3030,7 +3030,7 @@ int i = 0; unsigned char *ee = eeprom_data; unsigned long serial = 0; - + if (btv->c.type == 0) { /* this might be an antique... check for MMAC label in eeprom */ if ((ee[0]=='M') && (ee[1]=='M') && (ee[2]=='A') && (ee[3]=='C')) { @@ -3046,7 +3046,7 @@ } else { unsigned short type; int offset = 4*16; - + for(; offset < 8*16; offset += 16) { unsigned short checksum = 0; /* verify the checksum */ @@ -3057,13 +3057,13 @@ break; } } - + if (offset >= 8*16) return; /* found a valid descriptor */ type = (ee[offset+4]<<8) | (ee[offset+5]); - + switch(type) { /* 848 based */ @@ -3073,7 +3073,7 @@ case 0x0005: btv->c.type = BTTV_OSPREY101_848; break; - + /* 878 based */ case 0x0012: case 0x0013: @@ -3121,10 +3121,10 @@ | (ee[offset+8] << 8) | (ee[offset+9]); } - + printk(KERN_INFO "bttv%d: osprey eeprom: card=%d name=%s serial=%ld\n", btv->c.nr, btv->c.type, bttv_tvcards[btv->c.type].name,serial); -} +} /* ----------------------------------------------------------------------- */ /* AVermedia specific stuff, from bktr_card.c */ @@ -3166,7 +3166,7 @@ if (tuner_make == 1) if(tuner_format <=9) tuner = tuner_1_table[tuner_format]; - + printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=", btv->c.nr,eeprom_data[0x41],eeprom_data[0x42]); if(tuner) { @@ -3256,8 +3256,8 @@ /* ----------------------------------------------------------------------- */ /* Imagenation L-Model PXC200 Framegrabber */ -/* This is basically the same procedure as - * used by Alessandro Rubini in his pxc200 +/* This is basically the same procedure as + * used by Alessandro Rubini in his pxc200 * driver, but using BTTV functions */ static void __devinit init_PXC200(struct bttv *btv) @@ -3268,13 +3268,13 @@ unsigned int i; int tmp; u32 val; - + /* Initialise GPIO-connevted stuff */ gpio_inout(0xffffff, (1<<13)); gpio_write(0); udelay(3); gpio_write(1<<13); - /* GPIO inputs are pulled up, so no need to drive + /* GPIO inputs are pulled up, so no need to drive * reset pin any longer */ gpio_bits(0xffffff, 0); if (bttv_gpio) @@ -3289,16 +3289,16 @@ */ btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC); - + /* Initialise MAX517 DAC */ printk(KERN_INFO "Setting DAC reference voltage level ...\n"); bttv_I2CWrite(btv,0x5E,0,0x80,1); - + /* Initialise 12C508 PIC */ - /* The I2CWrite and I2CRead commmands are actually to the + /* The I2CWrite and I2CRead commmands are actually to the * same chips - but the R/W bit is included in the address * argument so the numbers are different */ - + printk(KERN_INFO "Initialising 12C508 PIC chip ...\n"); @@ -3306,7 +3306,7 @@ val = btread(BT848_GPIO_DMA_CTL); val |= BT848_GPIO_DMA_CTL_GPCLKMODE; btwrite(val, BT848_GPIO_DMA_CTL); - + /* Then, push to 0 the reset pin long enough to reset the * * device same as above for the reset line, but not the same * value sent to the GPIO-connected stuff @@ -3418,7 +3418,7 @@ unsigned long timeout; int value = 0; int i; - + /* better safe than sorry */ gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we); @@ -3430,10 +3430,10 @@ if (bttv_gpio) bttv_gpio_tracking(btv,"tea5757 read"); - + bus_low(btv,btv->mbox_we); bus_low(btv,btv->mbox_clk); - + udelay(10); timeout= jiffies + HZ; @@ -3465,7 +3465,7 @@ { int i; int reg = value; - + gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data); if (btv->mbox_ior) { @@ -3520,7 +3520,7 @@ v->flags |= VIDEO_AUDIO_VOLUME; return; } - + /* 32 levels logarithmic */ vol = 32 - ((v->volume>>11)); /* units */ @@ -3547,7 +3547,7 @@ data |= WINVIEW_PT2254_STROBE; data &= ~WINVIEW_PT2254_DATA; gpio_write(data); - udelay(10); + udelay(10); data &= ~WINVIEW_PT2254_STROBE; gpio_write(data); } @@ -3672,7 +3672,7 @@ avermedia_tv_stereo_audio(struct bttv *btv, struct video_audio *v, int set) { int val = 0; - + if (set) { if (v->mode & VIDEO_SOUND_LANG2) /* SAP */ val = 0x01; @@ -3807,7 +3807,7 @@ /* * Dariusz Kowalewski - * sound control for FlyVideo 2000S (with tda9874 decoder) + * sound control for FlyVideo 2000S (with tda9874 decoder) * based on pvbt878p9b_audio() - this is not tested, please fix!!! */ static void @@ -3990,13 +3990,13 @@ * ivc120_muxsel [Added by Alan Garfield ] * * The IVC120G security card has 4 i2c controlled TDA8540 matrix - * swichers to provide 16 channels to MUX0. The TDA8540's have - * 4 indepedant outputs and as such the IVC120G also has the - * optional "Monitor Out" bus. This allows the card to be looking + * swichers to provide 16 channels to MUX0. The TDA8540's have + * 4 indepedant outputs and as such the IVC120G also has the + * optional "Monitor Out" bus. This allows the card to be looking * at one input while the monitor is looking at another. * * Since I've couldn't be bothered figuring out how to add an - * independant muxsel for the monitor bus, I've just set it to + * independant muxsel for the monitor bus, I've just set it to * whatever the card is looking at. * * OUT0 of the TDA8540's is connected to MUX0 (0x03) @@ -4021,12 +4021,12 @@ static void ivc120_muxsel(struct bttv *btv, unsigned int input) { // Simple maths - int key = input % 4; + int key = input % 4; int matrix = input / 4; - + dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n", btv->c.nr, input, matrix, key); - + // Handles the input selection on the TDA8540's bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00, ((matrix == 3) ? (key | key << 2) : 0x00), 1); @@ -4036,17 +4036,17 @@ ((matrix == 1) ? (key | key << 2) : 0x00), 1); bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00, ((matrix == 2) ? (key | key << 2) : 0x00), 1); - + // Handles the output enables on the TDA8540's bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02, ((matrix == 3) ? 0x03 : 0x00), 1); // 13 - 16 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02, ((matrix == 0) ? 0x03 : 0x00), 1); // 1-4 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02, - ((matrix == 1) ? 0x03 : 0x00), 1); // 5-8 + ((matrix == 1) ? 0x03 : 0x00), 1); // 5-8 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02, ((matrix == 2) ? 0x03 : 0x00), 1); // 9-12 - + // Selects MUX0 for input on the 878 btaor((0)<<5, ~(3<<5), BT848_IFORM); } @@ -4153,7 +4153,7 @@ #if 0 /* print which chipset we have */ - while ((dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8,dev))) + while ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8,dev))) printk(KERN_INFO "bttv: Host bridge is %s\n",pci_name(dev)); #endif @@ -4172,8 +4172,8 @@ if (UNSET != latency) printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency); - while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL, - PCI_DEVICE_ID_INTEL_82441, dev))) { + while ((dev = pci_find_device(PCI_VENDOR_ID_INTEL, + PCI_DEVICE_ID_INTEL_82441, dev))) { unsigned char b; pci_read_config_byte(dev, 0x53, &b); if (bttv_debug) diff -Nru a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c --- a/drivers/media/video/bttv-driver.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/media/video/bttv-driver.c 2004-11-10 17:19:06 -08:00 @@ -1,26 +1,26 @@ /* - $Id: bttv-driver.c,v 1.22 2004/10/12 07:33:22 kraxel Exp $ + $Id: bttv-driver.c,v 1.23 2004/10/13 10:39:00 kraxel Exp $ bttv - Bt848 frame grabber driver - + Copyright (C) 1996,97,98 Ralph Metzler & Marcus Metzler (c) 1999-2002 Gerd Knorr - + some v4l2 code lines are taken from Justin's bttv2 driver which is (c) 2000 Justin Schoeman - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -195,7 +195,7 @@ .sheight = 576, .totalwidth = 1135, .adelay = 0x7f, - .bdelay = 0x72, + .bdelay = 0x72, .iform = (BT848_IFORM_PAL_BDGHI|BT848_IFORM_XT1), .scaledtwidth = 1135, .hdelayx1 = 186, @@ -683,20 +683,20 @@ /* ----------------------------------------------------------------------- */ /* If Bt848a or Bt849, use PLL for PAL/SECAM and crystal for NTSC */ -/* Frequency = (F_input / PLL_X) * PLL_I.PLL_F/PLL_C - PLL_X = Reference pre-divider (0=1, 1=2) +/* Frequency = (F_input / PLL_X) * PLL_I.PLL_F/PLL_C + PLL_X = Reference pre-divider (0=1, 1=2) PLL_C = Post divider (0=6, 1=4) - PLL_I = Integer input - PLL_F = Fractional input - - F_input = 28.636363 MHz: + PLL_I = Integer input + PLL_F = Fractional input + + F_input = 28.636363 MHz: PAL (CLKx2 = 35.46895 MHz): PLL_X = 1, PLL_I = 0x0E, PLL_F = 0xDCF9, PLL_C = 0 */ static void set_pll_freq(struct bttv *btv, unsigned int fin, unsigned int fout) { unsigned char fl, fh, fi; - + /* prevent overflows */ fin/=4; fout/=4; @@ -747,7 +747,7 @@ /* Let other people run while the PLL stabilizes */ vprintk("."); msleep(10); - + if (btread(BT848_DSTATUS) & BT848_DSTATUS_PLOCK) { btwrite(0,BT848_DSTATUS); } else { @@ -810,7 +810,7 @@ static void bt848_hue(struct bttv *btv, int hue) { int value; - + btv->hue = hue; /* -128 to 127 */ @@ -821,9 +821,9 @@ static void bt848_contrast(struct bttv *btv, int cont) { int value,hibit; - + btv->contrast = cont; - + /* 0-511 */ value = (cont >> 7); hibit = (value >> 6) & 4; @@ -835,7 +835,7 @@ static void bt848_sat(struct bttv *btv, int color) { int val_u,val_v,hibits; - + btv->saturation = color; /* 0-511 for the color */ @@ -977,7 +977,7 @@ set_input(struct bttv *btv, unsigned int input) { unsigned long flags; - + btv->input = input; if (irq_iswitch) { spin_lock_irqsave(&btv->s_lock,flags); @@ -1022,7 +1022,7 @@ static void init_bt848(struct bttv *btv) { int val; - + if (bttv_tvcards[btv->c.type].no_video) { /* very basic init only */ init_irqreg(btv); @@ -1039,7 +1039,7 @@ BT848_GPIO_DMA_CTL_PLTP1_16| BT848_GPIO_DMA_CTL_PLTP23_16| BT848_GPIO_DMA_CTL_GPINTC| - BT848_GPIO_DMA_CTL_GPINTI, + BT848_GPIO_DMA_CTL_GPINTI, BT848_GPIO_DMA_CTL); val = btv->opt_chroma_agc ? BT848_SCLOOP_CAGC : 0; @@ -1091,7 +1091,7 @@ { struct video_audio va; int i; - + for (i = 0; i < BTTV_CTLS; i++) if (bttv_ctls[i].id == c->id) break; @@ -1361,7 +1361,7 @@ { int redo_dma_risc = 0; int rc; - + /* check settings */ if (NULL == fmt) return -EINVAL; @@ -1381,7 +1381,7 @@ if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size) return -EINVAL; } - + /* alloc + fill struct bttv_buffer (if changed) */ if (buf->vb.width != width || buf->vb.height != height || buf->vb.field != field || @@ -1417,7 +1417,7 @@ buffer_setup(void *priv, unsigned int *count, unsigned int *size) { struct bttv_fh *fh = priv; - + *size = fh->fmt->depth*fh->width*fh->height >> 3; if (0 == *count) *count = gbuffers; @@ -1503,7 +1503,7 @@ case VIDIOCGTUNER: { struct video_tuner *v = arg; - + if (UNSET == bttv_tvcards[btv->c.type].tuner) return -EINVAL; if (v->tuner) /* Only tuner 0 */ @@ -1532,7 +1532,7 @@ up(&btv->lock); return 0; } - + case VIDIOCGCHAN: { struct video_channel *v = arg; @@ -1574,7 +1574,6 @@ return 0; } - bttv_call_i2c_clients(btv,cmd,v); btv->tvnorm = v->norm; set_input(btv,v->channel); up(&btv->lock); @@ -1615,7 +1614,7 @@ /* card specific hooks */ if (btv->audio_hook) btv->audio_hook(btv,v,1); - + up(&btv->lock); return 0; } @@ -1625,7 +1624,7 @@ { struct v4l2_standard *e = arg; unsigned int index = e->index; - + if (index >= BTTV_TVNORMS) return -EINVAL; v4l2_video_std_construct(e, bttv_tvnorms[e->index].v4l2_id, @@ -1659,7 +1658,7 @@ case VIDIOC_QUERYSTD: { v4l2_std_id *id = arg; - + if (btread(BT848_DSTATUS) & BT848_DSTATUS_NUML) *id = V4L2_STD_625_50; else @@ -1671,7 +1670,7 @@ { struct v4l2_input *i = arg; unsigned int n; - + n = i->index; if (n >= bttv_tvcards[btv->c.type].video_inputs) return -EINVAL; @@ -1708,7 +1707,7 @@ case VIDIOC_S_INPUT: { unsigned int *i = arg; - + if (*i > bttv_tvcards[btv->c.type].video_inputs) return -EINVAL; down(&btv->lock); @@ -1716,7 +1715,7 @@ up(&btv->lock); return 0; } - + case VIDIOC_G_TUNER: { struct v4l2_tuner *t = arg; @@ -1812,7 +1811,7 @@ default: return -ENOIOCTLCMD; - + } return 0; } @@ -1907,25 +1906,25 @@ default: BUG(); } - + down(&fh->cap.lock); if (fh->ov.clips) kfree(fh->ov.clips); fh->ov.clips = clips; fh->ov.nclips = n; - + fh->ov.w = win->w; fh->ov.field = win->field; fh->ov.setup_ok = 1; btv->init.ov.w.width = win->w.width; btv->init.ov.w.height = win->w.height; btv->init.ov.field = win->field; - + /* update overlay if needed */ retval = 0; if (check_btres(fh, RESOURCE_OVERLAY)) { struct bttv_buffer *new; - + new = videobuf_alloc(sizeof(*new)); bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new); retval = bttv_switch_overlay(btv,fh,new); @@ -1939,7 +1938,7 @@ static struct videobuf_queue* bttv_queue(struct bttv_fh *fh) { struct videobuf_queue* q = NULL; - + switch (fh->type) { case V4L2_BUF_TYPE_VIDEO_CAPTURE: q = &fh->cap; @@ -1956,7 +1955,7 @@ static int bttv_resource(struct bttv_fh *fh) { int res = 0; - + switch (fh->type) { case V4L2_BUF_TYPE_VIDEO_CAPTURE: res = RESOURCE_VIDEO; @@ -2065,7 +2064,7 @@ (f->fmt.pix.width * fmt->depth) >> 3; f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; - + return 0; } case V4L2_BUF_TYPE_VIDEO_OVERLAY: @@ -2083,7 +2082,7 @@ struct v4l2_format *f) { int retval; - + switch (f->type) { case V4L2_BUF_TYPE_VIDEO_CAPTURE: { @@ -2096,7 +2095,7 @@ if (0 != retval) return retval; fmt = format_by_fourcc(f->fmt.pix.pixelformat); - + /* update our state informations */ down(&fh->cap.lock); fh->fmt = fmt; @@ -2108,7 +2107,7 @@ btv->init.width = f->fmt.pix.width; btv->init.height = f->fmt.pix.height; up(&fh->cap.lock); - + return 0; } case V4L2_BUF_TYPE_VIDEO_OVERLAY: @@ -2218,7 +2217,7 @@ { struct video_picture *pic = arg; const struct bttv_format *fmt; - + fmt = format_by_palette(pic->palette); if (NULL == fmt) return -EINVAL; @@ -2365,7 +2364,7 @@ if (!check_alloc_btres(btv,fh,RESOURCE_OVERLAY)) return -EBUSY; - + down(&fh->cap.lock); if (*on) { fh->ov.tvnorm = btv->tvnorm; @@ -2419,7 +2418,7 @@ if (buf->vb.state == STATE_QUEUED || buf->vb.state == STATE_ACTIVE) goto fh_unlock_and_return; - + field = (vm->height > bttv_tvnorms[btv->tvnorm].sheight/2) ? V4L2_FIELD_INTERLACED : V4L2_FIELD_BOTTOM; @@ -2543,7 +2542,7 @@ V4L2_CAP_VIDEO_OVERLAY | V4L2_CAP_VBI_CAPTURE | V4L2_CAP_TUNER | - V4L2_CAP_READWRITE | + V4L2_CAP_READWRITE | V4L2_CAP_STREAMING; return 0; } @@ -2628,7 +2627,7 @@ { struct v4l2_framebuffer *fb = arg; const struct bttv_format *fmt; - + if(!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RAWIO)) return -EPERM; @@ -2657,7 +2656,7 @@ btv->fbuf.fmt.bytesperline = fb->fmt.bytesperline; else btv->fbuf.fmt.bytesperline = btv->fbuf.fmt.width*fmt->depth/8; - + retval = 0; fh->ovfmt = fmt; btv->init.ovfmt = fmt; @@ -2675,7 +2674,7 @@ if (check_btres(fh, RESOURCE_OVERLAY)) { struct bttv_buffer *new; - + new = videobuf_alloc(sizeof(*new)); bttv_overlay_risc(btv,&fh->ov,fh->ovfmt,new); retval = bttv_switch_overlay(btv,fh,new); @@ -2795,7 +2794,7 @@ } #endif - + case VIDIOC_ENUMSTD: case VIDIOC_G_STD: case VIDIOC_S_STD: @@ -2908,7 +2907,7 @@ up(&fh->cap.lock); buf = (struct bttv_buffer*)fh->cap.read_buf; } - + poll_wait(file, &buf->vb.done, wait); if (buf->vb.state == STATE_DONE || buf->vb.state == STATE_ERROR) @@ -2985,7 +2984,7 @@ /* turn off overlay */ if (check_btres(fh, RESOURCE_OVERLAY)) bttv_switch_overlay(btv,fh,NULL); - + /* stop video capture */ if (check_btres(fh, RESOURCE_VIDEO)) { videobuf_streamoff(file->private_data,&fh->cap); @@ -3140,7 +3139,7 @@ case VIDIOCSTUNER: /* nothing to do */ return 0; - + case BTTV_VERSION: case VIDIOCGFREQ: case VIDIOCSFREQ: @@ -3206,7 +3205,7 @@ static void bttv_print_irqbits(u32 print, u32 mark) { unsigned int i; - + printk("bits:"); for (i = 0; i < ARRAY_SIZE(irq_name); i++) { if (print & (1 << i)) @@ -3373,7 +3372,7 @@ struct bttv_buffer *ovbi; struct bttv_buffer *item; unsigned long flags; - + if (bttv_verbose) { printk(KERN_INFO "bttv%d: timeout: drop=%d irq=%d/%d, risc=%08x, ", btv->c.nr, btv->framedrop, btv->irq_me, btv->irq_total, @@ -3383,7 +3382,7 @@ } spin_lock_irqsave(&btv->s_lock,flags); - + /* deactivate stuff */ memset(&new,0,sizeof(new)); old = btv->curr; @@ -3412,7 +3411,7 @@ item->vb.state = STATE_ERROR; wake_up(&item->vb.done); } - + btv->errors++; spin_unlock_irqrestore(&btv->s_lock,flags); } @@ -3466,7 +3465,7 @@ spin_unlock(&btv->s_lock); return; } - + /* switch over */ old = btv->curr; btv->curr = new; @@ -3558,7 +3557,7 @@ printk("\n"); } - if (astat&BT848_INT_VSYNC) + if (astat&BT848_INT_VSYNC) btv->field_count++; if (astat & BT848_INT_GPINT) { @@ -3603,7 +3602,7 @@ count++; if (count > 4) { btwrite(0, BT848_INT_MASK); - printk(KERN_ERR + printk(KERN_ERR "bttv%d: IRQ lockup, cleared int mask [", btv->c.nr); bttv_print_irqbits(stat,astat); printk("]\n"); @@ -3711,9 +3710,9 @@ { #if defined(__powerpc__) unsigned int cmd; - + pci_read_config_dword(dev, PCI_COMMAND, &cmd); - cmd = (cmd | PCI_COMMAND_MEMORY ); + cmd = (cmd | PCI_COMMAND_MEMORY ); pci_write_config_dword(dev, PCI_COMMAND, cmd); #endif } @@ -3750,14 +3749,14 @@ init_timer(&btv->timeout); btv->timeout.function = bttv_irq_timeout; btv->timeout.data = (unsigned long)btv; - + btv->i2c_rc = -1; btv->tuner_type = UNSET; btv->pinnacle_id = UNSET; btv->new_input = UNSET; btv->gpioirq = 1; btv->has_radio=radio[btv->c.nr]; - + /* pci stuff (init, get irq/mmio, ... */ btv->c.pci = dev; btv->id = dev->device; @@ -3794,7 +3793,7 @@ printk("irq: %d, latency: %d, mmio: 0x%lx\n", btv->c.pci->irq, lat, pci_resource_start(dev,0)); schedule(); - + btv->bt848_mmio=ioremap(pci_resource_start(dev,0), 0x1000); if (NULL == ioremap(pci_resource_start(dev,0), 0x1000)) { printk("bttv%d: ioremap() failed\n", btv->c.nr); @@ -3829,7 +3828,7 @@ btv->opt_vcr_hack = vcr_hack; btv->opt_whitecrush_upper = whitecrush_upper; btv->opt_whitecrush_lower = whitecrush_lower; - + /* fill struct bttv with some useful defaults */ btv->init.btv = btv; btv->init.ov.w.width = 320; @@ -3886,7 +3885,7 @@ fail2: free_irq(btv->c.pci->irq,btv); - + fail1: if (btv->bt848_mmio) iounmap(btv->bt848_mmio); @@ -3915,7 +3914,7 @@ btv->shutdown=1; wake_up(&btv->gpioq); bttv_sub_del_devices(&btv->c); - + /* unregister i2c_bus + input */ fini_bttv_i2c(btv); diff -Nru a/drivers/media/video/bttv-gpio.c b/drivers/media/video/bttv-gpio.c --- a/drivers/media/video/bttv-gpio.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/media/video/bttv-gpio.c 2004-11-10 17:19:06 -08:00 @@ -1,5 +1,5 @@ /* - $Id: bttv-gpio.c,v 1.3 2004/09/15 16:15:24 kraxel Exp $ + $Id: bttv-gpio.c,v 1.4 2004/10/13 10:39:00 kraxel Exp $ bttv-gpio.c -- gpio sub drivers @@ -24,7 +24,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - + */ #include @@ -63,6 +63,7 @@ int bttv_sub_add_device(struct bttv_core *core, char *name) { struct bttv_sub_device *sub; + int err; sub = kmalloc(sizeof(*sub),GFP_KERNEL); if (NULL == sub) @@ -76,9 +77,13 @@ snprintf(sub->dev.bus_id,sizeof(sub->dev.bus_id),"%s%d", name, core->nr); + err = device_register(&sub->dev); + if (0 != err) { + kfree(sub); + return err; + } printk("bttv%d: add subdevice \"%s\"\n", core->nr, sub->dev.bus_id); list_add_tail(&sub->list,&core->subs); - device_register(&sub->dev); return 0; } @@ -129,8 +134,7 @@ { sub->drv.bus = &bttv_sub_bus_type; snprintf(sub->wanted,sizeof(sub->wanted),"%s",wanted); - driver_register(&sub->drv); - return 0; + return driver_register(&sub->drv); } EXPORT_SYMBOL(bttv_sub_register); diff -Nru a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c --- a/drivers/media/video/bttv-i2c.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/media/video/bttv-i2c.c 2004-11-10 17:19:02 -08:00 @@ -1,5 +1,5 @@ /* - $Id: bttv-i2c.c,v 1.10 2004/10/06 17:30:51 kraxel Exp $ + $Id: bttv-i2c.c,v 1.11 2004/10/13 10:39:00 kraxel Exp $ bttv-i2c.c -- all the i2c code is here @@ -22,7 +22,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - + */ #include @@ -83,7 +83,7 @@ { struct bttv *btv = (struct bttv*)data; int state; - + state = btread(BT848_I2C) & 0x02 ? 1 : 0; return state; } @@ -126,7 +126,7 @@ /* ----------------------------------------------------------------------- */ /* I2C functions - hardware i2c */ -static int algo_control(struct i2c_adapter *adapter, +static int algo_control(struct i2c_adapter *adapter, unsigned int cmd, unsigned long arg) { return 0; @@ -142,7 +142,7 @@ { DECLARE_WAITQUEUE(wait, current); int rc = 0; - + add_wait_queue(&btv->i2c_queue, &wait); if (0 == btv->i2c_done) msleep_interruptible(20); @@ -352,7 +352,7 @@ /* read I2C */ -int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for) +int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for) { unsigned char buffer = 0; @@ -397,7 +397,7 @@ void __devinit bttv_readee(struct bttv *btv, unsigned char *eedata, int addr) { int i; - + if (bttv_I2CWrite(btv, addr, 0, -1, 0)<0) { printk(KERN_WARNING "bttv: readee error\n"); return; diff -Nru a/drivers/media/video/bttv-if.c b/drivers/media/video/bttv-if.c --- a/drivers/media/video/bttv-if.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/media/video/bttv-if.c 2004-11-10 17:19:02 -08:00 @@ -1,5 +1,5 @@ /* - $Id: bttv-if.c,v 1.2 2004/09/15 16:15:24 kraxel Exp $ + $Id: bttv-if.c,v 1.3 2004/10/13 10:39:00 kraxel Exp $ bttv-if.c -- old gpio interface to other kernel modules don't use in new code, will go away in 2.7 @@ -24,7 +24,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - + */ #include @@ -82,7 +82,7 @@ if (card >= bttv_num) { return -EINVAL; } - + btv = &bttvs[card]; gpio_inout(mask,data); if (bttv_gpio) @@ -93,7 +93,7 @@ int bttv_read_gpio(unsigned int card, unsigned long *data) { struct bttv *btv; - + if (card >= bttv_num) { return -EINVAL; } @@ -104,7 +104,7 @@ return -ENODEV; } -/* prior setting BT848_GPIO_REG_INP is (probably) not needed +/* prior setting BT848_GPIO_REG_INP is (probably) not needed because we set direct input on init */ *data = gpio_read(); return 0; @@ -113,14 +113,14 @@ int bttv_write_gpio(unsigned int card, unsigned long mask, unsigned long data) { struct bttv *btv; - + if (card >= bttv_num) { return -EINVAL; } btv = &bttvs[card]; -/* prior setting BT848_GPIO_REG_INP is (probably) not needed +/* prior setting BT848_GPIO_REG_INP is (probably) not needed because direct input is set on init */ gpio_bits(mask,data); if (bttv_gpio) diff -Nru a/drivers/media/video/bttv-risc.c b/drivers/media/video/bttv-risc.c --- a/drivers/media/video/bttv-risc.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/video/bttv-risc.c 2004-11-10 17:19:04 -08:00 @@ -1,5 +1,5 @@ /* - $Id: bttv-risc.c,v 1.8 2004/10/06 17:30:51 kraxel Exp $ + $Id: bttv-risc.c,v 1.9 2004/10/13 10:39:00 kraxel Exp $ bttv-risc.c -- interfaces to other kernel modules @@ -240,7 +240,7 @@ /* skip list for window clipping */ if (NULL == (skips = kmalloc(sizeof(*skips) * ov->nclips,GFP_KERNEL))) return -ENOMEM; - + /* estimate risc mem: worst case is (clip+1) * lines instructions + sync + jump (all 2 dwords) */ instructions = (ov->nclips + 1) * @@ -293,7 +293,7 @@ ra = addr + (fmt->depth>>3)*start; else ra = 0; - + if (0 == start) ri |= BT848_RISC_SOL; if (ov->w.width == end) @@ -413,7 +413,7 @@ btv->curr.top ? (unsigned long long)btv->curr.top->top.dma : 0, btv->cvbi ? (unsigned long long)btv->cvbi->bottom.dma : 0, btv->curr.bottom ? (unsigned long long)btv->curr.bottom->bottom.dma : 0); - + cmd = BT848_RISC_JUMP; if (btv->loop_irq) { cmd |= BT848_RISC_IRQ; @@ -426,7 +426,7 @@ del_timer(&btv->timeout); } btv->main.cpu[RISC_SLOT_LOOP] = cpu_to_le32(cmd); - + btaor(capctl, ~0x0f, BT848_CAP_CTL); if (capctl) { if (btv->dma_on) @@ -447,7 +447,7 @@ bttv_risc_init_main(struct bttv *btv) { int rc; - + if ((rc = btcx_riscmem_alloc(btv->c.pci,&btv->main,PAGE_SIZE)) < 0) return rc; dprintk(KERN_DEBUG "bttv%d: risc main @ %08Lx\n", @@ -616,7 +616,7 @@ bttv_calc_geo(btv,&buf->geo,buf->vb.width,buf->vb.height, V4L2_FIELD_HAS_BOTH(buf->vb.field),buf->tvnorm); - + switch (buf->vb.field) { case V4L2_FIELD_TOP: bttv_risc_packed(btv,&buf->top,buf->vb.dma.sglist, diff -Nru a/drivers/media/video/bttv-vbi.c b/drivers/media/video/bttv-vbi.c --- a/drivers/media/video/bttv-vbi.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/video/bttv-vbi.c 2004-11-10 17:19:05 -08:00 @@ -1,21 +1,21 @@ /* - $Id: bttv-vbi.c,v 1.5 2004/10/06 17:30:51 kraxel Exp $ + $Id: bttv-vbi.c,v 1.6 2004/10/13 10:39:00 kraxel Exp $ bttv - Bt848 frame grabber driver vbi interface - + (c) 2002 Gerd Knorr - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -83,7 +83,7 @@ struct bttv *btv = fh->btv; struct bttv_buffer *buf = (struct bttv_buffer*)vb; int rc; - + buf->vb.size = fh->lines * 2 * 2048; if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size) return -EINVAL; @@ -112,7 +112,7 @@ struct bttv_fh *fh = priv; struct bttv *btv = fh->btv; struct bttv_buffer *buf = (struct bttv_buffer*)vb; - + dprintk("queue %p\n",vb); buf->vb.state = STATE_QUEUED; list_add_tail(&buf->vb.queue,&btv->vcapture); @@ -127,7 +127,7 @@ struct bttv_fh *fh = priv; struct bttv *btv = fh->btv; struct bttv_buffer *buf = (struct bttv_buffer*)vb; - + dprintk("free %p\n",vb); bttv_dma_free(fh->btv,buf); } diff -Nru a/drivers/media/video/bttv.h b/drivers/media/video/bttv.h --- a/drivers/media/video/bttv.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/media/video/bttv.h 2004-11-10 17:19:02 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: bttv.h,v 1.9 2004/09/15 16:15:24 kraxel Exp $ + * $Id: bttv.h,v 1.10 2004/10/13 10:39:00 kraxel Exp $ * * bttv - Bt848 frame grabber driver * @@ -26,9 +26,9 @@ #define BTTV_HAUPPAUGE 0x02 #define BTTV_STB 0x03 #define BTTV_INTEL 0x04 -#define BTTV_DIAMOND 0x05 -#define BTTV_AVERMEDIA 0x06 -#define BTTV_MATRIX_VISION 0x07 +#define BTTV_DIAMOND 0x05 +#define BTTV_AVERMEDIA 0x06 +#define BTTV_MATRIX_VISION 0x07 #define BTTV_FLYVIDEO 0x08 #define BTTV_TURBOTV 0x09 #define BTTV_HAUPPAUGE878 0x0a @@ -245,7 +245,7 @@ /* returns card type + card ID (for bt878-based ones) for possible values see lines below beginning with #define BTTV_UNKNOWN - returns negative value if error occurred + returns negative value if error occurred */ extern int bttv_get_cardinfo(unsigned int card, int *type, unsigned int *cardid); @@ -268,18 +268,18 @@ /* sets GPDATA register to new value: (data & mask) | (current_GPDATA_value & ~mask) - returns negative value if error occurred + returns negative value if error occurred */ extern int bttv_write_gpio(unsigned int card, unsigned long mask, unsigned long data); -/* returns pointer to task queue which can be used as parameter to +/* returns pointer to task queue which can be used as parameter to interruptible_sleep_on in interrupt handler if BT848_INT_GPINT bit is set - this queue is activated - (wake_up_interruptible) and following call to the function bttv_read_gpio + (wake_up_interruptible) and following call to the function bttv_read_gpio should return new value of GPDATA, returns NULL value if error occurred or queue is not available - WARNING: because there is no buffer for GPIO data, one MUST + WARNING: because there is no buffer for GPIO data, one MUST process data ASAP */ extern wait_queue_head_t* bttv_get_gpio_queue(unsigned int card); diff -Nru a/drivers/media/video/bttvp.h b/drivers/media/video/bttvp.h --- a/drivers/media/video/bttvp.h 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/video/bttvp.h 2004-11-10 17:19:04 -08:00 @@ -1,5 +1,5 @@ /* - $Id: bttvp.h,v 1.10 2004/10/06 17:30:51 kraxel Exp $ + $Id: bttvp.h,v 1.11 2004/10/13 10:39:00 kraxel Exp $ bttv - Bt848 frame grabber driver @@ -145,7 +145,7 @@ struct bttv_fh { struct bttv *btv; int resources; -#ifdef VIDIOC_G_PRIORITY +#ifdef VIDIOC_G_PRIORITY enum v4l2_priority prio; #endif enum v4l2_buf_type type; @@ -334,10 +334,10 @@ struct semaphore lock; int resources; struct semaphore reslock; -#ifdef VIDIOC_G_PRIORITY +#ifdef VIDIOC_G_PRIORITY struct v4l2_prio_state prio; #endif - + /* video state */ unsigned int input; unsigned int audio; diff -Nru a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c --- a/drivers/media/video/cpia.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/video/cpia.c 2004-11-10 17:19:05 -08:00 @@ -3781,7 +3781,7 @@ pos = (unsigned long)(cam->frame_buf); while (size > 0) { - page = page_to_pfn(vmalloc_to_page((void *)pos)); + page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) { up(&cam->busy_lock); return -EAGAIN; @@ -4047,22 +4047,13 @@ proc_cpia_create(); #endif -#ifdef CONFIG_KMOD -#ifdef CONFIG_VIDEO_CPIA_PP_MODULE - request_module("cpia_pp"); -#endif - -#ifdef CONFIG_VIDEO_CPIA_USB_MODULE - request_module("cpia_usb"); -#endif -#endif /* CONFIG_KMOD */ - #ifdef CONFIG_VIDEO_CPIA_PP cpia_pp_init(); #endif #ifdef CONFIG_VIDEO_CPIA_USB cpia_usb_init(); #endif + return 0; } diff -Nru a/drivers/media/video/cx88/Makefile b/drivers/media/video/cx88/Makefile --- a/drivers/media/video/cx88/Makefile 2004-11-10 17:19:03 -08:00 +++ b/drivers/media/video/cx88/Makefile 2004-11-10 17:19:03 -08:00 @@ -5,4 +5,4 @@ obj-$(CONFIG_VIDEO_CX88) += cx88xx.o cx8800.o cx8802.o cx88-blackbird.o obj-$(CONFIG_VIDEO_CX88_DVB) += cx88-dvb.o -EXTRA_CFLAGS = -I $(src)/.. -I $(srctree)/drivers/media/dvb/dvb-core +EXTRA_CFLAGS = -I$(src)/.. -I$(srctree)/drivers/media/dvb/dvb-core diff -Nru a/drivers/media/video/cx88/cx88-tvaudio.c b/drivers/media/video/cx88/cx88-tvaudio.c --- a/drivers/media/video/cx88/cx88-tvaudio.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/video/cx88/cx88-tvaudio.c 2004-11-10 17:19:04 -08:00 @@ -338,7 +338,7 @@ static void set_audio_standard_NICAM_L(struct cx88_core *core) { - /* This is officially wierd.. register dumps indicate windows + /* This is officially weird.. register dumps indicate windows * uses audio mode 4.. A2. Let's operate and find out. */ static const struct rlist nicam_l[] = { diff -Nru a/drivers/media/video/ir-kbd-gpio.c b/drivers/media/video/ir-kbd-gpio.c --- a/drivers/media/video/ir-kbd-gpio.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/media/video/ir-kbd-gpio.c 2004-11-10 17:19:06 -08:00 @@ -1,5 +1,6 @@ - /* + * $Id: ir-kbd-gpio.c,v 1.10 2004/09/15 16:15:24 kraxel Exp $ + * * Copyright (c) 2003 Gerd Knorr * Copyright (c) 2003 Pavel Machek * @@ -45,7 +46,7 @@ [ 60 ] = KEY_KP9, [ 48 ] = KEY_EJECTCD, // Unmarked on my controller - [ 0 ] = KEY_POWER, + [ 0 ] = KEY_POWER, [ 18 ] = BTN_LEFT, // DISPLAY/L [ 50 ] = BTN_RIGHT, // LOOP/R [ 10 ] = KEY_MUTE, @@ -74,6 +75,45 @@ [ 1 ] = KEY_BLUE, // unmarked }; +/* Matt Jesson >' + [ 0x3a ] = KEY_RECORD, // 'capture' + [ 0x0a ] = KEY_MUTE, // 'mute' + [ 0x2c ] = KEY_RECORD, // 'record' + [ 0x1c ] = KEY_PAUSE, // 'pause' + [ 0x3c ] = KEY_STOP, // 'stop' + [ 0x0c ] = KEY_PLAY, // 'play' + [ 0x2e ] = KEY_RED, // 'red' + [ 0x01 ] = KEY_BLUE, // 'blue' / 'cancel' + [ 0x0e ] = KEY_YELLOW, // 'yellow' / 'ok' + [ 0x21 ] = KEY_GREEN, // 'green' + [ 0x11 ] = KEY_CHANNELDOWN, // 'channel -' + [ 0x31 ] = KEY_CHANNELUP, // 'channel +' + [ 0x1e ] = KEY_VOLUMEDOWN, // 'volume -' + [ 0x3e ] = KEY_VOLUMEUP, // 'volume +' +}; + static IR_KEYTAB_TYPE winfast_codes[IR_KEYTAB_SIZE] = { [ 5 ] = KEY_KP1, [ 6 ] = KEY_KP2, @@ -130,7 +170,7 @@ [ 6 ] = KEY_KP7, [ 10 ] = KEY_KP8, [ 18 ] = KEY_KP9, - + [ 3 ] = KEY_TUNER, // TV/FM [ 7 ] = KEY_SEARCH, // scan [ 28 ] = KEY_ZOOM, // full screen @@ -140,7 +180,7 @@ [ 20 ] = KEY_CHANNELDOWN, [ 22 ] = KEY_CHANNELUP, [ 24 ] = KEY_MUTE, - + [ 0 ] = KEY_LIST, // source [ 19 ] = KEY_INFO, // loop [ 16 ] = KEY_LAST, // +100 @@ -151,6 +191,47 @@ [ 15 ] = KEY_STOP, // freeze }; +/* Attila Kondoros */ +static IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = { + + [ 1 ] = KEY_KP1, + [ 2 ] = KEY_KP2, + [ 3 ] = KEY_KP3, + [ 4 ] = KEY_KP4, + [ 5 ] = KEY_KP5, + [ 6 ] = KEY_KP6, + [ 7 ] = KEY_KP7, + [ 8 ] = KEY_KP8, + [ 9 ] = KEY_KP9, + [ 0 ] = KEY_KP0, + [ 23 ] = KEY_LAST, // +100 + [ 10 ] = KEY_LIST, // recall + + + [ 28 ] = KEY_TUNER, // TV/FM + [ 21 ] = KEY_SEARCH, // scan + [ 18 ] = KEY_POWER, // power + [ 31 ] = KEY_VOLUMEDOWN, // vol up + [ 27 ] = KEY_VOLUMEUP, // vol down + [ 30 ] = KEY_CHANNELDOWN, // chn up + [ 26 ] = KEY_CHANNELUP, // chn down + + [ 17 ] = KEY_VIDEO, // video + [ 15 ] = KEY_ZOOM, // full screen + [ 19 ] = KEY_MUTE, // mute/unmute + [ 16 ] = KEY_TEXT, // min + + [ 13 ] = KEY_STOP, // freeze + [ 14 ] = KEY_RECORD, // record + [ 29 ] = KEY_PLAYPAUSE, // stop + [ 25 ] = KEY_PLAY, // play + + [ 22 ] = KEY_GOTO, // osd + [ 20 ] = KEY_REFRESH, // default + [ 12 ] = KEY_KPPLUS, // fine tune >>>> + [ 24 ] = KEY_KPMINUS // fine tune <<<< +}; + /* ---------------------------------------------------------------------- */ struct IR { @@ -202,7 +283,7 @@ return; ir->last_gpio = gpio; } - + /* extract data */ data = ir_extract_bits(gpio, ir->mask_keycode); dprintk(DEVNAME ": irq gpio=0x%x code=%d | %s%s%s\n", @@ -284,6 +365,14 @@ ir->polling = 50; // ms break; + case BTTV_AVDVBT_761: + /* case BTTV_AVDVBT_771: */ + ir_codes = ir_codes_avermedia_dvbt; + ir->mask_keycode = 0x0f00c0; + ir->mask_keydown = 0x000020; + ir->polling = 50; // ms + break; + case BTTV_PXELVWPLTVPAK: ir_codes = ir_codes_pixelview; ir->mask_keycode = 0x003e00; @@ -308,6 +397,12 @@ ir->mask_keycode = 0x0008e000; ir->mask_keydown = 0x00200000; break; + case BTTV_APAC_VIEWCOMP: + ir_codes = ir_codes_apac_viewcomp; + ir->mask_keycode = 0x001f00; + ir->mask_keyup = 0x008000; + ir->polling = 50; // ms + break; } if (NULL == ir_codes) { kfree(ir); @@ -317,7 +412,7 @@ /* init hardware-specific stuff */ bttv_gpio_inout(sub->core, ir->mask_keycode | ir->mask_keydown, 0); ir->sub = sub; - + /* init input device */ snprintf(ir->name, sizeof(ir->name), "bttv IR (card=%d)", sub->core->type); diff -Nru a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c --- a/drivers/media/video/ir-kbd-i2c.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/media/video/ir-kbd-i2c.c 2004-11-10 17:19:02 -08:00 @@ -1,4 +1,6 @@ /* + * $Id: ir-kbd-i2c.c,v 1.8 2004/09/15 16:15:24 kraxel Exp $ + * * keyboard input driver for i2c IR remote controls * * Copyright (c) 2000-2003 Gerd Knorr @@ -156,7 +158,7 @@ static inline int reverse(int data, int bits) { int i,c; - + for (c=0,i=0; ic,&b,1)) { dprintk(1,"read error\n"); @@ -207,7 +209,7 @@ static int get_key_pv951(struct IR *ir, u32 *ir_key, u32 *ir_raw) { unsigned char b; - + /* poll IR chip */ if (1 != i2c_master_recv(&ir->c,&b,1)) { dprintk(1,"read error\n"); @@ -218,7 +220,7 @@ if (b==0xaa) return 0; dprintk(2,"key %02x\n", b); - + *ir_key = b; *ir_raw = b; return 1; @@ -227,26 +229,26 @@ static int get_key_knc1(struct IR *ir, u32 *ir_key, u32 *ir_raw) { unsigned char b; - + /* poll IR chip */ if (1 != i2c_master_recv(&ir->c,&b,1)) { dprintk(1,"read error\n"); return -EIO; } - + /* it seems that 0xFE indicates that a button is still hold down, while 0xFF indicates that no button is hold down. 0xFE sequences are sometimes interrupted by 0xFF */ - + dprintk(2,"key %02x\n", b); - + if (b == 0xFF) return 0; - + if (b == 0xFE) /* keep old data */ return 1; - + *ir_key = b; *ir_raw = b; return 1; @@ -323,7 +325,7 @@ .detach_client = ir_detach, }; -static struct i2c_client client_template = +static struct i2c_client client_template = { I2C_DEVNAME("unset"), .driver = &driver @@ -336,7 +338,7 @@ char *name; int ir_type; struct IR *ir; - + if (NULL == (ir = kmalloc(sizeof(struct IR),GFP_KERNEL))) return -ENOMEM; memset(ir,0,sizeof(*ir)); @@ -400,14 +402,14 @@ input_register_device(&ir->input); printk(DEVNAME ": %s detected at %s [%s]\n", ir->input.name,ir->input.phys,adap->name); - + /* start polling via eventd */ INIT_WORK(&ir->work, ir_work, ir); init_timer(&ir->timer); ir->timer.function = ir_timer; ir->timer.data = (unsigned long)ir; schedule_work(&ir->work); - + return 0; } @@ -430,16 +432,16 @@ static int ir_probe(struct i2c_adapter *adap) { - + /* The external IR receiver is at i2c address 0x34 (0x35 for reads). Future Hauppauge cards will have an internal receiver at 0x30 (0x31 for reads). In theory, both can be fitted, and Hauppauge suggest an external overrides an - internal. - - That's why we probe 0x1a (~0x34) first. CB + internal. + + That's why we probe 0x1a (~0x34) first. CB */ - + static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1}; static const int probe_saa7134[] = { 0x7a, -1}; const int *probe = NULL; @@ -478,13 +480,12 @@ MODULE_DESCRIPTION("input driver for i2c IR remote controls"); MODULE_LICENSE("GPL"); -static int ir_init(void) +static int __init ir_init(void) { - i2c_add_driver(&driver); - return 0; + return i2c_add_driver(&driver); } -static void ir_fini(void) +static void __exit ir_fini(void) { i2c_del_driver(&driver); } diff -Nru a/drivers/media/video/meye.c b/drivers/media/video/meye.c --- a/drivers/media/video/meye.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/video/meye.c 2004-11-10 17:19:05 -08:00 @@ -1,7 +1,7 @@ -/* +/* * Motion Eye video4linux driver for Sony Vaio PictureBook * - * Copyright (C) 2001-2003 Stelian Pop + * Copyright (C) 2001-2004 Stelian Pop * * Copyright (C) 2001-2002 Alcôve * @@ -11,17 +11,17 @@ * * Some parts borrowed from various video4linux drivers, especially * bttv-driver.c and zoran.c, see original files for credits. - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -39,91 +39,50 @@ #include #include "meye.h" -#include "linux/meye.h" +#include + +MODULE_AUTHOR("Stelian Pop "); +MODULE_DESCRIPTION("v4l/v4l2 driver for the MotionEye camera"); +MODULE_LICENSE("GPL"); +MODULE_VERSION(MEYE_DRIVER_VERSION); + +/* force usage of V4L1 API */ +static int forcev4l1; /* = 0 */ +module_param(forcev4l1, int, 0644); +MODULE_PARM_DESC(forcev4l1, "force use of V4L1 instead of V4L2"); -/* driver structure - only one possible */ -static struct meye meye; /* number of grab buffers */ static unsigned int gbuffers = 2; +module_param(gbuffers, int, 0444); +MODULE_PARM_DESC(gbuffers, "number of capture buffers, default is 2 (32 max)"); + /* size of a grab buffer */ static unsigned int gbufsize = MEYE_MAX_BUFSIZE; +module_param(gbufsize, int, 0444); +MODULE_PARM_DESC(gbufsize, "size of the capture buffers, default is 614400" + " (will be rounded up to a page multiple)"); + /* /dev/videoX registration number */ static int video_nr = -1; +module_param(video_nr, int, 0444); +MODULE_PARM_DESC(video_nr, "video device to register (0=/dev/video0, etc)"); -/****************************************************************************/ -/* Queue routines */ -/****************************************************************************/ - -/* Inits the queue */ -static inline void meye_initq(struct meye_queue *queue) { - queue->head = queue->tail = 0; - queue->len = 0; - queue->s_lock = SPIN_LOCK_UNLOCKED; - init_waitqueue_head(&queue->proc_list); -} - -/* Pulls an element from the queue */ -static inline int meye_pullq(struct meye_queue *queue) { - int result; - unsigned long flags; - - spin_lock_irqsave(&queue->s_lock, flags); - if (!queue->len) { - spin_unlock_irqrestore(&queue->s_lock, flags); - return -1; - } - result = queue->buf[queue->head]; - queue->head++; - queue->head &= (MEYE_QUEUE_SIZE - 1); - queue->len--; - spin_unlock_irqrestore(&queue->s_lock, flags); - return result; -} - -/* Pushes an element into the queue */ -static inline void meye_pushq(struct meye_queue *queue, int element) { - unsigned long flags; - - spin_lock_irqsave(&queue->s_lock, flags); - if (queue->len == MEYE_QUEUE_SIZE) { - /* remove the first element */ - queue->head++; - queue->head &= (MEYE_QUEUE_SIZE - 1); - queue->len--; - } - queue->buf[queue->tail] = element; - queue->tail++; - queue->tail &= (MEYE_QUEUE_SIZE - 1); - queue->len++; - - spin_unlock_irqrestore(&queue->s_lock, flags); -} - -/* Tests if the queue is empty */ -static inline int meye_emptyq(struct meye_queue *queue, int *elem) { - int result; - unsigned long flags; - - spin_lock_irqsave(&queue->s_lock, flags); - result = (queue->len == 0); - if (!result && elem) - *elem = queue->buf[queue->head]; - spin_unlock_irqrestore(&queue->s_lock, flags); - return result; -} +/* driver structure - only one possible */ +static struct meye meye; /****************************************************************************/ /* Memory allocation routines (stolen from bttv-driver.c) */ /****************************************************************************/ -static void *rvmalloc(unsigned long size) { +static void *rvmalloc(unsigned long size) +{ void *mem; unsigned long adr; size = PAGE_ALIGN(size); mem = vmalloc_32(size); if (mem) { - memset(mem, 0, size); /* Clear the ram out, no junk to the user */ - adr = (unsigned long)mem; + memset(mem, 0, size); + adr = (unsigned long) mem; while (size > 0) { SetPageReserved(vmalloc_to_page((void *)adr)); adr += PAGE_SIZE; @@ -133,11 +92,12 @@ return mem; } -static void rvfree(void * mem, unsigned long size) { - unsigned long adr; +static void rvfree(void * mem, unsigned long size) +{ + unsigned long adr; if (mem) { - adr = (unsigned long) mem; + adr = (unsigned long) mem; while ((long) size > 0) { ClearPageReserved(vmalloc_to_page((void *)adr)); adr += PAGE_SIZE; @@ -156,7 +116,8 @@ * dma_addr_t for correctness but the compilation of this driver is * disabled for HIGHMEM64G=y, where sizeof(dma_addr_t) != 4 */ -static int ptable_alloc(void) { +static int ptable_alloc(void) +{ dma_addr_t *pt; int i; @@ -173,7 +134,7 @@ pt = meye.mchip_ptable_toc; for (i = 0; i < MCHIP_NB_PAGES; i++) { - meye.mchip_ptable[i] = dma_alloc_coherent(&meye.mchip_dev->dev, + meye.mchip_ptable[i] = dma_alloc_coherent(&meye.mchip_dev->dev, PAGE_SIZE, pt, GFP_KERNEL); @@ -199,22 +160,23 @@ return 0; } -static void ptable_free(void) { +static void ptable_free(void) +{ dma_addr_t *pt; int i; pt = meye.mchip_ptable_toc; for (i = 0; i < MCHIP_NB_PAGES; i++) { if (meye.mchip_ptable[i]) - dma_free_coherent(&meye.mchip_dev->dev, - PAGE_SIZE, + dma_free_coherent(&meye.mchip_dev->dev, + PAGE_SIZE, meye.mchip_ptable[i], *pt); pt++; } if (meye.mchip_ptable_toc) - dma_free_coherent(&meye.mchip_dev->dev, - PAGE_SIZE, + dma_free_coherent(&meye.mchip_dev->dev, + PAGE_SIZE, meye.mchip_ptable_toc, meye.mchip_dmahandle); @@ -224,9 +186,10 @@ } /* copy data from ptable into buf */ -static void ptable_copy(u8 *buf, int start, int size, int pt_pages) { +static void ptable_copy(u8 *buf, int start, int size, int pt_pages) +{ int i; - + for (i = 0; i < (size / PAGE_SIZE) * PAGE_SIZE; i += PAGE_SIZE) { memcpy(buf + i, meye.mchip_ptable[start++], PAGE_SIZE); if (start >= pt_pages) @@ -235,224 +198,193 @@ memcpy(buf + i, meye.mchip_ptable[start], size % PAGE_SIZE); } - /****************************************************************************/ /* JPEG tables at different qualities to load into the VRJ chip */ /****************************************************************************/ /* return a set of quantisation tables based on a quality from 1 to 10 */ -static u16 *jpeg_quantisation_tables(int *size, int quality) { - static u16 tables0[] = { - 0xdbff, 0x4300, 0xff00, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, - 0xdbff, 0x4300, 0xff01, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, - }; - static u16 tables1[] = { - 0xdbff, 0x4300, 0x5000, 0x3c37, 0x3c46, 0x5032, 0x4146, 0x5a46, - 0x5055, 0x785f, 0x82c8, 0x6e78, 0x786e, 0xaff5, 0x91b9, 0xffc8, - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, - 0xdbff, 0x4300, 0x5501, 0x5a5a, 0x6978, 0xeb78, 0x8282, 0xffeb, - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, - }; - static u16 tables2[] = { - 0xdbff, 0x4300, 0x2800, 0x1e1c, 0x1e23, 0x2819, 0x2123, 0x2d23, - 0x282b, 0x3c30, 0x4164, 0x373c, 0x3c37, 0x587b, 0x495d, 0x9164, - 0x9980, 0x8f96, 0x8c80, 0xa08a, 0xe6b4, 0xa0c3, 0xdaaa, 0x8aad, - 0xc88c, 0xcbff, 0xeeda, 0xfff5, 0xffff, 0xc19b, 0xffff, 0xfaff, - 0xe6ff, 0xfffd, 0xfff8, - 0xdbff, 0x4300, 0x2b01, 0x2d2d, 0x353c, 0x763c, 0x4141, 0xf876, - 0x8ca5, 0xf8a5, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, - 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, - 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, - 0xf8f8, 0xf8f8, 0xfff8, - }; - static u16 tables3[] = { - 0xdbff, 0x4300, 0x1b00, 0x1412, 0x1417, 0x1b11, 0x1617, 0x1e17, - 0x1b1c, 0x2820, 0x2b42, 0x2528, 0x2825, 0x3a51, 0x303d, 0x6042, - 0x6555, 0x5f64, 0x5d55, 0x6a5b, 0x9978, 0x6a81, 0x9071, 0x5b73, - 0x855d, 0x86b5, 0x9e90, 0xaba3, 0xabad, 0x8067, 0xc9bc, 0xa6ba, - 0x99c7, 0xaba8, 0xffa4, - 0xdbff, 0x4300, 0x1c01, 0x1e1e, 0x2328, 0x4e28, 0x2b2b, 0xa44e, - 0x5d6e, 0xa46e, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, - 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, - 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, - 0xa4a4, 0xa4a4, 0xffa4, - }; - static u16 tables4[] = { - 0xdbff, 0x4300, 0x1400, 0x0f0e, 0x0f12, 0x140d, 0x1012, 0x1712, - 0x1415, 0x1e18, 0x2132, 0x1c1e, 0x1e1c, 0x2c3d, 0x242e, 0x4932, - 0x4c40, 0x474b, 0x4640, 0x5045, 0x735a, 0x5062, 0x6d55, 0x4556, - 0x6446, 0x6588, 0x776d, 0x817b, 0x8182, 0x604e, 0x978d, 0x7d8c, - 0x7396, 0x817e, 0xff7c, - 0xdbff, 0x4300, 0x1501, 0x1717, 0x1a1e, 0x3b1e, 0x2121, 0x7c3b, - 0x4653, 0x7c53, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, - 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, - 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, - 0x7c7c, 0x7c7c, 0xff7c, - }; - static u16 tables5[] = { - 0xdbff, 0x4300, 0x1000, 0x0c0b, 0x0c0e, 0x100a, 0x0d0e, 0x120e, - 0x1011, 0x1813, 0x1a28, 0x1618, 0x1816, 0x2331, 0x1d25, 0x3a28, - 0x3d33, 0x393c, 0x3833, 0x4037, 0x5c48, 0x404e, 0x5744, 0x3745, - 0x5038, 0x516d, 0x5f57, 0x6762, 0x6768, 0x4d3e, 0x7971, 0x6470, - 0x5c78, 0x6765, 0xff63, - 0xdbff, 0x4300, 0x1101, 0x1212, 0x1518, 0x2f18, 0x1a1a, 0x632f, - 0x3842, 0x6342, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, - 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, - 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, - 0x6363, 0x6363, 0xff63, - }; - static u16 tables6[] = { - 0xdbff, 0x4300, 0x0d00, 0x0a09, 0x0a0b, 0x0d08, 0x0a0b, 0x0e0b, - 0x0d0e, 0x130f, 0x1520, 0x1213, 0x1312, 0x1c27, 0x171e, 0x2e20, - 0x3129, 0x2e30, 0x2d29, 0x332c, 0x4a3a, 0x333e, 0x4636, 0x2c37, - 0x402d, 0x4157, 0x4c46, 0x524e, 0x5253, 0x3e32, 0x615a, 0x505a, - 0x4a60, 0x5251, 0xff4f, - 0xdbff, 0x4300, 0x0e01, 0x0e0e, 0x1113, 0x2613, 0x1515, 0x4f26, - 0x2d35, 0x4f35, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, - 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, - 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, - 0x4f4f, 0x4f4f, 0xff4f, - }; - static u16 tables7[] = { - 0xdbff, 0x4300, 0x0a00, 0x0707, 0x0708, 0x0a06, 0x0808, 0x0b08, - 0x0a0a, 0x0e0b, 0x1018, 0x0d0e, 0x0e0d, 0x151d, 0x1116, 0x2318, - 0x251f, 0x2224, 0x221f, 0x2621, 0x372b, 0x262f, 0x3429, 0x2129, - 0x3022, 0x3141, 0x3934, 0x3e3b, 0x3e3e, 0x2e25, 0x4944, 0x3c43, - 0x3748, 0x3e3d, 0xff3b, - 0xdbff, 0x4300, 0x0a01, 0x0b0b, 0x0d0e, 0x1c0e, 0x1010, 0x3b1c, - 0x2228, 0x3b28, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, - 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, - 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, - 0x3b3b, 0x3b3b, 0xff3b, - }; - static u16 tables8[] = { - 0xdbff, 0x4300, 0x0600, 0x0504, 0x0506, 0x0604, 0x0506, 0x0706, - 0x0607, 0x0a08, 0x0a10, 0x090a, 0x0a09, 0x0e14, 0x0c0f, 0x1710, - 0x1814, 0x1718, 0x1614, 0x1a16, 0x251d, 0x1a1f, 0x231b, 0x161c, - 0x2016, 0x202c, 0x2623, 0x2927, 0x292a, 0x1f19, 0x302d, 0x282d, - 0x2530, 0x2928, 0xff28, - 0xdbff, 0x4300, 0x0701, 0x0707, 0x080a, 0x130a, 0x0a0a, 0x2813, - 0x161a, 0x281a, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, - 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, - 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, - 0x2828, 0x2828, 0xff28, - }; - static u16 tables9[] = { - 0xdbff, 0x4300, 0x0300, 0x0202, 0x0203, 0x0302, 0x0303, 0x0403, - 0x0303, 0x0504, 0x0508, 0x0405, 0x0504, 0x070a, 0x0607, 0x0c08, - 0x0c0a, 0x0b0c, 0x0b0a, 0x0d0b, 0x120e, 0x0d10, 0x110e, 0x0b0e, - 0x100b, 0x1016, 0x1311, 0x1514, 0x1515, 0x0f0c, 0x1817, 0x1416, - 0x1218, 0x1514, 0xff14, - 0xdbff, 0x4300, 0x0301, 0x0404, 0x0405, 0x0905, 0x0505, 0x1409, - 0x0b0d, 0x140d, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, - 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, - 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, - 0x1414, 0x1414, 0xff14, - }; - static u16 tables10[] = { - 0xdbff, 0x4300, 0x0100, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, - 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, - 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, - 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, - 0x0101, 0x0101, 0xff01, - 0xdbff, 0x4300, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, - 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, - 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, - 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, - 0x0101, 0x0101, 0xff01, - }; - - switch (quality) { - case 0: - *size = sizeof(tables0); - return tables0; - case 1: - *size = sizeof(tables1); - return tables1; - case 2: - *size = sizeof(tables2); - return tables2; - case 3: - *size = sizeof(tables3); - return tables3; - case 4: - *size = sizeof(tables4); - return tables4; - case 5: - *size = sizeof(tables5); - return tables5; - case 6: - *size = sizeof(tables6); - return tables6; - case 7: - *size = sizeof(tables7); - return tables7; - case 8: - *size = sizeof(tables8); - return tables8; - case 9: - *size = sizeof(tables9); - return tables9; - case 10: - *size = sizeof(tables10); - return tables10; - default: - printk(KERN_WARNING "meye: invalid quality level %d - using 8\n", quality); - *size = sizeof(tables8); - return tables8; +static u16 *jpeg_quantisation_tables(int *length, int quality) +{ + static u16 jpeg_tables[][70] = { { + 0xdbff, 0x4300, 0xff00, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, + 0xdbff, 0x4300, 0xff01, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, + }, + { + 0xdbff, 0x4300, 0x5000, 0x3c37, 0x3c46, 0x5032, 0x4146, 0x5a46, + 0x5055, 0x785f, 0x82c8, 0x6e78, 0x786e, 0xaff5, 0x91b9, 0xffc8, + 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, + 0xdbff, 0x4300, 0x5501, 0x5a5a, 0x6978, 0xeb78, 0x8282, 0xffeb, + 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, + }, + { + 0xdbff, 0x4300, 0x2800, 0x1e1c, 0x1e23, 0x2819, 0x2123, 0x2d23, + 0x282b, 0x3c30, 0x4164, 0x373c, 0x3c37, 0x587b, 0x495d, 0x9164, + 0x9980, 0x8f96, 0x8c80, 0xa08a, 0xe6b4, 0xa0c3, 0xdaaa, 0x8aad, + 0xc88c, 0xcbff, 0xeeda, 0xfff5, 0xffff, 0xc19b, 0xffff, 0xfaff, + 0xe6ff, 0xfffd, 0xfff8, + 0xdbff, 0x4300, 0x2b01, 0x2d2d, 0x353c, 0x763c, 0x4141, 0xf876, + 0x8ca5, 0xf8a5, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, + 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, + 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, 0xf8f8, + 0xf8f8, 0xf8f8, 0xfff8, + }, + { + 0xdbff, 0x4300, 0x1b00, 0x1412, 0x1417, 0x1b11, 0x1617, 0x1e17, + 0x1b1c, 0x2820, 0x2b42, 0x2528, 0x2825, 0x3a51, 0x303d, 0x6042, + 0x6555, 0x5f64, 0x5d55, 0x6a5b, 0x9978, 0x6a81, 0x9071, 0x5b73, + 0x855d, 0x86b5, 0x9e90, 0xaba3, 0xabad, 0x8067, 0xc9bc, 0xa6ba, + 0x99c7, 0xaba8, 0xffa4, + 0xdbff, 0x4300, 0x1c01, 0x1e1e, 0x2328, 0x4e28, 0x2b2b, 0xa44e, + 0x5d6e, 0xa46e, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, + 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, + 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, + 0xa4a4, 0xa4a4, 0xffa4, + }, + { + 0xdbff, 0x4300, 0x1400, 0x0f0e, 0x0f12, 0x140d, 0x1012, 0x1712, + 0x1415, 0x1e18, 0x2132, 0x1c1e, 0x1e1c, 0x2c3d, 0x242e, 0x4932, + 0x4c40, 0x474b, 0x4640, 0x5045, 0x735a, 0x5062, 0x6d55, 0x4556, + 0x6446, 0x6588, 0x776d, 0x817b, 0x8182, 0x604e, 0x978d, 0x7d8c, + 0x7396, 0x817e, 0xff7c, + 0xdbff, 0x4300, 0x1501, 0x1717, 0x1a1e, 0x3b1e, 0x2121, 0x7c3b, + 0x4653, 0x7c53, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, + 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, + 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, 0x7c7c, + 0x7c7c, 0x7c7c, 0xff7c, + }, + { + 0xdbff, 0x4300, 0x1000, 0x0c0b, 0x0c0e, 0x100a, 0x0d0e, 0x120e, + 0x1011, 0x1813, 0x1a28, 0x1618, 0x1816, 0x2331, 0x1d25, 0x3a28, + 0x3d33, 0x393c, 0x3833, 0x4037, 0x5c48, 0x404e, 0x5744, 0x3745, + 0x5038, 0x516d, 0x5f57, 0x6762, 0x6768, 0x4d3e, 0x7971, 0x6470, + 0x5c78, 0x6765, 0xff63, + 0xdbff, 0x4300, 0x1101, 0x1212, 0x1518, 0x2f18, 0x1a1a, 0x632f, + 0x3842, 0x6342, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, + 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, + 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, 0x6363, + 0x6363, 0x6363, 0xff63, + }, + { + 0xdbff, 0x4300, 0x0d00, 0x0a09, 0x0a0b, 0x0d08, 0x0a0b, 0x0e0b, + 0x0d0e, 0x130f, 0x1520, 0x1213, 0x1312, 0x1c27, 0x171e, 0x2e20, + 0x3129, 0x2e30, 0x2d29, 0x332c, 0x4a3a, 0x333e, 0x4636, 0x2c37, + 0x402d, 0x4157, 0x4c46, 0x524e, 0x5253, 0x3e32, 0x615a, 0x505a, + 0x4a60, 0x5251, 0xff4f, + 0xdbff, 0x4300, 0x0e01, 0x0e0e, 0x1113, 0x2613, 0x1515, 0x4f26, + 0x2d35, 0x4f35, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, + 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, + 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, 0x4f4f, + 0x4f4f, 0x4f4f, 0xff4f, + }, + { + 0xdbff, 0x4300, 0x0a00, 0x0707, 0x0708, 0x0a06, 0x0808, 0x0b08, + 0x0a0a, 0x0e0b, 0x1018, 0x0d0e, 0x0e0d, 0x151d, 0x1116, 0x2318, + 0x251f, 0x2224, 0x221f, 0x2621, 0x372b, 0x262f, 0x3429, 0x2129, + 0x3022, 0x3141, 0x3934, 0x3e3b, 0x3e3e, 0x2e25, 0x4944, 0x3c43, + 0x3748, 0x3e3d, 0xff3b, + 0xdbff, 0x4300, 0x0a01, 0x0b0b, 0x0d0e, 0x1c0e, 0x1010, 0x3b1c, + 0x2228, 0x3b28, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, + 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, + 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, + 0x3b3b, 0x3b3b, 0xff3b, + }, + { + 0xdbff, 0x4300, 0x0600, 0x0504, 0x0506, 0x0604, 0x0506, 0x0706, + 0x0607, 0x0a08, 0x0a10, 0x090a, 0x0a09, 0x0e14, 0x0c0f, 0x1710, + 0x1814, 0x1718, 0x1614, 0x1a16, 0x251d, 0x1a1f, 0x231b, 0x161c, + 0x2016, 0x202c, 0x2623, 0x2927, 0x292a, 0x1f19, 0x302d, 0x282d, + 0x2530, 0x2928, 0xff28, + 0xdbff, 0x4300, 0x0701, 0x0707, 0x080a, 0x130a, 0x0a0a, 0x2813, + 0x161a, 0x281a, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, + 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, + 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, 0x2828, + 0x2828, 0x2828, 0xff28, + }, + { + 0xdbff, 0x4300, 0x0300, 0x0202, 0x0203, 0x0302, 0x0303, 0x0403, + 0x0303, 0x0504, 0x0508, 0x0405, 0x0504, 0x070a, 0x0607, 0x0c08, + 0x0c0a, 0x0b0c, 0x0b0a, 0x0d0b, 0x120e, 0x0d10, 0x110e, 0x0b0e, + 0x100b, 0x1016, 0x1311, 0x1514, 0x1515, 0x0f0c, 0x1817, 0x1416, + 0x1218, 0x1514, 0xff14, + 0xdbff, 0x4300, 0x0301, 0x0404, 0x0405, 0x0905, 0x0505, 0x1409, + 0x0b0d, 0x140d, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, + 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, + 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, 0x1414, + 0x1414, 0x1414, 0xff14, + }, + { + 0xdbff, 0x4300, 0x0100, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, + 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, + 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, + 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, + 0x0101, 0x0101, 0xff01, + 0xdbff, 0x4300, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, + 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, + 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, + 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, + 0x0101, 0x0101, 0xff01, + } }; + + if (quality < 0 || quality > 10) { + printk(KERN_WARNING + "meye: invalid quality level %d - using 8\n", quality); + quality = 8; } - return NULL; + + *length = ARRAY_SIZE(jpeg_tables[quality]); + return jpeg_tables[quality]; } /* return a generic set of huffman tables */ -static u16 *jpeg_huffman_tables(int *size) { +static u16 *jpeg_huffman_tables(int *length) +{ static u16 tables[] = { - 0xC4FF, 0xB500, 0x0010, 0x0102, 0x0303, 0x0402, 0x0503, 0x0405, - 0x0004, 0x0100, 0x017D, 0x0302, 0x0400, 0x0511, 0x2112, 0x4131, - 0x1306, 0x6151, 0x2207, 0x1471, 0x8132, 0xA191, 0x2308, 0xB142, - 0x15C1, 0xD152, 0x24F0, 0x6233, 0x8272, 0x0A09, 0x1716, 0x1918, - 0x251A, 0x2726, 0x2928, 0x342A, 0x3635, 0x3837, 0x3A39, 0x4443, - 0x4645, 0x4847, 0x4A49, 0x5453, 0x5655, 0x5857, 0x5A59, 0x6463, - 0x6665, 0x6867, 0x6A69, 0x7473, 0x7675, 0x7877, 0x7A79, 0x8483, - 0x8685, 0x8887, 0x8A89, 0x9392, 0x9594, 0x9796, 0x9998, 0xA29A, - 0xA4A3, 0xA6A5, 0xA8A7, 0xAAA9, 0xB3B2, 0xB5B4, 0xB7B6, 0xB9B8, - 0xC2BA, 0xC4C3, 0xC6C5, 0xC8C7, 0xCAC9, 0xD3D2, 0xD5D4, 0xD7D6, - 0xD9D8, 0xE1DA, 0xE3E2, 0xE5E4, 0xE7E6, 0xE9E8, 0xF1EA, 0xF3F2, - 0xF5F4, 0xF7F6, 0xF9F8, 0xFFFA, - 0xC4FF, 0xB500, 0x0011, 0x0102, 0x0402, 0x0304, 0x0704, 0x0405, - 0x0004, 0x0201, 0x0077, 0x0201, 0x1103, 0x0504, 0x3121, 0x1206, - 0x5141, 0x6107, 0x1371, 0x3222, 0x0881, 0x4214, 0xA191, 0xC1B1, - 0x2309, 0x5233, 0x15F0, 0x7262, 0x0AD1, 0x2416, 0xE134, 0xF125, - 0x1817, 0x1A19, 0x2726, 0x2928, 0x352A, 0x3736, 0x3938, 0x433A, - 0x4544, 0x4746, 0x4948, 0x534A, 0x5554, 0x5756, 0x5958, 0x635A, - 0x6564, 0x6766, 0x6968, 0x736A, 0x7574, 0x7776, 0x7978, 0x827A, - 0x8483, 0x8685, 0x8887, 0x8A89, 0x9392, 0x9594, 0x9796, 0x9998, - 0xA29A, 0xA4A3, 0xA6A5, 0xA8A7, 0xAAA9, 0xB3B2, 0xB5B4, 0xB7B6, - 0xB9B8, 0xC2BA, 0xC4C3, 0xC6C5, 0xC8C7, 0xCAC9, 0xD3D2, 0xD5D4, - 0xD7D6, 0xD9D8, 0xE2DA, 0xE4E3, 0xE6E5, 0xE8E7, 0xEAE9, 0xF3F2, - 0xF5F4, 0xF7F6, 0xF9F8, 0xFFFA, - 0xC4FF, 0x1F00, 0x0000, 0x0501, 0x0101, 0x0101, 0x0101, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0201, 0x0403, 0x0605, 0x0807, 0x0A09, - 0xFF0B, - 0xC4FF, 0x1F00, 0x0001, 0x0103, 0x0101, 0x0101, 0x0101, 0x0101, - 0x0000, 0x0000, 0x0000, 0x0201, 0x0403, 0x0605, 0x0807, 0x0A09, + 0xC4FF, 0xB500, 0x0010, 0x0102, 0x0303, 0x0402, 0x0503, 0x0405, + 0x0004, 0x0100, 0x017D, 0x0302, 0x0400, 0x0511, 0x2112, 0x4131, + 0x1306, 0x6151, 0x2207, 0x1471, 0x8132, 0xA191, 0x2308, 0xB142, + 0x15C1, 0xD152, 0x24F0, 0x6233, 0x8272, 0x0A09, 0x1716, 0x1918, + 0x251A, 0x2726, 0x2928, 0x342A, 0x3635, 0x3837, 0x3A39, 0x4443, + 0x4645, 0x4847, 0x4A49, 0x5453, 0x5655, 0x5857, 0x5A59, 0x6463, + 0x6665, 0x6867, 0x6A69, 0x7473, 0x7675, 0x7877, 0x7A79, 0x8483, + 0x8685, 0x8887, 0x8A89, 0x9392, 0x9594, 0x9796, 0x9998, 0xA29A, + 0xA4A3, 0xA6A5, 0xA8A7, 0xAAA9, 0xB3B2, 0xB5B4, 0xB7B6, 0xB9B8, + 0xC2BA, 0xC4C3, 0xC6C5, 0xC8C7, 0xCAC9, 0xD3D2, 0xD5D4, 0xD7D6, + 0xD9D8, 0xE1DA, 0xE3E2, 0xE5E4, 0xE7E6, 0xE9E8, 0xF1EA, 0xF3F2, + 0xF5F4, 0xF7F6, 0xF9F8, 0xFFFA, + 0xC4FF, 0xB500, 0x0011, 0x0102, 0x0402, 0x0304, 0x0704, 0x0405, + 0x0004, 0x0201, 0x0077, 0x0201, 0x1103, 0x0504, 0x3121, 0x1206, + 0x5141, 0x6107, 0x1371, 0x3222, 0x0881, 0x4214, 0xA191, 0xC1B1, + 0x2309, 0x5233, 0x15F0, 0x7262, 0x0AD1, 0x2416, 0xE134, 0xF125, + 0x1817, 0x1A19, 0x2726, 0x2928, 0x352A, 0x3736, 0x3938, 0x433A, + 0x4544, 0x4746, 0x4948, 0x534A, 0x5554, 0x5756, 0x5958, 0x635A, + 0x6564, 0x6766, 0x6968, 0x736A, 0x7574, 0x7776, 0x7978, 0x827A, + 0x8483, 0x8685, 0x8887, 0x8A89, 0x9392, 0x9594, 0x9796, 0x9998, + 0xA29A, 0xA4A3, 0xA6A5, 0xA8A7, 0xAAA9, 0xB3B2, 0xB5B4, 0xB7B6, + 0xB9B8, 0xC2BA, 0xC4C3, 0xC6C5, 0xC8C7, 0xCAC9, 0xD3D2, 0xD5D4, + 0xD7D6, 0xD9D8, 0xE2DA, 0xE4E3, 0xE6E5, 0xE8E7, 0xEAE9, 0xF3F2, + 0xF5F4, 0xF7F6, 0xF9F8, 0xFFFA, + 0xC4FF, 0x1F00, 0x0000, 0x0501, 0x0101, 0x0101, 0x0101, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0201, 0x0403, 0x0605, 0x0807, 0x0A09, + 0xFF0B, + 0xC4FF, 0x1F00, 0x0001, 0x0103, 0x0101, 0x0101, 0x0101, 0x0101, + 0x0000, 0x0000, 0x0000, 0x0201, 0x0403, 0x0605, 0x0807, 0x0A09, 0xFF0B }; - *size = sizeof(tables); + *length = ARRAY_SIZE(tables); return tables; } @@ -461,23 +393,27 @@ /****************************************************************************/ /* returns the horizontal capture size */ -static inline int mchip_hsize(void) { +static inline int mchip_hsize(void) +{ return meye.params.subsample ? 320 : 640; } /* returns the vertical capture size */ -static inline int mchip_vsize(void) { +static inline int mchip_vsize(void) +{ return meye.params.subsample ? 240 : 480; } /* waits for a register to be available */ -static void mchip_sync(int reg) { +static void mchip_sync(int reg) +{ u32 status; int i; if (reg == MCHIP_MM_FIFO_DATA) { for (i = 0; i < MCHIP_REG_TIMEOUT; i++) { - status = readl(meye.mchip_mmregs + MCHIP_MM_FIFO_STATUS); + status = readl(meye.mchip_mmregs + + MCHIP_MM_FIFO_STATUS); if (!(status & MCHIP_MM_FIFO_WAIT)) { printk(KERN_WARNING "meye: fifo not ready\n"); return; @@ -486,44 +422,48 @@ return; udelay(1); } - } - else if (reg > 0x80) { + } else if (reg > 0x80) { u32 mask = (reg < 0x100) ? MCHIP_HIC_STATUS_MCC_RDY - : MCHIP_HIC_STATUS_VRJ_RDY; + : MCHIP_HIC_STATUS_VRJ_RDY; for (i = 0; i < MCHIP_REG_TIMEOUT; i++) { status = readl(meye.mchip_mmregs + MCHIP_HIC_STATUS); if (status & mask) return; udelay(1); } - } - else + } else return; - printk(KERN_WARNING "meye: mchip_sync() timeout on reg 0x%x status=0x%x\n", reg, status); + printk(KERN_WARNING + "meye: mchip_sync() timeout on reg 0x%x status=0x%x\n", + reg, status); } /* sets a value into the register */ -static inline void mchip_set(int reg, u32 v) { +static inline void mchip_set(int reg, u32 v) +{ mchip_sync(reg); writel(v, meye.mchip_mmregs + reg); } /* get the register value */ -static inline u32 mchip_read(int reg) { +static inline u32 mchip_read(int reg) +{ mchip_sync(reg); return readl(meye.mchip_mmregs + reg); } /* wait for a register to become a particular value */ -static inline int mchip_delay(u32 reg, u32 v) { +static inline int mchip_delay(u32 reg, u32 v) +{ int n = 10; - while (--n && mchip_read(reg) != v) + while (--n && mchip_read(reg) != v) udelay(1); return n; } /* setup subsampling */ -static void mchip_subsample(void) { +static void mchip_subsample(void) +{ mchip_set(MCHIP_MCC_R_SAMPLING, meye.params.subsample); mchip_set(MCHIP_MCC_R_XRANGE, mchip_hsize()); mchip_set(MCHIP_MCC_R_YRANGE, mchip_vsize()); @@ -533,29 +473,31 @@ } /* set the framerate into the mchip */ -static void mchip_set_framerate(void) { +static void mchip_set_framerate(void) +{ mchip_set(MCHIP_HIC_S_RATE, meye.params.framerate); } /* load some huffman and quantisation tables into the VRJ chip ready for JPEG compression */ -static void mchip_load_tables(void) { +static void mchip_load_tables(void) +{ int i; - int size; + int length; u16 *tables; - tables = jpeg_huffman_tables(&size); - for (i = 0; i < size / 2; i++) + tables = jpeg_huffman_tables(&length); + for (i = 0; i < length; i++) writel(tables[i], meye.mchip_mmregs + MCHIP_VRJ_TABLE_DATA); - tables = jpeg_quantisation_tables(&size, meye.params.quality); - for (i = 0; i < size / 2; i++) + tables = jpeg_quantisation_tables(&length, meye.params.quality); + for (i = 0; i < length; i++) writel(tables[i], meye.mchip_mmregs + MCHIP_VRJ_TABLE_DATA); } /* setup the VRJ parameters in the chip */ -static void mchip_vrj_setup(u8 mode) { - +static void mchip_vrj_setup(u8 mode) +{ mchip_set(MCHIP_VRJ_BUS_MODE, 5); mchip_set(MCHIP_VRJ_SIGNAL_ACTIVE_LEVEL, 0x1f); mchip_set(MCHIP_VRJ_PDAT_USE, 1); @@ -572,13 +514,14 @@ mchip_set(MCHIP_VRJ_SOF2, 0x1502); mchip_set(MCHIP_VRJ_SOF3, 0x1503); mchip_set(MCHIP_VRJ_SOF4, 0x1596); - mchip_set(MCHIP_VRJ_SOS, 0x0ed0); + mchip_set(MCHIP_VRJ_SOS, 0x0ed0); mchip_load_tables(); } /* sets the DMA parameters into the chip */ -static void mchip_dma_setup(u32 dma_addr) { +static void mchip_dma_setup(u32 dma_addr) +{ int i; mchip_set(MCHIP_MM_PT_ADDR, dma_addr); @@ -588,7 +531,8 @@ } /* setup for DMA transfers - also zeros the framebuffer */ -static int mchip_dma_alloc(void) { +static int mchip_dma_alloc(void) +{ if (!meye.mchip_dmahandle) if (ptable_alloc()) return -1; @@ -596,7 +540,8 @@ } /* frees the DMA buffer */ -static void mchip_dma_free(void) { +static void mchip_dma_free(void) +{ if (meye.mchip_dmahandle) { mchip_dma_setup(0); ptable_free(); @@ -605,7 +550,8 @@ /* stop any existing HIC action and wait for any dma to complete then reset the dma engine */ -static void mchip_hic_stop(void) { +static void mchip_hic_stop(void) +{ int i, j; meye.mchip_mode = MCHIP_HIC_MODE_NOOP; @@ -615,12 +561,13 @@ mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_STOP); mchip_delay(MCHIP_HIC_CMD, 0); for (j = 0; j < 100; ++j) { - if (mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE)) + if (mchip_delay(MCHIP_HIC_STATUS, + MCHIP_HIC_STATUS_IDLE)) return; msleep(1); } printk(KERN_ERR "meye: need to reset HIC!\n"); - + mchip_set(MCHIP_HIC_CTL, MCHIP_HIC_CTL_SOFT_RESET); msleep(250); } @@ -632,15 +579,17 @@ /****************************************************************************/ /* get the next ready frame from the dma engine */ -static u32 mchip_get_frame(void) { +static u32 mchip_get_frame(void) +{ u32 v; - + v = mchip_read(MCHIP_MM_FIR(meye.mchip_fnum)); return v; } /* frees the current frame from the dma engine */ -static void mchip_free_frame(void) { +static void mchip_free_frame(void) +{ mchip_set(MCHIP_MM_FIR(meye.mchip_fnum), 0); meye.mchip_fnum++; meye.mchip_fnum %= 4; @@ -648,17 +597,18 @@ /* read one frame from the framebuffer assuming it was captured using a uncompressed transfer */ -static void mchip_cont_read_frame(u32 v, u8 *buf, int size) { +static void mchip_cont_read_frame(u32 v, u8 *buf, int size) +{ int pt_id; pt_id = (v >> 17) & 0x3FF; ptable_copy(buf, pt_id, size, MCHIP_NB_PAGES); - } /* read a compressed frame from the framebuffer */ -static int mchip_comp_read_frame(u32 v, u8 *buf, int size) { +static int mchip_comp_read_frame(u32 v, u8 *buf, int size) +{ int pt_start, pt_end, trailer; int fsize; int i; @@ -674,18 +624,17 @@ fsize = (pt_end - pt_start) * PAGE_SIZE + trailer * 4; if (fsize > size) { - printk(KERN_WARNING "meye: oversized compressed frame %d\n", + printk(KERN_WARNING "meye: oversized compressed frame %d\n", fsize); return -1; } ptable_copy(buf, pt_start, fsize, MCHIP_NB_PAGES_MJPEG); - #ifdef MEYE_JPEG_CORRECTION /* Some mchip generated jpeg frames are incorrect. In most - * (all ?) of those cases, the final EOI (0xff 0xd9) marker + * (all ?) of those cases, the final EOI (0xff 0xd9) marker * is not present at the end of the frame. * * Since adding the final marker is not enough to restore @@ -703,9 +652,10 @@ } /* take a picture into SDRAM */ -static void mchip_take_picture(void) { +static void mchip_take_picture(void) +{ int i; - + mchip_hic_stop(); mchip_subsample(); mchip_dma_setup(meye.mchip_dmahandle); @@ -723,7 +673,8 @@ } /* dma a previously taken picture into a buffer */ -static void mchip_get_picture(u8 *buf, int bufsize) { +static void mchip_get_picture(u8 *buf, int bufsize) +{ u32 v; int i; @@ -736,7 +687,7 @@ break; msleep(1); } - for (i = 0; i < 4 ; ++i) { + for (i = 0; i < 4; ++i) { v = mchip_get_frame(); if (v & MCHIP_MM_FIR_RDY) { mchip_cont_read_frame(v, buf, bufsize); @@ -747,7 +698,8 @@ } /* start continuous dma capture */ -static void mchip_continuous_start(void) { +static void mchip_continuous_start(void) +{ mchip_hic_stop(); mchip_subsample(); mchip_set_framerate(); @@ -762,7 +714,8 @@ } /* compress one frame into a buffer */ -static int mchip_compress_frame(u8 *buf, int bufsize) { +static int mchip_compress_frame(u8 *buf, int bufsize) +{ u32 v; int len = -1, i; @@ -771,7 +724,7 @@ mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_STILL_COMP); mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START); - + mchip_delay(MCHIP_HIC_CMD, 0); for (i = 0; i < 100; ++i) { if (mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE)) @@ -779,7 +732,7 @@ msleep(1); } - for (i = 0; i < 4 ; ++i) { + for (i = 0; i < 4; ++i) { v = mchip_get_frame(); if (v & MCHIP_MM_FIR_RDY) { len = mchip_comp_read_frame(v, buf, bufsize); @@ -792,13 +745,14 @@ #if 0 /* uncompress one image into a buffer */ -static int mchip_uncompress_frame(u8 *img, int imgsize, u8 *buf, int bufsize) { +static int mchip_uncompress_frame(u8 *img, int imgsize, u8 *buf, int bufsize) +{ mchip_vrj_setup(0x3f); udelay(50); mchip_set(MCHIP_HIC_MODE, MCHIP_HIC_MODE_STILL_DECOMP); mchip_set(MCHIP_HIC_CMD, MCHIP_HIC_CMD_START); - + mchip_delay(MCHIP_HIC_CMD, 0); return mchip_comp_read_frame(buf, bufsize); @@ -806,7 +760,8 @@ #endif /* start continuous compressed capture */ -static void mchip_cont_compression_start(void) { +static void mchip_cont_compression_start(void) +{ mchip_hic_stop(); mchip_vrj_setup(0x3f); mchip_subsample(); @@ -825,88 +780,100 @@ /* Interrupt handling */ /****************************************************************************/ -static irqreturn_t meye_irq(int irq, void *dev_id, struct pt_regs *regs) { +static irqreturn_t meye_irq(int irq, void *dev_id, struct pt_regs *regs) +{ u32 v; int reqnr; - v = mchip_read(MCHIP_MM_INTA); - - while (1) { - v = mchip_get_frame(); - if (!(v & MCHIP_MM_FIR_RDY)) - return IRQ_NONE; - switch (meye.mchip_mode) { - - case MCHIP_HIC_MODE_CONT_OUT: - if (!meye_emptyq(&meye.grabq, NULL)) { - int nr = meye_pullq(&meye.grabq); - mchip_cont_read_frame( - v, - meye.grab_fbuffer + gbufsize * nr, - mchip_hsize() * mchip_vsize() * 2); - meye.grab_buffer[nr].state = MEYE_BUF_DONE; - wake_up_interruptible(&meye.grabq.proc_list); - } - break; - - case MCHIP_HIC_MODE_CONT_COMP: - if (!meye_emptyq(&meye.grabq, &reqnr)) { - int size; - size = mchip_comp_read_frame( - v, - meye.grab_fbuffer + gbufsize * reqnr, - gbufsize); - if (size == -1) - break; - reqnr = meye_pullq(&meye.grabq); - meye.grab_buffer[reqnr].size = size; - meye.grab_buffer[reqnr].state = MEYE_BUF_DONE; - wake_up_interruptible(&meye.grabq.proc_list); - } - break; + static int sequence = 0; - default: - /* do not free frame, since it can be a snap */ - return IRQ_NONE; - } /* switch */ + v = mchip_read(MCHIP_MM_INTA); - mchip_free_frame(); + if (meye.mchip_mode != MCHIP_HIC_MODE_CONT_OUT && + meye.mchip_mode != MCHIP_HIC_MODE_CONT_COMP) + return IRQ_NONE; + +again: + v = mchip_get_frame(); + if (!(v & MCHIP_MM_FIR_RDY)) + return IRQ_HANDLED; + + if (meye.mchip_mode == MCHIP_HIC_MODE_CONT_OUT) { + if (kfifo_get(meye.grabq, (unsigned char *)&reqnr, + sizeof(int)) != sizeof(int)) { + mchip_free_frame(); + return IRQ_HANDLED; + } + mchip_cont_read_frame(v, meye.grab_fbuffer + gbufsize * reqnr, + mchip_hsize() * mchip_vsize() * 2); + meye.grab_buffer[reqnr].size = mchip_hsize() * mchip_vsize() * 2; + meye.grab_buffer[reqnr].state = MEYE_BUF_DONE; + do_gettimeofday(&meye.grab_buffer[reqnr].timestamp); + meye.grab_buffer[reqnr].sequence = sequence++; + kfifo_put(meye.doneq, (unsigned char *)&reqnr, sizeof(int)); + wake_up_interruptible(&meye.proc_list); + } else { + int size; + size = mchip_comp_read_frame(v, meye.grab_temp, gbufsize); + if (size == -1) { + mchip_free_frame(); + goto again; + } + if (kfifo_get(meye.grabq, (unsigned char *)&reqnr, + sizeof(int)) != sizeof(int)) { + mchip_free_frame(); + goto again; + } + memcpy(meye.grab_fbuffer + gbufsize * reqnr, meye.grab_temp, + size); + meye.grab_buffer[reqnr].size = size; + meye.grab_buffer[reqnr].state = MEYE_BUF_DONE; + do_gettimeofday(&meye.grab_buffer[reqnr].timestamp); + meye.grab_buffer[reqnr].sequence = sequence++; + kfifo_put(meye.doneq, (unsigned char *)&reqnr, sizeof(int)); + wake_up_interruptible(&meye.proc_list); } - return IRQ_HANDLED; + mchip_free_frame(); + goto again; } /****************************************************************************/ /* video4linux integration */ /****************************************************************************/ -static int meye_open(struct inode *inode, struct file *file) { +static int meye_open(struct inode *inode, struct file *file) +{ int i, err; - err = video_exclusive_open(inode,file); + err = video_exclusive_open(inode, file); if (err < 0) return err; - + + mchip_hic_stop(); + if (mchip_dma_alloc()) { printk(KERN_ERR "meye: mchip framebuffer allocation failed\n"); - video_exclusive_release(inode,file); + video_exclusive_release(inode, file); return -ENOBUFS; } - mchip_hic_stop(); - meye_initq(&meye.grabq); + for (i = 0; i < MEYE_MAX_BUFNBRS; i++) meye.grab_buffer[i].state = MEYE_BUF_UNUSED; + kfifo_reset(meye.grabq); + kfifo_reset(meye.doneq); return 0; } -static int meye_release(struct inode *inode, struct file *file) { +static int meye_release(struct inode *inode, struct file *file) +{ mchip_hic_stop(); mchip_dma_free(); - video_exclusive_release(inode,file); + video_exclusive_release(inode, file); return 0; } static int meye_do_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, void *arg) { - + unsigned int cmd, void *arg) +{ switch (cmd) { case VIDIOCGCAP: { @@ -948,18 +915,18 @@ case VIDIOCSPICT: { struct video_picture *p = arg; - if (p->depth != 2) + if (p->depth != 16) return -EINVAL; if (p->palette != VIDEO_PALETTE_YUV422) return -EINVAL; down(&meye.lock); - sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS, + sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS, p->brightness >> 10); - sonypi_camera_command(SONYPI_COMMAND_SETCAMERAHUE, + sonypi_camera_command(SONYPI_COMMAND_SETCAMERAHUE, p->hue >> 10); - sonypi_camera_command(SONYPI_COMMAND_SETCAMERACOLOR, + sonypi_camera_command(SONYPI_COMMAND_SETCAMERACOLOR, p->colour >> 10); - sonypi_camera_command(SONYPI_COMMAND_SETCAMERACONTRAST, + sonypi_camera_command(SONYPI_COMMAND_SETCAMERACONTRAST, p->contrast >> 10); meye.picture = *p; up(&meye.lock); @@ -968,22 +935,34 @@ case VIDIOCSYNC: { int *i = arg; + int unused; if (*i < 0 || *i >= gbuffers) return -EINVAL; + down(&meye.lock); + switch (meye.grab_buffer[*i].state) { case MEYE_BUF_UNUSED: + up(&meye.lock); return -EINVAL; case MEYE_BUF_USING: - if (wait_event_interruptible(meye.grabq.proc_list, - (meye.grab_buffer[*i].state != MEYE_BUF_USING))) + if (file->f_flags & O_NONBLOCK) { + up(&meye.lock); + return -EAGAIN; + } + if (wait_event_interruptible(meye.proc_list, + (meye.grab_buffer[*i].state != MEYE_BUF_USING))) { + up(&meye.lock); return -EINTR; + } /* fall through */ case MEYE_BUF_DONE: meye.grab_buffer[*i].state = MEYE_BUF_UNUSED; + kfifo_get(meye.doneq, (unsigned char *)&unused, sizeof(int)); } + up(&meye.lock); break; } @@ -1008,14 +987,12 @@ meye.params.subsample = 0; restart = 1; } - } - else if (vm->width == 320 && vm->height == 240) { + } else if (vm->width == 320 && vm->height == 240) { if (!meye.params.subsample) { meye.params.subsample = 1; restart = 1; } - } - else { + } else { up(&meye.lock); return -EINVAL; } @@ -1023,7 +1000,7 @@ if (restart || meye.mchip_mode != MCHIP_HIC_MODE_CONT_OUT) mchip_continuous_start(); meye.grab_buffer[vm->frame].state = MEYE_BUF_USING; - meye_pushq(&meye.grabq, vm->frame); + kfifo_put(meye.grabq, (unsigned char *)&vm->frame, sizeof(int)); up(&meye.lock); break; } @@ -1074,7 +1051,7 @@ case MEYEIOC_QBUF_CAPT: { int *nb = arg; - if (!meye.grab_fbuffer) + if (!meye.grab_fbuffer) return -EINVAL; if (*nb >= gbuffers) return -EINVAL; @@ -1089,36 +1066,47 @@ if (meye.mchip_mode != MCHIP_HIC_MODE_CONT_COMP) mchip_cont_compression_start(); meye.grab_buffer[*nb].state = MEYE_BUF_USING; - meye_pushq(&meye.grabq, *nb); + kfifo_put(meye.grabq, (unsigned char *)nb, sizeof(int)); up(&meye.lock); break; } case MEYEIOC_SYNC: { int *i = arg; + int unused; if (*i < 0 || *i >= gbuffers) return -EINVAL; + down(&meye.lock); switch (meye.grab_buffer[*i].state) { case MEYE_BUF_UNUSED: + up(&meye.lock); return -EINVAL; case MEYE_BUF_USING: - if (wait_event_interruptible(meye.grabq.proc_list, - (meye.grab_buffer[*i].state != MEYE_BUF_USING))) + if (file->f_flags & O_NONBLOCK) { + up(&meye.lock); + return -EAGAIN; + } + if (wait_event_interruptible(meye.proc_list, + (meye.grab_buffer[*i].state != MEYE_BUF_USING))) { + up(&meye.lock); return -EINTR; + } /* fall through */ case MEYE_BUF_DONE: meye.grab_buffer[*i].state = MEYE_BUF_UNUSED; + kfifo_get(meye.doneq, (unsigned char *)&unused, sizeof(int)); } *i = meye.grab_buffer[*i].size; + up(&meye.lock); break; } case MEYEIOC_STILLCAPT: { - if (!meye.grab_fbuffer) + if (!meye.grab_fbuffer) return -EINVAL; if (meye.grab_buffer[0].state != MEYE_BUF_UNUSED) return -EBUSY; @@ -1136,7 +1124,7 @@ case MEYEIOC_STILLJCAPT: { int *len = arg; - if (!meye.grab_fbuffer) + if (!meye.grab_fbuffer) return -EINVAL; if (meye.grab_buffer[0].state != MEYE_BUF_UNUSED) return -EBUSY; @@ -1152,10 +1140,518 @@ break; } + case VIDIOC_QUERYCAP: { + struct v4l2_capability *cap = arg; + + if (forcev4l1) + return -EINVAL; + + memset(cap, 0, sizeof(*cap)); + strcpy(cap->driver, "meye"); + strcpy(cap->card, "meye"); + sprintf(cap->bus_info, "PCI:%s", meye.mchip_dev->slot_name); + cap->version = (MEYE_DRIVER_MAJORVERSION << 8) + + MEYE_DRIVER_MINORVERSION; + cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | + V4L2_CAP_STREAMING; + break; + } + + case VIDIOC_ENUMINPUT: { + struct v4l2_input *i = arg; + + if (i->index != 0) + return -EINVAL; + memset(i, 0, sizeof(*i)); + i->index = 0; + strcpy(i->name, "Camera"); + i->type = V4L2_INPUT_TYPE_CAMERA; + break; + } + + case VIDIOC_G_INPUT: { + int *i = arg; + + *i = 0; + break; + } + + case VIDIOC_S_INPUT: { + int *i = arg; + + if (*i != 0) + return -EINVAL; + break; + } + + case VIDIOC_QUERYCTRL: { + struct v4l2_queryctrl *c = arg; + + switch (c->id) { + + case V4L2_CID_BRIGHTNESS: + c->type = V4L2_CTRL_TYPE_INTEGER; + strcpy(c->name, "Brightness"); + c->minimum = 0; + c->maximum = 63; + c->step = 1; + c->default_value = 32; + c->flags = 0; + break; + case V4L2_CID_HUE: + c->type = V4L2_CTRL_TYPE_INTEGER; + strcpy(c->name, "Hue"); + c->minimum = 0; + c->maximum = 63; + c->step = 1; + c->default_value = 32; + c->flags = 0; + break; + case V4L2_CID_CONTRAST: + c->type = V4L2_CTRL_TYPE_INTEGER; + strcpy(c->name, "Contrast"); + c->minimum = 0; + c->maximum = 63; + c->step = 1; + c->default_value = 32; + c->flags = 0; + break; + case V4L2_CID_SATURATION: + c->type = V4L2_CTRL_TYPE_INTEGER; + strcpy(c->name, "Saturation"); + c->minimum = 0; + c->maximum = 63; + c->step = 1; + c->default_value = 32; + c->flags = 0; + break; + case V4L2_CID_AGC: + c->type = V4L2_CTRL_TYPE_INTEGER; + strcpy(c->name, "Agc"); + c->minimum = 0; + c->maximum = 63; + c->step = 1; + c->default_value = 48; + c->flags = 0; + break; + case V4L2_CID_SHARPNESS: + c->type = V4L2_CTRL_TYPE_INTEGER; + strcpy(c->name, "Sharpness"); + c->minimum = 0; + c->maximum = 63; + c->step = 1; + c->default_value = 32; + c->flags = 0; + break; + case V4L2_CID_PICTURE: + c->type = V4L2_CTRL_TYPE_INTEGER; + strcpy(c->name, "Picture"); + c->minimum = 0; + c->maximum = 63; + c->step = 1; + c->default_value = 0; + c->flags = 0; + break; + case V4L2_CID_JPEGQUAL: + c->type = V4L2_CTRL_TYPE_INTEGER; + strcpy(c->name, "JPEG quality"); + c->minimum = 0; + c->maximum = 10; + c->step = 1; + c->default_value = 8; + c->flags = 0; + break; + case V4L2_CID_FRAMERATE: + c->type = V4L2_CTRL_TYPE_INTEGER; + strcpy(c->name, "Framerate"); + c->minimum = 0; + c->maximum = 31; + c->step = 1; + c->default_value = 0; + c->flags = 0; + break; + default: + return -EINVAL; + } + break; + } + + case VIDIOC_S_CTRL: { + struct v4l2_control *c = arg; + + down(&meye.lock); + switch (c->id) { + case V4L2_CID_BRIGHTNESS: + sonypi_camera_command( + SONYPI_COMMAND_SETCAMERABRIGHTNESS, c->value); + meye.picture.brightness = c->value << 10; + break; + case V4L2_CID_HUE: + sonypi_camera_command( + SONYPI_COMMAND_SETCAMERAHUE, c->value); + meye.picture.hue = c->value << 10; + break; + case V4L2_CID_CONTRAST: + sonypi_camera_command( + SONYPI_COMMAND_SETCAMERACONTRAST, c->value); + meye.picture.contrast = c->value << 10; + break; + case V4L2_CID_SATURATION: + sonypi_camera_command( + SONYPI_COMMAND_SETCAMERACOLOR, c->value); + meye.picture.colour = c->value << 10; + break; + case V4L2_CID_AGC: + sonypi_camera_command( + SONYPI_COMMAND_SETCAMERAAGC, c->value); + meye.params.agc = c->value; + break; + case V4L2_CID_SHARPNESS: + sonypi_camera_command( + SONYPI_COMMAND_SETCAMERASHARPNESS, c->value); + meye.params.sharpness = c->value; + break; + case V4L2_CID_PICTURE: + sonypi_camera_command( + SONYPI_COMMAND_SETCAMERAPICTURE, c->value); + meye.params.picture = c->value; + break; + case V4L2_CID_JPEGQUAL: + meye.params.quality = c->value; + break; + case V4L2_CID_FRAMERATE: + meye.params.framerate = c->value; + break; + default: + up(&meye.lock); + return -EINVAL; + } + up(&meye.lock); + break; + } + + case VIDIOC_G_CTRL: { + struct v4l2_control *c = arg; + + down(&meye.lock); + switch (c->id) { + case V4L2_CID_BRIGHTNESS: + c->value = meye.picture.brightness >> 10; + break; + case V4L2_CID_HUE: + c->value = meye.picture.hue >> 10; + break; + case V4L2_CID_CONTRAST: + c->value = meye.picture.contrast >> 10; + break; + case V4L2_CID_SATURATION: + c->value = meye.picture.colour >> 10; + break; + case V4L2_CID_AGC: + c->value = meye.params.agc; + break; + case V4L2_CID_SHARPNESS: + c->value = meye.params.sharpness; + break; + case V4L2_CID_PICTURE: + c->value = meye.params.picture; + break; + case V4L2_CID_JPEGQUAL: + c->value = meye.params.quality; + break; + case V4L2_CID_FRAMERATE: + c->value = meye.params.framerate; + break; + default: + up(&meye.lock); + return -EINVAL; + } + up(&meye.lock); + break; + } + + case VIDIOC_ENUM_FMT: { + struct v4l2_fmtdesc *f = arg; + + if (f->index > 1) + return -EINVAL; + if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + return -EINVAL; + if (f->index == 0) { + /* standard YUV 422 capture */ + memset(f, 0, sizeof(*f)); + f->index = 0; + f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + f->flags = 0; + strcpy(f->description, "YUV422"); + f->pixelformat = V4L2_PIX_FMT_YUYV; + } else { + /* compressed MJPEG capture */ + memset(f, 0, sizeof(*f)); + f->index = 1; + f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + f->flags = V4L2_FMT_FLAG_COMPRESSED; + strcpy(f->description, "MJPEG"); + f->pixelformat = V4L2_PIX_FMT_MJPEG; + } + break; + } + + case VIDIOC_TRY_FMT: { + struct v4l2_format *f = arg; + + if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + return -EINVAL; + if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_YUYV && + f->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG) + return -EINVAL; + if (f->fmt.pix.field != V4L2_FIELD_ANY && + f->fmt.pix.field != V4L2_FIELD_NONE) + return -EINVAL; + f->fmt.pix.field = V4L2_FIELD_NONE; + if (f->fmt.pix.width <= 320) { + f->fmt.pix.width = 320; + f->fmt.pix.height = 240; + } else { + f->fmt.pix.width = 640; + f->fmt.pix.height = 480; + } + f->fmt.pix.bytesperline = f->fmt.pix.width * 2; + f->fmt.pix.sizeimage = f->fmt.pix.height * + f->fmt.pix.bytesperline; + f->fmt.pix.colorspace = 0; + f->fmt.pix.priv = 0; + break; + } + + case VIDIOC_G_FMT: { + struct v4l2_format *f = arg; + + if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + return -EINVAL; + memset(&f->fmt.pix, 0, sizeof(struct v4l2_pix_format)); + f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + switch (meye.mchip_mode) { + case MCHIP_HIC_MODE_CONT_OUT: + default: + f->fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV; + break; + case MCHIP_HIC_MODE_CONT_COMP: + f->fmt.pix.pixelformat = V4L2_PIX_FMT_MJPEG; + break; + } + f->fmt.pix.field = V4L2_FIELD_NONE; + f->fmt.pix.width = mchip_hsize(); + f->fmt.pix.height = mchip_vsize(); + f->fmt.pix.bytesperline = f->fmt.pix.width * 2; + f->fmt.pix.sizeimage = f->fmt.pix.height * + f->fmt.pix.bytesperline; + f->fmt.pix.colorspace = 0; + f->fmt.pix.priv = 0; + break; + } + + case VIDIOC_S_FMT: { + struct v4l2_format *f = arg; + + if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + return -EINVAL; + if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_YUYV && + f->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG) + return -EINVAL; + if (f->fmt.pix.field != V4L2_FIELD_ANY && + f->fmt.pix.field != V4L2_FIELD_NONE) + return -EINVAL; + f->fmt.pix.field = V4L2_FIELD_NONE; + down(&meye.lock); + if (f->fmt.pix.width <= 320) { + f->fmt.pix.width = 320; + f->fmt.pix.height = 240; + meye.params.subsample = 1; + } else { + f->fmt.pix.width = 640; + f->fmt.pix.height = 480; + meye.params.subsample = 0; + } + switch (f->fmt.pix.pixelformat) { + case V4L2_PIX_FMT_YUYV: + meye.mchip_mode = MCHIP_HIC_MODE_CONT_OUT; + break; + case V4L2_PIX_FMT_MJPEG: + meye.mchip_mode = MCHIP_HIC_MODE_CONT_COMP; + break; + } + up(&meye.lock); + f->fmt.pix.bytesperline = f->fmt.pix.width * 2; + f->fmt.pix.sizeimage = f->fmt.pix.height * + f->fmt.pix.bytesperline; + f->fmt.pix.colorspace = 0; + f->fmt.pix.priv = 0; + + break; + } + + case VIDIOC_REQBUFS: { + struct v4l2_requestbuffers *req = arg; + int i; + + if (req->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + return -EINVAL; + if (req->memory != V4L2_MEMORY_MMAP) + return -EINVAL; + if (meye.grab_fbuffer && req->count == gbuffers) { + /* already allocated, no modifications */ + break; + } + down(&meye.lock); + if (meye.grab_fbuffer) { + for (i = 0; i < gbuffers; i++) + if (meye.vma_use_count[i]) { + up(&meye.lock); + return -EINVAL; + } + rvfree(meye.grab_fbuffer, gbuffers * gbufsize); + meye.grab_fbuffer = NULL; + } + gbuffers = max(2, min((int)req->count, MEYE_MAX_BUFNBRS)); + req->count = gbuffers; + meye.grab_fbuffer = rvmalloc(gbuffers * gbufsize); + if (!meye.grab_fbuffer) { + printk(KERN_ERR "meye: v4l framebuffer allocation" + " failed\n"); + up(&meye.lock); + return -ENOMEM; + } + for (i = 0; i < gbuffers; i++) + meye.vma_use_count[i] = 0; + up(&meye.lock); + break; + } + + case VIDIOC_QUERYBUF: { + struct v4l2_buffer *buf = arg; + int index = buf->index; + + if (index < 0 || index >= gbuffers) + return -EINVAL; + memset(buf, 0, sizeof(*buf)); + buf->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + buf->index = index; + buf->bytesused = meye.grab_buffer[index].size; + buf->flags = V4L2_BUF_FLAG_MAPPED; + if (meye.grab_buffer[index].state == MEYE_BUF_USING) + buf->flags |= V4L2_BUF_FLAG_QUEUED; + if (meye.grab_buffer[index].state == MEYE_BUF_DONE) + buf->flags |= V4L2_BUF_FLAG_DONE; + buf->field = V4L2_FIELD_NONE; + buf->timestamp = meye.grab_buffer[index].timestamp; + buf->sequence = meye.grab_buffer[index].sequence; + buf->memory = V4L2_MEMORY_MMAP; + buf->m.offset = index * gbufsize; + buf->length = gbufsize; + break; + } + + case VIDIOC_QBUF: { + struct v4l2_buffer *buf = arg; + + if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + return -EINVAL; + if (buf->memory != V4L2_MEMORY_MMAP) + return -EINVAL; + if (buf->index < 0 || buf->index >= gbuffers) + return -EINVAL; + if (meye.grab_buffer[buf->index].state != MEYE_BUF_UNUSED) + return -EINVAL; + down(&meye.lock); + buf->flags |= V4L2_BUF_FLAG_QUEUED; + buf->flags &= ~V4L2_BUF_FLAG_DONE; + meye.grab_buffer[buf->index].state = MEYE_BUF_USING; + kfifo_put(meye.grabq, (unsigned char *)&buf->index, sizeof(int)); + up(&meye.lock); + break; + } + + case VIDIOC_DQBUF: { + struct v4l2_buffer *buf = arg; + int reqnr; + + if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + return -EINVAL; + if (buf->memory != V4L2_MEMORY_MMAP) + return -EINVAL; + + down(&meye.lock); + if (kfifo_len(meye.doneq) == 0 && file->f_flags & O_NONBLOCK) { + up(&meye.lock); + return -EAGAIN; + } + if (wait_event_interruptible(meye.proc_list, + kfifo_len(meye.doneq) != 0) < 0) { + up(&meye.lock); + return -EINTR; + } + if (!kfifo_get(meye.doneq, (unsigned char *)&reqnr, + sizeof(int))) { + up(&meye.lock); + return -EBUSY; + } + if (meye.grab_buffer[reqnr].state != MEYE_BUF_DONE) { + up(&meye.lock); + return -EINVAL; + } + buf->index = reqnr; + buf->bytesused = meye.grab_buffer[reqnr].size; + buf->flags = V4L2_BUF_FLAG_MAPPED; + buf->field = V4L2_FIELD_NONE; + buf->timestamp = meye.grab_buffer[reqnr].timestamp; + buf->sequence = meye.grab_buffer[reqnr].sequence; + buf->memory = V4L2_MEMORY_MMAP; + buf->m.offset = reqnr * gbufsize; + buf->length = gbufsize; + meye.grab_buffer[reqnr].state = MEYE_BUF_UNUSED; + up(&meye.lock); + break; + } + + case VIDIOC_STREAMON: { + down(&meye.lock); + switch (meye.mchip_mode) { + case MCHIP_HIC_MODE_CONT_OUT: + mchip_continuous_start(); + break; + case MCHIP_HIC_MODE_CONT_COMP: + mchip_cont_compression_start(); + break; + default: + up(&meye.lock); + return -EINVAL; + } + up(&meye.lock); + break; + } + + case VIDIOC_STREAMOFF: { + int i; + + down(&meye.lock); + mchip_hic_stop(); + kfifo_reset(meye.grabq); + kfifo_reset(meye.doneq); + for (i = 0; i < MEYE_MAX_BUFNBRS; i++) + meye.grab_buffer[i].state = MEYE_BUF_UNUSED; + up(&meye.lock); + break; + } + + /* + * XXX what about private snapshot ioctls ? + * Do they need to be converted to V4L2 ? + */ + default: return -ENOIOCTLCMD; - - } /* switch */ + } return 0; } @@ -1166,9 +1662,40 @@ return video_usercopy(inode, file, cmd, arg, meye_do_ioctl); } -static int meye_mmap(struct file *file, struct vm_area_struct *vma) { +static unsigned int meye_poll(struct file *file, poll_table *wait) +{ + unsigned int res = 0; + + down(&meye.lock); + poll_wait(file, &meye.proc_list, wait); + if (kfifo_len(meye.doneq)) + res = POLLIN | POLLRDNORM; + up(&meye.lock); + return res; +} + +static void meye_vm_open(struct vm_area_struct *vma) +{ + int idx = (int)vma->vm_private_data; + meye.vma_use_count[idx]++; +} + +static void meye_vm_close(struct vm_area_struct *vma) +{ + int idx = (int)vma->vm_private_data; + meye.vma_use_count[idx]--; +} + +static struct vm_operations_struct meye_vm_ops = { + .open = meye_vm_open, + .close = meye_vm_close, +}; + +static int meye_mmap(struct file *file, struct vm_area_struct *vma) +{ unsigned long start = vma->vm_start; - unsigned long size = vma->vm_end - vma->vm_start; + unsigned long size = vma->vm_end - vma->vm_start; + unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; unsigned long page, pos; down(&meye.lock); @@ -1177,6 +1704,8 @@ return -EINVAL; } if (!meye.grab_fbuffer) { + int i; + /* lazy allocation */ meye.grab_fbuffer = rvmalloc(gbuffers*gbufsize); if (!meye.grab_fbuffer) { @@ -1184,19 +1713,31 @@ up(&meye.lock); return -ENOMEM; } + for (i = 0; i < gbuffers; i++) + meye.vma_use_count[i] = 0; } - pos = (unsigned long)meye.grab_fbuffer; + pos = (unsigned long)meye.grab_fbuffer + offset; while (size > 0) { - page = page_to_pfn(vmalloc_to_page((void *)pos)); + page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) { up(&meye.lock); return -EAGAIN; } start += PAGE_SIZE; pos += PAGE_SIZE; - size -= PAGE_SIZE; + if (size > PAGE_SIZE) + size -= PAGE_SIZE; + else + size = 0; } + + vma->vm_ops = &meye_vm_ops; + vma->vm_flags &= ~VM_IO; /* not I/O memory */ + vma->vm_flags |= VM_RESERVED; /* avoid to swap out this VMA */ + vma->vm_private_data = (void *) (offset / gbufsize); + meye_vm_open(vma); + up(&meye.lock); return 0; } @@ -1207,6 +1748,7 @@ .release = meye_release, .mmap = meye_mmap, .ioctl = meye_ioctl, + .poll = meye_poll, .llseek = no_llseek, }; @@ -1256,70 +1798,88 @@ } #endif -static int __devinit meye_probe(struct pci_dev *pcidev, - const struct pci_device_id *ent) { - int ret; +static int __devinit meye_probe(struct pci_dev *pcidev, + const struct pci_device_id *ent) +{ + int ret = -EBUSY; unsigned long mchip_adr; u8 revision; if (meye.mchip_dev != NULL) { printk(KERN_ERR "meye: only one device allowed!\n"); - ret = -EBUSY; - goto out1; + goto outnotdev; } meye.mchip_dev = pcidev; meye.video_dev = video_device_alloc(); if (!meye.video_dev) { printk(KERN_ERR "meye: video_device_alloc() failed!\n"); - ret = -EBUSY; - goto out1; + goto outnotdev; } + + ret = -ENOMEM; + meye.grab_temp = vmalloc(MCHIP_NB_PAGES_MJPEG * PAGE_SIZE); + if (!meye.grab_temp) { + printk(KERN_ERR "meye: grab buffer allocation failed\n"); + goto outvmalloc; + } + + meye.grabq_lock = SPIN_LOCK_UNLOCKED; + meye.grabq = kfifo_alloc(sizeof(int) * MEYE_MAX_BUFNBRS, GFP_KERNEL, + &meye.grabq_lock); + if (IS_ERR(meye.grabq)) { + printk(KERN_ERR "meye: fifo allocation failed\n"); + goto outkfifoalloc1; + } + meye.doneq_lock = SPIN_LOCK_UNLOCKED; + meye.doneq = kfifo_alloc(sizeof(int) * MEYE_MAX_BUFNBRS, GFP_KERNEL, + &meye.doneq_lock); + if (IS_ERR(meye.doneq)) { + printk(KERN_ERR "meye: fifo allocation failed\n"); + goto outkfifoalloc2; + } + memcpy(meye.video_dev, &meye_template, sizeof(meye_template)); meye.video_dev->dev = &meye.mchip_dev->dev; sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 1); + ret = -EIO; if ((ret = pci_enable_device(meye.mchip_dev))) { printk(KERN_ERR "meye: pci_enable_device failed\n"); - goto out2; + goto outenabledev; } - meye.mchip_irq = pcidev->irq; mchip_adr = pci_resource_start(meye.mchip_dev,0); if (!mchip_adr) { printk(KERN_ERR "meye: mchip has no device base address\n"); - ret = -EIO; - goto out3; + goto outregions; } if (!request_mem_region(pci_resource_start(meye.mchip_dev, 0), - pci_resource_len(meye.mchip_dev, 0), + pci_resource_len(meye.mchip_dev, 0), "meye")) { - ret = -EIO; printk(KERN_ERR "meye: request_mem_region failed\n"); - goto out3; + goto outregions; + } + meye.mchip_mmregs = ioremap(mchip_adr, MCHIP_MM_REGS); + if (!meye.mchip_mmregs) { + printk(KERN_ERR "meye: ioremap failed\n"); + goto outremap; } - pci_read_config_byte(meye.mchip_dev, PCI_REVISION_ID, &revision); - - pci_set_master(meye.mchip_dev); + meye.mchip_irq = pcidev->irq; + if (request_irq(meye.mchip_irq, meye_irq, + SA_INTERRUPT | SA_SHIRQ, "meye", meye_irq)) { + printk(KERN_ERR "meye: request_irq failed\n"); + goto outreqirq; + } + pci_read_config_byte(meye.mchip_dev, PCI_REVISION_ID, &revision); pci_write_config_byte(meye.mchip_dev, PCI_CACHE_LINE_SIZE, 8); pci_write_config_byte(meye.mchip_dev, PCI_LATENCY_TIMER, 64); - if ((ret = request_irq(meye.mchip_irq, meye_irq, - SA_INTERRUPT | SA_SHIRQ, "meye", meye_irq))) { - printk(KERN_ERR "meye: request_irq failed (ret=%d)\n", ret); - goto out4; - } + pci_set_master(meye.mchip_dev); - meye.mchip_mmregs = ioremap(mchip_adr, MCHIP_MM_REGS); - if (!meye.mchip_mmregs) { - printk(KERN_ERR "meye: ioremap failed\n"); - ret = -EIO; - goto out5; - } - /* Ask the camera to perform a soft reset. */ pci_write_config_word(meye.mchip_dev, MCHIP_PCI_SOFTRESET_SET, 1); @@ -1335,23 +1895,15 @@ msleep(1); mchip_set(MCHIP_MM_INTA, MCHIP_MM_INTA_HIC_1_MASK); - if (video_register_device(meye.video_dev, VFL_TYPE_GRABBER, video_nr) < 0) { - + if (video_register_device(meye.video_dev, VFL_TYPE_GRABBER, + video_nr) < 0) { printk(KERN_ERR "meye: video_register_device failed\n"); - ret = -EIO; - goto out6; + goto outvideoreg; } - - printk(KERN_INFO "meye: Motion Eye Camera Driver v%d.%d.\n", - MEYE_DRIVER_MAJORVERSION, - MEYE_DRIVER_MINORVERSION); - printk(KERN_INFO "meye: mchip KL5A72002 rev. %d, base %lx, irq %d\n", - revision, mchip_adr, meye.mchip_irq); - /* init all fields */ init_MUTEX(&meye.lock); - - meye.picture.depth = 2; + init_waitqueue_head(&meye.proc_list); + meye.picture.depth = 16; meye.picture.palette = VIDEO_PALETTE_YUV422; meye.picture.brightness = 32 << 10; meye.picture.hue = 32 << 10; @@ -1359,11 +1911,12 @@ meye.picture.contrast = 32 << 10; meye.picture.whiteness = 0; meye.params.subsample = 0; - meye.params.quality = 7; + meye.params.quality = 8; meye.params.sharpness = 32; meye.params.agc = 48; meye.params.picture = 0; meye.params.framerate = 0; + sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS, 32); sonypi_camera_command(SONYPI_COMMAND_SETCAMERAHUE, 32); sonypi_camera_command(SONYPI_COMMAND_SETCAMERACOLOR, 32); @@ -1372,27 +1925,37 @@ sonypi_camera_command(SONYPI_COMMAND_SETCAMERAPICTURE, 0); sonypi_camera_command(SONYPI_COMMAND_SETCAMERAAGC, 48); + printk(KERN_INFO "meye: Motion Eye Camera Driver v%s.\n", + MEYE_DRIVER_VERSION); + printk(KERN_INFO "meye: mchip KL5A72002 rev. %d, base %lx, irq %d\n", + revision, mchip_adr, meye.mchip_irq); + return 0; -out6: - iounmap(meye.mchip_mmregs); -out5: + +outvideoreg: free_irq(meye.mchip_irq, meye_irq); -out4: +outreqirq: + iounmap(meye.mchip_mmregs); +outremap: release_mem_region(pci_resource_start(meye.mchip_dev, 0), pci_resource_len(meye.mchip_dev, 0)); -out3: +outregions: pci_disable_device(meye.mchip_dev); -out2: - video_device_release(meye.video_dev); - meye.video_dev = NULL; - +outenabledev: sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0); -out1: + kfifo_free(meye.doneq); +outkfifoalloc2: + kfifo_free(meye.grabq); +outkfifoalloc1: + vfree(meye.grab_temp); +outvmalloc: + video_device_release(meye.video_dev); +outnotdev: return ret; } -static void __devexit meye_remove(struct pci_dev *pcidev) { - +static void __devexit meye_remove(struct pci_dev *pcidev) +{ video_unregister_device(meye.video_dev); mchip_hic_stop(); @@ -1411,16 +1974,23 @@ pci_disable_device(meye.mchip_dev); - if (meye.grab_fbuffer) - rvfree(meye.grab_fbuffer, gbuffers*gbufsize); - sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0); + kfifo_free(meye.doneq); + kfifo_free(meye.grabq); + + vfree(meye.grab_temp); + + if (meye.grab_fbuffer) { + rvfree(meye.grab_fbuffer, gbuffers*gbufsize); + meye.grab_fbuffer = NULL; + } + printk(KERN_INFO "meye: removed\n"); } static struct pci_device_id meye_pci_tbl[] = { - { PCI_VENDOR_ID_KAWASAKI, PCI_DEVICE_ID_MCHIP_KL5A72002, + { PCI_VENDOR_ID_KAWASAKI, PCI_DEVICE_ID_MCHIP_KL5A72002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { } }; @@ -1438,54 +2008,23 @@ #endif }; -static int __init meye_init_module(void) { - if (gbuffers < 2) - gbuffers = 2; - if (gbuffers > MEYE_MAX_BUFNBRS) - gbuffers = MEYE_MAX_BUFNBRS; +static int __init meye_init(void) +{ + gbuffers = max(2, min((int)gbuffers, MEYE_MAX_BUFNBRS)); if (gbufsize < 0 || gbufsize > MEYE_MAX_BUFSIZE) gbufsize = MEYE_MAX_BUFSIZE; - printk(KERN_INFO "meye: using %d buffers with %dk (%dk total) for capture\n", - gbuffers, gbufsize/1024, gbuffers*gbufsize/1024); - return pci_module_init(&meye_driver); + gbufsize = PAGE_ALIGN(gbufsize); + printk(KERN_INFO "meye: using %d buffers with %dk (%dk total)" + "for capture\n", + gbuffers, + gbufsize / 1024, gbuffers * gbufsize / 1024); + return pci_register_driver(&meye_driver); } -static void __exit meye_cleanup_module(void) { +static void __exit meye_exit(void) +{ pci_unregister_driver(&meye_driver); } -#ifndef MODULE -static int __init meye_setup(char *str) { - int ints[4]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - if (ints[0] <= 0) - goto out; - gbuffers = ints[1]; - if (ints[0] == 1) - goto out; - gbufsize = ints[2]; - if (ints[0] == 2) - goto out; - video_nr = ints[3]; -out: - return 1; -} - -__setup("meye=", meye_setup); -#endif - -MODULE_AUTHOR("Stelian Pop "); -MODULE_DESCRIPTION("video4linux driver for the MotionEye camera"); -MODULE_LICENSE("GPL"); - -MODULE_PARM(gbuffers,"i"); -MODULE_PARM_DESC(gbuffers,"number of capture buffers, default is 2 (32 max)"); -MODULE_PARM(gbufsize,"i"); -MODULE_PARM_DESC(gbufsize,"size of the capture buffers, default is 614400"); -MODULE_PARM(video_nr,"i"); -MODULE_PARM_DESC(video_nr,"video device to register (0=/dev/video0, etc)"); - -/* Module entry points */ -module_init(meye_init_module); -module_exit(meye_cleanup_module); +module_init(meye_init); +module_exit(meye_exit); diff -Nru a/drivers/media/video/meye.h b/drivers/media/video/meye.h --- a/drivers/media/video/meye.h 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/video/meye.h 2004-11-10 17:19:04 -08:00 @@ -1,27 +1,27 @@ -/* +/* * Motion Eye video4linux driver for Sony Vaio PictureBook * - * Copyright (C) 2001-2003 Stelian Pop + * Copyright (C) 2001-2004 Stelian Pop * * Copyright (C) 2001-2002 Alcôve * * Copyright (C) 2000 Andrew Tridgell * * Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras. - * + * * Some parts borrowed from various video4linux drivers, especially * bttv-driver.c and zoran.c, see original files for credits. - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -30,12 +30,16 @@ #ifndef _MEYE_PRIV_H_ #define _MEYE_PRIV_H_ -#define MEYE_DRIVER_MAJORVERSION 1 -#define MEYE_DRIVER_MINORVERSION 10 +#define MEYE_DRIVER_MAJORVERSION 1 +#define MEYE_DRIVER_MINORVERSION 11 + +#define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \ + __stringify(MEYE_DRIVER_MINORVERSION) #include #include #include +#include /****************************************************************************/ /* Motion JPEG chip registers */ @@ -43,7 +47,7 @@ /* Motion JPEG chip PCI configuration registers */ #define MCHIP_PCI_POWER_CSR 0x54 -#define MCHIP_PCI_MCORE_STATUS 0x60 /* see HIC_STATUS */ +#define MCHIP_PCI_MCORE_STATUS 0x60 /* see HIC_STATUS */ #define MCHIP_PCI_HOSTUSEREQ_SET 0x64 #define MCHIP_PCI_HOSTUSEREQ_CLR 0x68 #define MCHIP_PCI_LOWPOWER_SET 0x6c @@ -73,7 +77,7 @@ #define MCHIP_MM_INTA_PCI_ERR 0x00000040 /* PCI error */ #define MCHIP_MM_INTA_PCI_ERR_MASK 0x00004000 -#define MCHIP_MM_PT_ADDR 0x08 /* page table address */ +#define MCHIP_MM_PT_ADDR 0x08 /* page table address*/ /* n*4kB */ #define MCHIP_NB_PAGES 1024 /* pages for display */ #define MCHIP_NB_PAGES_MJPEG 256 /* pages for mjpeg */ @@ -275,42 +279,34 @@ struct meye_grab_buffer { int state; /* state of buffer */ unsigned long size; /* size of jpg frame */ + struct timeval timestamp; /* timestamp */ + unsigned long sequence; /* sequence number */ }; -/* queues containing the buffer indices */ +/* size of kfifos containings buffer indices */ #define MEYE_QUEUE_SIZE MEYE_MAX_BUFNBRS -struct meye_queue { - unsigned int head; /* queue head */ - unsigned int tail; /* queue tail */ - unsigned int len; /* queue length */ - spinlock_t s_lock; /* spinlock protecting the queue */ - wait_queue_head_t proc_list; /* wait queue */ - int buf[MEYE_QUEUE_SIZE]; /* queue contents */ -}; /* Motion Eye device structure */ struct meye { - - /* mchip related */ struct pci_dev *mchip_dev; /* pci device */ u8 mchip_irq; /* irq */ u8 mchip_mode; /* actual mchip mode: HIC_MODE... */ u8 mchip_fnum; /* current mchip frame number */ - unsigned char *mchip_mmregs; /* mchip: memory mapped registers */ u8 *mchip_ptable[MCHIP_NB_PAGES];/* mchip: ptable */ dma_addr_t *mchip_ptable_toc; /* mchip: ptable toc */ dma_addr_t mchip_dmahandle; /* mchip: dma handle to ptable toc */ - unsigned char *grab_fbuffer; /* capture framebuffer */ + unsigned char *grab_temp; /* temporary buffer */ /* list of buffers */ struct meye_grab_buffer grab_buffer[MEYE_MAX_BUFNBRS]; - - /* other */ + int vma_use_count[MEYE_MAX_BUFNBRS]; /* mmap count */ struct semaphore lock; /* semaphore for open/mmap... */ - - struct meye_queue grabq; /* queue for buffers to be grabbed */ - + struct kfifo *grabq; /* queue for buffers to be grabbed */ + spinlock_t grabq_lock; /* lock protecting the queue */ + struct kfifo *doneq; /* queue for grabbed buffers */ + spinlock_t doneq_lock; /* lock protecting the queue */ + wait_queue_head_t proc_list; /* wait queue */ struct video_device *video_dev; /* video device parameters */ struct video_picture picture; /* video picture parameters */ struct meye_params params; /* additional parameters */ diff -Nru a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c --- a/drivers/media/video/msp3400.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/video/msp3400.c 2004-11-10 17:19:05 -08:00 @@ -47,6 +47,8 @@ #include #include #include +#include +#include #include #include @@ -54,54 +56,53 @@ #include #include "msp3400.h" +#define OPMODE_AUTO -1 +#define OPMODE_MANUAL 0 +#define OPMODE_SIMPLE 1 /* use short programming (>= msp3410 only) */ +#define OPMODE_SIMPLER 2 /* use shorter programming (>= msp34xxG) */ + /* insmod parameters */ +static int opmode = OPMODE_AUTO; static int debug = 0; /* debug output */ static int once = 0; /* no continous stereo monitoring */ static int amsound = 0; /* hard-wire AM sound at 6.5 Hz (france), - the autoscan seems work well only with FM... */ -static int simple = -1; /* use short programming (>= msp3410 only) */ + the autoscan seems work well only with FM... */ +static int standard = 1; /* Override auto detect of audio standard, if needed. */ static int dolby = 0; -#define DFP_COUNT 0x41 -static const int bl_dfp[] = { - 0x00, 0x01, 0x02, 0x03, 0x06, 0x08, 0x09, 0x0a, - 0x0b, 0x0d, 0x0e, 0x10 -}; +static int stereo_threshold = 0x190; /* a2 threshold for stereo/bilingual + (msp34xxg only) 0x00a0-0x03c0 */ struct msp3400c { int rev1,rev2; - - int simple; + + int opmode; int mode; int norm; - int stereo; int nicam_on; int acb; int main, second; /* sound carrier */ int input; + int source; /* see msp34xxg_set_source */ + + /* v4l2 */ + int audmode; + int rxsubchans; int muted; int volume, balance; int bass, treble; - /* shadow register set */ - int dfp_regs[DFP_COUNT]; - /* thread */ - pid_t tpid; - struct completion texit; + struct task_struct *kthread; wait_queue_head_t wq; - - int active:1; int restart:1; - int rmmod:1; - - int watch_stereo; - struct timer_list wake_stereo; + int watch_stereo:1; }; #define HAVE_NICAM(msp) (((msp->rev2>>8) & 0xff) != 00) #define HAVE_SIMPLE(msp) ((msp->rev1 & 0xff) >= 'D'-'@') +#define HAVE_SIMPLER(msp) ((msp->rev1 & 0xff) >= 'G'-'@') #define HAVE_RADIO(msp) ((msp->rev1 & 0xff) >= 'G'-'@') #define VIDEO_MODE_RADIO 16 /* norm magic for radio mode */ @@ -111,11 +112,21 @@ #define dprintk if (debug >= 1) printk #define d2printk if (debug >= 2) printk -MODULE_PARM(once,"i"); -MODULE_PARM(debug,"i"); -MODULE_PARM(simple,"i"); -MODULE_PARM(amsound,"i"); -MODULE_PARM(dolby,"i"); +/* read-only */ +module_param(opmode, int, 0444); + +/* read-write */ +module_param(once, int, 0644); +module_param(debug, int, 0644); +module_param(stereo_threshold, int, 0644); +module_param(standard, int, 0644); +module_param(amsound, int, 0644); +module_param(dolby, int, 0644); + +MODULE_PARM_DESC(once, "No continuous stereo monitoring"); +MODULE_PARM_DESC(debug, "Enable debug messages"); +MODULE_PARM_DESC(standard, "Specify audio standard: 32 = NTSC, 64 = radio, Default: Autodetect"); +MODULE_PARM_DESC(amsound, "Hardwire AM sound at 6.5Hz (France), FM can autoscan"); MODULE_DESCRIPTION("device driver for msp34xx TV sound processor"); MODULE_AUTHOR("Gerd Knorr"); @@ -141,10 +152,6 @@ /* ----------------------------------------------------------------------- */ /* functions for talking to the MSP3400C Sound processor */ -#ifndef I2C_M_IGNORE_NAK -# define I2C_M_IGNORE_NAK 0x1000 -#endif - static int msp3400c_reset(struct i2c_client *client) { /* reset and read revision code */ @@ -160,14 +167,14 @@ { client->addr, 0, 3, write }, { client->addr, I2C_M_RD, 2, read }, }; - + if ( (1 != i2c_transfer(client->adapter,&reset[0],1)) || (1 != i2c_transfer(client->adapter,&reset[1],1)) || (2 != i2c_transfer(client->adapter,test,2)) ) { printk(KERN_ERR "msp3400: chip reset failed\n"); return -1; } - return 0; + return 0; } static int @@ -198,7 +205,7 @@ msp3400c_reset(client); return -1; } - return read[0] << 8 | read[1]; + return read[0] << 8 | read[1]; } static int @@ -303,15 +310,15 @@ static struct CARRIER_DETECT carrier_detect_main[] = { /* main carrier */ - { MSP_CARRIER(4.5), "4.5 NTSC" }, - { MSP_CARRIER(5.5), "5.5 PAL B/G" }, + { MSP_CARRIER(4.5), "4.5 NTSC" }, + { MSP_CARRIER(5.5), "5.5 PAL B/G" }, { MSP_CARRIER(6.0), "6.0 PAL I" }, { MSP_CARRIER(6.5), "6.5 PAL D/K + SAT + SECAM" } }; static struct CARRIER_DETECT carrier_detect_55[] = { /* PAL B/G */ - { MSP_CARRIER(5.7421875), "5.742 PAL B/G FM-stereo" }, + { MSP_CARRIER(5.7421875), "5.742 PAL B/G FM-stereo" }, { MSP_CARRIER(5.85), "5.85 PAL B/G NICAM" } }; @@ -329,16 +336,6 @@ /* ----------------------------------------------------------------------- */ -#define SCART_MASK 0 -#define SCART_IN1 1 -#define SCART_IN2 2 -#define SCART_IN1_DA 3 -#define SCART_IN2_DA 4 -#define SCART_IN3 5 -#define SCART_IN4 6 -#define SCART_MONO 7 -#define SCART_MUTE 8 - static int scarts[3][9] = { /* MASK IN1 IN2 IN1_DA IN2_DA IN3 IN4 MONO MUTE */ { 0x0320, 0x0000, 0x0200, -1, -1, 0x0300, 0x0020, 0x0100, 0x0320 }, @@ -392,8 +389,8 @@ muted ? "on" : "off", volume, balance, val>>8, bal); msp3400c_write(client,I2C_MSP3400C_DFP, 0x0000, val); /* loudspeaker */ msp3400c_write(client,I2C_MSP3400C_DFP, 0x0006, val); /* headphones */ - /* scart - on/off only */ - msp3400c_write(client,I2C_MSP3400C_DFP, 0x0007, val ? 0x4000 : 0); + msp3400c_write(client,I2C_MSP3400C_DFP, 0x0007, + muted ? 0x01 : (val | 0x01)); msp3400c_write(client,I2C_MSP3400C_DFP, 0x0001, bal << 8); } @@ -417,31 +414,32 @@ { struct msp3400c *msp = i2c_get_clientdata(client); int i; - + dprintk(KERN_DEBUG "msp3400: setmode: %d\n",type); - msp->mode = type; - msp->stereo = VIDEO_SOUND_MONO; + msp->mode = type; + msp->audmode = V4L2_TUNER_MODE_MONO; + msp->rxsubchans = V4L2_TUNER_SUB_MONO; msp3400c_write(client,I2C_MSP3400C_DEM, 0x00bb, /* ad_cv */ msp_init_data[type].ad_cv); - + for (i = 5; i >= 0; i--) /* fir 1 */ msp3400c_write(client,I2C_MSP3400C_DEM, 0x0001, msp_init_data[type].fir1[i]); - + msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0004); /* fir 2 */ msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0040); msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0000); for (i = 5; i >= 0; i--) msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, msp_init_data[type].fir2[i]); - + msp3400c_write(client,I2C_MSP3400C_DEM, 0x0083, /* MODE_REG */ msp_init_data[type].mode_reg); - + msp3400c_setcarrier(client, msp_init_data[type].cdo1, msp_init_data[type].cdo2); - + msp3400c_write(client,I2C_MSP3400C_DEM, 0x0056, 0); /*LOAD_REG_1/2*/ if (dolby) { @@ -470,51 +468,67 @@ } } +static int best_audio_mode(int rxsubchans) +{ + if (rxsubchans & V4L2_TUNER_SUB_STEREO) + return V4L2_TUNER_MODE_STEREO; + if (rxsubchans & V4L2_TUNER_SUB_LANG1) + return V4L2_TUNER_MODE_LANG1; + if (rxsubchans & V4L2_TUNER_SUB_LANG2) + return V4L2_TUNER_MODE_LANG2; + return V4L2_TUNER_MODE_MONO; +} + /* turn on/off nicam + stereo */ -static void msp3400c_setstereo(struct i2c_client *client, int mode) +static void msp3400c_set_audmode(struct i2c_client *client, int audmode) { static char *strmode[16] = { #if __GNUC__ >= 3 - [ 0 ... 15 ] = "invalid", + [ 0 ... 15 ] = "invalid", #endif - [ VIDEO_SOUND_MONO ] = "mono", - [ VIDEO_SOUND_STEREO ] = "stereo", - [ VIDEO_SOUND_LANG1 ] = "lang1", - [ VIDEO_SOUND_LANG2 ] = "lang2", + [ V4L2_TUNER_MODE_MONO ] = "mono", + [ V4L2_TUNER_MODE_STEREO ] = "stereo", + [ V4L2_TUNER_MODE_LANG1 ] = "lang1", + [ V4L2_TUNER_MODE_LANG2 ] = "lang2", }; struct msp3400c *msp = i2c_get_clientdata(client); int nicam=0; /* channel source: FM/AM or nicam */ int src=0; + BUG_ON(msp->opmode == OPMODE_SIMPLER); + msp->audmode = audmode; + /* switch demodulator */ switch (msp->mode) { case MSP_MODE_FM_TERRA: - dprintk(KERN_DEBUG "msp3400: FM setstereo: %s\n",strmode[mode]); + dprintk(KERN_DEBUG "msp3400: FM setstereo: %s\n", + strmode[audmode]); msp3400c_setcarrier(client,msp->second,msp->main); - switch (mode) { - case VIDEO_SOUND_STEREO: + switch (audmode) { + case V4L2_TUNER_MODE_STEREO: msp3400c_write(client,I2C_MSP3400C_DFP, 0x000e, 0x3001); break; - case VIDEO_SOUND_MONO: - case VIDEO_SOUND_LANG1: - case VIDEO_SOUND_LANG2: + case V4L2_TUNER_MODE_MONO: + case V4L2_TUNER_MODE_LANG1: + case V4L2_TUNER_MODE_LANG2: msp3400c_write(client,I2C_MSP3400C_DFP, 0x000e, 0x3000); break; } break; case MSP_MODE_FM_SAT: - dprintk(KERN_DEBUG "msp3400: SAT setstereo: %s\n",strmode[mode]); - switch (mode) { - case VIDEO_SOUND_MONO: + dprintk(KERN_DEBUG "msp3400: SAT setstereo: %s\n", + strmode[audmode]); + switch (audmode) { + case V4L2_TUNER_MODE_MONO: msp3400c_setcarrier(client, MSP_CARRIER(6.5), MSP_CARRIER(6.5)); break; - case VIDEO_SOUND_STEREO: + case V4L2_TUNER_MODE_STEREO: msp3400c_setcarrier(client, MSP_CARRIER(7.2), MSP_CARRIER(7.02)); break; - case VIDEO_SOUND_LANG1: + case V4L2_TUNER_MODE_LANG1: msp3400c_setcarrier(client, MSP_CARRIER(7.38), MSP_CARRIER(7.02)); break; - case VIDEO_SOUND_LANG2: + case V4L2_TUNER_MODE_LANG2: msp3400c_setcarrier(client, MSP_CARRIER(7.38), MSP_CARRIER(7.02)); break; } @@ -522,21 +536,25 @@ case MSP_MODE_FM_NICAM1: case MSP_MODE_FM_NICAM2: case MSP_MODE_AM_NICAM: - dprintk(KERN_DEBUG "msp3400: NICAM setstereo: %s\n",strmode[mode]); + dprintk(KERN_DEBUG "msp3400: NICAM setstereo: %s\n", + strmode[audmode]); msp3400c_setcarrier(client,msp->second,msp->main); if (msp->nicam_on) nicam=0x0100; break; case MSP_MODE_BTSC: - dprintk(KERN_DEBUG "msp3400: BTSC setstereo: %s\n",strmode[mode]); + dprintk(KERN_DEBUG "msp3400: BTSC setstereo: %s\n", + strmode[audmode]); nicam=0x0300; break; case MSP_MODE_EXTERN: - dprintk(KERN_DEBUG "msp3400: extern setstereo: %s\n",strmode[mode]); + dprintk(KERN_DEBUG "msp3400: extern setstereo: %s\n", + strmode[audmode]); nicam = 0x0200; break; case MSP_MODE_FM_RADIO: - dprintk(KERN_DEBUG "msp3400: FM-Radio setstereo: %s\n",strmode[mode]); + dprintk(KERN_DEBUG "msp3400: FM-Radio setstereo: %s\n", + strmode[audmode]); break; default: dprintk(KERN_DEBUG "msp3400: mono setstereo\n"); @@ -544,15 +562,15 @@ } /* switch audio */ - switch (mode) { - case VIDEO_SOUND_STEREO: + switch (audmode) { + case V4L2_TUNER_MODE_STEREO: src = 0x0020 | nicam; -#if 0 +#if 0 /* spatial effect */ msp3400c_write(client,I2C_MSP3400C_DFP, 0x0005,0x4000); #endif break; - case VIDEO_SOUND_MONO: + case V4L2_TUNER_MODE_MONO: if (msp->mode == MSP_MODE_AM_NICAM) { dprintk("msp3400: switching to AM mono\n"); /* AM mono decoding is handled by tuner, not MSP chip */ @@ -561,10 +579,10 @@ src = 0x0200; break; } - case VIDEO_SOUND_LANG1: + case V4L2_TUNER_MODE_LANG1: src = 0x0000 | nicam; break; - case VIDEO_SOUND_LANG2: + case V4L2_TUNER_MODE_LANG2: src = 0x0010 | nicam; break; } @@ -608,19 +626,6 @@ } } -static void -msp3400c_restore_dfp(struct i2c_client *client) -{ - struct msp3400c *msp = i2c_get_clientdata(client); - int i; - - for (i = 0; i < DFP_COUNT; i++) { - if (-1 == msp->dfp_regs[i]) - continue; - msp3400c_write(client,I2C_MSP3400C_DFP, i, msp->dfp_regs[i]); - } -} - /* ----------------------------------------------------------------------- */ struct REGISTER_DUMP { @@ -641,8 +646,8 @@ { struct msp3400c *msp = i2c_get_clientdata(client); int val; - int newstereo = msp->stereo; - int newnicam = msp->nicam_on; + int rxsubchans = msp->rxsubchans; + int newnicam = msp->nicam_on; int update = 0; switch (msp->mode) { @@ -653,11 +658,11 @@ dprintk(KERN_DEBUG "msp34xx: stereo detect register: %d\n",val); if (val > 4096) { - newstereo = VIDEO_SOUND_STEREO | VIDEO_SOUND_MONO; + rxsubchans = V4L2_TUNER_SUB_STEREO | V4L2_TUNER_SUB_MONO; } else if (val < -4096) { - newstereo = VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; + rxsubchans = V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2; } else { - newstereo = VIDEO_SOUND_MONO; + rxsubchans = V4L2_TUNER_SUB_MONO; } newnicam = 0; break; @@ -674,27 +679,27 @@ switch ((val & 0x1e) >> 1) { case 0: case 8: - newstereo = VIDEO_SOUND_STEREO; + rxsubchans = V4L2_TUNER_SUB_STEREO; break; case 1: case 9: - newstereo = VIDEO_SOUND_MONO - | VIDEO_SOUND_LANG1; + rxsubchans = V4L2_TUNER_SUB_MONO + | V4L2_TUNER_SUB_LANG1; break; case 2: case 10: - newstereo = VIDEO_SOUND_MONO - | VIDEO_SOUND_LANG1 - | VIDEO_SOUND_LANG2; + rxsubchans = V4L2_TUNER_SUB_MONO + | V4L2_TUNER_SUB_LANG1 + | V4L2_TUNER_SUB_LANG2; break; default: - newstereo = VIDEO_SOUND_MONO; + rxsubchans = V4L2_TUNER_SUB_MONO; break; } newnicam=1; } else { newnicam = 0; - newstereo = VIDEO_SOUND_MONO; + rxsubchans = V4L2_TUNER_SUB_MONO; } break; case MSP_MODE_BTSC: @@ -707,16 +712,16 @@ (val & 0x0040) ? "stereo" : "mono", (val & 0x0080) ? ", nicam 2nd mono" : "", (val & 0x0100) ? ", bilingual/SAP" : ""); - newstereo = VIDEO_SOUND_MONO; - if (val & 0x0040) newstereo |= VIDEO_SOUND_STEREO; - if (val & 0x0100) newstereo |= VIDEO_SOUND_LANG1; + rxsubchans = V4L2_TUNER_SUB_MONO; + if (val & 0x0040) rxsubchans |= V4L2_TUNER_SUB_STEREO; + if (val & 0x0100) rxsubchans |= V4L2_TUNER_SUB_LANG1; break; } - if (newstereo != msp->stereo) { + if (rxsubchans != msp->rxsubchans) { update = 1; - dprintk(KERN_DEBUG "msp34xx: watch: stereo %d => %d\n", - msp->stereo,newstereo); - msp->stereo = newstereo; + dprintk(KERN_DEBUG "msp34xx: watch: rxsubchans %d => %d\n", + msp->rxsubchans,rxsubchans); + msp->rxsubchans = rxsubchans; } if (newnicam != msp->nicam_on) { update = 1; @@ -737,22 +742,24 @@ DECLARE_WAITQUEUE(wait, current); add_wait_queue(&msp->wq, &wait); - if (!msp->rmmod) { - set_current_state(TASK_INTERRUPTIBLE); - if (timeout < 0) + if (!kthread_should_stop()) { + if (timeout < 0) { + set_current_state(TASK_INTERRUPTIBLE); schedule(); - else - schedule_timeout(timeout); + } else { +#if 0 + /* hmm, that one doesn't return on wakeup ... */ + msleep_interruptible(timeout); +#else + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(msecs_to_jiffies(timeout)); +#endif + } } + if (current->flags & PF_FREEZE) + refrigerator(PF_FREEZE); remove_wait_queue(&msp->wq, &wait); - return msp->rmmod || signal_pending(current); -} - -static void msp3400c_stereo_wake(unsigned long data) -{ - struct msp3400c *msp = (struct msp3400c*)data; /* XXX alpha ??? */ - - wake_up_interruptible(&msp->wq); + return msp->restart; } /* stereo/multilang monitoring */ @@ -760,53 +767,31 @@ { struct msp3400c *msp = i2c_get_clientdata(client); - if (autodetect_stereo(client)) { - if (msp->stereo & VIDEO_SOUND_STEREO) - msp3400c_setstereo(client,VIDEO_SOUND_STEREO); - else if (msp->stereo & VIDEO_SOUND_LANG1) - msp3400c_setstereo(client,VIDEO_SOUND_LANG1); - else if (msp->stereo & VIDEO_SOUND_LANG2) - msp3400c_setstereo(client,VIDEO_SOUND_LANG2); - else - msp3400c_setstereo(client,VIDEO_SOUND_MONO); - } + if (autodetect_stereo(client)) + msp3400c_set_audmode(client,best_audio_mode(msp->rxsubchans)); if (once) msp->watch_stereo = 0; - if (msp->watch_stereo) - mod_timer(&msp->wake_stereo, jiffies+5*HZ); } static int msp3400c_thread(void *data) { struct i2c_client *client = data; struct msp3400c *msp = i2c_get_clientdata(client); - struct CARRIER_DETECT *cd; int count, max1,max2,val1,val2, val,this; - - daemonize("msp3400"); - allow_signal(SIGTERM); - printk("msp3400: daemon started\n"); + printk("msp3400: kthread started\n"); for (;;) { d2printk("msp3400: thread: sleep\n"); - if (msp34xx_sleep(msp,-1)) - goto done; - + msp34xx_sleep(msp,-1); d2printk("msp3400: thread: wakeup\n"); - msp->active = 1; - if (msp->watch_stereo) { - watch_stereo(client); - msp->active = 0; - continue; - } - - /* some time for the tuner to sync */ - if (msp34xx_sleep(msp,HZ/5)) - goto done; - restart: + dprintk("msp3410: thread: restart scan\n"); + msp->restart = 0; + if (kthread_should_stop()) + break; + if (VIDEO_MODE_RADIO == msp->norm || MSP_MODE_EXTERN == msp->mode) { /* no carrier scan, just unmute */ @@ -815,14 +800,18 @@ msp->volume, msp->balance); continue; } - msp->restart = 0; + + /* mute */ msp3400c_setvolume(client, msp->muted, 0, 0); msp3400c_setmode(client, MSP_MODE_AM_DETECT /* +1 */ ); val1 = val2 = 0; max1 = max2 = -1; - del_timer(&msp->wake_stereo); msp->watch_stereo = 0; + /* some time for the tuner to sync */ + if (msp34xx_sleep(msp,200)) + goto restart; + /* carrier detect pass #1 -- main carrier */ cd = carrier_detect_main; count = CARRIER_COUNT(carrier_detect_main); @@ -835,12 +824,8 @@ for (this = 0; this < count; this++) { msp3400c_setcarrier(client, cd[this].cdo,cd[this].cdo); - - if (msp34xx_sleep(msp,HZ/10)) - goto done; - if (msp->restart) - msp->restart = 0; - + if (msp34xx_sleep(msp,100)) + goto restart; val = msp3400c_read(client, I2C_MSP3400C_DFP, 0x1b); if (val > 32767) val -= 65536; @@ -848,14 +833,16 @@ val1 = val, max1 = this; dprintk("msp3400: carrier1 val: %5d / %s\n", val,cd[this].name); } - + /* carrier detect pass #2 -- second (stereo) carrier */ switch (max1) { case 1: /* 5.5 */ - cd = carrier_detect_55; count = CARRIER_COUNT(carrier_detect_55); + cd = carrier_detect_55; + count = CARRIER_COUNT(carrier_detect_55); break; case 3: /* 6.5 */ - cd = carrier_detect_65; count = CARRIER_COUNT(carrier_detect_65); + cd = carrier_detect_65; + count = CARRIER_COUNT(carrier_detect_65); break; case 0: /* 4.5 */ case 2: /* 6.0 */ @@ -863,19 +850,15 @@ cd = NULL; count = 0; break; } - + if (amsound && (msp->norm == VIDEO_MODE_SECAM)) { /* autodetect doesn't work well with AM ... */ cd = NULL; count = 0; max2 = 0; } for (this = 0; this < count; this++) { msp3400c_setcarrier(client, cd[this].cdo,cd[this].cdo); - - if (msp34xx_sleep(msp,HZ/10)) - goto done; - if (msp->restart) + if (msp34xx_sleep(msp,100)) goto restart; - val = msp3400c_read(client, I2C_MSP3400C_DFP, 0x1b); if (val > 32767) val -= 65536; @@ -893,7 +876,7 @@ msp->second = carrier_detect_55[max2].cdo; msp3400c_setmode(client, MSP_MODE_FM_TERRA); msp->nicam_on = 0; - msp3400c_setstereo(client, VIDEO_SOUND_MONO); + msp3400c_set_audmode(client, V4L2_TUNER_MODE_MONO); msp->watch_stereo = 1; } else if (max2 == 1 && HAVE_NICAM(msp)) { /* B/G NICAM */ @@ -920,7 +903,7 @@ msp->second = carrier_detect_65[max2].cdo; msp3400c_setmode(client, MSP_MODE_FM_TERRA); msp->nicam_on = 0; - msp3400c_setstereo(client, VIDEO_SOUND_MONO); + msp3400c_set_audmode(client, V4L2_TUNER_MODE_MONO); msp->watch_stereo = 1; } else if (max2 == 0 && msp->norm == VIDEO_MODE_SECAM) { @@ -928,7 +911,7 @@ msp->second = carrier_detect_65[max2].cdo; msp3400c_setmode(client, MSP_MODE_AM_NICAM); msp->nicam_on = 0; - msp3400c_setstereo(client, VIDEO_SOUND_MONO); + msp3400c_set_audmode(client, V4L2_TUNER_MODE_MONO); msp3400c_setcarrier(client, msp->second, msp->main); /* volume prescale for SCART (AM mono input) */ msp3400c_write(client,I2C_MSP3400C_DFP, 0x000d, 0x1900); @@ -951,29 +934,26 @@ msp3400c_setmode(client, MSP_MODE_FM_TERRA); msp->nicam_on = 0; msp3400c_setcarrier(client, msp->second, msp->main); - msp->stereo = VIDEO_SOUND_MONO; - msp3400c_setstereo(client, VIDEO_SOUND_MONO); + msp->rxsubchans = V4L2_TUNER_SUB_MONO; + msp3400c_set_audmode(client, V4L2_TUNER_MODE_MONO); break; } - /* unmute + restore dfp registers */ + /* unmute */ msp3400c_setvolume(client, msp->muted, msp->volume, msp->balance); - msp3400c_restore_dfp(client); - - if (msp->watch_stereo) - mod_timer(&msp->wake_stereo, jiffies+5*HZ); - if (debug) msp3400c_print_mode(msp); - - msp->active = 0; - } -done: - msp->active = 0; + /* monitor tv audio mode */ + while (msp->watch_stereo) { + if (msp34xx_sleep(msp,5000)) + goto restart; + watch_stereo(client); + } + } dprintk(KERN_DEBUG "msp3400: thread: exit\n"); - complete_and_exit(&msp->texit, 0); + return 0; } /* ----------------------------------------------------------------------- */ @@ -1006,36 +986,68 @@ { 0x0060, MSP_CARRIER(7.2), MSP_CARRIER(7.2), "7.2 SAT ADR" }, { -1, 0, 0, NULL }, /* EOF */ }; - + +static inline const char *msp34xx_standard_mode_name(int mode) +{ + int i; + for (i = 0; modelist[i].name != NULL; i++) + if (modelist[i].retval == mode) + return modelist[i].name; + return "unknown"; +} + +static int msp34xx_modus(int norm) +{ + switch (norm) { + case VIDEO_MODE_PAL: + return 0x1003; + case VIDEO_MODE_NTSC: /* BTSC */ + return 0x2003; + case VIDEO_MODE_SECAM: + return 0x0003; + case VIDEO_MODE_RADIO: + return 0x0003; + case VIDEO_MODE_AUTO: + return 0x2003; + default: + return 0x0003; + } +} + +static int msp34xx_standard(int norm) +{ + switch (norm) { + case VIDEO_MODE_PAL: + return 1; + case VIDEO_MODE_NTSC: /* BTSC */ + return 0x0020; + case VIDEO_MODE_SECAM: + return 1; + case VIDEO_MODE_RADIO: + return 0x0040; + default: + return 1; + } +} + static int msp3410d_thread(void *data) { struct i2c_client *client = data; struct msp3400c *msp = i2c_get_clientdata(client); int mode,val,i,std; - - daemonize("msp3410 [auto]"); - allow_signal(SIGTERM); - printk("msp3410: daemon started\n"); + printk("msp3410: daemon started\n"); for (;;) { d2printk(KERN_DEBUG "msp3410: thread: sleep\n"); - if (msp34xx_sleep(msp,-1)) - goto done; - + msp34xx_sleep(msp,-1); d2printk(KERN_DEBUG "msp3410: thread: wakeup\n"); - msp->active = 1; - - if (msp->watch_stereo) { - watch_stereo(client); - msp->active = 0; - continue; - } - - /* some time for the tuner to sync */ - if (msp34xx_sleep(msp,HZ/5)) - goto done; restart: + dprintk("msp3410: thread: restart scan\n"); + msp->restart = 0; + if (kthread_should_stop()) + break; + if (msp->mode == MSP_MODE_EXTERN) { /* no carrier scan needed, just unmute */ dprintk(KERN_DEBUG "msp3410: thread: no carrier scan\n"); @@ -1043,47 +1055,24 @@ msp->volume, msp->balance); continue; } - msp->restart = 0; - del_timer(&msp->wake_stereo); - msp->watch_stereo = 0; /* put into sane state (and mute) */ msp3400c_reset(client); + /* some time for the tuner to sync */ + if (msp34xx_sleep(msp,200)) + goto restart; + /* start autodetect */ - switch (msp->norm) { - case VIDEO_MODE_PAL: - mode = 0x1003; - std = 1; - break; - case VIDEO_MODE_NTSC: /* BTSC */ - mode = 0x2003; - std = 0x0020; - break; - case VIDEO_MODE_SECAM: - mode = 0x0003; - std = 1; - break; - case VIDEO_MODE_RADIO: - mode = 0x0003; - std = 0x0040; - break; - default: - mode = 0x0003; - std = 1; - break; - } + mode = msp34xx_modus(msp->norm); + std = msp34xx_standard(msp->norm); msp3400c_write(client, I2C_MSP3400C_DEM, 0x30, mode); msp3400c_write(client, I2C_MSP3400C_DEM, 0x20, std); + msp->watch_stereo = 0; - if (debug) { - int i; - for (i = 0; modelist[i].name != NULL; i++) - if (modelist[i].retval == std) - break; + if (debug) printk(KERN_DEBUG "msp3410: setting mode: %s (0x%04x)\n", - modelist[i].name ? modelist[i].name : "unknown",std); - } + msp34xx_standard_mode_name(std) ,std); if (std != 1) { /* programmed some specific mode */ @@ -1091,9 +1080,7 @@ } else { /* triggered autodetect */ for (;;) { - if (msp34xx_sleep(msp,HZ/10)) - goto done; - if (msp->restart) + if (msp34xx_sleep(msp,100)) goto restart; /* check results */ @@ -1135,29 +1122,30 @@ else msp->mode = MSP_MODE_FM_NICAM2; /* just turn on stereo */ - msp->stereo = VIDEO_SOUND_STEREO; + msp->rxsubchans = V4L2_TUNER_SUB_STEREO; msp->nicam_on = 1; msp->watch_stereo = 1; - msp3400c_setstereo(client,VIDEO_SOUND_STEREO); + msp3400c_set_audmode(client,V4L2_TUNER_MODE_STEREO); break; - case 0x0009: + case 0x0009: msp->mode = MSP_MODE_AM_NICAM; - msp->stereo = VIDEO_SOUND_MONO; + msp->rxsubchans = V4L2_TUNER_SUB_MONO; msp->nicam_on = 1; - msp3400c_setstereo(client,VIDEO_SOUND_MONO); + msp3400c_set_audmode(client,V4L2_TUNER_MODE_MONO); msp->watch_stereo = 1; break; case 0x0020: /* BTSC */ /* just turn on stereo */ - msp->mode = MSP_MODE_BTSC; - msp->stereo = VIDEO_SOUND_STEREO; + msp->mode = MSP_MODE_BTSC; + msp->rxsubchans = V4L2_TUNER_SUB_STEREO; msp->nicam_on = 0; msp->watch_stereo = 1; - msp3400c_setstereo(client,VIDEO_SOUND_STEREO); + msp3400c_set_audmode(client,V4L2_TUNER_MODE_STEREO); break; case 0x0040: /* FM radio */ msp->mode = MSP_MODE_FM_RADIO; - msp->stereo = VIDEO_SOUND_STEREO; + msp->rxsubchans = V4L2_TUNER_SUB_STEREO; + msp->audmode = V4L2_TUNER_MODE_STEREO; msp->nicam_on = 0; msp->watch_stereo = 0; /* not needed in theory if HAVE_RADIO(), but @@ -1183,50 +1171,276 @@ case 0x0004: case 0x0005: msp->mode = MSP_MODE_FM_TERRA; - msp->stereo = VIDEO_SOUND_MONO; + msp->rxsubchans = V4L2_TUNER_SUB_MONO; + msp->audmode = V4L2_TUNER_MODE_MONO; msp->nicam_on = 0; msp->watch_stereo = 1; break; } - - /* unmute + restore dfp registers */ + + /* unmute, restore misc registers */ msp3400c_setbass(client, msp->bass); msp3400c_settreble(client, msp->treble); msp3400c_setvolume(client, msp->muted, msp->volume, msp->balance); - msp3400c_restore_dfp(client); - - if (msp->watch_stereo) - mod_timer(&msp->wake_stereo, jiffies+HZ); + msp3400c_write(client, I2C_MSP3400C_DFP, 0x0013, msp->acb); - msp->active = 0; + /* monitor tv audio mode */ + while (msp->watch_stereo) { + if (msp34xx_sleep(msp,5000)) + goto restart; + watch_stereo(client); + } } - -done: - msp->active = 0; dprintk(KERN_DEBUG "msp3410: thread: exit\n"); - complete_and_exit(&msp->texit, 0); return 0; } /* ----------------------------------------------------------------------- */ +/* msp34xxG + (simpler no-thread) */ +/* this one uses both automatic standard detection and automatic sound */ +/* select which are available in the newer G versions */ +/* struct msp: only norm, acb and source are really used in this mode */ + +static void msp34xxg_set_source(struct i2c_client *client, int source); + +/* (re-)initialize the msp34xxg, according to the current norm in msp->norm + * return 0 if it worked, -1 if it failed + */ +static int msp34xxg_init(struct i2c_client *client) +{ + struct msp3400c *msp = i2c_get_clientdata(client); + int modus; + + if (msp3400c_reset(client)) + return -1; + + /* make sure that input/output is muted (paranoid mode) */ + if (msp3400c_write(client, + I2C_MSP3400C_DFP, + 0x13, /* ACB */ + 0x0f20 /* mute DSP input, mute SCART 1 */)) + return -1; + + /* step-by-step initialisation, as described in the manual */ + modus = msp34xx_modus(msp->norm); + modus &= ~0x03; /* STATUS_CHANGE=0 */ + modus |= 0x01; /* AUTOMATIC_SOUND_DETECTION=1 */ + if (msp3400c_write(client, + I2C_MSP3400C_DEM, + 0x30/*MODUS*/, + modus)) + return -1; + + /* write the dfps that may have an influence on + standard/audio autodetection right now */ + msp34xxg_set_source(client, msp->source); + + if (msp3400c_write(client, I2C_MSP3400C_DFP, + 0x0e, /* AM/FM Prescale */ + 0x3000 /* default: [15:8] 75khz deviation */)) + return -1; + + if (msp3400c_write(client, I2C_MSP3400C_DFP, + 0x10, /* NICAM Prescale */ + 0x5a00 /* default: 9db gain (as recommended) */)) + return -1; + + if (msp3400c_write(client, + I2C_MSP3400C_DEM, + 0x20, /* STANDARD SELECT */ + standard /* default: 0x01 for automatic standard select*/)) + return -1; + return 0; +} + +static int msp34xxg_thread(void *data) +{ + struct i2c_client *client = data; + struct msp3400c *msp = i2c_get_clientdata(client); + int val, std, i; + + printk("msp34xxg: daemon started\n"); + for (;;) { + d2printk(KERN_DEBUG "msp34xxg: thread: sleep\n"); + msp34xx_sleep(msp,-1); + d2printk(KERN_DEBUG "msp34xxg: thread: wakeup\n"); + + restart: + dprintk("msp34xxg: thread: restart scan\n"); + msp->restart = 0; + if (kthread_should_stop()) + break; + + /* setup the chip*/ + msp34xxg_init(client); + std = standard; + if (std != 0x01) + goto unmute; + + /* watch autodetect */ + dprintk("msp34xxg: triggered autodetect, waiting for result\n"); + for (i = 0; i < 10; i++) { + if (msp34xx_sleep(msp,100)) + goto restart; + + /* check results */ + val = msp3400c_read(client, I2C_MSP3400C_DEM, 0x7e); + if (val < 0x07ff) { + std = val; + break; + } + dprintk("msp34xxg: detection still in progress\n"); + } + if (0x01 == std) { + dprintk("msp34xxg: detection still in progress after 10 tries. giving up.\n"); + continue; + } + + unmute: + dprintk("msp34xxg: current mode: %s (0x%04x)\n", + msp34xx_standard_mode_name(std), std); + + /* unmute: dispatch sound to scart output, set scart volume */ + dprintk("msp34xxg: unmute\n"); + + msp3400c_setbass(client, msp->bass); + msp3400c_settreble(client, msp->treble); + msp3400c_setvolume(client, msp->muted, msp->volume, msp->balance); + + /* restore ACB */ + if (msp3400c_write(client, + I2C_MSP3400C_DFP, + 0x13, /* ACB */ + msp->acb)) + return -1; + } + dprintk(KERN_DEBUG "msp34xxg: thread: exit\n"); + return 0; +} + +/* set the same 'source' for the loudspeaker, scart and quasi-peak detector + * the value for source is the same as bit 15:8 of DFP registers 0x08, + * 0x0a and 0x0c: 0=mono, 1=stereo or A|B, 2=SCART, 3=stereo or A, 4=stereo or B + * + * this function replaces msp3400c_setstereo + */ +static void msp34xxg_set_source(struct i2c_client *client, int source) +{ + struct msp3400c *msp = i2c_get_clientdata(client); + + /* fix matrix mode to stereo and let the msp choose what + * to output according to 'source', as recommended + */ + int value = (source&0x07)<<8|(source==0 ? 0x00:0x20); + dprintk("msp34xxg: set source to %d (0x%x)\n", source, value); + msp3400c_write(client, + I2C_MSP3400C_DFP, + 0x08, /* Loudspeaker Output */ + value); + msp3400c_write(client, + I2C_MSP3400C_DFP, + 0x0a, /* SCART1 DA Output */ + value); + msp3400c_write(client, + I2C_MSP3400C_DFP, + 0x0c, /* Quasi-peak detector */ + value); + /* + * set identification threshold. Personally, I + * I set it to a higher value that the default + * of 0x190 to ignore noisy stereo signals. + * this needs tuning. (recommended range 0x00a0-0x03c0) + * 0x7f0 = forced mono mode + */ + msp3400c_write(client, + I2C_MSP3400C_DEM, + 0x22, /* a2 threshold for stereo/bilingual */ + source==0 ? 0x7f0:stereo_threshold); + msp->source=source; +} + +static void msp34xxg_detect_stereo(struct i2c_client *client) +{ + struct msp3400c *msp = i2c_get_clientdata(client); + + int status = msp3400c_read(client, + I2C_MSP3400C_DEM, + 0x0200 /* STATUS */); + int is_bilingual = status&0x100; + int is_stereo = status&0x40; + + msp->rxsubchans = 0; + if (is_stereo) + msp->rxsubchans |= V4L2_TUNER_SUB_STEREO; + else + msp->rxsubchans |= V4L2_TUNER_SUB_MONO; + if (is_bilingual) { + msp->rxsubchans |= V4L2_TUNER_SUB_LANG1|V4L2_TUNER_SUB_LANG2; + /* I'm supposed to check whether it's SAP or not + * and set only LANG2/SAP in this case. Yet, the MSP + * does a lot of work to hide this and handle everything + * the same way. I don't want to work around it so unless + * this is a problem, I'll handle SAP just like lang1/lang2. + */ + } + dprintk("msp34xxg: status=0x%x, stereo=%d, bilingual=%d -> rxsubchans=%d\n", + status, is_stereo, is_bilingual, msp->rxsubchans); +} + +static void msp34xxg_set_audmode(struct i2c_client *client, int audmode) +{ + struct msp3400c *msp = i2c_get_clientdata(client); + int source = 0; + + switch (audmode) { + case V4L2_TUNER_MODE_MONO: + source=0; /* mono only */ + break; + case V4L2_TUNER_MODE_STEREO: + source=1; /* stereo or A|B, see comment in msp34xxg_get_v4l2_stereo() */ + /* problem: that could also mean 2 (scart input) */ + break; + case V4L2_TUNER_MODE_LANG1: + source=3; /* stereo or A */ + break; + case V4L2_TUNER_MODE_LANG2: + source=4; /* stereo or B */ + break; + default: /* doing nothing: a safe, sane default */ + audmode = 0; + return; + } + msp->audmode = audmode; + msp34xxg_set_source(client, source); +} + + +/* ----------------------------------------------------------------------- */ static int msp_attach(struct i2c_adapter *adap, int addr, int kind); static int msp_detach(struct i2c_client *client); static int msp_probe(struct i2c_adapter *adap); static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg); +static int msp_suspend(struct device * dev, u32 state, u32 level); +static int msp_resume(struct device * dev, u32 level); + static struct i2c_driver driver = { .owner = THIS_MODULE, - .name = "i2c msp3400 driver", + .name = "i2c msp3400 driver", .id = I2C_DRIVERID_MSP3400, .flags = I2C_DF_NOTIFY, .attach_adapter = msp_probe, .detach_client = msp_detach, .command = msp_command, + .driver { + .suspend = msp_suspend, + .resume = msp_resume, + }, }; -static struct i2c_client client_template = +static struct i2c_client client_template = { I2C_DEVNAME("(unset)"), .flags = I2C_CLIENT_ALLOW_USE, @@ -1237,7 +1451,7 @@ { struct msp3400c *msp; struct i2c_client *c; - int i; + int (*thread_func)(void *data) = NULL; client_template.adapter = adap; client_template.addr = addr; @@ -1246,7 +1460,7 @@ dprintk("msp3400: no chip found\n"); return -1; } - + if (NULL == (c = kmalloc(sizeof(struct i2c_client),GFP_KERNEL))) return -ENOMEM; memcpy(c,&client_template,sizeof(struct i2c_client)); @@ -1254,16 +1468,14 @@ kfree(c); return -ENOMEM; } - + memset(msp,0,sizeof(struct msp3400c)); - msp->volume = 65535; + msp->volume = 58880; /* 0db gain */ msp->balance = 32768; - msp->bass = 32768; - msp->treble = 32768; - msp->input = -1; - msp->muted = 1; - for (i = 0; i < DFP_COUNT; i++) - msp->dfp_regs[i] = -1; + msp->bass = 32768; + msp->treble = 32768; + msp->input = -1; + msp->muted = 1; i2c_set_clientdata(c, msp); init_waitqueue_head(&msp->wq); @@ -1274,7 +1486,7 @@ dprintk("msp3400: no chip found\n"); return -1; } - + msp->rev1 = msp3400c_read(c, I2C_MSP3400C_DFP, 0x1e); if (-1 != msp->rev1) msp->rev2 = msp3400c_read(c, I2C_MSP3400C_DFP, 0x1f); @@ -1295,36 +1507,51 @@ (msp->rev2>>8)&0xff, (msp->rev1&0xff)+'@', ((msp->rev1>>8)&0xff)+'@', msp->rev2&0x1f); - if (simple == -1) { - /* default mode */ - msp->simple = HAVE_SIMPLE(msp); - } else { - /* use insmod option */ - msp->simple = simple; + msp->opmode = opmode; + if (OPMODE_AUTO == msp->opmode) { + if (HAVE_SIMPLER(msp)) + msp->opmode = OPMODE_SIMPLER; + else if (HAVE_SIMPLE(msp)) + msp->opmode = OPMODE_SIMPLE; + else + msp->opmode = OPMODE_MANUAL; } - /* timer for stereo checking */ - init_timer(&msp->wake_stereo); - msp->wake_stereo.function = msp3400c_stereo_wake; - msp->wake_stereo.data = (unsigned long)msp; - /* hello world :-) */ printk(KERN_INFO "msp34xx: init: chip=%s",i2c_clientname(c)); if (HAVE_NICAM(msp)) printk(" +nicam"); if (HAVE_SIMPLE(msp)) printk(" +simple"); + if (HAVE_SIMPLER(msp)) + printk(" +simpler"); if (HAVE_RADIO(msp)) printk(" +radio"); + + /* version-specific initialization */ + switch (msp->opmode) { + case OPMODE_MANUAL: + printk(" mode=manual"); + thread_func = msp3400c_thread; + break; + case OPMODE_SIMPLE: + printk(" mode=simple"); + thread_func = msp3410d_thread; + break; + case OPMODE_SIMPLER: + printk(" mode=simpler"); + thread_func = msp34xxg_thread; + break; + } printk("\n"); - /* startup control thread */ - init_completion(&msp->texit); - msp->tpid = kernel_thread(msp->simple ? msp3410d_thread : msp3400c_thread, - (void *)c, 0); - if (msp->tpid < 0) - printk(KERN_WARNING "msp34xx: kernel_thread() failed\n"); - wake_up_interruptible(&msp->wq); + /* startup control thread if needed */ + if (thread_func) { + msp->kthread = kthread_run(thread_func, c, "msp34xx"); + if (NULL == msp->kthread) + printk(KERN_WARNING "msp34xx: kernel_thread() failed\n"); + wake_up_interruptible(&msp->wq); + } /* done */ i2c_attach_client(c); @@ -1334,13 +1561,11 @@ static int msp_detach(struct i2c_client *client) { struct msp3400c *msp = i2c_get_clientdata(client); - + /* shutdown control thread */ - del_timer_sync(&msp->wake_stereo); - if (msp->tpid >= 0) { - msp->rmmod = 1; - wake_up_interruptible(&msp->wq); - wait_for_completion(&msp->texit); + if (msp->kthread >= 0) { + msp->restart = 1; + kthread_stop(msp->kthread); } msp3400c_reset(client); @@ -1352,18 +1577,8 @@ static int msp_probe(struct i2c_adapter *adap) { -#ifdef I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return i2c_probe(adap, &addr_data, msp_attach); -#else - switch (adap->id) { - case I2C_ALGO_BIT | I2C_HW_SMBUS_VOODOO3: - case I2C_ALGO_BIT | I2C_HW_B_BT848: - //case I2C_ALGO_SAA7134: - return i2c_probe(adap, &addr_data, msp_attach); - break; - } -#endif return 0; } @@ -1371,14 +1586,73 @@ { struct msp3400c *msp = i2c_get_clientdata(client); + if (NULL == msp->kthread) + return; msp3400c_setvolume(client,msp->muted,0,0); - msp->watch_stereo=0; - del_timer(&msp->wake_stereo); - if (msp->active) - msp->restart = 1; + msp->watch_stereo = 0; + msp->restart = 1; wake_up_interruptible(&msp->wq); } +/* ----------------------------------------------------------------------- */ + +static int mode_v4l2_to_v4l1(int rxsubchans) +{ + int mode = 0; + + if (rxsubchans & V4L2_TUNER_SUB_STEREO) + mode |= VIDEO_SOUND_STEREO; + if (rxsubchans & V4L2_TUNER_SUB_LANG2) + mode |= VIDEO_SOUND_LANG2; + if (rxsubchans & V4L2_TUNER_SUB_LANG1) + mode |= VIDEO_SOUND_LANG1; + if (0 == mode) + mode |= VIDEO_SOUND_MONO; + return mode; +} + +static int mode_v4l1_to_v4l2(int mode) +{ + if (mode & VIDEO_SOUND_STEREO) + return V4L2_TUNER_MODE_STEREO; + if (mode & VIDEO_SOUND_LANG2) + return V4L2_TUNER_MODE_LANG2; + if (mode & VIDEO_SOUND_LANG1) + return V4L2_TUNER_MODE_LANG1; + return V4L2_TUNER_MODE_MONO; +} + +static void msp_any_detect_stereo(struct i2c_client *client) +{ + struct msp3400c *msp = i2c_get_clientdata(client); + + switch (msp->opmode) { + case OPMODE_MANUAL: + case OPMODE_SIMPLE: + autodetect_stereo(client); + break; + case OPMODE_SIMPLER: + msp34xxg_detect_stereo(client); + break; + } +} + +static void msp_any_set_audmode(struct i2c_client *client, int audmode) +{ + struct msp3400c *msp = i2c_get_clientdata(client); + + switch (msp->opmode) { + case OPMODE_MANUAL: + case OPMODE_SIMPLE: + msp->watch_stereo = 0; + msp3400c_set_audmode(client, audmode); + break; + case OPMODE_SIMPLER: + msp34xxg_set_audmode(client, audmode); + break; + } +} + static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) { struct msp3400c *msp = i2c_get_clientdata(client); @@ -1410,7 +1684,6 @@ break; case AUDIO_TUNER: msp->mode = -1; - msp_wake_thread(client); break; default: if (*sarg & AUDIO_MUTE) @@ -1418,63 +1691,38 @@ break; } if (scart) { - msp->stereo = VIDEO_SOUND_STEREO; + msp->rxsubchans = V4L2_TUNER_SUB_STEREO; + msp->audmode = V4L2_TUNER_MODE_STEREO; msp3400c_set_scart(client,scart,0); msp3400c_write(client,I2C_MSP3400C_DFP,0x000d,0x1900); - msp3400c_setstereo(client,msp->stereo); + if (msp->opmode != OPMODE_SIMPLER) + msp3400c_set_audmode(client, msp->audmode); } - if (msp->active) - msp->restart = 1; + msp_wake_thread(client); break; case AUDC_SET_RADIO: dprintk(KERN_DEBUG "msp34xx: AUDC_SET_RADIO\n"); msp->norm = VIDEO_MODE_RADIO; - msp->watch_stereo=0; - del_timer(&msp->wake_stereo); dprintk(KERN_DEBUG "msp34xx: switching to radio mode\n"); - if (msp->simple) { - /* the thread will do for us */ - msp_wake_thread(client); - } else { + msp->watch_stereo = 0; + switch (msp->opmode) { + case OPMODE_MANUAL: /* set msp3400 to FM radio mode */ msp3400c_setmode(client,MSP_MODE_FM_RADIO); msp3400c_setcarrier(client, MSP_CARRIER(10.7), MSP_CARRIER(10.7)); msp3400c_setvolume(client, msp->muted, msp->volume, msp->balance); + break; + case OPMODE_SIMPLE: + case OPMODE_SIMPLER: + /* the thread will do for us */ + msp_wake_thread(client); + break; } - if (msp->active) - msp->restart = 1; break; -#if 1 - /* work-in-progress: hook to control the DFP registers */ - case MSP_SET_DFPREG: - { - struct msp_dfpreg *r = arg; - unsigned int i; - - if (r->reg < 0 || r->reg >= DFP_COUNT) - return -EINVAL; - for (i = 0; i < ARRAY_SIZE(bl_dfp); i++) - if (r->reg == bl_dfp[i]) - return -EINVAL; - msp->dfp_regs[r->reg] = r->value; - msp3400c_write(client,I2C_MSP3400C_DFP,r->reg,r->value); - return 0; - } - case MSP_GET_DFPREG: - { - struct msp_dfpreg *r = arg; - - if (r->reg < 0 || r->reg >= DFP_COUNT) - return -EINVAL; - r->value = msp3400c_read(client,I2C_MSP3400C_DFP,r->reg); - return 0; - } -#endif - /* --- v4l ioctls --- */ /* take care: bttv does userspace copying, we'll get a kernel pointer here... */ @@ -1495,10 +1743,8 @@ va->bass = msp->bass; va->treble = msp->treble; - if (msp->norm != VIDEO_MODE_RADIO) { - autodetect_stereo(client); - va->mode = msp->stereo; - } + msp_any_detect_stereo(client); + va->mode = mode_v4l2_to_v4l1(msp->rxsubchans); break; } case VIDIOCSAUDIO: @@ -1517,23 +1763,22 @@ msp3400c_setbass(client,msp->bass); msp3400c_settreble(client,msp->treble); - if (va->mode != 0 && msp->norm != VIDEO_MODE_RADIO) { - msp->watch_stereo=0; - del_timer(&msp->wake_stereo); - msp->stereo = va->mode & 0x0f; - msp3400c_setstereo(client,va->mode & 0x0f); - } + if (va->mode != 0 && msp->norm != VIDEO_MODE_RADIO) + msp_any_set_audmode(client,mode_v4l1_to_v4l2(va->mode)); break; } case VIDIOCSCHAN: { struct video_channel *vc = arg; - + dprintk(KERN_DEBUG "msp34xx: VIDIOCSCHAN (norm=%d)\n",vc->norm); msp->norm = vc->norm; + msp_wake_thread(client); break; } + case VIDIOCSFREQ: + case VIDIOC_S_FREQUENCY: { /* new channel -- kick audio carrier scan */ dprintk(KERN_DEBUG "msp34xx: VIDIOCSFREQ\n"); @@ -1541,10 +1786,61 @@ break; } + /* --- v4l2 ioctls --- */ + case VIDIOC_G_TUNER: + { + struct v4l2_tuner *vt = arg; + + msp_any_detect_stereo(client); + vt->audmode = msp->audmode; + vt->rxsubchans = msp->rxsubchans; + vt->capability = V4L2_TUNER_CAP_STEREO | + V4L2_TUNER_CAP_LANG1| + V4L2_TUNER_CAP_LANG2; + break; + } + case VIDIOC_S_TUNER: + { + struct v4l2_tuner *vt=(struct v4l2_tuner *)arg; + + /* only set audmode */ + if (vt->audmode != -1 && vt->audmode != 0) + msp_any_set_audmode(client, vt->audmode); + break; + } + + /* msp34xx specific */ + case MSP_SET_MATRIX: + { + struct msp_matrix *mspm = arg; + + dprintk(KERN_DEBUG "msp34xx: MSP_SET_MATRIX\n"); + msp3400c_set_scart(client, mspm->input, mspm->output); + break; + } + default: /* nothing */ break; } + return 0; +} + +static int msp_suspend(struct device * dev, u32 state, u32 level) +{ + struct i2c_client *c = container_of(dev, struct i2c_client, dev); + + dprintk("msp34xx: suspend\n"); + msp3400c_reset(c); + return 0; +} + +static int msp_resume(struct device * dev, u32 level) +{ + struct i2c_client *c = container_of(dev, struct i2c_client, dev); + + dprintk("msp34xx: resume\n"); + msp_wake_thread(c); return 0; } diff -Nru a/drivers/media/video/msp3400.h b/drivers/media/video/msp3400.h --- a/drivers/media/video/msp3400.h 2004-11-10 17:19:06 -08:00 +++ b/drivers/media/video/msp3400.h 2004-11-10 17:19:06 -08:00 @@ -8,7 +8,29 @@ int value; }; +struct msp_matrix { + int input; + int output; +}; + #define MSP_SET_DFPREG _IOW('m',15,struct msp_dfpreg) #define MSP_GET_DFPREG _IOW('m',16,struct msp_dfpreg) + +/* ioctl for MSP_SET_MATRIX will have to be registered */ +#define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix) + +#define SCART_MASK 0 +#define SCART_IN1 1 +#define SCART_IN2 2 +#define SCART_IN1_DA 3 +#define SCART_IN2_DA 4 +#define SCART_IN3 5 +#define SCART_IN4 6 +#define SCART_MONO 7 +#define SCART_MUTE 8 + +#define SCART_DSP_IN 0 +#define SCART1_OUT 1 +#define SCART2_OUT 2 #endif /* MSP3400_H */ diff -Nru a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c --- a/drivers/media/video/mxb.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/media/video/mxb.c 2004-11-10 17:19:02 -08:00 @@ -1,5 +1,5 @@ /* - mxb.c - v4l2 driver for the Multimedia eXtension Board + mxb - v4l2 driver for the Multimedia eXtension Board Copyright (C) 1998-2003 Michael Hunold @@ -43,12 +43,12 @@ in verden (lower saxony, germany) 4148 is a channel called "phoenix" */ static int freq = 4148; -MODULE_PARM(freq,"i"); +module_param(freq, int, 0644); MODULE_PARM_DESC(freq, "initial frequency the tuner will be tuned to while setup"); static int debug = 0; -MODULE_PARM(debug,"i"); -MODULE_PARM_DESC(debug, "debug verbosity"); +module_param(debug, int, 0644); +MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); #define MXB_INPUTS 4 enum { TUNER, AUX1, AUX3, AUX3_YC }; diff -Nru a/drivers/media/video/saa7111.c b/drivers/media/video/saa7111.c --- a/drivers/media/video/saa7111.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/media/video/saa7111.c 2004-11-10 17:19:07 -08:00 @@ -60,7 +60,7 @@ #include static int debug = 0; -MODULE_PARM(debug, "i"); +module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Debug level (0-1)"); #define dprintk(num, format, args...) \ @@ -342,7 +342,7 @@ case VIDEO_MODE_SECAM: saa7111_write(client, 0x08, - (decoder->reg[0x0e] & 0x3f) | 0x00); + (decoder->reg[0x08] & 0x3f) | 0x00); saa7111_write(client, 0x0e, (decoder->reg[0x0e] & 0x8f) | 0x50); break; diff -Nru a/drivers/media/video/tda7432.c b/drivers/media/video/tda7432.c --- a/drivers/media/video/tda7432.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/video/tda7432.c 2004-11-10 17:19:05 -08:00 @@ -1,8 +1,8 @@ /* * For the STS-Thompson TDA7432 audio processor chip - * + * * Handles audio functions: volume, balance, tone, loudness - * This driver will not complain if used with any + * This driver will not complain if used with any * other i2c device with the same address. * * Muting and tone control by Jonathan Isom @@ -106,7 +106,7 @@ * output (for front and rear). Since most vidcap cards probably * don't have 4 channel output, this driver will set front & rear * together (no independent control). - */ + */ /* Subaddresses for TDA7432 */ @@ -132,13 +132,13 @@ * 0x03 - Mute (Using Attenuators Plays better with modules) * Mono probably isn't used - I'm guessing only the stereo * input is connected on most cards, so we'll set it to stereo. - * + * * Bit 3 controls bass cut: 0/1 is non-symmetric/symmetric bass cut * Bit 4 controls bass range: 0/1 is extended/standard bass range - * + * * Highest 3 bits not used */ - + #define TDA7432_STEREO_IN 0 #define TDA7432_MONO_IN 2 /* Probably won't be used */ #define TDA7432_BASS_SYM 1 << 3 @@ -161,7 +161,7 @@ #define TDA7432_LD_ON 1 << 7 -/* Subaddress 0x02 - Tone control */ +/* Subaddress 0x02 - Tone control */ /* Bits 0,1,2 control absolute treble gain from 0dB to 14dB * 0x0 is 14dB, 0x7 is 0dB @@ -173,23 +173,23 @@ * Bits 4,5,6 control absolute bass gain from 0dB to 14dB * (This is only true for normal base range, set in 0x00) * 0x0 << 4 is 14dB, 0x7 is 0dB - * + * * Bit 7 controls bass attenuation/gain (sign) * 1 << 7 = gain (+) - * 0 << 7 = attenuation (-) + * 0 << 7 = attenuation (-) * * Example: * 1 1 0 1 0 1 0 1 is +4dB bass, -4dB treble */ -#define TDA7432_TREBLE_0DB 0xf +#define TDA7432_TREBLE_0DB 0xf #define TDA7432_TREBLE 7 #define TDA7432_TREBLE_GAIN 1 << 3 #define TDA7432_BASS_0DB 0xf #define TDA7432_BASS 7 << 4 #define TDA7432_BASS_GAIN 1 << 7 - + /* Subaddress 0x03 - Left Front attenuation */ /* Subaddress 0x04 - Left Rear attenuation */ /* Subaddress 0x05 - Right Front attenuation */ @@ -202,7 +202,7 @@ * 0x1f is -37.5dB * * Bit 5 mutes that channel when set (1 = mute, 0 = unmute) - * We'll use the mute on the input, though (above) + * We'll use the mute on the input, though (above) * Bits 6,7 unused */ @@ -223,8 +223,8 @@ * * Bits 5,6,7 unused */ - - + + /* Begin code */ @@ -253,7 +253,7 @@ printk(KERN_WARNING "tda7432: I/O error, trying (read)\n"); return -1; } - dprintk("tda7432: Read 0x%02x\n", buffer); + dprintk("tda7432: Read 0x%02x\n", buffer); return buffer; } #endif @@ -263,8 +263,8 @@ struct tda7432 *t = i2c_get_clientdata(client); unsigned char buf[16]; d2printk("tda7432: In tda7432_set\n"); - - dprintk(KERN_INFO + + dprintk(KERN_INFO "tda7432: 7432_set(0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x)\n", t->input,t->volume,t->bass,t->treble,t->lf,t->lr,t->rf,t->rr,t->loud); buf[0] = TDA7432_IN; @@ -292,10 +292,10 @@ t->input = TDA7432_STEREO_IN | /* Main (stereo) input */ TDA7432_BASS_SYM | /* Symmetric bass cut */ - TDA7432_BASS_NORM; /* Normal bass range */ + TDA7432_BASS_NORM; /* Normal bass range */ t->volume = 0x3b ; /* -27dB Volume */ if (loudness) /* Turn loudness on? */ - t->volume |= TDA7432_LD_ON; + t->volume |= TDA7432_LD_ON; t->muted = VIDEO_AUDIO_MUTE; t->treble = TDA7432_TREBLE_0DB; /* 0dB Treble */ t->bass = TDA7432_BASS_0DB; /* 0dB Bass */ @@ -328,7 +328,7 @@ client->adapter = adap; client->addr = addr; i2c_set_clientdata(client, t); - + do_tda7432_init(client); printk(KERN_INFO "tda7432: init\n"); @@ -354,7 +354,7 @@ do_tda7432_init(client); i2c_detach_client(client); - + kfree(t); return 0; } @@ -369,7 +369,7 @@ /* --- v4l ioctls --- */ /* take care: bttv does userspace copying, we'll get a kernel pointer here... */ - + /* Query card - scale from TDA7432 settings to V4L settings */ case VIDIOCGAUDIO: { @@ -385,7 +385,7 @@ va->mode |= VIDEO_SOUND_STEREO; /* Master volume control * V4L volume is min 0, max 65535 - * TDA7432 Volume: + * TDA7432 Volume: * Min (-79dB) is 0x6f * Max (+20dB) is 0x07 (630) * Max (0dB) is 0x20 (829) @@ -396,7 +396,7 @@ } else { /* max 0db */ va->volume = ( 0x6f - (t->volume & 0x7F) ) * 829; } - + /* Balance depends on L,R attenuation * V4L balance is 0 to 65535, middle is 32768 * TDA7432 attenuation: min (0dB) is 0, max (-37.5dB) is 0x1f @@ -404,15 +404,15 @@ * attenuation exists for lf, lr, rf, rr * we use only lf and rf (front channels) */ - + if ( (t->lf) < (t->rf) ) /* right is attenuated, balance shifted left */ va->balance = (32768 - 1057*(t->rf)); else /* left is attenuated, balance shifted right */ va->balance = (32768 + 1057*(t->lf)); - - /* Bass/treble 4 bits each */ + + /* Bass/treble 4 bits each */ va->bass=t->bass; if(va->bass >= 0x8) va->bass = ~(va->bass - 0x8) & 0xf; @@ -421,7 +421,7 @@ if(va->treble >= 0x8) va->treble = ~(va->treble - 0x8) & 0xf; va->treble = (va->treble << 12)+(va->treble << 8)+(va->treble << 4)+(va->treble); - + break; /* VIDIOCGAUDIO case */ } @@ -437,13 +437,13 @@ } else { /* max 0db */ t->volume = 0x6f - ((va->volume)/829); } - + if (loudness) /* Turn on the loudness bit */ t->volume |= TDA7432_LD_ON; - + tda7432_write(client,TDA7432_VL, t->volume); } - + if(va->flags & VIDEO_AUDIO_BASS) { t->bass = va->bass >> 12; @@ -458,15 +458,15 @@ } if(va->flags & (VIDEO_AUDIO_TREBLE| VIDEO_AUDIO_BASS)) tda7432_write(client,TDA7432_TN, 0x10 | (t->bass << 4) | t->treble ); - + if(va->flags & VIDEO_AUDIO_BALANCE) { - if (va->balance < 32768) + if (va->balance < 32768) { /* shifted to left, attenuate right */ t->rr = (32768 - va->balance)/1057; t->rf = t->rr; t->lr = TDA7432_ATTEN_0DB; - t->lf = TDA7432_ATTEN_0DB; + t->lf = TDA7432_ATTEN_0DB; } else if(va->balance > 32769) { @@ -474,22 +474,22 @@ t->lf = (va->balance - 32768)/1057; t->lr = t->lf; t->rr = TDA7432_ATTEN_0DB; - t->rf = TDA7432_ATTEN_0DB; + t->rf = TDA7432_ATTEN_0DB; } - else + else { - /* centered */ + /* centered */ t->rr = TDA7432_ATTEN_0DB; t->rf = TDA7432_ATTEN_0DB; t->lf = TDA7432_ATTEN_0DB; t->lr = TDA7432_ATTEN_0DB; } } - - t->muted=(va->flags & VIDEO_AUDIO_MUTE); + + t->muted=(va->flags & VIDEO_AUDIO_MUTE); if (t->muted) { - /* Mute & update balance*/ + /* Mute & update balance*/ tda7432_write(client,TDA7432_LF, t->lf | TDA7432_MUTE); tda7432_write(client,TDA7432_LR, t->lr | TDA7432_MUTE); tda7432_write(client,TDA7432_RF, t->rf | TDA7432_MUTE); @@ -500,7 +500,7 @@ tda7432_write(client,TDA7432_RF, t->rf); tda7432_write(client,TDA7432_RR, t->rr); } - + break; } /* end of VIDEOCSAUDIO case */ @@ -529,7 +529,7 @@ { I2C_DEVNAME("tda7432"), .id = -1, - .driver = &driver, + .driver = &driver, }; static int __init tda7432_init(void) diff -Nru a/drivers/media/video/tda9840.c b/drivers/media/video/tda9840.c --- a/drivers/media/video/tda9840.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/media/video/tda9840.c 2004-11-10 17:19:05 -08:00 @@ -1,5 +1,5 @@ /* - tda9840.h - i2c-driver for the tda9840 by SGS Thomson + tda9840 - i2c-driver for the tda9840 by SGS Thomson Copyright (C) 1998-2003 Michael Hunold @@ -8,7 +8,7 @@ For detailed informations download the specifications directly from SGS Thomson at http://www.st.com - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -22,21 +22,19 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ + */ -#include #include -#include -#include -#include +#include #include -#include #include "tda9840.h" -static int debug = 0; /* insmod parameter */ -MODULE_PARM(debug,"i"); -#define dprintk if (debug) printk +static int debug = 0; /* insmod parameter */ +module_param(debug, int, 0644); +MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); +#define dprintk(args...) \ + do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __FUNCTION__, __LINE__); printk(args); } } while (0) #define SWITCH 0x00 #define LEVEL_ADJUST 0x02 @@ -44,168 +42,146 @@ #define TEST 0x04 /* addresses to scan, found only at 0x42 (7-Bit) */ -static unsigned short normal_i2c[] = {I2C_TDA9840, I2C_CLIENT_END}; -static unsigned short normal_i2c_range[] = {I2C_CLIENT_END}; +static unsigned short normal_i2c[] = { I2C_TDA9840, I2C_CLIENT_END }; +static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; /* magic definition of all other variables and things */ I2C_CLIENT_INSMOD; +static struct i2c_driver driver; +static struct i2c_client client_template; + /* unique ID allocation */ static int tda9840_id = 0; -static struct i2c_driver driver; - -static int tda9840_command(struct i2c_client *client, unsigned int cmd, void* arg) +static int command(struct i2c_client *client, unsigned int cmd, void *arg) { - int result = 0; + int result; + int byte = *(int *)arg; switch (cmd) { - case TDA9840_SWITCH: - { - int byte = *(int*)arg; - - dprintk("tda9840.o: TDA9840_SWITCH: 0x%02x\n",byte); - - if ( byte != TDA9840_SET_MONO - && byte != TDA9840_SET_MUTE - && byte != TDA9840_SET_STEREO - && byte != TDA9840_SET_LANG1 - && byte != TDA9840_SET_LANG2 - && byte != TDA9840_SET_BOTH - && byte != TDA9840_SET_BOTH_R - && byte != TDA9840_SET_EXTERNAL ) { - return -EINVAL; - } - - if ( 0 != (result = i2c_smbus_write_byte_data(client, SWITCH, byte))) { - printk("tda9840.o: TDA9840_SWITCH error.\n"); - return -EFAULT; - } - - return 0; - } + case TDA9840_SWITCH: - case TDA9840_LEVEL_ADJUST: - { - int byte = *(int*)arg; - - dprintk("tda9840.o: TDA9840_LEVEL_ADJUST: %d\n",byte); - - /* check for correct range */ - if ( byte > 25 || byte < -20 ) - return -EINVAL; - - /* calculate actual value to set, see specs, page 18 */ - byte /= 5; - if ( 0 < byte ) - byte += 0x8; - else - byte = -byte; - - if ( 0 != (result = i2c_smbus_write_byte_data(client, LEVEL_ADJUST, byte))) { - printk("tda9840.o: TDA9840_LEVEL_ADJUST error.\n"); - return -EFAULT; - } - - return 0; + dprintk("TDA9840_SWITCH: 0x%02x\n", byte); + + if (byte != TDA9840_SET_MONO + && byte != TDA9840_SET_MUTE + && byte != TDA9840_SET_STEREO + && byte != TDA9840_SET_LANG1 + && byte != TDA9840_SET_LANG2 + && byte != TDA9840_SET_BOTH + && byte != TDA9840_SET_BOTH_R + && byte != TDA9840_SET_EXTERNAL) { + return -EINVAL; } - case TDA9840_STEREO_ADJUST: - { - int byte = *(int*)arg; - - dprintk("tda9840.o: TDA9840_STEREO_ADJUST: %d\n",byte); - - /* check for correct range */ - if ( byte > 25 || byte < -24 ) - return -EINVAL; - - /* calculate actual value to set */ - byte /= 5; - if ( 0 < byte ) - byte += 0x20; - else - byte = -byte; - - if ( 0 != (result = i2c_smbus_write_byte_data(client, STEREO_ADJUST, byte))) { - printk("tda9840.o: TDA9840_STEREO_ADJUST error.\n"); - return -EFAULT; - } - - return 0; + result = i2c_smbus_write_byte_data(client, SWITCH, byte); + if (result) + dprintk("i2c_smbus_write_byte() failed, ret:%d\n", result); + break; + + case TDA9840_LEVEL_ADJUST: + + dprintk("TDA9840_LEVEL_ADJUST: %d\n", byte); + + /* check for correct range */ + if (byte > 25 || byte < -20) + return -EINVAL; + + /* calculate actual value to set, see specs, page 18 */ + byte /= 5; + if (0 < byte) + byte += 0x8; + else + byte = -byte; + + result = i2c_smbus_write_byte_data(client, LEVEL_ADJUST, byte); + if (result) + dprintk("i2c_smbus_write_byte() failed, ret:%d\n", result); + break; + + case TDA9840_STEREO_ADJUST: + + dprintk("TDA9840_STEREO_ADJUST: %d\n", byte); + + /* check for correct range */ + if (byte > 25 || byte < -24) + return -EINVAL; + + /* calculate actual value to set */ + byte /= 5; + if (0 < byte) + byte += 0x20; + else + byte = -byte; + + result = i2c_smbus_write_byte_data(client, STEREO_ADJUST, byte); + if (result) + dprintk("i2c_smbus_write_byte() failed, ret:%d\n", result); + break; + + case TDA9840_DETECT: + + byte = i2c_smbus_read_byte_data(client, STEREO_ADJUST); + if (byte == -1) { + dprintk("i2c_smbus_read_byte_data() failed\n"); + return -EIO; } - case TDA9840_DETECT: - { - int byte = 0x0; - - if ( -1 == (byte = i2c_smbus_read_byte_data(client, STEREO_ADJUST))) { - printk("tda9840.o: TDA9840_DETECT error while reading.\n"); - return -EFAULT; - } - - if( 0 != (byte & 0x80)) { - dprintk("tda9840.o: TDA9840_DETECT, register contents invalid.\n"); - return -EFAULT; - } + if (0 != (byte & 0x80)) { + dprintk("TDA9840_DETECT: register contents invalid\n"); + return -EINVAL; + } - dprintk("tda9840.o: TDA9840_DETECT, result: 0x%02x (original byte)\n",byte); + dprintk("TDA9840_DETECT: byte: 0x%02x\n", byte); + return ((byte & 0x60) >> 5); - return ((byte & 0x60) >> 5); - } + case TDA9840_TEST: + dprintk("TDA9840_TEST: 0x%02x\n", byte); - case TDA9840_TEST: - { - int byte = *(int*)arg; - - dprintk("tda9840.o: TDA9840_TEST: 0x%02x\n",byte); - - /* mask out irrelevant bits */ - byte &= 0x3; - - if ( 0 != (result = i2c_smbus_write_byte_data(client, TEST, byte))) { - printk("tda9840.o: TDA9840_TEST error.\n"); - return -EFAULT; - } - - return 0; - } + /* mask out irrelevant bits */ + byte &= 0x3; - default: - return -ENOIOCTLCMD; + result = i2c_smbus_write_byte_data(client, TEST, byte); + if (result) + dprintk("i2c_smbus_write_byte() failed, ret:%d\n", result); + break; + default: + return -ENOIOCTLCMD; } + if (result) + return -EIO; + return 0; } -static int tda9840_detect(struct i2c_adapter *adapter, int address, int kind) +static int detect(struct i2c_adapter *adapter, int address, int kind) { - struct i2c_client *client; + struct i2c_client *client; int result = 0; int byte = 0x0; - + /* let's see whether this adapter can support what we need */ - if ( 0 == i2c_check_functionality(adapter, I2C_FUNC_SMBUS_READ_BYTE_DATA|I2C_FUNC_SMBUS_WRITE_BYTE_DATA)) { + if (0 == i2c_check_functionality(adapter, + I2C_FUNC_SMBUS_READ_BYTE_DATA | + I2C_FUNC_SMBUS_WRITE_BYTE_DATA)) { return 0; } /* allocate memory for client structure */ client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (0 == client) { - printk("tda9840.o: not enough kernel memory.\n"); + if (0 == client) { + printk("not enough kernel memory\n"); return -ENOMEM; } - memset(client, 0, sizeof(struct i2c_client)); - + /* fill client structure */ - sprintf(client->name,"tda9840 (0x%02x)", address); + memcpy(client, &client_template, sizeof(struct i2c_client)); client->id = tda9840_id++; - client->flags = 0; client->addr = address; client->adapter = adapter; - client->driver = &driver; - i2c_set_clientdata(client, NULL); /* tell the i2c layer a new client has arrived */ if (0 != (result = i2c_attach_client(client))) { @@ -215,71 +191,64 @@ /* set initial values for level & stereo - adjustment, mode */ byte = 0; - if ( 0 != (result = tda9840_command(client, TDA9840_LEVEL_ADJUST, &byte))) { - printk("tda9840.o: could not initialize ic #1. continuing anyway. (result:%d)\n",result); - } - - if ( 0 != (result = tda9840_command(client, TDA9840_STEREO_ADJUST, &byte))) { - printk("tda9840.o: could not initialize ic #2. continuing anyway. (result:%d)\n",result); - } - + result = command(client, TDA9840_LEVEL_ADJUST, &byte); + result += command(client, TDA9840_STEREO_ADJUST, &byte); byte = TDA9840_SET_MONO; - if ( 0 != (result = tda9840_command(client, TDA9840_SWITCH, &byte))) { - printk("tda9840.o: could not initialize ic #3. continuing anyway. (result:%d)\n",result); - } - - printk("tda9840.o: detected @ 0x%02x on adapter %s\n",2*address,&client->adapter->name[0]); + result = command(client, TDA9840_SWITCH, &byte); + if (result) { + dprintk("could not initialize tda9840\n"); + return -ENODEV; + } + printk("tda9840: detected @ 0x%02x on adapter %s\n", address, &client->adapter->name[0]); return 0; } -static int tda9840_attach(struct i2c_adapter *adapter) +static int attach(struct i2c_adapter *adapter) { /* let's see whether this is a know adapter we can attach to */ - if( adapter->id != I2C_ALGO_SAA7146 ) { - dprintk("tda9840.o: refusing to probe on unknown adapter [name='%s',id=0x%x]\n",adapter->name,adapter->id); + if (adapter->id != I2C_ALGO_SAA7146) { + dprintk("refusing to probe on unknown adapter [name='%s',id=0x%x]\n", adapter->name, adapter->id); return -ENODEV; } - return i2c_probe(adapter,&addr_data,&tda9840_detect); + return i2c_probe(adapter, &addr_data, &detect); } -static int tda9840_detach(struct i2c_client *client) +static int detach(struct i2c_client *client) { - int err = 0; - - if ( 0 != (err = i2c_detach_client(client))) { - printk("tda9840.o: Client deregistration failed, client not detached.\n"); - return err; - } - + int ret = i2c_detach_client(client); kfree(client); - - return 0; + return ret; } static struct i2c_driver driver = { - .owner = THIS_MODULE, - .name = "tda9840 driver", - .id = I2C_DRIVERID_TDA9840, - .flags = I2C_DF_NOTIFY, - .attach_adapter = tda9840_attach, - .detach_client = tda9840_detach, - .command = tda9840_command, + .owner = THIS_MODULE, + .name = "tda9840", + .id = I2C_DRIVERID_TDA9840, + .flags = I2C_DF_NOTIFY, + .attach_adapter = attach, + .detach_client = detach, + .command = command, +}; + +static struct i2c_client client_template = { + I2C_DEVNAME("tda9840"), + .driver = &driver, }; -static int __init tda9840_init_module(void) +static int __init this_module_init(void) { - return i2c_add_driver(&driver); + return i2c_add_driver(&driver); } -static void __exit tda9840_cleanup_module(void) +static void __exit this_module_exit(void) { - i2c_del_driver(&driver); + i2c_del_driver(&driver); } -module_init(tda9840_init_module); -module_exit(tda9840_cleanup_module); +module_init(this_module_init); +module_exit(this_module_exit); MODULE_AUTHOR("Michael Hunold "); MODULE_DESCRIPTION("tda9840 driver"); diff -Nru a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c --- a/drivers/media/video/tda9875.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/video/tda9875.c 2004-11-10 17:19:04 -08:00 @@ -1,19 +1,19 @@ /* * For the TDA9875 chip - * (The TDA9875 is used on the Diamond DTV2000 french version + * (The TDA9875 is used on the Diamond DTV2000 french version * Other cards probably use these chips as well.) - * This driver will not complain if used with any + * This driver will not complain if used with any * other i2c device with the same address. * * Copyright (c) 2000 Guillaume Delvit based on Gerd Knorr source and - * Eric Sandeen + * Eric Sandeen * This code is placed under the terms of the GNU General Public License * Based on tda9855.c by Steve VanDeBogart (vandebo@uclink.berkeley.edu) * Which was based on tda8425.c by Greg Alexander (c) 1998 * * OPTIONS: * debug - set to 1 if you'd like to see debug messages - * + * * Revision: 0.1 - original version */ @@ -64,7 +64,7 @@ * http://www.semiconductors.philips.com * TDA9875: I2C-bus controlled DSP audio processor, FM demodulator * - */ + */ /* subaddresses for TDA9875 */ #define TDA9875_MUT 0x12 /*General mute (value --> 0b11001100*/ @@ -133,7 +133,7 @@ printk(KERN_WARNING "tda9875: I/O error, trying (read)\n"); return -1; } - dprintk("Read 0x%02x\n", buffer); + dprintk("Read 0x%02x\n", buffer); return buffer; } #endif @@ -178,7 +178,7 @@ static void do_tda9875_init(struct i2c_client *client) { struct tda9875 *t = i2c_get_clientdata(client); - dprintk("In tda9875_init\n"); + dprintk("In tda9875_init\n"); tda9875_write(client, TDA9875_CFG, 0xd0 ); /*reg de config 0 (reset)*/ tda9875_write(client, TDA9875_MSR, 0x03 ); /* Monitor 0b00000XXX*/ tda9875_write(client, TDA9875_C1MSB, 0x00 ); /*Car1(FM) MSB XMHz*/ @@ -192,7 +192,7 @@ tda9875_write(client, TDA9875_FMAT, 0x00 ); /*FM Matrix reg 0x00*/ tda9875_write(client, TDA9875_SC1, 0x00 ); /* SCART 1 (SC1)*/ tda9875_write(client, TDA9875_SC2, 0x01 ); /* SCART 2 (sc2)*/ - + tda9875_write(client, TDA9875_CH1V, 0x10 ); /* Channel volume 1 mute*/ tda9875_write(client, TDA9875_CH2V, 0x10 ); /* Channel volume 2 mute */ tda9875_write(client, TDA9875_DACOS, 0x02 ); /* sig DAC i/o(in:nicam)*/ @@ -204,14 +204,14 @@ tda9875_write(client, TDA9875_MVR, 0x03 ); /* Vol Main right 10dB*/ tda9875_write(client, TDA9875_MBA, 0x00 ); /* Main Bass Main 0dB*/ tda9875_write(client, TDA9875_MTR, 0x00 ); /* Main Treble Main 0dB*/ - tda9875_write(client, TDA9875_ACS, 0x44 ); /* Aux chan select (dac)*/ + tda9875_write(client, TDA9875_ACS, 0x44 ); /* Aux chan select (dac)*/ tda9875_write(client, TDA9875_AVL, 0x00 ); /* Vol Aux left 0dB*/ tda9875_write(client, TDA9875_AVR, 0x00 ); /* Vol Aux right 0dB*/ tda9875_write(client, TDA9875_ABA, 0x00 ); /* Aux Bass Main 0dB*/ tda9875_write(client, TDA9875_ATR, 0x00 ); /* Aux Aigus Main 0dB*/ - + tda9875_write(client, TDA9875_MUT, 0xcc ); /* General mute */ - + t->mode=AUDIO_UNMUTE; t->lvol=t->rvol =0; /* 0dB */ t->bass=0; /* 0dB */ @@ -262,7 +262,7 @@ kfree(t); return 1; } - + do_tda9875_init(client); printk(KERN_INFO "tda9875: init\n"); @@ -288,7 +288,7 @@ do_tda9875_init(client); i2c_detach_client(client); - + kfree(t); return 0; } @@ -298,9 +298,9 @@ { struct tda9875 *t = i2c_get_clientdata(client); - dprintk("In tda9875_command...\n"); + dprintk("In tda9875_command...\n"); - switch (cmd) { + switch (cmd) { /* --- v4l ioctls --- */ /* take care: bttv does userspace copying, we'll get a kernel pointer here... */ @@ -335,7 +335,7 @@ struct video_audio *va = arg; int left,right; - dprintk("VIDEOCSAUDIO...\n"); + dprintk("VIDEOCSAUDIO...\n"); left = (min(65536 - va->balance,32768) * va->volume) / 32768; right = (min(va->balance,(__u16)32768) * @@ -357,7 +357,7 @@ t->bass = 15; if (t->bass < -12) t->bass = -12 & 0xff; - + t->treble = ((va->treble/2700)-12) & 0xff; if (t->treble > 12) t->treble = 12; @@ -367,7 +367,7 @@ //printk("tda9875 bal:%04x vol:%04x bass:%04x treble:%04x\n",va->balance,va->volume,va->bass,va->treble); - + tda9875_set(client); diff -Nru a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c --- a/drivers/media/video/tda9887.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/media/video/tda9887.c 2004-11-10 17:19:07 -08:00 @@ -535,6 +535,11 @@ tda9887_set_config(t,buf); tda9887_set_insmod(t,buf); + if (t->std & V4L2_STD_SECAM_L) { + /* secam fixup (FIXME: move this to tvnorms array?) */ + buf[1] &= ~cOutputPort2Inactive; + } + dprintk(PREFIX "writing: b=0x%02x c=0x%02x e=0x%02x\n", buf[1],buf[2],buf[3]); if (debug > 1) @@ -565,11 +570,11 @@ return -ENOMEM; memset(t,0,sizeof(*t)); t->client = client_template; - t->std = 0;; + t->std = 0; t->pinnacle_id = UNSET; i2c_set_clientdata(&t->client, t); i2c_attach_client(&t->client); - + return 0; } @@ -618,7 +623,7 @@ t->radio = 1; tda9887_configure(t); break; - + case AUDC_CONFIG_PINNACLE: { int *i = arg; @@ -712,6 +717,22 @@ return 0; } +static int tda9887_suspend(struct device * dev, u32 state, u32 level) +{ + dprintk("tda9887: suspend\n"); + return 0; +} + +static int tda9887_resume(struct device * dev, u32 level) +{ + struct i2c_client *c = container_of(dev, struct i2c_client, dev); + struct tda9887 *t = i2c_get_clientdata(c); + + dprintk("tda9887: resume\n"); + tda9887_configure(t); + return 0; +} + /* ----------------------------------------------------------------------- */ static struct i2c_driver driver = { @@ -722,6 +743,10 @@ .attach_adapter = tda9887_probe, .detach_client = tda9887_detach, .command = tda9887_command, + .driver = { + .suspend = tda9887_suspend, + .resume = tda9887_resume, + }, }; static struct i2c_client client_template = { diff -Nru a/drivers/media/video/tea6415c.c b/drivers/media/video/tea6415c.c --- a/drivers/media/video/tea6415c.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/media/video/tea6415c.c 2004-11-10 17:19:06 -08:00 @@ -1,5 +1,5 @@ /* - tea6415c.h - i2c-driver for the tea6415c by SGS Thomson + tea6415c - i2c-driver for the tea6415c by SGS Thomson Copyright (C) 1998-2003 Michael Hunold @@ -7,10 +7,10 @@ with 8 inputs and 6 outputs. It is cascadable, i.e. it can be found at the addresses 0x86 and 0x06 on the i2c-bus. - + For detailed informations download the specifications directly from SGS Thomson at http://www.st.com - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License vs published by the Free Software Foundation; either version 2 of the License, or @@ -24,61 +24,58 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mvss Ave, Cambridge, MA 02139, USA. - */ + */ -#include #include -#include -#include -#include +#include #include -#include + #include "tea6415c.h" -static int debug = 0; /* insmod parameter */ -MODULE_PARM(debug,"i"); -#define dprintk if (debug) printk +static int debug = 0; /* insmod parameter */ +module_param(debug, int, 0644); +MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); +#define dprintk(args...) \ + do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __FUNCTION__, __LINE__); printk(args); } } while (0) #define TEA6415C_NUM_INPUTS 8 #define TEA6415C_NUM_OUTPUTS 6 /* addresses to scan, found only at 0x03 and/or 0x43 (7-bit) */ -static unsigned short normal_i2c[] = {I2C_TEA6415C_1, I2C_TEA6415C_2, I2C_CLIENT_END}; -static unsigned short normal_i2c_range[] = {I2C_CLIENT_END}; +static unsigned short normal_i2c[] = { I2C_TEA6415C_1, I2C_TEA6415C_2, I2C_CLIENT_END }; +static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; /* magic definition of all other variables and things */ I2C_CLIENT_INSMOD; static struct i2c_driver driver; +static struct i2c_client client_template; /* unique ID allocation */ static int tea6415c_id = 0; /* this function is called by i2c_probe */ -static int tea6415c_detect(struct i2c_adapter *adapter, int address, int kind) +static int detect(struct i2c_adapter *adapter, int address, int kind) { - struct i2c_client *client = NULL; + struct i2c_client *client = NULL; int err = 0; /* let's see whether this adapter can support what we need */ - if ( 0 == i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_BYTE)) { + if (0 == i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_BYTE)) { return 0; } /* allocate memory for client structure */ client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (0 == client) { + if (0 == client) { return -ENOMEM; } - memset(client, 0, sizeof(struct i2c_client)); /* fill client structure */ - sprintf(client->name,"tea6415c (0x%02x)", address); + memcpy(client, &client_template, sizeof(struct i2c_client)); client->id = tea6415c_id++; - client->flags = 0; client->addr = address; client->adapter = adapter; - client->driver = &driver; /* tell the i2c layer a new client has arrived */ if (0 != (err = i2c_attach_client(client))) { @@ -86,151 +83,145 @@ return err; } - printk("tea6415c.o: detected @ 0x%02x on adapter %s\n",2*address,&client->adapter->name[0]); + printk("tea6415c: detected @ 0x%02x on adapter %s\n", address, &client->adapter->name[0]); return 0; } -static int tea6415c_attach(struct i2c_adapter *adapter) +static int attach(struct i2c_adapter *adapter) { /* let's see whether this is a know adapter we can attach to */ - if( adapter->id != I2C_ALGO_SAA7146 ) { - dprintk("tea6415c.o: refusing to probe on unknown adapter [name='%s',id=0x%x]\n",adapter->name,adapter->id); + if (adapter->id != I2C_ALGO_SAA7146) { + dprintk("refusing to probe on unknown adapter [name='%s',id=0x%x]\n", adapter->name, adapter->id); return -ENODEV; } - return i2c_probe(adapter,&addr_data,&tea6415c_detect); + return i2c_probe(adapter, &addr_data, &detect); } -static int tea6415c_detach(struct i2c_client *client) +static int detach(struct i2c_client *client) { - int err = 0; - - if ( 0 != (err = i2c_detach_client(client))) { - printk("tea6415c.o: Client deregistration failed, client not detached.\n"); - return err; - } - + int ret = i2c_detach_client(client); kfree(client); - - return 0; + return ret; } /* makes a connection between the input-pin 'i' and the output-pin 'o' for the tea6415c-client 'client' */ -static int tea6415c_switch(struct i2c_client *client, int i, int o) +static int switch_matrix(struct i2c_client *client, int i, int o) { - u8 byte = 0; + u8 byte = 0; + int ret; - dprintk("tea6415c.o: tea6415c_switch: adr:0x%02x, i:%d, o:%d\n", client->addr, i, o); - + dprintk("adr:0x%02x, i:%d, o:%d\n", client->addr, i, o); + /* check if the pins are valid */ - if ( 0 == (( 1 == i || 3 == i || 5 == i || 6 == i || 8 == i || 10 == i || 20 == i || 11 == i ) && - (18 == o || 17 == o || 16 == o || 15 == o || 14 == o || 13 == o ))) + if (0 == ((1 == i || 3 == i || 5 == i || 6 == i || 8 == i || 10 == i || 20 == i || 11 == i) + && (18 == o || 17 == o || 16 == o || 15 == o || 14 == o || 13 == o))) return -1; /* to understand this, have a look at the tea6415c-specs (p.5) */ - switch(o) { - case 18: - byte = 0x00; - break; - case 14: - byte = 0x20; - break; - case 16: - byte = 0x10; - break; - case 17: - byte = 0x08; - break; - case 15: - byte = 0x18; - break; - case 13: - byte = 0x28; - break; + switch (o) { + case 18: + byte = 0x00; + break; + case 14: + byte = 0x20; + break; + case 16: + byte = 0x10; + break; + case 17: + byte = 0x08; + break; + case 15: + byte = 0x18; + break; + case 13: + byte = 0x28; + break; }; - - switch(i) { - case 5: - byte |= 0x00; - break; - case 8: - byte |= 0x04; - break; - case 3: - byte |= 0x02; - break; - case 20: - byte |= 0x06; - break; - case 6: - byte |= 0x01; - break; - case 10: - byte |= 0x05; - break; - case 1: - byte |= 0x03; - break; - case 11: - byte |= 0x07; - break; + + switch (i) { + case 5: + byte |= 0x00; + break; + case 8: + byte |= 0x04; + break; + case 3: + byte |= 0x02; + break; + case 20: + byte |= 0x06; + break; + case 6: + byte |= 0x01; + break; + case 10: + byte |= 0x05; + break; + case 1: + byte |= 0x03; + break; + case 11: + byte |= 0x07; + break; }; - if ( 0 != i2c_smbus_write_byte(client,byte)) { - dprintk("tea6415c.o: tea6415c_switch: could not write to tea6415c\n"); - return -1; + ret = i2c_smbus_write_byte(client, byte); + if (ret) { + dprintk("i2c_smbus_write_byte() failed, ret:%d\n", ret); + return -EIO; } - return 0; + return ret; } -static int tea6415c_command(struct i2c_client *client, unsigned int cmd, void* arg) +static int command(struct i2c_client *client, unsigned int cmd, void *arg) { - struct tea6415c_multiplex *v = (struct tea6415c_multiplex*)arg; + struct tea6415c_multiplex *v = (struct tea6415c_multiplex *)arg; int result = 0; switch (cmd) { - case TEA6415C_SWITCH: { - result = tea6415c_switch(client,v->in,v->out); - break; - } - default: { - return -ENOIOCTLCMD; - } + case TEA6415C_SWITCH: + result = switch_matrix(client, v->in, v->out); + break; + default: + return -ENOIOCTLCMD; } - if ( 0 != result ) - return result; - - return 0; + return result; } static struct i2c_driver driver = { - .owner = THIS_MODULE, - .name = "tea6415c driver", - .id = I2C_DRIVERID_TEA6415C, - .flags = I2C_DF_NOTIFY, - .attach_adapter = tea6415c_attach, - .detach_client = tea6415c_detach, - .command = tea6415c_command, + .owner = THIS_MODULE, + .name = "tea6415c", + .id = I2C_DRIVERID_TEA6415C, + .flags = I2C_DF_NOTIFY, + .attach_adapter = attach, + .detach_client = detach, + .command = command, +}; + +static struct i2c_client client_template = { + I2C_DEVNAME("tea6415c"), + .driver = &driver, }; -static int __init tea6415c_init_module(void) +static int __init this_module_init(void) { return i2c_add_driver(&driver); } -static void __exit tea6415c_cleanup_module(void) +static void __exit this_module_exit(void) { - i2c_del_driver(&driver); + i2c_del_driver(&driver); } -module_init(tea6415c_init_module); -module_exit(tea6415c_cleanup_module); +module_init(this_module_init); +module_exit(this_module_exit); MODULE_AUTHOR("Michael Hunold "); MODULE_DESCRIPTION("tea6415c driver"); MODULE_LICENSE("GPL"); - diff -Nru a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c --- a/drivers/media/video/tea6420.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/video/tea6420.c 2004-11-10 17:19:04 -08:00 @@ -1,5 +1,5 @@ /* - tea6420.o - i2c-driver for the tea6420 by SGS Thomson + tea6420 - i2c-driver for the tea6420 by SGS Thomson Copyright (C) 1998-2003 Michael Hunold @@ -7,10 +7,10 @@ 4 stereo outputs and gain control for each output. It is cascadable, i.e. it can be found at the adresses 0x98 and 0x9a on the i2c-bus. - + For detailed informations download the specifications directly from SGS Thomson at http://www.st.com - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -24,30 +24,29 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ + */ -#include #include -#include -#include -#include +#include #include -#include #include "tea6420.h" -static int debug = 0; /* insmod parameter */ -MODULE_PARM(debug,"i"); -#define dprintk if (debug) printk +static int debug = 0; /* insmod parameter */ +module_param(debug, int, 0644); +MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); +#define dprintk(args...) \ + do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __FUNCTION__, __LINE__); printk(args); } } while (0) /* addresses to scan, found only at 0x4c and/or 0x4d (7-Bit) */ -static unsigned short normal_i2c[] = {I2C_TEA6420_1, I2C_TEA6420_2, I2C_CLIENT_END}; -static unsigned short normal_i2c_range[] = {I2C_CLIENT_END}; +static unsigned short normal_i2c[] = { I2C_TEA6420_1, I2C_TEA6420_2, I2C_CLIENT_END }; +static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; /* magic definition of all other variables and things */ I2C_CLIENT_INSMOD; static struct i2c_driver driver; +static struct i2c_client client_template; /* unique ID allocation */ static int tea6420_id = 0; @@ -56,39 +55,37 @@ with gain 'g' for the tea6420-client 'client' (note: i = 6 means 'mute') */ static int tea6420_switch(struct i2c_client *client, int i, int o, int g) { - u8 byte = 0; - - int result = 0; - - dprintk("tea6420.o: tea6420_switch: adr:0x%02x, i:%d, o:%d, g:%d\n",client->addr,i,o,g); + u8 byte = 0; + int ret; + + dprintk("adr:0x%02x, i:%d, o:%d, g:%d\n", client->addr, i, o, g); /* check if the paramters are valid */ - if ( i < 1 || i > 6 || o < 1 || o > 4 || g < 0 || g > 6 || g%2 != 0 ) + if (i < 1 || i > 6 || o < 1 || o > 4 || g < 0 || g > 6 || g % 2 != 0) return -1; - byte = ((o-1)<<5); - byte |= (i-1); + byte = ((o - 1) << 5); + byte |= (i - 1); /* to understand this, have a look at the tea6420-specs (p.5) */ - switch(g) { - case 0: - byte |= (3<<3); - break; - case 2: - byte |= (2<<3); - break; - case 4: - byte |= (1<<3); - break; - case 6: - break; - } - - /* fixme?: 1 != ... => 0 != */ - if ( 0 != (result = i2c_smbus_write_byte(client,byte))) { - printk("tea6402:%d\n",result); - dprintk(KERN_ERR "tea6420.o: could not switch, result:%d\n",result); - return -EFAULT; + switch (g) { + case 0: + byte |= (3 << 3); + break; + case 2: + byte |= (2 << 3); + break; + case 4: + byte |= (1 << 3); + break; + case 6: + break; + } + + ret = i2c_smbus_write_byte(client, byte); + if (ret) { + dprintk("i2c_smbus_write_byte() failed, ret:%d\n", ret); + return -EIO; } return 0; @@ -97,29 +94,26 @@ /* this function is called by i2c_probe */ static int tea6420_detect(struct i2c_adapter *adapter, int address, int kind) { - struct i2c_client *client; + struct i2c_client *client; int err = 0, i = 0; /* let's see whether this adapter can support what we need */ - if ( 0 == i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_BYTE)) { + if (0 == i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_BYTE)) { return 0; } /* allocate memory for client structure */ client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (0 == client) { + if (0 == client) { return -ENOMEM; } - memset(client, 0x0, sizeof(struct i2c_client)); + memset(client, 0x0, sizeof(struct i2c_client)); /* fill client structure */ - sprintf(client->name,"tea6420 (0x%02x)", address); + memcpy(client, &client_template, sizeof(struct i2c_client)); client->id = tea6420_id++; - client->flags = 0; client->addr = address; client->adapter = adapter; - client->driver = &driver; - i2c_set_clientdata(client, NULL); /* tell the i2c layer a new client has arrived */ if (0 != (err = i2c_attach_client(client))) { @@ -129,86 +123,81 @@ /* set initial values: set "mute"-input to all outputs at gain 0 */ err = 0; - for(i = 1; i < 5; i++) { + for (i = 1; i < 5; i++) { err += tea6420_switch(client, 6, i, 0); } - if( 0 != err) { - printk("tea6420.o: could not initialize chipset. continuing anyway.\n"); + if (err) { + dprintk("could not initialize tea6420\n"); + kfree(client); + return -ENODEV; } - - printk("tea6420.o: detected @ 0x%02x on adapter %s\n",2*address,&client->adapter->name[0]); + + printk("tea6420: detected @ 0x%02x on adapter %s\n", address, &client->adapter->name[0]); return 0; } -static int tea6420_attach(struct i2c_adapter *adapter) +static int attach(struct i2c_adapter *adapter) { /* let's see whether this is a know adapter we can attach to */ - if( adapter->id != I2C_ALGO_SAA7146 ) { - dprintk("tea6420.o: refusing to probe on unknown adapter [name='%s',id=0x%x]\n",adapter->name,adapter->id); + if (adapter->id != I2C_ALGO_SAA7146) { + dprintk("refusing to probe on unknown adapter [name='%s',id=0x%x]\n", adapter->name, adapter->id); return -ENODEV; } - return i2c_probe(adapter,&addr_data,&tea6420_detect); + return i2c_probe(adapter, &addr_data, &tea6420_detect); } -static int tea6420_detach(struct i2c_client *client) +static int detach(struct i2c_client *client) { - int err = 0; - - if ( 0 != (err = i2c_detach_client(client))) { - printk("tea6420.o: Client deregistration failed, client not detached.\n"); - return err; - } - + int ret = i2c_detach_client(client); kfree(client); - - return 0; + return ret; } -static int tea6420_command(struct i2c_client *client, unsigned int cmd, void* arg) +static int command(struct i2c_client *client, unsigned int cmd, void *arg) { - struct tea6420_multiplex *a = (struct tea6420_multiplex*)arg; + struct tea6420_multiplex *a = (struct tea6420_multiplex *)arg; int result = 0; switch (cmd) { - case TEA6420_SWITCH: { - result = tea6420_switch(client,a->in,a->out,a->gain); - break; - } - default: { - return -ENOIOCTLCMD; - } + case TEA6420_SWITCH: + result = tea6420_switch(client, a->in, a->out, a->gain); + break; + default: + return -ENOIOCTLCMD; } - if ( 0 != result ) - return result; - - return 0; + return result; } static struct i2c_driver driver = { - .owner = THIS_MODULE, - .name = "tea6420 driver", - .id = I2C_DRIVERID_TEA6420, - .flags = I2C_DF_NOTIFY, - .attach_adapter = tea6420_attach, - .detach_client = tea6420_detach, - .command = tea6420_command, + .owner = THIS_MODULE, + .name = "tea6420", + .id = I2C_DRIVERID_TEA6420, + .flags = I2C_DF_NOTIFY, + .attach_adapter = attach, + .detach_client = detach, + .command = command, +}; + +static struct i2c_client client_template = { + I2C_DEVNAME("tea6420"), + .driver = &driver, }; -static int __init tea6420_init_module(void) +static int __init this_module_init(void) { return i2c_add_driver(&driver); } -static void __exit tea6420_cleanup_module(void) +static void __exit this_module_exit(void) { - i2c_del_driver(&driver); + i2c_del_driver(&driver); } -module_init(tea6420_init_module); -module_exit(tea6420_cleanup_module); +module_init(this_module_init); +module_exit(this_module_exit); MODULE_AUTHOR("Michael Hunold "); MODULE_DESCRIPTION("tea6420 driver"); diff -Nru a/drivers/media/video/tuner.c b/drivers/media/video/tuner.c --- a/drivers/media/video/tuner.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/media/video/tuner.c 2004-11-10 17:19:07 -08:00 @@ -1,4 +1,9 @@ +/* + * $Id: tuner.c,v 1.27 2004/10/20 09:43:34 kraxel Exp $ + */ + #include +#include #include #include #include @@ -15,30 +20,34 @@ #include #include -/* Addresses to scan */ +#define UNSET (-1U) + +/* standard i2c insmod options */ static unsigned short normal_i2c[] = {I2C_CLIENT_END}; static unsigned short normal_i2c_range[] = {0x60,0x6f,I2C_CLIENT_END}; I2C_CLIENT_INSMOD; -#define UNSET (-1U) - -/* insmod options */ -static unsigned int debug = 0; +/* insmod options used at init time => read/only */ static unsigned int type = UNSET; static unsigned int addr = 0; +module_param(type, int, 444); +module_param(addr, int, 444); + +/* insmod options used at runtime => read/write */ +static unsigned int debug = 0; +static unsigned int tv_antenna = 1; +static unsigned int radio_antenna = 0; +static unsigned int optimize_vco = 1; +module_param(debug, int, 644); +module_param(tv_antenna, int, 644); +module_param(radio_antenna, int, 644); +module_param(optimize_vco, int, 644); + static unsigned int tv_range[2] = { 44, 958 }; static unsigned int radio_range[2] = { 65, 108 }; -static unsigned int tv_antenna = 1; -static unsigned int radio_antenna = 0; -MODULE_PARM(debug,"i"); -MODULE_PARM(type,"i"); -MODULE_PARM(addr,"i"); -MODULE_PARM(tv_range,"2i"); -MODULE_PARM(radio_range,"2i"); -MODULE_PARM(tv_antenna,"i"); -MODULE_PARM(radio_antenna,"i"); -#define optimize_vco 1 +module_param_array(tv_range, int, NULL, 644); +module_param_array(radio_range, int, NULL, 644); MODULE_DESCRIPTION("device driver for various TV and TV+FM radio tuners"); MODULE_AUTHOR("Ralph Metzler, Gerd Knorr, Gunther Mayer"); @@ -52,10 +61,10 @@ unsigned int freq; /* keep track of the current settings */ v4l2_std_id std; int using_v4l2; - + unsigned int radio; unsigned int input; - + // only for MT2032 unsigned int xogc; unsigned int radio_if2; @@ -71,11 +80,11 @@ /* tv standard selection for Temic 4046 FM5 this value takes the low bits of control byte 2 - from datasheet Rev.01, Feb.00 + from datasheet Rev.01, Feb.00 standard BG I L L2 D picture IF 38.9 38.9 38.9 33.95 38.9 sound 1 33.4 32.9 32.4 40.45 32.4 - sound 2 33.16 + sound 2 33.16 NICAM 33.05 32.348 33.05 33.05 */ #define TEMIC_SET_PAL_I 0x05 @@ -97,7 +106,7 @@ #define PHILIPS_SET_PAL_I 0x01 /* Bit 2 always zero !*/ #define PHILIPS_SET_PAL_BGDK 0x09 #define PHILIPS_SET_PAL_L2 0x0a -#define PHILIPS_SET_PAL_L 0x0b +#define PHILIPS_SET_PAL_L 0x0b /* system switching for Philips FI1216MF MK2 from datasheet "1996 Jul 09", @@ -115,20 +124,20 @@ /* ---------------------------------------------------------------------- */ -struct tunertype +struct tunertype { char *name; unsigned char Vendor; unsigned char Type; - + unsigned short thresh1; /* band switch VHF_LO <=> VHF_HI */ unsigned short thresh2; /* band switch VHF_HI <=> UHF */ unsigned char VHF_L; unsigned char VHF_H; unsigned char UHF; - unsigned char config; - unsigned short IFPCoff; /* 622.4=16*38.90 MHz PAL, - 732 =16*45.75 NTSCi, + unsigned char config; + unsigned short IFPCoff; /* 622.4=16*38.90 MHz PAL, + 732 =16*45.75 NTSCi, 940 =16*58.75 NTSC-Japan 704 =16*44 ATSC */ }; @@ -171,7 +180,7 @@ { "Alps TSBC5", Alps, PAL, /* untested - data sheet guess. Only IF differs. */ 16*133.25,16*351.25,0x01,0x02,0x08,0x8e,608}, { "Temic PAL_BG (4006FH5)", TEMIC, PAL, - 16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,623}, + 16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,623}, { "Alps TSCH6",Alps,NTSC, 16*137.25,16*385.25,0x14,0x12,0x11,0x8e,732}, @@ -245,14 +254,14 @@ { "Panasonic VP27s/ENGE4324D", Panasonic, NTSC, 16*160.00,16*454.00,0x01,0x02,0x08,0xce,940}, { "LG NTSC (TAPE series)", LGINNOTEK, NTSC, - 16*160.00,16*442.00,0x01,0x02,0x04,0xc8,732 }, + 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732 }, { "Tenna TNF 8831 BGFF)", Philips, PAL, 16*161.25,16*463.25,0xa0,0x90,0x30,0x8e,623}, { "Microtune 4042 FI5 ATSC/NTSC dual in", Microtune, NTSC, 16*162.00,16*457.00,0xa2,0x94,0x31,0x8e,732}, { "TCL 2002N", TCL, NTSC, - 16*172.00,16*448.00,0x01,0x02,0x08,0x88,732}, + 16*172.00,16*448.00,0x01,0x02,0x08,0x8e,732}, }; #define TUNERS ARRAY_SIZE(tuners) @@ -421,7 +430,7 @@ if(rfin >400*1000*1000) buf[6]=0xe4; else - buf[6]=0xf4; // set PKEN per rev 1.2 + buf[6]=0xf4; // set PKEN per rev 1.2 buf[7]=8+xogc; buf[8]=0xc3; //reserved buf[9]=0x4e; //reserved @@ -442,10 +451,10 @@ i2c_master_recv(c,buf,1); dprintk("mt2032 Reg.E=0x%02x\n",buf[0]); lock=buf[0] &0x06; - + if (lock==6) break; - + dprintk("mt2032: pll wait 1ms for lock (0x%2x)\n",buf[0]); udelay(1000); } @@ -467,7 +476,7 @@ if(tad1 ==1) return lock; if(tad1==2) { - if(sel==0) + if(sel==0) return lock; else sel--; } @@ -520,13 +529,13 @@ // wait for PLLs to lock (per manual), retry LINT if not. for(lint_try=0; lint_try<2; lint_try++) { lock=mt2032_check_lo_lock(c); - + if(optimize_vco) lock=mt2032_optimize_vco(c,sel,lock); if(lock==6) break; - - printk("mt2032: re-init PLLs by LINT\n"); - buf[0]=7; + + printk("mt2032: re-init PLLs by LINT\n"); + buf[0]=7; buf[1]=0x80 +8+t->xogc; // set LINT to re-init PLLs i2c_master_send(c,buf,2); mdelay(10); @@ -651,46 +660,46 @@ unsigned int f_lo1,f_lo2,lo1,lo2,f_lo1_modulo,f_lo2_modulo,num1,num2,div1a,div1b,div2a,div2b; int ret; unsigned char buf[6]; - + dprintk("mt2050_set_if_freq freq=%d\n",freq); - + f_lo1=freq+if1; f_lo1=(f_lo1/1000000)*1000000; - + f_lo2=f_lo1-freq-if2; f_lo2=(f_lo2/50000)*50000; - + lo1=f_lo1/4000000; lo2=f_lo2/4000000; - + f_lo1_modulo= f_lo1-(lo1*4000000); f_lo2_modulo= f_lo2-(lo2*4000000); - + num1=4*f_lo1_modulo/4000000; num2=4096*(f_lo2_modulo/1000)/4000; - + // todo spurchecks - + div1a=(lo1/12)-1; div1b=lo1-(div1a+1)*12; - + div2a=(lo2/8)-1; div2b=lo2-(div2a+1)*8; - + dprintk("lo1 lo2 = %d %d\n", lo1, lo2); dprintk("num1 num2 div1a div1b div2a div2b= %x %x %x %x %x %x\n",num1,num2,div1a,div1b,div2a,div2b); - - + + buf[0]=1; buf[1]= 4*div1b + num1; if(freq<275*1000*1000) buf[1] = buf[1]|0x80; - + buf[2]=div1a; buf[3]=32*div2b + num2/256; buf[4]=num2-(num2/256)*256; buf[5]=div2a; if(num2!=0) buf[5]=buf[5]|0x40; - + if(debug) { int i; printk("bufs is: "); @@ -698,7 +707,7 @@ printk("%x ",buf[i]); printk("\n"); } - + ret=i2c_master_send(c,buf,6); if (ret!=6) printk("mt2050_set_if_freq failed with %d\n",ret); @@ -708,7 +717,7 @@ { struct tuner *t = i2c_get_clientdata(c); unsigned int if2; - + if (t->std & V4L2_STD_525_60) { // NTSC if2 = 45750*1000; @@ -724,7 +733,7 @@ { struct tuner *t = i2c_get_clientdata(c); int if2 = t->radio_if2; - + mt2050_set_if_freq(c, freq*62500, if2); mt2050_set_antenna(c, radio_antenna); } @@ -734,19 +743,19 @@ struct tuner *t = i2c_get_clientdata(c); unsigned char buf[2]; int ret; - + buf[0]=6; buf[1]=0x10; ret=i2c_master_send(c,buf,2); // power - + buf[0]=0x0f; buf[1]=0x0f; ret=i2c_master_send(c,buf,2); // m1lo - + buf[0]=0x0d; ret=i2c_master_send(c,buf,1); i2c_master_recv(c,buf,1); - + dprintk("mt2050: sro is %x\n",buf[0]); t->tv_freq = mt2050_set_tv_freq; t->radio_freq = mt2050_set_radio_freq; @@ -759,7 +768,7 @@ char *name; unsigned char buf[21]; int company_code; - + memset(buf,0,sizeof(buf)); t->tv_freq = NULL; t->radio_freq = NULL; @@ -828,13 +837,17 @@ unsigned char buffer[4]; int rc; - tun=&tuners[t->type]; - if (freq < tun->thresh1) + tun = &tuners[t->type]; + if (freq < tun->thresh1) { config = tun->VHF_L; - else if (freq < tun->thresh2) + dprintk("tv: VHF lowrange\n"); + } else if (freq < tun->thresh2) { config = tun->VHF_H; - else + dprintk("tv: VHF high range\n"); + } else { config = tun->UHF; + dprintk("tv: UHF range\n"); + } /* tv norm specific stuff for multi-norm tuners */ @@ -887,7 +900,7 @@ /* 0x02 -> NTSC antenna input 1 */ /* 0x03 -> NTSC antenna input 2 */ config &= ~0x03; - if (t->std & V4L2_STD_ATSC) + if (!(t->std & V4L2_STD_ATSC)) config |= 2; /* FIXME: input */ break; @@ -897,7 +910,7 @@ tun->config |= 0x40; break; } - + /* * Philips FI1216MK2 remark from specification : * for channel selection involving band switching, and to ensure @@ -1131,7 +1144,7 @@ if (this_adap > 0) return -1; this_adap++; - + client_template.adapter = adap; client_template.addr = addr; @@ -1233,7 +1246,7 @@ break; } break; - + /* --- v4l ioctls --- */ /* take care: bttv does userspace copying, we'll get a kernel pointer here... */ @@ -1328,7 +1341,25 @@ /* nothing */ break; } - + + return 0; +} + +static int tuner_suspend(struct device * dev, u32 state, u32 level) +{ + dprintk("tuner: suspend\n"); + /* FIXME: power down ??? */ + return 0; +} + +static int tuner_resume(struct device * dev, u32 level) +{ + struct i2c_client *c = container_of(dev, struct i2c_client, dev); + struct tuner *t = i2c_get_clientdata(c); + + dprintk("tuner: resume\n"); + if (t->freq) + set_freq(c,t->freq); return 0; } @@ -1342,6 +1373,10 @@ .attach_adapter = tuner_probe, .detach_client = tuner_detach, .command = tuner_command, + .driver = { + .suspend = tuner_suspend, + .resume = tuner_resume, + }, }; static struct i2c_client client_template = { diff -Nru a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c --- a/drivers/media/video/tvaudio.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/media/video/tvaudio.c 2004-11-10 17:19:03 -08:00 @@ -3,12 +3,12 @@ * * Copyright (c) 2000 Gerd Knorr * based on code by: - * Eric Sandeen (eric_sandeen@bigfoot.com) + * Eric Sandeen (eric_sandeen@bigfoot.com) * Steve VanDeBogart (vandebo@uclink.berkeley.edu) * Greg Alexander (galexand@acm.org) * * This code is placed under the terms of the GNU General Public License - * + * * OPTIONS: * debug - set to 1 if you'd like to see debug messages * @@ -207,7 +207,7 @@ i2c_clientname(&chip->c)); return -1; } - dprintk("%s: chip_read: 0x%x\n",i2c_clientname(&chip->c),buffer); + dprintk("%s: chip_read: 0x%x\n",i2c_clientname(&chip->c),buffer); return buffer; } @@ -227,14 +227,14 @@ return -1; } dprintk("%s: chip_read2: reg%d=0x%x\n", - i2c_clientname(&chip->c),subaddr,read[0]); + i2c_clientname(&chip->c),subaddr,read[0]); return read[0]; } static int chip_cmd(struct CHIPSTATE *chip, char *name, audiocmd *cmd) { int i; - + if (0 == cmd->count) return 0; @@ -273,7 +273,7 @@ DECLARE_WAITQUEUE(wait, current); struct CHIPSTATE *chip = data; struct CHIPDESC *desc = chiplist + chip->type; - + daemonize("%s",i2c_clientname(&chip->c)); allow_signal(SIGTERM); dprintk("%s: thread started\n", i2c_clientname(&chip->c)); @@ -292,10 +292,10 @@ /* don't do anything for radio or if mode != auto */ if (chip->norm == VIDEO_MODE_RADIO || chip->mode != 0) continue; - + /* have a look what's going on */ desc->checkmode(chip); - + /* schedule next check */ mod_timer(&chip->wt, jiffies+2*HZ); } @@ -352,14 +352,14 @@ static int tda9840_getmode(struct CHIPSTATE *chip) { int val, mode; - + val = chip_read(chip); mode = VIDEO_SOUND_MONO; if (val & TDA9840_DS_DUAL) mode |= VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; if (val & TDA9840_ST_STEREO) mode |= VIDEO_SOUND_STEREO; - + dprintk ("tda9840_getmode(): raw chip read: %d, return: %d\n", val, mode); return mode; @@ -369,7 +369,7 @@ { int update = 1; int t = chip->shadow.bytes[TDA9840_SW + 1] & ~0x7e; - + switch (mode) { case VIDEO_SOUND_MONO: t |= TDA9840_MONO; @@ -419,7 +419,7 @@ * in 1dB steps - mute is 0x27 */ -/* 0x02 - BA in TDA9855 */ +/* 0x02 - BA in TDA9855 */ /* lower 5 bits control bass gain from -12dB (0x06) to 16.5dB (0x19) * in .5dB steps - 0 is 0x0E */ @@ -433,7 +433,7 @@ /* Unique to TDA9855: */ /* 4 bits << 2 control subwoofer/surround gain from -14db (0x1) to 14db (0xf) * in 3dB steps - mute is 0x0 */ - + /* Unique to TDA9850: */ /* lower 4 bits control stereo noise threshold, over which stereo turns off * set to values of 0x00 through 0x0f for Ster1 through Ster16 */ @@ -446,7 +446,7 @@ #define TDA9855_LOUD 1<<5 /* Loudness, 1==off */ #define TDA9855_SUR 1<<3 /* Surround / Subwoofer 1==.5(L-R) 0==.5(L+R) */ /* Bits 0 to 3 select various combinations - * of line in and line out, only the + * of line in and line out, only the * interesting ones are defined */ #define TDA9855_EXT 1<<2 /* Selects inputs LIR and LIL. Pins 41 & 12 */ #define TDA9855_INT 0 /* Selects inputs LOR and LOL. (internal) */ @@ -499,7 +499,7 @@ { int mode; - mode = ((TDA985x_STP | TDA985x_SAPP) & + mode = ((TDA985x_STP | TDA985x_SAPP) & chip_read(chip)) >> 4; /* Add mono mode regardless of SAP and stereo */ /* Allows forced mono */ @@ -510,7 +510,7 @@ { int update = 1; int c6 = chip->shadow.bytes[TDA985x_C6+1] & 0x3f; - + switch (mode) { case VIDEO_SOUND_MONO: c6 |= TDA985x_MONO; @@ -538,7 +538,7 @@ #define TDA9873_AD 0x01 /* Adjust */ #define TDA9873_PT 0x02 /* Port */ -/* Subaddress 0x00: Switching Data +/* Subaddress 0x00: Switching Data * B7..B0: * * B1, B0: Input source selection @@ -552,10 +552,10 @@ #define TDA9873_EXT_MONO 1 /* B3, B2: output signal select - * B4 : transmission mode + * B4 : transmission mode * 0, 0, 1 Mono * 1, 0, 0 Stereo - * 1, 1, 1 Stereo (reversed channel) + * 1, 1, 1 Stereo (reversed channel) * 0, 0, 0 Dual AB * 0, 0, 1 Dual AA * 0, 1, 0 Dual BB @@ -587,7 +587,7 @@ #define TDA9873_STEREO_ADJ 0x06 /* 0dB gain */ -/* Bits C6..C4 control FM stantard +/* Bits C6..C4 control FM stantard * C6, C5, C4 * 0, 0, 0 B/G (PAL FM) * 0, 0, 1 M @@ -609,7 +609,7 @@ #define TDA9873_IDR_FAST 1 << 7 -/* Subaddress 0x02: Port data */ +/* Subaddress 0x02: Port data */ /* E1, E0 free programmable ports P1/P2 0, 0 both ports low @@ -632,11 +632,11 @@ */ #define TDA9873_MOUT_MONO 0 #define TDA9873_MOUT_FMONO 0 -#define TDA9873_MOUT_DUALA 0 -#define TDA9873_MOUT_DUALB 1 << 3 -#define TDA9873_MOUT_ST 1 << 4 +#define TDA9873_MOUT_DUALA 0 +#define TDA9873_MOUT_DUALB 1 << 3 +#define TDA9873_MOUT_ST 1 << 4 #define TDA9873_MOUT_EXTM (1 << 4 ) & (1 << 3) -#define TDA9873_MOUT_EXTL 1 << 5 +#define TDA9873_MOUT_EXTL 1 << 5 #define TDA9873_MOUT_EXTR (1 << 5 ) & (1 << 3) #define TDA9873_MOUT_EXTLR (1 << 5 ) & (1 << 4) #define TDA9873_MOUT_MUTE (1 << 5 ) & (1 << 4) & (1 << 3) @@ -670,13 +670,13 @@ dprintk("tda9873_setmode(): external input\n"); return; } - + dprintk("tda9873_setmode(): chip->shadow.bytes[%d] = %d\n", TDA9873_SW+1, chip->shadow.bytes[TDA9873_SW+1]); dprintk("tda9873_setmode(): sw_data = %d\n", sw_data); switch (mode) { case VIDEO_SOUND_MONO: - sw_data |= TDA9873_TR_MONO; + sw_data |= TDA9873_TR_MONO; break; case VIDEO_SOUND_STEREO: sw_data |= TDA9873_TR_STEREO; @@ -871,7 +871,7 @@ if(nsr & 0x02) /* NSR.S/MB=1 */ mode |= VIDEO_SOUND_STEREO; #endif - if(nsr & 0x01) /* NSR.D/SB=1 */ + if(nsr & 0x01) /* NSR.D/SB=1 */ mode |= VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; } else { if(dsr & 0x02) /* DSR.IDSTE=1 */ @@ -1082,7 +1082,7 @@ static void tda8425_setmode(struct CHIPSTATE *chip, int mode) { int s1 = chip->shadow.bytes[TDA8425_S1+1] & 0xe1; - + if (mode & VIDEO_SOUND_LANG1) { s1 |= TDA8425_S1_ML_SOUND_A; s1 |= TDA8425_S1_STEREO_PSEUDO; @@ -1090,10 +1090,10 @@ } else if (mode & VIDEO_SOUND_LANG2) { s1 |= TDA8425_S1_ML_SOUND_B; s1 |= TDA8425_S1_STEREO_PSEUDO; - + } else { s1 |= TDA8425_S1_ML_STEREO; - + if (mode & VIDEO_SOUND_MONO) s1 |= TDA8425_S1_STEREO_MONO; if (mode & VIDEO_SOUND_STEREO) @@ -1152,7 +1152,7 @@ static int ta8874z_getmode(struct CHIPSTATE *chip) { int val, mode; - + val = chip_read(chip); mode = VIDEO_SOUND_MONO; if (val & TA8874Z_B1){ @@ -1264,7 +1264,7 @@ .inputmute = TDA9873_MUTE | TDA9873_AUTOMUTE, .inputmap = {0xa0, 0xa2, 0xa0, 0xa0, 0xc0}, .inputmask = TDA9873_INP_MASK|TDA9873_MUTE|TDA9873_AUTOMUTE, - + }, { .name = "tda9874h/a", @@ -1497,6 +1497,10 @@ static int chip_probe(struct i2c_adapter *adap) { + /* don't attach on saa7146 based cards, + because dedicated drivers are used */ + if ((adap->id & I2C_ALGO_SAA7146)) + return 0; #ifdef I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return i2c_probe(adap, &addr_data, chip_attach); @@ -1522,7 +1526,7 @@ wake_up_interruptible(&chip->wq); wait_for_completion(&chip->texit); } - + i2c_detach_client(&chip->c); kfree(chip); return 0; @@ -1587,7 +1591,7 @@ case VIDIOCSAUDIO: { struct video_audio *va = arg; - + if (desc->flags & CHIP_HAS_VOLUME) { chip->left = (min(65536 - va->balance,32768) * va->volume) / 32768; @@ -1613,7 +1617,7 @@ case VIDIOCSCHAN: { struct video_channel *vc = arg; - + dprintk(KERN_DEBUG "tvaudio: VIDIOCSCHAN\n"); chip->norm = vc->norm; break; diff -Nru a/drivers/media/video/tvmixer.c b/drivers/media/video/tvmixer.c --- a/drivers/media/video/tvmixer.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/media/video/tvmixer.c 2004-11-10 17:19:06 -08:00 @@ -82,7 +82,7 @@ if (NULL == client) return -ENODEV; - + if (cmd == SOUND_MIXER_INFO) { mixer_info info; strlcpy(info.id, "tv card", sizeof(info.id)); @@ -148,7 +148,7 @@ va.volume) / 32768; ret = v4l_to_mix2(left,right); break; - + case MIXER_WRITE(SOUND_MIXER_BASS): va.bass = mix_to_v4l(val); client->driver->command(client,VIDIOCSAUDIO,&va); @@ -324,7 +324,7 @@ devices[i].dev = client; printk("tvmixer: %s (%s) registered with minor %d\n", client->name,client->adapter->name,minor); - + return 0; } @@ -333,7 +333,7 @@ static int __init tvmixer_init_module(void) { int i; - + for (i = 0; i < DEV_MAX; i++) devices[i].minor = -1; @@ -343,7 +343,7 @@ static void __exit tvmixer_cleanup_module(void) { int i; - + i2c_del_driver(&driver); for (i = 0; i < DEV_MAX; i++) { if (devices[i].minor != -1) { diff -Nru a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c --- a/drivers/media/video/v4l1-compat.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/video/v4l1-compat.c 2004-11-10 17:19:04 -08:00 @@ -116,7 +116,7 @@ if (value && qctrl2.type == V4L2_CTRL_TYPE_BOOLEAN) value = 65535; ctrl2.id = qctrl2.id; - ctrl2.value = + ctrl2.value = (value * (qctrl2.maximum - qctrl2.minimum) + 32767) / 65535; @@ -256,7 +256,7 @@ memset(&desc2,0,sizeof(desc2)); memset(&fmt2,0,sizeof(fmt2)); - + desc2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (0 != drv(inode,file,VIDIOC_ENUM_FMT, &desc2)) goto done; @@ -326,7 +326,7 @@ err = 0; } - memcpy(cap->name, cap2->card, + memcpy(cap->name, cap2->card, min(sizeof(cap->name), sizeof(cap2->card))); cap->name[sizeof(cap->name) - 1] = 0; if (cap2->capabilities & V4L2_CAP_VIDEO_CAPTURE) @@ -383,7 +383,7 @@ if (0 != fbuf2.fmt.bytesperline) buffer->bytesperline = fbuf2.fmt.bytesperline; else { - buffer->bytesperline = + buffer->bytesperline = (buffer->width * buffer->depth + 7) & 7; buffer->bytesperline >>= 3; } @@ -633,7 +633,7 @@ err = drv(inode, file, VIDIOC_G_FMT, fmt2); if (err < 0) dprintk("VIDIOCSPICT / VIDIOC_G_FMT: %d\n",err); - if (fmt2->fmt.pix.pixelformat != + if (fmt2->fmt.pix.pixelformat != palette_to_pixelformat(pict->palette)) { fmt2->fmt.pix.pixelformat = palette_to_pixelformat( pict->palette); @@ -807,7 +807,7 @@ memset(&aud2,0,sizeof(aud2)); memset(&tun2,0,sizeof(tun2)); - + aud2.index = aud->audio; err = drv(inode, file, VIDIOC_S_AUDIO, &aud2); if (err < 0) { @@ -815,7 +815,7 @@ break; } - set_v4l_control(inode, file, V4L2_CID_AUDIO_VOLUME, + set_v4l_control(inode, file, V4L2_CID_AUDIO_VOLUME, aud->volume, drv); set_v4l_control(inode, file, V4L2_CID_AUDIO_BASS, aud->bass, drv); @@ -863,16 +863,16 @@ fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL); memset(&buf2,0,sizeof(buf2)); memset(fmt2,0,sizeof(*fmt2)); - + fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; err = drv(inode, file, VIDIOC_G_FMT, fmt2); if (err < 0) { dprintk("VIDIOCMCAPTURE / VIDIOC_G_FMT: %d\n",err); break; } - if (mm->width != fmt2->fmt.pix.width || + if (mm->width != fmt2->fmt.pix.width || mm->height != fmt2->fmt.pix.height || - palette_to_pixelformat(mm->format) != + palette_to_pixelformat(mm->format) != fmt2->fmt.pix.pixelformat) {/* New capture format... */ fmt2->fmt.pix.width = mm->width; @@ -955,11 +955,11 @@ case VIDIOCGVBIFMT: /* query VBI data capture format */ { struct vbi_format *fmt = arg; - + fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL); memset(fmt2, 0, sizeof(*fmt2)); fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE; - + err = drv(inode, file, VIDIOC_G_FMT, fmt2); if (err < 0) { dprintk("VIDIOCGVBIFMT / VIDIOC_G_FMT: %d\n", err); @@ -979,7 +979,7 @@ case VIDIOCSVBIFMT: { struct vbi_format *fmt = arg; - + fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL); memset(fmt2, 0, sizeof(*fmt2)); @@ -987,10 +987,10 @@ fmt2->fmt.vbi.samples_per_line = fmt->samples_per_line; fmt2->fmt.vbi.sampling_rate = fmt->sampling_rate; fmt2->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY; - fmt2->fmt.vbi.start[0] = fmt->start[0]; - fmt2->fmt.vbi.count[0] = fmt->count[0]; - fmt2->fmt.vbi.start[1] = fmt->start[1]; - fmt2->fmt.vbi.count[1] = fmt->count[1]; + fmt2->fmt.vbi.start[0] = fmt->start[0]; + fmt2->fmt.vbi.count[0] = fmt->count[0]; + fmt2->fmt.vbi.start[1] = fmt->start[1]; + fmt2->fmt.vbi.count[1] = fmt->count[1]; fmt2->fmt.vbi.flags = fmt->flags; err = drv(inode, file, VIDIOC_TRY_FMT, fmt2); if (err < 0) { @@ -1014,7 +1014,7 @@ dprintk("VIDIOCSVBIFMT / VIDIOC_S_FMT: %d\n", err); break; } - + default: err = -ENOIOCTLCMD; break; diff -Nru a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c --- a/drivers/media/video/v4l2-common.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/media/video/v4l2-common.c 2004-11-10 17:19:06 -08:00 @@ -36,7 +36,7 @@ /* * Video4linux 1/2 integration by Justin Schoeman * - * 2.4 PROCFS support ported from 2.4 kernels by + * 2.4 PROCFS support ported from 2.4 kernels by * Iñaki García Etxebarria * Makefile fix by "W. Michael Petullo" * 2.4 devfs support ported from 2.4 kernels by @@ -84,14 +84,14 @@ * Video Standard Operations (contributed by Michael Schimek) */ -/* This is the recommended method to deal with the framerate fields. More +/* This is the recommended method to deal with the framerate fields. More sophisticated drivers will access the fields directly. */ unsigned int v4l2_video_std_fps(struct v4l2_standard *vs) -{ +{ if (vs->frameperiod.numerator > 0) - return (((vs->frameperiod.denominator << 8) / - vs->frameperiod.numerator) + + return (((vs->frameperiod.denominator << 8) / + vs->frameperiod.numerator) + (1 << 7)) / (1 << 8); return 0; } @@ -132,7 +132,7 @@ memset(global,0,sizeof(*global)); return 0; } - + int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, enum v4l2_priority new) { diff -Nru a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c --- a/drivers/media/video/video-buf.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/media/video/video-buf.c 2004-11-10 17:19:04 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: video-buf.c,v 1.12 2004/10/11 14:53:13 kraxel Exp $ + * $Id: video-buf.c,v 1.13 2004/10/13 10:39:00 kraxel Exp $ * * generic helper functions for video4linux capture buffers, to handle * memory management and PCI DMA. Right now bttv + saa7134 use it. @@ -9,7 +9,7 @@ * into PAGE_SIZE chunks). They also assume the driver does not need * to touch the video data (thus it is probably not useful for USB 1.1 * as data often must be uncompressed by the drivers). - * + * * (c) 2001-2004 Gerd Knorr [SUSE Labs] * * This program is free software; you can redistribute it and/or modify @@ -66,7 +66,7 @@ sglist[i].length = PAGE_SIZE; } return sglist; - + err: kfree(sglist); return NULL; @@ -193,7 +193,7 @@ { MAGIC_CHECK(dma->magic,MAGIC_DMABUF); BUG_ON(0 == dma->nr_pages); - + if (dma->pages) { dma->sglist = videobuf_pages_to_sg(dma->pages, dma->nr_pages, dma->offset); @@ -289,7 +289,7 @@ { int retval = 0; DECLARE_WAITQUEUE(wait, current); - + MAGIC_CHECK(vb->magic,MAGIC_BUFFER); add_wait_queue(&vb->done, &wait); while (vb->state == STATE_ACTIVE || vb->state == STATE_QUEUED) { @@ -355,7 +355,7 @@ err = videobuf_dma_pci_map(pci,&vb->dma); if (0 != err) return err; - + return 0; } @@ -383,11 +383,11 @@ INIT_LIST_HEAD(&q->stream); } -int +int videobuf_queue_is_busy(struct videobuf_queue *q) { int i; - + if (q->streaming) { dprintk(1,"busy: streaming active\n"); return 1; @@ -636,7 +636,7 @@ retval = q->ops->buf_prepare(priv,buf,field); if (0 != retval) goto done; - + list_add_tail(&buf->stream,&q->stream); if (q->streaming) { spin_lock_irqsave(q->irqlock,flags); @@ -644,7 +644,7 @@ spin_unlock_irqrestore(q->irqlock,flags); } retval = 0; - + done: up(&q->lock); return retval; @@ -656,7 +656,7 @@ { struct videobuf_buffer *buf; int retval; - + down(&q->lock); retval = -EBUSY; if (q->reading) @@ -697,7 +697,7 @@ struct list_head *list; unsigned long flags; int retval; - + down(&q->lock); retval = -EBUSY; if (q->reading) @@ -756,7 +756,7 @@ retval = q->ops->buf_prepare(priv,q->read_buf,field); if (0 != retval) goto done; - + /* start capture & wait */ spin_lock_irqsave(q->irqlock,flags); q->ops->buf_queue(priv,q->read_buf); @@ -890,7 +890,7 @@ void videobuf_read_stop(void *priv, struct videobuf_queue *q) { int i; - + videobuf_queue_cancel(priv,q); INIT_LIST_HEAD(&q->stream); for (i = 0; i < VIDEO_MAX_FRAME; i++) { @@ -910,7 +910,7 @@ unsigned int *fc, bytes; int err, retval; unsigned long flags; - + dprintk(2,"%s\n",__FUNCTION__); down(&q->lock); retval = -EBUSY; @@ -950,7 +950,7 @@ *fc = q->read_buf->field_count >> 1; dprintk(1,"vbihack: %d\n",*fc); } - + /* copy stuff */ bytes = count; if (bytes > q->read_buf->size - q->read_off) @@ -1063,7 +1063,7 @@ continue; map->q->bufs[i]->map = NULL; map->q->bufs[i]->baddr = 0; - map->q->ops->buf_release(vma->vm_file,map->q->bufs[i]); + map->q->ops->buf_release(vma->vm_file->private_data,map->q->bufs[i]); } kfree(map); } diff -Nru a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c --- a/drivers/message/i2o/iop.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/message/i2o/iop.c 2004-11-10 17:19:03 -08:00 @@ -810,7 +810,7 @@ writel(c->unit + 2, &msg->body[0]); writel(0, &msg->body[1]); - writel(0x54000000 | i2o_systab.phys, &msg->body[2]); + writel(0x54000000 | i2o_systab.len, &msg->body[2]); writel(i2o_systab.phys, &msg->body[3]); writel(0x54000000 | sb->current_mem_size, &msg->body[4]); writel(sb->current_mem_base, &msg->body[5]); diff -Nru a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c --- a/drivers/misc/ibmasm/ibmasmfs.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/misc/ibmasm/ibmasmfs.c 2004-11-10 17:19:06 -08:00 @@ -173,13 +173,8 @@ { struct dentry *dentry; struct inode *inode; - struct qstr qname; - qname.name = name; - qname.len = strlen (name); - qname.hash = full_name_hash(name, qname.len); - - dentry = d_alloc(parent, &qname); + dentry = d_alloc_name(parent, name); if (!dentry) return NULL; @@ -202,12 +197,8 @@ { struct dentry *dentry; struct inode *inode; - struct qstr qname; - qname.name = name; - qname.len = strlen (name); - qname.hash = full_name_hash(name, qname.len); - dentry = d_alloc(parent, &qname); + dentry = d_alloc_name(parent, name); if (!dentry) return NULL; diff -Nru a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c --- a/drivers/mmc/mmc_block.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/mmc/mmc_block.c 2004-11-10 17:19:07 -08:00 @@ -200,6 +200,9 @@ } brq.mrq.stop = brq.data.blocks > 1 ? &brq.stop : NULL; + brq.data.sg = mq->sg; + brq.data.sg_len = blk_rq_map_sg(req->q, req, brq.data.sg); + mmc_wait_for_req(card->host, &brq.mrq); if (brq.cmd.error) { printk(KERN_ERR "%s: error %d sending read/write command\n", diff -Nru a/drivers/mmc/mmc_queue.c b/drivers/mmc/mmc_queue.c --- a/drivers/mmc/mmc_queue.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/mmc/mmc_queue.c 2004-11-10 17:19:05 -08:00 @@ -80,7 +80,7 @@ set_current_state(TASK_INTERRUPTIBLE); if (!blk_queue_plugged(q)) mq->req = req = elv_next_request(q); - spin_unlock(q->queue_lock); + spin_unlock_irq(q->queue_lock); if (!req) { if (mq->flags & MMC_QUEUE_EXIT) @@ -147,19 +147,31 @@ mq->queue->queuedata = mq; mq->req = NULL; + mq->sg = kmalloc(sizeof(struct scatterlist) * host->max_phys_segs, + GFP_KERNEL); + if (!mq->sg) { + ret = -ENOMEM; + goto cleanup; + } + init_completion(&mq->thread_complete); init_waitqueue_head(&mq->thread_wq); init_MUTEX(&mq->thread_sem); ret = kernel_thread(mmc_queue_thread, mq, CLONE_KERNEL); - if (ret < 0) { - blk_cleanup_queue(mq->queue); - } else { + if (ret >= 0) { wait_for_completion(&mq->thread_complete); init_completion(&mq->thread_complete); ret = 0; + goto out; } + cleanup: + kfree(mq->sg); + mq->sg = NULL; + + blk_cleanup_queue(mq->queue); + out: return ret; } EXPORT_SYMBOL(mmc_init_queue); @@ -169,6 +181,10 @@ mq->flags |= MMC_QUEUE_EXIT; wake_up(&mq->thread_wq); wait_for_completion(&mq->thread_complete); + + kfree(mq->sg); + mq->sg = NULL; + blk_cleanup_queue(mq->queue); mq->card = NULL; diff -Nru a/drivers/mmc/mmc_queue.h b/drivers/mmc/mmc_queue.h --- a/drivers/mmc/mmc_queue.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/mmc/mmc_queue.h 2004-11-10 17:19:02 -08:00 @@ -15,6 +15,7 @@ int (*issue_fn)(struct mmc_queue *, struct request *); void *data; struct request_queue *queue; + struct scatterlist *sg; }; struct mmc_io_request { diff -Nru a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c --- a/drivers/mmc/mmci.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/mmc/mmci.c 2004-11-10 17:19:05 -08:00 @@ -69,7 +69,7 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) { unsigned int datactrl, timeout, irqmask; - void *base; + void __iomem *base; DBG(host, "blksz %04x blks %04x flags %08x\n", 1 << data->blksz_bits, data->blocks, data->flags); @@ -108,7 +108,7 @@ static void mmci_start_command(struct mmci_host *host, struct mmc_command *cmd, u32 c) { - void *base = host->base; + void __iomem *base = host->base; DBG(host, "op %02x arg %08x flags %08x\n", cmd->opcode, cmd->arg, cmd->flags); @@ -169,7 +169,7 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd, unsigned int status) { - void *base = host->base; + void __iomem *base = host->base; host->cmd = NULL; @@ -193,7 +193,7 @@ static int mmci_pio_read(struct mmci_host *host, char *buffer, unsigned int remain) { - void *base = host->base; + void __iomem *base = host->base; char *ptr = buffer; u32 status; @@ -222,7 +222,7 @@ static int mmci_pio_write(struct mmci_host *host, char *buffer, unsigned int remain, u32 status) { - void *base = host->base; + void __iomem *base = host->base; char *ptr = buffer; do { @@ -251,7 +251,7 @@ static irqreturn_t mmci_pio_irq(int irq, void *dev_id, struct pt_regs *regs) { struct mmci_host *host = dev_id; - void *base = host->base; + void __iomem *base = host->base; u32 status; status = readl(base + MMCISTATUS); @@ -501,7 +501,7 @@ * We can do SGIO */ mmc->max_hw_segs = 16; - mmc->max_phys_segs = 16; + mmc->max_phys_segs = NR_SG; /* * Since we only have a 16-bit data length register, we must diff -Nru a/drivers/mmc/mmci.h b/drivers/mmc/mmci.h --- a/drivers/mmc/mmci.h 2004-11-10 17:19:07 -08:00 +++ b/drivers/mmc/mmci.h 2004-11-10 17:19:07 -08:00 @@ -120,7 +120,7 @@ struct clk; struct mmci_host { - void *base; + void __iomem *base; struct mmc_request *mrq; struct mmc_command *cmd; struct mmc_data *data; @@ -139,7 +139,6 @@ struct timer_list timer; unsigned int oldstat; - struct scatterlist sg[NR_SG]; unsigned int sg_len; /* pio stuff */ @@ -150,14 +149,11 @@ static inline void mmci_init_sg(struct mmci_host *host, struct mmc_data *data) { - struct scatterlist *sg = host->sg; - struct request *req = data->req; - /* * Ideally, we want the higher levels to pass us a scatter list. */ - host->sg_len = blk_rq_map_sg(req->q, req, sg); - host->sg_ptr = sg; + host->sg_len = data->sg_len; + host->sg_ptr = data->sg; host->sg_off = 0; } diff -Nru a/drivers/mmc/pxamci.c b/drivers/mmc/pxamci.c --- a/drivers/mmc/pxamci.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/mmc/pxamci.c 2004-11-10 17:19:05 -08:00 @@ -44,6 +44,10 @@ #define DBG(x...) do { } while (0) #endif +#define DRIVER_NAME "pxa2xx-mci" + +#define NR_SG 1 + struct pxamci_host { struct mmc_host *mmc; spinlock_t lock; @@ -63,9 +67,8 @@ dma_addr_t sg_dma; struct pxa_dma_desc *sg_cpu; + unsigned int dma_len; - dma_addr_t dma_buf; - unsigned int dma_size; unsigned int dma_dir; }; @@ -122,10 +125,9 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data) { unsigned int nob = data->blocks; - unsigned int timeout, size; - dma_addr_t dma; + unsigned int timeout; u32 dcmd; - int i; + int i, len; host->data = data; @@ -152,35 +154,22 @@ dcmd |= DCMD_BURST32 | DCMD_WIDTH1; - host->dma_size = data->blocks << data->blksz_bits; - host->dma_buf = dma_map_single(mmc_dev(host->mmc), data->req->buffer, - host->dma_size, host->dma_dir); - - for (i = 0, size = host->dma_size, dma = host->dma_buf; size; i++) { - u32 len = size; - - if (len > DCMD_LENGTH) - len = 0x1000; + host->dma_len = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, + host->dma_dir); + for (i = 0; i < host->dma_len; i++) { if (data->flags & MMC_DATA_READ) { host->sg_cpu[i].dsadr = host->res->start + MMC_RXFIFO; - host->sg_cpu[i].dtadr = dma; + host->sg_cpu[i].dtadr = sg_dma_address(&data->sg[i]); } else { - host->sg_cpu[i].dsadr = dma; + host->sg_cpu[i].dsadr = sg_dma_address(&data->sg[i]); host->sg_cpu[i].dtadr = host->res->start + MMC_TXFIFO; } - host->sg_cpu[i].dcmd = dcmd | len; - - dma += len; - size -= len; - - if (size) { - host->sg_cpu[i].ddadr = host->sg_dma + (i + 1) * - sizeof(struct pxa_dma_desc); - } else { - host->sg_cpu[i].ddadr = DDADR_STOP; - } + host->sg_cpu[i].dcmd = dcmd | sg_dma_len(&data->sg[i]); + host->sg_cpu[i].ddadr = host->sg_dma + (i + 1) * + sizeof(struct pxa_dma_desc); } + host->sg_cpu[host->dma_len - 1].ddadr = DDADR_STOP; wmb(); DDADR(host->dma) = host->sg_dma; @@ -276,8 +265,8 @@ return 0; DCSR(host->dma) = 0; - dma_unmap_single(mmc_dev(host->mmc), host->dma_buf, host->dma_size, - host->dma_dir); + dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len, + host->dma_dir); if (stat & STAT_READ_TIME_OUT) data->error = MMC_ERR_TIMEOUT; @@ -429,7 +418,7 @@ if (!r || irq == NO_IRQ) return -ENXIO; - r = request_mem_region(r->start, SZ_4K, "PXAMCI"); + r = request_mem_region(r->start, SZ_4K, DRIVER_NAME); if (!r) return -EBUSY; @@ -443,6 +432,17 @@ mmc->f_min = 312500; mmc->f_max = 20000000; + /* + * We can do SG-DMA, but we don't because we never know how much + * data we successfully wrote to the card. + */ + mmc->max_phys_segs = NR_SG; + + /* + * Our hardware DMA can handle a maximum of one page per SG entry. + */ + mmc->max_seg_size = PAGE_SIZE; + host = mmc_priv(mmc); host->mmc = mmc; host->dma = -1; @@ -482,13 +482,14 @@ pxa_gpio_mode(GPIO8_MMCCS0_MD); pxa_set_cken(CKEN12_MMC, 1); - host->dma = pxa_request_dma("PXAMCI", DMA_PRIO_LOW, pxamci_dma_irq, host); + host->dma = pxa_request_dma(DRIVER_NAME, DMA_PRIO_LOW, + pxamci_dma_irq, host); if (host->dma < 0) { ret = -EBUSY; goto out; } - ret = request_irq(host->irq, pxamci_irq, 0, "PXAMCI", host); + ret = request_irq(host->irq, pxamci_irq, 0, DRIVER_NAME, host); if (ret) goto out; @@ -579,7 +580,7 @@ #endif static struct device_driver pxamci_driver = { - .name = "pxa2xx-mci", + .name = DRIVER_NAME, .bus = &platform_bus_type, .probe = pxamci_probe, .remove = pxamci_remove, diff -Nru a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c --- a/drivers/mtd/maps/dc21285.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/mtd/maps/dc21285.c 2004-11-10 17:19:04 -08:00 @@ -5,7 +5,7 @@ * * This code is GPL * - * $Id: dc21285.c,v 1.21 2004/09/16 23:27:13 gleixner Exp $ + * $Id: dc21285.c,v 1.22 2004/11/01 13:39:21 rmk Exp $ */ #include #include @@ -32,7 +32,8 @@ * is unpredictible. So we have a 25us penalty per * write access. */ -static void nw_en_write(void) { +static void nw_en_write(void) +{ extern spinlock_t gpio_lock; unsigned long flags; @@ -55,53 +56,60 @@ static map_word dc21285_read8(struct map_info *map, unsigned long ofs) { - return *(uint8_t*)(map->map_priv_1 + ofs); + map_word val; + val.x[0] = *(uint8_t*)(map->virt + ofs); + return val; } static map_word dc21285_read16(struct map_info *map, unsigned long ofs) { - return *(uint16_t*)(map->map_priv_1 + ofs); + map_word val; + val.x[0] = *(uint16_t*)(map->virt + ofs); + return val; } static map_word dc21285_read32(struct map_info *map, unsigned long ofs) { - return *(uint32_t*)(map->map_priv_1 + ofs); + map_word val; + val.x[0] = *(uint32_t*)(map->virt + ofs); + return val; } static void dc21285_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len) { - memcpy(to, (void*)(map->map_priv_1 + from), len); + memcpy(to, (void*)(map->virt + from), len); } -static void dc21285_write(struct map_info *map, map_word d, unsigned long adr) +static void dc21285_write8(struct map_info *map, const map_word d, unsigned long adr) { if (machine_is_netwinder()) nw_en_write(); *CSR_ROMWRITEREG = adr & 3; adr &= ~3; - *(uint8_t*)(map->map_priv_1 + adr) = d.x[0]; + *(uint8_t*)(map->virt + adr) = d.x[0]; } -static void dc21285_write16(struct map_info *map, map_word d, unsigned long adr) +static void dc21285_write16(struct map_info *map, const map_word d, unsigned long adr) { if (machine_is_netwinder()) nw_en_write(); *CSR_ROMWRITEREG = adr & 3; adr &= ~3; - *(uint16_t*)(map->map_priv_1 + adr) = d.x[0]; + *(uint16_t*)(map->virt + adr) = d.x[0]; } -static void dc21285_write32(struct map_info *map, map_word d, unsigned long adr) +static void dc21285_write32(struct map_info *map, const map_word d, unsigned long adr) { if (machine_is_netwinder()) nw_en_write(); - *(uint32_t*)(map->map_priv_1 + adr) = d.x[0]; + *(uint32_t*)(map->virt + adr) = d.x[0]; } static void dc21285_copy_to_32(struct map_info *map, unsigned long to, const void *from, ssize_t len) { while (len > 0) { - uint32_t d = *((uint32_t*)from)++; + map_word d; + d.x[0] = *((uint32_t*)from)++; dc21285_write32(map, d, to); to += 4; len -= 4; @@ -111,7 +119,8 @@ static void dc21285_copy_to_16(struct map_info *map, unsigned long to, const void *from, ssize_t len) { while (len > 0) { - uint16_t d = *((uint16_t*)from)++; + map_word d; + d.x[0] = *((uint16_t*)from)++; dc21285_write16(map, d, to); to += 2; len -= 2; @@ -120,7 +129,8 @@ static void dc21285_copy_to_8(struct map_info *map, unsigned long to, const void *from, ssize_t len) { - uint8_t d = *((uint8_t*)from)++; + map_word d; + d.x[0] = *((uint8_t*)from)++; dc21285_write8(map, d, to); to++; len--; @@ -135,8 +145,8 @@ /* Partition stuff */ -static struct mtd_partition *dc21285_parts; #ifdef CONFIG_MTD_PARTITIONS +static struct mtd_partition *dc21285_parts; static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; #endif @@ -163,10 +173,10 @@ break; case SA110_CNTL_ROMWIDTH_32: dc21285_map.bankwidth = 4; - break; dc21285_map.read = dc21285_read32; dc21285_map.write = dc21285_write32; dc21285_map.copy_to = dc21285_copy_to_32; + break; default: printk (KERN_ERR "DC21285 flash: undefined bankwidth\n"); return -ENXIO; @@ -175,8 +185,8 @@ dc21285_map.bankwidth*8); /* Let's map the flash area */ - dc21285_map.map_priv_1 = (void __iomem *)ioremap(DC21285_FLASH, 16*1024*1024); - if (!dc21285_map.map_priv_1) { + dc21285_map.virt = ioremap(DC21285_FLASH, 16*1024*1024); + if (!dc21285_map.virt) { printk("Failed to ioremap\n"); return -EIO; } @@ -188,14 +198,14 @@ } if (!dc21285_mtd) { - iounmap((void *)dc21285_map.map_priv_1); + iounmap(dc21285_map.virt); return -ENXIO; } dc21285_mtd->owner = THIS_MODULE; #ifdef CONFIG_MTD_PARTITIONS - nrparts = parse_mtd_partitions(dc21285_mtd, probes, &dc21285_parts, (void *)0); + nrparts = parse_mtd_partitions(dc21285_mtd, probes, &dc21285_parts, 0); if (nrparts > 0) add_mtd_partitions(dc21285_mtd, dc21285_parts, nrparts); else @@ -231,7 +241,7 @@ del_mtd_device(dc21285_mtd); map_destroy(dc21285_mtd); - iounmap((void *)dc21285_map.map_priv_1); + iounmap(dc21285_map.virt); } module_init(init_dc21285); diff -Nru a/drivers/mtd/maps/integrator-flash-v24.c b/drivers/mtd/maps/integrator-flash-v24.c --- a/drivers/mtd/maps/integrator-flash-v24.c 2004-11-10 17:19:06 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,258 +0,0 @@ -/*====================================================================== - - drivers/mtd/maps/armflash.c: ARM Flash Layout/Partitioning - - Copyright (C) 2000 ARM Limited - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - This is access code for flashes using ARM's flash partitioning - standards. - - $Id: integrator-flash-v24.c,v 1.13 2004/07/12 21:59:44 dwmw2 Exp $ - -======================================================================*/ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -// board specific stuff - sorry, it should be in arch/arm/mach-*. -#ifdef CONFIG_ARCH_INTEGRATOR - -#define FLASH_BASE INTEGRATOR_FLASH_BASE -#define FLASH_SIZE INTEGRATOR_FLASH_SIZE - -#define FLASH_PART_SIZE 0x400000 - -#define SC_CTRLC (IO_ADDRESS(INTEGRATOR_SC_BASE) + INTEGRATOR_SC_CTRLC_OFFSET) -#define SC_CTRLS (IO_ADDRESS(INTEGRATOR_SC_BASE) + INTEGRATOR_SC_CTRLS_OFFSET) -#define EBI_CSR1 (IO_ADDRESS(INTEGRATOR_EBI_BASE) + INTEGRATOR_EBI_CSR1_OFFSET) -#define EBI_LOCK (IO_ADDRESS(INTEGRATOR_EBI_BASE) + INTEGRATOR_EBI_LOCK_OFFSET) - -/* - * Initialise the flash access systems: - * - Disable VPP - * - Assert WP - * - Set write enable bit in EBI reg - */ -static void armflash_flash_init(void) -{ - unsigned int tmp; - - __raw_writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, SC_CTRLC); - - tmp = __raw_readl(EBI_CSR1) | INTEGRATOR_EBI_WRITE_ENABLE; - __raw_writel(tmp, EBI_CSR1); - - if (!(__raw_readl(EBI_CSR1) & INTEGRATOR_EBI_WRITE_ENABLE)) { - __raw_writel(0xa05f, EBI_LOCK); - __raw_writel(tmp, EBI_CSR1); - __raw_writel(0, EBI_LOCK); - } -} - -/* - * Shutdown the flash access systems: - * - Disable VPP - * - Assert WP - * - Clear write enable bit in EBI reg - */ -static void armflash_flash_exit(void) -{ - unsigned int tmp; - - __raw_writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, SC_CTRLC); - - /* - * Clear the write enable bit in system controller EBI register. - */ - tmp = __raw_readl(EBI_CSR1) & ~INTEGRATOR_EBI_WRITE_ENABLE; - __raw_writel(tmp, EBI_CSR1); - - if (__raw_readl(EBI_CSR1) & INTEGRATOR_EBI_WRITE_ENABLE) { - __raw_writel(0xa05f, EBI_LOCK); - __raw_writel(tmp, EBI_CSR1); - __raw_writel(0, EBI_LOCK); - } -} - -static void armflash_flash_wp(int on) -{ - unsigned int reg; - - if (on) - reg = SC_CTRLC; - else - reg = SC_CTRLS; - - __raw_writel(INTEGRATOR_SC_CTRL_nFLWP, reg); -} - -static void armflash_set_vpp(struct map_info *map, int on) -{ - unsigned int reg; - - if (on) - reg = SC_CTRLS; - else - reg = SC_CTRLC; - - __raw_writel(INTEGRATOR_SC_CTRL_nFLVPPEN, reg); -} -#endif - -#ifdef CONFIG_ARCH_P720T - -#define FLASH_BASE (0x04000000) -#define FLASH_SIZE (64*1024*1024) - -#define FLASH_PART_SIZE (4*1024*1024) -#define FLASH_BLOCK_SIZE (128*1024) - -static void armflash_flash_init(void) -{ -} - -static void armflash_flash_exit(void) -{ -} - -static void armflash_flash_wp(int on) -{ -} - -static void armflash_set_vpp(struct map_info *map, int on) -{ -} -#endif - - -static struct map_info armflash_map = -{ - .name = "AFS", - .set_vpp = armflash_set_vpp, - .phys = FLASH_BASE, -}; - -static struct mtd_info *mtd; -static struct mtd_partition *parts; -static const char *probes[] = { "RedBoot", "afs", NULL }; - -static int __init armflash_cfi_init(void *base, u_int size) -{ - int ret; - - armflash_flash_init(); - armflash_flash_wp(1); - - /* - * look for CFI based flash parts fitted to this board - */ - armflash_map.size = size; - armflash_map.bankwidth = 4; - armflash_map.virt = (unsigned long) base; - - simple_map_init(&armflash_map); - - /* - * Also, the CFI layer automatically works out what size - * of chips we have, and does the necessary identification - * for us automatically. - */ - mtd = do_map_probe("cfi_probe", &armflash_map); - if (!mtd) - return -ENXIO; - - mtd->owner = THIS_MODULE; - - ret = parse_mtd_partitions(mtd, probes, &parts, (void *)0); - if (ret > 0) { - ret = add_mtd_partitions(mtd, parts, ret); - if (ret) - printk(KERN_ERR "mtd partition registration " - "failed: %d\n", ret); - } - - /* - * If we got an error, free all resources. - */ - if (ret < 0) { - del_mtd_partitions(mtd); - map_destroy(mtd); - } - - return ret; -} - -static void armflash_cfi_exit(void) -{ - if (mtd) { - del_mtd_partitions(mtd); - map_destroy(mtd); - } - if (parts) - kfree(parts); -} - -static int __init armflash_init(void) -{ - int err = -EBUSY; - void *base; - - if (request_mem_region(FLASH_BASE, FLASH_SIZE, "flash") == NULL) - goto out; - - base = ioremap(FLASH_BASE, FLASH_SIZE); - err = -ENOMEM; - if (base == NULL) - goto release; - - err = armflash_cfi_init(base, FLASH_SIZE); - if (err) { - iounmap(base); -release: - release_mem_region(FLASH_BASE, FLASH_SIZE); - } -out: - return err; -} - -static void __exit armflash_exit(void) -{ - armflash_cfi_exit(); - iounmap((void *)armflash_map.virt); - release_mem_region(FLASH_BASE, FLASH_SIZE); - armflash_flash_exit(); -} - -module_init(armflash_init); -module_exit(armflash_exit); - -MODULE_AUTHOR("ARM Ltd"); -MODULE_DESCRIPTION("ARM Integrator CFI map driver"); -MODULE_LICENSE("GPL"); diff -Nru a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c --- a/drivers/mtd/maps/integrator-flash.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/mtd/maps/integrator-flash.c 2004-11-10 17:19:07 -08:00 @@ -22,7 +22,7 @@ This is access code for flashes using ARM's flash partitioning standards. - $Id: integrator-flash.c,v 1.17 2004/09/16 23:27:13 gleixner Exp $ + $Id: integrator-flash.c,v 1.18 2004/11/01 13:26:15 rmk Exp $ ======================================================================*/ @@ -75,7 +75,7 @@ unsigned int size = res->end - res->start + 1; struct armflash_info *info; int err; - void *base; + void __iomem *base; info = kmalloc(sizeof(struct armflash_info), GFP_KERNEL); if (!info) { @@ -110,7 +110,7 @@ info->map.size = size; info->map.bankwidth = plat->width; info->map.phys = res->start; - info->map.virt = (void __iomem *) base; + info->map.virt = base; info->map.name = dev->dev.bus_id; info->map.set_vpp = armflash_set_vpp; @@ -179,7 +179,7 @@ if (info->parts) kfree(info->parts); - iounmap((void *)info->map.virt); + iounmap(info->map.virt); release_resource(info->res); kfree(info->res); diff -Nru a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c --- a/drivers/mtd/maps/sa1100-flash.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/mtd/maps/sa1100-flash.c 2004-11-10 17:19:03 -08:00 @@ -3,7 +3,7 @@ * * (C) 2000 Nicolas Pitre * - * $Id: sa1100-flash.c,v 1.39 2004/07/12 21:59:44 dwmw2 Exp $ + * $Id: sa1100-flash.c,v 1.47 2004/11/01 13:44:36 rmk Exp $ */ #include @@ -496,6 +496,32 @@ }; #endif +#ifdef CONFIG_SA1100_JORNADA56X +static struct mtd_partition jornada56x_partitions[] = { + { + .name = "bootldr", + .size = 0x00040000, + .offset = 0, + .mask_flags = MTD_WRITEABLE, + }, { + .name = "rootfs", + .size = MTDPART_SIZ_FULL, + .offset = MTDPART_OFS_APPEND, + } +}; + +static void jornada56x_set_vpp(struct map_info *map, int vpp) +{ + if (vpp) + GPSR = GPIO_GPIO26; + else + GPCR = GPIO_GPIO26; + GPDR |= GPIO_GPIO26; +} +#else +#define jornada56x_set_vpp NULL +#endif + #ifdef CONFIG_SA1100_JORNADA720 static struct mtd_partition jornada720_partitions[] = { { @@ -822,6 +848,12 @@ nb_parts = ARRAY_SIZE(huw_webpanel_partitions); } #endif +#ifdef CONFIG_SA1100_JORNADA56X + if (machine_is_jornada56x()) { + *parts = jornada56x_partitions; + nb_parts = ARRAY_SIZE(jornada56x_partitions); + } +#endif #ifdef CONFIG_SA1100_JORNADA720 if (machine_is_jornada720()) { *parts = jornada720_partitions; @@ -885,11 +917,10 @@ unsigned long base; unsigned long size; int width; - void __iomem *vbase; - void (*set_vpp)(struct map_info *, int); + void (*set_vpp)(struct map_info *, int); + char name[16]; struct map_info *map; struct mtd_info *mtd; - struct resource *res; }; #define NR_SUBMTD 4 @@ -918,21 +949,22 @@ if (sa[i].base == (unsigned long)-1) break; - sa[i].res = request_mem_region(sa[i].base, sa[i].size, "sa1100 flash"); - if (!sa[i].res) { + sa[i].map = maps + i; + sa[i].map->name = sa[i].name; + sprintf(sa[i].name, "sa1100-%d", i); + + if (!request_mem_region(sa[i].base, sa[i].size, sa[i].name)) { + i -= 1; ret = -EBUSY; break; } - sa[i].map = maps + i; - - sa[i].vbase = ioremap(sa[i].base, sa[i].size); - if (!sa[i].vbase) { + sa[i].map->virt = ioremap(sa[i].base, sa[i].size); + if (!sa[i].map->virt) { ret = -ENOMEM; break; } - sa[i].map->virt = sa[i].vbase; sa[i].map->phys = sa[i].base; sa[i].map->set_vpp = sa[i].set_vpp; sa[i].map->bankwidth = sa[i].width; @@ -964,10 +996,9 @@ * resource and mark it as such. */ if (ret == -ENXIO) { - iounmap(sa[i].vbase); - sa[i].vbase = NULL; - release_resource(sa[i].res); - sa[i].res = NULL; + iounmap(sa[i].map->virt); + sa[i].map->virt = NULL; + release_mem_region(sa[i].base, sa[i].size); } /* @@ -986,7 +1017,7 @@ */ #ifdef CONFIG_MTD_CONCAT *rmtd = mtd_concat_create(subdev, found, - "sa1100 flash"); + "sa1100"); if (*rmtd == NULL) ret = -ENXIO; #else @@ -1004,11 +1035,10 @@ do { if (sa[i].mtd) map_destroy(sa[i].mtd); - if (sa[i].vbase) - iounmap(sa[i].vbase); - if (sa[i].res) - release_resource(sa[i].res); - } while (i--); + if (sa[i].map->virt) + iounmap(sa[i].map->virt); + release_mem_region(sa[i].base, sa[i].size); + } while (i-- > 0); kfree(maps); } @@ -1030,10 +1060,9 @@ for (i = NR_SUBMTD; i >= 0; i--) { if (sa[i].mtd) map_destroy(sa[i].mtd); - if (sa[i].vbase) - iounmap(sa[i].vbase); - if (sa[i].res) - release_resource(sa[i].res); + if (sa[i].map->virt) + iounmap(sa[i].map->virt); + release_mem_region(sa[i].base, sa[i].size); } kfree(sa[0].map); } @@ -1044,13 +1073,9 @@ * - Is the MSC setup for flash (no -> failure) * - Probe for flash */ - -static struct map_info sa1100_probe_map __initdata = { - .name = "SA1100-flash", -}; - static void __init sa1100_probe_one_cs(unsigned int msc, unsigned long phys) { + struct map_info map; struct mtd_info *mtd; printk(KERN_INFO "* Probing 0x%08lx: MSC = 0x%04x %d bit ", @@ -1066,19 +1091,23 @@ return; } - sa1100_probe_map.bankwidth = msc & MSC_RBW ? 2 : 4; - sa1100_probe_map.size = SZ_1M; - sa1100_probe_map.phys = phys; - sa1100_probe_map.virt = (unsigned long)ioremap(phys, SZ_1M); - if (sa1100_probe_map.virt == 0) + memset(&map, 0, sizeof(struct map_info)); + + map.name = "Probe"; + map.bankwidth = msc & MSC_RBW ? 2 : 4; + map.size = SZ_1M; + map.phys = phys; + map.virt = ioremap(phys, SZ_1M); + if (map.virt == NULL) goto fail; - simple_map_init(&sa1100_probe_map); + + simple_map_init(&map); /* Shame cfi_probe blurts out kernel messages... */ - mtd = do_map_probe("cfi_probe", &sa1100_probe_map); + mtd = do_map_probe("cfi_probe", &map); if (mtd) map_destroy(mtd); - iounmap((void *)sa1100_probe_map.virt); + iounmap(map.virt); if (!mtd) goto fail; @@ -1172,6 +1201,12 @@ nr = 1; } if (machine_is_itsy()) { + info[0].base = SA1100_CS0_PHYS; + info[0].size = SZ_32M; + nr = 1; + } + if (machine_is_jornada56x()) { + info[0].set_vpp = jornada56x_set_vpp; info[0].base = SA1100_CS0_PHYS; info[0].size = SZ_32M; nr = 1; diff -Nru a/drivers/net/3c59x.c b/drivers/net/3c59x.c --- a/drivers/net/3c59x.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/3c59x.c 2004-11-10 17:19:02 -08:00 @@ -2887,7 +2887,7 @@ } static struct ethtool_ops vortex_ethtool_ops = { - .get_drvinfo = vortex_get_drvinfo, + .get_drvinfo = vortex_get_drvinfo, }; #ifdef CONFIG_PCI diff -Nru a/drivers/net/7990.c b/drivers/net/7990.c --- a/drivers/net/7990.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/7990.c 2004-11-10 17:19:05 -08:00 @@ -14,7 +14,6 @@ */ #include #include -#include #include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include /* Used for the temporal inet entries and routing */ #include #include @@ -38,18 +38,58 @@ #include #include #include +#ifdef CONFIG_HP300 +#include +#endif #include "7990.h" +#define WRITERAP(lp,x) out_be16(lp->base + LANCE_RAP, (x)) +#define WRITERDP(lp,x) out_be16(lp->base + LANCE_RDP, (x)) +#define READRDP(lp) in_be16(lp->base + LANCE_RDP) + +#if defined(CONFIG_HPLANCE) || defined(CONFIG_HPLANCE_MODULE) +#include "hplance.h" + +#undef WRITERAP +#undef WRITERDP +#undef READRDP + +#if defined(CONFIG_MVME147_NET) || defined(CONFIG_MVME147_NET_MODULE) + /* Lossage Factor Nine, Mr Sulu. */ -#define WRITERAP(x) (lp->writerap(lp,x)) -#define WRITERDP(x) (lp->writerdp(lp,x)) -#define READRDP() (lp->readrdp(lp)) -/* These used to be ll->rap = x, ll->rdp = x, and (ll->rdp). Sigh. - * If you want to switch them back then - * #define DECLARE_LL volatile struct lance_regs *ll = lp->ll - */ -#define DECLARE_LL /* nothing to declare */ +#define WRITERAP(lp,x) (lp->writerap(lp,x)) +#define WRITERDP(lp,x) (lp->writerdp(lp,x)) +#define READRDP(lp) (lp->readrdp(lp)) + +#else + +/* These inlines can be used if only CONFIG_HPLANCE is defined */ +static inline void WRITERAP(struct lance_private *lp, __u16 value) +{ + do { + out_be16(lp->base + HPLANCE_REGOFF + LANCE_RAP, value); + } while ((in_8(lp->base + HPLANCE_STATUS) & LE_ACK) == 0); +} + +static inline void WRITERDP(struct lance_private *lp, __u16 value) +{ + do { + out_be16(lp->base + HPLANCE_REGOFF + LANCE_RDP, value); + } while ((in_8(lp->base + HPLANCE_STATUS) & LE_ACK) == 0); +} + +static inline __u16 READRDP(struct lance_private *lp) +{ + __u16 value; + do { + value = in_be16(lp->base + HPLANCE_REGOFF + LANCE_RDP); + } while ((in_8(lp->base + HPLANCE_STATUS) & LE_ACK) == 0); + return value; +} + +#endif +#endif /* CONFIG_HPLANCE || CONFIG_HPLANCE_MODULE */ /* debugging output macros, various flavours */ /* #define TEST_HITS */ @@ -79,19 +119,18 @@ { volatile struct lance_init_block *aib = lp->lance_init_block; int leptr; - DECLARE_LL; leptr = LANCE_ADDR (aib); - WRITERAP(LE_CSR1); /* load address of init block */ - WRITERDP(leptr & 0xFFFF); - WRITERAP(LE_CSR2); - WRITERDP(leptr >> 16); - WRITERAP(LE_CSR3); - WRITERDP(lp->busmaster_regval); /* set byteswap/ALEctrl/byte ctrl */ + WRITERAP(lp, LE_CSR1); /* load address of init block */ + WRITERDP(lp, leptr & 0xFFFF); + WRITERAP(lp, LE_CSR2); + WRITERDP(lp, leptr >> 16); + WRITERAP(lp, LE_CSR3); + WRITERDP(lp, lp->busmaster_regval); /* set byteswap/ALEctrl/byte ctrl */ /* Point back to csr0 */ - WRITERAP(LE_CSR0); + WRITERAP(lp, LE_CSR0); } /* #define to 0 or 1 appropriately */ @@ -192,24 +231,23 @@ static int init_restart_lance (struct lance_private *lp) { int i; - DECLARE_LL; - WRITERAP(LE_CSR0); - WRITERDP(LE_C0_INIT); + WRITERAP(lp, LE_CSR0); + WRITERDP(lp, LE_C0_INIT); /* Need a hook here for sunlance ledma stuff */ /* Wait for the lance to complete initialization */ - for (i = 0; (i < 100) && !(READRDP() & (LE_C0_ERR | LE_C0_IDON)); i++) + for (i = 0; (i < 100) && !(READRDP(lp) & (LE_C0_ERR | LE_C0_IDON)); i++) barrier(); - if ((i == 100) || (READRDP() & LE_C0_ERR)) { - printk ("LANCE unopened after %d ticks, csr0=%4.4x.\n", i, READRDP()); + if ((i == 100) || (READRDP(lp) & LE_C0_ERR)) { + printk ("LANCE unopened after %d ticks, csr0=%4.4x.\n", i, READRDP(lp)); return -1; } /* Clear IDON by writing a "1", enable interrupts and start lance */ - WRITERDP(LE_C0_IDON); - WRITERDP(LE_C0_INEA | LE_C0_STRT); + WRITERDP(lp, LE_C0_IDON); + WRITERDP(lp, LE_C0_INEA | LE_C0_STRT); return 0; } @@ -218,11 +256,10 @@ { struct lance_private *lp = netdev_priv(dev); int status; - DECLARE_LL; /* Stop the lance */ - WRITERAP(LE_CSR0); - WRITERDP(LE_C0_STOP); + WRITERAP(lp, LE_CSR0); + WRITERDP(lp, LE_C0_STOP); load_csrs (lp); lance_init_ring (dev); @@ -245,7 +282,6 @@ #ifdef TEST_HITS int i; #endif - DECLARE_LL; #ifdef TEST_HITS printk ("["); @@ -259,8 +295,10 @@ } printk ("]"); #endif - - WRITERDP(LE_C0_RINT | LE_C0_INEA); /* ack Rx int, reenable ints */ +#ifdef CONFIG_HP300 + blinken_leds(0x40, 0); +#endif + WRITERDP(lp, LE_C0_RINT | LE_C0_INEA); /* ack Rx int, reenable ints */ for (rd = &ib->brx_ring [lp->rx_new]; /* For each Rx ring we own... */ !((bits = rd->rmd1_bits) & LE_R1_OWN); rd = &ib->brx_ring [lp->rx_new]) { @@ -321,10 +359,12 @@ volatile struct lance_tx_desc *td; int i, j; int status; - DECLARE_LL; +#ifdef CONFIG_HP300 + blinken_leds(0x80, 0); +#endif /* csr0 is 2f3 */ - WRITERDP(LE_C0_TINT | LE_C0_INEA); + WRITERDP(lp, LE_C0_TINT | LE_C0_INEA); /* csr0 is 73 */ j = lp->tx_old; @@ -349,8 +389,8 @@ printk("%s: Carrier Lost, trying %s\n", dev->name, lp->tpe?"TPE":"AUI"); /* Stop the lance */ - WRITERAP(LE_CSR0); - WRITERDP(LE_C0_STOP); + WRITERAP(lp, LE_CSR0); + WRITERDP(lp, LE_C0_STOP); lance_init_ring (dev); load_csrs (lp); init_restart_lance (lp); @@ -366,8 +406,8 @@ printk ("%s: Tx: ERR_BUF|ERR_UFL, restarting\n", dev->name); /* Stop the lance */ - WRITERAP(LE_CSR0); - WRITERDP(LE_C0_STOP); + WRITERAP(lp, LE_CSR0); + WRITERDP(lp, LE_C0_STOP); lance_init_ring (dev); load_csrs (lp); init_restart_lance (lp); @@ -393,7 +433,7 @@ j = (j + 1) & lp->tx_ring_mod_mask; } lp->tx_old = j; - WRITERDP(LE_C0_TINT | LE_C0_INEA); + WRITERDP(lp, LE_C0_TINT | LE_C0_INEA); return 0; } @@ -403,26 +443,25 @@ struct net_device *dev = (struct net_device *)dev_id; struct lance_private *lp = netdev_priv(dev); int csr0; - DECLARE_LL; spin_lock (&lp->devlock); - WRITERAP(LE_CSR0); /* LANCE Controller Status */ - csr0 = READRDP(); + WRITERAP(lp, LE_CSR0); /* LANCE Controller Status */ + csr0 = READRDP(lp); PRINT_RINGS(); if (!(csr0 & LE_C0_INTR)) { /* Check if any interrupt has */ - spin_lock (&lp->devlock); + spin_unlock (&lp->devlock); return IRQ_NONE; /* been generated by the Lance. */ } /* Acknowledge all the interrupt sources ASAP */ - WRITERDP(csr0 & ~(LE_C0_INEA|LE_C0_TDMD|LE_C0_STOP|LE_C0_STRT|LE_C0_INIT)); + WRITERDP(lp, csr0 & ~(LE_C0_INEA|LE_C0_TDMD|LE_C0_STOP|LE_C0_STRT|LE_C0_INIT)); if ((csr0 & LE_C0_ERR)) { /* Clear the error condition */ - WRITERDP(LE_C0_BABL|LE_C0_ERR|LE_C0_MISS|LE_C0_INEA); + WRITERDP(lp, LE_C0_BABL|LE_C0_ERR|LE_C0_MISS|LE_C0_INEA); } if (csr0 & LE_C0_RINT) @@ -440,7 +479,7 @@ printk("%s: Bus master arbitration failure, status %4.4x.\n", dev->name, csr0); /* Restart the chip. */ - WRITERDP(LE_C0_STRT); + WRITERDP(lp, LE_C0_STRT); } if (lp->tx_full && netif_queue_stopped(dev) && (TX_BUFFS_AVAIL >= 0)) { @@ -448,8 +487,8 @@ netif_wake_queue (dev); } - WRITERAP(LE_CSR0); - WRITERDP(LE_C0_BABL|LE_C0_CERR|LE_C0_MISS|LE_C0_MERR|LE_C0_IDON|LE_C0_INEA); + WRITERAP(lp, LE_CSR0); + WRITERDP(lp, LE_C0_BABL|LE_C0_CERR|LE_C0_MISS|LE_C0_MERR|LE_C0_IDON|LE_C0_INEA); spin_unlock (&lp->devlock); return IRQ_HANDLED; @@ -459,14 +498,13 @@ { struct lance_private *lp = netdev_priv(dev); int res; - DECLARE_LL; /* Install the Interrupt handler. Or we could shunt this out to specific drivers? */ if (request_irq(lp->irq, lance_interrupt, 0, lp->name, dev)) return -EAGAIN; res = lance_reset(dev); - lp->devlock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&lp->devlock); netif_start_queue (dev); return res; @@ -475,13 +513,12 @@ int lance_close (struct net_device *dev) { struct lance_private *lp = netdev_priv(dev); - DECLARE_LL; netif_stop_queue (dev); /* Stop the LANCE */ - WRITERAP(LE_CSR0); - WRITERDP(LE_C0_STOP); + WRITERAP(lp, LE_CSR0); + WRITERDP(lp, LE_C0_STOP); free_irq(lp->irq, dev); @@ -504,7 +541,6 @@ int entry, skblen, len; static int outs; unsigned long flags; - DECLARE_LL; if (!TX_BUFFS_AVAIL) return -1; @@ -540,7 +576,7 @@ outs++; /* Kick the lance: transmit now */ - WRITERDP(LE_C0_INEA | LE_C0_TDMD); + WRITERDP(lp, LE_C0_INEA | LE_C0_TDMD); dev->trans_start = jiffies; dev_kfree_skb (skb); @@ -604,7 +640,6 @@ struct lance_private *lp = netdev_priv(dev); volatile struct lance_init_block *ib = lp->init_block; int stopped; - DECLARE_LL; stopped = netif_queue_stopped(dev); if (!stopped) @@ -613,8 +648,8 @@ while (lp->tx_old != lp->tx_new) schedule(); - WRITERAP(LE_CSR0); - WRITERDP(LE_C0_STOP); + WRITERAP(lp, LE_CSR0); + WRITERDP(lp, LE_C0_STOP); lance_init_ring (dev); if (dev->flags & IFF_PROMISC) { @@ -629,5 +664,18 @@ if (!stopped) netif_start_queue (dev); } + +#ifdef CONFIG_NET_POLL_CONTROLLER +void lance_poll(struct net_device *dev) +{ + struct lance_private *lp = netdev_priv(dev); + + spin_lock (&lp->devlock); + WRITERAP(lp, LE_CSR0); + WRITERDP(lp, LE_C0_STRT); + spin_unlock (&lp->devlock); + lance_interrupt(dev->irq, dev, NULL); +} +#endif MODULE_LICENSE("GPL"); diff -Nru a/drivers/net/7990.h b/drivers/net/7990.h --- a/drivers/net/7990.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/7990.h 2004-11-10 17:19:02 -08:00 @@ -14,11 +14,8 @@ #define _7990_H /* The lance only has two register locations. We communicate mostly via memory. */ -struct lance_regs -{ - unsigned short rdp; /* Register Data Port */ - unsigned short rap; /* Register Address Port */ -}; +#define LANCE_RDP 0 /* Register Data Port */ +#define LANCE_RAP 2 /* Register Address Port */ /* Transmit/receive ring definitions. * We allow the specific drivers to override these defaults if they want to. @@ -104,7 +101,7 @@ struct lance_private { char *name; - volatile struct lance_regs *ll; + unsigned long base; volatile struct lance_init_block *init_block; /* CPU address of RAM */ volatile struct lance_init_block *lance_init_block; /* LANCE address of RAM */ @@ -252,5 +249,8 @@ extern struct net_device_stats *lance_get_stats (struct net_device *dev); extern void lance_set_multicast (struct net_device *dev); extern void lance_tx_timeout(struct net_device *dev); +#ifdef CONFIG_NET_POLL_CONTROLLER +extern void lance_poll(struct net_device *dev); +#endif #endif /* ndef _7990_H */ diff -Nru a/drivers/net/8139too.c b/drivers/net/8139too.c --- a/drivers/net/8139too.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/8139too.c 2004-11-10 17:19:02 -08:00 @@ -599,10 +599,10 @@ MODULE_DESCRIPTION ("RealTek RTL-8139 Fast Ethernet driver"); MODULE_LICENSE("GPL"); -MODULE_PARM (multicast_filter_limit, "i"); -MODULE_PARM (media, "1-" __MODULE_STRING(MAX_UNITS) "i"); -MODULE_PARM (full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i"); -MODULE_PARM (debug, "i"); +module_param(multicast_filter_limit, int, 0); +module_param_array(media, int, NULL, 0); +module_param_array(full_duplex, int, NULL, 0); +module_param(debug, int, 0); MODULE_PARM_DESC (debug, "8139too bitmapped message enable number"); MODULE_PARM_DESC (multicast_filter_limit, "8139too maximum number of filtered multicast addresses"); MODULE_PARM_DESC (media, "8139too: Bits 4+9: force full duplex, bit 5: 100Mbps"); diff -Nru a/drivers/net/82596.c b/drivers/net/82596.c --- a/drivers/net/82596.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/82596.c 2004-11-10 17:19:05 -08:00 @@ -1260,7 +1260,7 @@ lp->scb.command = 0; lp->scb.cmd = I596_NULL; lp->scb.rfd = I596_NULL; - lp->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&lp->lock); err = register_netdev(dev); if (err) diff -Nru a/drivers/net/8390.c b/drivers/net/8390.c --- a/drivers/net/8390.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/8390.c 2004-11-10 17:19:02 -08:00 @@ -813,7 +813,7 @@ * We wait at least 10ms. */ - udelay(10*1000); + mdelay(10); /* * Reset RBCR[01] back to zero as per magic incantation. diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig --- a/drivers/net/Kconfig 2004-11-10 17:19:06 -08:00 +++ b/drivers/net/Kconfig 2004-11-10 17:19:06 -08:00 @@ -1413,66 +1413,17 @@ depends on NET_PCI && PCI select MII ---help--- - This driver supports Intel(R) PRO/100 family of adapters, which - includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82558 PRO/100+ PCI Adapter 668081-xxx, - 689661-xxx - 82558 PRO/100+ Management Adapter 691334-xxx, - 701738-xxx, - 721383-xxx - 82558 PRO/100+ Dual Port Server Adapter 714303-xxx, - 711269-xxx, - A28276-xxx - 82558 PRO/100+ PCI Server Adapter 710550-xxx - 82550 PRO/100 S Server Adapter 752438-xxx - 82559 A56831-xxx, - A10563-xxx, - A12171-xxx, - A12321-xxx, - A12320-xxx, - A12170-xxx - 748568-xxx - 748565-xxx - 82550 PRO/100 S Desktop Adapter 751767-xxx - 82559 748592-xxx, - A12167-xxx, - A12318-xxx, - A12317-xxx, - A12165-xxx, - 748569-xxx - 82559 PRO/100+ Server Adapter 729757-xxx - 82559 PRO/100 S Management Adapter 748566-xxx, - 748564-xxx - 82550 PRO/100 S Dual Port Server Adapter A56831-xxx - 82551 PRO/100 M Desktop Adapter A80897-xxx - PRO/100 S Advanced Management Adapter - 747842-xxx, - 745171-xxx - CNR PRO/100 VE Desktop Adapter A10386-xxx, - A10725-xxx, - A23801-xxx, - A19716-xxx - PRO/100 VM Desktop Adapter A14323-xxx, - A19725-xxx, - A23801-xxx, - A22220-xxx, - A23796-xxx - - + This driver supports Intel(R) PRO/100 family of adapters. To verify that your adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number - in the format 123456-001 (six digits hyphen three digits). Match - this to the list of numbers above. + in the format 123456-001 (six digits hyphen three digits). - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + Use the above information and the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm + to identify the adapter. + For the latest Intel PRO/100 network driver for Linux, see: http://appsr.intel.com/scripts-df/support_intel.asp @@ -1742,18 +1693,6 @@ If unsure, say Y. -config VIA_VELOCITY - tristate "VIA Velocity support" - depends on NET_PCI && PCI - select CRC32 - select CRC_CCITT - select MII - help - If you have a VIA "Velocity" based network card say Y here. - - To compile this driver as a module, choose M here. The module - will be called via-velocity. - config LAN_SAA9730 bool "Philips SAA9730 Ethernet support (EXPERIMENTAL)" depends on NET_PCI && EXPERIMENTAL && MIPS @@ -1933,29 +1872,8 @@ depends on PCI ---help--- This driver supports Intel(R) PRO/1000 gigabit ethernet family of - adapters, which includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, - 717037-xxx - 82543 PRO/1000 F Server Adapter 738640-xxx, - A38888-xxx - 82543 PRO/1000 T Server Adapter A19845-xxx, - A33948-xxx - 82544 PRO/1000 XT Server Adapter A51580-xxx - 82544 PRO/1000 XF Server Adapter A50484-xxx - 82544 PRO/1000 T Desktop Adapter A62947-xxx - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 PRO/1000 MT Desktop Adapter C91016-xxx - 82545 PRO/1000 MT Server Adapter A92165-xxx - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - 82545 PRO/1000 MF Server Adapter A91622-xxx - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + adapters. For more information on how to identify your adapter, go + to the Adapter & Driver ID Guide at: @@ -2140,6 +2058,18 @@ say M here and read Documentation/kbuild/modules.txt. The module will be called sk98lin. This is recommended. +config VIA_VELOCITY + tristate "VIA Velocity support" + depends on NET_PCI && PCI + select CRC32 + select CRC_CCITT + select MII + help + If you have a VIA "Velocity" based network card say Y here. + + To compile this driver as a module, choose M here. The module + will be called via-velocity. + config TIGON3 tristate "Broadcom Tigon3 support" depends on PCI @@ -2202,14 +2132,8 @@ depends on PCI ---help--- This driver supports Intel(R) PRO/10GbE family of - adapters, which includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - 82597EX Intel(R) PRO/10GbE LR Server Adapter A82505-xxx - - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + adapters. For more information on how to identify your adapter, go + to the Adapter & Driver ID Guide at: diff -Nru a/drivers/net/Space.c b/drivers/net/Space.c --- a/drivers/net/Space.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/Space.c 2004-11-10 17:19:02 -08:00 @@ -284,9 +284,6 @@ #ifdef CONFIG_ATARI_PAMSNET /* Atari PAMsNet Ethernet board */ {pamsnet_probe, 0}, #endif -#ifdef CONFIG_HPLANCE /* HP300 internal Ethernet */ - {hplance_probe, 0}, -#endif #ifdef CONFIG_MVME147_NET /* MVME147 internal Ethernet */ {mvme147lance_probe, 0}, #endif diff -Nru a/drivers/net/acenic.c b/drivers/net/acenic.c --- a/drivers/net/acenic.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/acenic.c 2004-11-10 17:19:04 -08:00 @@ -443,7 +443,7 @@ MODULE_PARM_DESC(tx_ratio, "AceNIC/3C985/GA620 ratio of NIC memory used for TX/RX descriptors (range 0-63)"); -static char version[] __initdata = +static char version[] __devinitdata = "acenic.c: v0.92 08/05/2002 Jes Sorensen, linux-acenic@SunSITE.dk\n" " http://home.cern.ch/~jes/gige/acenic.html\n"; @@ -538,7 +538,7 @@ * addresses but who gives a damn. */ dev->base_addr = pci_resource_start(pdev, 0); - ap->regs = (struct ace_regs *)ioremap(dev->base_addr, 0x4000); + ap->regs = ioremap(dev->base_addr, 0x4000); if (!ap->regs) { printk(KERN_ERR "%s: Unable to map I/O register, " "AceNIC %i will be disabled.\n", @@ -631,7 +631,7 @@ { struct net_device *dev = pci_get_drvdata(pdev); struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; short i; unregister_netdev(dev); @@ -884,7 +884,7 @@ /* * Commands are considered to be slow. */ -static inline void ace_issue_cmd(struct ace_regs *regs, struct cmd *cmd) +static inline void ace_issue_cmd(struct ace_regs __iomem *regs, struct cmd *cmd) { u32 idx; @@ -897,10 +897,10 @@ } -static int __init ace_init(struct net_device *dev) +static int __devinit ace_init(struct net_device *dev) { struct ace_private *ap; - struct ace_regs *regs; + struct ace_regs __iomem *regs; struct ace_info *info = NULL; struct pci_dev *pdev; unsigned long myjif; @@ -1318,11 +1318,10 @@ writel(TX_RING_BASE, ®s->WinBase); if (ACE_IS_TIGON_I(ap)) { - ap->tx_ring = (struct tx_desc *)regs->Window; - for (i = 0; i < (TIGON_I_TX_RING_ENTRIES * - sizeof(struct tx_desc) / 4); i++) { - writel(0, (unsigned long)ap->tx_ring + i * 4); - } + ap->tx_ring = (struct tx_desc *) regs->Window; + for (i = 0; i < (TIGON_I_TX_RING_ENTRIES + * sizeof(struct tx_desc)) / sizeof(u32); i++) + writel(0, (void __iomem *)ap->tx_ring + i * 4); set_aceaddr(&info->tx_ctrl.rngptr, TX_RING_BASE); } else { @@ -1549,14 +1548,9 @@ static void ace_set_rxtx_parms(struct net_device *dev, int jumbo) { - struct ace_private *ap; - struct ace_regs *regs; - int board_idx; - - ap = netdev_priv(dev); - regs = ap->regs; - - board_idx = ap->board_idx; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; + int board_idx = ap->board_idx; if (board_idx >= 0) { if (!jumbo) { @@ -1594,7 +1588,7 @@ { struct net_device *dev = data; struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; /* * We haven't received a stats update event for more than 2.5 @@ -1617,7 +1611,7 @@ static void ace_tasklet(unsigned long dev) { - struct ace_private *ap = ((struct net_device *)dev)->priv; + struct ace_private *ap = netdev_priv((struct net_device *)dev); int cur_size; cur_size = atomic_read(&ap->cur_rx_bufs); @@ -1675,10 +1669,9 @@ */ static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs) { - struct ace_regs *regs; + struct ace_regs __iomem *regs = ap->regs; short i, idx; - - regs = ap->regs; + prefetchw(&ap->cur_rx_bufs); @@ -1739,11 +1732,9 @@ static void ace_load_mini_rx_ring(struct ace_private *ap, int nr_bufs) { - struct ace_regs *regs; + struct ace_regs __iomem *regs = ap->regs; short i, idx; - regs = ap->regs; - prefetchw(&ap->cur_mini_bufs); idx = ap->rx_mini_skbprd; @@ -1798,11 +1789,9 @@ */ static void ace_load_jumbo_rx_ring(struct ace_private *ap, int nr_bufs) { - struct ace_regs *regs; + struct ace_regs __iomem *regs = ap->regs; short i, idx; - regs = ap->regs; - idx = ap->rx_jumbo_skbprd; for (i = 0; i < nr_bufs; i++) { @@ -2082,8 +2071,7 @@ * the 12.3.x Firmware - my Tigon I NICs seem to disagree! */ if (ACE_IS_TIGON_I(ap)) { - struct ace_regs *regs = ap->regs; - writel(idx, ®s->RxRetCsm); + writel(idx, &ap->regs->RxRetCsm); } ap->cur_rx = idx; @@ -2163,16 +2151,13 @@ static irqreturn_t ace_interrupt(int irq, void *dev_id, struct pt_regs *ptregs) { - struct ace_private *ap; - struct ace_regs *regs; struct net_device *dev = (struct net_device *)dev_id; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; u32 idx; u32 txcsm, rxretcsm, rxretprd; u32 evtcsm, evtprd; - ap = netdev_priv(dev); - regs = ap->regs; - /* * In case of PCI shared interrupts or spurious interrupts, * we want to make sure it is actually our interrupt before @@ -2325,13 +2310,10 @@ static int ace_open(struct net_device *dev) { - struct ace_private *ap; - struct ace_regs *regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; struct cmd cmd; - ap = netdev_priv(dev); - regs = ap->regs; - if (!(ap->fw_running)) { printk(KERN_WARNING "%s: Firmware not running!\n", dev->name); return -EBUSY; @@ -2383,8 +2365,8 @@ static int ace_close(struct net_device *dev) { - struct ace_private *ap; - struct ace_regs *regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; struct cmd cmd; unsigned long flags; short i; @@ -2396,9 +2378,7 @@ */ netif_stop_queue(dev); - ap = netdev_priv(dev); - regs = ap->regs; - + if (ap->promisc) { cmd.evt = C_SET_PROMISC_MODE; cmd.code = C_C_PROMISC_DISABLE; @@ -2433,9 +2413,11 @@ if (mapping) { if (ACE_IS_TIGON_I(ap)) { - writel(0, &ap->tx_ring[i].addr.addrhi); - writel(0, &ap->tx_ring[i].addr.addrlo); - writel(0, &ap->tx_ring[i].flagsize); + struct tx_desc __iomem *tx + = (struct tx_desc __iomem *) &ap->tx_ring[i]; + writel(0, &tx->addr.addrhi); + writel(0, &tx->addr.addrlo); + writel(0, &tx->flagsize); } else memset(ap->tx_ring + i, 0, sizeof(struct tx_desc)); @@ -2492,11 +2474,12 @@ #endif if (ACE_IS_TIGON_I(ap)) { - writel(addr >> 32, &desc->addr.addrhi); - writel(addr & 0xffffffff, &desc->addr.addrlo); - writel(flagsize, &desc->flagsize); + struct tx_desc __iomem *io = (struct tx_desc __iomem *) desc; + writel(addr >> 32, &io->addr.addrhi); + writel(addr & 0xffffffff, &io->addr.addrlo); + writel(flagsize, &io->flagsize); #if ACENIC_DO_VLAN - writel(vlan_tag, &desc->vlanres); + writel(vlan_tag, &io->vlanres); #endif } else { desc->addr.addrhi = addr >> 32; @@ -2512,9 +2495,10 @@ static int ace_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; struct tx_desc *desc; u32 idx, flagsize; + unsigned long maxjiff = jiffies + 3*HZ; restart: idx = ap->tx_prd; @@ -2522,10 +2506,7 @@ if (tx_ring_full(ap, ap->tx_ret_csm, idx)) goto overflow; -#if MAX_SKB_FRAGS - if (!skb_shinfo(skb)->nr_frags) -#endif - { + if (!skb_shinfo(skb)->nr_frags) { dma_addr_t mapping; u32 vlan_tag = 0; @@ -2547,9 +2528,7 @@ flagsize |= BD_FLG_COAL_NOW; ace_load_tx_bd(ap, desc, mapping, flagsize, vlan_tag); - } -#if MAX_SKB_FRAGS - else { + } else { dma_addr_t mapping; u32 vlan_tag = 0; int i, len = 0; @@ -2604,7 +2583,6 @@ ace_load_tx_bd(ap, desc, mapping, flagsize, vlan_tag); } } -#endif wmb(); ap->tx_prd = idx; @@ -2624,7 +2602,7 @@ } dev->trans_start = jiffies; - return 0; + return NETDEV_TX_OK; overflow: /* @@ -2643,15 +2621,22 @@ * Alternative is to return with 1 not throttling queue. In this * case loop becomes longer, no more useful effects. */ - barrier(); - goto restart; + if (time_before(jiffies, maxjiff)) { + barrier(); + cpu_relax(); + goto restart; + } + + /* The ring is stuck full. */ + printk(KERN_WARNING "%s: Transmit ring stuck full\n", dev->name); + return NETDEV_TX_BUSY; } static int ace_change_mtu(struct net_device *dev, int new_mtu) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; if (new_mtu > ACE_JUMBO_MTU) return -EINVAL; @@ -2688,7 +2673,7 @@ static int ace_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; u32 link; memset(ecmd, 0, sizeof(struct ethtool_cmd)); @@ -2741,7 +2726,7 @@ static int ace_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; u32 link, speed; link = readl(®s->GigLnkState); @@ -2821,8 +2806,9 @@ */ static int ace_set_mac_addr(struct net_device *dev, void *p) { + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; struct sockaddr *addr=p; - struct ace_regs *regs; u8 *da; struct cmd cmd; @@ -2833,7 +2819,6 @@ da = (u8 *)dev->dev_addr; - regs = ((struct ace_private *)netdev_priv(dev))->regs; writel(da[0] << 8 | da[1], ®s->MacAddrHi); writel((da[2] << 24) | (da[3] << 16) | (da[4] << 8) | da[5], ®s->MacAddrLo); @@ -2850,7 +2835,7 @@ static void ace_set_multicast_list(struct net_device *dev) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; struct cmd cmd; if ((dev->flags & IFF_ALLMULTI) && !(ap->mcast_all)) { @@ -2904,8 +2889,8 @@ static struct net_device_stats *ace_get_stats(struct net_device *dev) { struct ace_private *ap = netdev_priv(dev); - struct ace_mac_stats *mac_stats = - (struct ace_mac_stats *)ap->regs->Stats; + struct ace_mac_stats __iomem *mac_stats = + (struct ace_mac_stats __iomem *)ap->regs->Stats; ap->stats.rx_missed_errors = readl(&mac_stats->drop_space); ap->stats.multicast = readl(&mac_stats->kept_mc); @@ -2915,10 +2900,10 @@ } -static void __init ace_copy(struct ace_regs *regs, void *src, +static void __devinit ace_copy(struct ace_regs __iomem *regs, void *src, u32 dest, int size) { - unsigned long tdest; + void __iomem *tdest; u32 *wsrc; short tsize, i; @@ -2928,7 +2913,7 @@ while (size > 0) { tsize = min_t(u32, ((~dest & (ACE_WINDOW_SIZE - 1)) + 1), min_t(u32, size, ACE_WINDOW_SIZE)); - tdest = (unsigned long)®s->Window + + tdest = (void __iomem *) ®s->Window + (dest & (ACE_WINDOW_SIZE - 1)); writel(dest & ~(ACE_WINDOW_SIZE - 1), ®s->WinBase); /* @@ -2948,9 +2933,9 @@ } -static void __init ace_clear(struct ace_regs *regs, u32 dest, int size) +static void __devinit ace_clear(struct ace_regs __iomem *regs, u32 dest, int size) { - unsigned long tdest; + void __iomem *tdest; short tsize = 0, i; if (size <= 0) @@ -2959,7 +2944,7 @@ while (size > 0) { tsize = min_t(u32, ((~dest & (ACE_WINDOW_SIZE - 1)) + 1), min_t(u32, size, ACE_WINDOW_SIZE)); - tdest = (unsigned long)®s->Window + + tdest = (void __iomem *) ®s->Window + (dest & (ACE_WINDOW_SIZE - 1)); writel(dest & ~(ACE_WINDOW_SIZE - 1), ®s->WinBase); @@ -2981,13 +2966,10 @@ * This operation requires the NIC to be halted and is performed with * interrupts disabled and with the spinlock hold. */ -int __init ace_load_firmware(struct net_device *dev) +int __devinit ace_load_firmware(struct net_device *dev) { - struct ace_private *ap; - struct ace_regs *regs; - - ap = netdev_priv(dev); - regs = ap->regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; if (!(readl(®s->CpuCtrl) & CPU_HALTED)) { printk(KERN_ERR "%s: trying to download firmware while the " @@ -3035,7 +3017,7 @@ * Thanks to Stevarino Webinski for helping tracking down the bugs in the * code i2c readout code by beta testing all my hacks. */ -static void __init eeprom_start(struct ace_regs *regs) +static void __devinit eeprom_start(struct ace_regs __iomem *regs) { u32 local; @@ -3064,7 +3046,7 @@ } -static void __init eeprom_prep(struct ace_regs *regs, u8 magic) +static void __devinit eeprom_prep(struct ace_regs __iomem *regs, u8 magic) { short i; u32 local; @@ -3101,7 +3083,7 @@ } -static int __init eeprom_check_ack(struct ace_regs *regs) +static int __devinit eeprom_check_ack(struct ace_regs __iomem *regs) { int state; u32 local; @@ -3129,7 +3111,7 @@ } -static void __init eeprom_stop(struct ace_regs *regs) +static void __devinit eeprom_stop(struct ace_regs __iomem *regs) { u32 local; @@ -3164,11 +3146,11 @@ /* * Read a whole byte from the EEPROM. */ -static int __init read_eeprom_byte(struct net_device *dev, +static int __devinit read_eeprom_byte(struct net_device *dev, unsigned long offset) { - struct ace_private *ap; - struct ace_regs *regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; unsigned long flags; u32 local; int result = 0; @@ -3179,9 +3161,6 @@ result = -ENODEV; goto out; } - - ap = netdev_priv(dev); - regs = ap->regs; /* * Don't take interrupts on this CPU will bit banging diff -Nru a/drivers/net/acenic.h b/drivers/net/acenic.h --- a/drivers/net/acenic.h 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/acenic.h 2004-11-10 17:19:04 -08:00 @@ -10,11 +10,6 @@ */ #define USE_TX_COAL_NOW 0 -#ifndef MAX_SKB_FRAGS -#define MAX_SKB_FRAGS 0 -#endif - - /* * Addressing: * @@ -638,7 +633,7 @@ struct ace_private { struct ace_info *info; - struct ace_regs *regs; /* register base */ + struct ace_regs __iomem *regs; /* register base */ struct ace_skb *skb; dma_addr_t info_dma; /* 32/64 bit */ @@ -712,13 +707,7 @@ } #define tx_free(ap) tx_space((ap)->tx_ret_csm, (ap)->tx_prd, ap) - -#if MAX_SKB_FRAGS #define tx_ring_full(ap, csm, prd) (tx_space(ap, csm, prd) <= TX_RESERVED) -#else -#define tx_ring_full 0 -#endif - static inline void set_aceaddr(aceaddr *aa, dma_addr_t addr) { @@ -729,7 +718,7 @@ } -static inline void ace_set_txprd(struct ace_regs *regs, +static inline void ace_set_txprd(struct ace_regs __iomem *regs, struct ace_private *ap, u32 value) { #ifdef INDEX_DEBUG @@ -750,8 +739,8 @@ static inline void ace_mask_irq(struct net_device *dev) { - struct ace_private *ap = dev->priv; - struct ace_regs *regs = ap->regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; if (ACE_IS_TIGON_I(ap)) writel(1, ®s->MaskInt); @@ -764,8 +753,8 @@ static inline void ace_unmask_irq(struct net_device *dev) { - struct ace_private *ap = dev->priv; - struct ace_regs *regs = ap->regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; if (ACE_IS_TIGON_I(ap)) writel(0, ®s->MaskInt); diff -Nru a/drivers/net/acenic_firmware.h b/drivers/net/acenic_firmware.h --- a/drivers/net/acenic_firmware.h 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/acenic_firmware.h 2004-11-10 17:19:05 -08:00 @@ -23,7 +23,7 @@ #define tigonFwRodata NULL #else /* Generated by genfw.c */ -static u32 tigonFwText[(MAX_TEXT_LEN/4) + 1] __initdata = { +static u32 tigonFwText[(MAX_TEXT_LEN/4) + 1] __devinitdata = { 0x10000003, 0x0, 0xd, 0xd, 0x3c1d0001, 0x8fbd5c54, 0x3a0f021, 0x3c100000, 0x26104000, diff -Nru a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c --- a/drivers/net/amd8111e.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/net/amd8111e.c 2004-11-10 17:19:07 -08:00 @@ -211,7 +211,7 @@ u32 bmcr,advert,tmp; /* Determine mii register values to set the speed */ - advert = amd8111e_mdio_read(dev, PHY_ID, MII_ADVERTISE); + advert = amd8111e_mdio_read(dev, lp->ext_phy_addr, MII_ADVERTISE); tmp = advert & ~(ADVERTISE_ALL | ADVERTISE_100BASE4); switch (lp->ext_phy_option){ @@ -235,11 +235,11 @@ } if(advert != tmp) - amd8111e_mdio_write(dev, PHY_ID, MII_ADVERTISE, tmp); + amd8111e_mdio_write(dev, lp->ext_phy_addr, MII_ADVERTISE, tmp); /* Restart auto negotiation */ - bmcr = amd8111e_mdio_read(dev, PHY_ID, MII_BMCR); + bmcr = amd8111e_mdio_read(dev, lp->ext_phy_addr, MII_BMCR); bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); - amd8111e_mdio_write(dev, PHY_ID, MII_BMCR, bmcr); + amd8111e_mdio_write(dev, lp->ext_phy_addr, MII_BMCR, bmcr); } @@ -350,6 +350,7 @@ lp->rx_ring[i].buff_phy_addr = cpu_to_le32(lp->rx_dma_addr[i]); lp->rx_ring[i].buff_count = cpu_to_le16(lp->rx_buff_len-2); + wmb(); lp->rx_ring[i].rx_flags = cpu_to_le16(OWN_BIT); } @@ -529,7 +530,7 @@ writel(RUN, mmio + CMD0); /* AUTOPOLL0 Register *//*TBD default value is 8100 in FPS */ - writew( 0x8101, mmio + AUTOPOLL0); + writew( 0x8100 | lp->ext_phy_addr, mmio + AUTOPOLL0); /* Clear RCV_RING_BASE_ADDR */ writel(0, mmio + RCV_RING_BASE_ADDR0); @@ -740,11 +741,11 @@ do{ /* process receive packets until we use the quota*/ /* If we own the next entry, it's a new packet. Send it up. */ - while(!(lp->rx_ring[rx_index].rx_flags & OWN_BIT)){ - - /* check if err summary bit is set */ - if(le16_to_cpu(lp->rx_ring[rx_index].rx_flags) - & ERR_BIT){ + while(1) { + status = le16_to_cpu(lp->rx_ring[rx_index].rx_flags); + if (status & OWN_BIT) + break; + /* * There is a tricky error noted by John Murphy, * to Russ Nelson: Even with @@ -753,89 +754,88 @@ * the last correctly noting the error. */ - /* reseting flags */ - lp->rx_ring[rx_index].rx_flags &=RESET_RX_FLAGS; - goto err_next_pkt; - + if(status & ERR_BIT) { + /* reseting flags */ + lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; + goto err_next_pkt; } /* check for STP and ENP */ - status = le16_to_cpu(lp->rx_ring[rx_index].rx_flags); - if(!((status & STP_BIT) && (status & ENP_BIT))){ - /* reseting flags */ - lp->rx_ring[rx_index].rx_flags &=RESET_RX_FLAGS; - goto err_next_pkt; - } - pkt_len = le16_to_cpu(lp->rx_ring[rx_index].msg_count) - 4; + if(!((status & STP_BIT) && (status & ENP_BIT))){ + /* reseting flags */ + lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; + goto err_next_pkt; + } + pkt_len = le16_to_cpu(lp->rx_ring[rx_index].msg_count) - 4; #if AMD8111E_VLAN_TAG_USED - vtag = le16_to_cpu(lp->rx_ring[rx_index].rx_flags) & TT_MASK; - /*MAC will strip vlan tag*/ - if(lp->vlgrp != NULL && vtag !=0) - min_pkt_len =MIN_PKT_LEN - 4; - else + vtag = status & TT_MASK; + /*MAC will strip vlan tag*/ + if(lp->vlgrp != NULL && vtag !=0) + min_pkt_len =MIN_PKT_LEN - 4; + else #endif - min_pkt_len =MIN_PKT_LEN; + min_pkt_len =MIN_PKT_LEN; - if (pkt_len < min_pkt_len) { - lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; - lp->drv_rx_errors++; - goto err_next_pkt; - } - if(--rx_pkt_limit < 0) - goto rx_not_empty; - if(!(new_skb = dev_alloc_skb(lp->rx_buff_len))){ - /* if allocation fail, - ignore that pkt and go to next one */ - lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; - lp->drv_rx_errors++; - goto err_next_pkt; - } + if (pkt_len < min_pkt_len) { + lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; + lp->drv_rx_errors++; + goto err_next_pkt; + } + if(--rx_pkt_limit < 0) + goto rx_not_empty; + if(!(new_skb = dev_alloc_skb(lp->rx_buff_len))){ + /* if allocation fail, + ignore that pkt and go to next one */ + lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; + lp->drv_rx_errors++; + goto err_next_pkt; + } - skb_reserve(new_skb, 2); - skb = lp->rx_skbuff[rx_index]; - pci_unmap_single(lp->pci_dev,lp->rx_dma_addr[rx_index], - lp->rx_buff_len-2, PCI_DMA_FROMDEVICE); - skb_put(skb, pkt_len); - skb->dev = dev; - lp->rx_skbuff[rx_index] = new_skb; - new_skb->dev = dev; - lp->rx_dma_addr[rx_index] = pci_map_single(lp->pci_dev, - new_skb->data, lp->rx_buff_len-2,PCI_DMA_FROMDEVICE); + skb_reserve(new_skb, 2); + skb = lp->rx_skbuff[rx_index]; + pci_unmap_single(lp->pci_dev,lp->rx_dma_addr[rx_index], + lp->rx_buff_len-2, PCI_DMA_FROMDEVICE); + skb_put(skb, pkt_len); + skb->dev = dev; + lp->rx_skbuff[rx_index] = new_skb; + new_skb->dev = dev; + lp->rx_dma_addr[rx_index] = pci_map_single(lp->pci_dev, + new_skb->data, + lp->rx_buff_len-2, + PCI_DMA_FROMDEVICE); - skb->protocol = eth_type_trans(skb, dev); + skb->protocol = eth_type_trans(skb, dev); #if AMD8111E_VLAN_TAG_USED - - vtag = lp->rx_ring[rx_index].rx_flags & TT_MASK; - if(lp->vlgrp != NULL && (vtag == TT_VLAN_TAGGED)){ - amd8111e_vlan_rx(lp, skb, - lp->rx_ring[rx_index].tag_ctrl_info); - } else + if(lp->vlgrp != NULL && (vtag == TT_VLAN_TAGGED)){ + amd8111e_vlan_rx(lp, skb, + le16_to_cpu(lp->rx_ring[rx_index].tag_ctrl_info)); + } else #endif - - netif_receive_skb(skb); - /*COAL update rx coalescing parameters*/ - lp->coal_conf.rx_packets++; - lp->coal_conf.rx_bytes += pkt_len; - num_rx_pkt++; - dev->last_rx = jiffies; + netif_receive_skb(skb); + /*COAL update rx coalescing parameters*/ + lp->coal_conf.rx_packets++; + lp->coal_conf.rx_bytes += pkt_len; + num_rx_pkt++; + dev->last_rx = jiffies; -err_next_pkt: - lp->rx_ring[rx_index].buff_phy_addr - = cpu_to_le32(lp->rx_dma_addr[rx_index]); - lp->rx_ring[rx_index].buff_count = + err_next_pkt: + lp->rx_ring[rx_index].buff_phy_addr + = cpu_to_le32(lp->rx_dma_addr[rx_index]); + lp->rx_ring[rx_index].buff_count = cpu_to_le16(lp->rx_buff_len-2); - lp->rx_ring[rx_index].rx_flags |= cpu_to_le16(OWN_BIT); - rx_index = (++lp->rx_idx) & RX_RING_DR_MOD_MASK; - } - /* Check the interrupt status register for more packets in the - mean time. Process them since we have not used up our quota.*/ + wmb(); + lp->rx_ring[rx_index].rx_flags |= cpu_to_le16(OWN_BIT); + rx_index = (++lp->rx_idx) & RX_RING_DR_MOD_MASK; + } + /* Check the interrupt status register for more packets in the + mean time. Process them since we have not used up our quota.*/ + + intr0 = readl(mmio + INT0); + /*Ack receive packets */ + writel(intr0 & RINT0,mmio + INT0); - intr0 = readl(mmio + INT0); - /*Ack receive packets */ - writel(intr0 & RINT0,mmio + INT0); - - }while(intr0 & RINT0); + } while(intr0 & RINT0); /* Receive descriptor is empty now */ dev->quota -= num_rx_pkt; @@ -873,11 +873,12 @@ /* If we own the next entry, it's a new packet. Send it up. */ while(++num_rx_pkt <= max_rx_pkt){ - if(lp->rx_ring[rx_index].rx_flags & OWN_BIT) + status = le16_to_cpu(lp->rx_ring[rx_index].rx_flags); + if(status & OWN_BIT) return 0; /* check if err summary bit is set */ - if(le16_to_cpu(lp->rx_ring[rx_index].rx_flags) & ERR_BIT){ + if(status & ERR_BIT){ /* * There is a tricky error noted by John Murphy, * to Russ Nelson: Even with full-sized @@ -888,7 +889,6 @@ goto err_next_pkt; } /* check for STP and ENP */ - status = le16_to_cpu(lp->rx_ring[rx_index].rx_flags); if(!((status & STP_BIT) && (status & ENP_BIT))){ /* reseting flags */ lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; @@ -897,7 +897,7 @@ pkt_len = le16_to_cpu(lp->rx_ring[rx_index].msg_count) - 4; #if AMD8111E_VLAN_TAG_USED - vtag = le16_to_cpu(lp->rx_ring[rx_index].rx_flags) & TT_MASK; + vtag = status & TT_MASK; /*MAC will strip vlan tag*/ if(lp->vlgrp != NULL && vtag !=0) min_pkt_len =MIN_PKT_LEN - 4; @@ -931,12 +931,10 @@ skb->protocol = eth_type_trans(skb, dev); -#if AMD8111E_VLAN_TAG_USED - - vtag = lp->rx_ring[rx_index].rx_flags & TT_MASK; +#if AMD8111E_VLAN_TAG_USED if(lp->vlgrp != NULL && (vtag == TT_VLAN_TAGGED)){ amd8111e_vlan_rx(lp, skb, - lp->rx_ring[rx_index].tag_ctrl_info); + le16_to_cpu(lp->rx_ring[rx_index].tag_ctrl_info)); } else #endif @@ -952,6 +950,7 @@ = cpu_to_le32(lp->rx_dma_addr[rx_index]); lp->rx_ring[rx_index].buff_count = cpu_to_le16(lp->rx_buff_len-2); + wmb(); lp->rx_ring[rx_index].rx_flags |= cpu_to_le16(OWN_BIT); rx_index = (++lp->rx_idx) & RX_RING_DR_MOD_MASK; } @@ -1432,7 +1431,7 @@ #if AMD8111E_VLAN_TAG_USED if((lp->vlgrp != NULL) && vlan_tx_tag_present(skb)){ lp->tx_ring[tx_index].tag_ctrl_cmd |= - cpu_to_le32(TCC_VLAN_INSERT); + cpu_to_le16(TCC_VLAN_INSERT); lp->tx_ring[tx_index].tag_ctrl_info = cpu_to_le16(vlan_tx_tag_get(skb)); @@ -1444,6 +1443,7 @@ (u32) cpu_to_le32(lp->tx_dma_addr[tx_index]); /* Set FCS and LTINT bits */ + wmb(); lp->tx_ring[tx_index].tx_flags |= cpu_to_le16(OWN_BIT | STP_BIT | ENP_BIT|ADD_FCS_BIT|LTINT_BIT); @@ -1667,7 +1667,7 @@ switch(cmd) { case SIOCGMIIPHY: - data->phy_id = PHY_ID; + data->phy_id = lp->ext_phy_addr; /* fallthru */ case SIOCGMIIREG: @@ -1940,6 +1940,26 @@ } +static void __devinit amd8111e_probe_ext_phy(struct net_device* dev) +{ + struct amd8111e_priv *lp = netdev_priv(dev); + int i; + + for (i = 0x1e; i >= 0; i--) { + u32 id1, id2; + + if (amd8111e_read_phy(lp, i, MII_PHYSID1, &id1)) + continue; + if (amd8111e_read_phy(lp, i, MII_PHYSID2, &id2)) + continue; + lp->ext_phy_id = (id1 << 16) | id2; + lp->ext_phy_addr = i; + return; + } + lp->ext_phy_id = 0; + lp->ext_phy_addr = 1; +} + static int __devinit amd8111e_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -2010,12 +2030,6 @@ lp->amd8111e_net_dev = dev; lp->pm_cap = pm_cap; - /* setting mii default values */ - lp->mii_if.dev = dev; - lp->mii_if.mdio_read = amd8111e_mdio_read; - lp->mii_if.mdio_write = amd8111e_mdio_write; - lp->mii_if.phy_id = PHY_ID; - spin_lock_init(&lp->lock); lp->mmio = ioremap(reg_addr, reg_len); @@ -2063,7 +2077,15 @@ dev->vlan_rx_register =amd8111e_vlan_rx_register; dev->vlan_rx_kill_vid = amd8111e_vlan_rx_kill_vid; #endif - + /* Probe the external PHY */ + amd8111e_probe_ext_phy(dev); + + /* setting mii default values */ + lp->mii_if.dev = dev; + lp->mii_if.mdio_read = amd8111e_mdio_read; + lp->mii_if.mdio_write = amd8111e_mdio_write; + lp->mii_if.phy_id = lp->ext_phy_addr; + /* Set receive buffer length and set jumbo option*/ amd8111e_set_rx_buff_len(dev); @@ -2096,6 +2118,12 @@ for (i = 0; i < 6; i++) printk("%2.2x%c",dev->dev_addr[i],i == 5 ? ' ' : ':'); printk( "\n"); + if (lp->ext_phy_id) + printk(KERN_INFO "%s: Found MII PHY ID 0x%08x at address 0x%02x\n", + dev->name, lp->ext_phy_id, lp->ext_phy_addr); + else + printk(KERN_INFO "%s: Couldn't detect MII PHY, assuming address 0x01\n", + dev->name); return 0; err_iounmap: iounmap(lp->mmio); diff -Nru a/drivers/net/amd8111e.h b/drivers/net/amd8111e.h --- a/drivers/net/amd8111e.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/amd8111e.h 2004-11-10 17:19:02 -08:00 @@ -649,7 +649,6 @@ #define TCC_MASK 0x0003 /* driver ioctl parameters */ -#define PHY_ID 0x01 /* currently it is fixed */ #define AMD8111E_REG_DUMP_LEN 13*sizeof(u32) /* crc generator constants */ @@ -777,6 +776,8 @@ int options; /* Options enabled/disabled for the device */ unsigned long ext_phy_option; + int ext_phy_addr; + u32 ext_phy_id; struct amd8111e_link_config link_config; int pm_cap; diff -Nru a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c --- a/drivers/net/arm/etherh.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/net/arm/etherh.c 2004-11-10 17:19:06 -08:00 @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -56,14 +57,19 @@ #define NET_DEBUG 0 #define DEBUG_INIT 2 +#define DRV_NAME "etherh" +#define DRV_VERSION "1.11" + static unsigned int net_debug = NET_DEBUG; struct etherh_priv { - void *ioc_fast; - void *memc; + void __iomem *ioc_fast; + void __iomem *memc; + void __iomem *dma_base; unsigned int id; - void *ctrl_port; + void __iomem *ctrl_port; unsigned char ctrl; + u32 supported; }; struct etherh_data { @@ -72,11 +78,7 @@ unsigned long ctrlport_offset; int ctrl_ioc; const char name[16]; - /* - * netdev flags and port - */ - unsigned short flags; - unsigned char if_port; + u32 supported; unsigned char tx_start_page; unsigned char stop_page; }; @@ -86,7 +88,7 @@ MODULE_LICENSE("GPL"); static char version[] __initdata = - "EtherH/EtherM Driver (c) 2002 Russell King v1.09\n"; + "EtherH/EtherM Driver (c) 2002-2004 Russell King " DRV_VERSION "\n"; #define ETHERH500_DATAPORT 0x800 /* MEMC */ #define ETHERH500_NS8390 0x000 /* MEMC */ @@ -166,7 +168,8 @@ etherh_setif(struct net_device *dev) { struct ei_device *ei_local = netdev_priv(dev); - unsigned long addr, flags; + unsigned long flags; + void __iomem *addr; local_irq_save(flags); @@ -174,7 +177,7 @@ switch (etherh_priv(dev)->id) { case PROD_I3_ETHERLAN600: case PROD_I3_ETHERLAN600A: - addr = dev->base_addr + EN0_RCNTHI; + addr = (void *)dev->base_addr + EN0_RCNTHI; switch (dev->if_port) { case IF_PORT_10BASE2: @@ -209,17 +212,19 @@ etherh_getifstat(struct net_device *dev) { struct ei_device *ei_local = netdev_priv(dev); + void __iomem *addr; int stat = 0; switch (etherh_priv(dev)->id) { case PROD_I3_ETHERLAN600: case PROD_I3_ETHERLAN600A: + addr = (void *)dev->base_addr + EN0_RCNTHI; switch (dev->if_port) { case IF_PORT_10BASE2: stat = 1; break; case IF_PORT_10BASET: - stat = readb(dev->base_addr+EN0_RCNTHI) & 4; + stat = readb(addr) & 4; break; } break; @@ -276,8 +281,9 @@ etherh_reset(struct net_device *dev) { struct ei_device *ei_local = netdev_priv(dev); + void __iomem *addr = (void *)dev->base_addr; - writeb(E8390_NODMA+E8390_PAGE0+E8390_STOP, dev->base_addr); + writeb(E8390_NODMA+E8390_PAGE0+E8390_STOP, addr); /* * See if we need to change the interface type. @@ -303,8 +309,8 @@ etherh_block_output (struct net_device *dev, int count, const unsigned char *buf, int start_page) { struct ei_device *ei_local = netdev_priv(dev); - unsigned int addr, dma_addr; unsigned long dma_start; + void __iomem *dma_base, *addr; if (ei_local->dmaing) { printk(KERN_ERR "%s: DMAing conflict in etherh_block_input: " @@ -321,8 +327,8 @@ ei_local->dmaing = 1; - addr = dev->base_addr; - dma_addr = dev->mem_start; + addr = (void *)dev->base_addr; + dma_base = etherh_priv(dev)->dma_base; count = (count + 1) & ~1; writeb (E8390_NODMA | E8390_PAGE0 | E8390_START, addr + E8390_CMD); @@ -343,9 +349,9 @@ writeb (E8390_RWRITE | E8390_START, addr + E8390_CMD); if (ei_local->word16) - writesw (dma_addr, buf, count >> 1); + writesw (dma_base, buf, count >> 1); else - writesb (dma_addr, buf, count); + writesb (dma_base, buf, count); dma_start = jiffies; @@ -369,8 +375,8 @@ etherh_block_input (struct net_device *dev, int count, struct sk_buff *skb, int ring_offset) { struct ei_device *ei_local = netdev_priv(dev); - unsigned int addr, dma_addr; unsigned char *buf; + void __iomem *dma_base, *addr; if (ei_local->dmaing) { printk(KERN_ERR "%s: DMAing conflict in etherh_block_input: " @@ -381,8 +387,8 @@ ei_local->dmaing = 1; - addr = dev->base_addr; - dma_addr = dev->mem_start; + addr = (void *)dev->base_addr; + dma_base = etherh_priv(dev)->dma_base; buf = skb->data; writeb (E8390_NODMA | E8390_PAGE0 | E8390_START, addr + E8390_CMD); @@ -393,11 +399,11 @@ writeb (E8390_RREAD | E8390_START, addr + E8390_CMD); if (ei_local->word16) { - readsw (dma_addr, buf, count >> 1); + readsw (dma_base, buf, count >> 1); if (count & 1) - buf[count - 1] = readb (dma_addr); + buf[count - 1] = readb (dma_base); } else - readsb (dma_addr, buf, count); + readsb (dma_base, buf, count); writeb (ENISR_RDC, addr + EN0_ISR); ei_local->dmaing = 0; @@ -410,7 +416,7 @@ etherh_get_header (struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page) { struct ei_device *ei_local = netdev_priv(dev); - unsigned int addr, dma_addr; + void __iomem *dma_base, *addr; if (ei_local->dmaing) { printk(KERN_ERR "%s: DMAing conflict in etherh_get_header: " @@ -421,8 +427,8 @@ ei_local->dmaing = 1; - addr = dev->base_addr; - dma_addr = dev->mem_start; + addr = (void *)dev->base_addr; + dma_base = etherh_priv(dev)->dma_base; writeb (E8390_NODMA | E8390_PAGE0 | E8390_START, addr + E8390_CMD); writeb (sizeof (*hdr), addr + EN0_RCNTLO); @@ -432,9 +438,9 @@ writeb (E8390_RREAD | E8390_START, addr + E8390_CMD); if (ei_local->word16) - readsw (dma_addr, hdr, sizeof (*hdr) >> 1); + readsw (dma_base, hdr, sizeof (*hdr) >> 1); else - readsb (dma_addr, hdr, sizeof (*hdr)); + readsb (dma_base, hdr, sizeof (*hdr)); writeb (ENISR_RDC, addr + EN0_ISR); ei_local->dmaing = 0; @@ -522,16 +528,30 @@ struct in_chunk_dir cd; char *s; - if (ecard_readchunk(&cd, ec, 0xf5, 0) && (s = strchr(cd.d.string, '('))) { + if (!ecard_readchunk(&cd, ec, 0xf5, 0)) { + printk(KERN_ERR "%s: unable to read podule description string\n", + ec->dev.bus_id); + goto no_addr; + } + + s = strchr(cd.d.string, '('); + if (s) { int i; + for (i = 0; i < 6; i++) { addr[i] = simple_strtoul(s + 1, &s, 0x10); if (*s != (i == 5? ')' : ':')) break; } + if (i == 6) return 0; } + + printk(KERN_ERR "%s: unable to parse MAC address: %s\n", + ec->dev.bus_id, cd.d.string); + + no_addr: return -ENODEV; } @@ -556,6 +576,62 @@ return 0; } +static void etherh_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) +{ + strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); + strlcpy(info->version, DRV_VERSION, sizeof(info->version)); + strlcpy(info->bus_info, dev->class_dev.dev->bus_id, + sizeof(info->bus_info)); +} + +static int etherh_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + cmd->supported = etherh_priv(dev)->supported; + cmd->speed = SPEED_10; + cmd->duplex = DUPLEX_HALF; + cmd->port = dev->if_port == IF_PORT_10BASET ? PORT_TP : PORT_BNC; + cmd->autoneg = dev->flags & IFF_AUTOMEDIA ? AUTONEG_ENABLE : AUTONEG_DISABLE; + return 0; +} + +static int etherh_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + switch (cmd->autoneg) { + case AUTONEG_ENABLE: + dev->flags |= IFF_AUTOMEDIA; + break; + + case AUTONEG_DISABLE: + switch (cmd->port) { + case PORT_TP: + dev->if_port = IF_PORT_10BASET; + break; + + case PORT_BNC: + dev->if_port = IF_PORT_10BASE2; + break; + + default: + return -EINVAL; + } + dev->flags &= ~IFF_AUTOMEDIA; + break; + + default: + return -EINVAL; + } + + etherh_setif(dev); + + return 0; +} + +static struct ethtool_ops etherh_ethtool_ops = { + .get_settings = etherh_get_settings, + .set_settings = etherh_set_settings, + .get_drvinfo = etherh_get_drvinfo, +}; + static u32 etherh_regoffsets[16]; static u32 etherm_regoffsets[16]; @@ -587,10 +663,21 @@ dev->stop = etherh_close; dev->set_config = etherh_set_config; dev->irq = ec->irq; - dev->if_port = data->if_port; - dev->flags |= data->flags; + dev->ethtool_ops = ðerh_ethtool_ops; + + if (data->supported & SUPPORTED_Autoneg) + dev->flags |= IFF_AUTOMEDIA; + if (data->supported & SUPPORTED_TP) { + dev->flags |= IFF_PORTSEL; + dev->if_port = IF_PORT_10BASET; + } else if (data->supported & SUPPORTED_BNC) { + dev->flags |= IFF_PORTSEL; + dev->if_port = IF_PORT_10BASE2; + } else + dev->if_port = IF_PORT_UNKNOWN; eh = etherh_priv(dev); + eh->supported = data->supported; eh->ctrl = 0; eh->id = ec->cid.product; eh->memc = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC), PAGE_SIZE); @@ -610,7 +697,7 @@ } dev->base_addr = (unsigned long)eh->memc + data->ns8390_offset; - dev->mem_start = (unsigned long)eh->memc + data->dataport_offset; + eh->dma_base = eh->memc + data->dataport_offset; eh->ctrl_port += data->ctrlport_offset; /* @@ -701,7 +788,7 @@ .dataport_offset = ETHERM_NS8390 + ETHERM_DATAPORT, .ctrlport_offset = ETHERM_NS8390 + ETHERM_CTRLPORT, .name = "ANT EtherM", - .if_port = IF_PORT_UNKNOWN, + .supported = SUPPORTED_10baseT_Half, .tx_start_page = ETHERM_TX_START_PAGE, .stop_page = ETHERM_STOP_PAGE, }; @@ -712,7 +799,7 @@ .ctrlport_offset = ETHERH500_CTRLPORT, .ctrl_ioc = 1, .name = "i3 EtherH 500", - .if_port = IF_PORT_UNKNOWN, + .supported = SUPPORTED_10baseT_Half, .tx_start_page = ETHERH_TX_START_PAGE, .stop_page = ETHERH_STOP_PAGE, }; @@ -722,8 +809,7 @@ .dataport_offset = ETHERH600_NS8390 + ETHERH600_DATAPORT, .ctrlport_offset = ETHERH600_NS8390 + ETHERH600_CTRLPORT, .name = "i3 EtherH 600", - .flags = IFF_PORTSEL | IFF_AUTOMEDIA, - .if_port = IF_PORT_10BASET, + .supported = SUPPORTED_10baseT_Half | SUPPORTED_TP | SUPPORTED_BNC | SUPPORTED_Autoneg, .tx_start_page = ETHERH_TX_START_PAGE, .stop_page = ETHERH_STOP_PAGE, }; @@ -733,8 +819,7 @@ .dataport_offset = ETHERH600_NS8390 + ETHERH600_DATAPORT, .ctrlport_offset = ETHERH600_NS8390 + ETHERH600_CTRLPORT, .name = "i3 EtherH 600A", - .flags = IFF_PORTSEL | IFF_AUTOMEDIA, - .if_port = IF_PORT_10BASET, + .supported = SUPPORTED_10baseT_Half | SUPPORTED_TP | SUPPORTED_BNC | SUPPORTED_Autoneg, .tx_start_page = ETHERH_TX_START_PAGE, .stop_page = ETHERH_STOP_PAGE, }; @@ -752,7 +837,7 @@ .remove = __devexit_p(etherh_remove), .id_table = etherh_ids, .drv = { - .name = "etherh", + .name = DRV_NAME, }, }; diff -Nru a/drivers/net/atarilance.c b/drivers/net/atarilance.c --- a/drivers/net/atarilance.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/net/atarilance.c 2004-11-10 17:19:07 -08:00 @@ -606,7 +606,7 @@ printk( " Use \"ifconfig hw ether ...\" to set the address.\n" ); } - lp->devlock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&lp->devlock); MEM->init.mode = 0x0000; /* Disable Rx and Tx. */ for( i = 0; i < 6; i++ ) diff -Nru a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c --- a/drivers/net/bonding/bond_main.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/net/bonding/bond_main.c 2004-11-10 17:19:06 -08:00 @@ -4700,6 +4700,7 @@ module_init(bonding_init); module_exit(bonding_exit); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); MODULE_DESCRIPTION(DRV_DESCRIPTION ", v" DRV_VERSION); MODULE_AUTHOR("Thomas Davis, tadavis@lbl.gov and many others"); MODULE_SUPPORTED_DEVICE("most ethernet devices"); diff -Nru a/drivers/net/defxx.c b/drivers/net/defxx.c --- a/drivers/net/defxx.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/defxx.c 2004-11-10 17:19:02 -08:00 @@ -19,7 +19,7 @@ * LVS Lawrence V. Stefani * * Maintainers: - * macro Maciej W. Rozycki + * macro Maciej W. Rozycki * * Credits: * I'd like to thank Patricia Cross for helping me get started with @@ -190,6 +190,7 @@ * Feb 2001 Skb allocation fixes * Feb 2001 davej PCI enable cleanups. * 04 Aug 2003 macro Converted to the DMA API. + * 14 Aug 2004 macro Fix device names reported. */ /* Include files */ @@ -214,12 +215,14 @@ #include "defxx.h" -/* Version information string - should be updated prior to each new release!!! */ +/* Version information string should be updated prior to each new release! */ +#define DRV_NAME "defxx" +#define DRV_VERSION "v1.07" +#define DRV_RELDATE "2004/08/14" static char version[] __devinitdata = - "defxx.c:v1.06 2003/08/04 Lawrence V. Stefani and others\n"; - -#define DRV_NAME "defxx" + DRV_NAME ": " DRV_VERSION " " DRV_RELDATE + " Lawrence V. Stefani and others\n"; #define DYNAMIC_BUFFERS 1 @@ -235,7 +238,7 @@ static void dfx_bus_init(struct net_device *dev); static void dfx_bus_config_check(DFX_board_t *bp); -static int dfx_driver_init(struct net_device *dev); +static int dfx_driver_init(struct net_device *dev, const char *print_name); static int dfx_adap_init(DFX_board_t *bp, int get_buffers); static int dfx_open(struct net_device *dev); @@ -404,24 +407,25 @@ */ static int __devinit dfx_init_one_pci_or_eisa(struct pci_dev *pdev, long ioaddr) { + static int version_disp; + char *print_name = DRV_NAME; struct net_device *dev; DFX_board_t *bp; /* board pointer */ int alloc_size; /* total buffer size used */ int err; -#ifndef MODULE - static int version_disp; - - if (!version_disp) /* display version info if adapter is found */ - { + if (!version_disp) { /* display version info if adapter is found */ version_disp = 1; /* set display flag to TRUE so that */ printk(version); /* we only display this string ONCE */ } -#endif + + if (pdev != NULL) + print_name = pdev->slot_name; dev = alloc_fddidev(sizeof(*bp)); if (!dev) { - printk (KERN_ERR "defxx: unable to allocate fddidev, aborting\n"); + printk(KERN_ERR "%s: unable to allocate fddidev, aborting\n", + print_name); return -ENOMEM; } @@ -437,9 +441,12 @@ bp = dev->priv; - if (!request_region (ioaddr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, DRV_NAME)) { - printk (KERN_ERR "%s: Cannot reserve I/O resource 0x%x @ 0x%lx, aborting\n", - DRV_NAME, PFI_K_CSR_IO_LEN, ioaddr); + if (!request_region(ioaddr, + pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, + print_name)) { + printk(KERN_ERR "%s: Cannot reserve I/O resource " + "0x%x @ 0x%lx, aborting\n", print_name, + pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, ioaddr); err = -EBUSY; goto err_out; } @@ -468,7 +475,7 @@ pci_set_master (pdev); } - if (dfx_driver_init(dev) != DFX_K_SUCCESS) { + if (dfx_driver_init(dev, print_name) != DFX_K_SUCCESS) { err = -ENODEV; goto err_out_region; } @@ -477,6 +484,7 @@ if (err) goto err_out_kfree; + printk("%s: registered as %s\n", print_name, dev->name); return 0; err_out_kfree: @@ -770,6 +778,7 @@ * * Arguments: * dev - pointer to device information + * print_name - printable device name * * Functional Description: * This function allocates additional resources such as the host memory @@ -792,7 +801,8 @@ * returning from this routine. */ -static int __devinit dfx_driver_init(struct net_device *dev) +static int __devinit dfx_driver_init(struct net_device *dev, + const char *print_name) { DFX_board_t *bp = dev->priv; int alloc_size; /* total buffer size needed */ @@ -841,26 +851,20 @@ /* Read the factory MAC address from the adapter then save it */ - if (dfx_hw_port_ctrl_req(bp, - PI_PCTRL_M_MLA, - PI_PDATA_A_MLA_K_LO, - 0, - &data) != DFX_K_SUCCESS) - { - printk("%s: Could not read adapter factory MAC address!\n", dev->name); + if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_MLA, PI_PDATA_A_MLA_K_LO, 0, + &data) != DFX_K_SUCCESS) { + printk("%s: Could not read adapter factory MAC address!\n", + print_name); return(DFX_K_FAILURE); - } + } memcpy(&bp->factory_mac_addr[0], &data, sizeof(u32)); - if (dfx_hw_port_ctrl_req(bp, - PI_PCTRL_M_MLA, - PI_PDATA_A_MLA_K_HI, - 0, - &data) != DFX_K_SUCCESS) - { - printk("%s: Could not read adapter factory MAC address!\n", dev->name); + if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_MLA, PI_PDATA_A_MLA_K_HI, 0, + &data) != DFX_K_SUCCESS) { + printk("%s: Could not read adapter factory MAC address!\n", + print_name); return(DFX_K_FAILURE); - } + } memcpy(&bp->factory_mac_addr[4], &data, sizeof(u16)); /* @@ -872,27 +876,19 @@ memcpy(dev->dev_addr, bp->factory_mac_addr, FDDI_K_ALEN); if (bp->bus_type == DFX_BUS_TYPE_EISA) - printk("%s: DEFEA at I/O addr = 0x%lX, IRQ = %d, Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n", - dev->name, - dev->base_addr, - dev->irq, - dev->dev_addr[0], - dev->dev_addr[1], - dev->dev_addr[2], - dev->dev_addr[3], - dev->dev_addr[4], - dev->dev_addr[5]); + printk("%s: DEFEA at I/O addr = 0x%lX, IRQ = %d, " + "Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n", + print_name, dev->base_addr, dev->irq, + dev->dev_addr[0], dev->dev_addr[1], + dev->dev_addr[2], dev->dev_addr[3], + dev->dev_addr[4], dev->dev_addr[5]); else - printk("%s: DEFPA at I/O addr = 0x%lX, IRQ = %d, Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n", - dev->name, - dev->base_addr, - dev->irq, - dev->dev_addr[0], - dev->dev_addr[1], - dev->dev_addr[2], - dev->dev_addr[3], - dev->dev_addr[4], - dev->dev_addr[5]); + printk("%s: DEFPA at I/O addr = 0x%lX, IRQ = %d, " + "Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n", + print_name, dev->base_addr, dev->irq, + dev->dev_addr[0], dev->dev_addr[1], + dev->dev_addr[2], dev->dev_addr[3], + dev->dev_addr[4], dev->dev_addr[5]); /* * Get memory for descriptor block, consumer block, and other buffers @@ -909,11 +905,11 @@ (PI_ALIGN_K_DESC_BLK - 1); bp->kmalloced = top_v = pci_alloc_consistent(bp->pci_dev, alloc_size, &bp->kmalloced_dma); - if (top_v == NULL) - { - printk("%s: Could not allocate memory for host buffers and structures!\n", dev->name); + if (top_v == NULL) { + printk("%s: Could not allocate memory for host buffers " + "and structures!\n", print_name); return(DFX_K_FAILURE); - } + } memset(top_v, 0, alloc_size); /* zero out memory before continuing */ top_p = bp->kmalloced_dma; /* get physical address of buffer */ @@ -970,14 +966,20 @@ /* Display virtual and physical addresses if debug driver */ - DBG_printk("%s: Descriptor block virt = %0lX, phys = %0X\n", dev->name, (long)bp->descr_block_virt, bp->descr_block_phys); - DBG_printk("%s: Command Request buffer virt = %0lX, phys = %0X\n", dev->name, (long)bp->cmd_req_virt, bp->cmd_req_phys); - DBG_printk("%s: Command Response buffer virt = %0lX, phys = %0X\n", dev->name, (long)bp->cmd_rsp_virt, bp->cmd_rsp_phys); - DBG_printk("%s: Receive buffer block virt = %0lX, phys = %0X\n", dev->name, (long)bp->rcv_block_virt, bp->rcv_block_phys); - DBG_printk("%s: Consumer block virt = %0lX, phys = %0X\n", dev->name, (long)bp->cons_block_virt, bp->cons_block_phys); + DBG_printk("%s: Descriptor block virt = %0lX, phys = %0X\n", + print_name, + (long)bp->descr_block_virt, bp->descr_block_phys); + DBG_printk("%s: Command Request buffer virt = %0lX, phys = %0X\n", + print_name, (long)bp->cmd_req_virt, bp->cmd_req_phys); + DBG_printk("%s: Command Response buffer virt = %0lX, phys = %0X\n", + print_name, (long)bp->cmd_rsp_virt, bp->cmd_rsp_phys); + DBG_printk("%s: Receive buffer block virt = %0lX, phys = %0X\n", + print_name, (long)bp->rcv_block_virt, bp->rcv_block_phys); + DBG_printk("%s: Consumer block virt = %0lX, phys = %0X\n", + print_name, (long)bp->cons_block_virt, bp->cons_block_phys); return(DFX_K_SUCCESS); - } +} /* @@ -2668,12 +2670,12 @@ static void my_skb_align(struct sk_buff *skb, int n) { - unsigned long x=(unsigned long)skb->data; + unsigned long x = (unsigned long)skb->data; unsigned long v; - v=(x+n-1)&~(n-1); /* Where we want to be */ + v = ALIGN(x, n); /* Where we want to be */ - skb_reserve(skb, v-x); + skb_reserve(skb, v - x); } @@ -3428,11 +3430,6 @@ { int rc_pci, rc_eisa; -/* when a module, this is printed whether or not devices are found in probe */ -#ifdef MODULE - printk(version); -#endif - rc_pci = pci_module_init(&dfx_driver); if (rc_pci >= 0) dfx_have_pci = 1; @@ -3453,6 +3450,9 @@ module_init(dfx_init); module_exit(dfx_cleanup); +MODULE_AUTHOR("Lawrence V. Stefani"); +MODULE_DESCRIPTION("DEC FDDIcontroller EISA/PCI (DEFEA/DEFPA) driver " + DRV_VERSION " " DRV_RELDATE); MODULE_LICENSE("GPL"); diff -Nru a/drivers/net/defxx.h b/drivers/net/defxx.h --- a/drivers/net/defxx.h 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/defxx.h 2004-11-10 17:19:04 -08:00 @@ -16,7 +16,7 @@ * LVS Lawrence V. Stefani * * Maintainers: - * macro Maciej W. Rozycki + * macro Maciej W. Rozycki * * Modification History: * Date Name Description diff -Nru a/drivers/net/depca.c b/drivers/net/depca.c --- a/drivers/net/depca.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/depca.c 2004-11-10 17:19:04 -08:00 @@ -666,7 +666,7 @@ outb(nicsr, DEPCA_NICSR); } - lp->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&lp->lock); sprintf(lp->adapter_name, "%s (%s)", depca_signature[lp->adapter], device->bus_id); status = -EBUSY; diff -Nru a/drivers/net/dummy.c b/drivers/net/dummy.c --- a/drivers/net/dummy.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/dummy.c 2004-11-10 17:19:04 -08:00 @@ -77,7 +77,7 @@ static int dummy_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = dev->priv; + struct net_device_stats *stats = netdev_priv(dev); stats->tx_packets++; stats->tx_bytes+=skb->len; @@ -88,7 +88,7 @@ static struct net_device_stats *dummy_get_stats(struct net_device *dev) { - return dev->priv; + return netdev_priv(dev); } static struct net_device **dummies; diff -Nru a/drivers/net/e100.c b/drivers/net/e100.c --- a/drivers/net/e100.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/net/e100.c 2004-11-10 17:19:07 -08:00 @@ -154,8 +154,8 @@ #define DRV_NAME "e100" -#define DRV_EXT "-NAPI" -#define DRV_VERSION "3.0.27-k2"DRV_EXT +#define DRV_EXT "-NAPI" +#define DRV_VERSION "3.2.3-k2"DRV_EXT #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_COPYRIGHT "Copyright(c) 1999-2004 Intel Corporation" #define PFX DRV_NAME ": " @@ -574,13 +574,21 @@ static inline void e100_enable_irq(struct nic *nic) { + unsigned long flags; + + spin_lock_irqsave(&nic->cmd_lock, flags); writeb(irq_mask_none, &nic->csr->scb.cmd_hi); + spin_unlock_irqrestore(&nic->cmd_lock, flags); e100_write_flush(nic); } static inline void e100_disable_irq(struct nic *nic) { + unsigned long flags; + + spin_lock_irqsave(&nic->cmd_lock, flags); writeb(irq_mask_all, &nic->csr->scb.cmd_hi); + spin_unlock_irqrestore(&nic->cmd_lock, flags); e100_write_flush(nic); } @@ -595,16 +603,6 @@ writel(software_reset, &nic->csr->port); e100_write_flush(nic); udelay(20); - /* TCO workaround - 82559 and greater */ - if(nic->mac >= mac_82559_D101M) { - /* Issue a redundant CU load base without setting - * general pointer, and without waiting for scb to - * clear. This gets us into post-driver. Finally, - * wait 20 msec for reset to take effect. */ - writeb(cuc_load_base, &nic->csr->scb.cmd_lo); - mdelay(20); - } - /* Mask off our interrupt line - it's unmasked after reset */ e100_disable_irq(nic); } @@ -1253,8 +1251,13 @@ mii_check_link(&nic->mii); /* Software generated interrupt to recover from (rare) Rx - * allocation failure */ - writeb(irq_sw_gen, &nic->csr->scb.cmd_hi); + * allocation failure. + * Unfortunately have to use a spinlock to not re-enable interrupts + * accidentally, due to hardware that shares a register between the + * interrupt mask bit and the SW Interrupt generation bit */ + spin_lock_irq(&nic->cmd_lock); + writeb(readb(&nic->csr->scb.cmd_hi) | irq_sw_gen,&nic->csr->scb.cmd_hi); + spin_unlock_irq(&nic->cmd_lock); e100_write_flush(nic); e100_update_stats(nic); @@ -1304,6 +1307,7 @@ switch(err) { case -ENOSPC: /* We queued the skb, but now we're out of space. */ + DPRINTK(TX_ERR, DEBUG, "No space for CB\n"); netif_stop_queue(netdev); break; case -ENOMEM: @@ -1424,14 +1428,12 @@ #define RFD_BUF_LEN (sizeof(struct rfd) + VLAN_ETH_FRAME_LEN) static inline int e100_rx_alloc_skb(struct nic *nic, struct rx *rx) { - unsigned int rx_offset = 2; /* u32 align protocol headers */ - - if(!(rx->skb = dev_alloc_skb(RFD_BUF_LEN + rx_offset))) + if(!(rx->skb = dev_alloc_skb(RFD_BUF_LEN + NET_IP_ALIGN))) return -ENOMEM; /* Align, init, and map the RFD. */ rx->skb->dev = nic->netdev; - skb_reserve(rx->skb, rx_offset); + skb_reserve(rx->skb, NET_IP_ALIGN); memcpy(rx->skb->data, &nic->blank_rfd, sizeof(struct rfd)); rx->dma_addr = pci_map_single(nic->pdev, rx->skb->data, RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL); @@ -1470,7 +1472,7 @@ /* If data isn't ready, nothing to indicate */ if(unlikely(!(rfd_status & cb_complete))) - return -EAGAIN; + return -EAGAIN; /* Get actual data size */ actual_size = le16_to_cpu(rfd->actual_size) & 0x3FFF; @@ -1762,7 +1764,7 @@ if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd), skb->data, ETH_DATA_LEN)) - err = -EAGAIN; + err = -EAGAIN; err_loopback_none: mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, 0); @@ -1955,12 +1957,17 @@ struct param_range *rfds = &nic->params.rfds; struct param_range *cbs = &nic->params.cbs; + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + return -EINVAL; + if(netif_running(netdev)) e100_down(nic); rfds->count = max(ring->rx_pending, rfds->min); rfds->count = min(rfds->count, rfds->max); cbs->count = max(ring->tx_pending, cbs->min); cbs->count = min(cbs->count, cbs->max); + DPRINTK(DRV, INFO, "Ring Param settings: rx: %d, tx %d\n", + rfds->count, cbs->count); if(netif_running(netdev)) e100_up(nic); @@ -2172,6 +2179,7 @@ #ifdef CONFIG_NET_POLL_CONTROLLER netdev->poll_controller = e100_netpoll; #endif + strcpy(netdev->name, pci_name(pdev)); nic = netdev_priv(netdev); nic->netdev = netdev; @@ -2255,6 +2263,7 @@ pci_enable_wake(pdev, 0, nic->flags & (wol_magic | e100_asf(nic))); + strcpy(netdev->name, "eth%d"); if((err = register_netdev(netdev))) { DPRINTK(PROBE, ERR, "Cannot register net device, aborting.\n"); goto err_out_free; @@ -2351,7 +2360,7 @@ printk(KERN_INFO PFX "%s, %s\n", DRV_DESCRIPTION, DRV_VERSION); printk(KERN_INFO PFX "%s\n", DRV_COPYRIGHT); } - return pci_module_init(&e100_driver); + return pci_module_init(&e100_driver); } static void __exit e100_cleanup_module(void) diff -Nru a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h --- a/drivers/net/e1000/e1000.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/e1000/e1000.h 2004-11-10 17:19:02 -08:00 @@ -64,7 +64,6 @@ #include #include #include -#include #include #ifdef NETIF_F_TSO #include @@ -73,7 +72,6 @@ #include #include #include -#include #define BAR_0 0 #define BAR_1 1 diff -Nru a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c --- a/drivers/net/e1000/e1000_ethtool.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/e1000/e1000_ethtool.c 2004-11-10 17:19:04 -08:00 @@ -249,7 +249,8 @@ e1000_reset(adapter); } else - return e1000_force_mac_fc(hw); + return ((hw->media_type == e1000_media_type_fiber) ? + e1000_setup_link(hw) : e1000_force_mac_fc(hw)); return 0; } @@ -592,6 +593,9 @@ tx_old = adapter->tx_ring; rx_old = adapter->rx_ring; + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + return -EINVAL; + if(netif_running(adapter->netdev)) e1000_down(adapter); @@ -637,7 +641,6 @@ return err; } - #define REG_PATTERN_TEST(R, M, W) \ { \ uint32_t pat, value; \ @@ -1017,8 +1020,8 @@ struct e1000_rx_desc *rx_desc = E1000_RX_DESC(*rxdr, i); struct sk_buff *skb; - if(!(skb = alloc_skb(E1000_RXBUFFER_2048 + NET_IP_ALIGN, - GFP_KERNEL))) { + if(!(skb = alloc_skb(E1000_RXBUFFER_2048 + NET_IP_ALIGN, + GFP_KERNEL))) { ret_val = 6; goto err_nomem; } @@ -1442,6 +1445,8 @@ case E1000_DEV_ID_82543GC_COPPER: case E1000_DEV_ID_82544EI_FIBER: case E1000_DEV_ID_82546EB_QUAD_COPPER: + case E1000_DEV_ID_82545EM_FIBER: + case E1000_DEV_ID_82545EM_COPPER: wol->supported = 0; wol->wolopts = 0; return; diff -Nru a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c --- a/drivers/net/e1000/e1000_hw.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/net/e1000/e1000_hw.c 2004-11-10 17:19:07 -08:00 @@ -65,6 +65,7 @@ static void e1000_standby_eeprom(struct e1000_hw *hw); static int32_t e1000_id_led_init(struct e1000_hw * hw); static int32_t e1000_set_vco_speed(struct e1000_hw *hw); +static int32_t e1000_polarity_reversal_workaround(struct e1000_hw *hw); static int32_t e1000_set_phy_mode(struct e1000_hw *hw); /* IGP cable length table */ @@ -1594,6 +1595,15 @@ ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); if(ret_val) return ret_val; + + if((hw->mac_type == e1000_82544 || hw->mac_type == e1000_82543) && + (!hw->autoneg) && + (hw->forced_speed_duplex == e1000_10_full || + hw->forced_speed_duplex == e1000_10_half)) { + ret_val = e1000_polarity_reversal_workaround(hw); + if(ret_val) + return ret_val; + } } return E1000_SUCCESS; } @@ -1983,6 +1993,7 @@ uint32_t ctrl; uint32_t status; uint32_t rctl; + uint32_t icr; uint32_t signal = 0; int32_t ret_val; uint16_t phy_data; @@ -2032,6 +2043,25 @@ * link-up */ e1000_check_downshift(hw); + /* If we are on 82544 or 82543 silicon and speed/duplex + * are forced to 10H or 10F, then we will implement the polarity + * reversal workaround. We disable interrupts first, and upon + * returning, place the devices interrupt state to its previous + * value except for the link status change interrupt which will + * happen due to the execution of this workaround. + */ + + if((hw->mac_type == e1000_82544 || hw->mac_type == e1000_82543) && + (!hw->autoneg) && + (hw->forced_speed_duplex == e1000_10_full || + hw->forced_speed_duplex == e1000_10_half)) { + E1000_WRITE_REG(hw, IMC, 0xffffffff); + ret_val = e1000_polarity_reversal_workaround(hw); + icr = E1000_READ_REG(hw, ICR); + E1000_WRITE_REG(hw, ICS, (icr & ~E1000_ICS_LSC)); + E1000_WRITE_REG(hw, IMS, IMS_ENABLE_MASK); + } + } else { /* No link detected */ e1000_config_dsp_after_link_change(hw, FALSE); @@ -5191,28 +5221,88 @@ return E1000_SUCCESS; } -/****************************************************************************** - * Verifies the hardware needs to allow ARPs to be processed by the host - * - * hw - Struct containing variables accessed by shared code - * - * returns: - TRUE/FALSE - * - *****************************************************************************/ -uint32_t -e1000_enable_mng_pass_thru(struct e1000_hw *hw) +static int32_t +e1000_polarity_reversal_workaround(struct e1000_hw *hw) { - uint32_t manc; + int32_t ret_val; + uint16_t mii_status_reg; + uint16_t i; - if (hw->asf_firmware_present) { - manc = E1000_READ_REG(hw, MANC); + /* Polarity reversal workaround for forced 10F/10H links. */ + + /* Disable the transmitter on the PHY */ + + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019); + if(ret_val) + return ret_val; + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFFF); + if(ret_val) + return ret_val; + + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0000); + if(ret_val) + return ret_val; + + /* This loop will early-out if the NO link condition has been met. */ + for(i = PHY_FORCE_TIME; i > 0; i--) { + /* Read the MII Status Register and wait for Link Status bit + * to be clear. + */ + + ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) + return ret_val; + + ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) + return ret_val; + + if((mii_status_reg & ~MII_SR_LINK_STATUS) == 0) break; + msec_delay_irq(100); + } + + /* Recommended delay time after link has been lost */ + msec_delay_irq(1000); + + /* Now we will re-enable th transmitter on the PHY */ + + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019); + if(ret_val) + return ret_val; + msec_delay_irq(50); + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFF0); + if(ret_val) + return ret_val; + msec_delay_irq(50); + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFF00); + if(ret_val) + return ret_val; + msec_delay_irq(50); + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0x0000); + if(ret_val) + return ret_val; - if (!(manc & E1000_MANC_RCV_TCO_EN) || - !(manc & E1000_MANC_EN_MAC_ADDR_FILTER)) - return FALSE; - if ((manc & E1000_MANC_SMBUS_EN) && !(manc & E1000_MANC_ASF_EN)) - return TRUE; + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0000); + if(ret_val) + return ret_val; + + /* This loop will early-out if the link condition has been met. */ + for(i = PHY_FORCE_TIME; i > 0; i--) { + /* Read the MII Status Register and wait for Link Status bit + * to be set. + */ + + ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) + return ret_val; + + ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) + return ret_val; + + if(mii_status_reg & MII_SR_LINK_STATUS) break; + msec_delay_irq(100); } - return FALSE; + return E1000_SUCCESS; } diff -Nru a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c --- a/drivers/net/e1000/e1000_main.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/e1000/e1000_main.c 2004-11-10 17:19:04 -08:00 @@ -48,7 +48,7 @@ #else #define DRIVERNAPI "-NAPI" #endif -char e1000_driver_version[] = "5.3.19-k2"DRIVERNAPI; +char e1000_driver_version[] = "5.5.4-k2"DRIVERNAPI; char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation."; /* e1000_pci_tbl - PCI Device ID Table @@ -311,7 +311,8 @@ void e1000_reset(struct e1000_adapter *adapter) { - uint32_t pba, manc; + uint32_t pba; + /* Repartition Pba for greater than 9k mtu * To take effect CTRL.RST is required. */ @@ -354,12 +355,6 @@ e1000_reset_adaptive(&adapter->hw); e1000_phy_get_info(&adapter->hw, &adapter->phy_info); - - if(adapter->en_mng_pt) { - manc = E1000_READ_REG(&adapter->hw, MANC); - manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST); - E1000_WRITE_REG(&adapter->hw, MANC, manc); - } } /** @@ -422,11 +417,6 @@ adapter->hw.back = adapter; adapter->msg_enable = (1 << debug) - 1; - rtnl_lock(); - /* we need to set the name early for the DPRINTK macro */ - if(dev_alloc_name(netdev, netdev->name) < 0) - goto err_free_unlock; - mmio_start = pci_resource_start(pdev, BAR_0); mmio_len = pci_resource_len(pdev, BAR_0); @@ -466,6 +456,7 @@ #ifdef CONFIG_NET_POLL_CONTROLLER netdev->poll_controller = e1000_netpoll; #endif + strcpy(netdev->name, pci_name(pdev)); netdev->mem_start = mmio_start; netdev->mem_end = mmio_start + mmio_len; @@ -502,8 +493,6 @@ /* hard_start_xmit is safe against parallel locking */ netdev->features |= NETIF_F_LLTX; - adapter->en_mng_pt = e1000_enable_mng_pass_thru(&adapter->hw); - /* before reading the EEPROM, reset the controller to * put the device in a known good starting state */ @@ -553,7 +542,6 @@ netif_carrier_off(netdev); netif_stop_queue(netdev); - DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection\n"); e1000_check_options(adapter); /* Initial Wake on LAN setting @@ -586,12 +574,13 @@ /* reset the hardware with the new settings */ e1000_reset(adapter); - /* We're already holding the rtnl lock; call the no-lock version */ - if((err = register_netdevice(netdev))) + strcpy(netdev->name, "eth%d"); + if((err = register_netdev(netdev))) goto err_register; + DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection\n"); + cards_found++; - rtnl_unlock(); return 0; err_register: @@ -599,8 +588,6 @@ err_eeprom: iounmap(adapter->hw.hw_addr); err_ioremap: -err_free_unlock: - rtnl_unlock(); free_netdev(netdev); err_alloc_etherdev: pci_release_regions(pdev); @@ -641,6 +628,8 @@ pci_release_regions(pdev); free_netdev(netdev); + + pci_disable_device(pdev); } /** @@ -2335,8 +2324,8 @@ if(unlikely(adapter->vlgrp && (rx_desc->status & E1000_RXD_STAT_VP))) { vlan_hwaccel_receive_skb(skb, adapter->vlgrp, - le16_to_cpu(rx_desc->special & - E1000_RXD_SPC_VLAN_MASK)); + le16_to_cpu(rx_desc->special) & + E1000_RXD_SPC_VLAN_MASK); } else { netif_receive_skb(skb); } @@ -2344,8 +2333,8 @@ if(unlikely(adapter->vlgrp && (rx_desc->status & E1000_RXD_STAT_VP))) { vlan_hwaccel_rx(skb, adapter->vlgrp, - le16_to_cpu(rx_desc->special & - E1000_RXD_SPC_VLAN_MASK)); + le16_to_cpu(rx_desc->special) & + E1000_RXD_SPC_VLAN_MASK); } else { netif_rx(skb); } @@ -2894,9 +2883,9 @@ { struct net_device *netdev = pci_get_drvdata(pdev); struct e1000_adapter *adapter = netdev->priv; - uint32_t manc; + uint32_t manc, ret; - pci_enable_device(pdev); + ret = pci_enable_device(pdev); pci_set_power_state(pdev, 0); pci_restore_state(pdev); diff -Nru a/drivers/net/e1000/e1000_osdep.h b/drivers/net/e1000/e1000_osdep.h --- a/drivers/net/e1000/e1000_osdep.h 2004-11-10 17:19:03 -08:00 +++ b/drivers/net/e1000/e1000_osdep.h 2004-11-10 17:19:03 -08:00 @@ -49,6 +49,12 @@ set_current_state(TASK_UNINTERRUPTIBLE); \ schedule_timeout((x * HZ)/1000 + 2); \ } } while(0) +/* Some workarounds require millisecond delays and are run during interrupt + * context. Most notably, when establishing link, the phy may need tweaking + * but cannot process phy register reads/writes faster than millisecond + * intervals...and we establish link due to a "link status change" interrupt. + */ +#define msec_delay_irq(x) mdelay(x) #endif #define PCI_COMMAND_REGISTER PCI_COMMAND diff -Nru a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c --- a/drivers/net/e1000/e1000_param.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/e1000/e1000_param.c 2004-11-10 17:19:05 -08:00 @@ -34,31 +34,21 @@ #define E1000_MAX_NIC 32 -#define OPTION_UNSET -1 +#define OPTION_UNSET -1 #define OPTION_DISABLED 0 #define OPTION_ENABLED 1 -/* Module Parameters are always initialized to -1, so that the driver - * can tell the difference between no user specified value or the - * user asking for the default value. - * The true default values are loaded in when e1000_check_options is called. - * - * This is a GCC extension to ANSI C. - * See the item "Labeled Elements in Initializers" in the section - * "Extensions to the C Language Family" of the GCC documentation. - */ - -#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } - /* All parameters are treated the same, as an integer array of values. * This macro just reduces the need to repeat the same declaration code * over and over (plus this helps to avoid typo bugs). */ -#define E1000_PARAM(X, S) \ -static const int __devinitdata X[E1000_MAX_NIC + 1] = E1000_PARAM_INIT; \ -MODULE_PARM(X, "1-" __MODULE_STRING(E1000_MAX_NIC) "i"); \ -MODULE_PARM_DESC(X, S); +#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } +#define E1000_PARAM(X, desc) \ + static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \ + static int num_##X = 0; \ + module_param_array(X, int, &num_##X, 0); \ + MODULE_PARM_DESC(X, desc); /* Transmit Descriptor Count * @@ -305,7 +295,6 @@ DPRINTK(PROBE, NOTICE, "Warning: no configuration for board #%i\n", bd); DPRINTK(PROBE, NOTICE, "Using defaults for all values\n"); - bd = E1000_MAX_NIC; } { /* Transmit Descriptor Count */ @@ -322,9 +311,14 @@ opt.arg.r.max = mac_type < e1000_82544 ? E1000_MAX_TXD : E1000_MAX_82544_TXD; - tx_ring->count = TxDescriptors[bd]; - e1000_validate_option(&tx_ring->count, &opt, adapter); - E1000_ROUNDUP(tx_ring->count, REQ_TX_DESCRIPTOR_MULTIPLE); + if (num_TxDescriptors > bd) { + tx_ring->count = TxDescriptors[bd]; + e1000_validate_option(&tx_ring->count, &opt, adapter); + E1000_ROUNDUP(tx_ring->count, + REQ_TX_DESCRIPTOR_MULTIPLE); + } else { + tx_ring->count = opt.def; + } } { /* Receive Descriptor Count */ struct e1000_option opt = { @@ -340,9 +334,14 @@ opt.arg.r.max = mac_type < e1000_82544 ? E1000_MAX_RXD : E1000_MAX_82544_RXD; - rx_ring->count = RxDescriptors[bd]; - e1000_validate_option(&rx_ring->count, &opt, adapter); - E1000_ROUNDUP(rx_ring->count, REQ_RX_DESCRIPTOR_MULTIPLE); + if (num_RxDescriptors > bd) { + rx_ring->count = RxDescriptors[bd]; + e1000_validate_option(&rx_ring->count, &opt, adapter); + E1000_ROUNDUP(rx_ring->count, + REQ_RX_DESCRIPTOR_MULTIPLE); + } else { + rx_ring->count = opt.def; + } } { /* Checksum Offload Enable/Disable */ struct e1000_option opt = { @@ -352,9 +351,13 @@ .def = OPTION_ENABLED }; - int rx_csum = XsumRX[bd]; - e1000_validate_option(&rx_csum, &opt, adapter); - adapter->rx_csum = rx_csum; + if (num_XsumRX > bd) { + int rx_csum = XsumRX[bd]; + e1000_validate_option(&rx_csum, &opt, adapter); + adapter->rx_csum = rx_csum; + } else { + adapter->rx_csum = opt.def; + } } { /* Flow Control */ @@ -374,9 +377,13 @@ .p = fc_list }} }; - int fc = FlowControl[bd]; - e1000_validate_option(&fc, &opt, adapter); - adapter->hw.fc = adapter->hw.original_fc = fc; + if (num_FlowControl > bd) { + int fc = FlowControl[bd]; + e1000_validate_option(&fc, &opt, adapter); + adapter->hw.fc = adapter->hw.original_fc = fc; + } else { + adapter->hw.fc = opt.def; + } } { /* Transmit Interrupt Delay */ struct e1000_option opt = { @@ -388,8 +395,13 @@ .max = MAX_TXDELAY }} }; - adapter->tx_int_delay = TxIntDelay[bd]; - e1000_validate_option(&adapter->tx_int_delay, &opt, adapter); + if (num_TxIntDelay > bd) { + adapter->tx_int_delay = TxIntDelay[bd]; + e1000_validate_option(&adapter->tx_int_delay, &opt, + adapter); + } else { + adapter->tx_int_delay = opt.def; + } } { /* Transmit Absolute Interrupt Delay */ struct e1000_option opt = { @@ -401,8 +413,13 @@ .max = MAX_TXABSDELAY }} }; - adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; - e1000_validate_option(&adapter->tx_abs_int_delay, &opt, adapter); + if (num_TxAbsIntDelay > bd) { + adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; + e1000_validate_option(&adapter->tx_abs_int_delay, &opt, + adapter); + } else { + adapter->tx_abs_int_delay = opt.def; + } } { /* Receive Interrupt Delay */ struct e1000_option opt = { @@ -414,8 +431,13 @@ .max = MAX_RXDELAY }} }; - adapter->rx_int_delay = RxIntDelay[bd]; - e1000_validate_option(&adapter->rx_int_delay, &opt, adapter); + if (num_RxIntDelay > bd) { + adapter->rx_int_delay = RxIntDelay[bd]; + e1000_validate_option(&adapter->rx_int_delay, &opt, + adapter); + } else { + adapter->rx_int_delay = opt.def; + } } { /* Receive Absolute Interrupt Delay */ struct e1000_option opt = { @@ -427,8 +449,13 @@ .max = MAX_RXABSDELAY }} }; - adapter->rx_abs_int_delay = RxAbsIntDelay[bd]; - e1000_validate_option(&adapter->rx_abs_int_delay, &opt, adapter); + if (num_RxAbsIntDelay > bd) { + adapter->rx_abs_int_delay = RxAbsIntDelay[bd]; + e1000_validate_option(&adapter->rx_abs_int_delay, &opt, + adapter); + } else { + adapter->rx_abs_int_delay = opt.def; + } } { /* Interrupt Throttling Rate */ struct e1000_option opt = { @@ -440,20 +467,27 @@ .max = MAX_ITR }} }; - adapter->itr = InterruptThrottleRate[bd]; - switch(adapter->itr) { - case -1: + if (num_InterruptThrottleRate > bd) { + adapter->itr = InterruptThrottleRate[bd]; + switch(adapter->itr) { + case -1: + adapter->itr = 1; + break; + case 0: + DPRINTK(PROBE, INFO, "%s turned off\n", + opt.name); + break; + case 1: + DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", + opt.name); + break; + default: + e1000_validate_option(&adapter->itr, &opt, + adapter); + break; + } + } else { adapter->itr = 1; - break; - case 0: - DPRINTK(PROBE, INFO, "%s turned off\n", opt.name); - break; - case 1: - DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", opt.name); - break; - default: - e1000_validate_option(&adapter->itr, &opt, adapter); - break; } } @@ -481,17 +515,17 @@ e1000_check_fiber_options(struct e1000_adapter *adapter) { int bd = adapter->bd_number; - bd = bd > E1000_MAX_NIC ? E1000_MAX_NIC : bd; - - if((Speed[bd] != OPTION_UNSET)) { + if(num_Speed > bd) { DPRINTK(PROBE, INFO, "Speed not valid for fiber adapters, " "parameter ignored\n"); } - if((Duplex[bd] != OPTION_UNSET)) { + + if(num_Duplex > bd) { DPRINTK(PROBE, INFO, "Duplex not valid for fiber adapters, " "parameter ignored\n"); } - if((AutoNeg[bd] != OPTION_UNSET) && (AutoNeg[bd] != 0x20)) { + + if((num_AutoNeg > bd) && (AutoNeg[bd] != 0x20)) { DPRINTK(PROBE, INFO, "AutoNeg other than 1000/Full is " "not valid for fiber adapters, " "parameter ignored\n"); @@ -510,7 +544,6 @@ { int speed, dplx; int bd = adapter->bd_number; - bd = bd > E1000_MAX_NIC ? E1000_MAX_NIC : bd; { /* Speed */ struct e1000_opt_list speed_list[] = {{ 0, "" }, @@ -527,8 +560,12 @@ .p = speed_list }} }; - speed = Speed[bd]; - e1000_validate_option(&speed, &opt, adapter); + if (num_Speed > bd) { + speed = Speed[bd]; + e1000_validate_option(&speed, &opt, adapter); + } else { + speed = opt.def; + } } { /* Duplex */ struct e1000_opt_list dplx_list[] = {{ 0, "" }, @@ -544,11 +581,15 @@ .p = dplx_list }} }; - dplx = Duplex[bd]; - e1000_validate_option(&dplx, &opt, adapter); + if (num_Duplex > bd) { + dplx = Duplex[bd]; + e1000_validate_option(&dplx, &opt, adapter); + } else { + dplx = opt.def; + } } - if(AutoNeg[bd] != OPTION_UNSET && (speed != 0 || dplx != 0)) { + if((num_AutoNeg > bd) && (speed != 0 || dplx != 0)) { DPRINTK(PROBE, INFO, "AutoNeg specified along with Speed or Duplex, " "parameter ignored\n"); @@ -605,7 +646,7 @@ switch (speed + dplx) { case 0: adapter->hw.autoneg = adapter->fc_autoneg = 1; - if(Speed[bd] != OPTION_UNSET || Duplex[bd] != OPTION_UNSET) + if((num_Speed > bd) && (speed != 0 || dplx != 0)) DPRINTK(PROBE, INFO, "Speed and duplex autonegotiation enabled\n"); break; diff -Nru a/drivers/net/eql.c b/drivers/net/eql.c --- a/drivers/net/eql.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/net/eql.c 2004-11-10 17:19:06 -08:00 @@ -164,12 +164,12 @@ static void __init eql_setup(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); SET_MODULE_OWNER(dev); init_timer(&eql->timer); - eql->timer.data = (unsigned long) dev->priv; + eql->timer.data = (unsigned long) eql; eql->timer.expires = jiffies + EQL_DEFAULT_RESCHED_IVAL; eql->timer.function = eql_timer; @@ -197,7 +197,7 @@ static int eql_open(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); /* XXX We should force this off automatically for the user. */ printk(KERN_INFO "%s: remember to turn off Van-Jacobson compression on " @@ -241,7 +241,7 @@ static int eql_close(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); /* * The timer has to be stopped first before we start hacking away @@ -326,7 +326,7 @@ static int eql_slave_xmit(struct sk_buff *skb, struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); slave_t *slave; spin_lock(&eql->queue.lock); @@ -352,7 +352,7 @@ static struct net_device_stats * eql_get_stats(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); return &eql->stats; } @@ -378,7 +378,7 @@ static inline int eql_is_full(slave_queue_t *queue) { - equalizer_t *eql = queue->master_dev->priv; + equalizer_t *eql = netdev_priv(queue->master_dev); if (queue->num_slaves >= eql->max_slaves) return 1; @@ -420,7 +420,7 @@ if (!eql_is_master(slave_dev) && !eql_is_slave(slave_dev)) { slave_t *s = kmalloc(sizeof(*s), GFP_KERNEL); - equalizer_t *eql = master_dev->priv; + equalizer_t *eql = netdev_priv(master_dev); int ret; if (!s) { @@ -453,7 +453,7 @@ static int eql_emancipate(struct net_device *master_dev, slaving_request_t __user *srqp) { - equalizer_t *eql = master_dev->priv; + equalizer_t *eql = netdev_priv(master_dev); struct net_device *slave_dev; slaving_request_t srq; int ret; @@ -485,7 +485,7 @@ static int eql_g_slave_cfg(struct net_device *dev, slave_config_t __user *scp) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); slave_t *slave; struct net_device *slave_dev; slave_config_t sc; @@ -539,7 +539,7 @@ if (!slave_dev) return ret; - eql = dev->priv; + eql = netdev_priv(dev); spin_lock_bh(&eql->queue.lock); if (eql_is_slave(slave_dev)) { slave = __eql_find_slave_dev(&eql->queue, slave_dev); @@ -561,7 +561,7 @@ master_config_t mc; if (eql_is_master(dev)) { - eql = dev->priv; + eql = netdev_priv(dev); mc.max_slaves = eql->max_slaves; mc.min_slaves = eql->min_slaves; if (copy_to_user(mcp, &mc, sizeof (master_config_t))) @@ -580,7 +580,7 @@ return -EFAULT; if (eql_is_master(dev)) { - eql = dev->priv; + eql = netdev_priv(dev); eql->max_slaves = mc.max_slaves; eql->min_slaves = mc.min_slaves; return 0; diff -Nru a/drivers/net/ethertap.c b/drivers/net/ethertap.c --- a/drivers/net/ethertap.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/net/ethertap.c 2004-11-10 17:19:03 -08:00 @@ -124,7 +124,7 @@ struct net_local *lp = netdev_priv(dev); if (ethertap_debug > 2) - printk(KERN_DEBUG "%s: Doing ethertap_open()...", dev->name); + printk(KERN_DEBUG "%s: Doing ethertap_open()...\n", dev->name); lp->nl = netlink_kernel_create(dev->base_addr, ethertap_rx); if (lp->nl == NULL) diff -Nru a/drivers/net/fec.c b/drivers/net/fec.c --- a/drivers/net/fec.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/fec.c 2004-11-10 17:19:02 -08:00 @@ -18,8 +18,8 @@ * Much better multiple PHY support by Magnus Damm. * Copyright (c) 2000 Ericsson Radio Systems AB. * - * Support for FEC controller of ColdFire/5272. - * Copyrught (c) 2001-2002 Greg Ungerer (gerg@snapgear.com) + * Support for FEC controller of ColdFire/5270/5271/5272/5274/5275/5280/5282. + * Copyrught (c) 2001-2004 Greg Ungerer (gerg@snapgear.com) */ #include @@ -46,7 +46,7 @@ #include #include -#ifdef CONFIG_M5272 +#if defined(CONFIG_M527x) || defined(CONFIG_M5272) || defined(CONFIG_M528x) #include #include #include "fec.h" @@ -56,19 +56,31 @@ #include "commproc.h" #endif -static int opened = 0; -static int found = 0; +#if defined(CONFIG_FEC2) +#define FEC_MAX_PORTS 2 +#else +#define FEC_MAX_PORTS 1 +#endif /* * Define the fixed address of the FEC hardware. */ -#ifdef CONFIG_M5272 -static volatile fec_t *fec_hwp = (volatile fec_t *) (MCF_MBAR + 0x840); -static ushort my_enet_addr[] = { 0x00d0, 0xcf00, 0x0072 }; +static unsigned int fec_hw[] = { +#if defined(CONFIG_M5272) + (MCF_MBAR + 0x840), +#elif defined(CONFIG_M527x) + (MCF_MBAR + 0x1000), + (MCF_MBAR + 0x1800), +#elif defined(CONFIG_M528x) + (MCF_MBAR + 0x1000), #else -static volatile fec_t *fec_hwp = &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec) -static ushort my_enet_addr[3]; -#endif /* CONFIG_M5272 */ + &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec), +#endif +}; + +static unsigned char fec_mac_default[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; /* * Some hardware gets it MAC address out of local flash memory. @@ -76,10 +88,12 @@ */ #if defined(CONFIG_NETtel) #define FEC_FLASHMAC 0xf0006006 -#elif defined(CONFIG_GILBARCONAP) +#elif defined(CONFIG_GILBARCONAP) || defined(CONFIG_SCALES) #define FEC_FLASHMAC 0xf0006000 #elif defined (CONFIG_MTD_KeyTechnology) #define FEC_FLASHMAC 0xffe04000 +#elif defined(CONFIG_CANCam) +#define FEC_FLASHMAC 0xf0020000 #else #define FEC_FLASHMAC 0 #endif @@ -110,21 +124,14 @@ * We don't need to allocate pages for the transmitter. We just use * the skbuffer directly. */ -#if 1 -#define FEC_ENET_RX_PAGES 4 -#define FEC_ENET_RX_FRSIZE 2048 -#define FEC_ENET_RX_FRPPG (PAGE_SIZE / FEC_ENET_RX_FRSIZE) -#define RX_RING_SIZE (FEC_ENET_RX_FRPPG * FEC_ENET_RX_PAGES) -#define TX_RING_SIZE 8 /* Must be power of two */ -#define TX_RING_MOD_MASK 7 /* for this to work */ -#else -#define FEC_ENET_RX_PAGES 16 +#define FEC_ENET_RX_PAGES 8 #define FEC_ENET_RX_FRSIZE 2048 #define FEC_ENET_RX_FRPPG (PAGE_SIZE / FEC_ENET_RX_FRSIZE) #define RX_RING_SIZE (FEC_ENET_RX_FRPPG * FEC_ENET_RX_PAGES) +#define FEC_ENET_TX_FRSIZE 2048 +#define FEC_ENET_TX_FRPPG (PAGE_SIZE / FEC_ENET_TX_FRSIZE) #define TX_RING_SIZE 16 /* Must be power of two */ #define TX_RING_MOD_MASK 15 /* for this to work */ -#endif /* Interrupt events/masks. */ @@ -145,6 +152,18 @@ #define PKT_MINBUF_SIZE 64 #define PKT_MAXBLR_SIZE 1520 + +/* + * The 5270/5271/5280/5282 RX control register also contains maximum frame + * size bits. Other FEC hardware does not, so we need to take that into + * account when setting it. + */ +#if defined(CONFIG_M527x) || defined(CONFIG_M528x) +#define OPT_FRAME_SIZE (PKT_MAXBUF_SIZE << 16) +#else +#define OPT_FRAME_SIZE 0 +#endif + /* The FEC buffer descriptors track the ring buffers. The rx_bd_base and * tx_bd_base always point to the base of the buffer descriptors. The * cur_rx and cur_tx point to the currently available buffer. @@ -154,7 +173,11 @@ * the buffer descriptor determines the actual condition. */ struct fec_enet_private { + /* Hardware registers of the FEC device */ + volatile fec_t *hwp; + /* The saved address of a sent-in-place packet/buffer, for skfree(). */ + unsigned char *tx_bounce[TX_RING_SIZE]; struct sk_buff* tx_skbuff[TX_RING_SIZE]; ushort skb_cur; ushort skb_dirty; @@ -177,12 +200,16 @@ struct work_struct phy_task; uint sequence_done; + uint mii_phy_task_queued; uint phy_addr; + int index; + int opened; int link; int old_link; int full_duplex; + unsigned char mac_addr[ETH_ALEN]; }; static int fec_enet_open(struct net_device *dev); @@ -299,6 +326,18 @@ bdp->cbd_bufaddr = __pa(skb->data); bdp->cbd_datlen = skb->len; + /* + * On some FEC implementations data must be aligned on + * 4-byte boundaries. Use bounce buffers to copy data + * and get it aligned. Ugh. + */ + if (bdp->cbd_bufaddr & 0x3) { + unsigned int index; + index = bdp - fep->tx_bd_base; + memcpy(fep->tx_bounce[index], (void *) bdp->cbd_bufaddr, bdp->cbd_datlen); + bdp->cbd_bufaddr = __pa(fep->tx_bounce[index]); + } + /* Save skb pointer. */ fep->tx_skbuff[fep->skb_cur] = skb; @@ -407,10 +446,6 @@ */ while ((int_events = fecp->fec_ievent) != 0) { fecp->fec_ievent = int_events; - if ((int_events & (FEC_ENET_HBERR | FEC_ENET_BABR | - FEC_ENET_BABT | FEC_ENET_EBERR)) != 0) { - printk("FEC ERROR %x\n", int_events); - } /* Handle receive event in its own function. */ @@ -542,7 +577,7 @@ printk("FEC ENET: rcv is not +last\n"); #endif - if (!opened) + if (!fep->opened) goto rx_processing_done; /* Check for errors. */ @@ -646,7 +681,7 @@ uint mii_reg; fep = netdev_priv(dev); - ep = fec_hwp; + ep = fep->hwp; mii_reg = ep->fec_mii_data; if ((mip = mii_head) == NULL) { @@ -694,7 +729,7 @@ } else { mii_head = mii_tail = mip; - fec_hwp->fec_mii_data = regval; + fep->hwp->fec_mii_data = regval; } } else { @@ -1029,30 +1064,69 @@ }; /* ------------------------------------------------------------------------- */ +/* Kendin KS8721BL phy */ + +/* register definitions for the 8721 */ + +#define MII_KS8721BL_RXERCR 21 +#define MII_KS8721BL_ICSR 22 +#define MII_KS8721BL_PHYCR 31 + +static phy_info_t phy_info_ks8721bl = { + 0x00022161, + "KS8721BL", + + (const phy_cmd_t []) { /* config */ + { mk_mii_read(MII_REG_CR), mii_parse_cr }, + { mk_mii_read(MII_REG_ANAR), mii_parse_anar }, + { mk_mii_end, } + }, + (const phy_cmd_t []) { /* startup */ + { mk_mii_write(MII_KS8721BL_ICSR, 0xff00), NULL }, + { mk_mii_write(MII_REG_CR, 0x1200), NULL }, /* autonegotiate */ + { mk_mii_read(MII_REG_SR), mii_parse_sr }, + { mk_mii_end, } + }, + (const phy_cmd_t []) { /* ack_int */ + /* find out the current status */ + { mk_mii_read(MII_REG_SR), mii_parse_sr }, + /* we only need to read ISR to acknowledge */ + { mk_mii_read(MII_KS8721BL_ICSR), NULL }, + { mk_mii_end, } + }, + (const phy_cmd_t []) { /* shutdown */ + { mk_mii_write(MII_KS8721BL_ICSR, 0x0000), NULL }, + { mk_mii_end, } + }, +}; + +/* ------------------------------------------------------------------------- */ static phy_info_t *phy_info[] = { &phy_info_lxt970, &phy_info_lxt971, &phy_info_qs6612, &phy_info_am79c874, + &phy_info_ks8721bl, NULL }; /* ------------------------------------------------------------------------- */ -static void #ifdef CONFIG_RPXCLASSIC +static void mii_link_interrupt(void *dev_id); #else +static irqreturn_t mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs); #endif -#ifdef CONFIG_M5272 +#if defined(CONFIG_M5272) /* * Code specific to Coldfire 5272 setup. */ -static void __inline__ fec_request_intrs(struct net_device *dev, volatile fec_t *fecp) +static void __inline__ fec_request_intrs(struct net_device *dev) { volatile unsigned long *icrp; @@ -1076,26 +1150,29 @@ static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) { volatile fec_t *fecp; - fecp = fec_hwp; - fecp->fec_r_cntrl = 0x04; + fecp = fep->hwp; + fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04; fecp->fec_x_cntrl = 0x00; - /* Set MII speed to 2.5 MHz - */ - fecp->fec_mii_speed = fep->phy_speed = 0x0e; + /* + * Set MII speed to 2.5 MHz + * See 5272 manual section 11.5.8: MSCR + */ + fep->phy_speed = ((((MCF_CLK / 4) / (2500000 / 10)) + 5) / 10) * 2; + fecp->fec_mii_speed = fep->phy_speed; fec_restart(dev, 0); } -static void __inline__ fec_get_mac(struct net_device *dev, struct fec_enet_private *fep) +static void __inline__ fec_get_mac(struct net_device *dev) { + struct fec_enet_private *fep = netdev_priv(dev); volatile fec_t *fecp; - unsigned char *eap, *iap, tmpaddr[6]; + unsigned char *iap, tmpaddr[6]; int i; - fecp = fec_hwp; - eap = (unsigned char *) my_enet_addr; + fecp = fep->hwp; if (fec_flashmac) { /* @@ -1105,18 +1182,24 @@ iap = fec_flashmac; if ((iap[0] == 0) && (iap[1] == 0) && (iap[2] == 0) && (iap[3] == 0) && (iap[4] == 0) && (iap[5] == 0)) - iap = eap; + iap = fec_mac_default; if ((iap[0] == 0xff) && (iap[1] == 0xff) && (iap[2] == 0xff) && (iap[3] == 0xff) && (iap[4] == 0xff) && (iap[5] == 0xff)) - iap = eap; + iap = fec_mac_default; } else { *((unsigned long *) &tmpaddr[0]) = fecp->fec_addr_low; *((unsigned short *) &tmpaddr[4]) = (fecp->fec_addr_high >> 16); iap = &tmpaddr[0]; } - for (i=0; i<6; i++) - dev->dev_addr[i] = *eap++ = *iap++; + for (i=0; idev_addr[i] = fep->mac_addr[i] = *iap++; + + /* Adjust MAC if using default MAC address */ + if (iap == fec_mac_default) { + dev->dev_addr[ETH_ALEN-1] = fep->mac_addr[ETH_ALEN-1] = + iap[ETH_ALEN-1] + fep->index; + } } static void __inline__ fec_enable_phy_intr(void) @@ -1151,12 +1234,167 @@ /* ------------------------------------------------------------------------- */ +#elif defined(CONFIG_M527x) || defined(CONFIG_M528x) + +/* + * Code specific to Coldfire 5270/5271/5274/5275 and 5280/5282 setups. + */ +static void __inline__ fec_request_intrs(struct net_device *dev) +{ + struct fec_enet_private *fep; + int b; + + fep = netdev_priv(dev); + b = (fep->index) ? 128 : 64; + + /* Setup interrupt handlers. */ + if (request_irq(b+23, fec_enet_interrupt, 0, "fec(TXF)", dev) != 0) + printk("FEC: Could not allocate FEC(TXF) IRQ(%d+23)!\n", b); + if (request_irq(b+24, fec_enet_interrupt, 0, "fec(TXB)", dev) != 0) + printk("FEC: Could not allocate FEC(TXB) IRQ(%d+24)!\n", b); + if (request_irq(b+25, fec_enet_interrupt, 0, "fec(TXFIFO)", dev) != 0) + printk("FEC: Could not allocate FEC(TXFIFO) IRQ(%d+25)!\n", b); + if (request_irq(b+26, fec_enet_interrupt, 0, "fec(TXCR)", dev) != 0) + printk("FEC: Could not allocate FEC(TXCR) IRQ(%d+26)!\n", b); + + if (request_irq(b+27, fec_enet_interrupt, 0, "fec(RXF)", dev) != 0) + printk("FEC: Could not allocate FEC(RXF) IRQ(%d+27)!\n", b); + if (request_irq(b+28, fec_enet_interrupt, 0, "fec(RXB)", dev) != 0) + printk("FEC: Could not allocate FEC(RXB) IRQ(%d+28)!\n", b); + + if (request_irq(b+29, fec_enet_interrupt, 0, "fec(MII)", dev) != 0) + printk("FEC: Could not allocate FEC(MII) IRQ(%d+29)!\n", b); + if (request_irq(b+30, fec_enet_interrupt, 0, "fec(LC)", dev) != 0) + printk("FEC: Could not allocate FEC(LC) IRQ(%d+30)!\n", b); + if (request_irq(b+31, fec_enet_interrupt, 0, "fec(HBERR)", dev) != 0) + printk("FEC: Could not allocate FEC(HBERR) IRQ(%d+31)!\n", b); + if (request_irq(b+32, fec_enet_interrupt, 0, "fec(GRA)", dev) != 0) + printk("FEC: Could not allocate FEC(GRA) IRQ(%d+32)!\n", b); + if (request_irq(b+33, fec_enet_interrupt, 0, "fec(EBERR)", dev) != 0) + printk("FEC: Could not allocate FEC(EBERR) IRQ(%d+33)!\n", b); + if (request_irq(b+34, fec_enet_interrupt, 0, "fec(BABT)", dev) != 0) + printk("FEC: Could not allocate FEC(BABT) IRQ(%d+34)!\n", b); + if (request_irq(b+35, fec_enet_interrupt, 0, "fec(BABR)", dev) != 0) + printk("FEC: Could not allocate FEC(BABR) IRQ(%d+35)!\n", b); + + /* Unmask interrupts at ColdFire 5280/5282 interrupt controller */ + { + volatile unsigned char *icrp; + volatile unsigned long *imrp; + int i; + + b = (fep->index) ? MCFICM_INTC1 : MCFICM_INTC0; + icrp = (volatile unsigned char *) (MCF_IPSBAR + b + + MCFINTC_ICR0); + for (i = 23; (i < 36); i++) + icrp[i] = 0x23; + + imrp = (volatile unsigned long *) (MCF_IPSBAR + b + + MCFINTC_IMRH); + *imrp &= ~0x0000000f; + imrp = (volatile unsigned long *) (MCF_IPSBAR + b + + MCFINTC_IMRL); + *imrp &= ~0xff800001; + } + +#if defined(CONFIG_M528x) + /* Set up gpio outputs for MII lines */ + { + volatile unsigned short *gpio_paspar; + + gpio_paspar = (volatile unsigned short *) (MCF_IPSBAR + + 0x100056); + *gpio_paspar = 0x0f00; + } +#endif +} + +static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) +{ + volatile fec_t *fecp; + + fecp = fep->hwp; + fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04; + fecp->fec_x_cntrl = 0x00; + + /* + * Set MII speed to 2.5 MHz + * See 5282 manual section 17.5.4.7: MSCR + */ + fep->phy_speed = ((((MCF_CLK / 2) / (2500000 / 10)) + 5) / 10) * 2; + fecp->fec_mii_speed = fep->phy_speed; + + fec_restart(dev, 0); +} + +static void __inline__ fec_get_mac(struct net_device *dev) +{ + struct fec_enet_private *fep = netdev_priv(dev); + volatile fec_t *fecp; + unsigned char *iap, tmpaddr[6]; + int i; + + fecp = fep->hwp; + + if (fec_flashmac) { + /* + * Get MAC address from FLASH. + * If it is all 1's or 0's, use the default. + */ + iap = fec_flashmac; + if ((iap[0] == 0) && (iap[1] == 0) && (iap[2] == 0) && + (iap[3] == 0) && (iap[4] == 0) && (iap[5] == 0)) + iap = fec_mac_default; + if ((iap[0] == 0xff) && (iap[1] == 0xff) && (iap[2] == 0xff) && + (iap[3] == 0xff) && (iap[4] == 0xff) && (iap[5] == 0xff)) + iap = fec_mac_default; + } else { + *((unsigned long *) &tmpaddr[0]) = fecp->fec_addr_low; + *((unsigned short *) &tmpaddr[4]) = (fecp->fec_addr_high >> 16); + iap = &tmpaddr[0]; + } + + for (i=0; idev_addr[i] = fep->mac_addr[i] = *iap++; + + /* Adjust MAC if using default MAC address */ + if (iap == fec_mac_default) { + dev->dev_addr[ETH_ALEN-1] = fep->mac_addr[ETH_ALEN-1] = + iap[ETH_ALEN-1] + fep->index; + } +} + +static void __inline__ fec_enable_phy_intr(void) +{ +} + +static void __inline__ fec_disable_phy_intr(void) +{ +} + +static void __inline__ fec_phy_ack_intr(void) +{ +} + +static void __inline__ fec_localhw_setup(void) +{ +} + +/* + * Do not need to make region uncached on 5272. + */ +static void __inline__ fec_uncache(unsigned long addr) +{ +} + +/* ------------------------------------------------------------------------- */ + #else /* * Code sepcific to the MPC860T setup. */ -static void __inline__ fec_request_intrs(struct net_device *dev, volatile fec_t *fecp) +static void __inline__ fec_request_intrs(struct net_device *dev) { volatile immap_t *immap; @@ -1184,13 +1422,13 @@ #endif } -static void __inline__ fec_get_mac(struct net_device *dev, struct fec_enet_private *fep) +static void __inline__ fec_get_mac(struct net_device *dev) { - unsigned char *eap, *iap, tmpaddr[6]; + struct fec_enet_private *fep = netdev_priv(dev); + unsigned char *iap, tmpaddr[6]; bd_t *bd; int i; - eap = (unsigned char *)my_enet_addr; iap = bd->bi_enetaddr; bd = (bd_t *)__res; @@ -1208,7 +1446,7 @@ #endif for (i=0; i<6; i++) - dev->dev_addr[i] = *eap++ = *iap++; + dev->dev_addr[i] = fep->mac_addr[i] = *iap++; } static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) @@ -1217,7 +1455,7 @@ volatile immap_t *immap; volatile fec_t *fecp; - fecp = fec_hwp; + fecp = fep->hwp; immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */ /* Configure all of port D for MII. @@ -1240,7 +1478,8 @@ static void __inline__ fec_enable_phy_intr(void) { volatile fec_t *fecp; - fecp = fec_hwp; + + fecp = fep->hwp; /* Enable MII command finished interrupt */ @@ -1258,8 +1497,8 @@ static void __inline__ fec_localhw_setup(void) { volatile fec_t *fecp; - fecp = fec_hwp; + fecp = fep->hwp; fecp->fec_r_hash = PKT_MAXBUF_SIZE; /* Enable big endian and don't care about SDMA FC. */ @@ -1319,6 +1558,11 @@ struct fec_enet_private *fep = netdev_priv(dev); volatile uint *s = &(fep->phy_status); + /* + ** When we get here, phy_task is already removed from + ** the workqueue. It is thus safe to allow to reuse it. + */ + fep->mii_phy_task_queued = 0; printk("%s: config: auto-negotiation ", dev->name); if (*s & PHY_CONF_ANE) @@ -1350,6 +1594,11 @@ struct fec_enet_private *fep = netdev_priv(dev); int duplex; + /* + ** When we get here, phy_task is already removed from + ** the workqueue. It is thus safe to allow to reuse it. + */ + fep->mii_phy_task_queued = 0; fep->link = (fep->phy_status & PHY_STAT_LINK) ? 1 : 0; mii_display_status(dev); fep->old_link = fep->link; @@ -1370,18 +1619,35 @@ } +/* mii_queue_relink is called in interrupt context from mii_link_interrupt */ static void mii_queue_relink(uint mii_reg, struct net_device *dev) { struct fec_enet_private *fep = netdev_priv(dev); + /* + ** We cannot queue phy_task twice in the workqueue. It + ** would cause an endless loop in the workqueue. + ** Fortunately, if the last mii_relink entry has not yet been + ** executed now, it will do the job for the current interrupt, + ** which is just what we want. + */ + if (fep->mii_phy_task_queued) + return; + + fep->mii_phy_task_queued = 1; INIT_WORK(&fep->phy_task, (void*)mii_relink, dev); schedule_work(&fep->phy_task); } +/* mii_queue_config is called in user context from fec_enet_open */ static void mii_queue_config(uint mii_reg, struct net_device *dev) { struct fec_enet_private *fep = netdev_priv(dev); + if (fep->mii_phy_task_queued) + return; + + fep->mii_phy_task_queued = 1; INIT_WORK(&fep->phy_task, (void*)mii_display_config, dev); schedule_work(&fep->phy_task); } @@ -1401,7 +1667,7 @@ mii_discover_phy3(uint mii_reg, struct net_device *dev) { struct fec_enet_private *fep; - int i; + int i; fep = netdev_priv(dev); fep->phy_id |= (mii_reg & 0xffff); @@ -1432,7 +1698,7 @@ uint phytype; fep = netdev_priv(dev); - fecp = fec_hwp; + fecp = fep->hwp; if (fep->phy_addr < 32) { if ((phytype = (mii_reg & 0xffff)) != 0xffff && phytype != 0) { @@ -1458,10 +1724,11 @@ /* This interrupt occurs when the PHY detects a link change. */ -static void #ifdef CONFIG_RPXCLASSIC +static void mii_link_interrupt(void *dev_id) #else +static irqreturn_t mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs) #endif { @@ -1477,6 +1744,7 @@ mii_do_cmd(dev, fep->phy->ack_int); mii_do_cmd(dev, phy_cmd_relink); /* restart and display status */ + return IRQ_HANDLED; } static int @@ -1487,7 +1755,6 @@ /* I should reset the ring buffers here, but I don't yet know * a simple way to do that. */ - fec_set_mac_address(dev); fep->sequence_done = 0; @@ -1506,6 +1773,12 @@ schedule(); mii_do_cmd(dev, fep->phy->startup); + + /* Set the initial link state to true. A lot of hardware + * based on this device does not implement a PHY interrupt, + * so we are never notified of link change. + */ + fep->link = 1; } else { fep->link = 1; /* lets just try it and see */ /* no phy, go full duplex, it's most likely a hub chip */ @@ -1513,16 +1786,18 @@ } netif_start_queue(dev); - opened = 1; + fep->opened = 1; return 0; /* Success */ } static int fec_enet_close(struct net_device *dev) { + struct fec_enet_private *fep = netdev_priv(dev); + /* Don't know what to do yet. */ - opened = 0; + fep->opened = 0; netif_stop_queue(dev); fec_stop(dev); @@ -1558,7 +1833,7 @@ unsigned char hash; fep = netdev_priv(dev); - ep = fec_hwp; + ep = fep->hwp; if (dev->flags&IFF_PROMISC) { /* Log any net taps. */ @@ -1622,18 +1897,18 @@ static void fec_set_mac_address(struct net_device *dev) { - int i; + struct fec_enet_private *fep; volatile fec_t *fecp; - fecp = fec_hwp; - - /* Set our copy of the Ethernet address */ - for (i = 0; i < (ETH_ALEN / 2); i++) - my_enet_addr[i] = (dev->dev_addr[i*2] << 8) | dev->dev_addr[i*2 + 1]; + fep = netdev_priv(dev); + fecp = fep->hwp; /* Set station address. */ - fecp->fec_addr_low = (my_enet_addr[0] << 16) | my_enet_addr[1]; - fecp->fec_addr_high = my_enet_addr[2] << 16; + fecp->fec_addr_low = fep->mac_addr[3] | (fep->mac_addr[2] << 8) | + (fep->mac_addr[1] << 16) | (fep->mac_addr[0] << 24); + fecp->fec_addr_high = (fep->mac_addr[5] << 16) | + (fep->mac_addr[4] << 24); + } /* Initialize the FEC Ethernet on 860T (or ColdFire 5272). @@ -1649,14 +1924,18 @@ cbd_t *cbd_base; volatile fec_t *fecp; int i, j; + static int index = 0; /* Only allow us to be probed once. */ - if (found) - return(-ENXIO); + if (index >= FEC_MAX_PORTS) + return -ENXIO; /* Create an Ethernet device instance. */ - fecp = fec_hwp; + fecp = (volatile fec_t *) fec_hw[index]; + + fep->index = index; + fep->hwp = fecp; /* Whack a reset. We should wait for this. */ @@ -1679,7 +1958,7 @@ * This is our default MAC address unless the user changes * it via eth_mac_addr (our dev->set_mac_addr handler). */ - fec_get_mac(dev, fep); + fec_get_mac(dev); /* Allocate memory for buffer descriptors. */ @@ -1734,7 +2013,15 @@ /* ...and the same for transmmit. */ bdp = fep->tx_bd_base; - for (i=0; i= FEC_ENET_TX_FRPPG) { + mem_addr = __get_free_page(GFP_KERNEL); + j = 1; + } else { + mem_addr += FEC_ENET_TX_FRSIZE; + j++; + } + fep->tx_bounce[i] = (unsigned char *) mem_addr; /* Initialize the BD for every fragment in the page. */ @@ -1756,7 +2043,7 @@ /* Install our interrupt handlers. This varies depending on * the architecture. */ - fec_request_intrs(dev, fecp); + fec_request_intrs(dev); dev->base_addr = (unsigned long)fecp; @@ -1788,7 +2075,7 @@ fep->phy_addr = 0; mii_queue(dev, mk_mii_read(MII_REG_PHYIR1), mii_discover_phy); - found++; + index++; return 0; } @@ -1800,14 +2087,12 @@ fec_restart(struct net_device *dev, int duplex) { struct fec_enet_private *fep; - int i; - unsigned char *eap; volatile cbd_t *bdp; volatile fec_t *fecp; - - fecp = fec_hwp; + int i; fep = netdev_priv(dev); + fecp = fep->hwp; /* Whack a reset. We should wait for this. */ @@ -1826,12 +2111,13 @@ /* Set station address. */ - fecp->fec_addr_low = (my_enet_addr[0] << 16) | my_enet_addr[1]; - fecp->fec_addr_high = (my_enet_addr[2] << 16); + fecp->fec_addr_low = fep->mac_addr[3] | (fep->mac_addr[2] << 8) | + (fep->mac_addr[1] << 16) | (fep->mac_addr[0] << 24); + fecp->fec_addr_high = (fep->mac_addr[5] << 16) | + (fep->mac_addr[4] << 24); - eap = (unsigned char *)&my_enet_addr[0]; - for (i=0; i<6; i++) - dev->dev_addr[i] = *eap++; + for (i=0; idev_addr[i] = fep->mac_addr[i]; /* Reset all multicast. */ @@ -1898,11 +2184,12 @@ /* Enable MII mode. */ if (duplex) { - fecp->fec_r_cntrl = 0x04; /* MII enable */ - fecp->fec_x_cntrl = 0x04; /* FD enable */ + fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04;/* MII enable */ + fecp->fec_x_cntrl = 0x04; /* FD enable */ } else { - fecp->fec_r_cntrl = 0x06; /* MII enable|No Rcv on Xmit */ + /* MII enable|No Rcv on Xmit */ + fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x06; fecp->fec_x_cntrl = 0x00; } fep->full_duplex = duplex; @@ -1923,8 +2210,8 @@ volatile fec_t *fecp; struct fec_enet_private *fep; - fecp = fec_hwp; fep = netdev_priv(dev); + fecp = fep->hwp; fecp->fec_x_cntrl = 0x01; /* Graceful transmit stop */ @@ -1944,29 +2231,27 @@ fecp->fec_mii_speed = fep->phy_speed; } -static struct net_device *fec_dev; - static int __init fec_enet_module_init(void) { struct net_device *dev; - int err; + int i, err; - dev = alloc_etherdev(sizeof(struct fec_enet_private)); - if (!dev) - return -ENOMEM; - err = fec_enet_init(dev); - if (err) { - free_netdev(dev); - return err; - } - - if (register_netdev(dev) != 0) { - /* XXX: missing cleanup here */ - free_netdev(dev); - return -EIO; + for (i = 0; (i < FEC_MAX_PORTS); i++) { + dev = alloc_etherdev(sizeof(struct fec_enet_private)); + if (!dev) + return -ENOMEM; + err = fec_enet_init(dev); + if (err) { + free_netdev(dev); + continue; + } + if (register_netdev(dev) != 0) { + /* XXX: missing cleanup here */ + free_netdev(dev); + return -EIO; + } } - fec_dev = dev; - return(0); + return 0; } module_init(fec_enet_module_init); diff -Nru a/drivers/net/fec.h b/drivers/net/fec.h --- a/drivers/net/fec.h 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/fec.h 2004-11-10 17:19:05 -08:00 @@ -1,8 +1,8 @@ /****************************************************************************/ /* - * fec.h -- Fast Ethernet Controller for Motorola ColdFire 5272 - * and 5282.. + * fec.h -- Fast Ethernet Controller for Motorola ColdFire 5270, + 5271, 5272, 5274, 5275, 5280 and 5282. * * (C) Copyright 2000-2003, Greg Ungerer (gerg@snapgear.com) * (C) Copyright 2000-2001, Lineo (www.lineo.com) @@ -13,7 +13,7 @@ #define FEC_H /****************************************************************************/ -#ifdef CONFIG_M5282 +#if defined(CONFIG_M527x) || defined(CONFIG_M528x) /* * Just figures, Motorola would have to change the offsets for * registers in the same peripheral device on different models diff -Nru a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c --- a/drivers/net/hamradio/mkiss.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/net/hamradio/mkiss.c 2004-11-10 17:19:07 -08:00 @@ -518,7 +518,7 @@ ax->flags &= (1 << AXF_INUSE); /* Clear ESCAPE & ERROR flags */ - ax->buflock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&ax->buflock); netif_start_queue(dev); return 0; diff -Nru a/drivers/net/hplance.c b/drivers/net/hplance.c --- a/drivers/net/hplance.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/hplance.c 2004-11-10 17:19:04 -08:00 @@ -40,9 +40,7 @@ /* Our private data structure */ struct hplance_private { - struct lance_private lance; - unsigned int scode; - void *base; + struct lance_private lance; }; /* function prototypes... This is easy because all the grot is in the @@ -50,89 +48,89 @@ * plus board-specific init, open and close actions. * Oh, and we need to tell the generic code how to read and write LANCE registers... */ -static void hplance_init(struct net_device *dev, int scode); -static int hplance_open(struct net_device *dev); -static int hplance_close(struct net_device *dev); +static int __devinit hplance_init_one(struct dio_dev *d, + const struct dio_device_id *ent); +static void __devinit hplance_init(struct net_device *dev, + struct dio_dev *d); +static void __devexit hplance_remove_one(struct dio_dev *d); static void hplance_writerap(void *priv, unsigned short value); static void hplance_writerdp(void *priv, unsigned short value); static unsigned short hplance_readrdp(void *priv); +static int hplance_open(struct net_device *dev); +static int hplance_close(struct net_device *dev); -#ifdef MODULE -static struct hplance_private *root_hplance_dev; -#endif +static struct dio_device_id hplance_dio_tbl[] = { + { DIO_ID_LAN }, + { 0 } +}; -static void cleanup_card(struct net_device *dev) -{ - struct hplance_private *lp = netdev_priv(dev); - dio_unconfig_board(lp->scode); -} +static struct dio_driver hplance_driver = { + .name = "hplance", + .id_table = hplance_dio_tbl, + .probe = hplance_init_one, + .remove = __devexit_p(hplance_remove_one), +}; /* Find all the HP Lance boards and initialise them... */ -struct net_device * __init hplance_probe(int unit) +static int __devinit hplance_init_one(struct dio_dev *d, + const struct dio_device_id *ent) { struct net_device *dev; - - if (!MACH_IS_HP300) - return ERR_PTR(-ENODEV); + int err; dev = alloc_etherdev(sizeof(struct hplance_private)); if (!dev) - return ERR_PTR(-ENOMEM); + return -ENOMEM; - if (unit >= 0) { - sprintf(dev->name, "eth%d", unit); - netdev_boot_setup_check(dev); - } + if (!request_mem_region(d->resource.start, d->resource.end-d->resource.start, d->name)) + return -EBUSY; SET_MODULE_OWNER(dev); - /* Isn't DIO nice? */ - for(;;) - { - int scode = dio_find(DIO_ID_LAN); - - if (!scode) - break; - - dio_config_board(scode); - hplance_init(dev, scode); - if (!register_netdev(dev)) { - struct hplance_private *lp = netdev_priv(dev); - lp->next_module = root_hplance_dev; - root_hplance_dev = lp; - return dev; - } - cleanup_card(dev); - } + hplance_init(dev, d); + err = register_netdev(dev); + if (err) { + free_netdev(dev); + return err; + } + dio_set_drvdata(d, dev); + return 0; +} + +static void __devexit hplance_remove_one(struct dio_dev *d) +{ + struct net_device *dev = dio_get_drvdata(d); + + unregister_netdev(dev); free_netdev(dev); - return ERR_PTR(-ENODEV); } -/* Initialise a single lance board at the given select code */ -static void __init hplance_init(struct net_device *dev, int scode) +/* Initialise a single lance board at the given DIO device */ +static void __init hplance_init(struct net_device *dev, struct dio_dev *d) { - const char *name = dio_scodetoname(scode); - void *va = dio_scodetoviraddr(scode); + unsigned long va = (d->resource.start + DIO_VIRADDRBASE); struct hplance_private *lp; int i; - printk("%s: %s; select code %d, addr", dev->name, name, scode); + printk(KERN_INFO "%s: %s; select code %d, addr", dev->name, d->name, d->scode); /* reset the board */ out_8(va+DIO_IDOFF, 0xff); udelay(100); /* ariba! ariba! udelay! udelay! */ /* Fill the dev fields */ - dev->base_addr = (unsigned long)va; + dev->base_addr = va; dev->open = &hplance_open; dev->stop = &hplance_close; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = lance_poll; +#endif dev->hard_start_xmit = &lance_start_xmit; dev->get_stats = &lance_get_stats; dev->set_multicast_list = &lance_set_multicast; dev->dma = 0; - for (i=0; i<6; i++) - { + for (i=0; i<6; i++) { /* The NVRAM holds our ethernet address, one nibble per byte, * at bytes NVRAMOFF+1,3,5,7,9... */ @@ -142,12 +140,12 @@ } lp = netdev_priv(dev); - lp->lance.name = (char*)name; /* discards const, shut up gcc */ - lp->lance.ll = (struct lance_regs *)(va + HPLANCE_REGOFF); + lp->lance.name = (char*)d->name; /* discards const, shut up gcc */ + lp->lance.base = va; lp->lance.init_block = (struct lance_init_block *)(va + HPLANCE_MEMOFF); /* CPU addr */ lp->lance.lance_init_block = 0; /* LANCE addr of same RAM */ lp->lance.busmaster_regval = LE_C3_BSWP; /* we're bigendian */ - lp->lance.irq = dio_scodetoipl(scode); + lp->lance.irq = d->ipl; lp->lance.writerap = hplance_writerap; lp->lance.writerdp = hplance_writerdp; lp->lance.readrdp = hplance_readrdp; @@ -155,8 +153,6 @@ lp->lance.lance_log_tx_bufs = LANCE_LOG_TX_BUFFERS; lp->lance.rx_ring_mod_mask = RX_RING_MOD_MASK; lp->lance.tx_ring_mod_mask = TX_RING_MOD_MASK; - lp->scode = scode; - lp->base = va; printk(", irq %d\n", lp->lance.irq); } @@ -165,78 +161,64 @@ */ static void hplance_writerap(void *priv, unsigned short value) { - struct hplance_private *lp = (struct hplance_private *)priv; - struct hplance_reg *hpregs = (struct hplance_reg *)lp->base; - do { - lp->lance.ll->rap = value; - } while ((hpregs->status & LE_ACK) == 0); + struct lance_private *lp = (struct lance_private *)priv; + do { + out_be16(lp->base + HPLANCE_REGOFF + LANCE_RAP, value); + } while ((in_8(lp->base + HPLANCE_STATUS) & LE_ACK) == 0); } static void hplance_writerdp(void *priv, unsigned short value) { - struct hplance_private *lp = (struct hplance_private *)priv; - struct hplance_reg *hpregs = (struct hplance_reg *)lp->base; - do { - lp->lance.ll->rdp = value; - } while ((hpregs->status & LE_ACK) == 0); + struct lance_private *lp = (struct lance_private *)priv; + do { + out_be16(lp->base + HPLANCE_REGOFF + LANCE_RDP, value); + } while ((in_8(lp->base + HPLANCE_STATUS) & LE_ACK) == 0); } static unsigned short hplance_readrdp(void *priv) { - unsigned short val; - struct hplance_private *lp = (struct hplance_private *)priv; - struct hplance_reg *hpregs = (struct hplance_reg *)lp->base; - do { - val = lp->lance.ll->rdp; - } while ((hpregs->status & LE_ACK) == 0); - return val; + struct lance_private *lp = (struct lance_private *)priv; + __u16 value; + do { + value = in_be16(lp->base + HPLANCE_REGOFF + LANCE_RDP); + } while ((in_8(lp->base + HPLANCE_STATUS) & LE_ACK) == 0); + return value; } static int hplance_open(struct net_device *dev) { int status; - struct hplance_private *lp = netdev_priv(dev); - struct hplance_reg *hpregs = (struct hplance_reg *)lp->base; + struct lance_private *lp = netdev_priv(dev); status = lance_open(dev); /* call generic lance open code */ if (status) return status; /* enable interrupts at board level. */ - out_8(&(hpregs->status), LE_IE); + out_8(lp->base + HPLANCE_STATUS, LE_IE); return 0; } static int hplance_close(struct net_device *dev) { - struct hplance_private *lp = netdev_priv(dev); - struct hplance_reg *hpregs = (struct hplance_reg *)lp->base; - out_8(&(hpregs->status), 8); /* disable interrupts at boardlevel */ + struct lance_private *lp = netdev_priv(dev); + + out_8(lp->base + HPLANCE_STATUS, 0); /* disable interrupts at boardlevel */ lance_close(dev); return 0; } -#ifdef MODULE -MODULE_LICENSE("GPL"); -int init_module(void) +int __init hplance_init_module(void) { - int found = 0; - while (!IS_ERR(hplance_probe(-1))) - found++; - return found ? 0 : -ENODEV; + return dio_module_init(&hplance_driver); } -void cleanup_module(void) +void __exit hplance_cleanup_module(void) { - /* Walk the chain of devices, unregistering them */ - struct hplance_private *lp; - while (root_hplance_dev) { - lp = root_hplance_dev->next_module; - unregister_netdev(root_lance_dev->dev); - cleanup_card(root_lance_dev->dev); - free_netdev(root_lance_dev->dev); - root_lance_dev = lp; - } + dio_unregister_driver(&hplance_driver); } -#endif /* MODULE */ +module_init(hplance_init_module); +module_exit(hplance_cleanup_module); + +MODULE_LICENSE("GPL"); diff -Nru a/drivers/net/hplance.h b/drivers/net/hplance.h --- a/drivers/net/hplance.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/hplance.h 2004-11-10 17:19:02 -08:00 @@ -4,15 +4,10 @@ */ /* Registers */ -struct hplance_reg -{ - u_char pad0; - volatile u_char id; /* DIO register: ID byte */ - u_char pad1; - volatile u_char status; /* DIO register: interrupt enable */ -}; +#define HPLANCE_ID 0x01 /* DIO register: ID byte */ +#define HPLANCE_STATUS 0x03 /* DIO register: interrupt enable/status */ -/* Control and status bits for the hplance->status register */ +/* Control and status bits for the status register */ #define LE_IE 0x80 /* interrupt enable */ #define LE_IR 0x40 /* interrupt requested */ #define LE_LOCK 0x08 /* lock status register */ @@ -25,7 +20,7 @@ /* These are the offsets for the DIO regs (hplance_reg), lance_ioreg, * memory and NVRAM: */ -#define HPLANCE_IDOFF 0 /* board baseaddr, struct hplance_reg */ -#define HPLANCE_REGOFF 0x4000 /* struct lance_regs */ +#define HPLANCE_IDOFF 0 /* board baseaddr */ +#define HPLANCE_REGOFF 0x4000 /* lance registers */ #define HPLANCE_MEMOFF 0x8000 /* struct lance_init_block */ #define HPLANCE_NVRAMOFF 0xC008 /* etheraddress as one *nibble* per byte */ diff -Nru a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c --- a/drivers/net/ibmlana.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/net/ibmlana.c 2004-11-10 17:19:03 -08:00 @@ -885,14 +885,6 @@ return &priv->stat; } -/* we don't support runtime reconfiguration, since am MCA card can - be unambigously identified by its POS registers. */ - -static int ibmlana_config(struct net_device *dev, struct ifmap *map) -{ - return 0; -} - /* switch receiver mode. */ static void ibmlana_set_multicast_list(struct net_device *dev) @@ -984,7 +976,6 @@ dev->open = ibmlana_open; dev->stop = ibmlana_close; - dev->set_config = ibmlana_config; dev->hard_start_xmit = ibmlana_tx; dev->do_ioctl = NULL; dev->get_stats = ibmlana_stats; diff -Nru a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c --- a/drivers/net/ixgb/ixgb_main.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/net/ixgb/ixgb_main.c 2004-11-10 17:19:03 -08:00 @@ -30,7 +30,7 @@ char ixgb_driver_name[] = "ixgb"; char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; -char ixgb_driver_version[] = "1.0.66"; +char ixgb_driver_version[] = "1.0.66-k2"; char ixgb_copyright[] = "Copyright (c) 2001-2004 Intel Corporation."; /* ixgb_pci_tbl - PCI Device ID Table @@ -1614,8 +1614,12 @@ } #else for (i = 0; i < IXGB_MAX_INTR; i++) - if (!ixgb_clean_rx_irq(adapter) & !ixgb_clean_tx_irq(adapter)) + if (ixgb_clean_rx_irq(adapter) == FALSE) break; + for (i = 0; i < IXGB_MAX_INTR; i++) + if (ixgb_clean_tx_irq(adapter) == FALSE) + break; + /* if RAIDC:EN == 1 and ICR:RXDMT0 == 1, we need to * set IMS:RXDMT0 to 1 to restart the RBD timer (POLL) */ @@ -1676,7 +1680,7 @@ eop = tx_ring->buffer_info[i].next_to_watch; eop_desc = IXGB_TX_DESC(*tx_ring, eop); - while (eop_desc->status & cpu_to_le32(IXGB_TX_DESC_STATUS_DD)) { + while (eop_desc->status & IXGB_TX_DESC_STATUS_DD) { for (cleaned = FALSE; !cleaned;) { tx_desc = IXGB_TX_DESC(*tx_ring, i); diff -Nru a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c --- a/drivers/net/lasi_82596.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/lasi_82596.c 2004-11-10 17:19:02 -08:00 @@ -1218,7 +1218,7 @@ lp->scb.command = 0; lp->scb.cmd = I596_NULL; lp->scb.rfd = I596_NULL; - lp->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&lp->lock); lp->dma_addr = dma_addr; lp->dev = gen_dev; diff -Nru a/drivers/net/mac8390.c b/drivers/net/mac8390.c --- a/drivers/net/mac8390.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/mac8390.c 2004-11-10 17:19:04 -08:00 @@ -42,10 +42,6 @@ #include "8390.h" -#if (LINUX_VERSION_CODE < 0x02030e) -#define net_device device -#endif - #define WD_START_PG 0x00 /* First page of TX buffer */ #define CABLETRON_RX_START_PG 0x00 /* First page of RX buffer */ #define CABLETRON_RX_STOP_PG 0x30 /* Last page +1 of RX ring */ diff -Nru a/drivers/net/meth.c b/drivers/net/meth.c --- a/drivers/net/meth.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/net/meth.c 2004-11-10 17:19:06 -08:00 @@ -368,31 +368,6 @@ } /* - * Configuration changes (passed on by ifconfig) - */ -static int meth_config(struct net_device *dev, struct ifmap *map) -{ - if (dev->flags & IFF_UP) /* can't act on a running interface */ - return -EBUSY; - - /* Don't allow changing the I/O address */ - if (map->base_addr != dev->base_addr) { - printk(KERN_WARNING "meth: Can't change I/O address\n"); - return -EOPNOTSUPP; - } - - /* Don't allow changing the IRQ */ - if (map->irq != dev->irq) { - printk(KERN_WARNING "meth: Can't change IRQ\n"); - return -EOPNOTSUPP; - } - DPRINTK("Configured\n"); - - /* ignore other fields */ - return 0; -} - -/* * Receive a packet: retrieve, encapsulate and pass over to upper levels */ static void meth_rx(struct net_device* dev, unsigned long int_status) @@ -813,7 +788,6 @@ dev->open = meth_open; dev->stop = meth_release; - dev->set_config = meth_config; dev->hard_start_xmit = meth_tx; dev->do_ioctl = meth_ioctl; dev->get_stats = meth_stats; diff -Nru a/drivers/net/mvme147.c b/drivers/net/mvme147.c --- a/drivers/net/mvme147.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/mvme147.c 2004-11-10 17:19:04 -08:00 @@ -18,7 +18,6 @@ /* Used for the temporal inet entries and routing */ #include #include -#include #include #include #include @@ -40,7 +39,6 @@ /* Our private data structure */ struct m147lance_private { struct lance_private lance; - void *base; unsigned long ram; }; @@ -51,9 +49,9 @@ */ static int m147lance_open(struct net_device *dev); static int m147lance_close(struct net_device *dev); -static void m147lance_writerap(struct m147lance_private *lp, unsigned short value); -static void m147lance_writerdp(struct m147lance_private *lp, unsigned short value); -static unsigned short m147lance_readrdp(struct m147lance_private *lp); +static void m147lance_writerap(struct lance_private *lp, unsigned short value); +static void m147lance_writerdp(struct lance_private *lp, unsigned short value); +static unsigned short m147lance_readrdp(struct lance_private *lp); typedef void (*writerap_t)(void *, unsigned short); typedef void (*writerdp_t)(void *, unsigned short); @@ -122,7 +120,7 @@ } lp->lance.name = (char*)name; /* discards const, shut up gcc */ - lp->lance.ll = (struct lance_regs *)(dev->base_addr); + lp->lance.base = dev->base_addr; lp->lance.init_block = (struct lance_init_block *)(lp->ram); /* CPU addr */ lp->lance.lance_init_block = (struct lance_init_block *)(lp->ram); /* LANCE addr of same RAM */ lp->lance.busmaster_regval = LE_C3_BSWP; /* we're bigendian */ @@ -145,19 +143,19 @@ return dev; } -static void m147lance_writerap(struct m147lance_private *lp, unsigned short value) +static void m147lance_writerap(struct lance_private *lp, unsigned short value) { - lp->lance.ll->rap = value; + out_be16(lp->base + LANCE_RAP, value); } -static void m147lance_writerdp(struct m147lance_private *lp, unsigned short value) +static void m147lance_writerdp(struct lance_private *lp, unsigned short value) { - lp->lance.ll->rdp = value; + out_be16(lp->base + LANCE_RDP, value); } -static unsigned short m147lance_readrdp(struct m147lance_private *lp) +static unsigned short m147lance_readrdp(struct lance_private *lp) { - return lp->lance.ll->rdp; + return in_be16(lp->base + LANCE_RDP); } static int m147lance_open(struct net_device *dev) diff -Nru a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c --- a/drivers/net/ne2k-pci.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/net/ne2k-pci.c 2004-11-10 17:19:03 -08:00 @@ -653,12 +653,43 @@ pci_set_drvdata(pdev, NULL); } +#ifdef CONFIG_PM +static int ne2k_pci_suspend (struct pci_dev *pdev, u32 state) +{ + struct net_device *dev = pci_get_drvdata (pdev); + + netif_device_detach(dev); + pci_save_state(pdev); + pci_set_power_state(pdev, state); + + return 0; +} + +static int ne2k_pci_resume (struct pci_dev *pdev) +{ + struct net_device *dev = pci_get_drvdata (pdev); + + pci_set_power_state(pdev, 0); + pci_restore_state(pdev); + NS8390_init(dev, 1); + netif_device_attach(dev); + + return 0; +} + +#endif /* CONFIG_PM */ + static struct pci_driver ne2k_driver = { .name = DRV_NAME, .probe = ne2k_pci_init_one, .remove = __devexit_p(ne2k_pci_remove_one), .id_table = ne2k_pci_tbl, +#ifdef CONFIG_PM + .suspend = ne2k_pci_suspend, + .resume = ne2k_pci_resume, +#endif /* CONFIG_PM */ + }; diff -Nru a/drivers/net/ns83820.c b/drivers/net/ns83820.c --- a/drivers/net/ns83820.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/net/ns83820.c 2004-11-10 17:19:07 -08:00 @@ -64,6 +64,8 @@ * tuning * 0.20 - fix stupid RFEN thinko. i am such a smurf. * + * 20040828 0.21 - add hardware vlan accleration + * by Neil Horman * Driver Overview * =============== * @@ -92,7 +94,9 @@ //#define dprintk printk #define dprintk(x...) do { } while (0) +#include #include +#include #include #include #include @@ -108,6 +112,7 @@ #include #include #include +#include #include #include @@ -115,7 +120,7 @@ #define DRV_NAME "ns83820" -/* Global parameters. See MODULE_PARM near the bottom. */ +/* Global parameters. See module_param near the bottom. */ static int ihr = 2; static int reset_phy = 0; static int lnksts = 0; /* CFG_LNKSTS bit polarity */ @@ -138,6 +143,9 @@ /* tunables */ #define RX_BUF_SIZE 1500 /* 8192 */ +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) +#define NS83820_VLAN_ACCEL_SUPPORT +#endif /* Must not exceed ~65000. */ #define NR_RX_DESC 64 @@ -262,6 +270,8 @@ #define EXTSTS_UDPPKT 0x00200000 #define EXTSTS_TCPPKT 0x00080000 #define EXTSTS_IPPKT 0x00020000 +#define EXTSTS_VPKT 0x00010000 +#define EXTSTS_VTG_MASK 0x0000ffff #define SPDSTS_POLARITY (CFG_SPDSTS1 | CFG_SPDSTS0 | CFG_DUPSTS | (lnksts ? CFG_LNKSTS : 0)) @@ -403,6 +413,7 @@ #define CMDSTS_INTR 0x20000000 #define CMDSTS_ERR 0x10000000 #define CMDSTS_OK 0x08000000 +#define CMDSTS_RUNT 0x00200000 #define CMDSTS_LEN_MASK 0x0000ffff #define CMDSTS_DEST_MASK 0x01800000 @@ -432,6 +443,10 @@ struct pci_dev *pci_dev; +#ifdef NS83820_VLAN_ACCEL_SUPPORT + struct vlan_group *vlgrp; +#endif + struct rx_info rx_info; struct tasklet_struct rx_tasklet; @@ -494,6 +509,33 @@ (((NR_TX_DESC-2 + dev->tx_done_idx - dev->tx_free_idx) % NR_TX_DESC) > MIN_TX_DESC_FREE) +#ifdef NS83820_VLAN_ACCEL_SUPPORT +static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group *grp) +{ + struct ns83820 *dev = PRIV(ndev); + + spin_lock_irq(&dev->misc_lock); + spin_lock(&dev->tx_lock); + + dev->vlgrp = grp; + + spin_unlock(&dev->tx_lock); + spin_unlock_irq(&dev->misc_lock); +} + +static void ns83820_vlan_rx_kill_vid(struct net_device *ndev, unsigned short vid) +{ + struct ns83820 *dev = PRIV(ndev); + + spin_lock_irq(&dev->misc_lock); + spin_lock(&dev->tx_lock); + if (dev->vlgrp) + dev->vlgrp->vlan_devices[vid] = NULL; + spin_unlock(&dev->tx_lock); + spin_unlock_irq(&dev->misc_lock); +} +#endif + /* Packet Receiver * * The hardware supports linked lists of receive descriptors for @@ -836,6 +878,7 @@ struct ns83820 *dev = PRIV(ndev); struct rx_info *info = &dev->rx_info; unsigned next_rx; + int rx_rc, len; u32 cmdsts, *desc; unsigned long flags; int nr = 0; @@ -876,8 +919,24 @@ pci_unmap_single(dev->pci_dev, bufptr, RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + len = cmdsts & CMDSTS_LEN_MASK; +#ifdef NS83820_VLAN_ACCEL_SUPPORT + /* NH: As was mentioned below, this chip is kinda + * brain dead about vlan tag stripping. Frames + * that are 64 bytes with a vlan header appended + * like arp frames, or pings, are flagged as Runts + * when the tag is stripped and hardware. This + * also means that the OK bit in the descriptor + * is cleared when the frame comes in so we have + * to do a specific length check here to make sure + * the frame would have been ok, had we not stripped + * the tag. + */ + if (likely((CMDSTS_OK & cmdsts) || + ((cmdsts & CMDSTS_RUNT) && len >= 56))) { +#else if (likely(CMDSTS_OK & cmdsts)) { - int len = cmdsts & 0xffff; +#endif skb_put(skb, len); if (unlikely(!skb)) goto netdev_mangle_me_harder_failed; @@ -891,7 +950,18 @@ skb->ip_summed = CHECKSUM_NONE; } skb->protocol = eth_type_trans(skb, ndev); - if (NET_RX_DROP == netif_rx(skb)) { +#ifdef NS83820_VLAN_ACCEL_SUPPORT + if(extsts & EXTSTS_VPKT) { + unsigned short tag; + tag = ntohs(extsts & EXTSTS_VTG_MASK); + rx_rc = vlan_hwaccel_rx(skb,dev->vlgrp,tag); + } else { + rx_rc = netif_rx(skb); + } +#else + rx_rc = netif_rx(skb); +#endif + if (NET_RX_DROP == rx_rc) { netdev_mangle_me_harder_failed: dev->stats.rx_dropped ++; } @@ -1099,6 +1169,17 @@ extsts |= EXTSTS_UDPPKT; } +#ifdef NS83820_VLAN_ACCEL_SUPPORT + if(vlan_tx_tag_present(skb)) { + /* fetch the vlan tag info out of the + * ancilliary data if the vlan code + * is using hw vlan acceleration + */ + short tag = vlan_tx_tag_get(skb); + extsts |= (EXTSTS_VPKT | htons(tag)); + } +#endif + len = skb->len; if (nr_frags) len -= skb->data_len; @@ -1854,7 +1935,6 @@ SET_ETHTOOL_OPS(ndev, &ops); ndev->tx_timeout = ns83820_tx_timeout; ndev->watchdog_timeo = 5 * HZ; - pci_set_drvdata(pci_dev, ndev); ns83820_do_reset(dev, CR_RST); @@ -1980,11 +2060,25 @@ * a ping with a VLAN header) then the card, strips the 4 byte VLAN * tag and then checks the packet size, so if RXCFG_ARP is not enabled, * it discrards it!. These guys...... + * also turn on tag stripping if hardware acceleration is enabled */ - writel(VRCR_IPEN | VRCR_VTDEN, dev->base + VRCR); +#ifdef NS83820_VLAN_ACCEL_SUPPORT +#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN|VRCR_VTREN) +#else +#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN) +#endif + writel(VRCR_INIT_VALUE, dev->base + VRCR); - /* Enable per-packet TCP/UDP/IP checksumming */ - writel(VTCR_PPCHK, dev->base + VTCR); + /* Enable per-packet TCP/UDP/IP checksumming + * and per packet vlan tag insertion if + * vlan hardware acceleration is enabled + */ +#ifdef NS83820_VLAN_ACCEL_SUPPORT +#define VTCR_INIT_VALUE (VTCR_PPCHK|VTCR_VPPTI) +#else +#define VTCR_INIT_VALUE VTCR_PPCHK +#endif + writel(VTCR_INIT_VALUE, dev->base + VTCR); /* Ramit : Enable async and sync pause frames */ /* writel(0, dev->base + PCR); */ @@ -2001,6 +2095,13 @@ ndev->features |= NETIF_F_SG; ndev->features |= NETIF_F_IP_CSUM; +#ifdef NS83820_VLAN_ACCEL_SUPPORT + /* We also support hardware vlan acceleration */ + ndev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; + ndev->vlan_rx_register = ns83820_vlan_rx_register; + ndev->vlan_rx_kill_vid = ns83820_vlan_rx_kill_vid; +#endif + if (using_dac) { printk(KERN_INFO "%s: using 64 bit addressing.\n", ndev->name); @@ -2109,13 +2210,13 @@ MODULE_DEVICE_TABLE(pci, ns83820_pci_tbl); -MODULE_PARM(lnksts, "i"); +module_param(lnksts, int, 0); MODULE_PARM_DESC(lnksts, "Polarity of LNKSTS bit"); -MODULE_PARM(ihr, "i"); +module_param(ihr, int, 0); MODULE_PARM_DESC(ihr, "Time in 100 us increments to delay interrupts (range 0-127)"); -MODULE_PARM(reset_phy, "i"); +module_param(reset_phy, int, 0); MODULE_PARM_DESC(reset_phy, "Set to 1 to reset the PHY on startup"); module_init(ns83820_init); diff -Nru a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c --- a/drivers/net/pci-skeleton.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/pci-skeleton.c 2004-11-10 17:19:02 -08:00 @@ -795,7 +795,7 @@ tp->pci_dev = pdev; tp->board = ent->driver_data; tp->mmio_addr = ioaddr; - tp->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&tp->lock); pci_set_drvdata(pdev, dev); diff -Nru a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c --- a/drivers/net/pcnet32.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/net/pcnet32.c 2004-11-10 17:19:03 -08:00 @@ -359,9 +359,9 @@ struct net_device_stats stats; char tx_full; int options; - int shared_irq:1, /* shared irq possible */ - dxsuflo:1, /* disable transmit stop on uflo */ - mii:1; /* mii port available */ + unsigned int shared_irq:1, /* shared irq possible */ + dxsuflo:1, /* disable transmit stop on uflo */ + mii:1; /* mii port available */ struct net_device *next; struct mii_if_info mii_if; struct timer_list watchdog_timer; diff -Nru a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c --- a/drivers/net/ppp_async.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/ppp_async.c 2004-11-10 17:19:05 -08:00 @@ -911,7 +911,9 @@ break; c = buf[n]; - if (c == PPP_FLAG) { + if (flags != NULL && flags[n] != 0) { + ap->state |= SC_TOSS; + } else if (c == PPP_FLAG) { process_input_packet(ap); } else if (c == PPP_ESCAPE) { ap->state |= SC_ESCAPE; diff -Nru a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c --- a/drivers/net/ppp_generic.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/net/ppp_generic.c 2004-11-10 17:19:06 -08:00 @@ -1920,7 +1920,7 @@ #endif /* CONFIG_PPP_MULTILINK */ init_rwsem(&pch->chan_sem); spin_lock_init(&pch->downl); - pch->upl = RW_LOCK_UNLOCKED; + rwlock_init(&pch->upl); spin_lock_bh(&all_channels_lock); pch->file.index = ++last_channel_index; list_add(&pch->list, &new_channels); diff -Nru a/drivers/net/s2io.c b/drivers/net/s2io.c --- a/drivers/net/s2io.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/s2io.c 2004-11-10 17:19:05 -08:00 @@ -3983,14 +3983,14 @@ MODULE_AUTHOR("Raghavendra Koushik "); MODULE_LICENSE("GPL"); -MODULE_PARM(ring_num, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(frame_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(ring_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(fifo_num, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(fifo_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(rx_prio, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(tx_prio, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(latency_timer, "1-" __MODULE_STRING(1) "i"); +module_param(ring_num, uint, 0); +module_param_array(frame_len, uint, NULL, 0); +module_param_array(ring_len, uint, NULL, 0); +module_param(fifo_num, uint, 0); +module_param_array(fifo_len, uint, NULL, 0); +module_param(rx_prio, uint, 0); +module_param(tx_prio, uint, 0); +module_param(latency_timer, byte, 0); /* * Input Argument/s: diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c --- a/drivers/net/sis900.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/sis900.c 2004-11-10 17:19:04 -08:00 @@ -262,13 +262,12 @@ u8 reg; int i; - isa_bridge = pci_find_device(PCI_VENDOR_ID_SI, 0x0008, isa_bridge); + isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0008, isa_bridge); + if (!isa_bridge) + isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0018, isa_bridge); if (!isa_bridge) { - isa_bridge = pci_find_device(PCI_VENDOR_ID_SI, 0x0018, isa_bridge); - if (!isa_bridge) { - printk("%s: Can not find ISA bridge\n", net_dev->name); - return 0; - } + printk("%s: Can not find ISA bridge\n", net_dev->name); + return 0; } pci_read_config_byte(isa_bridge, 0x48, ®); pci_write_config_byte(isa_bridge, 0x48, reg | 0x40); @@ -278,6 +277,7 @@ ((u8 *)(net_dev->dev_addr))[i] = inb(0x71); } pci_write_config_byte(isa_bridge, 0x48, reg & ~0x40); + pci_dev_put(isa_bridge); return 1; } @@ -488,9 +488,11 @@ } /* save our host bridge revision */ - dev = pci_find_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630, NULL); - if (dev) + dev = pci_get_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630, NULL); + if (dev) { pci_read_config_byte(dev, PCI_CLASS_REVISION, &sis_priv->host_bridge_rev); + pci_dev_put(dev); + } /* print some information about our NIC */ printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ", net_dev->name, diff -Nru a/drivers/net/sk_mca.c b/drivers/net/sk_mca.c --- a/drivers/net/sk_mca.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/sk_mca.c 2004-11-10 17:19:05 -08:00 @@ -972,14 +972,6 @@ return &(priv->stat); } -/* we don't support runtime reconfiguration, since an MCA card can - be unambigously identified by its POS registers. */ - -static int skmca_config(struct net_device *dev, struct ifmap *map) -{ - return 0; -} - /* switch receiver mode. We use the LANCE's multicast filter to prefilter multicast addresses. */ @@ -1147,7 +1139,6 @@ /* set methods */ dev->open = skmca_open; dev->stop = skmca_close; - dev->set_config = skmca_config; dev->hard_start_xmit = skmca_tx; dev->do_ioctl = NULL; dev->get_stats = skmca_stats; diff -Nru a/drivers/net/skfp/hwmtm.c b/drivers/net/skfp/hwmtm.c --- a/drivers/net/skfp/hwmtm.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/skfp/hwmtm.c 2004-11-10 17:19:04 -08:00 @@ -1901,7 +1901,8 @@ } if (!smc->hw.mac_ring_is_up || frag_count > queue->tx_free) { - if (frame_status &= ~LAN_TX) { + frame_status &= ~LAN_TX; + if (frame_status) { DB_TX("Ring is down: terminate LAN_TX",0,0,2) ; } else { diff -Nru a/drivers/net/slip.c b/drivers/net/slip.c --- a/drivers/net/slip.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/net/slip.c 2004-11-10 17:19:07 -08:00 @@ -57,6 +57,7 @@ #define SL_CHECK_TRANSMIT #include #include +#include #include #include @@ -85,8 +86,8 @@ static struct net_device **slip_devs; -int slip_maxdev = SL_NRUNIT; /* Can be overridden with insmod! */ -MODULE_PARM(slip_maxdev, "i"); +static int slip_maxdev = SL_NRUNIT; +module_param(slip_maxdev, int, 0); MODULE_PARM_DESC(slip_maxdev, "Maximum number of slip devices"); static int slip_esc(unsigned char *p, unsigned char *d, int len); @@ -458,13 +459,11 @@ static void sl_tx_timeout(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); spin_lock(&sl->lock); if (netif_queue_stopped(dev)) { - struct slip *sl = (struct slip*)(dev->priv); - if (!netif_running(dev)) goto out; @@ -494,7 +493,7 @@ static int sl_xmit(struct sk_buff *skb, struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); spin_lock(&sl->lock); if (!netif_running(dev)) { @@ -528,7 +527,7 @@ static int sl_close(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); spin_lock_bh(&sl->lock); if (sl->tty) { @@ -547,7 +546,7 @@ static int sl_open(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); if (sl->tty==NULL) return -ENODEV; @@ -561,7 +560,7 @@ static int sl_change_mtu(struct net_device *dev, int new_mtu) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); if (new_mtu < 68 || new_mtu > 65534) return -EINVAL; @@ -577,7 +576,7 @@ sl_get_stats(struct net_device *dev) { static struct net_device_stats stats; - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); #ifdef SL_INCLUDE_CSLIP struct slcompress *comp; #endif @@ -612,7 +611,7 @@ static int sl_init(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); /* * Finish setting up the DEVICE info. @@ -630,7 +629,7 @@ static void sl_uninit(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); sl_free_bufs(sl); } @@ -719,7 +718,7 @@ if ((dev = slip_devs[i]) == NULL) break; - sl = dev->priv; + sl = netdev_priv(dev); if (sl->tty || sl->leased) continue; if (dev->flags&IFF_UP) @@ -746,7 +745,7 @@ if (dev == NULL) break; - sl = dev->priv; + sl = netdev_priv(dev); if (sl->leased) { if (sl->line != line) continue; @@ -788,7 +787,7 @@ i = sel; dev = slip_devs[i]; if (score > 1) { - sl = dev->priv; + sl = netdev_priv(dev); sl->flags &= (1 << SLF_INUSE); return sl; } @@ -799,7 +798,7 @@ return NULL; if (dev) { - sl = dev->priv; + sl = netdev_priv(dev); if (test_bit(SLF_INUSE, &sl->flags)) { unregister_netdevice(dev); dev = NULL; @@ -817,7 +816,7 @@ dev->base_addr = i; } - sl = dev->priv; + sl = netdev_priv(dev); /* Initialize channel control data */ sl->magic = SLIP_MAGIC; @@ -1260,7 +1259,7 @@ static int sl_ioctl(struct net_device *dev,struct ifreq *rq,int cmd) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); unsigned long *p = (unsigned long *)&rq->ifr_ifru; if (sl == NULL) /* Allocation failed ?? */ @@ -1406,7 +1405,7 @@ dev = slip_devs[i]; if (!dev) continue; - sl = dev->priv; + sl = netdev_priv(dev); spin_lock_bh(&sl->lock); if (sl->tty) { busy++; @@ -1423,7 +1422,7 @@ continue; slip_devs[i] = NULL; - sl = dev->priv; + sl = netdev_priv(dev); if (sl->tty) { printk(KERN_ERR "%s: tty discipline still running\n", dev->name); diff -Nru a/drivers/net/smc91x.h b/drivers/net/smc91x.h --- a/drivers/net/smc91x.h 2004-11-10 17:19:06 -08:00 +++ b/drivers/net/smc91x.h 2004-11-10 17:19:06 -08:00 @@ -245,7 +245,7 @@ while (!(DCSR(dma) & DCSR_STOPSTATE)) cpu_relax(); DCSR(dma) = 0; - dma_unmap_single(NULL, dmabuf, len, PCI_DMA_FROMDEVICE); + dma_unmap_single(NULL, dmabuf, len, DMA_FROM_DEVICE); } #endif @@ -273,7 +273,7 @@ } len *= 2; - dmabuf = dma_map_single(NULL, buf, len, PCI_DMA_FROMDEVICE); + dmabuf = dma_map_single(NULL, buf, len, DMA_FROM_DEVICE); DCSR(dma) = DCSR_NODESC; DTADR(dma) = dmabuf; DSADR(dma) = physaddr + reg; diff -Nru a/drivers/net/sundance.c b/drivers/net/sundance.c --- a/drivers/net/sundance.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/sundance.c 2004-11-10 17:19:05 -08:00 @@ -879,7 +879,7 @@ if (dev->if_port == 0) dev->if_port = np->default_port; - np->mcastlock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&np->mcastlock); set_rx_mode(dev); writew(0, ioaddr + IntrEnable); diff -Nru a/drivers/net/sungem.c b/drivers/net/sungem.c --- a/drivers/net/sungem.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/net/sungem.c 2004-11-10 17:19:07 -08:00 @@ -2681,7 +2681,7 @@ return rc; } -#if (!defined(__sparc__) && !defined(CONFIG_PPC)) +#if (!defined(__sparc__) && !defined(CONFIG_PPC_PMAC)) /* Fetch MAC address from vital product data of PCI ROM. */ static void find_eth_addr_in_vpd(void __iomem *rom_base, int len, unsigned char *dev_addr) { diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/tg3.c 2004-11-10 17:19:05 -08:00 @@ -12,7 +12,7 @@ #include #include - +#include #include #include #include @@ -60,8 +60,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.11" -#define DRV_MODULE_RELDATE "October 20, 2004" +#define DRV_MODULE_VERSION "3.13" +#define DRV_MODULE_RELDATE "November 1, 2004" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -141,11 +141,11 @@ MODULE_AUTHOR("David S. Miller (davem@redhat.com) and Jeff Garzik (jgarzik@pobox.com)"); MODULE_DESCRIPTION("Broadcom Tigon3 ethernet driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(tg3_debug, "i"); -MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value"); MODULE_VERSION(DRV_MODULE_VERSION); static int tg3_debug = -1; /* -1 == use TG3_DEF_MSG_ENABLE as value */ +module_param(tg3_debug, int, 0); +MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value"); static struct pci_device_id tg3_pci_tbl[] = { { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5700, @@ -225,8 +225,8 @@ MODULE_DEVICE_TABLE(pci, tg3_pci_tbl); -struct { - char string[ETH_GSTRING_LEN]; +static struct { + const char string[ETH_GSTRING_LEN]; } ethtool_stats_keys[TG3_NUM_STATS] = { { "rx_octets" }, { "rx_fragments" }, @@ -418,6 +418,20 @@ tg3_cond_int(tp); } +/* tg3_restart_ints + * similar to tg3_enable_ints, but it can return without flushing the + * PIO write which reenables interrupts + */ +static void tg3_restart_ints(struct tg3 *tp) +{ + tw32(TG3PCI_MISC_HOST_CTRL, + (tp->misc_host_ctrl & ~MISC_HOST_CTRL_MASK_PCI_INT)); + tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000000); + mmiowb(); + + tg3_cond_int(tp); +} + static inline void tg3_netif_stop(struct tg3 *tp) { netif_poll_disable(tp->dev); @@ -2145,7 +2159,16 @@ tp->tg3_flags2 |= TG3_FLG2_PHY_JUST_INITTED; } else if (mac_status & (MAC_STATUS_PCS_SYNCED | MAC_STATUS_SIGNAL_DET)) { - sg_dig_status = tr32(SG_DIG_STATUS); + int i; + + /* Giver time to negotiate (~200ms) */ + for (i = 0; i < 40000; i++) { + sg_dig_status = tr32(SG_DIG_STATUS); + if (sg_dig_status & (0x3)) + break; + udelay(5); + } + mac_status = tr32(MAC_STATUS); if ((sg_dig_status & (1 << 1)) && (mac_status & MAC_STATUS_PCS_SYNCED)) { @@ -2730,6 +2753,7 @@ tw32_rx_mbox(MAILBOX_RCV_JUMBO_PROD_IDX + TG3_64BIT_REG_LOW, sw_idx); } + mmiowb(); return received; } @@ -2788,7 +2812,7 @@ if (done) { spin_lock_irqsave(&tp->lock, flags); __netif_rx_complete(netdev); - tg3_enable_ints(tp); + tg3_restart_ints(tp); spin_unlock_irqrestore(&tp->lock, flags); } @@ -3177,6 +3201,7 @@ netif_stop_queue(dev); out_unlock: + mmiowb(); spin_unlock_irqrestore(&tp->tx_lock, flags); dev->trans_start = jiffies; @@ -4505,7 +4530,7 @@ 0xac470014, 0xac4a0018, 0x03e00008, 0xac4b001c, 0x00000000, 0x00000000, }; -u32 tg3TsoFwRodata[] = { +static u32 tg3TsoFwRodata[] = { 0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000, 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x496e0000, 0x73746b6f, 0x66662a2a, 0x00000000, 0x53774576, 0x656e7430, 0x00000000, 0x00000000, @@ -4513,7 +4538,7 @@ 0x00000000, }; -u32 tg3TsoFwData[] = { +static u32 tg3TsoFwData[] = { 0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e, 0x362e3000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, @@ -4694,14 +4719,14 @@ 0x00000000, 0x00000000, 0x00000000, }; -u32 tg3Tso5FwRodata[(TG3_TSO5_FW_RODATA_LEN / 4) + 1] = { +static u32 tg3Tso5FwRodata[(TG3_TSO5_FW_RODATA_LEN / 4) + 1] = { 0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000, 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x00000000, 0x00000000, 0x66617461, 0x6c457272, 0x00000000, 0x00000000, 0x00000000, }; -u32 tg3Tso5FwData[(TG3_TSO5_FW_DATA_LEN / 4) + 1] = { +static u32 tg3Tso5FwData[(TG3_TSO5_FW_DATA_LEN / 4) + 1] = { 0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e, 0x322e3000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; @@ -6324,7 +6349,7 @@ u32 offset, u32 *val); static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 *data) { - struct tg3 *tp = dev->priv; + struct tg3 *tp = netdev_priv(dev); int ret; u8 *pd; u32 i, offset, len, val, b_offset, b_count; @@ -6686,7 +6711,7 @@ static void tg3_get_ethtool_stats (struct net_device *dev, struct ethtool_stats *estats, u64 *tmp_stats) { - struct tg3 *tp = dev->priv; + struct tg3 *tp = netdev_priv(dev); memcpy(tmp_stats, tg3_get_estats(tp), sizeof(tp->estats)); } @@ -8224,7 +8249,7 @@ spin_lock_init(&tp->indirect_lock); INIT_WORK(&tp->reset_task, tg3_reset_task, tp); - tp->regs = ioremap(tg3reg_base, tg3reg_len); + tp->regs = ioremap_nocache(tg3reg_base, tg3reg_len); if (tp->regs == 0UL) { printk(KERN_ERR PFX "Cannot map device registers, " "aborting.\n"); diff -Nru a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c --- a/drivers/net/tokenring/ibmtr.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/tokenring/ibmtr.c 2004-11-10 17:19:05 -08:00 @@ -895,7 +895,7 @@ ti->sram_virt &= ~1; /* to reverse what we do in tok_close */ /* init the spinlock */ - ti->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&ti->lock); init_timer(&ti->tr_timer); i = tok_init_card(dev); diff -Nru a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c --- a/drivers/net/tokenring/olympic.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/net/tokenring/olympic.c 2004-11-10 17:19:06 -08:00 @@ -1401,7 +1401,6 @@ u16 lan_status = 0, lan_status_diff ; /* Initialize to stop compiler warning */ u8 fdx_prot_error ; u16 next_ptr; - int i ; arb_block = (olympic_priv->olympic_lap + olympic_priv->arb) ; asb_block = (olympic_priv->olympic_lap + olympic_priv->asb) ; diff -Nru a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c --- a/drivers/net/tulip/de2104x.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/net/tulip/de2104x.c 2004-11-10 17:19:06 -08:00 @@ -1208,8 +1208,7 @@ pci_write_config_dword(de->pdev, PCIPM, pmctl); /* de4x5.c delays, so we do too */ - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(msecs_to_jiffies(10)); + msleep(10); } } diff -Nru a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c --- a/drivers/net/tulip/de4x5.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/tulip/de4x5.c 2004-11-10 17:19:02 -08:00 @@ -1141,7 +1141,7 @@ lp->asBitValid = TRUE; lp->timeout = -1; lp->gendev = gendev; - lp->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&lp->lock); init_timer(&lp->timer); de4x5_parse_params(dev); @@ -1316,7 +1316,7 @@ ** Re-initialize the DE4X5... */ status = de4x5_init(dev); - lp->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&lp->lock); lp->state = OPEN; de4x5_dbg_open(dev); @@ -5089,7 +5089,7 @@ lp->useMII = TRUE; /* Search the MII address space for possible PHY devices */ - for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(++i)%DE4X5_MAX_MII) { + for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(i+1)%DE4X5_MAX_MII) { lp->phy[lp->active].addr = i; if (i==0) n++; /* Count cycles */ while (de4x5_reset_phy(dev)<0) udelay(100);/* Wait for reset */ diff -Nru a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c --- a/drivers/net/tulip/tulip_core.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/tulip/tulip_core.c 2004-11-10 17:19:05 -08:00 @@ -1221,6 +1221,11 @@ struct tulip_private *tp; /* See note below on the multiport cards. */ static unsigned char last_phys_addr[6] = {0x00, 'L', 'i', 'n', 'u', 'x'}; + static struct pci_device_id early_486_chipsets[] = { + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424) }, + { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496) }, + { }, + }; static int last_irq; static int multiport_cnt; /* For four-port boards w/one EEPROM */ u8 chip_rev; @@ -1274,17 +1279,15 @@ * without the workarounds being on. */ - /* Intel Saturn. Switch to 8 long words burst, 8 long word cache aligned - Aries might need this too. The Saturn errata are not pretty reading but - thankfully it's an old 486 chipset. + /* 1. Intel Saturn. Switch to 8 long words burst, 8 long word cache + aligned. Aries might need this too. The Saturn errata are not + pretty reading but thankfully it's an old 486 chipset. + + 2. The dreaded SiS496 486 chipset. Same workaround as Intel + Saturn. */ - if (pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424, NULL)) { - csr0 = MRL | MRM | (8 << BurstLenShift) | (1 << CALShift); - force_csr0 = 1; - } - /* The dreaded SiS496 486 chipset. Same workaround as above. */ - if (pci_find_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, NULL)) { + if (pci_dev_present(early_486_chipsets)) { csr0 = MRL | MRM | (8 << BurstLenShift) | (1 << CALShift); force_csr0 = 1; } diff -Nru a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c --- a/drivers/net/tulip/xircom_cb.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/net/tulip/xircom_cb.c 2004-11-10 17:19:06 -08:00 @@ -117,6 +117,9 @@ static int xircom_close(struct net_device *dev); static void xircom_up(struct xircom_private *card); static struct net_device_stats *xircom_get_stats(struct net_device *dev); +#if CONFIG_NET_POLL_CONTROLLER +static void xircom_poll_controller(struct net_device *dev); +#endif static void investigate_read_descriptor(struct net_device *dev,struct xircom_private *card, int descnr, unsigned int bufferoffset); static void investigate_write_descriptor(struct net_device *dev, struct xircom_private *card, int descnr, unsigned int bufferoffset); @@ -256,7 +259,7 @@ private->dev = dev; private->pdev = pdev; private->io_port = pci_resource_start(pdev, 0); - private->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&private->lock); dev->irq = pdev->irq; dev->base_addr = private->io_port; @@ -269,6 +272,9 @@ dev->stop = &xircom_close; dev->get_stats = &xircom_get_stats; dev->priv = private; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = &xircom_poll_controller; +#endif SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); pci_set_drvdata(pdev, dev); @@ -500,6 +506,14 @@ } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void xircom_poll_controller(struct net_device *dev) +{ + disable_irq(dev->irq); + xircom_interrupt(dev->irq, dev, NULL); + enable_irq(dev->irq); +} +#endif static void initialize_card(struct xircom_private *card) diff -Nru a/drivers/net/tulip/xircom_tulip_cb.c b/drivers/net/tulip/xircom_tulip_cb.c --- a/drivers/net/tulip/xircom_tulip_cb.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/tulip/xircom_tulip_cb.c 2004-11-10 17:19:02 -08:00 @@ -584,7 +584,7 @@ tp = netdev_priv(dev); - tp->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&tp->lock); tp->pdev = pdev; tp->chip_id = chip_idx; /* BugFixes: The 21143-TD hangs with PCI Write-and-Invalidate cycles. */ diff -Nru a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c --- a/drivers/net/via-rhine.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/net/via-rhine.c 2004-11-10 17:19:07 -08:00 @@ -627,7 +627,7 @@ } #ifdef USE_MMIO -static void __devinit enable_mmio(long pioaddr, u32 quirks) +static void enable_mmio(long pioaddr, u32 quirks) { int n; if (quirks & rqRhineI) { diff -Nru a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c --- a/drivers/net/wan/cosa.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/wan/cosa.c 2004-11-10 17:19:02 -08:00 @@ -156,7 +156,7 @@ unsigned short startaddr; /* Firmware start address */ unsigned short busmaster; /* Use busmastering? */ int nchannels; /* # of channels on this card */ - int driver_status; /* For communicating with firware */ + int driver_status; /* For communicating with firmware */ int firmware_status; /* Downloaded, reseted, etc. */ long int rxbitmap, txbitmap; /* Bitmap of channels who are willing to send/receive data */ long int rxtx; /* RX or TX in progress? */ diff -Nru a/drivers/net/wan/cycx_main.c b/drivers/net/wan/cycx_main.c --- a/drivers/net/wan/cycx_main.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/wan/cycx_main.c 2004-11-10 17:19:04 -08:00 @@ -225,7 +225,7 @@ card->hw.irq = irq; card->hw.dpmsize = CYCX_WINDOWSIZE; card->hw.fwid = CFID_X25_2X; - card->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&card->lock); init_waitqueue_head(&card->wait_stats); rc = cycx_setup(&card->hw, conf->data, conf->data_size, conf->maddr); diff -Nru a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c --- a/drivers/net/wan/cycx_x25.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/net/wan/cycx_x25.c 2004-11-10 17:19:03 -08:00 @@ -92,6 +92,8 @@ #include /* Cyclom 2X common user API definitions */ #include /* X.25 firmware API definitions */ +#include + /* Defines & Macros */ #define CYCX_X25_MAX_CMD_RETRY 5 #define CYCX_X25_CHAN_MTU 2048 /* unfragmented logical channel MTU */ @@ -231,7 +233,7 @@ /* Initialize protocol-specific fields */ card->mbox = card->hw.dpmbase + X25_MBOX_OFFS; card->u.x.connection_keys = 0; - card->u.x.lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&card->u.x.lock); /* Configure adapter. Here we set reasonable defaults, then parse * device configuration structure and set configuration options. @@ -1486,11 +1488,7 @@ ptr = skb_put(skb, 1); *ptr = event; - skb->dev = dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, dev); netif_rx(skb); dev->last_rx = jiffies; /* timestamp */ } diff -Nru a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c --- a/drivers/net/wan/dscc4.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/net/wan/dscc4.c 2004-11-10 17:19:07 -08:00 @@ -518,9 +518,7 @@ skb = dev_alloc_skb(len); dpriv->rx_skbuff[dirty] = skb; if (skb) { - skb->dev = dev; skb->protocol = hdlc_type_trans(skb, dev); - skb->mac.raw = skb->data; rx_fd->data = pci_map_single(dpriv->pci_priv->pdev, skb->data, len, PCI_DMA_FROMDEVICE); } else { diff -Nru a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c --- a/drivers/net/wan/farsync.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/net/wan/farsync.c 2004-11-10 17:19:05 -08:00 @@ -781,7 +781,7 @@ } } -/* Process the result of trying to pass a recieved frame up the stack +/* Process the result of trying to pass a received frame up the stack */ static void fst_process_rx_status(int rx_status, char *name) @@ -857,6 +857,18 @@ dev->trans_start = jiffies; } +/* + * Mark it for our own raw sockets interface + */ +static unsigned short farsync_type_trans(struct sk_buff *skb, + struct net_device *dev) +{ + skb->dev = dev; + skb->mac.raw = skb->data; + skb->pkt_type = PACKET_HOST; + return htons(ETH_P_CUST); +} + /* Rx dma complete interrupt */ static void @@ -881,17 +893,10 @@ /* Push upstream */ dbg(DBG_RX, "Pushing the frame up the stack\n"); - skb->mac.raw = skb->data; - skb->dev = dev; - if (port->mode == FST_RAW) { - /* - * Mark it for our own raw sockets interface - */ - skb->protocol = htons(ETH_P_CUST); - skb->pkt_type = PACKET_HOST; - } else { - skb->protocol = hdlc_type_trans(skb, skb->dev); - } + if (port->mode == FST_RAW) + skb->protocol = farsync_type_trans(skb, dev); + else + skb->protocol = hdlc_type_trans(skb, dev); rx_status = netif_rx(skb); fst_process_rx_status(rx_status, port_to_dev(port)->name); if (rx_status == NET_RX_DROP) @@ -1316,17 +1321,10 @@ /* Push upstream */ dbg(DBG_RX, "Pushing frame up the stack\n"); - skb->mac.raw = skb->data; - skb->dev = dev; - if (port->mode == FST_RAW) { - /* - * Mark it for our own raw sockets interface - */ - skb->protocol = htons(ETH_P_CUST); - skb->pkt_type = PACKET_HOST; - } else { - skb->protocol = hdlc_type_trans(skb, skb->dev); - } + if (port->mode == FST_RAW) + skb->protocol = farsync_type_trans(skb, dev); + else + skb->protocol = hdlc_type_trans(skb, dev); rx_status = netif_rx(skb); fst_process_rx_status(rx_status, port_to_dev(port)->name); if (rx_status == NET_RX_DROP) { diff -Nru a/drivers/net/wan/hd6457x.c b/drivers/net/wan/hd6457x.c --- a/drivers/net/wan/hd6457x.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/net/wan/hd6457x.c 2004-11-10 17:19:03 -08:00 @@ -315,8 +315,6 @@ #endif stats->rx_packets++; stats->rx_bytes += skb->len; - skb->mac.raw = skb->data; - skb->dev = dev; skb->dev->last_rx = jiffies; skb->protocol = hdlc_type_trans(skb, dev); netif_rx(skb); diff -Nru a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c --- a/drivers/net/wan/hdlc_x25.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/net/wan/hdlc_x25.c 2004-11-10 17:19:07 -08:00 @@ -23,6 +23,8 @@ #include #include +#include + /* These functions are callbacks called by LAPB layer */ static void x25_connect_disconnect(struct net_device *dev, int reason, int code) @@ -38,11 +40,7 @@ ptr = skb_put(skb, 1); *ptr = code; - skb->dev = dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, dev); netif_rx(skb); } @@ -74,11 +72,7 @@ ptr = skb->data; *ptr = 0; - skb->dev = dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, dev); return netif_rx(skb); } diff -Nru a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c --- a/drivers/net/wan/lapbether.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/wan/lapbether.c 2004-11-10 17:19:04 -08:00 @@ -43,6 +43,8 @@ #include #include +#include + static char bcast_addr[6] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; /* If this number is made larger, check that the temporary string buffer @@ -137,11 +139,7 @@ ptr = skb->data; *ptr = 0x00; - skb->dev = dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, dev); skb->dev->last_rx = jiffies; return netif_rx(skb); } @@ -233,11 +231,7 @@ ptr = skb_put(skb, 1); *ptr = 0x01; - skb->dev = dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, dev); skb->dev->last_rx = jiffies; netif_rx(skb); } @@ -255,11 +249,7 @@ ptr = skb_put(skb, 1); *ptr = 0x02; - skb->dev = dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, dev); skb->dev->last_rx = jiffies; netif_rx(skb); } diff -Nru a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c --- a/drivers/net/wan/lmc/lmc_main.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/net/wan/lmc/lmc_main.c 2004-11-10 17:19:03 -08:00 @@ -101,7 +101,6 @@ static int lmc_close(struct net_device *dev); static struct net_device_stats *lmc_get_stats(struct net_device *dev); static irqreturn_t lmc_interrupt(int irq, void *dev_instance, struct pt_regs *regs); -static int lmc_set_config(struct net_device *dev, struct ifmap *map); static void lmc_initcsrs(lmc_softc_t * const sc, lmc_csrptr_t csr_base, size_t csr_size); static void lmc_softreset(lmc_softc_t * const); static void lmc_running_reset(struct net_device *dev); @@ -814,7 +813,6 @@ dev->stop = lmc_close; dev->get_stats = lmc_get_stats; dev->do_ioctl = lmc_ioctl; - dev->set_config = lmc_set_config; dev->tx_timeout = lmc_driver_timeout; dev->watchdog_timeo = (HZ); /* 1 second */ @@ -1973,13 +1971,6 @@ LMC_CSR_WRITE (sc, csr_txlist, virt_to_bus (sc->lmc_txring)); lmc_trace(sc->lmc_device, "lmc_softreset out"); -} - -static int lmc_set_config(struct net_device *dev, struct ifmap *map) /*fold00*/ -{ - lmc_trace(dev, "lmc_set_config in"); - lmc_trace(dev, "lmc_set_config out"); - return -EOPNOTSUPP; } void lmc_gpio_mkinput(lmc_softc_t * const sc, u_int32_t bits) /*fold00*/ diff -Nru a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c --- a/drivers/net/wan/pc300_drv.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/net/wan/pc300_drv.c 2004-11-10 17:19:06 -08:00 @@ -1959,7 +1959,6 @@ cpc_trace(dev, skb, 'R'); } stats->rx_packets++; - skb->mac.raw = skb->data; skb->protocol = hdlc_type_trans(skb, dev); netif_rx(skb); } diff -Nru a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c --- a/drivers/net/wan/wanxl.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/net/wan/wanxl.c 2004-11-10 17:19:06 -08:00 @@ -224,8 +224,6 @@ #endif stats->rx_packets++; stats->rx_bytes += skb->len; - skb->mac.raw = skb->data; - skb->dev = dev; dev->last_rx = jiffies; skb->protocol = hdlc_type_trans(skb, dev); netif_rx(skb); diff -Nru a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c --- a/drivers/net/wan/x25_asy.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/net/wan/x25_asy.c 2004-11-10 17:19:03 -08:00 @@ -34,6 +34,8 @@ #include #include "x25_asy.h" +#include + static struct net_device **x25_asy_devs; static int x25_asy_maxdev = SL_NRUNIT; @@ -209,10 +211,8 @@ return; } skb_push(skb,1); /* LAPB internal control */ - skb->dev = sl->dev; memcpy(skb_put(skb,count), sl->rbuff, count); - skb->mac.raw=skb->data; - skb->protocol=htons(ETH_P_X25); + skb->protocol = x25_type_trans(skb, sl->dev); if((err=lapb_data_received(skb->dev, skb))!=LAPB_OK) { kfree_skb(skb); @@ -419,11 +419,7 @@ ptr = skb_put(skb, 1); *ptr = 0x01; - skb->dev = sl->dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, sl->dev); netif_rx(skb); sl->dev->last_rx = jiffies; } @@ -442,11 +438,7 @@ ptr = skb_put(skb, 1); *ptr = 0x02; - skb->dev = sl->dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, sl->dev); netif_rx(skb); sl->dev->last_rx = jiffies; } diff -Nru a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c --- a/drivers/net/wireless/airo.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/wireless/airo.c 2004-11-10 17:19:02 -08:00 @@ -2722,7 +2722,7 @@ set_bit(FLAG_MPI, &ai->flags); } ai->dev = dev; - ai->aux_lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&ai->aux_lock); sema_init(&ai->sem, 1); ai->config.len = 0; ai->pci = pci; diff -Nru a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c --- a/drivers/net/wireless/atmel.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/net/wireless/atmel.c 2004-11-10 17:19:03 -08:00 @@ -1267,7 +1267,7 @@ build_wpa_mib(priv); break; case ISR_GENERIC_IRQ: - printk(KERN_INFO "%s: Generic_irq recieved.\n", dev->name); + printk(KERN_INFO "%s: Generic_irq received.\n", dev->name); break; } } @@ -2567,7 +2567,7 @@ struct { u8 BSSID[6]; u8 SSID[MAX_SSID_LENGTH]; - u8 BSS_type; /* this is a short in a scan command - wierd */ + u8 BSS_type; /* this is a short in a scan command - weird */ u8 channel; u16 timeout; u8 SSID_size; diff -Nru a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c --- a/drivers/net/wireless/atmel_cs.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/net/wireless/atmel_cs.c 2004-11-10 17:19:04 -08:00 @@ -350,13 +350,10 @@ /* This is strictly temporary, until PCMCIA devices get integrated into the device model. */ static struct device *atmel_device(void) { - static char *kobj_name = "atmel_cs"; - static struct device dev = { .bus_id = "pcmcia", }; - dev.kobj.k_name = kmalloc(strlen(kobj_name)+1, GFP_KERNEL); - strcpy(dev.kobj.k_name, kobj_name); + kobject_set_name(&dev.kobj, "atmel_cs"); kobject_init(&dev.kobj); return &dev; diff -Nru a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c --- a/drivers/net/wireless/netwave_cs.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/net/wireless/netwave_cs.c 2004-11-10 17:19:07 -08:00 @@ -219,7 +219,6 @@ /* Misc device stuff */ static int netwave_open(struct net_device *dev); /* Open the device */ static int netwave_close(struct net_device *dev); /* Close the device */ -static int netwave_config(struct net_device *dev, struct ifmap *map); /* Packet transmission and Packet reception */ static int netwave_start_xmit( struct sk_buff *skb, struct net_device *dev); @@ -482,7 +481,6 @@ /* Netwave specific entries in the device structure */ SET_MODULE_OWNER(dev); dev->hard_start_xmit = &netwave_start_xmit; - dev->set_config = &netwave_config; dev->get_stats = &netwave_get_stats; dev->set_multicast_list = &set_multicast_list; /* wireless extensions */ @@ -1286,16 +1284,6 @@ /* Set the IENA bit in COR */ wait_WOC(iobase); outb(corConfIENA + corConfLVLREQ, iobase + NETWAVE_REG_COR); -} - -/* - * Function netwave_config (dev, map) - * - * Configure device, this work is done by netwave_pcmcia_config when a - * card is inserted - */ -static int netwave_config(struct net_device *dev, struct ifmap *map) { - return 0; } /* diff -Nru a/drivers/net/znet.c b/drivers/net/znet.c --- a/drivers/net/znet.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/net/znet.c 2004-11-10 17:19:02 -08:00 @@ -421,7 +421,7 @@ znet->rx_dma = netinfo->dma1; znet->tx_dma = netinfo->dma2; - znet->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&znet->lock); znet->sia_base = 0xe6; /* Magic address for the 82501 SIA */ znet->sia_size = 2; /* maz: Despite the '593 being advertised above as using a diff -Nru a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c --- a/drivers/oprofile/oprofilefs.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/oprofile/oprofilefs.c 2004-11-10 17:19:04 -08:00 @@ -135,11 +135,8 @@ { struct dentry * dentry; struct inode * inode; - struct qstr qname; - qname.name = name; - qname.len = strlen(name); - qname.hash = full_name_hash(qname.name, qname.len); - dentry = d_alloc(root, &qname); + + dentry = d_alloc_name(root, name); if (!dentry) return NULL; inode = oprofilefs_get_inode(sb, S_IFREG | perm); @@ -228,11 +225,8 @@ { struct dentry * dentry; struct inode * inode; - struct qstr qname; - qname.name = name; - qname.len = strlen(name); - qname.hash = full_name_hash(qname.name, qname.len); - dentry = d_alloc(root, &qname); + + dentry = d_alloc_name(root, name); if (!dentry) return NULL; inode = oprofilefs_get_inode(sb, S_IFDIR | 0755); diff -Nru a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c --- a/drivers/parisc/lba_pci.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/parisc/lba_pci.c 2004-11-10 17:19:05 -08:00 @@ -1,4 +1,5 @@ /* +** ** PCI Lower Bus Adapter (LBA) manager ** ** (c) Copyright 1999,2000 Grant Grundler @@ -116,7 +117,7 @@ ** bus number for each LBA depending on what firmware does. */ -#define MODULE_NAME "lba" +#define MODULE_NAME "LBA" #define LBA_FUNC_ID 0x0000 /* function id */ #define LBA_FCLASS 0x0008 /* function class, bist, header, rev... */ @@ -163,6 +164,7 @@ #define LBA_EIOS_BASE 0x0260 /* Extra I/O port space */ #define LBA_EIOS_MASK 0x0268 +#define LBA_GLOBAL_MASK 0x0270 /* Mercury only: Global Address Mask */ #define LBA_DMA_CTL 0x0278 /* firmware sets this */ #define LBA_IBASE 0x0300 /* SBA DMA support */ @@ -183,11 +185,7 @@ #define LBA_IOSAPIC_BASE 0x800 /* Offset of IRQ logic */ /* non-postable I/O port space, densely packed */ -#ifdef CONFIG_PARISC64 -#define LBA_ASTRO_PORT_BASE (0xfffffffffee00000UL) -#else -#define LBA_ASTRO_PORT_BASE (0xfee00000UL) -#endif +#define LBA_PORT_BASE (PCI_F_EXTEND | 0xfee00000UL) #define ELROY_HVERS 0x782 #define MERCURY_HVERS 0x783 @@ -283,8 +281,8 @@ ** Extract LBA (Rope) number from HPA ** REVISIT: 16 ropes for Stretch/Ike? */ -#define ROPES_PER_SBA 8 -#define LBA_NUM(x) ((((unsigned long) x) >> 13) & (ROPES_PER_SBA-1)) +#define ROPES_PER_IOC 8 +#define LBA_NUM(x) ((((unsigned long) x) >> 13) & (ROPES_PER_IOC-1)) static void @@ -444,7 +442,8 @@ } #define LBA_CFG_TR4_ADDR_SETUP(d, addr) \ - WRITE_REG32(((addr) & ~3), (d)->hba.base_addr + LBA_PCI_CFG_ADDR) + WRITE_REG32(((addr) & ~3), (d)->hba.base_addr + LBA_PCI_CFG_ADDR); \ + lba_t32 = READ_REG32((d)->hba.base_addr + LBA_PCI_CFG_ADDR) #define LBA_CFG_ADDR_SETUP(d, addr) { \ WRITE_REG32(((addr) & ~3), (d)->hba.base_addr + LBA_PCI_CFG_ADDR); \ @@ -520,7 +519,16 @@ return(data); } -#ifdef CONFIG_PARISC64 + +#if USE_PAT_PDC_CFG + +/* PAT PDC needs to be relocated in order to perform properly. + * tg3 driver does about 1600 PCI Cfg writes to initialize the card. + * On 440Mhz A500, PDC takes ~20ms/write, or ~30 seconds per card. + * On PA8800, that takes about 5ms/write (8 seconds). + * But relocating PDC will burn at least 4MB of RAM. + * Easier/Cheaper to just maintain our own mercury cfg ops. + */ #define pat_cfg_addr(bus, devfn, addr) (((bus) << 16) | ((devfn) << 8) | (addr)) static int pat_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) @@ -553,11 +561,84 @@ .read = pat_cfg_read, .write = pat_cfg_write, }; -#else -/* keep the compiler from complaining about undeclared variables */ -#define pat_cfg_ops lba_cfg_ops #endif + +#ifdef CONFIG_PARISC64 +static int mercury_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) +{ + struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); + u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; + u32 tok = LBA_CFG_TOK(local_bus, devfn); + + /* Basic Algorithm + ** Should only get here on fully working LBA rev. + ** This is how simple the original LBA code should have been. + */ + LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); + switch(size) { + case 1: *(u8 *) data = READ_REG8(d->hba.base_addr + LBA_PCI_CFG_DATA + + (pos & 3)); + DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __FUNCTION__, tok, pos, + *(u8 *)data); + return(*(u8 *)data == (u8) ~0U); + case 2: *(u16 *) data = READ_REG16(d->hba.base_addr + LBA_PCI_CFG_DATA + + (pos & 2)); + DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __FUNCTION__, tok, pos, + *(u16 *)data); + return(*(u16 *)data == (u16) ~0U); + case 4: *(u32 *) data = READ_REG32(d->hba.base_addr + LBA_PCI_CFG_DATA); + DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __FUNCTION__, tok, pos, *data); + return(*data == ~0U); + } + DBG_CFG("%s(%x+%2x) -> bad size (%d)\n", __FUNCTION__, tok, pos, size); + *data = ~0U; + return(!PCIBIOS_SUCCESSFUL); /* failed */ +} + +/* + * LBA 4.0 config write code implements non-postable semantics + * by doing a read of CONFIG ADDR after the write. + */ + +static int mercury_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data) +{ + struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); + unsigned long data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; + u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; + u32 tok = LBA_CFG_TOK(local_bus,devfn); + + ASSERT((tok & 0xff) == 0); + ASSERT(pos < 0x100); + + DBG_CFG("%s(%x+%2x) <- 0x%x (c)\n", __FUNCTION__, tok, pos, data); + + /* Basic Algorithm */ + LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); + switch(size) { + case 1: WRITE_REG8 (data, data_reg + (pos & 3)); break; + case 2: WRITE_REG16(data, data_reg + (pos & 2)); break; + case 4: WRITE_REG32(data, data_reg); break; + default: + DBG_CFG("%s(%x+%2x) WTF! size %d\n", __FUNCTION__, tok, pos, + size); + } + + /* flush posted write */ + lba_t32 = READ_U32(d->hba.base_addr + LBA_PCI_CFG_ADDR); + return PCIBIOS_SUCCESSFUL; +} + + +static struct pci_ops mercury_cfg_ops = { + .read = mercury_cfg_read, + .write = mercury_cfg_write, +}; +#else +#define mercury_cfg_ops lba_cfg_ops +#endif /* CONFIG_PARISC64 */ + + static int lba_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) { struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); @@ -768,7 +849,7 @@ pci_read_bridge_bases(bus); } else { /* Host-PCI Bridge */ - int err; + int err, i; DBG("lba_fixup_bus() %s [%lx/%lx]/%x\n", ldev->hba.io_space.name, @@ -781,30 +862,65 @@ err = request_resource(&ioport_resource, &(ldev->hba.io_space)); if (err < 0) { - BUG(); lba_dump_res(&ioport_resource, 2); + BUG(); + } + + if (ldev->hba.elmmio_space.start) { + err = request_resource(&iomem_resource, + &(ldev->hba.elmmio_space)); + if (err < 0) { + + printk("FAILED: lba_fixup_bus() request for " + "elmmio_space [%lx/%lx]\n", + ldev->hba.elmmio_space.start, + ldev->hba.elmmio_space.end); + + /* lba_dump_res(&iomem_resource, 2); */ + /* BUG(); */ + } } err = request_resource(&iomem_resource, &(ldev->hba.lmmio_space)); if (err < 0) { - BUG(); - lba_dump_res(&iomem_resource, 2); + /* FIXME overlaps with elmmio will fail here. + * Need to prune (or disable) the distributed range. + * + * BEWARE: conflicts with this lmmio range may be + * elmmio range which is pointing down another rope. + */ + + printk("FAILED: lba_fixup_bus() request for " + "lmmio_space [%lx/%lx]\n", + ldev->hba.lmmio_space.start, + ldev->hba.lmmio_space.end); + /* lba_dump_res(&iomem_resource, 2); */ } #ifdef CONFIG_PARISC64 + /* GMMIO is distributed range. Every LBA/Rope gets part it. */ if (ldev->hba.gmmio_space.flags) { err = request_resource(&iomem_resource, &(ldev->hba.gmmio_space)); if (err < 0) { - BUG(); + printk("FAILED: lba_fixup_bus() request for " + "gmmio_space [%lx/%lx]\n", + ldev->hba.gmmio_space.start, + ldev->hba.gmmio_space.end); lba_dump_res(&iomem_resource, 2); + BUG(); } - bus->resource[2] = &(ldev->hba.gmmio_space); } #endif /* advertize Host bridge resources to PCI bus */ bus->resource[0] = &(ldev->hba.io_space); bus->resource[1] = &(ldev->hba.lmmio_space); + i=2; + if (ldev->hba.elmmio_space.start) + bus->resource[i++] = &(ldev->hba.elmmio_space); + if (ldev->hba.gmmio_space.start) + bus->resource[i++] = &(ldev->hba.gmmio_space); + } list_for_each(ln, &bus->devices) { @@ -837,6 +953,9 @@ res->start = PCI_HOST_ADDR(HBA_DATA(ldev), res->start); res->end = PCI_HOST_ADDR(HBA_DATA(ldev), res->end); DBG("[%lx/%lx]\n", res->start, res->end); + } else { + DBG("lba_fixup_bus() WTF? 0x%lx [%lx/%lx] XXX", + res->flags, res->start, res->end); } } @@ -918,7 +1037,7 @@ static u##size lba_astro_in##size (struct pci_hba_data *d, u16 addr) \ { \ u##size t; \ - t = READ_REG##size(LBA_ASTRO_PORT_BASE + addr); \ + t = READ_REG##size(LBA_PORT_BASE + addr); \ DBG_PORT(" 0x%x\n", t); \ return (t); \ } @@ -960,7 +1079,7 @@ { \ ASSERT(d != NULL); \ DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, d, addr, val); \ - WRITE_REG##size(val, LBA_ASTRO_PORT_BASE + addr); \ + WRITE_REG##size(val, LBA_PORT_BASE + addr); \ if (LBA_DEV(d)->hw_rev < 3) \ lba_t32 = READ_U32(d->base_addr + LBA_FUNC_ID); \ } @@ -1001,7 +1120,6 @@ static u##size lba_pat_in##size (struct pci_hba_data *l, u16 addr) \ { \ u##size t; \ - ASSERT(bus != NULL); \ DBG_PORT("%s(0x%p, 0x%x) ->", __FUNCTION__, l, addr); \ t = READ_REG##size(PIOP_TO_GMMIO(LBA_DEV(l), addr)); \ DBG_PORT(" 0x%x\n", t); \ @@ -1018,7 +1136,6 @@ static void lba_pat_out##size (struct pci_hba_data *l, u16 addr, u##size val) \ { \ void *where = (void *) PIOP_TO_GMMIO(LBA_DEV(l), addr); \ - ASSERT(bus != NULL); \ DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, l, addr, val); \ WRITE_REG##size(val, where); \ /* flush the I/O down to the elroy at least */ \ @@ -1099,10 +1216,23 @@ case PAT_LMMIO: /* used to fix up pre-initialized MEM BARs */ - lba_dev->hba.lmmio_space_offset = p->start - io->start; + if (!lba_dev->hba.lmmio_space.start) { + sprintf(lba_dev->hba.lmmio_name, "PCI%02x LMMIO", + (int) lba_dev->hba.bus_num.start); + lba_dev->hba.lmmio_space_offset = p->start - io->start; + r = &(lba_dev->hba.lmmio_space); + r->name = lba_dev->hba.lmmio_name; + } else if (!lba_dev->hba.elmmio_space.start) { + sprintf(lba_dev->hba.elmmio_name, "PCI%02x ELMMIO", + (int) lba_dev->hba.bus_num.start); + r = &(lba_dev->hba.elmmio_space); + r->name = lba_dev->hba.elmmio_name; + } else { + printk(KERN_WARNING MODULE_NAME + " only supports 2 LMMIO resources!\n"); + break; + } - r = &(lba_dev->hba.lmmio_space); - r->name = "LBA LMMIO"; r->start = p->start; r->end = p->end; r->flags = IORESOURCE_MEM; @@ -1111,8 +1241,10 @@ case PAT_GMMIO: /* MMIO space > 4GB phys addr; for 64-bit BAR */ + sprintf(lba_dev->hba.gmmio_name, "PCI%02x GMMIO", + (int) lba_dev->hba.bus_num.start); r = &(lba_dev->hba.gmmio_space); - r->name = "LBA GMMIO"; + r->name = lba_dev->hba.gmmio_name; r->start = p->start; r->end = p->end; r->flags = IORESOURCE_MEM; @@ -1132,8 +1264,10 @@ */ lba_dev->iop_base = p->start; + sprintf(lba_dev->hba.io_name, "PCI%02x Ports", + (int) lba_dev->hba.bus_num.start); r = &(lba_dev->hba.io_space); - r->name = "LBA I/O Port"; + r->name = lba_dev->hba.io_name; r->start = HBA_PORT_BASE(lba_dev->hba.hba_num); r->end = r->start + HBA_PORT_SPACE_SIZE - 1; r->flags = IORESOURCE_IO; @@ -1155,24 +1289,17 @@ #endif /* CONFIG_PARISC64 */ +extern void sba_distributed_lmmio(struct parisc_device *, struct resource *); +extern void sba_directed_lmmio(struct parisc_device *, struct resource *); + + static void lba_legacy_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev) { struct resource *r; - unsigned long rsize; int lba_num; -#ifdef CONFIG_PARISC64 - /* - ** Sign extend all BAR values on "legacy" platforms. - ** "Sprockets" PDC (Forte/Allegro) initializes everything - ** for "legacy" 32-bit OS (HPUX 10.20). - ** Upper 32-bits of 64-bit BAR will be zero too. - */ - lba_dev->hba.lmmio_space_offset = 0xffffffff00000000UL; -#else - lba_dev->hba.lmmio_space_offset = 0UL; -#endif + lba_dev->hba.lmmio_space_offset = PCI_F_EXTEND; /* ** With "legacy" firmware, the lowest byte of FW_SCRATCH @@ -1187,27 +1314,104 @@ r->start = lba_num & 0xff; r->end = (lba_num>>8) & 0xff; - /* Set up local PCI Bus resources - we don't really need - ** them for Legacy boxes but it's nice to see in /proc. + /* Set up local PCI Bus resources - we don't need them for + ** Legacy boxes but it's nice to see in /proc/iomem. */ r = &(lba_dev->hba.lmmio_space); - r->name = "LBA PCI LMMIO"; - r->flags = IORESOURCE_MEM; - /* Ignore "Range Enable" bit in the BASE register */ - r->start = PCI_HOST_ADDR(HBA_DATA(lba_dev), - ((long) READ_REG32(pa_dev->hpa + LBA_LMMIO_BASE)) & ~1UL); - rsize = ~READ_REG32(pa_dev->hpa + LBA_LMMIO_MASK) + 1; - + sprintf(lba_dev->hba.lmmio_name, "PCI%02x LMMIO", + (int) lba_dev->hba.bus_num.start); + r->name = lba_dev->hba.lmmio_name; + +#if 1 + /* We want the CPU -> IO routing of addresses. + * The SBA BASE/MASK registers control CPU -> IO routing. + * Ask SBA what is routed to this rope/LBA. + */ + sba_distributed_lmmio(pa_dev, r); +#else /* - ** Each rope only gets part of the distributed range. - ** Adjust "window" for this rope - */ - rsize /= ROPES_PER_SBA; - r->start += rsize * LBA_NUM(pa_dev->hpa); - r->end = r->start + rsize - 1 ; + * The LBA BASE/MASK registers control IO -> System routing. + * + * The following code works but doesn't get us what we want. + * Well, only because firmware (v5.0) on C3000 doesn't program + * the LBA BASE/MASE registers to be the exact inverse of + * the corresponding SBA registers. Other Astro/Pluto + * based platform firmware may do it right. + * + * Should someone want to mess with MSI, they may need to + * reprogram LBA BASE/MASK registers. Thus preserve the code + * below until MSI is known to work on C3000/A500/N4000/RP3440. + * + * Using the code below, /proc/iomem shows: + * ... + * f0000000-f0ffffff : PCI00 LMMIO + * f05d0000-f05d0000 : lcd_data + * f05d0008-f05d0008 : lcd_cmd + * f1000000-f1ffffff : PCI01 LMMIO + * f4000000-f4ffffff : PCI02 LMMIO + * f4000000-f4001fff : sym53c8xx + * f4002000-f4003fff : sym53c8xx + * f4004000-f40043ff : sym53c8xx + * f4005000-f40053ff : sym53c8xx + * f4007000-f4007fff : ohci_hcd + * f4008000-f40083ff : tulip + * f6000000-f6ffffff : PCI03 LMMIO + * f8000000-fbffffff : PCI00 ELMMIO + * fa100000-fa4fffff : stifb mmio + * fb000000-fb1fffff : stifb fb + * + * But everything listed under PCI02 actually lives under PCI00. + * This is clearly wrong. + * + * Asking SBA how things are routed tells the correct story: + * LMMIO_BASE/MASK/ROUTE f4000001 fc000000 00000000 + * DIR0_BASE/MASK/ROUTE fa000001 fe000000 00000006 + * DIR1_BASE/MASK/ROUTE f9000001 ff000000 00000004 + * DIR2_BASE/MASK/ROUTE f0000000 fc000000 00000000 + * DIR3_BASE/MASK/ROUTE f0000000 fc000000 00000000 + * + * Which looks like this in /proc/iomem: + * f4000000-f47fffff : PCI00 LMMIO + * f4000000-f4001fff : sym53c8xx + * ...[deteled core devices - same as above]... + * f4008000-f40083ff : tulip + * f4800000-f4ffffff : PCI01 LMMIO + * f6000000-f67fffff : PCI02 LMMIO + * f7000000-f77fffff : PCI03 LMMIO + * f9000000-f9ffffff : PCI02 ELMMIO + * fa000000-fbffffff : PCI03 ELMMIO + * fa100000-fa4fffff : stifb mmio + * fb000000-fb1fffff : stifb fb + * + * ie all Built-in core are under now correctly under PCI00. + * The "PCI02 ELMMIO" directed range is for: + * +-[02]---03.0 3Dfx Interactive, Inc. Voodoo 2 + * + * All is well now. + */ + r->start = (long) READ_REG32(pa_dev->hpa + LBA_LMMIO_BASE); + if (r->start & 1) { + unsigned long rsize; + + r->flags = IORESOURCE_MEM; + /* mmio_mask also clears Enable bit */ + r->start &= mmio_mask; + r->start = PCI_HOST_ADDR(HBA_DATA(lba_dev), r->start); + rsize = ~ READ_REG32(pa_dev->hpa + LBA_LMMIO_MASK); + + /* + ** Each rope only gets part of the distributed range. + ** Adjust "window" for this rope. + */ + rsize /= ROPES_PER_IOC; + r->start += (rsize + 1) * LBA_NUM(pa_dev->hpa); + r->end = r->start + rsize; + } else { + r->end = r->start = 0; /* Not enabled. */ + } +#endif /* - ** XXX FIXME - ignore LBA_ELMMIO_BASE for now ** "Directed" ranges are used when the "distributed range" isn't ** sufficient for all devices below a given LBA. Typically devices ** like graphics cards or X25 may need a directed range when the @@ -1216,35 +1420,38 @@ ** ** The main reason for ignoring it now frigging complications. ** Directed ranges may overlap (and have precedence) over - ** distributed ranges. Ie a distributed range assigned to a unused + ** distributed ranges. Or a distributed range assigned to a unused ** rope may be used by a directed range on a different rope. ** Support for graphics devices may require fixing this ** since they may be assigned a directed range which overlaps ** an existing (but unused portion of) distributed range. */ r = &(lba_dev->hba.elmmio_space); - r->name = "extra LBA PCI LMMIO"; - r->flags = IORESOURCE_MEM; + sprintf(lba_dev->hba.elmmio_name, "PCI%02x ELMMIO", + (int) lba_dev->hba.bus_num.start); + r->name = lba_dev->hba.elmmio_name; + +#if 1 + /* See comment which precedes call to sba_directed_lmmio() */ + sba_directed_lmmio(pa_dev, r); +#else r->start = READ_REG32(pa_dev->hpa + LBA_ELMMIO_BASE); - r->end = 0; - /* check Range Enable bit */ if (r->start & 1) { - /* First baby step to getting Direct Ranges listed in /proc. - ** AFAIK, only Sprockets PDC will setup a directed Range. - */ - - r->start &= ~1; - r->end = r->start; - r->end += ~READ_REG32(pa_dev->hpa + LBA_ELMMIO_MASK); - printk(KERN_DEBUG "WARNING: Ignoring enabled ELMMIO BASE 0x%0lx SIZE 0x%lx\n", - r->start, - r->end + 1); - + unsigned long rsize; + r->flags = IORESOURCE_MEM; + /* mmio_mask also clears Enable bit */ + r->start &= mmio_mask; + r->start = PCI_HOST_ADDR(HBA_DATA(lba_dev), r->start); + rsize = READ_REG32(pa_dev->hpa + LBA_ELMMIO_MASK); + r->end = r->start + ~rsize; } +#endif r = &(lba_dev->hba.io_space); - r->name = "LBA PCI I/O Ports"; + sprintf(lba_dev->hba.io_name, "PCI%02x Ports", + (int) lba_dev->hba.bus_num.start); + r->name = lba_dev->hba.io_name; r->flags = IORESOURCE_IO; r->start = READ_REG32(pa_dev->hpa + LBA_IOS_BASE) & ~1L; r->end = r->start + (READ_REG32(pa_dev->hpa + LBA_IOS_MASK) ^ (HBA_PORT_SPACE_SIZE - 1)); @@ -1478,11 +1685,16 @@ dev->dev.platform_data = lba_dev; lba_bus = lba_dev->hba.hba_bus = pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start, - is_pdc_pat() ? &pat_cfg_ops : &lba_cfg_ops, + IS_ELROY(dev) ? &lba_cfg_ops : &mercury_cfg_ops, NULL); + /* This is in lieu of calling pci_assign_unassigned_resources() */ if (is_pdc_pat()) { /* assign resources to un-initialized devices */ + + DBG_PAT("LBA pci_bus_size_bridges()\n"); + pci_bus_size_bridges(lba_bus); + DBG_PAT("LBA pci_bus_assign_resources()\n"); pci_bus_assign_resources(lba_bus); @@ -1493,6 +1705,8 @@ lba_dump_res(&lba_dev->hba.lmmio_space, 2); #endif } + pci_enable_bridges(lba_bus); + /* ** Once PCI register ops has walked the bus, access to config diff -Nru a/drivers/parisc/power.c b/drivers/parisc/power.c --- a/drivers/parisc/power.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/parisc/power.c 2004-11-10 17:19:02 -08:00 @@ -54,9 +54,9 @@ #ifdef DEBUG -# define DPRINTK(x) printk x +# define DPRINTK(x...) printk(x) #else -# define DPRINTK(x) do { } while (0) +# define DPRINTK(x...) #endif @@ -120,14 +120,14 @@ static void process_shutdown(void) { if (shutdown_timer == 0) - DPRINTK((KERN_INFO "Shutdown requested...\n")); + DPRINTK(KERN_INFO "Shutdown requested...\n"); shutdown_timer++; /* wait until the button was pressed for 1 second */ if (shutdown_timer == HZ) { static char msg[] = "Shutting down..."; - DPRINTK((KERN_INFO "%s\n", msg)); + DPRINTK(KERN_INFO "%s\n", msg); #ifdef CONFIG_CHASSIS_LCD_LED lcd_print(msg); #endif diff -Nru a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c --- a/drivers/parisc/sba_iommu.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/parisc/sba_iommu.c 2004-11-10 17:19:06 -08:00 @@ -1,8 +1,9 @@ /* ** System Bus Adapter (SBA) I/O MMU manager ** -** (c) Copyright 2000 Grant Grundler -** (c) Copyright 2000 Hewlett-Packard Company +** (c) Copyright 2000-2004 Grant Grundler +** (c) Copyright 2004 Naresh Kumar Inna +** (c) Copyright 2000-2004 Hewlett-Packard Company ** ** Portions (c) 1999 Dave S. Miller (from sparc64 I/O MMU code) ** @@ -167,11 +168,21 @@ #define MAX_IOC 2 /* per Ike. Pluto/Astro only have 1. */ +#define ROPES_PER_IOC 8 /* per Ike half or Pluto/Astro */ + /* ** Offsets into MBIB (Function 0 on Ike and hopefully Astro) ** Firmware programs this stuff. Don't touch it. */ +#define LMMIO_DIRECT0_BASE 0x300 +#define LMMIO_DIRECT0_MASK 0x308 +#define LMMIO_DIRECT0_ROUTE 0x310 + +#define LMMIO_DIST_BASE 0x360 +#define LMMIO_DIST_MASK 0x368 +#define LMMIO_DIST_ROUTE 0x370 + #define IOS_DIST_BASE 0x390 #define IOS_DIST_MASK 0x398 #define IOS_DIST_ROUTE 0x3A0 @@ -289,6 +300,9 @@ unsigned int flags; /* state/functionality enabled */ unsigned int hw_rev; /* HW revision of chip */ + struct resource chip_resv; /* MMIO reserved for chip */ + struct resource iommu_resv; /* MMIO reserved for iommu */ + unsigned int num_ioc; /* number of on-board IOC's */ struct ioc ioc[MAX_IOC]; }; @@ -569,7 +583,7 @@ while(res_ptr < res_end) { DBG_RES(" %p %lx %lx\n", res_ptr, mask, *res_ptr); - ASSERT(0 != mask); + BUG_ON(0 == mask); if(0 == ((*res_ptr) & mask)) { *res_ptr |= mask; /* mark resources busy! */ pide = ((unsigned long)res_ptr - (unsigned long)ioc->res_map); @@ -1696,19 +1710,46 @@ } /* if !PLUTO */ if (IS_ASTRO(sba_dev->iodc)) { + int err; /* PAT_PDC (L-class) also reports the same goofy base */ sba_dev->ioc[0].ioc_hpa = ASTRO_IOC_OFFSET; num_ioc = 1; + + sba_dev->chip_resv.name = "Astro Intr Ack"; + sba_dev->chip_resv.start = PCI_F_EXTEND | 0xfef00000UL; + sba_dev->chip_resv.end = PCI_F_EXTEND | (0xff000000UL - 1) ; + err = request_resource(&iomem_resource, &(sba_dev->chip_resv)); + if (err < 0) { + BUG(); + } + } else if (IS_PLUTO(sba_dev->iodc)) { + int err; + /* We use a negative value for IOC HPA so it gets * corrected when we add it with IKE's IOC offset. * Doesnt look clean, but fewer code. */ sba_dev->ioc[0].ioc_hpa = -PLUTO_IOC_OFFSET; num_ioc = 1; + + sba_dev->chip_resv.name = "Pluto Intr/PIOP/VGA"; + sba_dev->chip_resv.start = PCI_F_EXTEND | 0xfee00000UL; + sba_dev->chip_resv.end = PCI_F_EXTEND | (0xff200000UL - 1); + err = request_resource(&iomem_resource, &(sba_dev->chip_resv)); + BUG_ON(err < 0); + + sba_dev->iommu_resv.name = "IOVA Space"; + sba_dev->iommu_resv.start = 0x40000000UL; + sba_dev->iommu_resv.end = 0x50000000UL - 1; + err = request_resource(&iomem_resource, &(sba_dev->iommu_resv)); + BUG_ON(err < 0); } else { + /* IS_IKE (ie N-class, L3000, L1500) */ sba_dev->ioc[0].ioc_hpa = sba_dev->ioc[1].ioc_hpa = 0; num_ioc = 2; + + /* TODO - LOOKUP Ike/Stretch chipset mem map */ } sba_dev->num_ioc = num_ioc; @@ -1843,8 +1884,9 @@ struct sba_device *sba_dev = sba_list; struct ioc *ioc = &sba_dev->ioc[0]; /* FIXME: Multi-IOC support! */ int total_pages = (int) (ioc->res_size << 3); /* 8 bits per byte */ + unsigned long i; #ifdef SBA_COLLECT_STATS - unsigned long i = 0, avg = 0, min, max; + unsigned long avg = 0, min, max; #endif sprintf(buf, "%s rev %d.%d\n", @@ -1860,6 +1902,21 @@ sprintf(buf, "%sResource bitmap : %d bytes (%d pages)\n", buf, ioc->res_size, ioc->res_size << 3); /* 8 bits per byte */ + sprintf(buf, "%sLMMIO_BASE/MASK/ROUTE %08x %08x %08x\n", + buf, + READ_REG32(sba_dev->sba_hpa + LMMIO_DIST_BASE), + READ_REG32(sba_dev->sba_hpa + LMMIO_DIST_MASK), + READ_REG32(sba_dev->sba_hpa + LMMIO_DIST_ROUTE) + ); + + for (i=0; i<4; i++) + sprintf(buf, "%sDIR%ld_BASE/MASK/ROUTE %08x %08x %08x\n", + buf, i, + READ_REG32(sba_dev->sba_hpa + LMMIO_DIRECT0_BASE + i*0x18), + READ_REG32(sba_dev->sba_hpa + LMMIO_DIRECT0_MASK + i*0x18), + READ_REG32(sba_dev->sba_hpa + LMMIO_DIRECT0_ROUTE + i*0x18) + ); + #ifdef SBA_COLLECT_STATS sprintf(buf, "%sIO PDIR entries : %ld free %ld used (%d%%)\n", buf, total_pages - ioc->used_pages, ioc->used_pages, @@ -1949,7 +2006,7 @@ }; /* -** Determine if lba should claim this chip (return 0) or not (return 1). +** Determine if sba should claim this chip (return 0) or not (return 1). ** If so, initialize the chip and tell other partners in crime they ** have work to do. */ @@ -2062,17 +2119,95 @@ * sba_get_iommu - Assign the iommu pointer for the pci bus controller. * @dev: The parisc device. * - * This function searches through the registerd IOMMU's and returns the - * appropriate IOMMU data for the given parisc PCI controller. + * Returns the appropriate IOMMU data for the given parisc PCI controller. + * This is cached and used later for PCI DMA Mapping. */ void * sba_get_iommu(struct parisc_device *pci_hba) { - struct sba_device *sba = (struct sba_device *) pci_hba->parent->sysdata; - char t = pci_hba->parent->id.hw_type; + struct parisc_device *sba_dev = parisc_parent(pci_hba); + struct sba_device *sba = sba_dev->dev.driver_data; + char t = sba_dev->id.hw_type; int iocnum = (pci_hba->hw_path >> 3); /* rope # */ + BUG_ON((t != HPHW_IOA) && (t != HPHW_BCPORT)); + + return &(sba->ioc[iocnum]); +} + + +/** + * sba_directed_lmmio - return first directed LMMIO range routed to rope + * @pa_dev: The parisc device. + * @r: resource PCI host controller wants start/end fields assigned. + * + * For the given parisc PCI controller, determine if any direct ranges + * are routed down the corresponding rope. + */ +void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r) +{ + struct parisc_device *sba_dev = parisc_parent(pci_hba); + struct sba_device *sba = sba_dev->dev.driver_data; + char t = sba_dev->id.hw_type; + int i; + int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */ + if ((t!=HPHW_IOA) && (t!=HPHW_BCPORT)) BUG(); - return &(sba->ioc[iocnum]); + r->start = r->end = 0; + + /* Astro has 4 directed ranges. Not sure about Ike/Pluto/et al */ + for (i=0; i<4; i++) { + int base, size; + unsigned long reg = sba->sba_hpa + i*0x18; + + base = READ_REG32(reg + LMMIO_DIRECT0_BASE); + if ((base & 1) == 0) + continue; /* not enabled */ + + size = READ_REG32(reg + LMMIO_DIRECT0_ROUTE); + + if ((size & (ROPES_PER_IOC-1)) != rope) + continue; /* directed down different rope */ + + r->start = (base & ~1UL) | PCI_F_EXTEND; + size = ~ READ_REG32(reg + LMMIO_DIRECT0_MASK); + r->end = r->start + size; + } +} + + +/** + * sba_distributed_lmmio - return portion of distributed LMMIO range + * @pa_dev: The parisc device. + * @r: resource PCI host controller wants start/end fields assigned. + * + * For the given parisc PCI controller, return portion of distributed LMMIO + * range. The distributed LMMIO is always present and it's just a question + * of the base address and size of the range. + */ +void sba_distributed_lmmio(struct parisc_device *pci_hba, struct resource *r ) +{ + struct parisc_device *sba_dev = parisc_parent(pci_hba); + struct sba_device *sba = sba_dev->dev.driver_data; + char t = sba_dev->id.hw_type; + int base, size; + int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */ + + if ((t!=HPHW_IOA) && (t!=HPHW_BCPORT)) + BUG(); + + r->start = r->end = 0; + + base = READ_REG32(sba->sba_hpa + LMMIO_DIST_BASE); + if ((base & 1) == 0) { + BUG(); /* Gah! Distr Range wasn't enabled! */ + return; + } + + r->start = (base & ~1UL) | PCI_F_EXTEND; + + size = (~READ_REG32(sba->sba_hpa + LMMIO_DIST_MASK)) / ROPES_PER_IOC; + r->start += rope * (size + 1); /* adjust base for this rope */ + r->end = r->start + size; } diff -Nru a/drivers/parisc/superio.c b/drivers/parisc/superio.c --- a/drivers/parisc/superio.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/parisc/superio.c 2004-11-10 17:19:05 -08:00 @@ -69,15 +69,12 @@ #include #include #include -#include #include #include #include #include -#define SUPERIO_IDE_MAX_RETRIES 25 - static struct superio_device sio_dev; @@ -101,16 +98,20 @@ results = inb(IC_PIC1+0); + /* + * Bit 7: 1 = active Interrupt; 0 = no Interrupt pending + * Bits 6-3: zero + * Bits 2-0: highest priority, active requesting interrupt ID (0-7) + */ if ((results & 0x80) == 0) { -#ifndef CONFIG_SMP - /* HACK: need to investigate why this happens if SMP enabled */ - BUG(); /* This shouldn't happen */ -#endif + /* I suspect "spurious" interrupts are from unmasking an IRQ. + * We don't know if an interrupt was/is pending and thus + * just call the handler for that IRQ as if it were pending. + */ return IRQ_HANDLED; } /* Check to see which device is interrupting */ - local_irq = results & 0x0f; if (local_irq == 2 || local_irq > 7) { @@ -136,8 +137,9 @@ sio->irq_region->data.irqbase + local_irq, regs); - /* set EOI */ - + /* set EOI - forces a new interrupt if a lower priority device + * still needs service. + */ outb((OCW2_SEOI|local_irq),IC_PIC1 + 0); return IRQ_HANDLED; } @@ -469,11 +471,6 @@ } -static u8 superio_ide_inb (unsigned long port); -static unsigned long superio_ide_status[2]; -static unsigned long superio_ide_select[2]; -static unsigned long superio_ide_dma_status[2]; - void superio_fixup_pci(struct pci_dev *pdev) { u8 prog; @@ -484,58 +481,8 @@ pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog); printk("PCI: Enabled native mode for NS87415 (pif=0x%x)\n", prog); } -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci); +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci); -/* Because of a defect in Super I/O, all reads of the PCI DMA status - * registers, IDE status register and the IDE select register need to be - * retried - */ -static u8 superio_ide_inb (unsigned long port) -{ - if (port == superio_ide_status[0] || - port == superio_ide_status[1] || - port == superio_ide_select[0] || - port == superio_ide_select[1] || - port == superio_ide_dma_status[0] || - port == superio_ide_dma_status[1]) { - u8 tmp; - int retries = SUPERIO_IDE_MAX_RETRIES; - - /* printk(" [ reading port 0x%x with retry ] ", port); */ - - do { - tmp = inb(port); - if (tmp == 0) - udelay(50); - } while (tmp == 0 && retries-- > 0); - - return tmp; - } - - return inb(port); -} - -void __init superio_ide_init_iops (struct hwif_s *hwif) -{ - u32 base, dmabase; - u8 tmp; - struct pci_dev *pdev = hwif->pci_dev; - u8 port = hwif->channel; - - base = pci_resource_start(pdev, port * 2) & ~3; - dmabase = pci_resource_start(pdev, 4) & ~3; - - superio_ide_status[port] = base + IDE_STATUS_OFFSET; - superio_ide_select[port] = base + IDE_SELECT_OFFSET; - superio_ide_dma_status[port] = dmabase + (!port ? 2 : 0xa); - - /* Clear error/interrupt, enable dma */ - tmp = superio_ide_inb(superio_ide_dma_status[port]); - outb(tmp | 0x66, superio_ide_dma_status[port]); - - /* We need to override inb to workaround a SuperIO errata */ - hwif->INB = superio_ide_inb; -} static int __devinit superio_probe(struct pci_dev *dev, const struct pci_device_id *id) { diff -Nru a/drivers/parport/daisy.c b/drivers/parport/daisy.c --- a/drivers/parport/daisy.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/parport/daisy.c 2004-11-10 17:19:03 -08:00 @@ -207,8 +207,7 @@ * * This function is similar to parport_register_device(), except * that it locates a device by its number rather than by the port - * it is attached to. See parport_find_device() and - * parport_find_class(). + * it is attached to. * * All parameters except for @devnum are the same as for * parport_register_device(). The return value is the same as @@ -305,53 +304,6 @@ return res; } -/** - * parport_device_coords - convert canonical device number - * @devnum: device number - * @parport: pointer to storage for parallel port number - * @mux: pointer to storage for multiplexor port number - * @daisy: pointer to storage for daisy chain address - * - * This function converts a device number into its coordinates in - * terms of which parallel port in the system it is attached to, - * which multiplexor port it is attached to if there is a - * multiplexor on that port, and which daisy chain address it has - * if it is in a daisy chain. - * - * The caller must allocate storage for @parport, @mux, and - * @daisy. - * - * If there is no device with the specified device number, -ENXIO - * is returned. Otherwise, the values pointed to by @parport, - * @mux, and @daisy are set to the coordinates of the device, - * with -1 for coordinates with no value. - * - * This function is not actually very useful, but this interface - * was suggested by IEEE 1284.3. - **/ - -int parport_device_coords (int devnum, int *parport, int *mux, int *daisy) -{ - struct daisydev *dev; - - spin_lock(&topology_lock); - - dev = topology; - while (dev && dev->devnum != devnum) - dev = dev->next; - - if (!dev) { - spin_unlock(&topology_lock); - return -ENXIO; - } - - if (parport) *parport = dev->port->portnum; - if (mux) *mux = dev->port->muxport; - if (daisy) *daisy = dev->daisy; - spin_unlock(&topology_lock); - return 0; -} - /* Send a daisy-chain-style CPP command packet. */ static int cpp_daisy (struct parport *port, int cmd) { @@ -558,108 +510,3 @@ kfree (deviceid); return detected; } - -/* Find a device with a particular manufacturer and model string, - starting from a given device number. Like the PCI equivalent, - 'from' itself is skipped. */ - -/** - * parport_find_device - find a specific device - * @mfg: required manufacturer string - * @mdl: required model string - * @from: previous device number found in search, or %NULL for - * new search - * - * This walks through the list of parallel port devices looking - * for a device whose 'MFG' string matches @mfg and whose 'MDL' - * string matches @mdl in their IEEE 1284 Device ID. - * - * When a device is found matching those requirements, its device - * number is returned; if there is no matching device, a negative - * value is returned. - * - * A new search it initiated by passing %NULL as the @from - * argument. If @from is not %NULL, the search continues from - * that device. - **/ - -int parport_find_device (const char *mfg, const char *mdl, int from) -{ - struct daisydev *d; - int res = -1; - - /* Find where to start. */ - - spin_lock(&topology_lock); - d = topology; /* sorted by devnum */ - while (d && d->devnum <= from) - d = d->next; - - /* Search. */ - while (d) { - struct parport_device_info *info; - info = &d->port->probe_info[1 + d->daisy]; - if ((!mfg || !strcmp (mfg, info->mfr)) && - (!mdl || !strcmp (mdl, info->model))) - break; - - d = d->next; - } - - if (d) - res = d->devnum; - - spin_unlock(&topology_lock); - return res; -} - -/** - * parport_find_class - find a device in a specified class - * @cls: required class - * @from: previous device number found in search, or %NULL for - * new search - * - * This walks through the list of parallel port devices looking - * for a device whose 'CLS' string matches @cls in their IEEE - * 1284 Device ID. - * - * When a device is found matching those requirements, its device - * number is returned; if there is no matching device, a negative - * value is returned. - * - * A new search it initiated by passing %NULL as the @from - * argument. If @from is not %NULL, the search continues from - * that device. - **/ - -int parport_find_class (parport_device_class cls, int from) -{ - struct daisydev *d; - int res = -1; - - spin_lock(&topology_lock); - d = topology; /* sorted by devnum */ - /* Find where to start. */ - while (d && d->devnum <= from) - d = d->next; - - /* Search. */ - while (d && d->port->probe_info[1 + d->daisy].class != cls) - d = d->next; - - if (d) - res = d->devnum; - - spin_unlock(&topology_lock); - return res; -} - -EXPORT_SYMBOL(parport_open); -EXPORT_SYMBOL(parport_close); -EXPORT_SYMBOL(parport_device_num); -EXPORT_SYMBOL(parport_device_coords); -EXPORT_SYMBOL(parport_daisy_deselect_all); -EXPORT_SYMBOL(parport_daisy_select); -EXPORT_SYMBOL(parport_daisy_init); -EXPORT_SYMBOL(parport_find_device); -EXPORT_SYMBOL(parport_find_class); diff -Nru a/drivers/parport/ieee1284.c b/drivers/parport/ieee1284.c --- a/drivers/parport/ieee1284.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/parport/ieee1284.c 2004-11-10 17:19:02 -08:00 @@ -40,7 +40,7 @@ /* Make parport_wait_peripheral wake up. * It will be useful to call this from an interrupt handler. */ -void parport_ieee1284_wakeup (struct parport *port) +static void parport_ieee1284_wakeup (struct parport *port) { up (&port->physport->ieee1284.irq); } @@ -813,9 +813,7 @@ EXPORT_SYMBOL(parport_negotiate); EXPORT_SYMBOL(parport_write); EXPORT_SYMBOL(parport_read); -EXPORT_SYMBOL(parport_ieee1284_wakeup); EXPORT_SYMBOL(parport_wait_peripheral); -EXPORT_SYMBOL(parport_poll_peripheral); EXPORT_SYMBOL(parport_wait_event); EXPORT_SYMBOL(parport_set_timeout); EXPORT_SYMBOL(parport_ieee1284_interrupt); diff -Nru a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c --- a/drivers/parport/parport_pc.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/parport/parport_pc.c 2004-11-10 17:19:07 -08:00 @@ -62,6 +62,7 @@ #include #include +#include #include #define PARPORT_PC_MAX_PORTS PARPORT_MAX @@ -2378,7 +2379,7 @@ /* ITE support maintained by Rich Liu */ static int __devinit sio_ite_8872_probe (struct pci_dev *pdev, int autoirq, - int autodma) + int autodma, struct parport_pc_via_data *via) { short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 }; struct resource *base_res; @@ -2481,71 +2482,161 @@ return 0; } -/* Via support maintained by Jeff Garzik */ -static int __devinit sio_via_686a_probe (struct pci_dev *pdev, int autoirq, - int autodma) +/* VIA 8231 support by Pavel Fedin + based on VIA 686a support code by Jeff Garzik */ +static int __initdata parport_init_mode = 0; + +/* Data for two known VIA chips */ +static struct parport_pc_via_data via_686a_data __devinitdata = { + 0x51, + 0x50, + 0x85, + 0x02, + 0xE2, + 0xF0, + 0xE6 +}; +static struct parport_pc_via_data via_8231_data __devinitdata = { + 0x45, + 0x44, + 0x50, + 0x04, + 0xF2, + 0xFA, + 0xF6 +}; + +static int __devinit sio_via_probe (struct pci_dev *pdev, int autoirq, + int autodma, struct parport_pc_via_data *via) { - u8 tmp; + u8 tmp, tmp2, siofunc; + u8 ppcontrol = 0; int dma, irq; - unsigned port1, port2, have_eppecp; + unsigned port1, port2; + unsigned have_epp = 0; + + printk(KERN_DEBUG "parport_pc: VIA 686A/8231 detected\n"); + switch(parport_init_mode) + { + case 1: + printk(KERN_DEBUG "parport_pc: setting SPP mode\n"); + siofunc = VIA_FUNCTION_PARPORT_SPP; + break; + case 2: + printk(KERN_DEBUG "parport_pc: setting PS/2 mode\n"); + siofunc = VIA_FUNCTION_PARPORT_SPP; + ppcontrol = VIA_PARPORT_BIDIR; + break; + case 3: + printk(KERN_DEBUG "parport_pc: setting EPP mode\n"); + siofunc = VIA_FUNCTION_PARPORT_EPP; + ppcontrol = VIA_PARPORT_BIDIR; + have_epp = 1; + break; + case 4: + printk(KERN_DEBUG "parport_pc: setting ECP mode\n"); + siofunc = VIA_FUNCTION_PARPORT_ECP; + ppcontrol = VIA_PARPORT_BIDIR; + break; + case 5: + printk(KERN_DEBUG "parport_pc: setting EPP+ECP mode\n"); + siofunc = VIA_FUNCTION_PARPORT_ECP; + ppcontrol = VIA_PARPORT_BIDIR|VIA_PARPORT_ECPEPP; + have_epp = 1; + break; + default: + printk(KERN_DEBUG "parport_pc: probing current configuration\n"); + siofunc = VIA_FUNCTION_PROBE; + break; + } /* - * unlock super i/o configuration, set 0x85_1 - */ - pci_read_config_byte (pdev, 0x85, &tmp); - tmp |= (1 << 1); - pci_write_config_byte (pdev, 0x85, tmp); - - /* - * Super I/O configuration, index port == 3f0h, data port == 3f1h + * unlock super i/o configuration */ + pci_read_config_byte(pdev, via->via_pci_superio_config_reg, &tmp); + tmp |= via->via_pci_superio_config_data; + pci_write_config_byte(pdev, via->via_pci_superio_config_reg, tmp); + + /* Bits 1-0: Parallel Port Mode / Enable */ + outb(via->viacfg_function, VIA_CONFIG_INDEX); + tmp = inb (VIA_CONFIG_DATA); + /* Bit 5: EPP+ECP enable; bit 7: PS/2 bidirectional port enable */ + outb(via->viacfg_parport_control, VIA_CONFIG_INDEX); + tmp2 = inb (VIA_CONFIG_DATA); + if (siofunc == VIA_FUNCTION_PROBE) + { + siofunc = tmp & VIA_FUNCTION_PARPORT_DISABLE; + ppcontrol = tmp2; + } + else + { + tmp &= ~VIA_FUNCTION_PARPORT_DISABLE; + tmp |= siofunc; + outb(via->viacfg_function, VIA_CONFIG_INDEX); + outb(tmp, VIA_CONFIG_DATA); + tmp2 &= ~(VIA_PARPORT_BIDIR|VIA_PARPORT_ECPEPP); + tmp2 |= ppcontrol; + outb(via->viacfg_parport_control, VIA_CONFIG_INDEX); + outb(tmp2, VIA_CONFIG_DATA); + } - /* 0xE2_1-0: Parallel Port Mode / Enable */ - outb (0xE2, 0x3F0); - tmp = inb (0x3F1); + /* Parallel Port I/O Base Address, bits 9-2 */ + outb(via->viacfg_parport_base, VIA_CONFIG_INDEX); + port1 = inb(VIA_CONFIG_DATA) << 2; - if ((tmp & 0x03) == 0x03) { - printk (KERN_INFO "parport_pc: Via 686A parallel port disabled in BIOS\n"); + printk (KERN_DEBUG "parport_pc: Current parallel port base: 0x%X\n",port1); + if ((port1 == 0x3BC) && have_epp) + { + outb(via->viacfg_parport_base, VIA_CONFIG_INDEX); + outb((0x378 >> 2), VIA_CONFIG_DATA); + printk(KERN_DEBUG "parport_pc: Parallel port base changed to 0x378\n"); + port1 = 0x378; + } + + /* + * lock super i/o configuration + */ + pci_read_config_byte(pdev, via->via_pci_superio_config_reg, &tmp); + tmp &= ~via->via_pci_superio_config_data; + pci_write_config_byte(pdev, via->via_pci_superio_config_reg, tmp); + + if (siofunc == VIA_FUNCTION_PARPORT_DISABLE) { + printk(KERN_INFO "parport_pc: VIA parallel port disabled in BIOS\n"); return 0; } - /* 0xE6: Parallel Port I/O Base Address, bits 9-2 */ - outb (0xE6, 0x3F0); - port1 = inb (0x3F1) << 2; - + /* Bits 7-4: PnP Routing for Parallel Port IRQ */ + pci_read_config_byte(pdev, via->via_pci_parport_irq_reg, &tmp); + irq = ((tmp & VIA_IRQCONTROL_PARALLEL) >> 4); + + if (siofunc == VIA_FUNCTION_PARPORT_ECP) + { + /* Bits 3-2: PnP Routing for Parallel Port DMA */ + pci_read_config_byte(pdev, via->via_pci_parport_dma_reg, &tmp); + dma = ((tmp & VIA_DMACONTROL_PARALLEL) >> 2); + } + else + /* if ECP not enabled, DMA is not enabled, assumed bogus 'dma' value */ + dma = PARPORT_DMA_NONE; + + /* Let the user (or defaults) steer us away from interrupts and DMA */ + if (autoirq == PARPORT_IRQ_NONE) { + irq = PARPORT_IRQ_NONE; + dma = PARPORT_DMA_NONE; + } + if (autodma == PARPORT_DMA_NONE) + dma = PARPORT_DMA_NONE; + switch (port1) { case 0x3bc: port2 = 0x7bc; break; case 0x378: port2 = 0x778; break; case 0x278: port2 = 0x678; break; default: - printk (KERN_INFO "parport_pc: Weird Via 686A parport base 0x%X, ignoring\n", + printk(KERN_INFO "parport_pc: Weird VIA parport base 0x%X, ignoring\n", port1); return 0; } - /* 0xF0_5: EPP+ECP enable */ - outb (0xF0, 0x3F0); - have_eppecp = (inb (0x3F1) & (1 << 5)); - - /* - * lock super i/o configuration, clear 0x85_1 - */ - pci_read_config_byte (pdev, 0x85, &tmp); - tmp &= ~(1 << 1); - pci_write_config_byte (pdev, 0x85, tmp); - - /* - * Get DMA and IRQ from PCI->ISA bridge PCI config registers - */ - - /* 0x50_3-2: PnP Routing for Parallel Port DRQ */ - pci_read_config_byte (pdev, 0x50, &tmp); - dma = ((tmp >> 2) & 0x03); - - /* 0x51_7-4: PnP Routing for Parallel Port IRQ */ - pci_read_config_byte (pdev, 0x51, &tmp); - irq = ((tmp >> 4) & 0x0F); - /* filter bogus IRQs */ switch (irq) { case 0: @@ -2559,22 +2650,10 @@ break; } - /* if ECP not enabled, DMA is not enabled, assumed bogus 'dma' value */ - if (!have_eppecp) - dma = PARPORT_DMA_NONE; - - /* Let the user (or defaults) steer us away from interrupts and DMA */ - if (autoirq != PARPORT_IRQ_AUTO) { - irq = PARPORT_IRQ_NONE; - dma = PARPORT_DMA_NONE; - } - if (autodma != PARPORT_DMA_AUTO) - dma = PARPORT_DMA_NONE; - /* finally, do the probe with values obtained */ if (parport_pc_probe_port (port1, port2, irq, dma, NULL)) { printk (KERN_INFO - "parport_pc: Via 686A parallel port: io=0x%X", port1); + "parport_pc: VIA parallel port: io=0x%X", port1); if (irq != PARPORT_IRQ_NONE) printk (", irq=%d", irq); if (dma != PARPORT_DMA_NONE) @@ -2583,7 +2662,7 @@ return 1; } - printk (KERN_WARNING "parport_pc: Strange, can't probe Via 686A parallel port: io=0x%X, irq=%d, dma=%d\n", + printk(KERN_WARNING "parport_pc: Strange, can't probe VIA parallel port: io=0x%X, irq=%d, dma=%d\n", port1, irq, dma); return 0; } @@ -2591,19 +2670,21 @@ enum parport_pc_sio_types { sio_via_686a = 0, /* Via VT82C686A motherboard Super I/O */ + sio_via_8231, /* Via VT8231 south bridge integrated Super IO */ sio_ite_8872, last_sio }; /* each element directly indexed from enum list, above */ static struct parport_pc_superio { - int (*probe) (struct pci_dev *pdev, int autoirq, int autodma); + int (*probe) (struct pci_dev *pdev, int autoirq, int autodma, struct parport_pc_via_data *via); + struct parport_pc_via_data *via; } parport_pc_superio_info[] __devinitdata = { - { sio_via_686a_probe, }, - { sio_ite_8872_probe, }, + { sio_via_probe, &via_686a_data, }, + { sio_via_probe, &via_8231_data, }, + { sio_ite_8872_probe, NULL, }, }; - enum parport_pc_pci_cards { siig_1p_10x = last_sio, siig_2p_10x, @@ -2737,6 +2818,7 @@ static struct pci_device_id parport_pc_pci_tbl[] = { /* Super-IO onboard chips */ { 0x1106, 0x0686, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sio_via_686a }, + { 0x1106, 0x8231, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sio_via_8231 }, { PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8872, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sio_ite_8872 }, @@ -2886,7 +2968,7 @@ continue; if (parport_pc_superio_info[id->driver_data].probe - (pdev, autoirq, autodma)) { + (pdev, autoirq, autodma,parport_pc_superio_info[id->driver_data].via)) { ret++; } } @@ -3072,9 +3154,27 @@ PARPORT_DMA_NONE, PARPORT_DMA_NOFIFO); } +static int __init parport_init_mode_setup(const char *str) { + + printk(KERN_DEBUG "parport_pc.c: Specified parameter parport_init_mode=%s\n", str); + + if (!strcmp (str, "spp")) + parport_init_mode=1; + if (!strcmp (str, "ps2")) + parport_init_mode=2; + if (!strcmp (str, "epp")) + parport_init_mode=3; + if (!strcmp (str, "ecp")) + parport_init_mode=4; + if (!strcmp (str, "ecpepp")) + parport_init_mode=5; + return 1; +} + #ifdef MODULE static const char *irq[PARPORT_PC_MAX_PORTS]; static const char *dma[PARPORT_PC_MAX_PORTS]; +static const char *init_mode; MODULE_PARM_DESC(io, "Base I/O address (SPP regs)"); MODULE_PARM(io, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "i"); @@ -3089,12 +3189,17 @@ MODULE_PARM_DESC(verbose_probing, "Log chit-chat during initialisation"); MODULE_PARM(verbose_probing, "i"); #endif +MODULE_PARM_DESC(init_mode, "Initialise mode for VIA VT8231 port (spp, ps2, epp, ecp or ecpepp)"); +MODULE_PARM(init_mode, "s"); static int __init parse_parport_params(void) { unsigned int i; int val; + if (init_mode) + parport_init_mode_setup(init_mode); + for (i = 0; i < PARPORT_PC_MAX_PORTS && io[i]; i++) { if (parport_parse_irq(irq[i], &val)) return 1; @@ -3202,6 +3307,15 @@ } __setup ("parport=", parport_setup); + +/* + * Acceptable parameters: + * + * parport_init_mode=[spp|ps2|epp|ecp|ecpepp] + */ + +__setup("parport_init_mode=",parport_init_mode_setup); + #endif /* "Parser" ends here */ diff -Nru a/drivers/parport/probe.c b/drivers/parport/probe.c --- a/drivers/parport/probe.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/parport/probe.c 2004-11-10 17:19:03 -08:00 @@ -213,4 +213,3 @@ parport_close (dev); return retval; } -EXPORT_SYMBOL(parport_device_id); diff -Nru a/drivers/parport/procfs.c b/drivers/parport/procfs.c --- a/drivers/parport/procfs.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/parport/procfs.c 2004-11-10 17:19:03 -08:00 @@ -529,8 +529,5 @@ } #endif -EXPORT_SYMBOL(parport_device_proc_register); -EXPORT_SYMBOL(parport_device_proc_unregister); - module_init(parport_default_proc_register) module_exit(parport_default_proc_unregister) diff -Nru a/drivers/parport/share.c b/drivers/parport/share.c --- a/drivers/parport/share.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/parport/share.c 2004-11-10 17:19:04 -08:00 @@ -1007,7 +1007,6 @@ EXPORT_SYMBOL(parport_unregister_driver); EXPORT_SYMBOL(parport_register_device); EXPORT_SYMBOL(parport_unregister_device); -EXPORT_SYMBOL(parport_get_port); EXPORT_SYMBOL(parport_put_port); EXPORT_SYMBOL(parport_find_number); EXPORT_SYMBOL(parport_find_base); diff -Nru a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c --- a/drivers/pci/hotplug/pci_hotplug_core.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/pci/hotplug/pci_hotplug_core.c 2004-11-10 17:19:06 -08:00 @@ -568,7 +568,7 @@ if ((slot->info == NULL) || (slot->ops == NULL)) return -EINVAL; - kobject_set_name(&slot->kobj, slot->name); + kobject_set_name(&slot->kobj, "%s", slot->name); kobj_set_kset_s(slot, pci_hotplug_slots_subsys); /* this can fail if we have already registered a slot with the same name */ diff -Nru a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c --- a/drivers/pci/pci-driver.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/pci/pci-driver.c 2004-11-10 17:19:05 -08:00 @@ -308,8 +308,8 @@ dev_state = state_conversion[state]; if (drv && drv->suspend) i = drv->suspend(pci_dev, dev_state); - - pci_save_state(pci_dev); + else + pci_save_state(pci_dev); return i; } diff -Nru a/drivers/pci/quirks.c b/drivers/pci/quirks.c --- a/drivers/pci/quirks.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/pci/quirks.c 2004-11-10 17:19:02 -08:00 @@ -18,7 +18,6 @@ #include #include #include -#include #undef DEBUG @@ -497,6 +496,7 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irqpic ); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irqpic ); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_6, quirk_via_irqpic ); +DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8233_5, quirk_via_irqpic ); /* @@ -938,8 +938,7 @@ while (wait_time > 0 && readl(base + OHCI_CONTROL) & OHCI_CTRL_IR) { wait_time -= 10; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout((HZ*10 + 999) / 1000); + msleep(10); } } @@ -988,8 +987,7 @@ wait_time = 500; do { - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout((HZ*10+999)/1000); + msleep(10); wait_time -= 10; pci_read_config_dword(pdev, hcc_params + EHCI_USBLEGSUP, @@ -1211,58 +1209,12 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_intel_ide_combined ); #endif /* CONFIG_SCSI_SATA */ -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) - -void __devinit quirk_intel_irqbalance(struct pci_dev *dev) -{ - u8 config, rev; - u32 word; - extern struct pci_raw_ops *raw_pci_ops; - - /* BIOS may enable hardware IRQ balancing for - * E7520/E7320/E7525(revision ID 0x9 and below) - * based platforms. - * Disable SW irqbalance/affinity on those platforms. - */ - pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev); - if (rev > 0x9) - return; - - printk(KERN_INFO "Intel E7520/7320/7525 detected."); - - /* enable access to config space*/ - pci_read_config_byte(dev, 0xf4, &config); - config |= 0x2; - pci_write_config_byte(dev, 0xf4, config); - - /* read xTPR register */ - raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word); - - if (!(word & (1 << 13))) { - printk(KERN_INFO "Disabling irq balancing and affinity\n"); -#ifdef CONFIG_IRQBALANCE - irqbalance_disable(""); -#endif - noirqdebug_setup(""); - no_irq_affinity = 1; - } - - config &= ~0x2; - /* disable access to config space*/ - pci_write_config_byte(dev, 0xf4, config); -} -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_intel_irqbalance); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_intel_irqbalance); -#endif int pciehp_msi_quirk; static void __devinit quirk_pciehp_msi(struct pci_dev *pdev) { pciehp_msi_quirk = 1; -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) - quirk_intel_irqbalance(pdev); -#endif } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SMCH, quirk_pciehp_msi ); diff -Nru a/drivers/pcmcia/bulkmem.c b/drivers/pcmcia/bulkmem.c --- a/drivers/pcmcia/bulkmem.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/pcmcia/bulkmem.c 2004-11-10 17:19:07 -08:00 @@ -49,11 +49,11 @@ #include "cs_internal.h" #ifdef DEBUG -extern int pc_debug; +extern int ds_pc_debug; #define cs_socket_name(skt) ((skt)->dev.class_id) #define ds_dbg(skt, lvl, fmt, arg...) do { \ - if (pc_debug >= lvl) \ + if (ds_pc_debug >= lvl) \ printk(KERN_DEBUG "ds: %s: " fmt, \ cs_socket_name(skt) , ## arg); \ } while (0) diff -Nru a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c --- a/drivers/pcmcia/cistpl.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/pcmcia/cistpl.c 2004-11-10 17:19:03 -08:00 @@ -331,6 +331,14 @@ list_del(&cis->node); kfree(cis); } + + /* + * If there was a fake CIS, destroy that as well. + */ + if (s->fake_cis) { + kfree(s->fake_cis); + s->fake_cis = NULL; + } } /*====================================================================== diff -Nru a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c --- a/drivers/pcmcia/cs.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/pcmcia/cs.c 2004-11-10 17:19:03 -08:00 @@ -364,10 +364,6 @@ s->irq.AssignedIRQ = s->irq.Config = 0; s->lock_count = 0; destroy_cis_cache(s); - if (s->fake_cis) { - kfree(s->fake_cis); - s->fake_cis = NULL; - } #ifdef CONFIG_CARDBUS cb_free(s); #endif @@ -613,10 +609,18 @@ * FIXME: need a better check here for cardbus cards. */ if (verify_cis_cache(skt) != 0) { + cs_dbg(skt, 4, "cis mismatch - different card\n"); socket_remove_drivers(skt); destroy_cis_cache(skt); + /* + * Workaround: give DS time to schedule removal. + * Remove me once the 100ms delay is eliminated + * in ds.c + */ + msleep(200); send_event(skt, CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW); } else { + cs_dbg(skt, 4, "cis matches cache\n"); send_event(skt, CS_EVENT_PM_RESUME, CS_EVENT_PRI_LOW); } } else { diff -Nru a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c --- a/drivers/pcmcia/ds.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/pcmcia/ds.c 2004-11-10 17:19:06 -08:00 @@ -75,12 +75,12 @@ MODULE_LICENSE("Dual MPL/GPL"); #ifdef DEBUG -int pc_debug; +int ds_pc_debug; -module_param(pc_debug, int, 0644); +module_param_named(pc_debug, ds_pc_debug, int, 0644); #define ds_dbg(lvl, fmt, arg...) do { \ - if (pc_debug > (lvl)) \ + if (ds_pc_debug > (lvl)) \ printk(KERN_DEBUG "ds: " fmt , ## arg); \ } while (0) #else @@ -1060,7 +1060,11 @@ } } - if (cmd & IOC_OUT) __copy_to_user(uarg, (char *)&buf, size); + if (cmd & IOC_OUT) { + if (__copy_to_user(uarg, (char *)&buf, size)) + err = -EFAULT; + } + return err; } /* ds_ioctl */ diff -Nru a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c --- a/drivers/pcmcia/pxa2xx_lubbock.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/pcmcia/pxa2xx_lubbock.c 2004-11-10 17:19:06 -08:00 @@ -265,3 +265,5 @@ return ret; } + +MODULE_LICENSE("GPL"); diff -Nru a/drivers/pnp/Kconfig b/drivers/pnp/Kconfig --- a/drivers/pnp/Kconfig 2004-11-10 17:19:04 -08:00 +++ b/drivers/pnp/Kconfig 2004-11-10 17:19:04 -08:00 @@ -6,7 +6,7 @@ config PNP bool "Plug and Play support" - depends on ISA + depends on ISA || ACPI_BUS ---help--- Plug and Play (PnP) is a standard for peripherals which allows those peripherals to be configured by software, e.g. assign IRQ's or other @@ -34,6 +34,8 @@ source "drivers/pnp/isapnp/Kconfig" source "drivers/pnp/pnpbios/Kconfig" + +source "drivers/pnp/pnpacpi/Kconfig" endmenu diff -Nru a/drivers/pnp/Makefile b/drivers/pnp/Makefile --- a/drivers/pnp/Makefile 2004-11-10 17:19:07 -08:00 +++ b/drivers/pnp/Makefile 2004-11-10 17:19:07 -08:00 @@ -4,5 +4,6 @@ obj-y := core.o card.o driver.o resource.o manager.o support.o interface.o quirks.o system.o +obj-$(CONFIG_PNPACPI) += pnpacpi/ obj-$(CONFIG_PNPBIOS) += pnpbios/ obj-$(CONFIG_ISAPNP) += isapnp/ diff -Nru a/drivers/pnp/interface.c b/drivers/pnp/interface.c --- a/drivers/pnp/interface.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/pnp/interface.c 2004-11-10 17:19:02 -08:00 @@ -60,8 +60,8 @@ int first = 1, i; pnp_printf(buffer, "%sirq ", space); - for (i = 0; i < 16; i++) - if (irq->map & (1<map)) { if (!first) { pnp_printf(buffer, ","); } else { @@ -72,7 +72,7 @@ else pnp_printf(buffer, "%i", i); } - if (!irq->map) + if (bitmap_empty(irq->map, PNP_IRQ_NR)) pnp_printf(buffer, ""); if (irq->flags & IORESOURCE_IRQ_HIGHEDGE) pnp_printf(buffer, " High-Edge"); diff -Nru a/drivers/pnp/isapnp/Kconfig b/drivers/pnp/isapnp/Kconfig --- a/drivers/pnp/isapnp/Kconfig 2004-11-10 17:19:04 -08:00 +++ b/drivers/pnp/isapnp/Kconfig 2004-11-10 17:19:04 -08:00 @@ -3,7 +3,7 @@ # config ISAPNP bool "ISA Plug and Play support" - depends on PNP + depends on PNP && ISA help Say Y here if you would like support for ISA Plug and Play devices. Some information is in . diff -Nru a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c --- a/drivers/pnp/isapnp/core.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/pnp/isapnp/core.c 2004-11-10 17:19:04 -08:00 @@ -477,12 +477,14 @@ { unsigned char tmp[3]; struct pnp_irq *irq; + unsigned long bits; isapnp_peek(tmp, size); irq = isapnp_alloc(sizeof(struct pnp_irq)); if (!irq) return; - irq->map = (tmp[1] << 8) | tmp[0]; + bits = (tmp[1] << 8) | tmp[0]; + bitmap_copy(irq->map, &bits, 16); if (size > 2) irq->flags = tmp[2]; else diff -Nru a/drivers/pnp/manager.c b/drivers/pnp/manager.c --- a/drivers/pnp/manager.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/pnp/manager.c 2004-11-10 17:19:07 -08:00 @@ -150,13 +150,19 @@ *flags |= rule->flags | IORESOURCE_IRQ; *flags &= ~IORESOURCE_UNSET; - if (!rule->map) { + if (bitmap_empty(rule->map, PNP_IRQ_NR)) { *flags |= IORESOURCE_DISABLED; return 1; /* skip disabled resource requests */ } + /* TBD: need check for >16 IRQ */ + *start = find_next_bit(rule->map, PNP_IRQ_NR, 16); + if (*start < PNP_IRQ_NR) { + *end = *start; + return 1; + } for (i = 0; i < 16; i++) { - if(rule->map & (1<map)) { *start = *end = xtab[i]; if(pnp_check_irq(dev, idx)) return 1; diff -Nru a/drivers/pnp/pnpacpi/Kconfig b/drivers/pnp/pnpacpi/Kconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/pnp/pnpacpi/Kconfig 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,18 @@ +# +# Plug and Play ACPI configuration +# +config PNPACPI + bool "Plug and Play ACPI support (EXPERIMENTAL)" + depends on PNP && ACPI_BUS && EXPERIMENTAL + default y + ---help--- + Linux uses the PNPACPI to autodetect built-in + mainboard resources (e.g. parallel port resources). + + Some features (e.g. real hotplug) are not currently + implemented. + + If you would like the kernel to detect and allocate resources to + your mainboard devices (on some systems they are disabled by the + BIOS) say Y here. Also the PNPACPI can help prevent resource + conflicts between mainboard devices and other bus devices. diff -Nru a/drivers/pnp/pnpacpi/Makefile b/drivers/pnp/pnpacpi/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/pnp/pnpacpi/Makefile 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,5 @@ +# +# Makefile for the kernel PNPACPI driver. +# + +obj-y := core.o rsparser.o diff -Nru a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/pnp/pnpacpi/core.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,258 @@ +/* + * pnpacpi -- PnP ACPI driver + * + * Copyright (c) 2004 Matthieu Castet + * Copyright (c) 2004 Li Shaohua + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include "pnpacpi.h" + +static int num = 0; + +static char __initdata excluded_id_list[] = + "PNP0C0A," /* Battery */ + "PNP0C0C,PNP0C0E,PNP0C0D," /* Button */ + "PNP0C09," /* EC */ + "PNP0C0B," /* Fan */ + "PNP0A03," /* PCI root */ + "PNP0C0F," /* Link device */ + "PNP0000," /* PIC */ + "PNP0100," /* Timer */ + ; +static inline int is_exclusive_device(struct acpi_device *dev) +{ + return (!acpi_match_ids(dev, excluded_id_list)); +} + +void *pnpacpi_kmalloc(size_t size, int f) +{ + void *p = kmalloc(size, f); + if (p) + memset(p, 0, size); + return p; +} + +/* + * Compatible Device IDs + */ +#define TEST_HEX(c) \ + if (!(('0' <= (c) && (c) <= '9') || ('A' <= (c) && (c) <= 'F'))) \ + return 0 +#define TEST_ALPHA(c) \ + if (!('@' <= (c) || (c) <= 'Z')) \ + return 0 +static int __init ispnpidacpi(char *id) +{ + TEST_ALPHA(id[0]); + TEST_ALPHA(id[1]); + TEST_ALPHA(id[2]); + TEST_HEX(id[3]); + TEST_HEX(id[4]); + TEST_HEX(id[5]); + TEST_HEX(id[6]); + if (id[7] != '\0') + return 0; + return 1; +} + +static void __init pnpidacpi_to_pnpid(char *id, char *str) +{ + str[0] = id[0]; + str[1] = id[1]; + str[2] = id[2]; + str[3] = tolower(id[3]); + str[4] = tolower(id[4]); + str[5] = tolower(id[5]); + str[6] = tolower(id[6]); + str[7] = '\0'; +} + +static int pnpacpi_get_resources(struct pnp_dev * dev, struct pnp_resource_table * res) +{ + acpi_status status; + status = pnpacpi_parse_allocated_resource((acpi_handle)dev->data, + &dev->res); + return ACPI_FAILURE(status) ? -ENODEV : 0; +} + +static int pnpacpi_set_resources(struct pnp_dev * dev, struct pnp_resource_table * res) +{ + acpi_handle handle = dev->data; + struct acpi_buffer buffer; + int ret = 0; + acpi_status status; + + ret = pnpacpi_build_resource_template(handle, &buffer); + if (ret) + return ret; + ret = pnpacpi_encode_resources(res, &buffer); + if (ret) { + kfree(buffer.pointer); + return ret; + } + status = acpi_set_current_resources(handle, &buffer); + if (ACPI_FAILURE(status)) + ret = -EINVAL; + kfree(buffer.pointer); + return ret; +} + +static int pnpacpi_disable_resources(struct pnp_dev *dev) +{ + acpi_status status; + + /* acpi_unregister_gsi(pnp_irq(dev, 0)); */ + status = acpi_evaluate_object((acpi_handle)dev->data, + "_DIS", NULL, NULL); + return ACPI_FAILURE(status) ? -ENODEV : 0; +} + +struct pnp_protocol pnpacpi_protocol = { + .name = "Plug and Play ACPI", + .get = pnpacpi_get_resources, + .set = pnpacpi_set_resources, + .disable = pnpacpi_disable_resources, +}; + +static int __init pnpacpi_add_device(struct acpi_device *device) +{ + acpi_handle temp = NULL; + acpi_status status; + struct pnp_id *dev_id; + struct pnp_dev *dev; + + if (!ispnpidacpi(acpi_device_hid(device)) || + is_exclusive_device(device)) + return 0; + + pnp_dbg("ACPI device : hid %s", acpi_device_hid(device)); + dev = pnpacpi_kmalloc(sizeof(struct pnp_dev), GFP_KERNEL); + if (!dev) { + pnp_err("Out of memory"); + return -ENOMEM; + } + dev->data = device->handle; + /* .enabled means if the device can decode the resources */ + dev->active = device->status.enabled; + status = acpi_get_handle(device->handle, "_SRS", &temp); + if (ACPI_SUCCESS(status)) + dev->capabilities |= PNP_CONFIGURABLE; + dev->capabilities |= PNP_READ; + if (device->flags.dynamic_status) + dev->capabilities |= PNP_WRITE; + if (device->flags.removable) + dev->capabilities |= PNP_REMOVABLE; + status = acpi_get_handle(device->handle, "_DIS", &temp); + if (ACPI_SUCCESS(status)) + dev->capabilities |= PNP_DISABLE; + + dev->protocol = &pnpacpi_protocol; + + if (strlen(acpi_device_name(device))) + strncpy(dev->name, acpi_device_name(device), sizeof(dev->name)); + else + strncpy(dev->name, acpi_device_bid(device), sizeof(dev->name)); + + dev->number = num; + + /* set the initial values for the PnP device */ + dev_id = pnpacpi_kmalloc(sizeof(struct pnp_id), GFP_KERNEL); + if (!dev_id) + goto err; + pnpidacpi_to_pnpid(acpi_device_hid(device), dev_id->id); + pnp_add_id(dev_id, dev); + + if(dev->active) { + /* parse allocated resource */ + status = pnpacpi_parse_allocated_resource(device->handle, &dev->res); + if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { + pnp_err("PnPACPI: METHOD_NAME__CRS failure for %s", dev_id->id); + goto err1; + } + } + + if(dev->capabilities & PNP_CONFIGURABLE) { + status = pnpacpi_parse_resource_option_data(device->handle, + dev); + if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { + pnp_err("PnPACPI: METHOD_NAME__PRS failure for %s", dev_id->id); + goto err1; + } + } + + /* parse compatible ids */ + if (device->flags.compatible_ids) { + struct acpi_compatible_id_list *cid_list = device->pnp.cid_list; + int i; + + for (i = 0; i < cid_list->count; i++) { + if (!ispnpidacpi(cid_list->id[i].value)) + continue; + dev_id = pnpacpi_kmalloc(sizeof(struct pnp_id), + GFP_KERNEL); + if (!dev_id) + continue; + + pnpidacpi_to_pnpid(cid_list->id[i].value, dev_id->id); + pnp_add_id(dev_id, dev); + } + } + + /* clear out the damaged flags */ + if (!dev->active) + pnp_init_resource_table(&dev->res); + pnp_add_device(dev); + num ++; + + return AE_OK; +err1: + kfree(dev_id); +err: + kfree(dev); + return -EINVAL; +} + +static acpi_status __init pnpacpi_add_device_handler(acpi_handle handle, + u32 lvl, void *context, void **rv) +{ + struct acpi_device *device; + + if (!acpi_bus_get_device(handle, &device)) + pnpacpi_add_device(device); + return AE_OK; +} + +int __init pnpacpi_init(void) +{ + if (acpi_disabled) { + pnp_info("PnP ACPI: ACPI disable"); + return 0; + } + pnp_info("PnP ACPI init"); + pnp_register_protocol(&pnpacpi_protocol); + acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, pnpacpi_add_device_handler, + NULL, NULL); + pnp_info("PnP ACPI: found %d devices", num); + return 0; +} +subsys_initcall(pnpacpi_init); + +EXPORT_SYMBOL(pnpacpi_protocol); diff -Nru a/drivers/pnp/pnpacpi/pnpacpi.h b/drivers/pnp/pnpacpi/pnpacpi.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/pnp/pnpacpi/pnpacpi.h 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,13 @@ +#ifndef ACPI_PNP_H +#define ACPI_PNP_H + +#include +#include +#include + +void *pnpacpi_kmalloc(size_t size, int f); +acpi_status pnpacpi_parse_allocated_resource(acpi_handle, struct pnp_resource_table*); +acpi_status pnpacpi_parse_resource_option_data(acpi_handle, struct pnp_dev*); +int pnpacpi_encode_resources(struct pnp_resource_table *, struct acpi_buffer *); +int pnpacpi_build_resource_template(acpi_handle, struct acpi_buffer*); +#endif diff -Nru a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/pnp/pnpacpi/rsparser.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,820 @@ +/* + * pnpacpi -- PnP ACPI driver + * + * Copyright (c) 2004 Matthieu Castet + * Copyright (c) 2004 Li Shaohua + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include +#include "pnpacpi.h" + +#ifdef CONFIG_IA64 +#define valid_IRQ(i) (1) +#else +#define valid_IRQ(i) (((i) != 0) && ((i) != 2)) +#endif + +/* + * Allocated Resources + */ +static int irq_flags(int edge_level, int active_high_low) +{ + int flag; + if (edge_level == ACPI_LEVEL_SENSITIVE) { + if(active_high_low == ACPI_ACTIVE_LOW) + flag = IORESOURCE_IRQ_LOWLEVEL; + else + flag = IORESOURCE_IRQ_HIGHLEVEL; + } + else { + if(active_high_low == ACPI_ACTIVE_LOW) + flag = IORESOURCE_IRQ_LOWEDGE; + else + flag = IORESOURCE_IRQ_HIGHEDGE; + } + return flag; +} + +static void decode_irq_flags(int flag, int *edge_level, int *active_high_low) +{ + switch (flag) { + case IORESOURCE_IRQ_LOWLEVEL: + *edge_level = ACPI_LEVEL_SENSITIVE; + *active_high_low = ACPI_ACTIVE_LOW; + break; + case IORESOURCE_IRQ_HIGHLEVEL: + *edge_level = ACPI_LEVEL_SENSITIVE; + *active_high_low = ACPI_ACTIVE_HIGH; + break; + case IORESOURCE_IRQ_LOWEDGE: + *edge_level = ACPI_EDGE_SENSITIVE; + *active_high_low = ACPI_ACTIVE_LOW; + break; + case IORESOURCE_IRQ_HIGHEDGE: + *edge_level = ACPI_EDGE_SENSITIVE; + *active_high_low = ACPI_ACTIVE_HIGH; + break; + } +} + +static void +pnpacpi_parse_allocated_irqresource(struct pnp_resource_table * res, int irq) +{ + int i = 0; + while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) && + i < PNP_MAX_IRQ) + i++; + if (i < PNP_MAX_IRQ) { + res->irq_resource[i].flags = IORESOURCE_IRQ; //Also clears _UNSET flag + if (irq == -1) { + res->irq_resource[i].flags |= IORESOURCE_DISABLED; + return; + } + res->irq_resource[i].start =(unsigned long) irq; + res->irq_resource[i].end = (unsigned long) irq; + } +} + +static void +pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table * res, int dma) +{ + int i = 0; + while (!(res->dma_resource[i].flags & IORESOURCE_UNSET) && + i < PNP_MAX_DMA) + i++; + if (i < PNP_MAX_DMA) { + res->dma_resource[i].flags = IORESOURCE_DMA; // Also clears _UNSET flag + if (dma == -1) { + res->dma_resource[i].flags |= IORESOURCE_DISABLED; + return; + } + res->dma_resource[i].start =(unsigned long) dma; + res->dma_resource[i].end = (unsigned long) dma; + } +} + +static void +pnpacpi_parse_allocated_ioresource(struct pnp_resource_table * res, + int io, int len) +{ + int i = 0; + while (!(res->port_resource[i].flags & IORESOURCE_UNSET) && + i < PNP_MAX_PORT) + i++; + if (i < PNP_MAX_PORT) { + res->port_resource[i].flags = IORESOURCE_IO; // Also clears _UNSET flag + if (len <= 0 || (io + len -1) >= 0x10003) { + res->port_resource[i].flags |= IORESOURCE_DISABLED; + return; + } + res->port_resource[i].start = (unsigned long) io; + res->port_resource[i].end = (unsigned long)(io + len - 1); + } +} + +static void +pnpacpi_parse_allocated_memresource(struct pnp_resource_table * res, + int mem, int len) +{ + int i = 0; + while (!(res->mem_resource[i].flags & IORESOURCE_UNSET) && + (i < PNP_MAX_MEM)) + i++; + if (i < PNP_MAX_MEM) { + res->mem_resource[i].flags = IORESOURCE_MEM; // Also clears _UNSET flag + if (len <= 0) { + res->mem_resource[i].flags |= IORESOURCE_DISABLED; + return; + } + res->mem_resource[i].start = (unsigned long) mem; + res->mem_resource[i].end = (unsigned long)(mem + len - 1); + } +} + + +static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, + void *data) +{ + struct pnp_resource_table * res_table = (struct pnp_resource_table *)data; + + switch (res->id) { + case ACPI_RSTYPE_IRQ: + if ((res->data.irq.number_of_interrupts > 0) && + valid_IRQ(res->data.irq.interrupts[0])) { + pnpacpi_parse_allocated_irqresource(res_table, + acpi_register_gsi(res->data.irq.interrupts[0], + res->data.irq.edge_level, + res->data.irq.active_high_low)); + pcibios_penalize_isa_irq(res->data.irq.interrupts[0]); + } + break; + + case ACPI_RSTYPE_EXT_IRQ: + if ((res->data.extended_irq.number_of_interrupts > 0) && + valid_IRQ(res->data.extended_irq.interrupts[0])) { + pnpacpi_parse_allocated_irqresource(res_table, + acpi_register_gsi(res->data.extended_irq.interrupts[0], + res->data.extended_irq.edge_level, + res->data.extended_irq.active_high_low)); + pcibios_penalize_isa_irq(res->data.extended_irq.interrupts[0]); + } + break; + case ACPI_RSTYPE_DMA: + if (res->data.dma.number_of_channels > 0) + pnpacpi_parse_allocated_dmaresource(res_table, + res->data.dma.channels[0]); + break; + case ACPI_RSTYPE_IO: + pnpacpi_parse_allocated_ioresource(res_table, + res->data.io.min_base_address, + res->data.io.range_length); + break; + case ACPI_RSTYPE_FIXED_IO: + pnpacpi_parse_allocated_ioresource(res_table, + res->data.fixed_io.base_address, + res->data.fixed_io.range_length); + break; + case ACPI_RSTYPE_MEM24: + pnpacpi_parse_allocated_memresource(res_table, + res->data.memory24.min_base_address, + res->data.memory24.range_length); + break; + case ACPI_RSTYPE_MEM32: + pnpacpi_parse_allocated_memresource(res_table, + res->data.memory32.min_base_address, + res->data.memory32.range_length); + break; + case ACPI_RSTYPE_FIXED_MEM32: + pnpacpi_parse_allocated_memresource(res_table, + res->data.fixed_memory32.range_base_address, + res->data.fixed_memory32.range_length); + break; + case ACPI_RSTYPE_ADDRESS16: + pnpacpi_parse_allocated_memresource(res_table, + res->data.address16.min_address_range, + res->data.address16.address_length); + break; + case ACPI_RSTYPE_ADDRESS32: + pnpacpi_parse_allocated_memresource(res_table, + res->data.address32.min_address_range, + res->data.address32.address_length); + break; + case ACPI_RSTYPE_ADDRESS64: + pnpacpi_parse_allocated_memresource(res_table, + res->data.address64.min_address_range, + res->data.address64.address_length); + break; + default: + pnp_warn("PnPACPI: Alloc type : %d not handle", + res->id); + return AE_ERROR; + } + + return AE_OK; +} + +acpi_status pnpacpi_parse_allocated_resource(acpi_handle handle, struct pnp_resource_table * res) +{ + /* Blank the resource table values */ + pnp_init_resource_table(res); + + return acpi_walk_resources(handle, METHOD_NAME__CRS, pnpacpi_allocated_resource, res); +} + +static void pnpacpi_parse_dma_option(struct pnp_option *option, struct acpi_resource_dma *p) +{ + int i; + struct pnp_dma * dma; + + if (p->number_of_channels == 0) + return; + dma = pnpacpi_kmalloc(sizeof(struct pnp_dma), GFP_KERNEL); + if (!dma) + return; + + for(i = 0; i < p->number_of_channels; i++) + dma->map |= 1 << p->channels[i]; + dma->flags = 0; + if (p->bus_master) + dma->flags |= IORESOURCE_DMA_MASTER; + switch (p->type) { + case ACPI_COMPATIBILITY: + dma->flags |= IORESOURCE_DMA_COMPATIBLE; + break; + case ACPI_TYPE_A: + dma->flags |= IORESOURCE_DMA_TYPEA; + break; + case ACPI_TYPE_B: + dma->flags |= IORESOURCE_DMA_TYPEB; + break; + case ACPI_TYPE_F: + dma->flags |= IORESOURCE_DMA_TYPEF; + break; + default: + /* Set a default value ? */ + dma->flags |= IORESOURCE_DMA_COMPATIBLE; + pnp_err("Invalid DMA type"); + } + switch (p->transfer) { + case ACPI_TRANSFER_8: + dma->flags |= IORESOURCE_DMA_8BIT; + break; + case ACPI_TRANSFER_8_16: + dma->flags |= IORESOURCE_DMA_8AND16BIT; + break; + case ACPI_TRANSFER_16: + dma->flags |= IORESOURCE_DMA_16BIT; + break; + default: + /* Set a default value ? */ + dma->flags |= IORESOURCE_DMA_8AND16BIT; + pnp_err("Invalid DMA transfer type"); + } + + pnp_register_dma_resource(option,dma); + return; +} + + +static void pnpacpi_parse_irq_option(struct pnp_option *option, + struct acpi_resource_irq *p) +{ + int i; + struct pnp_irq * irq; + + if (p->number_of_interrupts == 0) + return; + irq = pnpacpi_kmalloc(sizeof(struct pnp_irq), GFP_KERNEL); + if (!irq) + return; + + for(i = 0; i < p->number_of_interrupts; i++) + if (p->interrupts[i]) + __set_bit(p->interrupts[i], irq->map); + irq->flags = irq_flags(p->edge_level, p->active_high_low); + + pnp_register_irq_resource(option, irq); + return; +} + +static void pnpacpi_parse_ext_irq_option(struct pnp_option *option, + struct acpi_resource_ext_irq *p) +{ + int i; + struct pnp_irq * irq; + + if (p->number_of_interrupts == 0) + return; + irq = pnpacpi_kmalloc(sizeof(struct pnp_irq), GFP_KERNEL); + if (!irq) + return; + + for(i = 0; i < p->number_of_interrupts; i++) + if (p->interrupts[i]) + __set_bit(p->interrupts[i], irq->map); + irq->flags = irq_flags(p->edge_level, p->active_high_low); + + pnp_register_irq_resource(option, irq); + return; +} + +static void +pnpacpi_parse_port_option(struct pnp_option *option, + struct acpi_resource_io *io) +{ + struct pnp_port * port; + + if (io->range_length == 0) + return; + port = pnpacpi_kmalloc(sizeof(struct pnp_port), GFP_KERNEL); + if (!port) + return; + port->min = io->min_base_address; + port->max = io->max_base_address; + port->align = io->alignment; + port->size = io->range_length; + port->flags = ACPI_DECODE_16 == io->io_decode ? + PNP_PORT_FLAG_16BITADDR : 0; + pnp_register_port_resource(option,port); + return; +} + +static void +pnpacpi_parse_fixed_port_option(struct pnp_option *option, + struct acpi_resource_fixed_io *io) +{ + struct pnp_port * port; + + if (io->range_length == 0) + return; + port = pnpacpi_kmalloc(sizeof(struct pnp_port), GFP_KERNEL); + if (!port) + return; + port->min = port->max = io->base_address; + port->size = io->range_length; + port->align = 0; + port->flags = PNP_PORT_FLAG_FIXED; + pnp_register_port_resource(option,port); + return; +} + +static void +pnpacpi_parse_mem24_option(struct pnp_option *option, + struct acpi_resource_mem24 *p) +{ + struct pnp_mem * mem; + + if (p->range_length == 0) + return; + mem = pnpacpi_kmalloc(sizeof(struct pnp_mem), GFP_KERNEL); + if (!mem) + return; + mem->min = p->min_base_address; + mem->max = p->max_base_address; + mem->align = p->alignment; + mem->size = p->range_length; + + mem->flags = (ACPI_READ_WRITE_MEMORY == p->read_write_attribute) ? + IORESOURCE_MEM_WRITEABLE : 0; + + pnp_register_mem_resource(option,mem); + return; +} + +static void +pnpacpi_parse_mem32_option(struct pnp_option *option, + struct acpi_resource_mem32 *p) +{ + struct pnp_mem * mem; + + if (p->range_length == 0) + return; + mem = pnpacpi_kmalloc(sizeof(struct pnp_mem), GFP_KERNEL); + if (!mem) + return; + mem->min = p->min_base_address; + mem->max = p->max_base_address; + mem->align = p->alignment; + mem->size = p->range_length; + + mem->flags = (ACPI_READ_WRITE_MEMORY == p->read_write_attribute) ? + IORESOURCE_MEM_WRITEABLE : 0; + + pnp_register_mem_resource(option,mem); + return; +} + +static void +pnpacpi_parse_fixed_mem32_option(struct pnp_option *option, + struct acpi_resource_fixed_mem32 *p) +{ + struct pnp_mem * mem; + + if (p->range_length == 0) + return; + mem = pnpacpi_kmalloc(sizeof(struct pnp_mem), GFP_KERNEL); + if (!mem) + return; + mem->min = mem->max = p->range_base_address; + mem->size = p->range_length; + mem->align = 0; + + mem->flags = (ACPI_READ_WRITE_MEMORY == p->read_write_attribute) ? + IORESOURCE_MEM_WRITEABLE : 0; + + pnp_register_mem_resource(option,mem); + return; +} + +struct acpipnp_parse_option_s { + struct pnp_option *option; + struct pnp_dev *dev; +}; + +static acpi_status pnpacpi_option_resource(struct acpi_resource *res, + void *data) +{ + int priority = 0; + struct acpipnp_parse_option_s *parse_data = (struct acpipnp_parse_option_s *)data; + struct pnp_dev *dev = parse_data->dev; + struct pnp_option *option = parse_data->option; + + switch (res->id) { + case ACPI_RSTYPE_IRQ: + pnpacpi_parse_irq_option(option, &res->data.irq); + break; + case ACPI_RSTYPE_EXT_IRQ: + pnpacpi_parse_ext_irq_option(option, + &res->data.extended_irq); + break; + case ACPI_RSTYPE_DMA: + pnpacpi_parse_dma_option(option, &res->data.dma); + break; + case ACPI_RSTYPE_IO: + pnpacpi_parse_port_option(option, &res->data.io); + break; + case ACPI_RSTYPE_FIXED_IO: + pnpacpi_parse_fixed_port_option(option, + &res->data.fixed_io); + break; + case ACPI_RSTYPE_MEM24: + pnpacpi_parse_mem24_option(option, &res->data.memory24); + break; + case ACPI_RSTYPE_MEM32: + pnpacpi_parse_mem32_option(option, &res->data.memory32); + break; + case ACPI_RSTYPE_FIXED_MEM32: + pnpacpi_parse_fixed_mem32_option(option, + &res->data.fixed_memory32); + break; + case ACPI_RSTYPE_START_DPF: + switch (res->data.start_dpf.compatibility_priority) { + case ACPI_GOOD_CONFIGURATION: + priority = PNP_RES_PRIORITY_PREFERRED; + break; + + case ACPI_ACCEPTABLE_CONFIGURATION: + priority = PNP_RES_PRIORITY_ACCEPTABLE; + break; + + case ACPI_SUB_OPTIMAL_CONFIGURATION: + priority = PNP_RES_PRIORITY_FUNCTIONAL; + break; + default: + priority = PNP_RES_PRIORITY_INVALID; + break; + } + /* TBD: Considering performace/robustness bits */ + option = pnp_register_dependent_option(dev, priority); + if (!option) + return AE_ERROR; + parse_data->option = option; + break; + case ACPI_RSTYPE_END_DPF: + return AE_CTRL_TERMINATE; + default: + pnp_warn("PnPACPI:Option type: %d not handle", res->id); + return AE_ERROR; + } + + return AE_OK; +} + +acpi_status pnpacpi_parse_resource_option_data(acpi_handle handle, + struct pnp_dev *dev) +{ + acpi_status status; + struct acpipnp_parse_option_s parse_data; + + parse_data.option = pnp_register_independent_option(dev); + if (!parse_data.option) + return AE_ERROR; + parse_data.dev = dev; + status = acpi_walk_resources(handle, METHOD_NAME__PRS, + pnpacpi_option_resource, &parse_data); + + return status; +} + +/* + * Set resource + */ +static acpi_status pnpacpi_count_resources(struct acpi_resource *res, + void *data) +{ + int *res_cnt = (int *)data; + switch (res->id) { + case ACPI_RSTYPE_IRQ: + case ACPI_RSTYPE_EXT_IRQ: + case ACPI_RSTYPE_DMA: + case ACPI_RSTYPE_IO: + case ACPI_RSTYPE_FIXED_IO: + case ACPI_RSTYPE_MEM24: + case ACPI_RSTYPE_MEM32: + case ACPI_RSTYPE_FIXED_MEM32: +#if 0 + case ACPI_RSTYPE_ADDRESS16: + case ACPI_RSTYPE_ADDRESS32: + case ACPI_RSTYPE_ADDRESS64: +#endif + (*res_cnt) ++; + default: + return AE_OK; + } + return AE_OK; +} + +static acpi_status pnpacpi_type_resources(struct acpi_resource *res, + void *data) +{ + struct acpi_resource **resource = (struct acpi_resource **)data; + switch (res->id) { + case ACPI_RSTYPE_IRQ: + case ACPI_RSTYPE_EXT_IRQ: + case ACPI_RSTYPE_DMA: + case ACPI_RSTYPE_IO: + case ACPI_RSTYPE_FIXED_IO: + case ACPI_RSTYPE_MEM24: + case ACPI_RSTYPE_MEM32: + case ACPI_RSTYPE_FIXED_MEM32: +#if 0 + case ACPI_RSTYPE_ADDRESS16: + case ACPI_RSTYPE_ADDRESS32: + case ACPI_RSTYPE_ADDRESS64: +#endif + (*resource)->id = res->id; + (*resource)++; + default: + return AE_OK; + } + + return AE_OK; +} + +int pnpacpi_build_resource_template(acpi_handle handle, + struct acpi_buffer *buffer) +{ + struct acpi_resource *resource; + int res_cnt = 0; + acpi_status status; + + status = acpi_walk_resources(handle, METHOD_NAME__CRS, + pnpacpi_count_resources, &res_cnt); + if (ACPI_FAILURE(status)) { + pnp_err("Evaluate _CRS failed"); + return -EINVAL; + } + if (!res_cnt) + return -EINVAL; + buffer->length = sizeof(struct acpi_resource) * (res_cnt + 1) + 1; + buffer->pointer = pnpacpi_kmalloc(buffer->length - 1, GFP_KERNEL); + if (!buffer->pointer) + return -ENOMEM; + pnp_dbg("Res cnt %d", res_cnt); + resource = (struct acpi_resource *)buffer->pointer; + status = acpi_walk_resources(handle, METHOD_NAME__CRS, + pnpacpi_type_resources, &resource); + if (ACPI_FAILURE(status)) { + kfree(buffer->pointer); + pnp_err("Evaluate _CRS failed"); + return -EINVAL; + } + /* resource will pointer the end resource now */ + resource->id = ACPI_RSTYPE_END_TAG; + + return 0; +} + +static void pnpacpi_encode_irq(struct acpi_resource *resource, + struct resource *p) +{ + int edge_level, active_high_low; + + decode_irq_flags(p->flags & IORESOURCE_BITS, &edge_level, + &active_high_low); + resource->id = ACPI_RSTYPE_IRQ; + resource->length = sizeof(struct acpi_resource); + resource->data.irq.edge_level = edge_level; + resource->data.irq.active_high_low = active_high_low; + if (edge_level == ACPI_EDGE_SENSITIVE) + resource->data.irq.shared_exclusive = ACPI_EXCLUSIVE; + else + resource->data.irq.shared_exclusive = ACPI_SHARED; + resource->data.irq.number_of_interrupts = 1; + resource->data.irq.interrupts[0] = p->start; +} + +static void pnpacpi_encode_ext_irq(struct acpi_resource *resource, + struct resource *p) +{ + int edge_level, active_high_low; + + decode_irq_flags(p->flags & IORESOURCE_BITS, &edge_level, + &active_high_low); + resource->id = ACPI_RSTYPE_EXT_IRQ; + resource->length = sizeof(struct acpi_resource); + resource->data.extended_irq.producer_consumer = ACPI_CONSUMER; + resource->data.extended_irq.edge_level = edge_level; + resource->data.extended_irq.active_high_low = active_high_low; + if (edge_level == ACPI_EDGE_SENSITIVE) + resource->data.irq.shared_exclusive = ACPI_EXCLUSIVE; + else + resource->data.irq.shared_exclusive = ACPI_SHARED; + resource->data.extended_irq.number_of_interrupts = 1; + resource->data.extended_irq.interrupts[0] = p->start; +} + +static void pnpacpi_encode_dma(struct acpi_resource *resource, + struct resource *p) +{ + resource->id = ACPI_RSTYPE_DMA; + resource->length = sizeof(struct acpi_resource); + /* Note: pnp_assign_dma will copy pnp_dma->flags into p->flags */ + if (p->flags & IORESOURCE_DMA_COMPATIBLE) + resource->data.dma.type = ACPI_COMPATIBILITY; + else if (p->flags & IORESOURCE_DMA_TYPEA) + resource->data.dma.type = ACPI_TYPE_A; + else if (p->flags & IORESOURCE_DMA_TYPEB) + resource->data.dma.type = ACPI_TYPE_B; + else if (p->flags & IORESOURCE_DMA_TYPEF) + resource->data.dma.type = ACPI_TYPE_F; + if (p->flags & IORESOURCE_DMA_8BIT) + resource->data.dma.transfer = ACPI_TRANSFER_8; + else if (p->flags & IORESOURCE_DMA_8AND16BIT) + resource->data.dma.transfer = ACPI_TRANSFER_8_16; + else if (p->flags & IORESOURCE_DMA_16BIT) + resource->data.dma.transfer = ACPI_TRANSFER_16; + resource->data.dma.bus_master = p->flags & IORESOURCE_DMA_MASTER; + resource->data.dma.number_of_channels = 1; + resource->data.dma.channels[0] = p->start; +} + +static void pnpacpi_encode_io(struct acpi_resource *resource, + struct resource *p) +{ + resource->id = ACPI_RSTYPE_IO; + resource->length = sizeof(struct acpi_resource); + /* Note: pnp_assign_port will copy pnp_port->flags into p->flags */ + resource->data.io.io_decode = (p->flags & PNP_PORT_FLAG_16BITADDR)? + ACPI_DECODE_16 : ACPI_DECODE_10; + resource->data.io.min_base_address = p->start; + resource->data.io.max_base_address = p->end; + resource->data.io.alignment = 0; /* Correct? */ + resource->data.io.range_length = p->end - p->start + 1; +} + +static void pnpacpi_encode_fixed_io(struct acpi_resource *resource, + struct resource *p) +{ + resource->id = ACPI_RSTYPE_FIXED_IO; + resource->length = sizeof(struct acpi_resource); + resource->data.fixed_io.base_address = p->start; + resource->data.fixed_io.range_length = p->end - p->start + 1; +} + +static void pnpacpi_encode_mem24(struct acpi_resource *resource, + struct resource *p) +{ + resource->id = ACPI_RSTYPE_MEM24; + resource->length = sizeof(struct acpi_resource); + /* Note: pnp_assign_mem will copy pnp_mem->flags into p->flags */ + resource->data.memory24.read_write_attribute = + (p->flags & IORESOURCE_MEM_WRITEABLE) ? + ACPI_READ_WRITE_MEMORY : ACPI_READ_ONLY_MEMORY; + resource->data.memory24.min_base_address = p->start; + resource->data.memory24.max_base_address = p->end; + resource->data.memory24.alignment = 0; + resource->data.memory24.range_length = p->end - p->start + 1; +} + +static void pnpacpi_encode_mem32(struct acpi_resource *resource, + struct resource *p) +{ + resource->id = ACPI_RSTYPE_MEM32; + resource->length = sizeof(struct acpi_resource); + resource->data.memory32.read_write_attribute = + (p->flags & IORESOURCE_MEM_WRITEABLE) ? + ACPI_READ_WRITE_MEMORY : ACPI_READ_ONLY_MEMORY; + resource->data.memory32.min_base_address = p->start; + resource->data.memory32.max_base_address = p->end; + resource->data.memory32.alignment = 0; + resource->data.memory32.range_length = p->end - p->start + 1; +} + +static void pnpacpi_encode_fixed_mem32(struct acpi_resource *resource, + struct resource *p) +{ + resource->id = ACPI_RSTYPE_FIXED_MEM32; + resource->length = sizeof(struct acpi_resource); + resource->data.fixed_memory32.read_write_attribute = + (p->flags & IORESOURCE_MEM_WRITEABLE) ? + ACPI_READ_WRITE_MEMORY : ACPI_READ_ONLY_MEMORY; + resource->data.fixed_memory32.range_base_address = p->start; + resource->data.fixed_memory32.range_length = p->end - p->start + 1; +} + +int pnpacpi_encode_resources(struct pnp_resource_table *res_table, + struct acpi_buffer *buffer) +{ + int i = 0; + /* pnpacpi_build_resource_template allocates extra mem */ + int res_cnt = (buffer->length - 1)/sizeof(struct acpi_resource) - 1; + struct acpi_resource *resource = (struct acpi_resource*)buffer->pointer; + int port = 0, irq = 0, dma = 0, mem = 0; + + pnp_dbg("res cnt %d", res_cnt); + while (i < res_cnt) { + switch(resource->id) { + case ACPI_RSTYPE_IRQ: + pnp_dbg("Encode irq"); + pnpacpi_encode_irq(resource, + &res_table->irq_resource[irq]); + irq++; + break; + + case ACPI_RSTYPE_EXT_IRQ: + pnp_dbg("Encode ext irq"); + pnpacpi_encode_ext_irq(resource, + &res_table->irq_resource[irq]); + irq++; + break; + case ACPI_RSTYPE_DMA: + pnp_dbg("Encode dma"); + pnpacpi_encode_dma(resource, + &res_table->dma_resource[dma]); + dma ++; + break; + case ACPI_RSTYPE_IO: + pnp_dbg("Encode io"); + pnpacpi_encode_io(resource, + &res_table->port_resource[port]); + port ++; + break; + case ACPI_RSTYPE_FIXED_IO: + pnp_dbg("Encode fixed io"); + pnpacpi_encode_fixed_io(resource, + &res_table->port_resource[port]); + port ++; + break; + case ACPI_RSTYPE_MEM24: + pnp_dbg("Encode mem24"); + pnpacpi_encode_mem24(resource, + &res_table->mem_resource[mem]); + mem ++; + break; + case ACPI_RSTYPE_MEM32: + pnp_dbg("Encode mem32"); + pnpacpi_encode_mem32(resource, + &res_table->mem_resource[mem]); + mem ++; + break; + case ACPI_RSTYPE_FIXED_MEM32: + pnp_dbg("Encode fixed mem32"); + pnpacpi_encode_fixed_mem32(resource, + &res_table->mem_resource[mem]); + mem ++; + break; + default: /* other type */ + pnp_warn("Invalid type"); + return -EINVAL; + } + resource ++; + i ++; + } + return 0; +} diff -Nru a/drivers/pnp/pnpbios/Kconfig b/drivers/pnp/pnpbios/Kconfig --- a/drivers/pnp/pnpbios/Kconfig 2004-11-10 17:19:06 -08:00 +++ b/drivers/pnp/pnpbios/Kconfig 2004-11-10 17:19:06 -08:00 @@ -3,7 +3,8 @@ # config PNPBIOS bool "Plug and Play BIOS support (EXPERIMENTAL)" - depends on PNP && X86 && EXPERIMENTAL + depends on PNP && ISA && X86 && EXPERIMENTAL + default n ---help--- Linux uses the PNPBIOS as defined in "Plug and Play BIOS Specification Version 1.0A May 5, 1994" to autodetect built-in diff -Nru a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c --- a/drivers/pnp/pnpbios/bioscalls.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/pnp/pnpbios/bioscalls.c 2004-11-10 17:19:05 -08:00 @@ -165,7 +165,7 @@ if(pnp_bios_is_utter_crap) { printk(KERN_ERR "PnPBIOS: Warning! Your PnP BIOS caused a fatal error. Attempting to continue\n"); - printk(KERN_ERR "PnPBIOS: You may need to reboot with the \"nobiospnp\" option to operate stably\n"); + printk(KERN_ERR "PnPBIOS: You may need to reboot with the \"pnpbios=off\" option to operate stably\n"); printk(KERN_ERR "PnPBIOS: Check with your vendor for an updated BIOS\n"); } diff -Nru a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c --- a/drivers/pnp/pnpbios/core.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/pnp/pnpbios/core.c 2004-11-10 17:19:02 -08:00 @@ -56,10 +56,11 @@ #include #include #include -#include +#include #include #include #include +#include #include #include @@ -177,8 +178,7 @@ /* * Poll every 2 seconds */ - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ*2); + msleep_interruptible(2000); if(signal_pending(current)) break; @@ -538,6 +538,14 @@ return -ENODEV; } +#ifdef CONFIG_ACPI + if (!acpi_disabled) { + pnpbios_disabled = 1; + printk(KERN_INFO "PnPBIOS: Disabled by ACPI\n"); + return -ENODEV; + } +#endif /* CONFIG_ACPI */ + /* scan the system for pnpbios support */ if (!pnpbios_probe_system()) return -ENODEV; @@ -574,6 +582,8 @@ static int __init pnpbios_thread_init(void) { + if (pnpbios_disabled) + return 0; #ifdef CONFIG_HOTPLUG init_completion(&unload_sem); if (kernel_thread(pnp_dock_thread, NULL, CLONE_KERNEL) > 0) diff -Nru a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c --- a/drivers/pnp/pnpbios/rsparser.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/pnp/pnpbios/rsparser.c 2004-11-10 17:19:04 -08:00 @@ -7,6 +7,7 @@ #include #include #include +#include #include "pnpbios.h" @@ -58,6 +59,7 @@ } res->irq_resource[i].start = res->irq_resource[i].end = (unsigned long) irq; + pcibios_penalize_isa_irq(irq); } } @@ -285,10 +287,13 @@ pnpbios_parse_irq_option(unsigned char *p, int size, struct pnp_option *option) { struct pnp_irq * irq; + unsigned long bits; + irq = pnpbios_kmalloc(sizeof(struct pnp_irq), GFP_KERNEL); if (!irq) return; - irq->map = (p[2] << 8) | p[1]; + bits = (p[2] << 8) | p[1]; + bitmap_copy(irq->map, &bits, 16); if (size > 2) irq->flags = p[3]; else diff -Nru a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c --- a/drivers/pnp/quirks.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/pnp/quirks.c 2004-11-10 17:19:06 -08:00 @@ -63,14 +63,17 @@ static void quirk_cmi8330_resources(struct pnp_dev *dev) { struct pnp_option *res = dev->dependent; + unsigned long tmp; for ( ; res ; res = res->next ) { struct pnp_irq *irq; struct pnp_dma *dma; - for( irq = res->irq; irq; irq = irq->next ) // Valid irqs are 5, 7, 10 - irq->map = 0x04A0; // 0000 0100 1010 0000 + for( irq = res->irq; irq; irq = irq->next ) { // Valid irqs are 5, 7, 10 + tmp = 0x04A0; + bitmap_copy(irq->map, &tmp, 16); // 0000 0100 1010 0000 + } for( dma = res->dma; dma; dma = dma->next ) // Valid 8bit dma channels are 1,3 if( ( dma->flags & IORESOURCE_DMA_TYPE_MASK ) == IORESOURCE_DMA_8BIT ) diff -Nru a/drivers/pnp/resource.c b/drivers/pnp/resource.c --- a/drivers/pnp/resource.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/pnp/resource.c 2004-11-10 17:19:05 -08:00 @@ -101,8 +101,8 @@ { int i; - for (i=0; i<16; i++) - if (data->map & (1<map)) pcibios_penalize_isa_irq(i); } #endif @@ -421,6 +421,7 @@ int pnp_check_dma(struct pnp_dev * dev, int idx) { +#ifndef CONFIG_IA64 int tmp; struct pnp_dev *tdev; unsigned long * dma = &dev->res.dma_resource[idx].start; @@ -470,6 +471,10 @@ } return 1; +#else + /* IA64 hasn't legacy DMA */ + return 0; +#endif } diff -Nru a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c --- a/drivers/s390/block/dcssblk.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/s390/block/dcssblk.c 2004-11-10 17:19:03 -08:00 @@ -140,6 +140,53 @@ } /* + * print appropriate error message for segment_load()/segment_info() + * return code + */ +static void +dcssblk_segment_warn(int rc, char* seg_name) +{ + switch (rc) { + case -ENOENT: + PRINT_WARN("cannot load/query segment %s, does not exist\n", + seg_name); + break; + case -ENOSYS: + PRINT_WARN("cannot load/query segment %s, not running on VM\n", + seg_name); + break; + case -EIO: + PRINT_WARN("cannot load/query segment %s, hardware error\n", + seg_name); + break; + case -ENOTSUPP: + PRINT_WARN("cannot load/query segment %s, is a multi-part " + "segment\n", seg_name); + break; + case -ENOSPC: + PRINT_WARN("cannot load/query segment %s, overlaps with " + "storage\n", seg_name); + break; + case -EBUSY: + PRINT_WARN("cannot load/query segment %s, overlaps with " + "already loaded dcss\n", seg_name); + break; + case -EPERM: + PRINT_WARN("cannot load/query segment %s, already loaded in " + "incompatible mode\n", seg_name); + break; + case -ENOMEM: + PRINT_WARN("cannot load/query segment %s, out of memory\n", + seg_name); + break; + default: + PRINT_WARN("cannot load/query segment %s, return value %i\n", + seg_name, rc); + break; + } +} + +/* * device attribute for switching shared/nonshared (exclusive) * operation (show + store) */ @@ -185,61 +232,38 @@ if (inbuf[0] == '1') { // reload segment in shared mode segment_unload(dev_info->segment_name); - rc = segment_load(dev_info->segment_name, SEGMENT_SHARED_RO, + rc = segment_load(dev_info->segment_name, SEGMENT_SHARED, &dev_info->start, &dev_info->end); if (rc < 0) { - PRINT_ERR("Segment %s not reloaded, rc=%d\n", - dev_info->segment_name, rc); + dcssblk_segment_warn(rc, dev_info->segment_name); goto removeseg; } dev_info->is_shared = 1; - PRINT_INFO("Segment %s reloaded, shared mode.\n", - dev_info->segment_name); + if (rc == SEG_TYPE_SR || rc == SEG_TYPE_ER || rc == SEG_TYPE_SC) + set_disk_ro(dev_info->gd, 1); } else if (inbuf[0] == '0') { // reload segment in exclusive mode + if (dev_info->segment_type == SEG_TYPE_SC) { + PRINT_ERR("Segment type SC (%s) cannot be loaded in " + "non-shared mode\n", dev_info->segment_name); + up_write(&dcssblk_devices_sem); + return -EINVAL; + } segment_unload(dev_info->segment_name); - rc = segment_load(dev_info->segment_name, SEGMENT_EXCLUSIVE_RW, + rc = segment_load(dev_info->segment_name, SEGMENT_EXCLUSIVE, &dev_info->start, &dev_info->end); if (rc < 0) { - PRINT_ERR("Segment %s not reloaded, rc=%d\n", - dev_info->segment_name, rc); + dcssblk_segment_warn(rc, dev_info->segment_name); goto removeseg; } dev_info->is_shared = 0; - PRINT_INFO("Segment %s reloaded, exclusive (read-write) mode.\n", - dev_info->segment_name); + set_disk_ro(dev_info->gd, 0); } else { up_write(&dcssblk_devices_sem); PRINT_WARN("Invalid value, must be 0 or 1\n"); return -EINVAL; } - dev_info->segment_type = rc; rc = count; - - switch (dev_info->segment_type) { - case SEGMENT_SHARED_RO: - case SEGMENT_EXCLUSIVE_RO: - set_disk_ro(dev_info->gd, 1); - break; - case SEGMENT_SHARED_RW: - case SEGMENT_EXCLUSIVE_RW: - set_disk_ro(dev_info->gd, 0); - break; - } - if ((inbuf[0] == '1') && - ((dev_info->segment_type == SEGMENT_EXCLUSIVE_RO) || - (dev_info->segment_type == SEGMENT_EXCLUSIVE_RW))) { - PRINT_WARN("Could not get shared copy of segment %s\n", - dev_info->segment_name); - rc = -EPERM; - } - if ((inbuf[0] == '0') && - ((dev_info->segment_type == SEGMENT_SHARED_RO) || - (dev_info->segment_type == SEGMENT_SHARED_RW))) { - PRINT_WARN("Could not get exclusive copy of segment %s\n", - dev_info->segment_name); - rc = -EPERM; - } up_write(&dcssblk_devices_sem); goto out; @@ -292,7 +316,7 @@ // device is idle => we save immediately PRINT_INFO("Saving segment %s\n", dev_info->segment_name); - segment_replace(dev_info->segment_name); + segment_save(dev_info->segment_name); } else { // device is busy => we save it when it becomes // idle in dcssblk_release @@ -390,18 +414,17 @@ /* * load the segment */ - rc = segment_load(local_buf, SEGMENT_SHARED_RO, + rc = segment_load(local_buf, SEGMENT_SHARED, &dev_info->start, &dev_info->end); if (rc < 0) { - PRINT_ERR("Segment %s not loaded, rc=%d\n", local_buf, rc); + dcssblk_segment_warn(rc, dev_info->segment_name); goto dealloc_gendisk; } seg_byte_size = (dev_info->end - dev_info->start + 1); set_capacity(dev_info->gd, seg_byte_size >> 9); // size in sectors - PRINT_INFO("Loaded segment %s from %p to %p, size = %lu Byte, " - "capacity = %lu sectors (512 Byte)\n", local_buf, - (void *) dev_info->start, (void *) dev_info->end, - seg_byte_size, seg_byte_size >> 9); + PRINT_INFO("Loaded segment %s, size = %lu Byte, " + "capacity = %lu (512 Byte) sectors\n", local_buf, + seg_byte_size, seg_byte_size >> 9); dev_info->segment_type = rc; dev_info->save_pending = 0; @@ -451,12 +474,12 @@ blk_queue_hardsect_size(dev_info->dcssblk_queue, 4096); switch (dev_info->segment_type) { - case SEGMENT_SHARED_RO: - case SEGMENT_EXCLUSIVE_RO: + case SEG_TYPE_SR: + case SEG_TYPE_ER: + case SEG_TYPE_SC: set_disk_ro(dev_info->gd,1); break; - case SEGMENT_SHARED_RW: - case SEGMENT_EXCLUSIVE_RW: + default: set_disk_ro(dev_info->gd,0); break; } @@ -589,7 +612,7 @@ && (dev_info->save_pending)) { PRINT_INFO("Segment %s became idle and is being saved now\n", dev_info->segment_name); - segment_replace(dev_info->segment_name); + segment_save(dev_info->segment_name); dev_info->save_pending = 0; } up_write(&dcssblk_devices_sem); diff -Nru a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c --- a/drivers/s390/char/con3215.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/s390/char/con3215.c 2004-11-10 17:19:05 -08:00 @@ -987,7 +987,6 @@ const unsigned char *buf, int count) { struct raw3215_info *raw; - int length, ret; if (!tty) return 0; diff -Nru a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c --- a/drivers/s390/char/monreader.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/s390/char/monreader.c 2004-11-10 17:19:03 -08:00 @@ -115,6 +115,53 @@ ASCEBC(ebcdic_name, 8); } +/* + * print appropriate error message for segment_load()/segment_info() + * return code + */ +static void +mon_segment_warn(int rc, char* seg_name) +{ + switch (rc) { + case -ENOENT: + P_WARNING("cannot load/query segment %s, does not exist\n", + seg_name); + break; + case -ENOSYS: + P_WARNING("cannot load/query segment %s, not running on VM\n", + seg_name); + break; + case -EIO: + P_WARNING("cannot load/query segment %s, hardware error\n", + seg_name); + break; + case -ENOTSUPP: + P_WARNING("cannot load/query segment %s, is a multi-part " + "segment\n", seg_name); + break; + case -ENOSPC: + P_WARNING("cannot load/query segment %s, overlaps with " + "storage\n", seg_name); + break; + case -EBUSY: + P_WARNING("cannot load/query segment %s, overlaps with " + "already loaded dcss\n", seg_name); + break; + case -EPERM: + P_WARNING("cannot load/query segment %s, already loaded in " + "incompatible mode\n", seg_name); + break; + case -ENOMEM: + P_WARNING("cannot load/query segment %s, out of memory\n", + seg_name); + break; + default: + P_WARNING("cannot load/query segment %s, return value %i\n", + seg_name, rc); + break; + } +} + static inline unsigned long mon_mca_start(struct mon_msg *monmsg) { @@ -534,10 +581,21 @@ return -ENODEV; } - rc = segment_load(mon_dcss_name, SEGMENT_SHARED_RO, + rc = segment_info(mon_dcss_name); + if (rc < 0) { + mon_segment_warn(rc, mon_dcss_name); + return rc; + } + if (rc != SEG_TYPE_SC) { + P_ERROR("segment %s has unsupported type, should be SC\n", + mon_dcss_name); + return -EINVAL; + } + + rc = segment_load(mon_dcss_name, SEGMENT_SHARED, &mon_dcss_start, &mon_dcss_end); if (rc < 0) { - P_ERROR("Segment %s not loaded, rc = %d\n", mon_dcss_name, rc); + mon_segment_warn(rc, mon_dcss_name); return -EINVAL; } dcss_mkname(mon_dcss_name, &user_data_connect[8]); diff -Nru a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c --- a/drivers/s390/char/sclp_tty.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/s390/char/sclp_tty.c 2004-11-10 17:19:07 -08:00 @@ -397,8 +397,6 @@ static int sclp_tty_write(struct tty_struct *tty, const unsigned char *buf, int count) { - int length, ret; - if (sclp_tty_chars_count > 0) { sclp_tty_write_string(sclp_tty_chars, sclp_tty_chars_count); sclp_tty_chars_count = 0; @@ -603,7 +601,7 @@ /* if set in ioctl write operators input to console */ if (sclp_ioctls.echo) - sclp_tty_write(sclp_tty, 0, start, count); + sclp_tty_write(sclp_tty, start, count); /* transfer input to high level driver */ sclp_tty_input(start, count); diff -Nru a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c --- a/drivers/s390/char/tty3270.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/s390/char/tty3270.c 2004-11-10 17:19:03 -08:00 @@ -1603,7 +1603,6 @@ const unsigned char *buf, int count) { struct tty3270 *tp; - int length, ret; tp = tty->driver_data; if (!tp) diff -Nru a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c --- a/drivers/s390/cio/qdio.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/s390/cio/qdio.c 2004-11-10 17:19:05 -08:00 @@ -56,7 +56,7 @@ #include "ioasm.h" #include "chsc.h" -#define VERSION_QDIO_C "$Revision: 1.86 $" +#define VERSION_QDIO_C "$Revision: 1.88 $" /****************** MODULE PARAMETER VARIABLES ********************/ MODULE_AUTHOR("Utz Bacher "); @@ -808,7 +808,7 @@ #endif /* QDIO_USE_PROCESSING_STATE */ /* * not needed, as the inbound queue will be synced on the next - * siga-r + * siga-r, resp. tiqdio_is_inbound_q_done will do the siga-s */ /*SYNC_MEMORY;*/ f++; @@ -899,7 +899,7 @@ /* means, no more buffers to be filled */ inline static int -iqdio_is_inbound_q_done(struct qdio_q *q) +tiqdio_is_inbound_q_done(struct qdio_q *q) { int no_used; #ifdef CONFIG_QDIO_DEBUG @@ -1139,7 +1139,7 @@ goto out; qdio_kick_inbound_handler(q); - if (iqdio_is_inbound_q_done(q)) + if (tiqdio_is_inbound_q_done(q)) if (!qdio_stop_polling(q)) { /* * we set the flags to get into the stuff next time, @@ -1401,7 +1401,7 @@ int result=-ENOMEM; for (i=0;islib=kmalloc(PAGE_SIZE,GFP_KERNEL); + q->slib=kmalloc(PAGE_SIZE,GFP_KERNEL|GFP_DMA); if (!q->slib) { QDIO_PRINT_ERR("kmalloc of slib failed!\n"); goto out; @@ -1420,7 +1420,7 @@ } for (i=0;islib=kmalloc(PAGE_SIZE,GFP_KERNEL); + q->slib=kmalloc(PAGE_SIZE,GFP_KERNEL|GFP_DMA); if (!q->slib) { QDIO_PRINT_ERR("kmalloc of slib failed!\n"); goto out; diff -Nru a/drivers/s390/crypto/z90main.c b/drivers/s390/crypto/z90main.c --- a/drivers/s390/crypto/z90main.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/s390/crypto/z90main.c 2004-11-10 17:19:02 -08:00 @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff -Nru a/drivers/s390/net/ctcdbug.h b/drivers/s390/net/ctcdbug.h --- a/drivers/s390/net/ctcdbug.h 2004-11-10 17:19:04 -08:00 +++ b/drivers/s390/net/ctcdbug.h 2004-11-10 17:19:04 -08:00 @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/ctcdbug.h ($Revision: 1.3 $) + * linux/drivers/s390/net/ctcdbug.h ($Revision: 1.4 $) * * CTC / ESCON network driver - s390 dbf exploit. * @@ -9,7 +9,7 @@ * Author(s): Original Code written by * Peter Tiedemann (ptiedem@de.ibm.com) * - * $Revision: 1.3 $ $Date: 2004/07/28 12:27:54 $ + * $Revision: 1.4 $ $Date: 2004/10/15 09:26:58 $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -59,7 +59,7 @@ debug_event(ctc_dbf_##name,level,(void*)(addr),len); \ } while (0) -extern DEFINE_PER_CPU(char[256], ctc_dbf_txt_buf); +DECLARE_PER_CPU(char[256], ctc_dbf_txt_buf); extern debug_info_t *ctc_dbf_setup; extern debug_info_t *ctc_dbf_data; extern debug_info_t *ctc_dbf_trace; diff -Nru a/drivers/s390/net/iucv.h b/drivers/s390/net/iucv.h --- a/drivers/s390/net/iucv.h 2004-11-10 17:19:07 -08:00 +++ b/drivers/s390/net/iucv.h 2004-11-10 17:19:07 -08:00 @@ -63,7 +63,7 @@ debug_event(iucv_dbf_##name,level,(void*)(addr),len); \ } while (0) -extern DEFINE_PER_CPU(char[256], iucv_dbf_txt_buf); +DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf); #define IUCV_DBF_TEXT_(name,level,text...) \ do { \ diff -Nru a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c --- a/drivers/s390/net/lcs.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/s390/net/lcs.c 2004-11-10 17:19:02 -08:00 @@ -11,7 +11,7 @@ * Frank Pavlic (pavlic@de.ibm.com) and * Martin Schwidefsky * - * $Revision: 1.92 $ $Date: 2004/09/03 08:06:11 $ + * $Revision: 1.94 $ $Date: 2004/10/19 09:30:54 $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -59,7 +59,7 @@ /** * initialization string for output */ -#define VERSION_LCS_C "$Revision: 1.92 $" +#define VERSION_LCS_C "$Revision: 1.94 $" static char version[] __initdata = "LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")"; static char debug_buffer[255]; @@ -549,6 +549,7 @@ return 0; LCS_DBF_TEXT(4,trace,"haltsch"); LCS_DBF_TEXT_(4,trace,"%s", channel->ccwdev->dev.bus_id); + channel->state = CH_STATE_INIT; spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); rc = ccw_device_halt(channel->ccwdev, (addr_t) channel); spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); @@ -1357,6 +1358,7 @@ LCS_DBF_TEXT_(5, trace, "Rint%s",cdev->dev.bus_id); LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.cstat, irb->scsw.dstat); + LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.fctl, irb->scsw.actl); /* How far in the ccw chain have we processed? */ if ((channel->state != CH_STATE_INIT) && @@ -1624,8 +1626,6 @@ /* start/reset card */ if (card->dev) netif_stop_queue(card->dev); - card->write.state = CH_STATE_INIT; - card->read.state = CH_STATE_INIT; rc = lcs_stop_channels(card); if (rc == 0) { rc = lcs_start_channels(card); diff -Nru a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h --- a/drivers/s390/net/qeth.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/s390/net/qeth.h 2004-11-10 17:19:02 -08:00 @@ -92,7 +92,7 @@ debug_event(qeth_dbf_##name,level,(void*)(addr),len); \ } while (0) -extern DEFINE_PER_CPU(char[256], qeth_dbf_txt_buf); +DECLARE_PER_CPU(char[256], qeth_dbf_txt_buf); #define QETH_DBF_TEXT_(name,level,text...) \ do { \ @@ -740,8 +740,6 @@ #ifdef CONFIG_QETH_VLAN spinlock_t vlanlock; struct vlan_group *vlangrp; - __u8 vlans_current[VLAN_GROUP_ARRAY_LEN/(8*sizeof(__u8))]; - __u8 vlans_new[VLAN_GROUP_ARRAY_LEN/(8*sizeof(__u8))]; #endif struct work_struct kernel_thread_starter; spinlock_t thread_mask_lock; diff -Nru a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c --- a/drivers/s390/net/qeth_main.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/s390/net/qeth_main.c 2004-11-10 17:19:04 -08:00 @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_main.c ($Revision: 1.145 $) + * linux/drivers/s390/net/qeth_main.c ($Revision: 1.155 $) * * Linux on zSeries OSA Express and HiperSockets support * @@ -12,7 +12,7 @@ * Frank Pavlic (pavlic@de.ibm.com) and * Thomas Spatzier * - * $Revision: 1.145 $ $Date: 2004/10/08 15:08:40 $ + * $Revision: 1.155 $ $Date: 2004/10/21 13:27:46 $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -78,7 +78,7 @@ #include "qeth_mpc.h" #include "qeth_fs.h" -#define VERSION_QETH_C "$Revision: 1.145 $" +#define VERSION_QETH_C "$Revision: 1.155 $" static const char *version = "qeth S/390 OSA-Express driver"; /** @@ -2153,8 +2153,9 @@ qeth_type_trans(struct sk_buff *skb, struct net_device *dev) { struct qeth_card *card; + struct ethhdr *eth; - QETH_DBF_TEXT(trace,5,"typtrans"); + QETH_DBF_TEXT(trace,6,"typtrans"); card = (struct qeth_card *)dev->priv; #ifdef CONFIG_TR @@ -2162,7 +2163,23 @@ (card->info.link_type == QETH_LINK_TYPE_LANE_TR)) return tr_type_trans(skb,dev); #endif /* CONFIG_TR */ - return eth_type_trans(skb,dev); + skb->mac.raw = skb->data; + skb_pull(skb, ETH_HLEN ); + eth = eth_hdr(skb); + + if (*eth->h_dest & 1) { + if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) + skb->pkt_type = PACKET_BROADCAST; + else + skb->pkt_type = PACKET_MULTICAST; + } else if (memcmp(eth->h_dest, dev->dev_addr, ETH_ALEN)) + skb->pkt_type = PACKET_OTHERHOST; + + if (ntohs(eth->h_proto) >= 1536) + return eth->h_proto; + if (*(unsigned short *) (skb->data) == 0xFFFF) + return htons(ETH_P_802_3); + return htons(ETH_P_802_2); } static inline void @@ -2234,26 +2251,21 @@ qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, struct qeth_hdr *hdr) { - __u32 cast_type = 0; - __u16 rc = 0; + unsigned short vlan_id = 0; - cast_type = *(__u32 *) hdr->hdr.l2.flags; - if (cast_type & (QETH_LAYER2_FLAG_UNICAST << 8)) - skb->pkt_type = PACKET_HOST; - else if (cast_type & (QETH_LAYER2_FLAG_MULTICAST << 8)) - skb->pkt_type = PACKET_MULTICAST; - else if (cast_type & (QETH_LAYER2_FLAG_BROADCAST << 8)) - skb->pkt_type = PACKET_BROADCAST; + skb->pkt_type = PACKET_HOST; + if (card->options.checksum_type == NO_CHECKSUMMING) + skb->ip_summed = CHECKSUM_UNNECESSARY; else - skb->pkt_type = PACKET_HOST; + skb->ip_summed = CHECKSUM_NONE; #ifdef CONFIG_QETH_VLAN - if (cast_type & (QETH_LAYER2_FLAG_VLAN << 8)) { - rc = hdr->hdr.l2.vlan_id; + if (hdr->hdr.l2.flags[2] & (QETH_LAYER2_FLAG_VLAN)) { skb_pull(skb, VLAN_HLEN); + vlan_id = hdr->hdr.l2.vlan_id; } #endif - skb->protocol = qeth_type_trans(skb, card->dev); - return rc; + skb->protocol = qeth_type_trans(skb, skb->dev); + return vlan_id; } static inline void @@ -2261,7 +2273,8 @@ struct qeth_hdr *hdr) { #ifdef CONFIG_QETH_IPV6 - if (hdr->hdr.l3.flags & QETH_HDR_PASSTHRU){ + if (hdr->hdr.l3.flags & QETH_HDR_PASSTHRU) { + skb->pkt_type = PACKET_HOST; skb->protocol = qeth_type_trans(skb, card->dev); return; } @@ -2322,6 +2335,7 @@ #endif while((skb = qeth_get_next_skb(card, buf->buffer, &element, &offset, &hdr))) { + skb->dev = card->dev; if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr); else @@ -2331,13 +2345,12 @@ dev_kfree_skb_any(skb); continue; } - skb->dev = card->dev; #ifdef CONFIG_QETH_VLAN if (vlan_tag) vlan_hwaccel_rx(skb, card->vlangrp, vlan_tag); else #endif - rxrc = netif_rx(skb); + rxrc = netif_rx(skb); card->dev->last_rx = jiffies; card->stats.rx_packets++; card->stats.rx_bytes += skb->len; @@ -3621,7 +3634,8 @@ *skb = new_skb; } #ifdef CONFIG_QETH_VLAN - if (card->vlangrp && vlan_tx_tag_present(*skb) && (ipv == 6)){ + if (card->vlangrp && vlan_tx_tag_present(*skb) && + ((ipv == 6) || card->options.layer2) ) { /* * Move the mac addresses (6 bytes src, 6 bytes dest) * to the beginning of the new header. We are using three @@ -3631,14 +3645,13 @@ memcpy((*skb)->data, (*skb)->data + 4, 4); memcpy((*skb)->data + 4, (*skb)->data + 8, 4); memcpy((*skb)->data + 8, (*skb)->data + 12, 4); - tag = (u16 *) (*skb)->data + 12; + tag = (u16 *)((*skb)->data + 12); /* * first two bytes = ETH_P_8021Q (0x8100) * second two bytes = VLANID */ *tag = __constant_htons(ETH_P_8021Q); - *(tag + 1) = vlan_tx_tag_get(*skb); - *(tag + 1) = htons(*(tag + 1)); + *(tag + 1) = htons(vlan_tx_tag_get(*skb)); } #endif *hdr = (struct qeth_hdr *) skb_push(*skb, sizeof(struct qeth_hdr)); @@ -3734,7 +3747,7 @@ qeth_layer2_get_packet_type(card, hdr, skb); hdr->hdr.l2.pkt_length = skb->len-QETH_HEADER_SIZE; -#ifdef QETH_VLAN +#ifdef CONFIG_QETH_VLAN /* VSWITCH relies on the VLAN * information to be present in * the QDIO header */ @@ -4793,7 +4806,6 @@ } #ifdef CONFIG_QETH_VLAN -static void qeth_layer2_process_vlans(struct qeth_card *); static void qeth_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) { @@ -4806,8 +4818,6 @@ spin_lock_irqsave(&card->vlanlock, flags); card->vlangrp = grp; spin_unlock_irqrestore(&card->vlanlock, flags); - if (card->options.layer2) - qeth_layer2_process_vlans(card); } static inline void @@ -4902,12 +4912,69 @@ } static void +qeth_layer2_send_setdelvlan(struct qeth_card *card, __u16 i, + enum qeth_ipa_cmds ipacmd) +{ + int rc; + struct qeth_ipa_cmd *cmd; + struct qeth_cmd_buffer *iob; + + QETH_DBF_TEXT_(trace, 4, "L2sdv%x",ipacmd); + iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); + cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); + cmd->data.setdelvlan.vlan_id = i; + + rc = qeth_send_ipa_cmd(card, iob, NULL, NULL); + if (rc) { + PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " + "Continuing\n",i, card->info.if_name, rc); + QETH_DBF_TEXT_(trace, 2, "L2VL%4x", ipacmd); + QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card)); + QETH_DBF_TEXT_(trace, 2, "err%d", rc); + } +} + +static void +qeth_layer2_process_vlans(struct qeth_card *card, int clear) +{ + unsigned short i; + + QETH_DBF_TEXT(trace, 3, "L2prcvln"); + + if (!card->vlangrp) + return; + for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { + if (card->vlangrp->vlan_devices[i] == NULL) + continue; + if (clear) + qeth_layer2_send_setdelvlan(card, i, IPA_CMD_DELVLAN); + else + qeth_layer2_send_setdelvlan(card, i, IPA_CMD_SETVLAN); + } +} + +/*add_vid is layer 2 used only ....*/ +static void +qeth_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) +{ + struct qeth_card *card; + + QETH_DBF_TEXT_(trace, 4, "aid:%d", vid); + + card = (struct qeth_card *) dev->priv; + if (!card->options.layer2) + return; + qeth_layer2_send_setdelvlan(card, vid, IPA_CMD_SETVLAN); +} + +/*... kill_vid used for both modes*/ +static void qeth_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) { struct qeth_card *card; unsigned long flags; - QETH_DBF_TEXT(trace,4,"vlkilvid"); + QETH_DBF_TEXT_(trace, 4, "kid:%d", vid); card = (struct qeth_card *) dev->priv; /* free all skbs for the vlan device */ @@ -4920,7 +4987,7 @@ card->vlangrp->vlan_devices[vid] = NULL; spin_unlock_irqrestore(&card->vlanlock, flags); if (card->options.layer2) - qeth_layer2_process_vlans(card); + qeth_layer2_send_setdelvlan(card, vid, IPA_CMD_DELVLAN); if ( (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) || (qeth_set_thread_start_bit(card, QETH_SET_MC_THREAD) == 0) ) schedule_work(&card->kernel_thread_starter); @@ -5328,93 +5395,6 @@ return rc; } -#ifdef CONFIG_QETH_VLAN -/* ATT: not a very readable order: bytes count from lower numbers, bits - count from lsb */ -static void -qeth_layer2_set_bit(__u8 *ptr,int i) -{ - ptr[i/8]|=0x80>>(i%8); -} - -static int -qeth_layer2_get_bit(__u8 *ptr,int i) -{ - return (ptr[i/8]&(0x80>>(i%8)))?1:0; -} - -static void -qeth_layer2_takeover_vlans(struct qeth_card *card) -{ - int i; - - QETH_DBF_TEXT(trace, 3, "L2tkvlan"); - /* copy new to current */ - memcpy(&card->vlans_current[0], - &card->vlans_new[0], - VLAN_GROUP_ARRAY_LEN/(8*sizeof(__u8))); - - /* clear new vector */ - memset(&card->vlans_new[0], 0, - VLAN_GROUP_ARRAY_LEN/(8*sizeof(__u8))); - - for (i=0; ivlangrp) && - (card->vlangrp->vlan_devices[i]) ) - qeth_layer2_set_bit(&card->vlans_new[0], i); - } -} - -static void -qeth_layer2_send_setdelvlan(struct qeth_card *card, __u16 i, - enum qeth_ipa_cmds ipacmd) -{ - int rc; - struct qeth_ipa_cmd *cmd; - struct qeth_cmd_buffer *iob; - - QETH_DBF_TEXT(trace, 4, "L2sdvlan"); - iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); - cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); - cmd->data.setdelvlan.vlan_id = i; - - rc = qeth_send_ipa_cmd(card, iob, NULL, NULL); - if (rc) { - PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " - "Continuing\n",i, card->info.if_name, rc); - QETH_DBF_TEXT_(trace, 2, "L2VL%4x", ipacmd); - QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card)); - QETH_DBF_TEXT_(trace, 2, "err%d", rc); - } -} - -static void -qeth_layer2_register_vlans(struct qeth_card *card) -{ - __u16 i; - - QETH_DBF_TEXT(trace, 3, "L2regvln"); - for (i=0; ivlans_current[0], i)) && - (!qeth_layer2_get_bit(&card->vlans_new[0], i)) ) - qeth_layer2_send_setdelvlan(card, i, IPA_CMD_DELVLAN); - if ( (!qeth_layer2_get_bit(&card->vlans_current[0], i)) && - (qeth_layer2_get_bit(&card->vlans_new[0], i)) ) - qeth_layer2_send_setdelvlan(card, i, IPA_CMD_SETVLAN); - } -} - -static void -qeth_layer2_process_vlans(struct qeth_card *card) -{ - QETH_DBF_TEXT(trace, 2, "L2provln"); - - qeth_layer2_takeover_vlans(card); - qeth_layer2_register_vlans(card); -} - -#endif - static int qeth_layer2_register_addr_entry(struct qeth_card *card, struct qeth_ipaddr *addr) @@ -5575,6 +5555,7 @@ #ifdef CONFIG_QETH_VLAN dev->vlan_rx_register = qeth_vlan_rx_register; dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid; + dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid; #endif if (qeth_get_netdev_flags(card) & IFF_NOARP) { dev->rebuild_header = NULL; @@ -5596,9 +5577,8 @@ if ((card->options.fake_broadcast) || (card->info.broadcast_capable)) dev->flags |= IFF_BROADCAST; - dev->hard_header_len = - qeth_get_hlen(card->info.link_type) + card->options.add_hhlen; + qeth_get_hlen(card->info.link_type) + card->options.add_hhlen; dev->addr_len = OSA_ADDR_LEN; dev->mtu = card->info.initial_mtu; @@ -6187,7 +6167,10 @@ card->info.if_name, rc); } else { PRINT_INFO("VLAN enabled \n"); - card->dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; + card->dev->features |= + NETIF_F_HW_VLAN_FILTER | + NETIF_F_HW_VLAN_TX | + NETIF_F_HW_VLAN_RX; } #endif /* QETH_VLAN */ return rc; @@ -6559,6 +6542,7 @@ card->lan_online = 1; if (card->options.layer2) { card->dev->features |= + NETIF_F_HW_VLAN_FILTER | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; card->dev->flags|=IFF_MULTICAST|IFF_BROADCAST; @@ -6568,7 +6552,7 @@ return rc; } #ifdef CONFIG_QETH_VLAN - qeth_layer2_process_vlans(card); + qeth_layer2_process_vlans(card, 0); #endif goto out; } @@ -6737,6 +6721,10 @@ card->state = CARD_STATE_SOFTSETUP; } if (card->state == CARD_STATE_SOFTSETUP) { +#ifdef CONFIG_QETH_VLAN + if (card->options.layer2) + qeth_layer2_process_vlans(card, 1); +#endif qeth_clear_ip_list(card, !card->use_hard_stop, recover_flag); qeth_clear_ipacmd_list(card); card->state = CARD_STATE_HARDSETUP; @@ -7019,7 +7007,12 @@ } /*maybe it was set offline without ifconfig down * we can also use this state for recovery purposes*/ - qeth_set_allowed_threads(card, 0xffffffff, 0); + if (card->options.layer2) + qeth_set_allowed_threads(card, + QETH_RECOVER_THREAD | + QETH_SET_MC_THREAD,0); + else + qeth_set_allowed_threads(card, 0xffffffff, 0); if (recover_flag == CARD_STATE_RECOVER) qeth_start_again(card); qeth_notify_processes(); diff -Nru a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h --- a/drivers/s390/scsi/zfcp_def.h 2004-11-10 17:19:05 -08:00 +++ b/drivers/s390/scsi/zfcp_def.h 2004-11-10 17:19:05 -08:00 @@ -188,11 +188,11 @@ #define UNTAGGED 5 /* task management flags in FCP-2 FCP_CMND IU */ -#define CLEAR_ACA 0x40 -#define TARGET_RESET 0x20 -#define LOGICAL_UNIT_RESET 0x10 -#define CLEAR_TASK_SET 0x04 -#define ABORT_TASK_SET 0x02 +#define FCP_CLEAR_ACA 0x40 +#define FCP_TARGET_RESET 0x20 +#define FCP_LOGICAL_UNIT_RESET 0x10 +#define FCP_CLEAR_TASK_SET 0x04 +#define FCP_ABORT_TASK_SET 0x02 #define FCP_CDB_LENGTH 16 diff -Nru a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c --- a/drivers/s390/scsi/zfcp_scsi.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/s390/scsi/zfcp_scsi.c 2004-11-10 17:19:07 -08:00 @@ -49,8 +49,8 @@ static struct zfcp_unit *zfcp_unit_lookup(struct zfcp_adapter *, int, scsi_id_t, scsi_lun_t); -static struct zfcp_port * zfcp_port_lookup(struct zfcp_adapter *, int, - scsi_id_t); +static struct zfcp_port *zfcp_port_lookup(struct zfcp_adapter *, int, + scsi_id_t); static struct device_attribute *zfcp_sysfs_sdev_attrs[]; @@ -402,15 +402,7 @@ out: return retval; } -/* - * function: zfcp_unit_tgt_lookup - * - * purpose: - * - * returns: - * - * context: - */ + static struct zfcp_port * zfcp_port_lookup(struct zfcp_adapter *adapter, int channel, scsi_id_t id) { @@ -420,7 +412,7 @@ if (id == port->scsi_id) return port; } - return (zfcp_port *)NULL; + return (struct zfcp_port *) NULL; } /* @@ -653,7 +645,7 @@ if (!atomic_test_mask(ZFCP_STATUS_UNIT_NOTSUPPUNITRESET, &unit->status)) { retval = - zfcp_task_management_function(unit, LOGICAL_UNIT_RESET); + zfcp_task_management_function(unit, FCP_LOGICAL_UNIT_RESET); if (retval) { ZFCP_LOG_DEBUG("unit reset failed (unit=%p)\n", unit); if (retval == -ENOTSUPP) @@ -669,7 +661,7 @@ goto out; } } - retval = zfcp_task_management_function(unit, TARGET_RESET); + retval = zfcp_task_management_function(unit, FCP_TARGET_RESET); if (retval) { ZFCP_LOG_DEBUG("target reset failed (unit=%p)\n", unit); retval = FAILED; diff -Nru a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c --- a/drivers/scsi/ahci.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/scsi/ahci.c 2004-11-10 17:19:03 -08:00 @@ -38,7 +38,7 @@ #include #define DRV_NAME "ahci" -#define DRV_VERSION "0.11" +#define DRV_VERSION "1.00" enum { @@ -90,6 +90,7 @@ PORT_SCR_STAT = 0x28, /* SATA phy register: SStatus */ PORT_SCR_CTL = 0x2c, /* SATA phy register: SControl */ PORT_SCR_ERR = 0x30, /* SATA phy register: SError */ + PORT_SCR_ACT = 0x34, /* SATA phy register: SActive */ /* PORT_IRQ_{STAT,MASK} bits */ PORT_IRQ_COLD_PRES = (1 << 31), /* cold presence detect */ @@ -116,6 +117,9 @@ PORT_IRQ_HBUS_DATA_ERR | PORT_IRQ_IF_ERR, DEF_PORT_IRQ = PORT_IRQ_FATAL | PORT_IRQ_PHYRDY | + PORT_IRQ_CONNECT | PORT_IRQ_SG_DONE | + PORT_IRQ_UNK_FIS | PORT_IRQ_SDB_FIS | + PORT_IRQ_DMAS_FIS | PORT_IRQ_PIOS_FIS | PORT_IRQ_D2H_REG_FIS, /* PORT_CMD bits */ @@ -329,8 +333,8 @@ if (hpriv->cap & HOST_CAP_64) writel((pp->rx_fis_dma >> 16) >> 16, port_mmio + PORT_FIS_ADDR_HI); - writel(pp->rx_fis_dma & 0xffffffff, port_mmio + PORT_LST_ADDR); - readl(port_mmio + PORT_LST_ADDR); /* flush */ + writel(pp->rx_fis_dma & 0xffffffff, port_mmio + PORT_FIS_ADDR); + readl(port_mmio + PORT_FIS_ADDR); /* flush */ writel(PORT_CMD_ICC_ACTIVE | PORT_CMD_FIS_RX | PORT_CMD_POWER_ON | PORT_CMD_SPIN_UP | @@ -363,8 +367,7 @@ /* spec says 500 msecs for each PORT_CMD_{START,FIS_RX} bit, so * this is slightly incorrect. */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout((HZ / 2) + 1); + msleep(500); ap->private_data = NULL; pci_free_consistent(pdev, AHCI_PORT_PRIV_DMA_SZ, @@ -673,10 +676,13 @@ static int ahci_qc_issue(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; - void *mmio = (void *) ap->ioaddr.cmd_addr; + void *port_mmio = (void *) ap->ioaddr.cmd_addr; + + writel(1, port_mmio + PORT_SCR_ACT); + readl(port_mmio + PORT_SCR_ACT); /* flush */ - writel(1, mmio + PORT_CMD_ISSUE); - readl(mmio + PORT_CMD_ISSUE); /* flush */ + writel(1, port_mmio + PORT_CMD_ISSUE); + readl(port_mmio + PORT_CMD_ISSUE); /* flush */ return 0; } @@ -719,8 +725,7 @@ /* reset must complete within 1 second, or * the hardware should be considered fried. */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ + 1); + ssleep(1); tmp = readl(mmio + HOST_CTL); if (tmp & HOST_RESET) { @@ -776,8 +781,10 @@ } for (i = 0; i < probe_ent->n_ports; i++) { +#if 0 /* BIOSen initialize this incorrectly */ if (!(hpriv->port_map & (1 << i))) continue; +#endif port_mmio = ahci_port_base(mmio, i); VPRINTK("mmio %p port_mmio %p\n", mmio, port_mmio); @@ -798,8 +805,7 @@ /* spec says 500 msecs for each bit, so * this is slightly incorrect. */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout((HZ / 2) + 1); + msleep(500); } writel(PORT_CMD_SPIN_UP, port_mmio + PORT_CMD); @@ -859,6 +865,8 @@ void *mmio = probe_ent->mmio_base; u32 vers, cap, impl, speed; const char *speed_s; + u16 cc; + const char *scc_s; vers = readl(mmio + HOST_VERSION); cap = hpriv->cap; @@ -872,8 +880,18 @@ else speed_s = "?"; + pci_read_config_word(pdev, 0x0a, &cc); + if (cc == 0x0101) + scc_s = "IDE"; + else if (cc == 0x0106) + scc_s = "SATA"; + else if (cc == 0x0104) + scc_s = "RAID"; + else + scc_s = "unknown"; + printk(KERN_INFO DRV_NAME "(%s) AHCI %02x%02x.%02x%02x " - "%u slots %u ports %s Gbps 0x%x impl\n" + "%u slots %u ports %s Gbps 0x%x impl %s mode\n" , pci_name(pdev), @@ -885,7 +903,8 @@ ((cap >> 8) & 0x1f) + 1, (cap & 0x1f) + 1, speed_s, - impl); + impl, + scc_s); printk(KERN_INFO DRV_NAME "(%s) flags: " "%s%s%s%s%s%s" diff -Nru a/drivers/scsi/aic7xxx/aic79xx.reg b/drivers/scsi/aic7xxx/aic79xx.reg --- a/drivers/scsi/aic7xxx/aic79xx.reg 2004-11-10 17:19:06 -08:00 +++ b/drivers/scsi/aic7xxx/aic79xx.reg 2004-11-10 17:19:06 -08:00 @@ -1199,7 +1199,7 @@ /* * LQ Packet In - * The last LQ Packet recieved + * The last LQ Packet received */ register LQIN { address 0x020 diff -Nru a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c --- a/drivers/scsi/ide-scsi.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/scsi/ide-scsi.c 2004-11-10 17:19:05 -08:00 @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -253,17 +254,6 @@ kfree(atapi_buf); } -static inline void idescsi_free_bio (struct bio *bio) -{ - struct bio *bhp; - - while (bio) { - bhp = bio; - bio = bio->bi_next; - bio_put(bhp); - } -} - static void hexdump(u8 *x, int len) { int i; @@ -421,7 +411,6 @@ spin_lock_irqsave(host->host_lock, flags); pc->done(pc->scsi_cmd); spin_unlock_irqrestore(host->host_lock, flags); - idescsi_free_bio(rq->bio); kfree(pc); kfree(rq); scsi->pc = NULL; @@ -585,6 +574,50 @@ return ide_started; } +static inline int idescsi_set_direction(idescsi_pc_t *pc) +{ + switch (pc->c[0]) { + case READ_6: case READ_10: case READ_12: + clear_bit(PC_WRITING, &pc->flags); + return 0; + case WRITE_6: case WRITE_10: case WRITE_12: + set_bit(PC_WRITING, &pc->flags); + return 0; + default: + return 1; + } +} + +static int idescsi_map_sg(ide_drive_t *drive, idescsi_pc_t *pc) +{ + ide_hwif_t *hwif = drive->hwif; + struct scatterlist *sg, *scsi_sg; + int segments; + + if (!pc->request_transfer || pc->request_transfer % 1024) + return 1; + + if (idescsi_set_direction(pc)) + return 1; + + sg = hwif->sg_table; + scsi_sg = pc->scsi_cmd->request_buffer; + segments = pc->scsi_cmd->use_sg; + + if (segments > hwif->sg_max_nents) + return 1; + + if (!segments) { + hwif->sg_nents = 1; + sg_init_one(sg, pc->scsi_cmd->request_buffer, pc->request_transfer); + } else { + hwif->sg_nents = segments; + memcpy(sg, scsi_sg, sizeof(*sg) * segments); + } + + return 0; +} + /* * Issue a packet command */ @@ -594,7 +627,6 @@ ide_hwif_t *hwif = drive->hwif; atapi_feature_t feature; atapi_bcount_t bcount; - struct request *rq = pc->rq; scsi->pc=pc; /* Set the current packet command */ pc->actually_transferred=0; /* We haven't transferred any data yet */ @@ -602,8 +634,11 @@ bcount.all = min(pc->request_transfer, 63 * 1024); /* Request to transfer the entire buffer at once */ feature.all = 0; - if (drive->using_dma && rq->bio) + if (drive->using_dma && !idescsi_map_sg(drive, pc)) { + hwif->sg_mapped = 1; feature.b.dma = !hwif->dma_setup(drive); + hwif->sg_mapped = 0; + } SELECT_DRIVE(drive); if (IDE_CONTROL_REG) @@ -775,81 +810,6 @@ return -EINVAL; } -static inline struct bio *idescsi_kmalloc_bio (int count) -{ - struct bio *bh, *bhp, *first_bh; - - if ((first_bh = bhp = bh = bio_alloc(GFP_ATOMIC, 1)) == NULL) - goto abort; - bio_init(bh); - bh->bi_vcnt = 1; - while (--count) { - if ((bh = bio_alloc(GFP_ATOMIC, 1)) == NULL) - goto abort; - bio_init(bh); - bh->bi_vcnt = 1; - bhp->bi_next = bh; - bhp = bh; - bh->bi_next = NULL; - } - return first_bh; -abort: - idescsi_free_bio (first_bh); - return NULL; -} - -static inline int idescsi_set_direction (idescsi_pc_t *pc) -{ - switch (pc->c[0]) { - case READ_6: case READ_10: case READ_12: - clear_bit (PC_WRITING, &pc->flags); - return 0; - case WRITE_6: case WRITE_10: case WRITE_12: - set_bit (PC_WRITING, &pc->flags); - return 0; - default: - return 1; - } -} - -static inline struct bio *idescsi_dma_bio(ide_drive_t *drive, idescsi_pc_t *pc) -{ - struct bio *bh = NULL, *first_bh = NULL; - int segments = pc->scsi_cmd->use_sg; - struct scatterlist *sg = pc->scsi_cmd->request_buffer; - - if (!drive->using_dma || !pc->request_transfer || pc->request_transfer % 1024) - return NULL; - if (idescsi_set_direction(pc)) - return NULL; - if (segments) { - if ((first_bh = bh = idescsi_kmalloc_bio (segments)) == NULL) - return NULL; -#if IDESCSI_DEBUG_LOG - printk ("ide-scsi: %s: building DMA table, %d segments, %dkB total\n", drive->name, segments, pc->request_transfer >> 10); -#endif /* IDESCSI_DEBUG_LOG */ - while (segments--) { - bh->bi_io_vec[0].bv_page = sg->page; - bh->bi_io_vec[0].bv_len = sg->length; - bh->bi_io_vec[0].bv_offset = sg->offset; - bh->bi_size = sg->length; - bh = bh->bi_next; - sg++; - } - } else { - if ((first_bh = bh = idescsi_kmalloc_bio (1)) == NULL) - return NULL; -#if IDESCSI_DEBUG_LOG - printk ("ide-scsi: %s: building DMA table for a single buffer (%dkB)\n", drive->name, pc->request_transfer >> 10); -#endif /* IDESCSI_DEBUG_LOG */ - bh->bi_io_vec[0].bv_page = virt_to_page(pc->scsi_cmd->request_buffer); - bh->bi_io_vec[0].bv_offset = offset_in_page(pc->scsi_cmd->request_buffer); - bh->bi_io_vec[0].bv_len = pc->request_transfer; - bh->bi_size = pc->request_transfer; - } - return first_bh; -} - static inline int should_transform(ide_drive_t *drive, struct scsi_cmnd *cmd) { idescsi_scsi_t *scsi = drive_to_idescsi(drive); @@ -921,7 +881,6 @@ ide_init_drive_cmd (rq); rq->special = (char *) pc; - rq->bio = idescsi_dma_bio (drive, pc); rq->flags = REQ_SPECIAL; spin_unlock_irq(host->host_lock); (void) ide_do_drive_cmd (drive, rq, ide_end); @@ -975,7 +934,6 @@ */ printk (KERN_ERR "ide-scsi: cmd aborted!\n"); - idescsi_free_bio(scsi->pc->rq->bio); if (scsi->pc->rq->flags & REQ_SENSE) kfree(scsi->pc->buffer); kfree(scsi->pc->rq); @@ -1024,7 +982,6 @@ /* kill current request */ blkdev_dequeue_request(req); end_that_request_last(req); - idescsi_free_bio(req->bio); if (req->flags & REQ_SENSE) kfree(scsi->pc->buffer); kfree(scsi->pc); diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c --- a/drivers/scsi/libata-core.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/scsi/libata-core.c 2004-11-10 17:19:02 -08:00 @@ -2169,14 +2169,20 @@ struct scatterlist *sg = qc->sg; struct ata_port *ap = qc->ap; struct page *page; + unsigned int offset; unsigned char *buf; if (qc->cursect == (qc->nsect - 1)) ap->pio_task_state = PIO_ST_LAST; page = sg[qc->cursg].page; - buf = kmap(page) + - sg[qc->cursg].offset + (qc->cursg_ofs * ATA_SECT_SIZE); + offset = sg[qc->cursg].offset + qc->cursg_ofs * ATA_SECT_SIZE; + + /* get the current page and offset */ + page = nth_page(page, (offset >> PAGE_SHIFT)); + offset %= PAGE_SIZE; + + buf = kmap(page) + offset; qc->cursect++; qc->cursg_ofs++; @@ -2202,17 +2208,28 @@ struct ata_port *ap = qc->ap; struct page *page; unsigned char *buf; - unsigned int count; + unsigned int offset, count; if (qc->curbytes == qc->nbytes - bytes) ap->pio_task_state = PIO_ST_LAST; next_sg: sg = &qc->sg[qc->cursg]; + +next_page: page = sg->page; + offset = sg->offset + qc->cursg_ofs; + + /* get the current page and offset */ + page = nth_page(page, (offset >> PAGE_SHIFT)); + offset %= PAGE_SIZE; count = min(sg_dma_len(sg) - qc->cursg_ofs, bytes); - buf = kmap(page) + sg->offset + qc->cursg_ofs; + + /* don't cross page boundaries */ + count = min(count, (unsigned int)PAGE_SIZE - offset); + + buf = kmap(page) + offset; bytes -= count; qc->curbytes += count; @@ -2230,8 +2247,11 @@ kunmap(page); - if (bytes) + if (bytes) { + if (qc->cursg_ofs < sg_dma_len(sg)) + goto next_page; goto next_sg; + } } static void atapi_pio_bytes(struct ata_queued_cmd *qc) diff -Nru a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c --- a/drivers/scsi/libata-scsi.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/scsi/libata-scsi.c 2004-11-10 17:19:04 -08:00 @@ -97,7 +97,7 @@ return 0; default: - rc = -EOPNOTSUPP; + rc = -ENOTTY; break; } @@ -742,13 +742,13 @@ * spin_lock_irqsave(host_set lock) */ -static inline void ata_scsi_rbuf_put(struct scsi_cmnd *cmd) +static inline void ata_scsi_rbuf_put(struct scsi_cmnd *cmd, u8 *buf) { if (cmd->use_sg) { struct scatterlist *sg; sg = (struct scatterlist *) cmd->request_buffer; - kunmap_atomic(sg->page, KM_USER0); + kunmap_atomic(buf - sg->offset, KM_USER0); } } @@ -778,7 +778,7 @@ buflen = ata_scsi_rbuf_get(cmd, &rbuf); memset(rbuf, 0, buflen); rc = actor(args, rbuf, buflen); - ata_scsi_rbuf_put(cmd); + ata_scsi_rbuf_put(cmd, rbuf); if (rc) ata_bad_cdb(cmd, args->done); @@ -1264,7 +1264,7 @@ buflen = ata_scsi_rbuf_get(cmd, &buf); buf[2] = 0x5; buf[3] = (buf[3] & 0xf0) | 2; - ata_scsi_rbuf_put(cmd); + ata_scsi_rbuf_put(cmd, buf); } cmd->result = SAM_STAT_GOOD; } diff -Nru a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c --- a/drivers/scsi/megaraid.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/scsi/megaraid.c 2004-11-10 17:19:02 -08:00 @@ -4006,7 +4006,7 @@ mbox->m_out.xferaddr = (u32)adapter->buf_dma_handle; /* - * Non-ROMB firware fail this command, so all channels + * Non-ROMB firmware fail this command, so all channels * must be shown RAID */ adapter->mega_ch_class = 0xFF; diff -Nru a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c --- a/drivers/scsi/qla2xxx/qla_isr.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/scsi/qla2xxx/qla_isr.c 2004-11-10 17:19:07 -08:00 @@ -583,7 +583,7 @@ } /* - * If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET + * If PORT UPDATE is global (received LIP_OCCURRED/LIP_RESET * event etc. earlier indicating loop is down) then process * it. Otherwise ignore it and Wait for RSCN to come in. */ diff -Nru a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c --- a/drivers/scsi/qla2xxx/qla_os.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/scsi/qla2xxx/qla_os.c 2004-11-10 17:19:07 -08:00 @@ -754,7 +754,7 @@ cmd->host_scribble = (unsigned char *)handle; /* Bookkeeping information */ - sp->r_start = jiffies; /* time the request was recieved */ + sp->r_start = jiffies; /* time the request was received */ sp->u_start = 0; /* Setup device queue pointers. */ diff -Nru a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c --- a/drivers/scsi/sata_promise.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/scsi/sata_promise.c 2004-11-10 17:19:05 -08:00 @@ -73,7 +73,7 @@ static u32 pdc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg); static void pdc_sata_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); -static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); +static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *regs); static void pdc_eng_timeout(struct ata_port *ap); static int pdc_port_start(struct ata_port *ap); @@ -85,7 +85,7 @@ static void pdc_irq_clear(struct ata_port *ap); static int pdc_qc_issue_prot(struct ata_queued_cmd *qc); -static Scsi_Host_Template pdc_sata_sht = { +static Scsi_Host_Template pdc_ata_sht = { .module = THIS_MODULE, .name = DRV_NAME, .ioctl = ata_scsi_ioctl, @@ -104,7 +104,7 @@ .bios_param = ata_std_bios_param, }; -static struct ata_port_operations pdc_sata_ops = { +static struct ata_port_operations pdc_ata_ops = { .port_disable = ata_port_disable, .tf_load = pdc_tf_load_mmio, .tf_read = ata_tf_read, @@ -126,28 +126,28 @@ static struct ata_port_info pdc_port_info[] = { /* board_2037x */ { - .sht = &pdc_sata_sht, + .sht = &pdc_ata_sht, .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_SRST | ATA_FLAG_MMIO, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ .udma_mask = 0x7f, /* udma0-6 ; FIXME */ - .port_ops = &pdc_sata_ops, + .port_ops = &pdc_ata_ops, }, /* board_20319 */ { - .sht = &pdc_sata_sht, + .sht = &pdc_ata_sht, .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_SRST | ATA_FLAG_MMIO, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ .udma_mask = 0x7f, /* udma0-6 ; FIXME */ - .port_ops = &pdc_sata_ops, + .port_ops = &pdc_ata_ops, }, }; -static struct pci_device_id pdc_sata_pci_tbl[] = { +static struct pci_device_id pdc_ata_pci_tbl[] = { { PCI_VENDOR_ID_PROMISE, 0x3371, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_2037x }, { PCI_VENDOR_ID_PROMISE, 0x3373, PCI_ANY_ID, PCI_ANY_ID, 0, 0, @@ -164,10 +164,10 @@ }; -static struct pci_driver pdc_sata_pci_driver = { +static struct pci_driver pdc_ata_pci_driver = { .name = DRV_NAME, - .id_table = pdc_sata_pci_tbl, - .probe = pdc_sata_init_one, + .id_table = pdc_ata_pci_tbl, + .probe = pdc_ata_init_one, .remove = ata_pci_remove_one, }; @@ -481,7 +481,7 @@ } -static void pdc_sata_setup_port(struct ata_ioports *port, unsigned long base) +static void pdc_ata_setup_port(struct ata_ioports *port, unsigned long base) { port->cmd_addr = base; port->data_addr = base; @@ -539,7 +539,7 @@ writel(tmp, mmio + PDC_SLEW_CTL); } -static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) +static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) { static int printed_version; struct ata_probe_ent *probe_ent = NULL; @@ -599,8 +599,8 @@ probe_ent->irq_flags = SA_SHIRQ; probe_ent->mmio_base = mmio_base; - pdc_sata_setup_port(&probe_ent->port[0], base + 0x200); - pdc_sata_setup_port(&probe_ent->port[1], base + 0x280); + pdc_ata_setup_port(&probe_ent->port[0], base + 0x200); + pdc_ata_setup_port(&probe_ent->port[1], base + 0x280); probe_ent->port[0].scr_addr = base + 0x400; probe_ent->port[1].scr_addr = base + 0x500; @@ -610,8 +610,8 @@ case board_20319: probe_ent->n_ports = 4; - pdc_sata_setup_port(&probe_ent->port[2], base + 0x300); - pdc_sata_setup_port(&probe_ent->port[3], base + 0x380); + pdc_ata_setup_port(&probe_ent->port[2], base + 0x300); + pdc_ata_setup_port(&probe_ent->port[3], base + 0x380); probe_ent->port[2].scr_addr = base + 0x600; probe_ent->port[3].scr_addr = base + 0x700; @@ -645,22 +645,22 @@ } -static int __init pdc_sata_init(void) +static int __init pdc_ata_init(void) { - return pci_module_init(&pdc_sata_pci_driver); + return pci_module_init(&pdc_ata_pci_driver); } -static void __exit pdc_sata_exit(void) +static void __exit pdc_ata_exit(void) { - pci_unregister_driver(&pdc_sata_pci_driver); + pci_unregister_driver(&pdc_ata_pci_driver); } MODULE_AUTHOR("Jeff Garzik"); MODULE_DESCRIPTION("Promise SATA TX2/TX4 low-level driver"); MODULE_LICENSE("GPL"); -MODULE_DEVICE_TABLE(pci, pdc_sata_pci_tbl); +MODULE_DEVICE_TABLE(pci, pdc_ata_pci_tbl); -module_init(pdc_sata_init); -module_exit(pdc_sata_exit); +module_init(pdc_ata_init); +module_exit(pdc_ata_exit); diff -Nru a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c --- a/drivers/serial/68328serial.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/serial/68328serial.c 2004-11-10 17:19:07 -08:00 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -997,7 +998,7 @@ unsigned long flags; if (!info->port) return; - current->state = TASK_INTERRUPTIBLE; + set_current_state(TASK_INTERRUPTIBLE); save_flags(flags); cli(); #ifdef USE_INTS @@ -1189,8 +1190,7 @@ #endif if (info->blocked_open) { if (info->close_delay) { - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(info->close_delay); + msleep_interruptible(jiffies_to_msecs(info->close_delay)); } wake_up_interruptible(&info->open_wait); } diff -Nru a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c --- a/drivers/serial/68360serial.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/serial/68360serial.c 2004-11-10 17:19:07 -08:00 @@ -1396,7 +1396,7 @@ */ static void send_break(ser_info_t *info, int duration) { - current->state = TASK_INTERRUPTIBLE; + set_current_state(TASK_INTERRUPTIBLE); #ifdef SERIAL_DEBUG_SEND_BREAK printk("rs_send_break(%d) jiff=%lu...", duration, jiffies); #endif @@ -1707,8 +1707,7 @@ info->tty = 0; if (info->blocked_open) { if (info->close_delay) { - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(info->close_delay); + msleep_interruptible(jiffies_to_msecs(info->close_delay)); } wake_up_interruptible(&info->open_wait); } @@ -1761,9 +1760,8 @@ #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT printk("lsr = %d (jiff=%lu)...", lsr, jiffies); #endif - current->state = TASK_INTERRUPTIBLE; /* current->counter = 0; make us low-priority */ - schedule_timeout(char_time); + msleep_interruptible(jiffies_to_msecs(char_time)); if (signal_pending(current)) break; if (timeout && ((orig_jiffies + timeout) < jiffies)) diff -Nru a/drivers/serial/8250.c b/drivers/serial/8250.c --- a/drivers/serial/8250.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/serial/8250.c 2004-11-10 17:19:02 -08:00 @@ -29,7 +29,8 @@ #include #include #include -#include +#include +#include #include #include @@ -1152,7 +1153,7 @@ { struct irq_info *i = dev_id; struct list_head *l, *end = NULL; - int pass_counter = 0; + int pass_counter = 0, handled = 0; DEBUG_INTR("serial8250_interrupt(%d)...", irq); @@ -1171,6 +1172,8 @@ serial8250_handle_port(up, regs); spin_unlock(&up->port.lock); + handled = 1; + end = NULL; } else if (end == NULL) end = l; @@ -1188,8 +1191,8 @@ spin_unlock(&i->lock); DEBUG_INTR("end.\n"); - /* FIXME! Was it really ours? */ - return IRQ_HANDLED; + + return IRQ_RETVAL(handled); } /* @@ -1732,147 +1735,130 @@ } /* - * Resource handling. This is complicated by the fact that resources - * depend on the port type. Maybe we should be claiming the standard - * 8250 ports, and then trying to get other resources as necessary? + * Resource handling. */ -static int -serial8250_request_std_resource(struct uart_8250_port *up, struct resource **res) +static int serial8250_request_std_resource(struct uart_8250_port *up) { unsigned int size = 8 << up->port.regshift; int ret = 0; switch (up->port.iotype) { case UPIO_MEM: - if (up->port.mapbase) { - *res = request_mem_region(up->port.mapbase, size, "serial"); - if (!*res) - ret = -EBUSY; + if (!up->port.mapbase) + break; + + if (!request_mem_region(up->port.mapbase, size, "serial")) { + ret = -EBUSY; + break; + } + + if (up->port.flags & UPF_IOREMAP) { + up->port.membase = ioremap(up->port.mapbase, size); + if (!up->port.membase) { + release_mem_region(up->port.mapbase, size); + ret = -ENOMEM; + } } break; case UPIO_HUB6: case UPIO_PORT: - *res = request_region(up->port.iobase, size, "serial"); - if (!*res) + if (!request_region(up->port.iobase, size, "serial")) ret = -EBUSY; break; } return ret; } -static int -serial8250_request_rsa_resource(struct uart_8250_port *up, struct resource **res) +static void serial8250_release_std_resource(struct uart_8250_port *up) { unsigned int size = 8 << up->port.regshift; - unsigned long start; - int ret = 0; switch (up->port.iotype) { case UPIO_MEM: - if (up->port.mapbase) { - start = up->port.mapbase; - start += UART_RSA_BASE << up->port.regshift; - *res = request_mem_region(start, size, "serial-rsa"); - if (!*res) - ret = -EBUSY; + if (!up->port.mapbase) + break; + + if (up->port.flags & UPF_IOREMAP) { + iounmap(up->port.membase); + up->port.membase = NULL; } + + release_mem_region(up->port.mapbase, size); break; case UPIO_HUB6: case UPIO_PORT: - start = up->port.iobase; - start += UART_RSA_BASE << up->port.regshift; - *res = request_region(start, size, "serial-rsa"); - if (!*res) - ret = -EBUSY; + release_region(up->port.iobase, size); break; } - - return ret; } -static void serial8250_release_port(struct uart_port *port) +static int serial8250_request_rsa_resource(struct uart_8250_port *up) { - struct uart_8250_port *up = (struct uart_8250_port *)port; - unsigned long start, offset = 0, size = 0; - - if (up->port.type == PORT_RSA) { - offset = UART_RSA_BASE << up->port.regshift; - size = 8; - } - - size <<= up->port.regshift; + unsigned long start = UART_RSA_BASE << up->port.regshift; + unsigned int size = 8 << up->port.regshift; + int ret = 0; switch (up->port.iotype) { case UPIO_MEM: - if (up->port.mapbase) { - /* - * Unmap the area. - */ - iounmap(up->port.membase); - up->port.membase = NULL; - - start = up->port.mapbase; - - if (size) - release_mem_region(start + offset, size); - release_mem_region(start, 8 << up->port.regshift); - } + ret = -EINVAL; break; case UPIO_HUB6: case UPIO_PORT: - start = up->port.iobase; + start += up->port.iobase; + if (!request_region(start, size, "serial-rsa")) + ret = -EBUSY; + break; + } + + return ret; +} - if (size) - release_region(start + offset, size); - release_region(start + offset, 8 << up->port.regshift); +static void serial8250_release_rsa_resource(struct uart_8250_port *up) +{ + unsigned long offset = UART_RSA_BASE << up->port.regshift; + unsigned int size = 8 << up->port.regshift; + + switch (up->port.iotype) { + case UPIO_MEM: break; - default: + case UPIO_HUB6: + case UPIO_PORT: + release_region(up->port.iobase + offset, size); break; } } +static void serial8250_release_port(struct uart_port *port) +{ + struct uart_8250_port *up = (struct uart_8250_port *)port; + + serial8250_release_std_resource(up); + if (up->port.type == PORT_RSA) + serial8250_release_rsa_resource(up); +} + static int serial8250_request_port(struct uart_port *port) { struct uart_8250_port *up = (struct uart_8250_port *)port; - struct resource *res = NULL, *res_rsa = NULL; int ret = 0; - if (up->port.type == PORT_RSA) { - ret = serial8250_request_rsa_resource(up, &res_rsa); + ret = serial8250_request_std_resource(up); + if (ret == 0 && up->port.type == PORT_RSA) { + ret = serial8250_request_rsa_resource(up); if (ret < 0) - return ret; + serial8250_release_std_resource(up); } - ret = serial8250_request_std_resource(up, &res); - - /* - * If we have a mapbase, then request that as well. - */ - if (ret == 0 && up->port.flags & UPF_IOREMAP) { - int size = res->end - res->start + 1; - - up->port.membase = ioremap(up->port.mapbase, size); - if (!up->port.membase) - ret = -ENOMEM; - } - - if (ret < 0) { - if (res_rsa) - release_resource(res_rsa); - if (res) - release_resource(res); - } return ret; } static void serial8250_config_port(struct uart_port *port, int flags) { struct uart_8250_port *up = (struct uart_8250_port *)port; - struct resource *res_std = NULL, *res_rsa = NULL; int probeflags = PROBE_ANY; int ret; @@ -1888,11 +1874,11 @@ * Find the region that we can probe for. This in turn * tells us whether we can probe for the type of port. */ - ret = serial8250_request_std_resource(up, &res_std); + ret = serial8250_request_std_resource(up); if (ret < 0) return; - ret = serial8250_request_rsa_resource(up, &res_rsa); + ret = serial8250_request_rsa_resource(up); if (ret < 0) probeflags &= ~PROBE_RSA; @@ -1901,14 +1887,10 @@ if (up->port.type != PORT_UNKNOWN && flags & UART_CONFIG_IRQ) autoconfig_irq(up); - /* - * If the port wasn't an RSA port, release the resource. - */ - if (up->port.type != PORT_RSA && res_rsa) - release_resource(res_rsa); - - if (up->port.type == PORT_UNKNOWN && res_std) - release_resource(res_std); + if (up->port.type != PORT_RSA && probeflags & PROBE_RSA) + serial8250_release_rsa_resource(up); + if (up->port.type == PORT_UNKNOWN) + serial8250_release_std_resource(up); } static int @@ -1964,6 +1946,24 @@ return; first = 0; + for (i = 0; i < UART_NR; i++) { + struct uart_8250_port *up = &serial8250_ports[i]; + + up->port.line = i; + spin_lock_init(&up->port.lock); + + init_timer(&up->timer); + up->timer.function = serial8250_timeout; + + /* + * ALPHA_KLUDGE_MCR needs to be killed. + */ + up->mcr_mask = ~ALPHA_KLUDGE_MCR; + up->mcr_force = ALPHA_KLUDGE_MCR; + + up->port.ops = &serial8250_pops; + } + for (i = 0, up = serial8250_ports; i < ARRAY_SIZE(old_serial_port); i++, up++) { up->port.iobase = old_serial_port[i].port; @@ -1974,7 +1974,6 @@ up->port.membase = old_serial_port[i].iomem_base; up->port.iotype = old_serial_port[i].io_type; up->port.regshift = old_serial_port[i].iomem_reg_shift; - up->port.ops = &serial8250_pops; if (share_irqs) up->port.flags |= UPF_SHARE_IRQ; } @@ -1990,18 +1989,7 @@ for (i = 0; i < UART_NR; i++) { struct uart_8250_port *up = &serial8250_ports[i]; - up->port.line = i; - up->port.ops = &serial8250_pops; up->port.dev = dev; - init_timer(&up->timer); - up->timer.function = serial8250_timeout; - - /* - * ALPHA_KLUDGE_MCR needs to be killed. - */ - up->mcr_mask = ~ALPHA_KLUDGE_MCR; - up->mcr_force = ALPHA_KLUDGE_MCR; - uart_add_one_port(drv, &up->port); } } @@ -2102,14 +2090,9 @@ if (co->index >= UART_NR) co->index = 0; port = &serial8250_ports[co->index].port; - if (!port->ops) + if (!port->iobase && !port->membase) return -ENODEV; - /* - * Temporary fix. - */ - spin_lock_init(&port->lock); - if (options) uart_parse_options(options, &baud, &parity, &bits, &flow); @@ -2170,20 +2153,6 @@ return 0; } -/* - * This is for ISAPNP only. - */ -void serial8250_get_irq_map(unsigned int *map) -{ - int i; - - for (i = 0; i < UART_NR; i++) { - if (serial8250_ports[i].port.type != PORT_UNKNOWN && - serial8250_ports[i].port.irq < 16) - *map |= 1 << serial8250_ports[i].port.irq; - } -} - /** * serial8250_suspend_port - suspend one serial port * @line: serial line number @@ -2208,6 +2177,51 @@ uart_resume_port(&serial8250_reg, &serial8250_ports[line].port); } +/* + * Register a set of serial devices attached to a platform device. The + * list is terminated with a zero flags entry, which means we expect + * all entries to have at least UPF_BOOT_AUTOCONF set. + */ +static int __devinit serial8250_probe(struct device *dev) +{ + struct plat_serial8250_port *p = dev->platform_data; + struct uart_port port; + + memset(&port, 0, sizeof(struct uart_port)); + + for (; p && p->flags != 0; p++) { + port.iobase = p->iobase; + port.membase = p->membase; + port.irq = p->irq; + port.uartclk = p->uartclk; + port.regshift = p->regshift; + port.iotype = p->iotype; + port.flags = p->flags; + port.mapbase = p->mapbase; + port.dev = dev; + if (share_irqs) + port.flags |= UPF_SHARE_IRQ; + serial8250_register_port(&port); + } + return 0; +} + +/* + * Remove serial ports registered against a platform device. + */ +static int __devexit serial8250_remove(struct device *dev) +{ + int i; + + for (i = 0; i < UART_NR; i++) { + struct uart_8250_port *up = &serial8250_ports[i]; + + if (up->port.dev == dev) + serial8250_unregister_port(i); + } + return 0; +} + static int serial8250_suspend(struct device *dev, u32 state, u32 level) { int i; @@ -2245,12 +2259,19 @@ static struct device_driver serial8250_isa_driver = { .name = "serial8250", .bus = &platform_bus_type, - + .probe = serial8250_probe, + .remove = __devexit_p(serial8250_remove), .suspend = serial8250_suspend, .resume = serial8250_resume, }; /* + * This "device" covers _all_ ISA 8250-compatible serial devices listed + * in the table in include/asm/serial.h + */ +static struct platform_device *serial8250_isa_devs; + +/* * serial8250_register_port and serial8250_unregister_port allows for * 16x50 serial ports to be configured at run-time, to support PCMCIA * modems and PCI multiport cards. @@ -2327,6 +2348,9 @@ struct uart_8250_port *uart; int ret = -ENOSPC; + if (port->uartclk == 0) + return -EINVAL; + down(&serial_sem); uart = serial8250_find_match_or_unused(port); @@ -2368,10 +2392,14 @@ down(&serial_sem); uart_remove_one_port(&serial8250_reg, &uart->port); - uart->port.flags &= ~UPF_BOOT_AUTOCONF; - uart->port.type = PORT_UNKNOWN; - uart->port.dev = NULL; - uart_add_one_port(&serial8250_reg, &uart->port); + if (serial8250_isa_devs) { + uart->port.flags &= ~UPF_BOOT_AUTOCONF; + uart->port.type = PORT_UNKNOWN; + uart->port.dev = &serial8250_isa_devs->dev; + uart_add_one_port(&serial8250_reg, &uart->port); + } else { + uart->port.dev = NULL; + } up(&serial_sem); } EXPORT_SYMBOL(serial8250_unregister_port); @@ -2384,41 +2412,53 @@ "%d ports, IRQ sharing %sabled\n", (int) UART_NR, share_irqs ? "en" : "dis"); - ret = driver_register(&serial8250_isa_driver); - if (ret) - goto out; - for (i = 0; i < NR_IRQS; i++) spin_lock_init(&irq_lists[i].lock); ret = uart_register_driver(&serial8250_reg); if (ret) + goto out; + + serial8250_isa_devs = platform_device_register_simple("serial8250", + -1, NULL, 0); + if (IS_ERR(serial8250_isa_devs)) { + ret = PTR_ERR(serial8250_isa_devs); goto unreg; + } - serial8250_register_ports(&serial8250_reg, NULL); - goto out; + serial8250_register_ports(&serial8250_reg, &serial8250_isa_devs->dev); + + ret = driver_register(&serial8250_isa_driver); + if (ret == 0) + goto out; + platform_device_unregister(serial8250_isa_devs); unreg: - driver_unregister(&serial8250_isa_driver); + uart_unregister_driver(&serial8250_reg); out: return ret; } static void __exit serial8250_exit(void) { - int i; + struct platform_device *isa_dev = serial8250_isa_devs; - for (i = 0; i < UART_NR; i++) - uart_remove_one_port(&serial8250_reg, &serial8250_ports[i].port); + /* + * This tells serial8250_unregister_port() not to re-register + * the ports (thereby making serial8250_isa_driver permanently + * in use.) + */ + serial8250_isa_devs = NULL; - uart_unregister_driver(&serial8250_reg); driver_unregister(&serial8250_isa_driver); + platform_device_unregister(isa_dev); + + uart_unregister_driver(&serial8250_reg); } module_init(serial8250_init); module_exit(serial8250_exit); -EXPORT_SYMBOL(serial8250_get_irq_map); EXPORT_SYMBOL(serial8250_suspend_port); EXPORT_SYMBOL(serial8250_resume_port); @@ -2470,11 +2510,26 @@ port.iobase |= (long) req->port_high << HIGH_BITS_OFFSET; /* - * If a clock rate wasn't specified by the low level - * driver, then default to the standard clock rate. + * If a clock rate wasn't specified by the low level driver, then + * default to the standard clock rate. This should be 115200 (*16) + * and should not depend on the architecture's BASE_BAUD definition. + * However, since this API will be deprecated, it's probably a + * better idea to convert the drivers to use the new API + * (serial8250_register_port and serial8250_unregister_port). */ - if (port.uartclk == 0) + if (port.uartclk == 0) { + printk(KERN_WARNING + "Serial: registering port at [%08x,%08lx,%p] irq %d with zero baud_base\n", + port.iobase, port.mapbase, port.membase, port.irq); + printk(KERN_WARNING "Serial: see %s:%d for more information\n", + __FILE__, __LINE__); + dump_stack(); + + /* + * Fix it up for now, but this is only a temporary measure. + */ port.uartclk = BASE_BAUD * 16; + } return serial8250_register_port(&port); } diff -Nru a/drivers/serial/8250.h b/drivers/serial/8250.h --- a/drivers/serial/8250.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/serial/8250.h 2004-11-10 17:19:02 -08:00 @@ -19,7 +19,6 @@ int serial8250_register_port(struct uart_port *); void serial8250_unregister_port(int line); -void serial8250_get_irq_map(unsigned int *map); void serial8250_suspend_port(int line); void serial8250_resume_port(int line); @@ -72,4 +71,15 @@ #define SERIAL8250_SHARE_IRQS 1 #else #define SERIAL8250_SHARE_IRQS 0 +#endif + +#if defined(__alpha__) && !defined(CONFIG_PCI) +/* + * Digital did something really horribly wrong with the OUT1 and OUT2 + * lines on at least some ALPHA's. The failure mode is that if either + * is cleared, the machine locks up with endless interrupts. + */ +#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2 | UART_MCR_OUT1) +#else +#define ALPHA_KLUDGE_MCR 0 #endif diff -Nru a/drivers/serial/8250_acorn.c b/drivers/serial/8250_acorn.c --- a/drivers/serial/8250_acorn.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/serial/8250_acorn.c 2004-11-10 17:19:06 -08:00 @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -22,11 +21,13 @@ #include #include +#include "8250.h" + #define MAX_PORTS 3 struct serial_card_type { unsigned int num_ports; - unsigned int baud_base; + unsigned int uartclk; unsigned int type; unsigned int offset[MAX_PORTS]; }; @@ -36,31 +37,15 @@ int ports[MAX_PORTS]; }; -static inline int -serial_register_onedev(unsigned long baddr, void *vaddr, int irq, unsigned int baud_base) -{ - struct serial_struct req; - - memset(&req, 0, sizeof(req)); - req.irq = irq; - req.flags = UPF_AUTOPROBE | UPF_SHARE_IRQ; - req.baud_base = baud_base; - req.io_type = UPIO_MEM; - req.iomem_base = vaddr; - req.iomem_reg_shift = 2; - req.iomap_base = baddr; - - return register_serial(&req); -} - static int __devinit serial_card_probe(struct expansion_card *ec, const struct ecard_id *id) { struct serial_card_info *info; struct serial_card_type *type = id->data; + struct uart_port port; unsigned long bus_addr; - unsigned char *virt_addr; - unsigned int port; + unsigned char __iomem *virt_addr; + unsigned int i; info = kmalloc(sizeof(struct serial_card_info), GFP_KERNEL); if (!info) @@ -69,21 +54,28 @@ memset(info, 0, sizeof(struct serial_card_info)); info->num_ports = type->num_ports; - ecard_set_drvdata(ec, info); - - bus_addr = ec->resource[type->type].start; - virt_addr = ioremap(bus_addr, ec->resource[type->type].end - bus_addr + 1); + bus_addr = ecard_resource_start(ec, type->type); + virt_addr = ioremap(bus_addr, ecard_resource_len(ec, type->type)); if (!virt_addr) { kfree(info); return -ENOMEM; } - for (port = 0; port < info->num_ports; port ++) { - unsigned long baddr = bus_addr + type->offset[port]; - unsigned char *vaddr = virt_addr + type->offset[port]; + ecard_set_drvdata(ec, info); + + memset(&port, 0, sizeof(struct uart_port)); + port.irq = ec->irq; + port.flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ; + port.uartclk = type->uartclk; + port.iotype = UPIO_MEM; + port.regshift = 2; + port.dev = &ec->dev; + + for (i = 0; i < info->num_ports; i ++) { + port.membase = virt_addr + type->offset[i]; + port.mapbase = bus_addr + type->offset[i]; - info->ports[port] = serial_register_onedev(baddr, vaddr, - ec->irq, type->baud_base); + info->ports[i] = serial8250_register_port(&port); } return 0; @@ -98,21 +90,21 @@ for (i = 0; i < info->num_ports; i++) if (info->ports[i] > 0) - unregister_serial(info->ports[i]); + serial8250_unregister_port(info->ports[i]); kfree(info); } static struct serial_card_type atomwide_type = { .num_ports = 3, - .baud_base = 7372800 / 16, + .uartclk = 7372800, .type = ECARD_RES_IOCSLOW, .offset = { 0x2800, 0x2400, 0x2000 }, }; static struct serial_card_type serport_type = { .num_ports = 2, - .baud_base = 3686400 / 16, + .uartclk = 3686400, .type = ECARD_RES_IOCSLOW, .offset = { 0x2000, 0x2020 }, }; @@ -128,7 +120,7 @@ .remove = __devexit_p(serial_card_remove), .id_table = serial_cids, .drv = { - .name = "8250_acorn", + .name = "8250_acorn", }, }; diff -Nru a/drivers/serial/8250_acpi.c b/drivers/serial/8250_acpi.c --- a/drivers/serial/8250_acpi.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/serial/8250_acpi.c 2004-11-10 17:19:07 -08:00 @@ -12,81 +12,71 @@ #include #include #include -#include -#include #include #include #include -#include + +#include "8250.h" struct serial_private { int line; - void *iomem_base; }; -static acpi_status acpi_serial_mmio(struct serial_struct *req, +static acpi_status acpi_serial_mmio(struct uart_port *port, struct acpi_resource_address64 *addr) { - unsigned long size; - - size = addr->max_address_range - addr->min_address_range + 1; - req->iomap_base = addr->min_address_range; - req->iomem_base = ioremap(req->iomap_base, size); - if (!req->iomem_base) { - printk(KERN_ERR "%s: couldn't ioremap 0x%lx-0x%lx\n", - __FUNCTION__, req->iomap_base, req->iomap_base + size); - return AE_ERROR; - } - req->io_type = SERIAL_IO_MEM; + port->mapbase = addr->min_address_range; + port->iotype = UPIO_MEM; + port->flags |= UPF_IOREMAP; return AE_OK; } -static acpi_status acpi_serial_port(struct serial_struct *req, +static acpi_status acpi_serial_port(struct uart_port *port, struct acpi_resource_io *io) { if (io->range_length) { - req->port = io->min_base_address; - req->io_type = SERIAL_IO_PORT; + port->iobase = io->min_base_address; + port->iotype = UPIO_PORT; } else printk(KERN_ERR "%s: zero-length IO port range?\n", __FUNCTION__); return AE_OK; } -static acpi_status acpi_serial_ext_irq(struct serial_struct *req, +static acpi_status acpi_serial_ext_irq(struct uart_port *port, struct acpi_resource_ext_irq *ext_irq) { if (ext_irq->number_of_interrupts > 0) - req->irq = acpi_register_gsi(ext_irq->interrupts[0], - ext_irq->edge_level, ext_irq->active_high_low); + port->irq = acpi_register_gsi(ext_irq->interrupts[0], + ext_irq->edge_level, ext_irq->active_high_low); return AE_OK; } -static acpi_status acpi_serial_irq(struct serial_struct *req, +static acpi_status acpi_serial_irq(struct uart_port *port, struct acpi_resource_irq *irq) { if (irq->number_of_interrupts > 0) - req->irq = acpi_register_gsi(irq->interrupts[0], - irq->edge_level, irq->active_high_low); + port->irq = acpi_register_gsi(irq->interrupts[0], + irq->edge_level, irq->active_high_low); return AE_OK; } static acpi_status acpi_serial_resource(struct acpi_resource *res, void *data) { - struct serial_struct *serial_req = (struct serial_struct *) data; + struct uart_port *port = (struct uart_port *) data; struct acpi_resource_address64 addr; acpi_status status; status = acpi_resource_to_address64(res, &addr); if (ACPI_SUCCESS(status)) - return acpi_serial_mmio(serial_req, &addr); + return acpi_serial_mmio(port, &addr); else if (res->id == ACPI_RSTYPE_IO) - return acpi_serial_port(serial_req, &res->data.io); + return acpi_serial_port(port, &res->data.io); else if (res->id == ACPI_RSTYPE_EXT_IRQ) - return acpi_serial_ext_irq(serial_req, &res->data.extended_irq); + return acpi_serial_ext_irq(port, &res->data.extended_irq); else if (res->id == ACPI_RSTYPE_IRQ) - return acpi_serial_irq(serial_req, &res->data.irq); + return acpi_serial_irq(port, &res->data.irq); return AE_OK; } @@ -94,10 +84,13 @@ { struct serial_private *priv; acpi_status status; - struct serial_struct serial_req; + struct uart_port port; int result; - memset(&serial_req, 0, sizeof(serial_req)); + memset(&port, 0, sizeof(struct uart_port)); + + port.uartclk = 1843200; + port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF; priv = kmalloc(sizeof(struct serial_private), GFP_KERNEL); if (!priv) { @@ -107,25 +100,20 @@ memset(priv, 0, sizeof(*priv)); status = acpi_walk_resources(device->handle, METHOD_NAME__CRS, - acpi_serial_resource, &serial_req); + acpi_serial_resource, &port); if (ACPI_FAILURE(status)) { result = -ENODEV; goto fail; } - if (serial_req.iomem_base) - priv->iomem_base = serial_req.iomem_base; - else if (!serial_req.port) { + if (!port.mapbase && !port.iobase) { printk(KERN_ERR "%s: no iomem or port address in %s _CRS\n", __FUNCTION__, device->pnp.bus_id); result = -ENODEV; goto fail; } - serial_req.baud_base = BASE_BAUD; - serial_req.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF; - - priv->line = register_serial(&serial_req); + priv->line = serial8250_register_port(&port); if (priv->line < 0) { printk(KERN_WARNING "Couldn't register serial port %s: %d\n", device->pnp.bus_id, priv->line); @@ -137,8 +125,6 @@ return 0; fail: - if (serial_req.iomem_base) - iounmap(serial_req.iomem_base); kfree(priv); return result; @@ -152,9 +138,7 @@ return -EINVAL; priv = acpi_driver_data(device); - unregister_serial(priv->line); - if (priv->iomem_base) - iounmap(priv->iomem_base); + serial8250_unregister_port(priv->line); kfree(priv); return 0; diff -Nru a/drivers/serial/8250_gsc.c b/drivers/serial/8250_gsc.c --- a/drivers/serial/8250_gsc.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/serial/8250_gsc.c 2004-11-10 17:19:05 -08:00 @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -22,37 +22,18 @@ #include #include #include -#include +#include /* for LASI_BASE_BAUD */ -static void setup_parisc_serial(struct serial_struct *serial, - unsigned long address, int irq, int line) -{ - memset(serial, 0, sizeof(struct serial_struct)); - - /* autoconfig() sets state->type. This sets info->type */ - serial->type = PORT_16550A; - - serial->line = line; - serial->iomap_base = address; - serial->iomem_base = ioremap(address, 0x8); - - serial->irq = irq; - serial->io_type = SERIAL_IO_MEM; /* define access method */ - serial->flags = 0; - serial->xmit_fifo_size = 16; - serial->custom_divisor = 0; - serial->baud_base = LASI_BASE_BAUD; -} +#include "8250.h" static int __init serial_init_chip(struct parisc_device *dev) { static int serial_line_nr; + struct uart_port port; unsigned long address; int err; - struct serial_struct *serial; - if (!dev->irq) { /* We find some unattached serial ports by walking native * busses. These should be silently ignored. Otherwise, @@ -66,21 +47,23 @@ return -ENODEV; } - serial = kmalloc(sizeof(*serial), GFP_KERNEL); - if (!serial) - return -ENOMEM; - address = dev->hpa; if (dev->id.sversion != 0x8d) { address += 0x800; } - setup_parisc_serial(serial, address, dev->irq, serial_line_nr++); - err = register_serial(serial); + memset(&port, 0, sizeof(struct uart_port)); + port.mapbase = address; + port.irq = dev->irq; + port.iotype = UPIO_MEM; + port.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; + port.uartclk = LASI_BASE_BAUD * 16; + port.dev = &dev->dev; + + err = serial8250_register_port(&port); if (err < 0) { - printk(KERN_WARNING "register_serial returned error %d\n", err); - kfree(serial); - return -ENODEV; + printk(KERN_WARNING "serial8250_register_port returned error %d\n", err); + return err; } return 0; diff -Nru a/drivers/serial/8250_hp300.c b/drivers/serial/8250_hp300.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/serial/8250_hp300.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,329 @@ +/* + * Driver for the 98626/98644/internal serial interface on hp300/hp400 + * (based on the National Semiconductor INS8250/NS16550AF/WD16C552 UARTs) + * + * Ported from 2.2 and modified to use the normal 8250 driver + * by Kars de Jong , May 2004. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(CONFIG_HPDCA) && !defined(CONFIG_HPAPCI) +#warning CONFIG_8250 defined but neither CONFIG_HPDCA nor CONFIG_HPAPCI defined, are you sure? +#endif + +#ifdef CONFIG_HPAPCI +struct hp300_port +{ + struct hp300_port *next; /* next port */ + int line; /* line (tty) number */ +}; + +static struct hp300_port *hp300_ports; +#endif + +#ifdef CONFIG_HPDCA + +static int __devinit hpdca_init_one(struct dio_dev *d, + const struct dio_device_id *ent); +static void __devexit hpdca_remove_one(struct dio_dev *d); + +static struct dio_device_id hpdca_dio_tbl[] = { + { DIO_ID_DCA0 }, + { DIO_ID_DCA0REM }, + { DIO_ID_DCA1 }, + { DIO_ID_DCA1REM }, + { 0 } +}; + +static struct dio_driver hpdca_driver = { + .name = "hpdca", + .id_table = hpdca_dio_tbl, + .probe = hpdca_init_one, + .remove = __devexit_p(hpdca_remove_one), +}; + +#endif + +extern int hp300_uart_scode; + +/* Offset to UART registers from base of DCA */ +#define UART_OFFSET 17 + +#define DCA_ID 0x01 /* ID (read), reset (write) */ +#define DCA_IC 0x03 /* Interrupt control */ + +/* Interrupt control */ +#define DCA_IC_IE 0x80 /* Master interrupt enable */ + +#define HPDCA_BAUD_BASE 153600 + +/* Base address of the Frodo part */ +#define FRODO_BASE (0x41c000) + +/* + * Where we find the 8250-like APCI ports, and how far apart they are. + */ +#define FRODO_APCIBASE 0x0 +#define FRODO_APCISPACE 0x20 +#define FRODO_APCI_OFFSET(x) (FRODO_APCIBASE + ((x) * FRODO_APCISPACE)) + +#define HPAPCI_BAUD_BASE 500400 + +#ifdef CONFIG_SERIAL_8250_CONSOLE +/* + * Parse the bootinfo to find descriptions for headless console and + * debug serial ports and register them with the 8250 driver. + * This function should be called before serial_console_init() is called + * to make sure the serial console will be available for use. IA-64 kernel + * calls this function from setup_arch() after the EFI and ACPI tables have + * been parsed. + */ +int __init hp300_setup_serial_console(void) +{ + int scode; + struct uart_port port; + + memset(&port, 0, sizeof(port)); + + if (hp300_uart_scode < 0 || hp300_uart_scode > DIO_SCMAX) + return 0; + + if (DIO_SCINHOLE(hp300_uart_scode)) + return 0; + + scode = hp300_uart_scode; + + /* Memory mapped I/O */ + port.iotype = UPIO_MEM; + port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF; + port.type = PORT_UNKNOWN; + + /* Check for APCI console */ + if (scode == 256) { +#ifdef CONFIG_HPAPCI + printk(KERN_INFO "Serial console is HP APCI 1\n"); + + port.uartclk = HPAPCI_BAUD_BASE * 16; + port.mapbase = (FRODO_BASE + FRODO_APCI_OFFSET(1)); + port.membase = (char *)(port.mapbase + DIO_VIRADDRBASE); + port.regshift = 2; + add_preferred_console("ttyS", port.line, "9600n8"); +#else + printk(KERN_WARNING "Serial console is APCI but support is disabled (CONFIG_HPAPCI)!\n"); + return 0; +#endif + } + else { +#ifdef CONFIG_HPDCA + unsigned long pa = dio_scodetophysaddr(scode); + if (!pa) { + return 0; + } + + printk(KERN_INFO "Serial console is HP DCA at select code %d\n", scode); + + port.uartclk = HPDCA_BAUD_BASE * 16; + port.mapbase = (pa + UART_OFFSET); + port.membase = (char *)(port.mapbase + DIO_VIRADDRBASE); + port.regshift = 1; + port.irq = DIO_IPL(pa + DIO_VIRADDRBASE); + + /* Enable board-interrupts */ + out_8(pa + DIO_VIRADDRBASE + DCA_IC, DCA_IC_IE); + + if (DIO_ID(pa + DIO_VIRADDRBASE) & 0x80) { + add_preferred_console("ttyS", port.line, "9600n8"); + } +#else + printk(KERN_WARNING "Serial console is DCA but support is disabled (CONFIG_HPDCA)!\n"); + return 0; +#endif + } + + if (early_serial_setup(&port) < 0) { + printk(KERN_WARNING "hp300_setup_serial_console(): early_serial_setup() failed.\n"); + } + + return 0; +} +#endif /* CONFIG_SERIAL_8250_CONSOLE */ + +#ifdef CONFIG_HPDCA +static int __devinit hpdca_init_one(struct dio_dev *d, + const struct dio_device_id *ent) +{ + struct serial_struct serial_req; + int line; + +#ifdef CONFIG_SERIAL_8250_CONSOLE + if (hp300_uart_scode == d->scode) { + /* Already got it. */ + return 0; + } +#endif + memset(&serial_req, 0, sizeof(struct serial_struct)); + + /* Memory mapped I/O */ + serial_req.io_type = SERIAL_IO_MEM; + serial_req.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF; + serial_req.irq = d->ipl; + serial_req.baud_base = HPDCA_BAUD_BASE; + serial_req.iomap_base = (d->resource.start + UART_OFFSET); + serial_req.iomem_base = (char *)(serial_req.iomap_base + DIO_VIRADDRBASE); + serial_req.iomem_reg_shift = 1; + line = register_serial(&serial_req); + + if (line < 0) { + printk(KERN_NOTICE "8250_hp300: register_serial() DCA scode %d" + " irq %d failed\n", d->scode, serial_req.irq); + return -ENOMEM; + } + + /* Enable board-interrupts */ + out_8(d->resource.start + DIO_VIRADDRBASE + DCA_IC, DCA_IC_IE); + dio_set_drvdata(d, (void *)line); + + /* Reset the DCA */ + out_8(d->resource.start + DIO_VIRADDRBASE + DCA_ID, 0xff); + udelay(100); + + return 0; +} +#endif + +static int __init hp300_8250_init(void) +{ + static int called = 0; + int num_ports; +#ifdef CONFIG_HPAPCI + int line; + unsigned long base; + struct serial_struct serial_req; + struct hp300_port *port; + int i; +#endif + if (called) + return -ENODEV; + called = 1; + + if (!MACH_IS_HP300) + return -ENODEV; + + num_ports = 0; + +#ifdef CONFIG_HPDCA + if (dio_module_init(&hpdca_driver) == 0) + num_ports++; +#endif +#ifdef CONFIG_HPAPCI + if (hp300_model < HP_400) { + if (!num_ports) + return -ENODEV; + return 0; + } + /* These models have the Frodo chip. + * Port 0 is reserved for the Apollo Domain keyboard. + * Port 1 is either the console or the DCA. + */ + for (i = 1; i < 4; i++) { + /* Port 1 is the console on a 425e, on other machines it's mapped to + * DCA. + */ +#ifdef CONFIG_SERIAL_8250_CONSOLE + if (i == 1) { + continue; + } +#endif + + /* Create new serial device */ + port = kmalloc(sizeof(struct hp300_port), GFP_KERNEL); + if (!port) + return -ENOMEM; + + memset(&serial_req, 0, sizeof(struct serial_struct)); + + base = (FRODO_BASE + FRODO_APCI_OFFSET(i)); + + /* Memory mapped I/O */ + serial_req.io_type = SERIAL_IO_MEM; + serial_req.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF; + /* XXX - no interrupt support yet */ + serial_req.irq = 0; + serial_req.baud_base = HPAPCI_BAUD_BASE; + serial_req.iomap_base = base; + serial_req.iomem_base = (char *)(serial_req.iomap_base + DIO_VIRADDRBASE); + serial_req.iomem_reg_shift = 2; + + line = register_serial(&serial_req); + + if (line < 0) { + printk(KERN_NOTICE "8250_hp300: register_serial() APCI %d" + " irq %d failed\n", i, serial_req.irq); + kfree(port); + continue; + } + + port->line = line; + port->next = hp300_ports; + hp300_ports = port; + + num_ports++; + } +#endif + + /* Any boards found? */ + if (!num_ports) + return -ENODEV; + + return 0; +} + +#ifdef CONFIG_HPDCA +static void __devexit hpdca_remove_one(struct dio_dev *d) +{ + int line; + + line = (int) dio_get_drvdata(d); + if (d->resource.start) { + /* Disable board-interrupts */ + out_8(d->resource.start + DIO_VIRADDRBASE + DCA_IC, 0); + } + unregister_serial(line); +} +#endif + +static void __exit hp300_8250_exit(void) +{ +#ifdef CONFIG_HPAPCI + struct hp300_port *port, *to_free; + + for (port = hp300_ports; port; ) { + unregister_serial(port->line); + to_free = port; + port = port->next; + kfree(to_free); + } + + hp300_ports = NULL; +#endif +#ifdef CONFIG_HPDCA + dio_unregister_driver(&hpdca_driver); +#endif +} + +module_init(hp300_8250_init); +module_exit(hp300_8250_exit); +MODULE_DESCRIPTION("HP DCA/APCI serial driver"); +MODULE_AUTHOR("Kars de Jong "); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c --- a/drivers/serial/8250_pci.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/serial/8250_pci.c 2004-11-10 17:19:06 -08:00 @@ -1026,6 +1026,7 @@ pbn_b1_bt_2_921600, + pbn_b1_1_1382400, pbn_b1_2_1382400, pbn_b1_4_1382400, pbn_b1_8_1382400, @@ -1253,6 +1254,12 @@ .uart_offset = 8, }, + [pbn_b1_1_1382400] = { + .flags = FL_BASE1, + .num_ports = 1, + .base_baud = 1382400, + .uart_offset = 8, + }, [pbn_b1_2_1382400] = { .flags = FL_BASE1, .num_ports = 2, @@ -1689,7 +1696,7 @@ struct uart_port serial_port; memset(&serial_port, 0, sizeof(struct uart_port)); - serial_port.flags = UPF_SKIP_TEST | UPF_AUTOPROBE | + serial_port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ; serial_port.uartclk = board->base_baud * 16; serial_port.irq = get_pci_irq(dev, board, i); @@ -2107,6 +2114,13 @@ { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_650, PCI_ANY_ID, PCI_ANY_ID, 0, 0, pbn_b0_bt_1_460800 }, + + /* + * Dell Remote Access Card III - Tim_T_Murphy@Dell.com + */ + { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RACIII, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, + pbn_b1_1_1382400 }, /* * RAStel 2 port modem, gerg@moreton.com.au diff -Nru a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c --- a/drivers/serial/8250_pnp.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/serial/8250_pnp.c 2004-11-10 17:19:02 -08:00 @@ -21,14 +21,10 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include "8250.h" @@ -49,7 +45,7 @@ /* Actiontec ISA PNP 56K X2 Fax Modem */ { "AEI1240", 0 }, /* Rockwell 56K ACF II Fax+Data+Voice Modem */ - { "AKY1021", SPCI_FL_NO_SHIRQ }, + { "AKY1021", 0 /*SPCI_FL_NO_SHIRQ*/ }, /* AZT3005 PnP SOUND DEVICE */ { "AZT4001", 0 }, /* Best Data Products Inc. Smart One 336F PnP Modem */ @@ -398,26 +394,29 @@ static int __devinit serial_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id) { - struct serial_struct serial_req; + struct uart_port port; int ret, line, flags = dev_id->driver_data; + if (flags & UNKNOWN_DEV) { ret = serial_pnp_guess_board(dev, &flags); if (ret < 0) return ret; } - memset(&serial_req, 0, sizeof(serial_req)); - serial_req.irq = pnp_irq(dev,0); - serial_req.port = pnp_port_start(dev, 0); - if (HIGH_BITS_OFFSET) - serial_req.port = pnp_port_start(dev, 0) >> HIGH_BITS_OFFSET; + + memset(&port, 0, sizeof(struct uart_port)); + port.irq = pnp_irq(dev,0); + port.iobase = pnp_port_start(dev, 0); + #ifdef SERIAL_DEBUG_PNP printk("Setup PNP port: port %x, irq %d, type %d\n", - serial_req.port, serial_req.irq, serial_req.io_type); + port.iobase, port.irq, port.iotype); #endif - serial_req.flags = UPF_SKIP_TEST | UPF_AUTOPROBE; - serial_req.baud_base = 115200; - line = register_serial(&serial_req); + port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF; + port.uartclk = 1843200; + port.dev = &dev->dev; + + line = serial8250_register_port(&port); if (line >= 0) pnp_set_drvdata(dev, (void *)(line + 1)); @@ -429,7 +428,7 @@ { int line = (int)pnp_get_drvdata(dev); if (line) - unregister_serial(line - 1); + serial8250_unregister_port(line - 1); } static struct pnp_driver serial_pnp_driver = { diff -Nru a/drivers/serial/Kconfig b/drivers/serial/Kconfig --- a/drivers/serial/Kconfig 2004-11-10 17:19:06 -08:00 +++ b/drivers/serial/Kconfig 2004-11-10 17:19:06 -08:00 @@ -386,6 +386,29 @@ your boot loader (lilo or loadlin) about how to pass options to the kernel at boot time.) +config SERIAL_IMX + bool "IMX serial port support" + depends on ARM && ARCH_IMX + select SERIAL_CORE + help + If you have a machine based on a Motorola IMX CPU you + can enable its onboard serial port by enabling this option. + +config SERIAL_IMX_CONSOLE + bool "Console on IMX serial port" + depends on SERIAL_IMX + select SERIAL_CORE_CONSOLE + help + If you have enabled the serial port on the Motorola IMX + CPU you can make it the console by answering Y to this option. + + Even if you say Y here, the currently visible virtual console + (/dev/tty0) will still be used as the system console by default, but + you can alter that using a kernel command line option such as + "console=ttySA0". (Try "man bootparam" or see the documentation of + your boot loader (lilo or loadlin) about how to pass options to the + kernel at boot time.) + config SERIAL_SUNCORE bool depends on SPARC32 || SPARC64 diff -Nru a/drivers/serial/Makefile b/drivers/serial/Makefile --- a/drivers/serial/Makefile 2004-11-10 17:19:04 -08:00 +++ b/drivers/serial/Makefile 2004-11-10 17:19:04 -08:00 @@ -9,6 +9,7 @@ serial-8250-$(CONFIG_GSC) += 8250_gsc.o serial-8250-$(CONFIG_PCI) += 8250_pci.o serial-8250-$(CONFIG_PNP) += 8250_pnp.o +serial-8250-$(CONFIG_HP300) += 8250_hp300.o obj-$(CONFIG_SERIAL_CORE) += serial_core.o obj-$(CONFIG_SERIAL_21285) += 21285.o @@ -40,5 +41,7 @@ obj-$(CONFIG_SERIAL_BAST_SIO) += bast_sio.o obj-$(CONFIG_SERIAL_SGI_L1_CONSOLE) += sn_console.o obj-$(CONFIG_SERIAL_CPM) += cpm_uart/ +obj-$(CONFIG_SERIAL_IMX) += imx.o obj-$(CONFIG_SERIAL_MPC52xx) += mpc52xx_uart.o +obj-$(CONFIG_SERIAL_ICOM) += icom.o obj-$(CONFIG_SERIAL_M32R_SIO) += m32r_sio.o diff -Nru a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c --- a/drivers/serial/amba-pl011.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/serial/amba-pl011.c 2004-11-10 17:19:07 -08:00 @@ -745,7 +745,7 @@ static int pl011_probe(struct amba_device *dev, void *id) { struct uart_amba_port *uap; - void *base; + void __iomem *base; int i, ret; for (i = 0; i < ARRAY_SIZE(amba_ports); i++) diff -Nru a/drivers/serial/au1x00_uart.c b/drivers/serial/au1x00_uart.c --- a/drivers/serial/au1x00_uart.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/serial/au1x00_uart.c 2004-11-10 17:19:02 -08:00 @@ -1313,20 +1313,6 @@ uart_unregister_port(&serial8250_reg, line); } -/* - * This is for ISAPNP only. - */ -void serial8250_get_irq_map(unsigned int *map) -{ - int i; - - for (i = 0; i < UART_NR; i++) { - if (serial8250_ports[i].port.type != PORT_UNKNOWN && - serial8250_ports[i].port.irq < 16) - *map |= 1 << serial8250_ports[i].port.irq; - } -} - /** * serial8250_suspend_port - suspend one serial port * @line: serial line number @@ -1382,7 +1368,6 @@ EXPORT_SYMBOL(register_serial); EXPORT_SYMBOL(unregister_serial); -EXPORT_SYMBOL(serial8250_get_irq_map); EXPORT_SYMBOL(serial8250_suspend_port); EXPORT_SYMBOL(serial8250_resume_port); diff -Nru a/drivers/serial/cpm_uart/cpm_uart.h b/drivers/serial/cpm_uart/cpm_uart.h --- a/drivers/serial/cpm_uart/cpm_uart.h 2004-11-10 17:19:06 -08:00 +++ b/drivers/serial/cpm_uart/cpm_uart.h 2004-11-10 17:19:06 -08:00 @@ -70,6 +70,8 @@ /* helpers */ int baud; int bits; + /* Keep track of 'odd' SMC2 wirings */ + int is_portb; }; extern int cpm_uart_port_map[UART_NR]; diff -Nru a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c --- a/drivers/serial/cpm_uart/cpm_uart_core.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/serial/cpm_uart/cpm_uart_core.c 2004-11-10 17:19:06 -08:00 @@ -743,6 +743,18 @@ pinfo->smcup->smc_rbase = (u_char *)pinfo->rx_bd_base - DPRAM_BASE; pinfo->smcup->smc_tbase = (u_char *)pinfo->tx_bd_base - DPRAM_BASE; +/* + * In case SMC1 is being relocated... + */ +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) + up->smc_rbptr = pinfo->smcup->smc_rbase; + up->smc_tbptr = pinfo->smcup->smc_tbase; + up->smc_rstate = 0; + up->smc_tstate = 0; + up->smc_brkcr = 1; /* number of break chars */ + up->smc_brkec = 0; +#endif + /* Set up the uart parameters in the * parameter ram. */ @@ -872,6 +884,9 @@ .rx_nrfifos = RX_NUM_FIFO, .rx_fifosize = RX_BUF_SIZE, .set_lineif = smc2_lineif, +#ifdef CONFIG_SERIAL_CPM_ALT_SMC2 + .is_portb = 1, +#endif }, [UART_SCC1] = { .port = { diff -Nru a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c 2004-11-10 17:19:04 -08:00 @@ -82,10 +82,17 @@ void smc1_lineif(struct uart_cpm_port *pinfo) { volatile cpm8xx_t *cp = cpmp; + unsigned int iobits = 0x000000c0; - cp->cp_pbpar |= 0x000000c0; - cp->cp_pbdir &= ~0x000000c0; - cp->cp_pbodr &= ~0x000000c0; + if (!pinfo->is_portb) { + cp->cp_pbpar |= iobits; + cp->cp_pbdir &= ~iobits; + cp->cp_pbodr &= ~iobits; + } else { + ((immap_t *)IMAP_ADDR)->im_ioport.iop_papar |= iobits; + ((immap_t *)IMAP_ADDR)->im_ioport.iop_padir &= ~iobits; + ((immap_t *)IMAP_ADDR)->im_ioport.iop_paodr &= ~iobits; + } pinfo->brg = 1; } @@ -194,8 +201,16 @@ cpm_uart_nr = 0; #ifdef CONFIG_SERIAL_CPM_SMC1 cpm_uart_ports[UART_SMC1].smcp = &cpmp->cp_smc[0]; +/* + * Is SMC1 being relocated? + */ +# ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH + cpm_uart_ports[UART_SMC1].smcup = + (smc_uart_t *) & cpmp->cp_dparam[0x3C0]; +# else cpm_uart_ports[UART_SMC1].smcup = (smc_uart_t *) & cpmp->cp_dparam[PROFF_SMC1]; +# endif cpm_uart_ports[UART_SMC1].port.mapbase = (unsigned long)&cpmp->cp_smc[0]; cpm_uart_ports[UART_SMC1].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); diff -Nru a/drivers/serial/icom.c b/drivers/serial/icom.c --- a/drivers/serial/icom.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/serial/icom.c 2004-11-10 17:19:03 -08:00 @@ -140,12 +140,6 @@ static inline void trace(struct icom_port *icom_port, char *trace_pt, unsigned long trace_data) {}; #endif -static void msleep(unsigned long msecs) -{ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(MSECS_TO_JIFFIES(msecs)); -} - static void free_port_memory(struct icom_port *icom_port) { struct pci_dev *dev = icom_port->adapter->pci_dev; diff -Nru a/drivers/serial/imx.c b/drivers/serial/imx.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/serial/imx.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,905 @@ +/* + * linux/drivers/serial/imx.c + * + * Driver for Motorola IMX serial ports + * + * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o. + * + * Author: Sascha Hauer + * Copyright (C) 2004 Pengutronix + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#if defined(CONFIG_SERIAL_IMX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) +#define SUPPORT_SYSRQ +#endif + +#include + +/* We've been assigned a range on the "Low-density serial ports" major */ +#define SERIAL_IMX_MAJOR 204 +#define MINOR_START 41 + +#define NR_PORTS 2 + +#define IMX_ISR_PASS_LIMIT 256 + +/* + * This is the size of our serial port register set. + */ +#define UART_PORT_SIZE 0x100 + +/* + * This determines how often we check the modem status signals + * for any change. They generally aren't connected to an IRQ + * so we have to poll them. We also check immediately before + * filling the TX fifo incase CTS has been dropped. + */ +#define MCTRL_TIMEOUT (250*HZ/1000) + +#define DRIVER_NAME "IMX-uart" + +struct imx_port { + struct uart_port port; + struct timer_list timer; + unsigned int old_status; + int txirq,rxirq; +}; + +/* + * Handle any change of modem status signal since we were last called. + */ +static void imx_mctrl_check(struct imx_port *sport) +{ + unsigned int status, changed; + + status = sport->port.ops->get_mctrl(&sport->port); + changed = status ^ sport->old_status; + + if (changed == 0) + return; + + sport->old_status = status; + + if (changed & TIOCM_RI) + sport->port.icount.rng++; + if (changed & TIOCM_DSR) + sport->port.icount.dsr++; + if (changed & TIOCM_CAR) + uart_handle_dcd_change(&sport->port, status & TIOCM_CAR); + if (changed & TIOCM_CTS) + uart_handle_cts_change(&sport->port, status & TIOCM_CTS); + + wake_up_interruptible(&sport->port.info->delta_msr_wait); +} + +/* + * This is our per-port timeout handler, for checking the + * modem status signals. + */ +static void imx_timeout(unsigned long data) +{ + struct imx_port *sport = (struct imx_port *)data; + unsigned long flags; + + if (sport->port.info) { + spin_lock_irqsave(&sport->port.lock, flags); + imx_mctrl_check(sport); + spin_unlock_irqrestore(&sport->port.lock, flags); + + mod_timer(&sport->timer, jiffies + MCTRL_TIMEOUT); + } +} + +/* + * interrupts disabled on entry + */ +static void imx_stop_tx(struct uart_port *port, unsigned int tty_stop) +{ + struct imx_port *sport = (struct imx_port *)port; + UCR1((u32)sport->port.membase) &= ~UCR1_TXMPTYEN; +} + +/* + * interrupts disabled on entry + */ +static void imx_stop_rx(struct uart_port *port) +{ + struct imx_port *sport = (struct imx_port *)port; + UCR2((u32)sport->port.membase) &= ~UCR2_RXEN; +} + +/* + * Set the modem control timer to fire immediately. + */ +static void imx_enable_ms(struct uart_port *port) +{ + struct imx_port *sport = (struct imx_port *)port; + + mod_timer(&sport->timer, jiffies); +} + +static inline void imx_transmit_buffer(struct imx_port *sport) +{ + struct circ_buf *xmit = &sport->port.info->xmit; + + do { + /* send xmit->buf[xmit->tail] + * out the port here */ + URTX0((u32)sport->port.membase) = xmit->buf[xmit->tail]; + xmit->tail = (xmit->tail + 1) & + (UART_XMIT_SIZE - 1); + sport->port.icount.tx++; + if (uart_circ_empty(xmit)) + break; + } while (!(UTS((u32)sport->port.membase) & UTS_TXFULL)); + + if (uart_circ_empty(xmit)) + imx_stop_tx(&sport->port, 0); +} + +/* + * interrupts disabled on entry + */ +static void imx_start_tx(struct uart_port *port, unsigned int tty_start) +{ + struct imx_port *sport = (struct imx_port *)port; + + UCR1((u32)sport->port.membase) |= UCR1_TXMPTYEN; + + if(UTS((u32)sport->port.membase) & UTS_TXEMPTY) + imx_transmit_buffer(sport); +} + +static irqreturn_t imx_txint(int irq, void *dev_id, struct pt_regs *regs) +{ + struct imx_port *sport = (struct imx_port *)dev_id; + struct circ_buf *xmit = &sport->port.info->xmit; + unsigned long flags; + + spin_lock_irqsave(&sport->port.lock,flags); + if (sport->port.x_char) + { + /* Send next char */ + URTX0((u32)sport->port.membase) = sport->port.x_char; + goto out; + } + + if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { + imx_stop_tx(&sport->port, 0); + goto out; + } + + imx_transmit_buffer(sport); + + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) + uart_write_wakeup(&sport->port); + +out: + spin_unlock_irqrestore(&sport->port.lock,flags); + return IRQ_HANDLED; +} + +static irqreturn_t imx_rxint(int irq, void *dev_id, struct pt_regs *regs) +{ + struct imx_port *sport = dev_id; + unsigned int rx,flg,ignored = 0; + struct tty_struct *tty = sport->port.info->tty; + unsigned long flags; + + rx = URXD0((u32)sport->port.membase); + spin_lock_irqsave(&sport->port.lock,flags); + + do { + flg = TTY_NORMAL; + sport->port.icount.rx++; + + if( USR2((u32)sport->port.membase) & USR2_BRCD ) { + USR2((u32)sport->port.membase) |= USR2_BRCD; + if(uart_handle_break(&sport->port)) + goto ignore_char; + } + + if (uart_handle_sysrq_char + (&sport->port, (unsigned char)rx, regs)) + goto ignore_char; + + if( rx & (URXD_PRERR | URXD_OVRRUN | URXD_FRMERR) ) + goto handle_error; + + error_return: + *tty->flip.flag_buf_ptr++ = flg; + *tty->flip.char_buf_ptr++ = (unsigned char)rx; + tty->flip.count++; + + if (tty->flip.count >= TTY_FLIPBUF_SIZE) + goto out; + + ignore_char: + rx = URXD0((u32)sport->port.membase); + } while(rx & URXD_CHARRDY); + +out: + spin_unlock_irqrestore(&sport->port.lock,flags); + tty_flip_buffer_push(tty); + return IRQ_HANDLED; + +handle_error: + if (rx & URXD_PRERR) + sport->port.icount.parity++; + else if (rx & URXD_FRMERR) + sport->port.icount.frame++; + if (rx & URXD_OVRRUN) + sport->port.icount.overrun++; + + if (rx & sport->port.ignore_status_mask) { + if (++ignored > 100) + goto out; + goto ignore_char; + } + + rx &= sport->port.read_status_mask; + + if (rx & URXD_PRERR) + flg = TTY_PARITY; + else if (rx & URXD_FRMERR) + flg = TTY_FRAME; + if (rx & URXD_OVRRUN) + flg = TTY_OVERRUN; + +#ifdef SUPPORT_SYSRQ + sport->port.sysrq = 0; +#endif + goto error_return; +} + +/* + * Return TIOCSER_TEMT when transmitter is not busy. + */ +static unsigned int imx_tx_empty(struct uart_port *port) +{ + struct imx_port *sport = (struct imx_port *)port; + + return USR2((u32)sport->port.membase) & USR2_TXDC ? TIOCSER_TEMT : 0; +} + +static unsigned int imx_get_mctrl(struct uart_port *port) +{ + return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; +} + +static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl) +{ +} + +/* + * Interrupts always disabled. + */ +static void imx_break_ctl(struct uart_port *port, int break_state) +{ + struct imx_port *sport = (struct imx_port *)port; + unsigned long flags; + + spin_lock_irqsave(&sport->port.lock, flags); + + if ( break_state != 0 ) + UCR1((u32)sport->port.membase) |= UCR1_SNDBRK; + else + UCR1((u32)sport->port.membase) &= ~UCR1_SNDBRK; + + spin_unlock_irqrestore(&sport->port.lock, flags); +} + +#define TXTL 2 /* reset default */ +#define RXTL 1 /* reset default */ + +static int imx_startup(struct uart_port *port) +{ + struct imx_port *sport = (struct imx_port *)port; + int retval; + unsigned int val; + unsigned long flags; + + /* set receiver / transmitter trigger level. We assume + * that RFDIV has been set by the arch setup or by the bootloader. + */ + val = (UFCR((u32)sport->port.membase) & UFCR_RFDIV) | TXTL<<10 | RXTL; + UFCR((u32)sport->port.membase) = val; + + /* disable the DREN bit (Data Ready interrupt enable) before + * requesting IRQs + */ + UCR4((u32)sport->port.membase) &= ~UCR4_DREN; + + /* + * Allocate the IRQ + */ + retval = request_irq(sport->rxirq, imx_rxint, 0, + DRIVER_NAME, sport); + if (retval) goto error_out2; + + retval = request_irq(sport->txirq, imx_txint, 0, + "imx-uart", sport); + if (retval) goto error_out1; + + /* + * Finally, clear and enable interrupts + */ + + UCR1((u32)sport->port.membase) |= + (UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_UARTEN); + + UCR2((u32)sport->port.membase) |= (UCR2_RXEN | UCR2_TXEN); + /* + * Enable modem status interrupts + */ + spin_lock_irqsave(&sport->port.lock,flags); + imx_enable_ms(&sport->port); + spin_unlock_irqrestore(&sport->port.lock,flags); + + return 0; + +error_out1: + free_irq(sport->rxirq, sport); +error_out2: + free_irq(sport->txirq, sport); + return retval; +} + +static void imx_shutdown(struct uart_port *port) +{ + struct imx_port *sport = (struct imx_port *)port; + + /* + * Stop our timer. + */ + del_timer_sync(&sport->timer); + + /* + * Free the interrupts + */ + free_irq(sport->txirq, sport); + free_irq(sport->rxirq, sport); + + /* + * Disable all interrupts, port and break condition. + */ + + UCR1((u32)sport->port.membase) &= + ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_UARTEN); +} + +static void +imx_set_termios(struct uart_port *port, struct termios *termios, + struct termios *old) +{ + struct imx_port *sport = (struct imx_port *)port; + unsigned long flags; + unsigned int ucr2, old_ucr1, old_txrxen, baud, quot; + unsigned int old_csize = old ? old->c_cflag & CSIZE : CS8; + + /* + * If we don't support modem control lines, don't allow + * these to be set. + */ + if (0) { + termios->c_cflag &= ~(HUPCL | CRTSCTS | CMSPAR); + termios->c_cflag |= CLOCAL; + } + + /* + * We only support CS7 and CS8. + */ + while ((termios->c_cflag & CSIZE) != CS7 && + (termios->c_cflag & CSIZE) != CS8) { + termios->c_cflag &= ~CSIZE; + termios->c_cflag |= old_csize; + old_csize = CS8; + } + + if ((termios->c_cflag & CSIZE) == CS8) + ucr2 = UCR2_WS | UCR2_SRST | UCR2_IRTS; + else + ucr2 = UCR2_SRST | UCR2_IRTS; + + if (termios->c_cflag & CSTOPB) + ucr2 |= UCR2_STPB; + if (termios->c_cflag & PARENB) { + ucr2 |= UCR2_PREN; + if (!(termios->c_cflag & PARODD)) + ucr2 |= UCR2_PROE; + } + + /* + * Ask the core to calculate the divisor for us. + */ + baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); + quot = uart_get_divisor(port, baud); + + spin_lock_irqsave(&sport->port.lock, flags); + + sport->port.read_status_mask = 0; + if (termios->c_iflag & INPCK) + sport->port.read_status_mask |= (URXD_FRMERR | URXD_PRERR); + if (termios->c_iflag & (BRKINT | PARMRK)) + sport->port.read_status_mask |= URXD_BRK; + + /* + * Characters to ignore + */ + sport->port.ignore_status_mask = 0; + if (termios->c_iflag & IGNPAR) + sport->port.ignore_status_mask |= URXD_PRERR; + if (termios->c_iflag & IGNBRK) { + sport->port.ignore_status_mask |= URXD_BRK; + /* + * If we're ignoring parity and break indicators, + * ignore overruns too (for real raw support). + */ + if (termios->c_iflag & IGNPAR) + sport->port.ignore_status_mask |= URXD_OVRRUN; + } + + del_timer_sync(&sport->timer); + + /* + * Update the per-port timeout. + */ + uart_update_timeout(port, termios->c_cflag, baud); + + /* + * disable interrupts and drain transmitter + */ + old_ucr1 = UCR1((u32)sport->port.membase); + UCR1((u32)sport->port.membase) &= ~(UCR1_TXMPTYEN | UCR1_RRDYEN); + + while ( !(USR2((u32)sport->port.membase) & USR2_TXDC)) + barrier(); + + /* then, disable everything */ + old_txrxen = UCR2((u32)sport->port.membase) & ( UCR2_TXEN | UCR2_RXEN ); + UCR2((u32)sport->port.membase) &= ~( UCR2_TXEN | UCR2_RXEN); + + /* set the parity, stop bits and data size */ + UCR2((u32)sport->port.membase) = ucr2; + + /* set the baud rate. We assume uartclk = 16 MHz + * + * baud * 16 UBIR - 1 + * --------- = -------- + * uartclk UBMR - 1 + */ + UBIR((u32)sport->port.membase) = (baud / 100) - 1; + UBMR((u32)sport->port.membase) = 10000 - 1; + + UCR1((u32)sport->port.membase) = old_ucr1; + UCR2((u32)sport->port.membase) |= old_txrxen; + + if (UART_ENABLE_MS(&sport->port, termios->c_cflag)) + imx_enable_ms(&sport->port); + + spin_unlock_irqrestore(&sport->port.lock, flags); +} + +static const char *imx_type(struct uart_port *port) +{ + struct imx_port *sport = (struct imx_port *)port; + + return sport->port.type == PORT_IMX ? "IMX" : NULL; +} + +/* + * Release the memory region(s) being used by 'port'. + */ +static void imx_release_port(struct uart_port *port) +{ + struct imx_port *sport = (struct imx_port *)port; + + release_mem_region(sport->port.mapbase, UART_PORT_SIZE); +} + +/* + * Request the memory region(s) being used by 'port'. + */ +static int imx_request_port(struct uart_port *port) +{ + struct imx_port *sport = (struct imx_port *)port; + + return request_mem_region(sport->port.mapbase, UART_PORT_SIZE, + "imx-uart") != NULL ? 0 : -EBUSY; +} + +/* + * Configure/autoconfigure the port. + */ +static void imx_config_port(struct uart_port *port, int flags) +{ + struct imx_port *sport = (struct imx_port *)port; + + if (flags & UART_CONFIG_TYPE && + imx_request_port(&sport->port) == 0) + sport->port.type = PORT_IMX; +} + +/* + * Verify the new serial_struct (for TIOCSSERIAL). + * The only change we allow are to the flags and type, and + * even then only between PORT_IMX and PORT_UNKNOWN + */ +static int +imx_verify_port(struct uart_port *port, struct serial_struct *ser) +{ + struct imx_port *sport = (struct imx_port *)port; + int ret = 0; + + if (ser->type != PORT_UNKNOWN && ser->type != PORT_IMX) + ret = -EINVAL; + if (sport->port.irq != ser->irq) + ret = -EINVAL; + if (ser->io_type != UPIO_MEM) + ret = -EINVAL; + if (sport->port.uartclk / 16 != ser->baud_base) + ret = -EINVAL; + if ((void *)sport->port.mapbase != ser->iomem_base) + ret = -EINVAL; + if (sport->port.iobase != ser->port) + ret = -EINVAL; + if (ser->hub6 != 0) + ret = -EINVAL; + return ret; +} + +static struct uart_ops imx_pops = { + .tx_empty = imx_tx_empty, + .set_mctrl = imx_set_mctrl, + .get_mctrl = imx_get_mctrl, + .stop_tx = imx_stop_tx, + .start_tx = imx_start_tx, + .stop_rx = imx_stop_rx, + .enable_ms = imx_enable_ms, + .break_ctl = imx_break_ctl, + .startup = imx_startup, + .shutdown = imx_shutdown, + .set_termios = imx_set_termios, + .type = imx_type, + .release_port = imx_release_port, + .request_port = imx_request_port, + .config_port = imx_config_port, + .verify_port = imx_verify_port, +}; + +static struct imx_port imx_ports[] = { + { + .txirq = UART1_MINT_TX, + .rxirq = UART1_MINT_RX, + .port = { + .type = PORT_IMX, + .iotype = SERIAL_IO_MEM, + .membase = (void *)IMX_UART1_BASE, + .mapbase = IMX_UART1_BASE, /* FIXME */ + .irq = UART1_MINT_RX, + .uartclk = 16000000, + .fifosize = 8, + .flags = ASYNC_BOOT_AUTOCONF, + .ops = &imx_pops, + .line = 0, + }, + }, { + .txirq = UART2_MINT_TX, + .rxirq = UART2_MINT_RX, + .port = { + .type = PORT_IMX, + .iotype = SERIAL_IO_MEM, + .membase = (void *)IMX_UART2_BASE, + .mapbase = IMX_UART2_BASE, /* FIXME */ + .irq = UART2_MINT_RX, + .uartclk = 16000000, + .fifosize = 8, + .flags = ASYNC_BOOT_AUTOCONF, + .ops = &imx_pops, + .line = 1, + }, + } +}; + +/* + * Setup the IMX serial ports. + * Note also that we support "console=ttySMXx" where "x" is either 0 or 1. + * Which serial port this ends up being depends on the machine you're + * running this kernel on. I'm not convinced that this is a good idea, + * but that's the way it traditionally works. + * + */ +static void __init imx_init_ports(void) +{ + static int first = 1; + int i; + + if (!first) + return; + first = 0; + + for (i = 0; i < ARRAY_SIZE(imx_ports); i++) { + init_timer(&imx_ports[i].timer); + imx_ports[i].timer.function = imx_timeout; + imx_ports[i].timer.data = (unsigned long)&imx_ports[i]; + } + + imx_gpio_mode(PC9_PF_UART1_CTS); + imx_gpio_mode(PC10_PF_UART1_RTS); + imx_gpio_mode(PC11_PF_UART1_TXD); + imx_gpio_mode(PC12_PF_UART1_RXD); + imx_gpio_mode(PB28_PF_UART2_CTS); + imx_gpio_mode(PB29_PF_UART2_RTS); + + imx_gpio_mode(PB30_PF_UART2_TXD); + imx_gpio_mode(PB31_PF_UART2_RXD); + +#if 0 /* We don't need these, on the mx1 the _modem_ side of the uart + * is implemented. + */ + imx_gpio_mode(PD7_AF_UART2_DTR); + imx_gpio_mode(PD8_AF_UART2_DCD); + imx_gpio_mode(PD9_AF_UART2_RI); + imx_gpio_mode(PD10_AF_UART2_DSR); +#endif + + +} + +#ifdef CONFIG_SERIAL_IMX_CONSOLE + +/* + * Interrupts are disabled on entering + */ +static void +imx_console_write(struct console *co, const char *s, unsigned int count) +{ + struct imx_port *sport = &imx_ports[co->index]; + unsigned int old_ucr1, old_ucr2, i; + + /* + * First, save UCR1/2 and then disable interrupts + */ + old_ucr1 = UCR1((u32)sport->port.membase); + old_ucr2 = UCR2((u32)sport->port.membase); + + UCR1((u32)sport->port.membase) = + (old_ucr1 | UCR1_UARTCLKEN | UCR1_UARTEN) + & ~(UCR1_TXMPTYEN | UCR1_RRDYEN); + UCR2((u32)sport->port.membase) = old_ucr2 | UCR2_TXEN; + + /* + * Now, do each character + */ + for (i = 0; i < count; i++) { + + while ((UTS((u32)sport->port.membase) & UTS_TXFULL)) + barrier(); + + URTX0((u32)sport->port.membase) = s[i]; + + if (s[i] == '\n') { + while ((UTS((u32)sport->port.membase) & UTS_TXFULL)) + barrier(); + URTX0((u32)sport->port.membase) = '\r'; + } + } + + /* + * Finally, wait for transmitter to become empty + * and restore UCR1/2 + */ + while (!(USR2((u32)sport->port.membase) & USR2_TXDC)); + + UCR1((u32)sport->port.membase) = old_ucr1; + UCR2((u32)sport->port.membase) = old_ucr2; +} + +/* + * If the port was already initialised (eg, by a boot loader), + * try to determine the current setup. + */ +static void __init +imx_console_get_options(struct imx_port *sport, int *baud, + int *parity, int *bits) +{ + if ( UCR1((u32)sport->port.membase) | UCR1_UARTEN ) { + /* ok, the port was enabled */ + unsigned int ucr2, ubir,ubmr, uartclk; + + ucr2 = UCR2((u32)sport->port.membase); + + *parity = 'n'; + if (ucr2 & UCR2_PREN) { + if (ucr2 & UCR2_PROE) + *parity = 'o'; + else + *parity = 'e'; + } + + if (ucr2 & UCR2_WS) + *bits = 8; + else + *bits = 7; + + ubir = UBIR((u32)sport->port.membase) & 0xffff; + ubmr = UBMR((u32)sport->port.membase) & 0xffff; + uartclk = sport->port.uartclk; + + *baud = ((uartclk/16) * (ubir + 1)) / (ubmr + 1); + } +} + +static int __init +imx_console_setup(struct console *co, char *options) +{ + struct imx_port *sport; + int baud = 9600; + int bits = 8; + int parity = 'n'; + int flow = 'n'; + + /* + * Check whether an invalid uart number has been specified, and + * if so, search for the first available port that does have + * console support. + */ + if (co->index == -1 || co->index >= ARRAY_SIZE(imx_ports)) + co->index = 0; + sport = &imx_ports[co->index]; + + if (options) + uart_parse_options(options, &baud, &parity, &bits, &flow); + else + imx_console_get_options(sport, &baud, &parity, &bits); + + return uart_set_options(&sport->port, co, baud, parity, bits, flow); +} + +extern struct uart_driver imx_reg; +static struct console imx_console = { + .name = "ttySMX", + .write = imx_console_write, + .device = uart_console_device, + .setup = imx_console_setup, + .flags = CON_PRINTBUFFER, + .index = -1, + .data = &imx_reg, +}; + +static int __init imx_rs_console_init(void) +{ + imx_init_ports(); + register_console(&imx_console); + return 0; +} +console_initcall(imx_rs_console_init); + +#define IMX_CONSOLE &imx_console +#else +#define IMX_CONSOLE NULL +#endif + +static struct uart_driver imx_reg = { + .owner = THIS_MODULE, + .driver_name = DRIVER_NAME, + .dev_name = "ttySMX", + .devfs_name = "ttsmx/", + .major = SERIAL_IMX_MAJOR, + .minor = MINOR_START, + .nr = ARRAY_SIZE(imx_ports), + .cons = IMX_CONSOLE, +}; + +static int serial_imx_suspend(struct device *_dev, u32 state, u32 level) +{ + struct imx_port *sport = dev_get_drvdata(_dev); + + if (sport && level == SUSPEND_DISABLE) + uart_suspend_port(&imx_reg, &sport->port); + + return 0; +} + +static int serial_imx_resume(struct device *_dev, u32 level) +{ + struct imx_port *sport = dev_get_drvdata(_dev); + + if (sport && level == RESUME_ENABLE) + uart_resume_port(&imx_reg, &sport->port); + + return 0; +} + +static int serial_imx_probe(struct device *_dev) +{ + struct platform_device *dev = to_platform_device(_dev); + + imx_ports[dev->id].port.dev = _dev; + uart_add_one_port(&imx_reg, &imx_ports[dev->id].port); + dev_set_drvdata(_dev, &imx_ports[dev->id]); + return 0; +} + +static int serial_imx_remove(struct device *_dev) +{ + struct imx_port *sport = dev_get_drvdata(_dev); + + dev_set_drvdata(_dev, NULL); + + if (sport) + uart_remove_one_port(&imx_reg, &sport->port); + + return 0; +} + +static struct device_driver serial_imx_driver = { + .name = "imx-uart", + .bus = &platform_bus_type, + .probe = serial_imx_probe, + .remove = serial_imx_remove, + + .suspend = serial_imx_suspend, + .resume = serial_imx_resume, +}; + +static int __init imx_serial_init(void) +{ + int ret; + + printk(KERN_INFO "Serial: IMX driver\n"); + + imx_init_ports(); + + ret = uart_register_driver(&imx_reg); + if (ret) + return ret; + + ret = driver_register(&serial_imx_driver); + if (ret != 0) + uart_unregister_driver(&imx_reg); + + return 0; +} + +static void __exit imx_serial_exit(void) +{ + uart_unregister_driver(&imx_reg); +} + +module_init(imx_serial_init); +module_exit(imx_serial_exit); + +MODULE_AUTHOR("Sascha Hauer"); +MODULE_DESCRIPTION("IMX generic serial port driver"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c --- a/drivers/serial/mcfserial.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/serial/mcfserial.c 2004-11-10 17:19:04 -08:00 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -978,7 +979,7 @@ if (!info->addr) return; - current->state = TASK_INTERRUPTIBLE; + set_current_state(TASK_INTERRUPTIBLE); uartp = info->addr; local_irq_save(flags); @@ -1230,8 +1231,7 @@ #endif if (info->blocked_open) { if (info->close_delay) { - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(info->close_delay); + msleep_interruptible(jiffies_to_msecs(info->close_delay)); } wake_up_interruptible(&info->open_wait); } @@ -1296,8 +1296,7 @@ fifo_cnt++; if (fifo_cnt == 0) break; - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(char_time); + msleep_interruptible(jiffies_to_msecs(char_time)); if (signal_pending(current)) break; if (timeout && time_after(jiffies, orig_jiffies + timeout)) diff -Nru a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c --- a/drivers/serial/pmac_zilog.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/serial/pmac_zilog.c 2004-11-10 17:19:02 -08:00 @@ -29,6 +29,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * + * 2004-08-06 Harald Welte + * - Enable BREAK interrupt + * - Add support for sysreq + * * TODO: - Add DMA support * - Defer port shutdown to a few seconds after close * - maybe put something right into uap->clk_divisor @@ -36,6 +40,7 @@ #undef DEBUG #undef DEBUG_HARD +#undef USE_CTRL_O_SYSRQ #include #include @@ -54,6 +59,7 @@ #include #include #include +#include #include #include #include @@ -64,6 +70,10 @@ #include #include +#if defined (CONFIG_SERIAL_PMACZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) +#define SUPPORT_SYSRQ +#endif + #include #include @@ -259,8 +269,27 @@ } ch &= uap->parity_mask; - if (ch == 0 && uap->prev_status & BRK_ABRT) - r1 |= BRK_ABRT; + if (ch == 0 && uap->flags & PMACZILOG_FLAG_BREAK) { + uap->flags &= ~PMACZILOG_FLAG_BREAK; + } + +#ifdef CONFIG_MAGIC_SYSRQ +#ifdef USE_CTRL_O_SYSRQ + /* Handle the SysRq ^O Hack */ + if (ch == '\x0f') { + uap->port.sysrq = jiffies + HZ*5; + goto next_char; + } +#endif /* USE_CTRL_O_SYSRQ */ + if (uap->port.sysrq) { + int swallow; + spin_unlock(&uap->port.lock); + swallow = uart_handle_sysrq_char(&uap->port, ch, regs); + spin_lock(&uap->port.lock); + if (swallow) + goto next_char; + } +#endif /* CONFIG_MAGIC_SYSRQ */ /* A real serial line, record the character and status. */ if (drop) @@ -276,10 +305,8 @@ pmz_debug("pmz: got break !\n"); r1 &= ~(PAR_ERR | CRC_ERR); uap->port.icount.brk++; - if (uart_handle_break(&uap->port)) { - pmz_debug("pmz: do handle break !\n"); + if (uart_handle_break(&uap->port)) goto next_char; - } } else if (r1 & PAR_ERR) uap->port.icount.parity++; @@ -295,10 +322,6 @@ else if (r1 & CRC_ERR) *tty->flip.flag_buf_ptr = TTY_FRAME; } - if (uart_handle_sysrq_char(&uap->port, ch, regs)) { - pmz_debug("pmz: sysrq swallowed the char\n"); - goto next_char; - } if (uap->port.ignore_status_mask == 0xff || (r1 & uap->port.ignore_status_mask) == 0) { @@ -364,6 +387,9 @@ wake_up_interruptible(&uap->port.info->delta_msr_wait); } + if (status & BRK_ABRT) + uap->flags |= PMACZILOG_FLAG_BREAK; + uap->prev_status = status; } @@ -872,8 +898,8 @@ uap->curregs[R13] = 0; uap->curregs[R14] = BRENAB; - /* Clear handshaking */ - uap->curregs[R15] = 0; + /* Clear handshaking, enable BREAK interrupts */ + uap->curregs[R15] = BRKIE; /* Master interrupt enable */ uap->curregs[R9] |= NV | MIE; @@ -949,8 +975,7 @@ */ if (pwr_delay != 0) { pmz_debug("pmz: delaying %d ms\n", pwr_delay); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout((pwr_delay * HZ)/1000); + msleep(pwr_delay); } /* IrDA reset is done now */ @@ -1309,6 +1334,8 @@ /* Load registers to the chip */ pmz_maybe_update_regs(uap); } + uart_update_timeout(port, termios->c_cflag, baud); + pmz_debug("pmz: set_termios() done.\n"); } @@ -1684,8 +1711,7 @@ */ if (pwr_delay != 0) { pmz_debug("pmz: delaying %d ms\n", pwr_delay); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout((pwr_delay * HZ)/1000); + msleep(pwr_delay); } pmz_debug("resume, switching complete\n"); diff -Nru a/drivers/serial/pmac_zilog.h b/drivers/serial/pmac_zilog.h --- a/drivers/serial/pmac_zilog.h 2004-11-10 17:19:05 -08:00 +++ b/drivers/serial/pmac_zilog.h 2004-11-10 17:19:05 -08:00 @@ -47,6 +47,7 @@ #define PMACZILOG_FLAG_IS_OPEN 0x00002000 #define PMACZILOG_FLAG_IS_IRQ_ON 0x00004000 #define PMACZILOG_FLAG_IS_EXTCLK 0x00008000 +#define PMACZILOG_FLAG_BREAK 0x00010000 unsigned char parity_mask; unsigned char prev_status; diff -Nru a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c --- a/drivers/serial/serial_core.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/serial/serial_core.c 2004-11-10 17:19:03 -08:00 @@ -32,6 +32,7 @@ #include #include #include /* for serial_state and serial_icounter_struct */ +#include #include #include @@ -162,8 +163,6 @@ return -ENOMEM; info->xmit.buf = (unsigned char *) page; - info->tmpbuf = info->xmit.buf + UART_XMIT_SIZE; - init_MUTEX(&info->tmpbuf_sem); uart_circ_clear(&info->xmit); } @@ -238,7 +237,6 @@ if (info->xmit.buf) { free_page((unsigned long)info->xmit.buf); info->xmit.buf = NULL; - info->tmpbuf = NULL; } /* @@ -450,53 +448,30 @@ spin_unlock_irqrestore(&port->lock, flags); } -static inline int -__uart_user_write(struct uart_port *port, struct circ_buf *circ, - const unsigned char __user *buf, int count) +static void uart_put_char(struct tty_struct *tty, unsigned char ch) { - unsigned long flags; - int c, ret = 0; - - if (down_interruptible(&port->info->tmpbuf_sem)) - return -EINTR; - - while (1) { - int c1; - c = CIRC_SPACE_TO_END(circ->head, circ->tail, UART_XMIT_SIZE); - if (count < c) - c = count; - if (c <= 0) - break; + struct uart_state *state = tty->driver_data; - c -= copy_from_user(port->info->tmpbuf, buf, c); - if (!c) { - if (!ret) - ret = -EFAULT; - break; - } - spin_lock_irqsave(&port->lock, flags); - c1 = CIRC_SPACE_TO_END(circ->head, circ->tail, UART_XMIT_SIZE); - if (c1 < c) - c = c1; - memcpy(circ->buf + circ->head, port->info->tmpbuf, c); - circ->head = (circ->head + c) & (UART_XMIT_SIZE - 1); - spin_unlock_irqrestore(&port->lock, flags); - buf += c; - count -= c; - ret += c; - } - up(&port->info->tmpbuf_sem); + __uart_put_char(state->port, &state->info->xmit, ch); +} - return ret; +static void uart_flush_chars(struct tty_struct *tty) +{ + uart_start(tty); } -static inline int -__uart_kern_write(struct uart_port *port, struct circ_buf *circ, - const unsigned char *buf, int count) +static int +uart_write(struct tty_struct *tty, const unsigned char * buf, int count) { + struct uart_state *state = tty->driver_data; + struct uart_port *port = state->port; + struct circ_buf *circ = &state->info->xmit; unsigned long flags; int c, ret = 0; + if (!circ->buf) + return 0; + spin_lock_irqsave(&port->lock, flags); while (1) { c = CIRC_SPACE_TO_END(circ->head, circ->tail, UART_XMIT_SIZE); @@ -512,33 +487,6 @@ } spin_unlock_irqrestore(&port->lock, flags); - return ret; -} - -static void uart_put_char(struct tty_struct *tty, unsigned char ch) -{ - struct uart_state *state = tty->driver_data; - - __uart_put_char(state->port, &state->info->xmit, ch); -} - -static void uart_flush_chars(struct tty_struct *tty) -{ - uart_start(tty); -} - -static int -uart_write(struct tty_struct *tty, const unsigned char * buf, int count) -{ - struct uart_state *state = tty->driver_data; - int ret; - - if (!state->info->xmit.buf) - return 0; - - ret = __uart_kern_write(state->port, &state->info->xmit, - buf, count); - uart_start(tty); return ret; } @@ -1272,8 +1220,7 @@ if (state->info->blocked_open) { if (state->close_delay) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(state->close_delay); + msleep_interruptible(jiffies_to_msecs(state->close_delay)); } } else if (!uart_console(port)) { uart_change_pm(state, 3); @@ -1338,8 +1285,7 @@ * we wait. */ while (!port->ops->tx_empty(port)) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(char_time); + msleep_interruptible(jiffies_to_msecs(char_time)); if (signal_pending(current)) break; if (time_after(jiffies, expire)) @@ -1896,10 +1842,8 @@ * Wait for the transmitter to empty. */ while (!ops->tx_empty(port)) { - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(10*HZ/1000); + msleep(10); } - set_current_state(TASK_RUNNING); ops->shutdown(port); } diff -Nru a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c --- a/drivers/serial/serial_cs.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/serial/serial_cs.c 2004-11-10 17:19:04 -08:00 @@ -40,8 +40,6 @@ #include #include #include -#include -#include #include #include #include @@ -148,7 +146,7 @@ */ if (info->link.state & DEV_CONFIG) { for (i = 0; i < info->ndev; i++) - unregister_serial(info->line[i]); + serial8250_unregister_port(info->line[i]); info->link.dev = NULL; @@ -304,21 +302,22 @@ /*====================================================================*/ -static int setup_serial(struct serial_info * info, ioaddr_t port, int irq) +static int setup_serial(struct serial_info * info, ioaddr_t iobase, int irq) { - struct serial_struct serial; + struct uart_port port; int line; - memset(&serial, 0, sizeof (serial)); - serial.port = port; - serial.irq = irq; - serial.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ; + memset(&port, 0, sizeof (struct uart_port)); + port.iobase = iobase; + port.irq = irq; + port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ; + port.uartclk = 1843200; if (buggy_uart) - serial.flags |= UPF_BUGGY_UART; - line = register_serial(&serial); + port.flags |= UPF_BUGGY_UART; + line = serial8250_register_port(&port); if (line < 0) { - printk(KERN_NOTICE "serial_cs: register_serial() at 0x%04lx," - " irq %d failed\n", (u_long) serial.port, serial.irq); + printk(KERN_NOTICE "serial_cs: serial8250_register_port() at " + "0x%04lx, irq %d failed\n", (u_long)iobase, irq); return -EINVAL; } diff -Nru a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c --- a/drivers/serial/serial_lh7a40x.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/serial/serial_lh7a40x.c 2004-11-10 17:19:05 -08:00 @@ -45,8 +45,6 @@ #include -#include - #define DEV_MAJOR 204 #define DEV_MINOR 16 #define DEV_NR 3 @@ -59,6 +57,15 @@ #define BIT_SET(p,o,m) UR(p,o) = UR(p,o) | ( (unsigned int)m) #define UART_REG_SIZE 32 + +#define UART_R_DATA (0x00) +#define UART_R_FCON (0x04) +#define UART_R_BRCON (0x08) +#define UART_R_CON (0x0c) +#define UART_R_STATUS (0x10) +#define UART_R_RAWISR (0x14) +#define UART_R_INTEN (0x18) +#define UART_R_ISR (0x1c) #define UARTEN (0x01) /* UART enable */ #define SIRDIS (0x02) /* Serial IR disable (UART1 only) */ diff -Nru a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c --- a/drivers/serial/sn_console.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/serial/sn_console.c 2004-11-10 17:19:04 -08:00 @@ -108,7 +108,6 @@ /* Only used if USE_DYNAMIC_MINOR is set to 1 */ static struct miscdevice misc; /* used with misc_register for dynamic */ -extern u64 __iomem *master_node_bedrock_address; extern void early_sn_setup(void); #undef DEBUG @@ -124,9 +123,6 @@ static int snt_hw_puts_buffered(const char *, int); static int snt_poll_getc(void); static int snt_poll_input_pending(void); -static int snt_sim_puts(const char *, int); -static int snt_sim_getc(void); -static int snt_sim_input_pending(void); static int snt_intr_getc(void); static int snt_intr_input_pending(void); static void sn_transmit_chars(struct sn_cons_port *, int); @@ -140,14 +136,6 @@ .sal_input_pending = snt_poll_input_pending }; -/* A table for the simulator */ -static struct sn_sal_ops sim_ops = { - .sal_puts_raw = snt_sim_puts, - .sal_puts = snt_sim_puts, - .sal_getc = snt_sim_getc, - .sal_input_pending = snt_sim_input_pending -}; - /* A table for interrupts enabled */ static struct sn_sal_ops intr_ops = { .sal_puts_raw = snt_hw_puts_raw, @@ -194,53 +182,6 @@ return !status && input; } -/* routines for running the console on the simulator */ - -/** - * snt_sim_puts - send to the console, used in simulator mode - * @str: String to send - * @count: length of string - * - */ -static int snt_sim_puts(const char *str, int count) -{ - int counter = count; - -#ifdef FLAG_DIRECT_CONSOLE_WRITES - /* This is an easy way to pre-pend the output to know whether the output - * was done via sal or directly */ - writeb('[', master_node_bedrock_address + (UART_TX << 3)); - writeb('+', master_node_bedrock_address + (UART_TX << 3)); - writeb(']', master_node_bedrock_address + (UART_TX << 3)); - writeb(' ', master_node_bedrock_address + (UART_TX << 3)); -#endif /* FLAG_DIRECT_CONSOLE_WRITES */ - while (counter > 0) { - writeb(*str, master_node_bedrock_address + (UART_TX << 3)); - counter--; - str++; - } - return count; -} - -/** - * snt_sim_getc - Get character from console in simulator mode - * - */ -static int snt_sim_getc(void) -{ - return readb(master_node_bedrock_address + (UART_RX << 3)); -} - -/** - * snt_sim_input_pending - Check if there is input pending in simulator mode - * - */ -static int snt_sim_input_pending(void) -{ - return readb(master_node_bedrock_address + - (UART_LSR << 3)) & UART_LSR_DR; -} - /* routines for an interrupt driven console (normal) */ /** @@ -491,11 +432,7 @@ printed_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args); if (!sal_console_port.sc_ops) { - if (IS_RUNNING_ON_SIMULATOR()) - sal_console_port.sc_ops = &sim_ops; - else - sal_console_port.sc_ops = &poll_ops; - + sal_console_port.sc_ops = &poll_ops; early_sn_setup(); } sal_console_port.sc_ops->sal_puts_raw(printk_buf, printed_len); @@ -781,12 +718,8 @@ spin_lock_irqsave(&port->sc_port.lock, flags); /* early_printk invocation may have done this for us */ - if (!port->sc_ops) { - if (IS_RUNNING_ON_SIMULATOR()) - port->sc_ops = &sim_ops; - else - port->sc_ops = &poll_ops; - } + if (!port->sc_ops) + port->sc_ops = &poll_ops; /* we can't turn on the console interrupt (as request_irq * calls kmalloc, which isn't set up yet), so we rely on a @@ -1155,11 +1088,7 @@ if (!ia64_platform_is("sn2")) return -1; - if (IS_RUNNING_ON_SIMULATOR()) - sal_console_port.sc_ops = &sim_ops; - else - sal_console_port.sc_ops = &poll_ops; - + sal_console_port.sc_ops = &poll_ops; early_sn_setup(); /* Find SAL entry points */ register_console(&sal_console_early); diff -Nru a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c --- a/drivers/serial/sunsu.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/serial/sunsu.c 2004-11-10 17:19:03 -08:00 @@ -95,7 +95,6 @@ enum su_type su_type; unsigned int type_probed; /* XXX Stupid */ int port_node; - unsigned int irq; #ifdef CONFIG_SERIO struct serio *serio; @@ -684,14 +683,14 @@ } if (up->su_type != SU_PORT_PORT) { - retval = request_irq(up->irq, sunsu_kbd_ms_interrupt, + retval = request_irq(up->port.irq, sunsu_kbd_ms_interrupt, SA_SHIRQ, su_typev[up->su_type], up); } else { - retval = request_irq(up->irq, sunsu_serial_interrupt, + retval = request_irq(up->port.irq, sunsu_serial_interrupt, SA_SHIRQ, su_typev[up->su_type], up); } if (retval) { - printk("su: Cannot register IRQ %d\n", up->irq); + printk("su: Cannot register IRQ %d\n", up->port.irq); return retval; } @@ -779,7 +778,7 @@ */ (void) serial_in(up, UART_RX); - free_irq(up->irq, up); + free_irq(up->port.irq, up); } static void @@ -1078,7 +1077,7 @@ * This is correct on both architectures. */ up->port.mapbase = dev->resource[0].start; - up->irq = dev->irqs[0]; + up->port.irq = dev->irqs[0]; goto ebus_done; } } @@ -1091,7 +1090,7 @@ /* Same on sparc64. Cool architecure... */ up->port.membase = (char *) isa_dev->resource.start; up->port.mapbase = isa_dev->resource.start; - up->irq = isa_dev->irq; + up->port.irq = isa_dev->irq; goto ebus_done; } } @@ -1133,7 +1132,7 @@ /* * There is no intr property on MrCoffee, so hardwire it. */ - up->irq = IRQ_4M(13); + up->port.irq = IRQ_4M(13); #endif ebus_done: @@ -1303,7 +1302,7 @@ printk(KERN_INFO "su%d at 0x%p (irq = %s) is a %s\n", channel, - up->port.membase, __irq_itoa(up->irq), + up->port.membase, __irq_itoa(up->port.irq), sunsu_type(&up->port)); #ifdef CONFIG_SERIO diff -Nru a/drivers/usb/Kconfig b/drivers/usb/Kconfig --- a/drivers/usb/Kconfig 2004-11-10 17:19:03 -08:00 +++ b/drivers/usb/Kconfig 2004-11-10 17:19:03 -08:00 @@ -7,7 +7,7 @@ # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface. config USB tristate "Support for Host-side USB" - depends on PCI || SA1111 || ARCH_OMAP1510 || ARCH_OMAP1610 || ARCH_LH7A404 || PXA27x + depends on USB_ARCH_HAS_HCD ---help--- Universal Serial Bus (USB) is a specification for a serial bus subsystem which offers higher speeds and more features than the diff -Nru a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c --- a/drivers/usb/class/audio.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/usb/class/audio.c 2004-11-10 17:19:07 -08:00 @@ -3119,12 +3119,18 @@ { struct usb_device *dev = state->s->usbdev; struct mixerchannel *ch; - unsigned char buf[2]; + unsigned char *buf; __s16 v1; unsigned int v2, v3; if (!state->nrmixch || state->nrmixch > SOUND_MIXER_NRDEVICES) return; + buf = kmalloc(sizeof(*buf) * 2, GFP_KERNEL); + if (!buf) { + printk(KERN_ERR "prepmixch: out of memory\n") ; + return; + } + ch = &state->mixch[state->nrmixch-1]; switch (ch->selector) { case 0: /* mixer unit request */ @@ -3236,13 +3242,16 @@ default: goto err; } - return; + freebuf: + kfree(buf); + return; err: printk(KERN_ERR "usbaudio: mixer request device %u if %u unit %u ch %u selector %u failed\n", dev->devnum, state->ctrlif, ch->unitid, ch->chnum, ch->selector); if (state->nrmixch) state->nrmixch--; + goto freebuf; } diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c --- a/drivers/usb/class/usblp.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/usb/class/usblp.c 2004-11-10 17:19:03 -08:00 @@ -222,6 +222,7 @@ /* forward reference to make our lives easier */ static struct usb_driver usblp_driver; +static DECLARE_MUTEX(usblp_sem); /* locks the existence of usblp's */ /* * Functions for usblp control messages. @@ -343,7 +344,7 @@ if (minor < 0) return -ENODEV; - lock_kernel(); + down (&usblp_sem); retval = -ENODEV; intf = usb_find_interface(&usblp_driver, minor); @@ -389,7 +390,7 @@ } } out: - unlock_kernel(); + up (&usblp_sem); return retval; } @@ -415,13 +416,13 @@ { struct usblp *usblp = file->private_data; - down (&usblp->sem); + down (&usblp_sem); usblp->used = 0; if (usblp->present) { usblp_unlink_urbs(usblp); - up(&usblp->sem); } else /* finish cleanup from disconnect */ usblp_cleanup (usblp); + up (&usblp_sem); return 0; } @@ -1149,8 +1150,8 @@ BUG (); } + down (&usblp_sem); down (&usblp->sem); - lock_kernel(); usblp->present = 0; usb_set_intfdata (intf, NULL); @@ -1159,12 +1160,11 @@ usblp->writebuf, usblp->writeurb->transfer_dma); usb_buffer_free (usblp->dev, USBLP_BUF_SIZE, usblp->readbuf, usblp->readurb->transfer_dma); + up (&usblp->sem); if (!usblp->used) usblp_cleanup (usblp); - else /* cleanup later, on release */ - up (&usblp->sem); - unlock_kernel(); + up (&usblp_sem); } static struct usb_device_id usblp_ids [] = { diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c --- a/drivers/usb/core/devio.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/core/devio.c 2004-11-10 17:19:04 -08:00 @@ -411,6 +411,8 @@ static int checkintf(struct dev_state *ps, unsigned int ifnum) { + if (ps->dev->state != USB_STATE_CONFIGURED) + return -EHOSTUNREACH; if (ifnum >= 8*sizeof(ps->ifclaimed)) return -EINVAL; if (test_bit(ifnum, &ps->ifclaimed)) @@ -450,6 +452,8 @@ { int ret = 0; + if (ps->dev->state != USB_STATE_CONFIGURED) + return -EHOSTUNREACH; if (USB_TYPE_VENDOR == (USB_TYPE_MASK & requesttype)) return 0; @@ -595,7 +599,7 @@ usb_lock_device(dev); } free_page((unsigned long)tbuf); - if (i<0) { + if (i<0 && i != -EPIPE) { dev_printk(KERN_DEBUG, &dev->dev, "usbfs: USBDEVFS_CONTROL " "failed cmd %s rqt %u rq %u len %u ret %d\n", current->comm, ctrl.bRequestType, ctrl.bRequest, @@ -1131,7 +1135,7 @@ } if (ps->dev->state != USB_STATE_CONFIGURED) - retval = -ENODEV; + retval = -EHOSTUNREACH; else if (!(intf = usb_ifnum_to_if (ps->dev, ctrl.ifno))) retval = -EINVAL; else switch (ctrl.ioctl_code) { diff -Nru a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c --- a/drivers/usb/core/hcd-pci.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/core/hcd-pci.c 2004-11-10 17:19:04 -08:00 @@ -38,14 +38,6 @@ /*-------------------------------------------------------------------------*/ -static void hcd_pci_release(struct usb_bus *bus) -{ - struct usb_hcd *hcd = bus->hcpriv; - - if (hcd) - hcd->driver->hcd_free(hcd); -} - /* configure so an HC device and id are always provided */ /* always called with process context; sleeping is OK */ @@ -78,6 +70,7 @@ if (pci_enable_device (dev) < 0) return -ENODEV; + dev->current_state = 0; if (!dev->irq) { dev_err (&dev->dev, @@ -160,7 +153,7 @@ if ((retval = hcd_buffer_create (hcd)) != 0) { clean_3: - driver->hcd_free (hcd); + kfree (hcd); goto clean_2; } @@ -194,8 +187,8 @@ usb_bus_init (&hcd->self); hcd->self.op = &usb_hcd_operations; + hcd->self.release = &usb_hcd_release; hcd->self.hcpriv = (void *) hcd; - hcd->self.release = &hcd_pci_release; init_timer (&hcd->rh_timer); INIT_LIST_HEAD (&hcd->dev_list); @@ -268,6 +261,18 @@ #ifdef CONFIG_PM +static char __attribute_used__ *pci_state(u32 state) +{ + switch (state) { + case 0: return "D0"; + case 1: return "D1"; + case 2: return "D2"; + case 3: return "D3hot"; + case 4: return "D3cold"; + } + return NULL; +} + /** * usb_hcd_pci_suspend - power management suspend of a PCI-based HCD * @dev: USB Host Controller being suspended @@ -288,16 +293,32 @@ * PM-sensitive HCDs may already have done this. */ has_pci_pm = pci_find_capability(dev, PCI_CAP_ID_PM); - if (has_pci_pm) - dev_dbg(hcd->self.controller, "suspend D%d --> D%d\n", - dev->current_state, state); + if (state > 4) + state = 4; switch (hcd->state) { case USB_STATE_HALT: dev_dbg (hcd->self.controller, "halted; hcd not suspended\n"); break; case HCD_STATE_SUSPENDED: - dev_dbg (hcd->self.controller, "hcd already suspended\n"); + dev_dbg (hcd->self.controller, "PCI %s --> %s\n", + pci_state(dev->current_state), + pci_state(has_pci_pm ? state : 0)); + if (state > 3) + state = 3; + + if (state == dev->current_state) + break; + else if (state < dev->current_state) + retval = -EIO; + else if (has_pci_pm) + retval = pci_set_power_state (dev, state); + + if (retval == 0) + dev->dev.power.power_state = state; + else + dev_dbg (hcd->self.controller, + "re-suspend fail, %d\n", retval); break; default: retval = hcd->driver->suspend (hcd, state); @@ -308,22 +329,47 @@ else { hcd->state = HCD_STATE_SUSPENDED; pci_save_state (dev); -#ifdef CONFIG_USB_SUSPEND - pci_enable_wake (dev, state, hcd->remote_wakeup); - pci_enable_wake (dev, 4, hcd->remote_wakeup); -#endif + /* no DMA or IRQs except in D0 */ pci_disable_device (dev); free_irq (hcd->irq, hcd); - if (has_pci_pm) + if (has_pci_pm) { retval = pci_set_power_state (dev, state); - dev->dev.power.power_state = state; + + /* POLICY: ignore D1/D2/D3hot differences; + * we know D3hot will always work. + */ + if (retval < 0 && state < 3) { + retval = pci_set_power_state (dev, 3); + if (retval == 0) + state = 3; + } + if (retval == 0) { + dev->dev.power.power_state = state; +#ifdef CONFIG_USB_SUSPEND + pci_enable_wake (dev, state, + hcd->remote_wakeup); + pci_enable_wake (dev, 4, + hcd->remote_wakeup); +#endif + } + } else { + if (state > 3) + state = 3; + dev->dev.power.power_state = state; + } if (retval < 0) { dev_dbg (&dev->dev, - "PCI suspend fail, %d\n", + "PCI %s suspend fail, %d\n", + pci_state(state), retval); (void) usb_hcd_pci_resume (dev); + } else { + dev_dbg(hcd->self.controller, + "suspended to PCI %s%s\n", + pci_state(dev->current_state), + has_pci_pm ? "" : " (legacy)"); } } } @@ -345,9 +391,11 @@ hcd = pci_get_drvdata(dev); has_pci_pm = pci_find_capability(dev, PCI_CAP_ID_PM); - if (has_pci_pm) - dev_dbg(hcd->self.controller, "resume from state D%d\n", - dev->current_state); + + /* D3cold resume isn't usually reported this way... */ + dev_dbg(hcd->self.controller, "resume from PCI %s%s\n", + pci_state(dev->current_state), + has_pci_pm ? "" : " (legacy)"); if (hcd->state != HCD_STATE_SUSPENDED) { dev_dbg (hcd->self.controller, @@ -366,7 +414,7 @@ "can't restore IRQ after resume!\n"); return retval; } - pci_set_master (dev); + hcd->saw_irq = 0; pci_restore_state (dev); #ifdef CONFIG_USB_SUSPEND pci_enable_wake (dev, dev->current_state, 0); diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/core/hcd.c 2004-11-10 17:19:05 -08:00 @@ -435,8 +435,6 @@ /* non-generic request */ if (HCD_IS_SUSPENDED (hcd->state)) urb->status = -EAGAIN; - else if (!HCD_IS_RUNNING (hcd->state)) - urb->status = -ENODEV; else urb->status = hcd->driver->hub_control (hcd, typeReq, wValue, wIndex, @@ -445,13 +443,16 @@ error: /* "protocol stall" on error */ urb->status = -EPIPE; - dev_dbg (hcd->self.controller, "unsupported hub control message (maxchild %d)\n", - urb->dev->maxchild); } if (urb->status) { urb->actual_length = 0; - dev_dbg (hcd->self.controller, "CTRL: TypeReq=0x%x val=0x%x idx=0x%x len=%d ==> %d\n", - typeReq, wValue, wIndex, wLength, urb->status); + if (urb->status != -EPIPE) { + dev_dbg (hcd->self.controller, + "CTRL: TypeReq=0x%x val=0x%x " + "idx=0x%x len=%d ==> %d\n", + typeReq, wValue, wIndex, + wLength, urb->status); + } } if (bufp) { if (urb->transfer_buffer_length < len) @@ -540,7 +541,7 @@ urb->actual_length = length; urb->status = 0; urb->hcpriv = NULL; - } else + } else if (!urb->dev->dev.power.power_state) mod_timer (&hcd->rh_timer, jiffies + HZ/4); spin_unlock (&hcd_data_lock); spin_unlock (&urb->lock); @@ -572,18 +573,34 @@ /*-------------------------------------------------------------------------*/ -int usb_rh_status_dequeue (struct usb_hcd *hcd, struct urb *urb) +static int usb_rh_urb_dequeue (struct usb_hcd *hcd, struct urb *urb) { unsigned long flags; /* note: always a synchronous unlink */ - del_timer_sync (&hcd->rh_timer); - hcd->rh_timer.data = 0; + if ((unsigned long) urb == hcd->rh_timer.data) { + del_timer_sync (&hcd->rh_timer); + hcd->rh_timer.data = 0; + + local_irq_save (flags); + urb->hcpriv = NULL; + usb_hcd_giveback_urb (hcd, urb, NULL); + local_irq_restore (flags); + + } else if (usb_pipeendpoint(urb->pipe) == 0) { + spin_lock_irq(&urb->lock); /* from usb_kill_urb */ + ++urb->reject; + spin_unlock_irq(&urb->lock); + + wait_event(usb_kill_urb_queue, + atomic_read(&urb->use_count) == 0); + + spin_lock_irq(&urb->lock); + --urb->reject; + spin_unlock_irq(&urb->lock); + } else + return -EINVAL; - local_irq_save (flags); - urb->hcpriv = NULL; - usb_hcd_giveback_urb (hcd, urb, NULL); - local_irq_restore (flags); return 0; } @@ -1175,8 +1192,8 @@ { int value; - if (urb == (struct urb *) hcd->rh_timer.data) - value = usb_rh_status_dequeue (hcd, urb); + if (urb->dev == hcd->self.root_hub) + value = usb_rh_urb_dequeue (hcd, urb); else { /* The only reason an HCD might fail this call is if @@ -1264,7 +1281,7 @@ * never get completion IRQs ... maybe even the ones we need to * finish unlinking the initial failed usb_set_address(). */ - if (!hcd->saw_irq && hcd->rh_timer.data != (unsigned long) urb) { + if (!hcd->saw_irq && hcd->self.root_hub != urb->dev) { dev_warn (hcd->self.controller, "Unlink after no-IRQ? " "Different ACPI or APIC settings may help." "\n"); @@ -1605,3 +1622,13 @@ } EXPORT_SYMBOL (usb_hc_died); +/*-------------------------------------------------------------------------*/ + +void usb_hcd_release(struct usb_bus *bus) +{ + struct usb_hcd *hcd; + + hcd = container_of (bus, struct usb_hcd, self); + kfree(hcd); +} +EXPORT_SYMBOL (usb_hcd_release); diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h --- a/drivers/usb/core/hcd.h 2004-11-10 17:19:03 -08:00 +++ b/drivers/usb/core/hcd.h 2004-11-10 17:19:03 -08:00 @@ -191,8 +191,13 @@ int (*get_frame_number) (struct usb_hcd *hcd); /* memory lifecycle */ + /* Note: The absence of hcd_free reflects a temporary situation; + * in the near future hcd_alloc will disappear as well and all + * allocations/deallocations will be handled by usbcore. For the + * moment, drivers are required to return a pointer that the core + * can pass to kfree, i.e., the struct usb_hcd must be the _first_ + * member of a larger driver-specific structure. */ struct usb_hcd *(*hcd_alloc) (void); - void (*hcd_free) (struct usb_hcd *hcd); /* manage i/o requests, device state */ int (*urb_enqueue) (struct usb_hcd *hcd, struct urb *urb, @@ -215,7 +220,6 @@ extern void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs); extern void usb_bus_init (struct usb_bus *bus); -extern int usb_rh_status_dequeue (struct usb_hcd *hcd, struct urb *urb); #ifdef CONFIG_PCI struct pci_dev; @@ -360,6 +364,8 @@ return usb_register_root_hub (usb_dev, hcd->self.controller); } + +extern void usb_hcd_release (struct usb_bus *); extern void usb_set_device_state(struct usb_device *udev, enum usb_device_state new_state); diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/core/hub.c 2004-11-10 17:19:04 -08:00 @@ -56,6 +56,31 @@ module_param (blinkenlights, bool, S_IRUGO); MODULE_PARM_DESC (blinkenlights, "true to cycle leds on hubs"); +/* + * As of 2.6.10 we introduce a new USB device initialization scheme which + * closely resembles the way Windows works. Hopefully it will be compatible + * with a wider range of devices than the old scheme. However some previously + * working devices may start giving rise to "device not accepting address" + * errors; if that happens the user can try the old scheme by adjusting the + * following module parameters. + * + * For maximum flexibility there are two boolean parameters to control the + * hub driver's behavior. On the first initialization attempt, if the + * "old_scheme_first" parameter is set then the old scheme will be used, + * otherwise the new scheme is used. If that fails and "use_both_schemes" + * is set, then the driver will make another attempt, using the other scheme. + */ +static int old_scheme_first = 0; +module_param(old_scheme_first, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(old_scheme_first, + "start with the old device initialization scheme"); + +static int use_both_schemes = 0; +module_param(use_both_schemes, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(use_both_schemes, + "try the other device initialization scheme if the " + "first one fails"); + #ifdef DEBUG static inline char *portspeed (int portstatus) @@ -78,9 +103,17 @@ /* USB 2.0 spec Section 11.24.4.5 */ static int get_hub_descriptor(struct usb_device *hdev, void *data, int size) { - return usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0), - USB_REQ_GET_DESCRIPTOR, USB_DIR_IN | USB_RT_HUB, - USB_DT_HUB << 8, 0, data, size, HZ * USB_CTRL_GET_TIMEOUT); + int i, ret; + + for (i = 0; i < 3; i++) { + ret = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0), + USB_REQ_GET_DESCRIPTOR, USB_DIR_IN | USB_RT_HUB, + USB_DT_HUB << 8, 0, data, size, + HZ * USB_CTRL_GET_TIMEOUT); + if (ret >= (USB_DT_HUB_NONVAR_SIZE + 2)) + return ret; + } + return -EINVAL; } /* @@ -641,6 +674,7 @@ hub->indicator [0] = INDICATOR_CYCLE; hub_power_on(hub); + hub->change_bits[0] = ~0; hub_activate(hub); return 0; @@ -1265,7 +1299,8 @@ #define PORT_RESET_TRIES 5 #define SET_ADDRESS_TRIES 2 #define GET_DESCRIPTOR_TRIES 2 -#define SET_CONFIG_TRIES 2 +#define SET_CONFIG_TRIES (2 * (use_both_schemes + 1)) +#define USE_NEW_SCHEME(i) ((i) / 2 == old_scheme_first) #define HUB_ROOT_RESET_TIME 50 /* times are in msec */ #define HUB_SHORT_RESET_TIME 10 @@ -1481,7 +1516,7 @@ * Linux (2.6) currently has NO mechanisms to initiate that: no khubd * timer, no SRP, no requests through sysfs. */ -static int __usb_suspend_device (struct usb_device *udev, int port, u32 state) +int __usb_suspend_device (struct usb_device *udev, int port, u32 state) { int status; @@ -1489,9 +1524,7 @@ if (port < 0) return port; - if (state <= udev->dev.power.power_state - || state < PM_SUSPEND_MEM - || udev->state == USB_STATE_SUSPENDED + if (udev->dev.power.power_state || udev->state == USB_STATE_NOTATTACHED) { return 0; } @@ -1555,7 +1588,6 @@ */ if (state > PM_SUSPEND_MEM) { dev_warn(&udev->dev, "no poweroff yet, suspending instead\n"); - state = PM_SUSPEND_MEM; } /* "global suspend" of the HC-to-USB interface (root hub), or @@ -1571,9 +1603,11 @@ status = hub_port_suspend(udev->parent, port); if (status == 0) - udev->dev.power.power_state = state; + udev->dev.power.power_state = PM_SUSPEND_MEM; + up(&udev->serialize); return status; } +EXPORT_SYMBOL(__usb_suspend_device); /** * usb_suspend_device - suspend a usb device @@ -1786,6 +1820,7 @@ ->actconfig->interface[0]); } } else if (udev->state == USB_STATE_SUSPENDED) { + // NOTE this fails if parent is also suspended... status = hub_port_resume(udev->parent, port); } else { status = 0; @@ -1799,10 +1834,11 @@ usb_unlock_device(udev); /* rebind drivers that had no suspend() */ - usb_lock_all_devices(); - bus_rescan_devices(&usb_bus_type); - usb_unlock_all_devices(); - + if (status == 0) { + usb_lock_all_devices(); + bus_rescan_devices(&usb_bus_type); + usb_unlock_all_devices(); + } return status; } @@ -1860,6 +1896,9 @@ unsigned port; int status; + if (intf->dev.power.power_state == PM_SUSPEND_ON) + return 0; + for (port = 0; port < hdev->maxchild; port++) { struct usb_device *udev; u16 portstat, portchange; @@ -1878,7 +1917,7 @@ continue; } - if (!udev) + if (!udev || status < 0) continue; down (&udev->serialize); if (portstat & USB_PORT_STAT_SUSPEND) @@ -1983,20 +2022,30 @@ return portstatus; } +#define usb_sndaddr0pipe() (PIPE_CONTROL << 30) +#define usb_rcvaddr0pipe() ((PIPE_CONTROL << 30) | USB_DIR_IN) + static int hub_set_address(struct usb_device *udev) { int retval; if (udev->devnum == 0) return -EINVAL; - if (udev->state != USB_STATE_DEFAULT && - udev->state != USB_STATE_ADDRESS) + if (udev->state == USB_STATE_ADDRESS) + return 0; + if (udev->state != USB_STATE_DEFAULT) return -EINVAL; - retval = usb_control_msg(udev, (PIPE_CONTROL << 30) /* Address 0 */, + retval = usb_control_msg(udev, usb_sndaddr0pipe(), USB_REQ_SET_ADDRESS, 0, udev->devnum, 0, NULL, 0, HZ * USB_CTRL_SET_TIMEOUT); - if (retval == 0) + if (retval == 0) { + int m = udev->epmaxpacketin[0]; + usb_set_device_state(udev, USB_STATE_ADDRESS); + usb_disable_endpoint(udev, 0 + USB_DIR_IN); + usb_disable_endpoint(udev, 0 + USB_DIR_OUT); + udev->epmaxpacketin[0] = udev->epmaxpacketout[0] = m; + } return retval; } @@ -2010,7 +2059,8 @@ * pointers, it's not necessary to lock the device. */ static int -hub_port_init (struct usb_device *hdev, struct usb_device *udev, int port) +hub_port_init (struct usb_device *hdev, struct usb_device *udev, int port, + int retry_counter) { static DECLARE_MUTEX(usb_address0_sem); @@ -2027,10 +2077,6 @@ hdev->bus->b_hnp_enable = 0; } - retval = clear_port_feature(hdev, port + 1, USB_PORT_FEAT_SUSPEND); - if (retval < 0 && retval != -EPIPE) - dev_dbg(&udev->dev, "can't clear suspend; %d\n", retval); - /* Some low speed devices have problems with the quick delay, so */ /* be a bit pessimistic with those devices. RHbug #23670 */ if (oldspeed == USB_SPEED_LOW) @@ -2049,6 +2095,7 @@ dev_dbg(&udev->dev, "device reset changed speed!\n"); goto fail; } + oldspeed = udev->speed; /* USB 2.0 section 5.5.3 talks about ep0 maxpacket ... * it's fixed size except for full speed devices. @@ -2058,22 +2105,22 @@ i = 64; break; case USB_SPEED_FULL: /* 8, 16, 32, or 64 */ - /* to determine the ep0 maxpacket size, read the first 8 - * bytes from the device descriptor to get bMaxPacketSize0; - * then correct our initial (small) guess. + /* to determine the ep0 maxpacket size, try to read + * the device descriptor to get bMaxPacketSize0 and + * then correct our initial guess. */ - // FALLTHROUGH + i = 64; + break; case USB_SPEED_LOW: /* fixed at 8 */ i = 8; break; default: goto fail; } - udev->epmaxpacketin [0] = i; - udev->epmaxpacketout[0] = i; + udev->epmaxpacketin[0] = udev->epmaxpacketout[0] = i; dev_info (&udev->dev, - "%s %s speed USB device using address %d\n", + "%s %s speed USB device using %s and address %d\n", (udev->config) ? "reset" : "new", ({ char *speed; switch (udev->speed) { case USB_SPEED_LOW: speed = "low"; break; @@ -2081,6 +2128,7 @@ case USB_SPEED_HIGH: speed = "high"; break; default: speed = "?"; break; }; speed;}), + udev->bus->controller->driver->name, udev->devnum); /* Set up TT records, if needed */ @@ -2101,11 +2149,59 @@ * this area, and this is how Linux has done it for ages. * Change it cautiously. * - * NOTE: Windows gets the descriptor first, seemingly to help - * work around device bugs like "can't use addresses with bit 3 - * set in certain configurations". Yes, really. - */ - for (i = 0; i < GET_DESCRIPTOR_TRIES; ++i) { + * NOTE: If USE_NEW_SCHEME() is true we will start by issuing + * a 64-byte GET_DESCRIPTOR request. This is what Windows does, + * so it may help with some non-standards-compliant devices. + * Otherwise we start with SET_ADDRESS and then try to read the + * first 8 bytes of the device descriptor to get the ep0 maxpacket + * value. + */ + for (i = 0; i < GET_DESCRIPTOR_TRIES; (++i, msleep(100))) { + if (USE_NEW_SCHEME(retry_counter)) { + struct usb_device_descriptor *buf; + +#define GET_DESCRIPTOR_BUFSIZE 64 + buf = kmalloc(GET_DESCRIPTOR_BUFSIZE, GFP_NOIO); + if (!buf) { + retval = -ENOMEM; + continue; + } + buf->bMaxPacketSize0 = 0; + + /* Use a short timeout the first time through, + * so that recalcitrant full-speed devices with + * 8- or 16-byte ep0-maxpackets won't slow things + * down tremendously by NAKing the unexpectedly + * early status stage. + */ + j = usb_control_msg(udev, usb_rcvaddr0pipe(), + USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, + USB_DT_DEVICE << 8, 0, + buf, GET_DESCRIPTOR_BUFSIZE, + (i ? HZ * USB_CTRL_GET_TIMEOUT : HZ)); + udev->descriptor.bMaxPacketSize0 = + buf->bMaxPacketSize0; + kfree(buf); + + retval = hub_port_reset(hdev, port, udev, delay); + if (retval < 0) /* error or disconnect */ + goto fail; + if (oldspeed != udev->speed) { + dev_dbg(&udev->dev, + "device reset changed speed!\n"); + retval = -ENODEV; + goto fail; + } + if (udev->descriptor.bMaxPacketSize0 == 0) { + dev_err(&udev->dev, "device descriptor " + "read/%s, error %d\n", + "64", j); + retval = -EMSGSIZE; + continue; + } +#undef GET_DESCRIPTOR_BUFSIZE + } + for (j = 0; j < SET_ADDRESS_TRIES; ++j) { retval = hub_set_address(udev); if (retval >= 0) @@ -2124,25 +2220,31 @@ * - read ep0 maxpacket even for high and low speed, */ msleep(10); + if (USE_NEW_SCHEME(retry_counter)) + break; + retval = usb_get_device_descriptor(udev, 8); - if (retval >= 8) + if (retval < 8) { + dev_err(&udev->dev, "device descriptor " + "read/%s, error %d\n", + "8", retval); + if (retval >= 0) + retval = -EMSGSIZE; + } else { + retval = 0; break; - msleep(100); + } } - if (retval != 8) { - dev_err(&udev->dev, "device descriptor read/%s, error %d\n", - "8", retval); - if (retval >= 0) - retval = -EMSGSIZE; + if (retval) goto fail; - } - if (udev->speed == USB_SPEED_FULL - && (udev->epmaxpacketin [0] - != udev->descriptor.bMaxPacketSize0)) { + + /* Should we verify that the value is valid? */ + i = udev->descriptor.bMaxPacketSize0; + if (udev->epmaxpacketin[0] != i) { + dev_dbg(&udev->dev, "ep0 maxpacket = %d\n", i); usb_disable_endpoint(udev, 0 + USB_DIR_IN); usb_disable_endpoint(udev, 0 + USB_DIR_OUT); - udev->epmaxpacketin [0] = udev->descriptor.bMaxPacketSize0; - udev->epmaxpacketout[0] = udev->descriptor.bMaxPacketSize0; + udev->epmaxpacketin[0] = udev->epmaxpacketout[0] = i; } retval = usb_get_device_descriptor(udev, USB_DT_DEVICE_SIZE); @@ -2288,6 +2390,15 @@ return; } +#ifdef CONFIG_USB_SUSPEND + /* If something is connected, but the port is suspended, wake it up.. */ + if (portstatus & USB_PORT_STAT_SUSPEND) { + status = hub_port_resume(hdev, port); + if (status < 0) + dev_dbg(hub_dev, "can't clear suspend on port %d; %d\n", port+1, status); + } +#endif + for (i = 0; i < SET_CONFIG_TRIES; i++) { struct usb_device *udev; @@ -2312,7 +2423,7 @@ } /* reset and get descriptor */ - status = hub_port_init(hdev, udev, port); + status = hub_port_init(hdev, udev, port, i); if (status < 0) goto loop; @@ -2445,6 +2556,14 @@ usb_get_dev(hdev); spin_unlock_irq(&hub_event_lock); + dev_dbg(hub_dev, "state %d ports %d chg %04x evt %04x\n", + hdev->state, hub->descriptor + ? hub->descriptor->bNbrPorts + : 0, + /* NOTE: expects max 15 ports... */ + (u16) hub->change_bits[0], + (u16) hub->event_bits[0]); + /* Lock the device, then check to see if we were * disconnected while waiting for the lock to succeed. */ if (locktree(hdev) < 0) @@ -2732,7 +2851,7 @@ { struct usb_device *parent = udev->parent; struct usb_device_descriptor descriptor = udev->descriptor; - int i, ret, port = -1; + int i, ret = 0, port = -1; int udev_is_a_hub = 0; if (udev->state == USB_STATE_NOTATTACHED || @@ -2768,12 +2887,16 @@ hub_pre_reset(udev); } - /* ep0 maxpacket size may change; let the HCD know about it. - * Other endpoints will be handled by re-enumeration. */ - usb_disable_endpoint(udev, 0); - usb_disable_endpoint(udev, 0 + USB_DIR_IN); + for (i = 0; i < SET_CONFIG_TRIES; ++i) { - ret = hub_port_init(parent, udev, port); + /* ep0 maxpacket size may change; let the HCD know about it. + * Other endpoints will be handled by re-enumeration. */ + usb_disable_endpoint(udev, 0 + USB_DIR_IN); + usb_disable_endpoint(udev, 0 + USB_DIR_OUT); + ret = hub_port_init(parent, udev, port, i); + if (ret >= 0) + break; + } if (ret < 0) goto re_enumerate; diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c --- a/drivers/usb/core/message.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/usb/core/message.c 2004-11-10 17:19:03 -08:00 @@ -34,10 +34,6 @@ { struct urb *urb = (struct urb *) data; - dev_warn(&urb->dev->dev, "%s timeout on ep%d%s\n", - usb_pipecontrol(urb->pipe) ? "control" : "bulk", - usb_pipeendpoint(urb->pipe), - usb_pipein(urb->pipe) ? "in" : "out"); usb_unlink_urb(urb); } @@ -68,8 +64,14 @@ wait_for_completion(&done); status = urb->status; /* note: HCDs return ETIMEDOUT for other reasons too */ - if (status == -ECONNRESET) + if (status == -ECONNRESET) { + dev_warn(&urb->dev->dev, + "%s timed out on ep%d%s\n", + current->comm, + usb_pipeendpoint(urb->pipe), + usb_pipein(urb->pipe) ? "in" : "out"); status = -ETIMEDOUT; + } if (timeout > 0) del_timer_sync(&timer); } @@ -549,8 +551,7 @@ * * Gets a USB descriptor. Convenience functions exist to simplify * getting some types of descriptors. Use - * usb_get_device_descriptor() for USB_DT_DEVICE (not exported), - * and usb_get_string() or usb_string() for USB_DT_STRING. + * usb_get_string() or usb_string() for USB_DT_STRING. * Device (USB_DT_DEVICE) and configuration descriptors (USB_DT_CONFIG) * are part of the device structure. * In addition to a number of USB-standard descriptors, some @@ -703,6 +704,8 @@ int err; unsigned int u, idx; + if (dev->state == USB_STATE_SUSPENDED) + return -EHOSTUNREACH; if (size <= 0 || !buf || !index) return -EINVAL; buf[0] = 0; @@ -755,8 +758,8 @@ return err; } -/** - * usb_get_device_descriptor - (re)reads the device descriptor +/* + * usb_get_device_descriptor - (re)reads the device descriptor (usbcore) * @dev: the device whose device descriptor is being updated * @size: how much of the descriptor to read * Context: !in_interrupt () @@ -823,9 +826,19 @@ */ int usb_get_status(struct usb_device *dev, int type, int target, void *data) { - return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), - USB_REQ_GET_STATUS, USB_DIR_IN | type, 0, target, data, 2, - HZ * USB_CTRL_GET_TIMEOUT); + int ret; + u16 *status = kmalloc(sizeof(*status), GFP_KERNEL); + + if (!status) + return -ENOMEM; + + ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_STATUS, USB_DIR_IN | type, 0, target, status, + sizeof(*status), HZ * USB_CTRL_GET_TIMEOUT); + + *(u16 *)data = *status; + kfree(status); + return ret; } /** diff -Nru a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c --- a/drivers/usb/core/urb.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/core/urb.c 2004-11-10 17:19:05 -08:00 @@ -264,11 +264,10 @@ max = usb_maxpacket (dev, pipe, is_out); if (max <= 0) { - dbg ("%s: bogus endpoint %d-%s on usb-%s-%s (bad maxpacket %d)", - __FUNCTION__, - usb_pipeendpoint (pipe), is_out ? "OUT" : "IN", - dev->bus->bus_name, dev->devpath, - max); + dev_dbg(&dev->dev, + "bogus endpoint ep%d%s in %s (bad maxpacket %d)", + usb_pipeendpoint (pipe), is_out ? "out" : "in", + __FUNCTION__, max); return -EMSGSIZE; } diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c --- a/drivers/usb/core/usb.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/core/usb.c 2004-11-10 17:19:04 -08:00 @@ -63,7 +63,8 @@ int nousb; /* Disable USB when built into kernel image */ /* Not honored on modular build */ -static DECLARE_RWSEM(usb_all_devices_rwsem); +DECLARE_RWSEM(usb_all_devices_rwsem); +EXPORT_SYMBOL(usb_all_devices_rwsem); static int generic_probe (struct device *dev) @@ -97,6 +98,7 @@ if (!driver->probe) return error; + /* FIXME we'd much prefer to just resume it ... */ if (interface_to_usbdev(intf)->state == USB_STATE_SUSPENDED) return -EHOSTUNREACH; @@ -550,9 +552,7 @@ return 0; intf = to_usb_interface(dev); - usb_drv = to_usb_driver(drv); - id = usb_drv->id_table; id = usb_match_id (intf, usb_drv->id_table); if (id) @@ -765,6 +765,7 @@ if (dev->bus->op->allocate) if (dev->bus->op->allocate(dev)) { + usb_bus_put(bus); kfree(dev); return NULL; } @@ -1393,6 +1394,10 @@ { struct usb_interface *intf; struct usb_driver *driver; + + /* there's only one USB suspend state */ + if (dev->power.power_state) + return 0; if (dev->driver == &usb_generic_driver) return usb_suspend_device (to_usb_device(dev), state); diff -Nru a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile --- a/drivers/usb/gadget/Makefile 2004-11-10 17:19:02 -08:00 +++ b/drivers/usb/gadget/Makefile 2004-11-10 17:19:02 -08:00 @@ -13,7 +13,7 @@ # g_zero-objs := zero.o usbstring.o config.o epautoconf.o g_ether-objs := ether.o usbstring.o config.o epautoconf.o -g_serial-objs := serial.o usbstring.o epautoconf.o +g_serial-objs := serial.o usbstring.o config.o epautoconf.o gadgetfs-objs := inode.o g_file_storage-objs := file_storage.o usbstring.o config.o \ epautoconf.o diff -Nru a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c --- a/drivers/usb/gadget/dummy_hcd.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/usb/gadget/dummy_hcd.c 2004-11-10 17:19:02 -08:00 @@ -65,7 +65,7 @@ #define DRIVER_DESC "USB Host+Gadget Emulator" -#define DRIVER_VERSION "14 Mar 2004" +#define DRIVER_VERSION "29 Oct 2004" static const char driver_name [] = "dummy_hcd"; static const char driver_desc [] = "USB Host+Gadget Emulator"; @@ -95,6 +95,17 @@ struct usb_request req; }; +static inline struct dummy_ep *usb_ep_to_dummy_ep (struct usb_ep *_ep) +{ + return container_of (_ep, struct dummy_ep, ep); +} + +static inline struct dummy_request *usb_request_to_dummy_request + (struct usb_request *_req) +{ + return container_of (_req, struct dummy_request, req); +} + /*-------------------------------------------------------------------------*/ /* @@ -133,6 +144,7 @@ #define FIFO_SIZE 64 struct dummy { + struct usb_hcd hcd; /* must come first! */ spinlock_t lock; /* @@ -149,37 +161,49 @@ /* * MASTER/HOST side support */ - struct usb_hcd hcd; - struct platform_device pdev; struct timer_list timer; u32 port_status; - int started; - struct completion released; + unsigned started:1; unsigned resuming:1; unsigned long re_timeout; struct usb_device *udev; }; -static struct dummy *the_controller; +static inline struct dummy *hcd_to_dummy (struct usb_hcd *hcd) +{ + return container_of(hcd, struct dummy, hcd); +} + +static inline struct device *dummy_dev (struct dummy *dum) +{ + return dum->hcd.self.controller; +} static inline struct dummy *ep_to_dummy (struct dummy_ep *ep) { return container_of (ep->gadget, struct dummy, gadget); } +static inline struct dummy *gadget_to_dummy (struct usb_gadget *gadget) +{ + return container_of (gadget, struct dummy, gadget); +} + static inline struct dummy *gadget_dev_to_dummy (struct device *dev) { return container_of (dev, struct dummy, gadget.dev); } +static struct dummy *the_controller; + +/*-------------------------------------------------------------------------*/ + /* * This "hardware" may look a bit odd in diagnostics since it's got both * host and device sides; and it binds different drivers to each side. */ -#define hardware (&the_controller->pdev.dev) - -/*-------------------------------------------------------------------------*/ +static struct platform_device the_pdev; static struct device_driver dummy_driver = { .name = (char *) driver_name, @@ -195,8 +219,8 @@ * drivers would do real i/o using dma, fifos, irqs, timers, etc. */ -#define is_enabled() \ - (the_controller->port_status & USB_PORT_STAT_ENABLE) +#define is_enabled(dum) \ + (dum->port_status & USB_PORT_STAT_ENABLE) static int dummy_enable (struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) @@ -206,10 +230,12 @@ unsigned max; int retval; - ep = container_of (_ep, struct dummy_ep, ep); + ep = usb_ep_to_dummy_ep (_ep); if (!_ep || !desc || ep->desc || _ep->name == ep0name || desc->bDescriptorType != USB_DT_ENDPOINT) - if (!the_controller->driver || !is_enabled ()) + return -EINVAL; + dum = ep_to_dummy (ep); + if (!dum->driver || !is_enabled (dum)) return -ESHUTDOWN; max = desc->wMaxPacketSize & 0x3ff; @@ -221,7 +247,6 @@ * have some extra sanity checks. (there could be more though, * especially for "ep9out" style fixed function ones.) */ - dum = container_of (ep->gadget, struct dummy, gadget); retval = -EINVAL; switch (desc->bmAttributes & 0x03) { case USB_ENDPOINT_XFER_BULK: @@ -290,7 +315,7 @@ _ep->maxpacket = max; ep->desc = desc; - dev_dbg (hardware, "enabled %s (ep%d%s-%s) maxpacket %d\n", + dev_dbg (dummy_dev(dum), "enabled %s (ep%d%s-%s) maxpacket %d\n", _ep->name, desc->bEndpointAddress & 0x0f, (desc->bEndpointAddress & USB_DIR_IN) ? "in" : "out", @@ -334,7 +359,7 @@ unsigned long flags; int retval; - ep = container_of (_ep, struct dummy_ep, ep); + ep = usb_ep_to_dummy_ep (_ep); if (!_ep || !ep->desc || _ep->name == ep0name) return -EINVAL; dum = ep_to_dummy (ep); @@ -345,7 +370,7 @@ nuke (dum, ep); spin_unlock_irqrestore (&dum->lock, flags); - dev_dbg (hardware, "disabled %s\n", _ep->name); + dev_dbg (dummy_dev(dum), "disabled %s\n", _ep->name); return retval; } @@ -355,9 +380,9 @@ struct dummy_ep *ep; struct dummy_request *req; - ep = container_of (_ep, struct dummy_ep, ep); if (!_ep) return 0; + ep = usb_ep_to_dummy_ep (_ep); req = kmalloc (sizeof *req, mem_flags); if (!req) @@ -373,11 +398,11 @@ struct dummy_ep *ep; struct dummy_request *req; - ep = container_of (_ep, struct dummy_ep, ep); + ep = usb_ep_to_dummy_ep (_ep); if (!ep || !_req || (!ep->desc && _ep->name != ep0name)) return; - req = container_of (_req, struct dummy_request, req); + req = usb_request_to_dummy_request (_req); WARN_ON (!list_empty (&req->queue)); kfree (req); } @@ -389,9 +414,14 @@ dma_addr_t *dma, int mem_flags ) { - char *retval; + char *retval; + struct dummy_ep *ep; + struct dummy *dum; + + ep = usb_ep_to_dummy_ep (_ep); + dum = ep_to_dummy (ep); - if (!the_controller->driver) + if (!dum->driver) return 0; retval = kmalloc (bytes, mem_flags); *dma = (dma_addr_t) retval; @@ -412,9 +442,6 @@ static void fifo_complete (struct usb_ep *ep, struct usb_request *req) { -#if 0 - dev_dbg (hardware, "fifo_complete: %d\n", req->status); -#endif } static int @@ -425,21 +452,20 @@ struct dummy *dum; unsigned long flags; - req = container_of (_req, struct dummy_request, req); + req = usb_request_to_dummy_request (_req); if (!_req || !list_empty (&req->queue) || !_req->complete) return -EINVAL; - ep = container_of (_ep, struct dummy_ep, ep); + ep = usb_ep_to_dummy_ep (_ep); if (!_ep || (!ep->desc && _ep->name != ep0name)) return -EINVAL; - if (!the_controller->driver || !is_enabled ()) + dum = ep_to_dummy (ep); + if (!dum->driver || !is_enabled (dum)) return -ESHUTDOWN; - dum = container_of (ep->gadget, struct dummy, gadget); - #if 0 - dev_dbg (hardware, "ep %p queue req %p to %s, len %d buf %p\n", + dev_dbg (dummy_dev(dum), "ep %p queue req %p to %s, len %d buf %p\n", ep, _req, _ep->name, _req->length, _req->buf); #endif @@ -482,13 +508,13 @@ unsigned long flags; struct dummy_request *req = 0; - if (!the_controller->driver) - return -ESHUTDOWN; - if (!_ep || !_req) return retval; - ep = container_of (_ep, struct dummy_ep, ep); - dum = container_of (ep->gadget, struct dummy, gadget); + ep = usb_ep_to_dummy_ep (_ep); + dum = ep_to_dummy (ep); + + if (!dum->driver) + return -ESHUTDOWN; spin_lock_irqsave (&dum->lock, flags); list_for_each_entry (req, &ep->queue, queue) { @@ -502,9 +528,9 @@ spin_unlock_irqrestore (&dum->lock, flags); if (retval == 0) { - dev_dbg (hardware, "dequeued req %p from %s, len %d buf %p\n", + dev_dbg (dummy_dev(dum), + "dequeued req %p from %s, len %d buf %p\n", req, _ep->name, _req->length, _req->buf); - _req->complete (_ep, _req); } return retval; @@ -514,12 +540,14 @@ dummy_set_halt (struct usb_ep *_ep, int value) { struct dummy_ep *ep; + struct dummy *dum; if (!_ep) return -EINVAL; - if (!the_controller->driver) + ep = usb_ep_to_dummy_ep (_ep); + dum = ep_to_dummy (ep); + if (!dum->driver) return -ESHUTDOWN; - ep = container_of (_ep, struct dummy_ep, ep); if (!value) ep->halted = 0; else if (ep->desc && (ep->desc->bEndpointAddress & USB_DIR_IN) && @@ -563,7 +591,7 @@ { struct dummy *dum; - dum = container_of (_gadget, struct dummy, gadget); + dum = gadget_to_dummy (_gadget); if ((dum->devstatus & (1 << USB_DEVICE_REMOTE_WAKEUP)) == 0 || !(dum->port_status & (1 << USB_PORT_FEAT_SUSPEND))) return -EINVAL; @@ -578,7 +606,7 @@ { struct dummy *dum; - dum = container_of (_gadget, struct dummy, gadget); + dum = gadget_to_dummy (_gadget); if (value) dum->devstatus |= (1 << USB_DEVICE_SELF_POWERED); else @@ -625,17 +653,11 @@ static void dummy_udc_release (struct device *dev) { - struct dummy *dum = gadget_dev_to_dummy (dev); - - complete (&dum->released); } static void -dummy_hc_release (struct device *dev) +dummy_pdev_release (struct device *dev) { - struct dummy *dum = dev_get_drvdata (dev); - - complete (&dum->released); } static int @@ -644,7 +666,7 @@ int rc; strcpy (dum->gadget.dev.bus_id, "udc"); - dum->gadget.dev.parent = &dum->pdev.dev; + dum->gadget.dev.parent = dummy_dev(dum); dum->gadget.dev.release = dummy_udc_release; rc = device_register (&dum->gadget.dev); @@ -657,9 +679,7 @@ dummy_unregister_udc (struct dummy *dum) { device_remove_file (&dum->gadget.dev, &dev_attr_function); - init_completion (&dum->released); device_unregister (&dum->gadget.dev); - wait_for_completion (&dum->released); } int @@ -711,7 +731,8 @@ dum->driver = driver; dum->gadget.dev.driver = &driver->driver; - dev_dbg (hardware, "binding gadget driver '%s'\n", driver->driver.name); + dev_dbg (dummy_dev(dum), "binding gadget driver '%s'\n", + driver->driver.name); if ((retval = driver->bind (&dum->gadget)) != 0) { dum->driver = 0; dum->gadget.dev.driver = 0; @@ -719,7 +740,7 @@ } // FIXME: Check these calls for errors and re-order - driver->driver.bus = dum->pdev.dev.bus; + driver->driver.bus = dum->gadget.dev.parent->bus; driver_register (&driver->driver); device_bind_driver (&dum->gadget.dev); @@ -765,7 +786,7 @@ if (!driver || driver != dum->driver) return -EINVAL; - dev_dbg (hardware, "unregister gadget driver '%s'\n", + dev_dbg (dummy_dev(dum), "unregister gadget driver '%s'\n", driver->driver.name); spin_lock_irqsave (&dum->lock, flags); @@ -819,14 +840,14 @@ if (!urb->transfer_buffer && urb->transfer_buffer_length) return -EINVAL; - dum = container_of (hcd, struct dummy, hcd); + dum = hcd_to_dummy (hcd); spin_lock_irqsave (&dum->lock, flags); if (!dum->udev) { dum->udev = urb->dev; usb_get_dev (dum->udev); } else if (unlikely (dum->udev != urb->dev)) - dev_err (hardware, "usb_device address has changed!\n"); + dev_err (dummy_dev(dum), "usb_device address has changed!\n"); urb->hcpriv = dum; if (usb_pipetype (urb->pipe) == PIPE_CONTROL) @@ -1052,7 +1073,7 @@ total = 512/*bytes*/ * 13/*packets*/ * 8/*uframes*/; break; default: - dev_err (hardware, "bogus device speed\n"); + dev_err (dummy_dev(dum), "bogus device speed\n"); return; } @@ -1062,7 +1083,8 @@ spin_lock_irqsave (&dum->lock, flags); if (!dum->udev) { - dev_err (hardware, "timer fired with no URBs pending?\n"); + dev_err (dummy_dev(dum), + "timer fired with no URBs pending?\n"); spin_unlock_irqrestore (&dum->lock, flags); return; } @@ -1103,7 +1125,7 @@ ep = find_endpoint(dum, address); if (!ep) { /* set_configuration() disagreement */ - dev_dbg (hardware, + dev_dbg (dummy_dev(dum), "no ep configured for urb %p\n", urb); maybe_set_status (urb, -EPROTO); @@ -1119,7 +1141,7 @@ } if (ep->halted && !ep->setup_stage) { /* NOTE: must not be iso! */ - dev_dbg (hardware, "ep %s halted, urb %p\n", + dev_dbg (dummy_dev(dum), "ep %s halted, urb %p\n", ep->ep.name, urb); maybe_set_status (urb, -EPIPE); goto return_urb; @@ -1145,7 +1167,8 @@ list_for_each_entry (req, &ep->queue, queue) { list_del_init (&req->queue); req->req.status = -EOVERFLOW; - dev_dbg (hardware, "stale req = %p\n", req); + dev_dbg (dummy_dev(dum), "stale req = %p\n", + req); spin_unlock (&dum->lock); req->req.complete (&ep->ep, &req->req); @@ -1167,7 +1190,7 @@ break; dum->address = setup.wValue; maybe_set_status (urb, 0); - dev_dbg (hardware, "set_address = %d\n", + dev_dbg (dummy_dev(dum), "set_address = %d\n", setup.wValue); value = 0; break; @@ -1283,7 +1306,7 @@ if (value < 0) { if (value != -EOPNOTSUPP) - dev_dbg (hardware, + dev_dbg (dummy_dev(dum), "setup --> %d\n", value); maybe_set_status (urb, -EPIPE); @@ -1363,14 +1386,14 @@ unsigned long flags; int retval; - dum = container_of (hcd, struct dummy, hcd); + dum = hcd_to_dummy (hcd); spin_lock_irqsave (&dum->lock, flags); if (!(dum->port_status & PORT_C_MASK)) retval = 0; else { *buf = (1 << 1); - dev_dbg (hardware, "port status 0x%08x has changes\n", + dev_dbg (dummy_dev(dum), "port status 0x%08x has changes\n", dum->port_status); retval = 1; } @@ -1402,7 +1425,7 @@ int retval = 0; unsigned long flags; - dum = container_of (hcd, struct dummy, hcd); + dum = hcd_to_dummy (hcd); spin_lock_irqsave (&dum->lock, flags); switch (typeReq) { case ClearHubFeature: @@ -1503,7 +1526,8 @@ | USB_PORT_STAT_LOW_SPEED | USB_PORT_STAT_HIGH_SPEED); if (dum->driver) { - dev_dbg (hardware, "disconnect\n"); + dev_dbg (dummy_dev(dum), + "disconnect\n"); stop_activity (dum, dum->driver); } @@ -1518,7 +1542,7 @@ break; default: - dev_dbg (hardware, + dev_dbg (dummy_dev(dum), "hub control req%04x v%04x i%04x l%d\n", typeReq, wValue, wIndex, wLength); @@ -1538,20 +1562,12 @@ dum = kmalloc (sizeof *dum, SLAB_KERNEL); if (dum == NULL) - return 0; + return NULL; + the_controller = dum; memset (dum, 0, sizeof *dum); return &dum->hcd; } -static void dummy_free (struct usb_hcd *hcd) -{ - struct dummy *dum; - - dum = container_of (hcd, struct dummy, hcd); - WARN_ON (dum->driver != 0); - kfree (dum); -} - /*-------------------------------------------------------------------------*/ static inline ssize_t @@ -1583,7 +1599,8 @@ static ssize_t show_urbs (struct device *dev, char *buf) { - struct dummy *dum = dev_get_drvdata(dev); + struct usb_hcd *hcd = dev_get_drvdata (dev); + struct dummy *dum = hcd_to_dummy (hcd); struct urb *urb; size_t size = 0; unsigned long flags; @@ -1606,17 +1623,13 @@ } static DEVICE_ATTR (urbs, S_IRUGO, show_urbs, NULL); - -static const struct hc_driver dummy_hcd; - static int dummy_start (struct usb_hcd *hcd) { struct dummy *dum; - struct usb_bus *bus; struct usb_device *root; int retval; - dum = container_of (hcd, struct dummy, hcd); + dum = hcd_to_dummy (hcd); /* * MASTER side init ... we emulate a root hub that'll only ever @@ -1625,121 +1638,56 @@ */ spin_lock_init (&dum->lock); - retval = driver_register (&dummy_driver); - if (retval < 0) - return retval; - - dum->pdev.name = "hc"; - dum->pdev.dev.driver = &dummy_driver; - dev_set_drvdata(&dum->pdev.dev, dum); - dum->pdev.dev.release = dummy_hc_release; - retval = platform_device_register (&dum->pdev); - if (retval < 0) { - driver_unregister (&dummy_driver); - return retval; - } - dev_info (&dum->pdev.dev, "%s, driver " DRIVER_VERSION "\n", - driver_desc); - - hcd->self.controller = &dum->pdev.dev; - - /* FIXME 'urbs' should be a per-device thing, maybe in usbcore */ - device_create_file (hcd->self.controller, &dev_attr_urbs); - init_timer (&dum->timer); dum->timer.function = dummy_timer; dum->timer.data = (unsigned long) dum; - /* root hub will appear as another device */ - dum->hcd.driver = (struct hc_driver *) &dummy_hcd; - dum->hcd.description = dummy_hcd.description; - dum->hcd.product_desc = "Dummy host controller"; - - bus = hcd_to_bus (&dum->hcd); - bus->bus_name = dum->pdev.dev.bus_id; - usb_bus_init (bus); - bus->op = &usb_hcd_operations; - bus->hcpriv = &dum->hcd; - - /* FIXME don't require the pci-based buffer/alloc impls; - * the "generic dma" implementation still requires them, - * it's not very generic yet. - */ - if ((retval = hcd_buffer_create (&dum->hcd)) != 0) { -clean0: - init_completion (&dum->released); - platform_device_unregister (&dum->pdev); - wait_for_completion (&dum->released); - driver_unregister (&dummy_driver); - return retval; - } - - INIT_LIST_HEAD (&hcd->dev_list); - usb_register_bus (bus); - - root = usb_alloc_dev (0, bus, 0); - if (!root) { - retval = -ENOMEM; -clean1: - hcd_buffer_destroy (&dum->hcd); - usb_deregister_bus (bus); - goto clean0; - } + root = usb_alloc_dev (0, &hcd->self, 0); + if (!root) + return -ENOMEM; /* root hub enters addressed state... */ - dum->hcd.state = USB_STATE_RUNNING; + hcd->state = USB_STATE_RUNNING; root->speed = USB_SPEED_HIGH; /* ...then configured, so khubd sees us. */ - if ((retval = hcd_register_root (root, &dum->hcd)) != 0) { + if ((retval = hcd_register_root (root, hcd)) != 0) { usb_put_dev (root); -clean2: - dum->hcd.state = USB_STATE_QUIESCING; - goto clean1; +clean: + hcd->state = USB_STATE_QUIESCING; + return retval; } /* only show a low-power port: just 8mA */ hub_set_power_budget (root, 8); - dum->started = 1; - if ((retval = dummy_register_udc (dum)) != 0) { - dum->started = 0; - usb_disconnect (&bus->root_hub); - goto clean2; + usb_disconnect (&hcd->self.root_hub); + goto clean; } + + /* FIXME 'urbs' should be a per-device thing, maybe in usbcore */ + device_create_file (dummy_dev(dum), &dev_attr_urbs); + + dum->started = 1; return 0; } static void dummy_stop (struct usb_hcd *hcd) { struct dummy *dum; - struct usb_bus *bus; - dum = container_of (hcd, struct dummy, hcd); + dum = hcd_to_dummy (hcd); if (!dum->started) return; dum->started = 0; + device_remove_file (dummy_dev(dum), &dev_attr_urbs); + usb_gadget_unregister_driver (dum->driver); dummy_unregister_udc (dum); - bus = hcd_to_bus (&dum->hcd); - hcd->state = USB_STATE_QUIESCING; - dev_dbg (hardware, "remove root hub\n"); - usb_disconnect (&bus->root_hub); - - hcd_buffer_destroy (&dum->hcd); - usb_deregister_bus (bus); - - dev_info (hardware, "stopped\n"); - - device_remove_file (hcd->self.controller, &dev_attr_urbs); - init_completion (&dum->released); - platform_device_unregister (&dum->pdev); - wait_for_completion (&dum->released); - - driver_unregister (&dummy_driver); + dev_info (dummy_dev(dum), "stopped\n"); } /*-------------------------------------------------------------------------*/ @@ -1757,7 +1705,6 @@ .stop = dummy_stop, .hcd_alloc = dummy_alloc, - .hcd_free = dummy_free, .urb_enqueue = dummy_urb_enqueue, .urb_dequeue = dummy_urb_dequeue, @@ -1768,33 +1715,128 @@ .hub_control = dummy_hub_control, }; -/*-------------------------------------------------------------------------*/ +static void dummy_remove (struct device *dev); -static int __init init (void) +static int dummy_probe (struct device *dev) { struct usb_hcd *hcd; - int value; + struct dummy *dum; + int retval; - if (usb_disabled ()) - return -ENODEV; - if ((hcd = dummy_alloc ()) == 0) + dev_info (dev, "%s, driver " DRIVER_VERSION "\n", driver_desc); + + hcd = dummy_alloc (); + if (hcd == NULL) { + dev_dbg (dev, "hcd_alloc failed\n"); return -ENOMEM; + } + + dev_set_drvdata (dev, hcd); + dum = hcd_to_dummy (hcd); - the_controller = container_of (hcd, struct dummy, hcd); - value = dummy_start (hcd); + hcd->driver = (struct hc_driver *) &dummy_hcd; + hcd->description = dummy_hcd.description; + hcd->self.controller = dev; - if (value != 0) { - dummy_free (hcd); - the_controller = 0; + /* FIXME don't require the pci-based buffer/alloc impls; + * the "generic dma" implementation still requires them, + * it's not very generic yet. + */ + retval = hcd_buffer_create (hcd); + if (retval != 0) { + dev_dbg (dev, "pool alloc failed\n"); + goto err1; } - return value; + + usb_bus_init (&hcd->self); + hcd->self.op = &usb_hcd_operations; + hcd->self.release = &usb_hcd_release; + hcd->self.hcpriv = hcd; + hcd->self.bus_name = dev->bus_id; + hcd->product_desc = "Dummy host controller"; + + INIT_LIST_HEAD (&hcd->dev_list); + + usb_register_bus (&hcd->self); + + if ((retval = dummy_start (hcd)) < 0) + dummy_remove (dev); + return retval; + +err1: + kfree (hcd); + dev_set_drvdata (dev, NULL); + return retval; +} + +static void dummy_remove (struct device *dev) +{ + struct usb_hcd *hcd; + struct dummy *dum; + + hcd = dev_get_drvdata (dev); + dum = hcd_to_dummy (hcd); + + hcd->state = USB_STATE_QUIESCING; + + dev_dbg (dev, "roothub graceful disconnect\n"); + usb_disconnect (&hcd->self.root_hub); + + hcd->driver->stop (hcd); + hcd->state = USB_STATE_HALT; + + hcd_buffer_destroy (hcd); + + dev_set_drvdata (dev, NULL); + usb_deregister_bus (&hcd->self); + the_controller = NULL; +} + +/*-------------------------------------------------------------------------*/ + +static int dummy_pdev_detect (void) +{ + int retval; + + retval = driver_register (&dummy_driver); + if (retval < 0) + return retval; + + the_pdev.name = "hc"; + the_pdev.dev.driver = &dummy_driver; + the_pdev.dev.release = dummy_pdev_release; + + retval = platform_device_register (&the_pdev); + if (retval < 0) + driver_unregister (&dummy_driver); + return retval; +} + +static void dummy_pdev_remove (void) +{ + platform_device_unregister (&the_pdev); + driver_unregister (&dummy_driver); +} + +/*-------------------------------------------------------------------------*/ + +static int __init init (void) +{ + int retval; + + if (usb_disabled ()) + return -ENODEV; + if ((retval = dummy_pdev_detect ()) != 0) + return retval; + if ((retval = dummy_probe (&the_pdev.dev)) != 0) + dummy_pdev_remove (); + return retval; } module_init (init); static void __exit cleanup (void) { - dummy_stop (&the_controller->hcd); - dummy_free (&the_controller->hcd); - the_controller = 0; + dummy_remove (&the_pdev.dev); + dummy_pdev_remove (); } module_exit (cleanup); diff -Nru a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c --- a/drivers/usb/gadget/ether.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/usb/gadget/ether.c 2004-11-10 17:19:07 -08:00 @@ -856,7 +856,7 @@ /* descriptors that are built on-demand */ -static char manufacturer [40]; +static char manufacturer [50]; static char product_desc [40] = DRIVER_DESC; #ifdef DEV_CONFIG_CDC @@ -2183,7 +2183,7 @@ ); /* ensure there are no more active requests */ - if (dev->gadget->speed != USB_SPEED_UNKNOWN) { + if (dev->config) { usb_ep_disable (dev->in_ep); usb_ep_disable (dev->out_ep); if (netif_carrier_ok (dev->net)) { @@ -2320,7 +2320,7 @@ } else if (gadget_is_lh7a40x(gadget)) { device_desc.bcdDevice = __constant_cpu_to_le16 (0x0209); } else if (gadget_is_n9604(gadget)) { - device_desc.bcdDevice = __constant_cpu_to_le16 (0x020a); + device_desc.bcdDevice = __constant_cpu_to_le16 (0x0210); } else { /* can't assume CDC works. don't want to default to * anything less functional on CDC-capable hardware, diff -Nru a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c --- a/drivers/usb/gadget/file_storage.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/usb/gadget/file_storage.c 2004-11-10 17:19:07 -08:00 @@ -250,7 +250,7 @@ #define DRIVER_DESC "File-backed Storage Gadget" #define DRIVER_NAME "g_file_storage" -#define DRIVER_VERSION "31 August 2004" +#define DRIVER_VERSION "20 October 2004" static const char longname[] = DRIVER_DESC; static const char shortname[] = DRIVER_NAME; @@ -430,9 +430,9 @@ /* Command Block Wrapper */ struct bulk_cb_wrap { - u32 Signature; // Contains 'USBC' + __le32 Signature; // Contains 'USBC' u32 Tag; // Unique per command id - u32 DataTransferLength; // Size of the data + __le32 DataTransferLength; // Size of the data u8 Flags; // Direction in bit 7 u8 Lun; // LUN (normally 0) u8 Length; // Of the CDB, <= MAX_COMMAND_SIZE @@ -445,9 +445,9 @@ /* Command Status Wrapper */ struct bulk_cs_wrap { - u32 Signature; // Should = 'USBS' + __le32 Signature; // Should = 'USBS' u32 Tag; // Same as original command - u32 Residue; // Amount not transferred + __le32 Residue; // Amount not transferred u8 Status; // See below }; @@ -1010,7 +1010,7 @@ /* The CBI specification limits the serial string to 12 uppercase hexadecimal * characters. */ -static char manufacturer[40]; +static char manufacturer[50]; static char serial[13]; /* Static strings, in UTF-8 (for simplicity we use only ASCII characters) */ @@ -1035,7 +1035,9 @@ static int populate_config_buf(struct usb_gadget *gadget, u8 *buf, u8 type, unsigned index) { +#ifdef CONFIG_USB_GADGET_DUALSPEED enum usb_device_speed speed = gadget->speed; +#endif int len; const struct usb_descriptor_header **function; @@ -3717,30 +3719,30 @@ if (mod_data.release == 0xffff) { // Parameter wasn't set if (gadget_is_net2280(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0301); + mod_data.release = 0x0301; else if (gadget_is_dummy(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0302); + mod_data.release = 0x0302; else if (gadget_is_pxa(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0303); + mod_data.release = 0x0303; else if (gadget_is_sh(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0304); + mod_data.release = 0x0304; /* The sa1100 controller is not supported */ else if (gadget_is_goku(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0306); + mod_data.release = 0x0306; else if (gadget_is_mq11xx(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0307); + mod_data.release = 0x0307; else if (gadget_is_omap(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0308); + mod_data.release = 0x0308; else if (gadget_is_lh7a40x(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16 (0x0309); + mod_data.release = 0x0309; else if (gadget_is_n9604(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16 (0x030a); + mod_data.release = 0x0310; else { WARN(fsg, "controller '%s' not recognized\n", fsg->gadget->name); - mod_data.release = __constant_cpu_to_le16(0x0399); + mod_data.release = 0x0399; } } diff -Nru a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c --- a/drivers/usb/gadget/goku_udc.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/usb/gadget/goku_udc.c 2004-11-10 17:19:02 -08:00 @@ -90,7 +90,7 @@ static void nuke(struct goku_ep *, int status); static inline void -command(struct goku_udc_regs *regs, int command, unsigned epnum) +command(struct goku_udc_regs __iomem *regs, int command, unsigned epnum) { writel(COMMAND_EP(epnum) | command, ®s->Command); udelay(300); @@ -161,8 +161,8 @@ /* ep1 and ep2 can do double buffering and/or dma */ if (ep->num < 3) { - struct goku_udc_regs *regs = ep->dev->regs; - u32 tmp; + struct goku_udc_regs __iomem *regs = ep->dev->regs; + u32 tmp; /* double buffer except (for now) with pio in */ tmp = ((ep->dma || !ep->is_in) @@ -191,7 +191,7 @@ return 0; } -static void ep_reset(struct goku_udc_regs *regs, struct goku_ep *ep) +static void ep_reset(struct goku_udc_regs __iomem *regs, struct goku_ep *ep) { struct goku_udc *dev = ep->dev; @@ -209,16 +209,16 @@ writel(dev->int_enable, ®s->int_enable); readl(®s->int_enable); if (ep->num < 3) { - struct goku_udc_regs *regs = ep->dev->regs; - u32 tmp; + struct goku_udc_regs __iomem *r = ep->dev->regs; + u32 tmp; - tmp = readl(®s->EPxSingle); + tmp = readl(&r->EPxSingle); tmp &= ~(0x11 << ep->num); - writel(tmp, ®s->EPxSingle); + writel(tmp, &r->EPxSingle); - tmp = readl(®s->EPxBCS); + tmp = readl(&r->EPxBCS); tmp &= ~(0x11 << ep->num); - writel(tmp, ®s->EPxBCS); + writel(tmp, &r->EPxBCS); } /* reset dma in case we're still using it */ if (ep->dma) { @@ -237,7 +237,7 @@ } ep->ep.maxpacket = MAX_FIFO_SIZE; - ep->desc = 0; + ep->desc = NULL; ep->stopped = 1; ep->irqs = 0; ep->dma = 0; @@ -274,10 +274,10 @@ struct goku_request *req; if (!_ep) - return 0; + return NULL; req = kmalloc(sizeof *req, gfp_flags); if (!req) - return 0; + return NULL; memset(req, 0, sizeof *req); req->req.dma = DMA_ADDR_INVALID; @@ -334,7 +334,7 @@ ep = container_of(_ep, struct goku_ep, ep); if (!_ep) - return 0; + return NULL; *dma = DMA_ADDR_INVALID; #if defined(USE_KMALLOC) @@ -413,7 +413,7 @@ /*-------------------------------------------------------------------------*/ static inline int -write_packet(u32 *fifo, u8 *buf, struct goku_request *req, unsigned max) +write_packet(u32 __iomem *fifo, u8 *buf, struct goku_request *req, unsigned max) { unsigned length, count; @@ -488,10 +488,10 @@ static int read_fifo(struct goku_ep *ep, struct goku_request *req) { - struct goku_udc_regs *regs; - u32 size, set; - u8 *buf; - unsigned bufferspace, is_short, dbuff; + struct goku_udc_regs __iomem *regs; + u32 size, set; + u8 *buf; + unsigned bufferspace, is_short, dbuff; regs = ep->dev->regs; top: @@ -581,7 +581,8 @@ } static inline void -pio_irq_enable(struct goku_udc *dev, struct goku_udc_regs *regs, int epnum) +pio_irq_enable(struct goku_udc *dev, + struct goku_udc_regs __iomem *regs, int epnum) { dev->int_enable |= INT_EPxDATASET (epnum); writel(dev->int_enable, ®s->int_enable); @@ -589,7 +590,8 @@ } static inline void -pio_irq_disable(struct goku_udc *dev, struct goku_udc_regs *regs, int epnum) +pio_irq_disable(struct goku_udc *dev, + struct goku_udc_regs __iomem *regs, int epnum) { dev->int_enable &= ~INT_EPxDATASET (epnum); writel(dev->int_enable, ®s->int_enable); @@ -613,10 +615,10 @@ // return: 0 = q running, 1 = q stopped, negative = errno static int start_dma(struct goku_ep *ep, struct goku_request *req) { - struct goku_udc_regs *regs = ep->dev->regs; - u32 master; - u32 start = req->req.dma; - u32 end = start + req->req.length - 1; + struct goku_udc_regs __iomem *regs = ep->dev->regs; + u32 master; + u32 start = req->req.dma; + u32 end = start + req->req.length - 1; master = readl(®s->dma_master) & MST_RW_BITS; @@ -668,9 +670,9 @@ static void dma_advance(struct goku_udc *dev, struct goku_ep *ep) { - struct goku_request *req; - struct goku_udc_regs *regs = ep->dev->regs; - u32 master; + struct goku_request *req; + struct goku_udc_regs __iomem *regs = ep->dev->regs; + u32 master; master = readl(®s->dma_master); @@ -716,9 +718,9 @@ static void abort_dma(struct goku_ep *ep, int status) { - struct goku_udc_regs *regs = ep->dev->regs; - struct goku_request *req; - u32 curr, master; + struct goku_udc_regs __iomem *regs = ep->dev->regs; + struct goku_request *req; + u32 curr, master; /* NAK future host requests, hoping the implicit delay lets the * dma engine finish reading (or writing) its latest packet and @@ -848,7 +850,7 @@ if (unlikely(status != 0)) { if (status > 0) status = 0; - req = 0; + req = NULL; } } /* else pio or dma irq handler advances the queue. */ @@ -927,7 +929,7 @@ } else if (!list_empty(&req->queue)) done(ep, req, -ECONNRESET); else - req = 0; + req = NULL; spin_unlock_irqrestore(&dev->lock, flags); return req ? 0 : -EOPNOTSUPP; @@ -984,7 +986,8 @@ retval = -EAGAIN; else if (ep->is_in && value /* data in (either) packet buffer? */ - && (ep->dev->regs->DataSet & DATASET_AB(ep->num))) + && (readl(&ep->dev->regs->DataSet) + & DATASET_AB(ep->num))) retval = -EAGAIN; else if (!value) goku_clear_halt(ep); @@ -1000,9 +1003,9 @@ static int goku_fifo_status(struct usb_ep *_ep) { - struct goku_ep *ep; - struct goku_udc_regs *regs; - u32 size; + struct goku_ep *ep; + struct goku_udc_regs __iomem *regs; + u32 size; if (!_ep) return -ENODEV; @@ -1022,9 +1025,9 @@ static void goku_fifo_flush(struct usb_ep *_ep) { - struct goku_ep *ep; - struct goku_udc_regs *regs; - u32 size; + struct goku_ep *ep; + struct goku_udc_regs __iomem *regs; + u32 size; if (!_ep) return; @@ -1141,14 +1144,14 @@ udc_proc_read(char *buffer, char **start, off_t off, int count, int *eof, void *_dev) { - char *buf = buffer; - struct goku_udc *dev = _dev; - struct goku_udc_regs *regs = dev->regs; - char *next = buf; - unsigned size = count; - unsigned long flags; - int i, t, is_usb_connected; - u32 tmp; + char *buf = buffer; + struct goku_udc *dev = _dev; + struct goku_udc_regs __iomem *regs = dev->regs; + char *next = buf; + unsigned size = count; + unsigned long flags; + int i, t, is_usb_connected; + u32 tmp; if (off != 0) return 0; @@ -1336,17 +1339,17 @@ ep->dev = dev; INIT_LIST_HEAD (&ep->queue); - ep_reset(0, ep); + ep_reset(NULL, ep); } - dev->ep[0].reg_mode = 0; + dev->ep[0].reg_mode = NULL; dev->ep[0].ep.maxpacket = MAX_EP0_SIZE; list_del_init (&dev->ep[0].ep.ep_list); } static void udc_reset(struct goku_udc *dev) { - struct goku_udc_regs *regs = dev->regs; + struct goku_udc_regs __iomem *regs = dev->regs; writel(0, ®s->power_detect); writel(0, ®s->int_enable); @@ -1363,8 +1366,8 @@ static void ep0_start(struct goku_udc *dev) { - struct goku_udc_regs *regs = dev->regs; - unsigned i; + struct goku_udc_regs __iomem *regs = dev->regs; + unsigned i; VDBG(dev, "%s\n", __FUNCTION__); @@ -1441,15 +1444,15 @@ return -EBUSY; /* hook up the driver */ - driver->driver.bus = 0; + driver->driver.bus = NULL; dev->driver = driver; dev->gadget.dev.driver = &driver->driver; retval = driver->bind(&dev->gadget); if (retval) { DBG(dev, "bind to driver %s --> error %d\n", driver->driver.name, retval); - dev->driver = 0; - dev->gadget.dev.driver = 0; + dev->driver = NULL; + dev->gadget.dev.driver = NULL; return retval; } @@ -1471,7 +1474,7 @@ DBG (dev, "%s\n", __FUNCTION__); if (dev->gadget.speed == USB_SPEED_UNKNOWN) - driver = 0; + driver = NULL; /* disconnect gadget driver after quiesceing hw and the driver */ udc_reset (dev); @@ -1498,7 +1501,7 @@ return -EINVAL; spin_lock_irqsave(&dev->lock, flags); - dev->driver = 0; + dev->driver = NULL; stop_activity(dev, driver); spin_unlock_irqrestore(&dev->lock, flags); @@ -1514,9 +1517,9 @@ static void ep0_setup(struct goku_udc *dev) { - struct goku_udc_regs *regs = dev->regs; - struct usb_ctrlrequest ctrl; - int tmp; + struct goku_udc_regs __iomem *regs = dev->regs; + struct usb_ctrlrequest ctrl; + int tmp; /* read SETUP packet and enter DATA stage */ ctrl.bRequestType = readl(®s->bRequestType); @@ -1623,11 +1626,11 @@ static irqreturn_t goku_irq(int irq, void *_dev, struct pt_regs *r) { - struct goku_udc *dev = _dev; - struct goku_udc_regs *regs = dev->regs; - struct goku_ep *ep; - u32 stat, handled = 0; - unsigned i, rescans = 5; + struct goku_udc *dev = _dev; + struct goku_udc_regs __iomem *regs = dev->regs; + struct goku_ep *ep; + u32 stat, handled = 0; + unsigned i, rescans = 5; spin_lock(&dev->lock); @@ -1645,7 +1648,7 @@ stat = 0; handled = 1; // FIXME have a neater way to prevent re-enumeration - dev->driver = 0; + dev->driver = NULL; goto done; } if (stat & INT_PWRDETECT) { @@ -1825,9 +1828,9 @@ pci_disable_device(pdev); device_unregister(&dev->gadget.dev); - pci_set_drvdata(pdev, 0); - dev->regs = 0; - the_controller = 0; + pci_set_drvdata(pdev, NULL); + dev->regs = NULL; + the_controller = NULL; INFO(dev, "unbind\n"); } @@ -1838,9 +1841,9 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id) { - struct goku_udc *dev = 0; + struct goku_udc *dev = NULL; unsigned long resource, len; - void *base = 0; + void __iomem *base = NULL; int retval; char buf [8], *bufp; @@ -1900,7 +1903,7 @@ retval = -EFAULT; goto done; } - dev->regs = (struct goku_udc_regs *) base; + dev->regs = (struct goku_udc_regs __iomem *) base; pci_set_drvdata(pdev, dev); INFO(dev, "%s\n", driver_desc); diff -Nru a/drivers/usb/gadget/goku_udc.h b/drivers/usb/gadget/goku_udc.h --- a/drivers/usb/gadget/goku_udc.h 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/gadget/goku_udc.h 2004-11-10 17:19:04 -08:00 @@ -216,9 +216,9 @@ struct list_head queue; const struct usb_endpoint_descriptor *desc; - u32 *reg_fifo; - u32 *reg_mode; - u32 *reg_status; + u32 __iomem *reg_fifo; + u32 __iomem *reg_mode; + u32 __iomem *reg_status; }; struct goku_request { @@ -253,7 +253,7 @@ /* pci state used to access those endpoints */ struct pci_dev *pdev; - struct goku_udc_regs *regs; + struct goku_udc_regs __iomem *regs; u32 int_enable; /* statistics... */ diff -Nru a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c --- a/drivers/usb/gadget/inode.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/gadget/inode.c 2004-11-10 17:19:05 -08:00 @@ -1981,12 +1981,8 @@ { struct dentry *dentry; struct inode *inode; - struct qstr qname; - qname.name = name; - qname.len = strlen (name); - qname.hash = full_name_hash (qname.name, qname.len); - dentry = d_alloc (sb->s_root, &qname); + dentry = d_alloc_name(sb->s_root, name); if (!dentry) return NULL; diff -Nru a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c --- a/drivers/usb/gadget/net2280.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/usb/gadget/net2280.c 2004-11-10 17:19:02 -08:00 @@ -717,7 +717,7 @@ dmacount |= (1 << DMA_DONE_INTERRUPT_ENABLE); /* td->dmadesc = previously set by caller */ - td->dmaaddr = cpu_to_le32p (&req->req.dma); + td->dmaaddr = cpu_to_le32 (req->req.dma); /* 2280 may be polling VALID_BIT through ep->dma->dmadesc */ wmb (); @@ -1707,8 +1707,10 @@ td = req->td; t = scnprintf (next, size, "\t td %08x " " count %08x buf %08x desc %08x\n", - req->td_dma, td->dmacount, - td->dmaaddr, td->dmadesc); + (u32) req->td_dma, + le32_to_cpu (td->dmacount), + le32_to_cpu (td->dmaaddr), + le32_to_cpu (td->dmadesc)); if (t <= 0 || t > size) goto done; size -= t; @@ -2845,6 +2847,7 @@ dev->got_irq = 1; /* DMA setup */ + /* NOTE: we know only the 32 LSBs of dma addresses may be nonzero */ dev->requests = pci_pool_create ("requests", pdev, sizeof (struct net2280_dma), 0 /* no alignment requirements */, diff -Nru a/drivers/usb/gadget/net2280.h b/drivers/usb/gadget/net2280.h --- a/drivers/usb/gadget/net2280.h 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/gadget/net2280.h 2004-11-10 17:19:05 -08:00 @@ -495,10 +495,10 @@ * use struct net2280_dma_regs bitfields */ struct net2280_dma { - u32 dmacount; - u32 dmaaddr; /* the buffer */ - u32 dmadesc; /* next dma descriptor */ - u32 _reserved; + __le32 dmacount; + __le32 dmaaddr; /* the buffer */ + __le32 dmadesc; /* next dma descriptor */ + __le32 _reserved; } __attribute__ ((aligned (16))); /*-------------------------------------------------------------------------*/ diff -Nru a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c --- a/drivers/usb/gadget/omap_udc.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/usb/gadget/omap_udc.c 2004-11-10 17:19:03 -08:00 @@ -59,15 +59,14 @@ #undef USB_TRACE -/* OUT-dma seems to be behaving */ +/* bulk DMA seems to be behaving for both IN and OUT */ #define USE_DMA /* ISO too */ #define USE_ISO - #define DRIVER_DESC "OMAP UDC driver" -#define DRIVER_VERSION "24 August 2004" +#define DRIVER_VERSION "4 October 2004" #define DMA_ADDR_INVALID (~(dma_addr_t)0) @@ -104,7 +103,6 @@ module_param (fifo_mode, uint, 0); MODULE_PARM_DESC (fifo_mode, "endpoint setup (0 == default)"); - #ifdef USE_DMA static unsigned use_dma = 1; @@ -224,18 +222,17 @@ list_add(&ep->iso, &udc->iso); /* maybe assign a DMA channel to this endpoint */ - if (use_dma && desc->bmAttributes == USB_ENDPOINT_XFER_BULK - && !(ep->bEndpointAddress & USB_DIR_IN)) - /* FIXME ISO can dma, but prefers first channel. - * IN can dma, but lacks debugging. - */ + if (use_dma && desc->bmAttributes == USB_ENDPOINT_XFER_BULK) + /* FIXME ISO can dma, but prefers first channel */ dma_channel_claim(ep, 0); /* PIO OUT may RX packets */ if (desc->bmAttributes != USB_ENDPOINT_XFER_ISOC && !ep->has_dma - && !(ep->bEndpointAddress & USB_DIR_IN)) + && !(ep->bEndpointAddress & USB_DIR_IN)) { UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } spin_unlock_irqrestore(&udc->lock, flags); VDBG("%s enabled\n", _ep->name); @@ -262,6 +259,7 @@ ep->has_dma = 0; UDC_CTRL_REG = UDC_SET_HALT; list_del_init(&ep->iso); + del_timer(&ep->timer); spin_unlock_irqrestore(&ep->udc->lock, flags); @@ -498,17 +496,22 @@ u16 ep_stat = UDC_STAT_FLG_REG; is_last = 0; - if (ep_stat & FIFO_UNREADABLE) + if (ep_stat & FIFO_EMPTY) { + if (!ep->double_buf) + break; + ep->fnf = 1; + } + if (ep_stat & UDC_EP_HALTED) break; - if (ep_stat & (UDC_NON_ISO_FIFO_FULL|UDC_ISO_FIFO_FULL)) + if (ep_stat & FIFO_FULL) avail = ep->ep.maxpacket; - else + else { avail = UDC_RXFSTAT_REG; + ep->fnf = ep->double_buf; + } count = read_packet(buf, req, avail); - // FIXME double buffered PIO OUT wasn't behaving... - /* partial packet reads may not be errors */ if (count < ep->ep.maxpacket) { is_last = 1; @@ -526,26 +529,56 @@ if (!ep->bEndpointAddress) break; - if (!ep->double_buf) { - UDC_CTRL_REG = UDC_SET_FIFO_EN; - if (!is_last) - break; - } - - if (is_last) { + if (is_last) done(ep, req, 0); - if (list_empty(&ep->queue) || !ep->double_buf) - break; - req = container_of(ep->queue.next, - struct omap_req, queue); - is_last = 0; - } + break; } return is_last; } /*-------------------------------------------------------------------------*/ +static u16 dma_src_len(struct omap_ep *ep, dma_addr_t start) +{ + dma_addr_t end; + + /* IN-DMA needs this on fault/cancel paths, so 15xx misreports + * the last transfer's bytecount by more than a FIFO's worth. + */ + if (cpu_is_omap15xx()) + return 0; + + end = omap_readw(OMAP_DMA_CSAC(ep->lch)); + if (end == ep->dma_counter) + return 0; + + end |= start & (0xffff << 16); + if (end < start) + end += 0x10000; + return end - start; +} + +#define DMA_DEST_LAST(x) (cpu_is_omap15xx() \ + ? OMAP_DMA_CSAC(x) /* really: CPC */ \ + : OMAP_DMA_CDAC(x)) + +static u16 dma_dest_len(struct omap_ep *ep, dma_addr_t start) +{ + dma_addr_t end; + + end = omap_readw(DMA_DEST_LAST(ep->lch)); + if (end == ep->dma_counter) + return 0; + + end |= start & (0xffff << 16); + if (cpu_is_omap15xx()) + end++; + if (end < start) + end += 0x10000; + return end - start; +} + + /* Each USB transfer request using DMA maps to one or more DMA transfers. * When DMA completion isn't request completion, the UDC continues with * the next DMA transfer for that USB transfer. @@ -555,26 +588,29 @@ { u16 txdma_ctrl; unsigned length = req->req.length - req->req.actual; + const int sync_mode = cpu_is_omap15xx() + ? OMAP_DMA_SYNC_FRAME + : OMAP_DMA_SYNC_ELEMENT; /* measure length in either bytes or packets */ - if (length <= (UDC_TXN_TSC + 1)) { + if ((cpu_is_omap16xx() && length <= (UDC_TXN_TSC + 1)) + || (cpu_is_omap15xx() && length < ep->maxpacket)) { txdma_ctrl = UDC_TXN_EOT | length; omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S8, - length, 1, OMAP_DMA_SYNC_ELEMENT); + length, 1, sync_mode); } else { - length = max(length / ep->maxpacket, + length = min(length / ep->maxpacket, (unsigned) UDC_TXN_TSC + 1); txdma_ctrl = length; omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S8, - ep->ep.maxpacket, length, - OMAP_DMA_SYNC_ELEMENT); + ep->ep.maxpacket, length, sync_mode); length *= ep->maxpacket; } - omap_set_dma_src_params(ep->lch, OMAP_DMA_PORT_EMIFF, OMAP_DMA_AMODE_POST_INC, req->req.dma + req->req.actual); omap_start_dma(ep->lch); + ep->dma_counter = omap_readw(OMAP_DMA_CSAC(ep->lch)); UDC_DMA_IRQ_EN_REG |= UDC_TX_DONE_IE(ep->dma_channel); UDC_TXDMA_REG(ep->dma_channel) = UDC_TXN_START | txdma_ctrl; req->dma_bytes = length; @@ -592,14 +628,9 @@ && req->dma_bytes != 0 && (req->req.actual % ep->maxpacket) == 0) return; - } else { - u32 last; - - // FIXME this surely isn't #bytes transferred - last = (omap_readw(OMAP_DMA_CSSA_U(ep->lch)) << 16) - | omap_readw(OMAP_DMA_CSSA_L(ep->lch)); - req->req.actual = last - req->req.dma; - } + } else + req->req.actual += dma_src_len(ep, req->req.dma + + req->req.actual); /* tx completion */ omap_stop_dma(ep->lch); @@ -624,6 +655,7 @@ OMAP_DMA_SYNC_ELEMENT); omap_set_dma_dest_params(ep->lch, OMAP_DMA_PORT_EMIFF, OMAP_DMA_AMODE_POST_INC, req->req.dma + req->req.actual); + ep->dma_counter = omap_readw(DMA_DEST_LAST(ep->lch)); UDC_RXDMA_REG(ep->dma_channel) = UDC_RXN_STOP | (packets - 1); UDC_DMA_IRQ_EN_REG |= UDC_RX_EOT_IE(ep->dma_channel); @@ -638,15 +670,13 @@ { u16 count; - /* FIXME must be a better way to see how much dma - * happened, even when it never got going... - */ - count = omap_readw(OMAP_DMA_CDAC(ep->lch)); - count -= 0xffff & (req->req.dma + req->req.actual); + if (status == 0) + ep->dma_counter = (u16) (req->req.dma + req->req.actual); + count = dma_dest_len(ep, req->req.dma + req->req.actual); count += req->req.actual; if (count <= req->req.length) req->req.actual = count; - + if (count != req->dma_bytes || status) omap_stop_dma(ep->lch); @@ -705,7 +735,9 @@ if (irq_src & UDC_RXN_CNT) { ep = &udc->ep[UDC_DMA_RX_SRC(dman_stat)]; - DBG("%s, RX_CNT irq?\n", ep->ep.name); + ep->irqs++; + /* omap15xx does this unasked... */ + VDBG("%s, RX_CNT irq?\n", ep->ep.name); UDC_IRQ_SRC_REG = UDC_RXN_CNT; } } @@ -778,7 +810,8 @@ omap_disable_dma_irq(ep->lch, OMAP_DMA_BLOCK_IRQ); /* channel type P: hw synch (fifo) */ - omap_writew(2, OMAP_DMA_LCH_CTRL(ep->lch)); + if (!cpu_is_omap15xx()) + omap_writew(2, OMAP_DMA_LCH_CTRL(ep->lch)); } just_restart: @@ -803,6 +836,10 @@ use_ep(ep, UDC_EP_SEL); (is_in ? write_fifo : read_fifo)(ep, req); deselect_ep(); + if (!is_in) { + UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } /* IN: 6 wait states before it'll tx */ } } @@ -833,24 +870,21 @@ UDC_TXDMA_CFG_REG &= ~mask; if (req) { - if (active) - udelay(50); finish_in_dma(ep, req, -ECONNRESET); - if (UDC_TXDMA_CFG_REG & mask) - WARN("%s, SPIN abort TX dma\n", ep->ep.name); - } - /* host may empty the fifo (or not...) */ + /* clear FIFO; hosts probably won't empty it */ + use_ep(ep, UDC_EP_SEL); + UDC_CTRL_REG = UDC_CLR_EP; + deselect_ep(); + } while (UDC_TXDMA_CFG_REG & mask) udelay(10); - } else { UDC_RXDMA_CFG_REG &= ~mask; /* dma empties the fifo */ - while (active && (UDC_RXDMA_CFG_REG & mask)) + while (UDC_RXDMA_CFG_REG & mask) udelay(10); - omap_stop_dma(ep->lch); if (req) finish_out_dma(ep, req, -ECONNRESET); } @@ -997,6 +1031,10 @@ if ((is_in ? write_fifo : read_fifo)(ep, req) == 1) req = 0; deselect_ep(); + if (!is_in) { + UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } /* IN: 6 wait states before it'll tx */ } } @@ -1034,7 +1072,7 @@ if (use_dma && ep->dma_channel && ep->queue.next == &req->queue) { int channel = ep->dma_channel; - /* releasing the dma completion cancels the request, + /* releasing the channel cancels the request, * reclaiming the channel restarts the queue */ dma_channel_release(ep); @@ -1104,8 +1142,10 @@ use_ep(ep, 0); UDC_CTRL_REG = UDC_RESET_EP; ep->ackwait = 0; - if (!(ep->bEndpointAddress & USB_DIR_IN)) + if (!(ep->bEndpointAddress & USB_DIR_IN)) { UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } } } done: @@ -1218,7 +1258,7 @@ /* * Called by whatever detects VBUS sessions: external transceiver - * driver, or maybe GPIO0 VBUS IRQ. + * driver, or maybe GPIO0 VBUS IRQ. May request 48 MHz clock. */ static int omap_vbus_session(struct usb_gadget *gadget, int is_active) { @@ -1229,6 +1269,13 @@ spin_lock_irqsave(&udc->lock, flags); VDBG("VBUS %s\n", is_active ? "on" : "off"); udc->vbus_active = (is_active != 0); + if (cpu_is_omap15xx()) { + /* "software" detect, ignored if !VBUS_MODE_1510 */ + if (is_active) + FUNC_MUX_CTRL_0_REG |= VBUS_CTRL_1510; + else + FUNC_MUX_CTRL_0_REG &= ~VBUS_CTRL_1510; + } if (can_pullup(udc)) pullup_enable(udc); else @@ -1342,8 +1389,15 @@ /* Clear any pending requests and then scrub any rx/tx state * before starting to handle the SETUP request. */ - if (irq_src & UDC_SETUP) + if (irq_src & UDC_SETUP) { + u16 ack = irq_src & (UDC_EP0_TX|UDC_EP0_RX); + nuke(ep0, 0); + if (ack) { + UDC_IRQ_SRC_REG = ack; + irq_src = UDC_SETUP; + } + } /* IN/OUT packets mean we're in the DATA or STATUS stage. * This driver uses only uses protocol stalls (ep0 never halts), @@ -1508,8 +1562,10 @@ use_ep(ep, 0); UDC_CTRL_REG = UDC_RESET_EP; ep->ackwait = 0; - if (!(ep->bEndpointAddress & USB_DIR_IN)) + if (!(ep->bEndpointAddress & USB_DIR_IN)) { UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } } VDBG("%s halt cleared by host\n", ep->name); goto ep0out_status_stage; @@ -1743,6 +1799,39 @@ return status; } +/* workaround for seemingly-lost IRQs for RX ACKs... */ +#define PIO_OUT_TIMEOUT (jiffies + HZ/3) +#define HALF_FULL(f) (!((f)&(UDC_NON_ISO_FIFO_FULL|UDC_NON_ISO_FIFO_EMPTY))) + +static void pio_out_timer(unsigned long _ep) +{ + struct omap_ep *ep = (void *) _ep; + unsigned long flags; + u16 stat_flg; + + spin_lock_irqsave(&ep->udc->lock, flags); + if (!list_empty(&ep->queue) && ep->ackwait) { + use_ep(ep, 0); + stat_flg = UDC_STAT_FLG_REG; + + if ((stat_flg & UDC_ACK) && (!(stat_flg & UDC_FIFO_EN) + || (ep->double_buf && HALF_FULL(stat_flg)))) { + struct omap_req *req; + + VDBG("%s: lose, %04x\n", ep->ep.name, stat_flg); + req = container_of(ep->queue.next, + struct omap_req, queue); + UDC_EP_NUM_REG = ep->bEndpointAddress | UDC_EP_SEL; + (void) read_fifo(ep, req); + UDC_EP_NUM_REG = ep->bEndpointAddress; + UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } + } + mod_timer(&ep->timer, PIO_OUT_TIMEOUT); + spin_unlock_irqrestore(&ep->udc->lock, flags); +} + static irqreturn_t omap_udc_pio_irq(int irq, void *_dev, struct pt_regs *r) { @@ -1766,38 +1855,56 @@ ep = &udc->ep[epnum]; ep->irqs++; - if (!list_empty(&ep->queue)) { - UDC_EP_NUM_REG = epnum | UDC_EP_SEL; - if ((UDC_STAT_FLG_REG & UDC_ACK)) { + UDC_EP_NUM_REG = epnum | UDC_EP_SEL; + ep->fnf = 0; + if ((UDC_STAT_FLG_REG & UDC_ACK)) { + ep->ackwait--; + if (!list_empty(&ep->queue)) { int stat; req = container_of(ep->queue.next, struct omap_req, queue); stat = read_fifo(ep, req); - // FIXME double buffered PIO OUT should work + if (!ep->double_buf) + ep->fnf = 1; } - UDC_EP_NUM_REG = epnum; } + /* min 6 clock delay before clearing EP_SEL ... */ + epn_stat = UDC_EPN_STAT_REG; + epn_stat = UDC_EPN_STAT_REG; + UDC_EP_NUM_REG = epnum; + + /* enabling fifo _after_ clearing ACK, contrary to docs, + * reduces lossage; timer still needed though (sigh). + */ + if (ep->fnf) { + UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } + mod_timer(&ep->timer, PIO_OUT_TIMEOUT); } /* then IN transfers */ - if (irq_src & UDC_EPN_TX) { + else if (irq_src & UDC_EPN_TX) { epnum = epn_stat & 0x0f; UDC_IRQ_SRC_REG = UDC_EPN_TX; status = IRQ_HANDLED; ep = &udc->ep[16 + epnum]; ep->irqs++; - ep->ackwait = 0; - if (!list_empty(&ep->queue)) { - UDC_EP_NUM_REG = epnum | UDC_EP_DIR | UDC_EP_SEL; - if ((UDC_STAT_FLG_REG & UDC_ACK)) { + UDC_EP_NUM_REG = epnum | UDC_EP_DIR | UDC_EP_SEL; + if ((UDC_STAT_FLG_REG & UDC_ACK)) { + ep->ackwait = 0; + if (!list_empty(&ep->queue)) { req = container_of(ep->queue.next, struct omap_req, queue); (void) write_fifo(ep, req); } - UDC_EP_NUM_REG = epnum | UDC_EP_DIR; - /* 6 wait states before it'll tx */ } + /* min 6 clock delay before clearing EP_SEL ... */ + epn_stat = UDC_EPN_STAT_REG; + epn_stat = UDC_EPN_STAT_REG; + UDC_EP_NUM_REG = epnum | UDC_EP_DIR; + /* then 6 clocks before it'd tx */ } spin_unlock_irqrestore(&udc->lock, flags); @@ -1939,6 +2046,9 @@ pullup_disable (udc); } + if (machine_is_omap_innovator()) + omap_vbus_session(&udc->gadget, 1); + done: return status; } @@ -1954,6 +2064,9 @@ if (!driver || driver != udc->driver) return -EINVAL; + if (machine_is_omap_innovator()) + omap_vbus_session(&udc->gadget, 0); + if (udc->transceiver) (void) otg_set_peripheral(udc->transceiver, 0); else @@ -2002,8 +2115,16 @@ stat_flg = UDC_STAT_FLG_REG; seq_printf(s, - "\n%s %sirqs %ld stat %04x " EIGHTBITS FOURBITS "%s\n", - ep->name, buf, ep->irqs, stat_flg, + "\n%s %s%s%sirqs %ld stat %04x " EIGHTBITS FOURBITS "%s\n", + ep->name, buf, + ep->double_buf ? "dbuf " : "", + ({char *s; switch(ep->ackwait){ + case 0: s = ""; break; + case 1: s = "(ackw) "; break; + case 2: s = "(ackw2) "; break; + default: s = "(?) "; break; + } s;}), + ep->irqs, stat_flg, (stat_flg & UDC_NO_RXPACKET) ? "no_rxpacket " : "", (stat_flg & UDC_MISS_IN) ? "miss_in " : "", (stat_flg & UDC_DATA_FLUSH) ? "data_flush " : "", @@ -2021,10 +2142,19 @@ if (list_empty (&ep->queue)) seq_printf(s, "\t(queue empty)\n"); else - list_for_each_entry (req, &ep->queue, queue) + list_for_each_entry (req, &ep->queue, queue) { + unsigned length = req->req.actual; + + if (use_dma && buf[0]) { + length += ((ep->bEndpointAddress & USB_DIR_IN) + ? dma_src_len : dma_dest_len) + (ep, req->req.dma + length); + buf[0] = 0; + } seq_printf(s, "\treq %p len %d/%d buf %p\n", - &req->req, req->req.actual, + &req->req, length, req->req.length, req->req.buf); + } } static char *trx_mode(unsigned m) @@ -2125,7 +2255,11 @@ fifo_mode, udc->driver ? udc->driver->driver.name : "(none)", HMC, - udc->transceiver ? udc->transceiver->label : ""); + udc->transceiver ? udc->transceiver->label : "(none)"); + seq_printf(s, "ULPD control %04x req %04x status %04x\n", + __REG16(ULPD_CLOCK_CTRL), + __REG16(ULPD_SOFT_REQ), + __REG16(ULPD_STATUS_REQ)); /* OTG controller registers */ if (!cpu_is_omap15xx()) @@ -2305,10 +2439,10 @@ epn_rxtx |= UDC_EPN_RX_ISO; dbuf = 1; } else { - /* pio-out could potentially double-buffer, - * as can (should!) DMA-IN + /* double-buffering "not supported" on 15xx, + * and ignored for PIO-IN on 16xx */ - if (!use_dma || (addr & USB_DIR_IN)) + if (!use_dma || cpu_is_omap15xx()) dbuf = 0; switch (maxp) { @@ -2320,6 +2454,9 @@ } if (dbuf && addr) epn_rxtx |= UDC_EPN_RX_DB; + init_timer(&ep->timer); + ep->timer.function = pio_out_timer; + ep->timer.data = (unsigned long) ep; } if (addr) epn_rxtx |= UDC_EPN_RX_VALID; @@ -2509,23 +2646,35 @@ return -EBUSY; } - INFO("OMAP UDC rev %d.%d, %s receptacle\n", + INFO("OMAP UDC rev %d.%d%s\n", UDC_REV_REG >> 4, UDC_REV_REG & 0xf, - config->otg ? "Mini-AB" : "B/Mini-B"); + config->otg ? ", Mini-AB" : ""); /* use the mode given to us by board init code */ if (cpu_is_omap15xx()) { hmc = HMC_1510; type = "(unknown)"; - /* FIXME may need a GPIO-0 handler to call - * usb_gadget_vbus_{dis,}connect() on us... - */ + if (machine_is_omap_innovator()) { + /* just set up software VBUS detect, and then + * later rig it so we always report VBUS. + * FIXME without really sensing VBUS, we can't + * know when to turn PULLUP_EN on/off; and that + * means we always "need" the 48MHz clock. + */ + u32 tmp = FUNC_MUX_CTRL_0_REG; + + FUNC_MUX_CTRL_0_REG &= ~VBUS_CTRL_1510; + tmp |= VBUS_MODE_1510; + tmp &= ~VBUS_CTRL_1510; + FUNC_MUX_CTRL_0_REG = tmp; + } } else { hmc = HMC_1610; switch (hmc) { case 3: case 11: + case 16: case 19: case 25: xceiv = otg_get_transceiver(); @@ -2565,7 +2714,9 @@ xceiv = 0; // "udc" is now valid pullup_disable(udc); +#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) udc->gadget.is_otg = (config->otg != 0); +#endif /* USB general purpose IRQ: ep0, state changes, dma, etc */ status = request_irq(odev->resource[1].start, omap_udc_irq, @@ -2694,7 +2845,11 @@ static int __init udc_init(void) { - INFO("%s, version: " DRIVER_VERSION "%s\n", driver_desc, + INFO("%s, version: " DRIVER_VERSION +#ifdef USE_ISO + " (iso)" +#endif + "%s\n", driver_desc, use_dma ? " (dma)" : ""); return driver_register(&udc_driver); } diff -Nru a/drivers/usb/gadget/omap_udc.h b/drivers/usb/gadget/omap_udc.h --- a/drivers/usb/gadget/omap_udc.h 2004-11-10 17:19:03 -08:00 +++ b/drivers/usb/gadget/omap_udc.h 2004-11-10 17:19:03 -08:00 @@ -146,11 +146,14 @@ u8 bmAttributes; unsigned double_buf:1; unsigned stopped:1; - unsigned ackwait:1; + unsigned fnf:1; unsigned has_dma:1; + u8 ackwait; u8 dma_channel; + u16 dma_counter; int lch; struct omap_udc *udc; + struct timer_list timer; }; struct omap_udc { @@ -168,7 +171,6 @@ unsigned ep0_set_config:1; unsigned ep0_reset_config:1; unsigned ep0_setup:1; - unsigned hmc:6; struct completion *done; }; diff -Nru a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c --- a/drivers/usb/gadget/rndis.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/usb/gadget/rndis.c 2004-11-10 17:19:02 -08:00 @@ -121,7 +121,7 @@ DEBUG("%s: OID_GEN_HARDWARE_STATUS\n", __FUNCTION__); length = 4; /* Bogus question! - * Hardware must be ready to recieve high level protocols. + * Hardware must be ready to receive high level protocols. * BTW: * reddite ergo quae sunt Caesaris Caesari * et quae sunt Dei Deo! diff -Nru a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c --- a/drivers/usb/gadget/serial.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/gadget/serial.c 2004-11-10 17:19:06 -08:00 @@ -123,10 +123,84 @@ }) +/* CDC-ACM Defines and Structures */ + +#define USB_CDC_SUBCLASS_ACM 2 + +#define USB_CDC_CTRL_PROTO_NONE 0 +#define USB_CDC_CTRL_PROTO_AT 1 +#define USB_CDC_CTRL_PROTO_VENDOR 0xff + +#define USB_CDC_SUBTYPE_HEADER 0 +#define USB_CDC_SUBTYPE_CALL_MGMT 1 +#define USB_CDC_SUBTYPE_ACM 2 +#define USB_CDC_SUBTYPE_UNION 6 + +#define USB_CDC_CALL_MGMT_CAP_CALL_MGMT 0x01 +#define USB_CDC_CALL_MGMT_CAP_DATA_INTF 0x02 + +#define USB_CDC_REQ_SET_LINE_CODING 0x20 +#define USB_CDC_REQ_GET_LINE_CODING 0x21 +#define USB_CDC_REQ_SET_CONTROL_LINE_STATE 0x22 + +#define USB_CDC_1_STOP_BITS 0 +#define USB_CDC_1_5_STOP_BITS 1 +#define USB_CDC_2_STOP_BITS 2 + +#define USB_CDC_NO_PARITY 0 +#define USB_CDC_ODD_PARITY 1 +#define USB_CDC_EVEN_PARITY 2 +#define USB_CDC_MARK_PARITY 3 +#define USB_CDC_SPACE_PARITY 4 + +/* Header Functional Descriptor from CDC spec 5.2.3.1 */ +struct usb_cdc_header_desc { + u8 bLength; + u8 bDescriptorType; + u8 bDescriptorSubType; + u16 bcdCDC; +} __attribute__ ((packed)); + +/* Call Management Descriptor from CDC spec 5.2.3.3 */ +struct usb_cdc_call_mgmt_desc { + u8 bLength; + u8 bDescriptorType; + u8 bDescriptorSubType; + u8 bmCapabilities; + u8 bDataInterface; +} __attribute__ ((packed)); + +/* Abstract Control Management Descriptor from CDC spec 5.2.3.4 */ +struct usb_cdc_acm_desc { + u8 bLength; + u8 bDescriptorType; + u8 bDescriptorSubType; + u8 bmCapabilities; +} __attribute__ ((packed)); + +/* Union Functional Descriptor from CDC spec 5.2.3.8 */ +struct usb_cdc_union_desc { + u8 bLength; + u8 bDescriptorType; + u8 bDescriptorSubType; + u8 bMasterInterface0; + u8 bSlaveInterface0; + /* ... and there could be other slave interfaces */ +} __attribute__ ((packed)); + +/* Line Coding Structure from CDC spec 6.2.13 */ +struct usb_cdc_line_coding { + u32 dwDTERate; + u8 bCharFormat; + u8 bParityType; + u8 bDataBits; +} __attribute__ ((packed)); + + /* Defines */ -#define GS_VERSION_STR "v1.0" -#define GS_VERSION_NUM 0x0100 +#define GS_VERSION_STR "v2.0" +#define GS_VERSION_NUM 0x0200 #define GS_LONG_NAME "Gadget Serial" #define GS_SHORT_NAME "g_serial" @@ -138,13 +212,13 @@ #define GS_NUM_CONFIGS 1 #define GS_NO_CONFIG_ID 0 -#define GS_BULK_CONFIG_ID 2 - -#define GS_NUM_INTERFACES 1 -#define GS_INTERFACE_ID 0 -#define GS_ALT_INTERFACE_ID 0 +#define GS_BULK_CONFIG_ID 1 +#define GS_ACM_CONFIG_ID 2 -#define GS_NUM_ENDPOINTS 2 +#define GS_MAX_NUM_INTERFACES 2 +#define GS_BULK_INTERFACE_ID 0 +#define GS_CONTROL_INTERFACE_ID 0 +#define GS_DATA_INTERFACE_ID 1 #define GS_MAX_DESC_LEN 256 @@ -152,12 +226,27 @@ #define GS_DEFAULT_WRITE_Q_SIZE 32 #define GS_DEFAULT_WRITE_BUF_SIZE 8192 +#define GS_TMP_BUF_SIZE 8192 #define GS_CLOSE_TIMEOUT 15 +#define GS_DEFAULT_USE_ACM 0 + +#define GS_DEFAULT_DTE_RATE 9600 +#define GS_DEFAULT_DATA_BITS 8 +#define GS_DEFAULT_PARITY USB_CDC_NO_PARITY +#define GS_DEFAULT_CHAR_FORMAT USB_CDC_1_STOP_BITS + +/* select highspeed/fullspeed, hiding highspeed if not configured */ +#ifdef CONFIG_USB_GADGET_DUALSPEED +#define GS_SPEED_SELECT(is_hs,hs,fs) ((is_hs) ? (hs) : (fs)) +#else +#define GS_SPEED_SELECT(is_hs,hs,fs) (fs) +#endif /* CONFIG_USB_GADGET_DUALSPEED */ + /* debug settings */ -#if G_SERIAL_DEBUG -static int debug = G_SERIAL_DEBUG; +#ifdef GS_DEBUG +static int debug = 1; #define gs_debug(format, arg...) \ do { if (debug) printk(KERN_DEBUG format, ## arg); } while(0) @@ -171,17 +260,19 @@ #define gs_debug_level(level, format, arg...) \ do { } while(0) -#endif /* G_SERIAL_DEBUG */ - - +#endif /* GS_DEBUG */ /* Thanks to NetChip Technologies for donating this product ID. * * DO NOT REUSE THESE IDs with a protocol-incompatible driver!! Ever!! * Instead: allocate your own, using normal USB-IF procedures. */ -#define GS_VENDOR_ID 0x0525 /* NetChip */ -#define GS_PRODUCT_ID 0xa4a6 /* Linux-USB Serial Gadget */ +#define GS_VENDOR_ID 0x0525 /* NetChip */ +#define GS_PRODUCT_ID 0xa4a6 /* Linux-USB Serial Gadget */ +#define GS_CDC_PRODUCT_ID 0xa4a7 /* ... as CDC-ACM */ + +#define GS_LOG2_NOTIFY_INTERVAL 5 /* 1 << 5 == 32 msec */ +#define GS_NOTIFY_MAXPACKET 8 /* Structures */ @@ -212,6 +303,7 @@ int port_in_use; /* open/close in progress */ wait_queue_head_t port_write_wait;/* waiting to write */ struct gs_buf *port_write_buf; + struct usb_cdc_line_coding port_line_coding; }; /* the device structure holds info for the USB device */ @@ -219,8 +311,15 @@ struct usb_gadget *dev_gadget; /* gadget device pointer */ spinlock_t dev_lock; /* lock for set/reset config */ int dev_config; /* configuration number */ + struct usb_ep *dev_notify_ep; /* address of notify endpoint */ struct usb_ep *dev_in_ep; /* address of in endpoint */ struct usb_ep *dev_out_ep; /* address of out endpoint */ + struct usb_endpoint_descriptor /* desciptor of notify ep */ + *dev_notify_ep_desc; + struct usb_endpoint_descriptor /* descriptor of in endpoint */ + *dev_in_ep_desc; + struct usb_endpoint_descriptor /* descriptor of out endpoint */ + *dev_out_ep_desc; struct usb_request *dev_ctrl_req; /* control request */ struct list_head dev_req_list; /* list of write requests */ int dev_sched_port; /* round robin port scheduled */ @@ -237,7 +336,7 @@ /* tty driver */ static int gs_open(struct tty_struct *tty, struct file *file); static void gs_close(struct tty_struct *tty, struct file *file); -static int gs_write(struct tty_struct *tty, +static int gs_write(struct tty_struct *tty, const unsigned char *buf, int count); static void gs_put_char(struct tty_struct *tty, unsigned char ch); static void gs_flush_chars(struct tty_struct *tty); @@ -263,12 +362,16 @@ static void gs_unbind(struct usb_gadget *gadget); static int gs_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl); +static int gs_setup_standard(struct usb_gadget *gadget, + const struct usb_ctrlrequest *ctrl); +static int gs_setup_class(struct usb_gadget *gadget, + const struct usb_ctrlrequest *ctrl); static void gs_setup_complete(struct usb_ep *ep, struct usb_request *req); static void gs_disconnect(struct usb_gadget *gadget); static int gs_set_config(struct gs_dev *dev, unsigned config); static void gs_reset_config(struct gs_dev *dev); -static int gs_build_config_desc(u8 *buf, enum usb_device_speed speed, - u8 type, unsigned int index); +static int gs_build_config_buf(u8 *buf, enum usb_device_speed speed, + u8 type, unsigned int index, int is_otg); static struct usb_request *gs_alloc_req(struct usb_ep *ep, unsigned int len, int kmalloc_flags); @@ -302,6 +405,7 @@ static const char *EP_IN_NAME; static const char *EP_OUT_NAME; +static const char *EP_NOTIFY_NAME; static struct semaphore gs_open_close_sem[GS_NUM_PORTS]; @@ -310,6 +414,9 @@ static unsigned int write_buf_size = GS_DEFAULT_WRITE_BUF_SIZE; +static unsigned int use_acm = GS_DEFAULT_USE_ACM; + + /* tty driver struct */ static struct tty_operations gs_tty_ops = { .open = gs_open, @@ -333,7 +440,7 @@ .speed = USB_SPEED_HIGH, #else .speed = USB_SPEED_FULL, -#endif +#endif /* CONFIG_USB_GADGET_DUALSPEED */ .function = GS_LONG_NAME, .bind = gs_bind, .unbind = gs_unbind, @@ -353,15 +460,21 @@ #define GS_MANUFACTURER_STR_ID 1 #define GS_PRODUCT_STR_ID 2 #define GS_SERIAL_STR_ID 3 -#define GS_CONFIG_STR_ID 4 +#define GS_BULK_CONFIG_STR_ID 4 +#define GS_ACM_CONFIG_STR_ID 5 +#define GS_CONTROL_STR_ID 6 +#define GS_DATA_STR_ID 7 -/* static strings, in iso 8859/1 */ -static char manufacturer[40]; +/* static strings, in UTF-8 */ +static char manufacturer[50]; static struct usb_string gs_strings[] = { { GS_MANUFACTURER_STR_ID, manufacturer }, { GS_PRODUCT_STR_ID, GS_LONG_NAME }, { GS_SERIAL_STR_ID, "0" }, - { GS_CONFIG_STR_ID, "Bulk" }, + { GS_BULK_CONFIG_STR_ID, "Gadget Serial Bulk" }, + { GS_ACM_CONFIG_STR_ID, "Gadget Serial CDC ACM" }, + { GS_CONTROL_STR_ID, "Gadget Serial Control" }, + { GS_DATA_STR_ID, "Gadget Serial Data" }, { } /* end of list */ }; @@ -374,7 +487,8 @@ .bLength = USB_DT_DEVICE_SIZE, .bDescriptorType = USB_DT_DEVICE, .bcdUSB = __constant_cpu_to_le16(0x0200), - .bDeviceClass = USB_CLASS_VENDOR_SPEC, + .bDeviceSubClass = 0, + .bDeviceProtocol = 0, .idVendor = __constant_cpu_to_le16(GS_VENDOR_ID), .idProduct = __constant_cpu_to_le16(GS_PRODUCT_ID), .iManufacturer = GS_MANUFACTURER_STR_ID, @@ -383,23 +497,104 @@ .bNumConfigurations = GS_NUM_CONFIGS, }; -static const struct usb_config_descriptor gs_config_desc = { +static struct usb_otg_descriptor gs_otg_descriptor = { + .bLength = sizeof(gs_otg_descriptor), + .bDescriptorType = USB_DT_OTG, + .bmAttributes = USB_OTG_SRP, +}; + +static struct usb_config_descriptor gs_bulk_config_desc = { .bLength = USB_DT_CONFIG_SIZE, .bDescriptorType = USB_DT_CONFIG, - /* .wTotalLength set by gs_build_config_desc */ - .bNumInterfaces = GS_NUM_INTERFACES, + /* .wTotalLength computed dynamically */ + .bNumInterfaces = 1, .bConfigurationValue = GS_BULK_CONFIG_ID, - .iConfiguration = GS_CONFIG_STR_ID, + .iConfiguration = GS_BULK_CONFIG_STR_ID, + .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER, + .bMaxPower = 1, +}; + +static struct usb_config_descriptor gs_acm_config_desc = { + .bLength = USB_DT_CONFIG_SIZE, + .bDescriptorType = USB_DT_CONFIG, + /* .wTotalLength computed dynamically */ + .bNumInterfaces = 2, + .bConfigurationValue = GS_ACM_CONFIG_ID, + .iConfiguration = GS_ACM_CONFIG_STR_ID, .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER, .bMaxPower = 1, }; -static const struct usb_interface_descriptor gs_interface_desc = { +static const struct usb_interface_descriptor gs_bulk_interface_desc = { + .bLength = USB_DT_INTERFACE_SIZE, + .bDescriptorType = USB_DT_INTERFACE, + .bInterfaceNumber = GS_BULK_INTERFACE_ID, + .bNumEndpoints = 2, + .bInterfaceClass = USB_CLASS_CDC_DATA, + .bInterfaceSubClass = 0, + .bInterfaceProtocol = 0, + .iInterface = GS_DATA_STR_ID, +}; + +static const struct usb_interface_descriptor gs_control_interface_desc = { + .bLength = USB_DT_INTERFACE_SIZE, + .bDescriptorType = USB_DT_INTERFACE, + .bInterfaceNumber = GS_CONTROL_INTERFACE_ID, + .bNumEndpoints = 1, + .bInterfaceClass = USB_CLASS_COMM, + .bInterfaceSubClass = USB_CDC_SUBCLASS_ACM, + .bInterfaceProtocol = USB_CDC_CTRL_PROTO_AT, + .iInterface = GS_CONTROL_STR_ID, +}; + +static const struct usb_interface_descriptor gs_data_interface_desc = { .bLength = USB_DT_INTERFACE_SIZE, .bDescriptorType = USB_DT_INTERFACE, - .bNumEndpoints = GS_NUM_ENDPOINTS, - .bInterfaceClass = USB_CLASS_VENDOR_SPEC, - .iInterface = GS_CONFIG_STR_ID, + .bInterfaceNumber = GS_DATA_INTERFACE_ID, + .bNumEndpoints = 2, + .bInterfaceClass = USB_CLASS_CDC_DATA, + .bInterfaceSubClass = 0, + .bInterfaceProtocol = 0, + .iInterface = GS_DATA_STR_ID, +}; + +static const struct usb_cdc_header_desc gs_header_desc = { + .bLength = sizeof(gs_header_desc), + .bDescriptorType = USB_DT_CS_INTERFACE, + .bDescriptorSubType = USB_CDC_SUBTYPE_HEADER, + .bcdCDC = __constant_cpu_to_le16(0x0110), +}; + +static const struct usb_cdc_call_mgmt_desc gs_call_mgmt_descriptor = { + .bLength = sizeof(gs_call_mgmt_descriptor), + .bDescriptorType = USB_DT_CS_INTERFACE, + .bDescriptorSubType = USB_CDC_SUBTYPE_CALL_MGMT, + .bmCapabilities = 0, + .bDataInterface = 1, /* index of data interface */ +}; + +static struct usb_cdc_acm_desc gs_acm_descriptor = { + .bLength = sizeof(gs_acm_descriptor), + .bDescriptorType = USB_DT_CS_INTERFACE, + .bDescriptorSubType = USB_CDC_SUBTYPE_ACM, + .bmCapabilities = 0, +}; + +static const struct usb_cdc_union_desc gs_union_desc = { + .bLength = sizeof(gs_union_desc), + .bDescriptorType = USB_DT_CS_INTERFACE, + .bDescriptorSubType = USB_CDC_SUBTYPE_UNION, + .bMasterInterface0 = 0, /* index of control interface */ + .bSlaveInterface0 = 1, /* index of data interface */ +}; + +static struct usb_endpoint_descriptor gs_fullspeed_notify_desc = { + .bLength = USB_DT_ENDPOINT_SIZE, + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = USB_DIR_IN, + .bmAttributes = USB_ENDPOINT_XFER_INT, + .wMaxPacketSize = __constant_cpu_to_le16(GS_NOTIFY_MAXPACKET), + .bInterval = 1 << GS_LOG2_NOTIFY_INTERVAL, }; static struct usb_endpoint_descriptor gs_fullspeed_in_desc = { @@ -416,6 +611,38 @@ .bmAttributes = USB_ENDPOINT_XFER_BULK, }; +static const struct usb_descriptor_header *gs_bulk_fullspeed_function[] = { + (struct usb_descriptor_header *) &gs_otg_descriptor, + (struct usb_descriptor_header *) &gs_bulk_interface_desc, + (struct usb_descriptor_header *) &gs_fullspeed_in_desc, + (struct usb_descriptor_header *) &gs_fullspeed_out_desc, + NULL, +}; + +static const struct usb_descriptor_header *gs_acm_fullspeed_function[] = { + (struct usb_descriptor_header *) &gs_otg_descriptor, + (struct usb_descriptor_header *) &gs_control_interface_desc, + (struct usb_descriptor_header *) &gs_header_desc, + (struct usb_descriptor_header *) &gs_call_mgmt_descriptor, + (struct usb_descriptor_header *) &gs_acm_descriptor, + (struct usb_descriptor_header *) &gs_union_desc, + (struct usb_descriptor_header *) &gs_fullspeed_notify_desc, + (struct usb_descriptor_header *) &gs_data_interface_desc, + (struct usb_descriptor_header *) &gs_fullspeed_in_desc, + (struct usb_descriptor_header *) &gs_fullspeed_out_desc, + NULL, +}; + +#ifdef CONFIG_USB_GADGET_DUALSPEED +static struct usb_endpoint_descriptor gs_highspeed_notify_desc = { + .bLength = USB_DT_ENDPOINT_SIZE, + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = USB_DIR_IN, + .bmAttributes = USB_ENDPOINT_XFER_INT, + .wMaxPacketSize = __constant_cpu_to_le16(GS_NOTIFY_MAXPACKET), + .bInterval = GS_LOG2_NOTIFY_INTERVAL+4, +}; + static struct usb_endpoint_descriptor gs_highspeed_in_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, @@ -430,16 +657,37 @@ .wMaxPacketSize = __constant_cpu_to_le16(512), }; -#ifdef CONFIG_USB_GADGET_DUALSPEED static struct usb_qualifier_descriptor gs_qualifier_desc = { .bLength = sizeof(struct usb_qualifier_descriptor), .bDescriptorType = USB_DT_DEVICE_QUALIFIER, .bcdUSB = __constant_cpu_to_le16 (0x0200), - .bDeviceClass = USB_CLASS_VENDOR_SPEC, /* assumes ep0 uses the same value for both speeds ... */ .bNumConfigurations = GS_NUM_CONFIGS, }; -#endif + +static const struct usb_descriptor_header *gs_bulk_highspeed_function[] = { + (struct usb_descriptor_header *) &gs_otg_descriptor, + (struct usb_descriptor_header *) &gs_bulk_interface_desc, + (struct usb_descriptor_header *) &gs_highspeed_in_desc, + (struct usb_descriptor_header *) &gs_highspeed_out_desc, + NULL, +}; + +static const struct usb_descriptor_header *gs_acm_highspeed_function[] = { + (struct usb_descriptor_header *) &gs_otg_descriptor, + (struct usb_descriptor_header *) &gs_control_interface_desc, + (struct usb_descriptor_header *) &gs_header_desc, + (struct usb_descriptor_header *) &gs_call_mgmt_descriptor, + (struct usb_descriptor_header *) &gs_acm_descriptor, + (struct usb_descriptor_header *) &gs_union_desc, + (struct usb_descriptor_header *) &gs_highspeed_notify_desc, + (struct usb_descriptor_header *) &gs_data_interface_desc, + (struct usb_descriptor_header *) &gs_highspeed_in_desc, + (struct usb_descriptor_header *) &gs_highspeed_out_desc, + NULL, +}; + +#endif /* CONFIG_USB_GADGET_DUALSPEED */ /* Module */ @@ -447,20 +695,23 @@ MODULE_AUTHOR("Al Borchers"); MODULE_LICENSE("GPL"); -#if G_SERIAL_DEBUG -module_param(debug, int, S_IRUGO | S_IWUSR); -MODULE_PARM_DESC(debug, "Enable debugging, 0=off, 1=on, larger values for more messages"); +#ifdef GS_DEBUG +module_param(debug, int, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(debug, "Enable debugging, 0=off, 1=on"); #endif -module_param(read_q_size, int, 0); +module_param(read_q_size, uint, S_IRUGO); MODULE_PARM_DESC(read_q_size, "Read request queue size, default=32"); -module_param(write_q_size, int, 0); +module_param(write_q_size, uint, S_IRUGO); MODULE_PARM_DESC(write_q_size, "Write request queue size, default=32"); -module_param(write_buf_size, int, 0); +module_param(write_buf_size, uint, S_IRUGO); MODULE_PARM_DESC(write_buf_size, "Write buffer size, default=8192"); +module_param(use_acm, uint, S_IRUGO); +MODULE_PARM_DESC(use_acm, "Use CDC ACM, 0=no, 1=yes, default=no"); + module_init(gs_module_init); module_exit(gs_module_exit); @@ -538,13 +789,12 @@ struct gs_dev *dev; struct gs_buf *buf; struct semaphore *sem; + int ret; port_num = tty->index; gs_debug("gs_open: (%d,%p,%p)\n", port_num, tty, file); - tty->driver_data = NULL; - if (port_num < 0 || port_num >= GS_NUM_PORTS) { printk(KERN_ERR "gs_open: (%d,%p,%p) invalid port number\n", port_num, tty, file); @@ -573,9 +823,8 @@ printk(KERN_ERR "gs_open: (%d,%p,%p) device is not connected\n", port_num, tty, file); - spin_unlock_irqrestore(&dev->dev_lock, flags); - up(sem); - return -ENODEV; + ret = -ENODEV; + goto exit_unlock_dev; } port = dev->dev_port[port_num]; @@ -583,9 +832,8 @@ if (port == NULL) { printk(KERN_ERR "gs_open: (%d,%p,%p) NULL port pointer\n", port_num, tty, file); - spin_unlock_irqrestore(&dev->dev_lock, flags); - up(sem); - return -ENODEV; + ret = -ENODEV; + goto exit_unlock_dev; } spin_lock(&port->port_lock); @@ -594,20 +842,20 @@ if (port->port_dev == NULL) { printk(KERN_ERR "gs_open: (%d,%p,%p) port disconnected (1)\n", port_num, tty, file); - spin_unlock_irqrestore(&port->port_lock, flags); - up(sem); - return -EIO; + ret = -EIO; + goto exit_unlock_port; } if (port->port_open_count > 0) { ++port->port_open_count; - spin_unlock_irqrestore(&port->port_lock, flags); gs_debug("gs_open: (%d,%p,%p) already open\n", port_num, tty, file); - up(sem); - return 0; + ret = 0; + goto exit_unlock_port; } + tty->driver_data = NULL; + /* mark port as in use, we can drop port lock and sleep if necessary */ port->port_in_use = 1; @@ -623,18 +871,16 @@ "gs_open: (%d,%p,%p) port disconnected (2)\n", port_num, tty, file); port->port_in_use = 0; - spin_unlock_irqrestore(&port->port_lock, flags); - up(sem); - return -EIO; + ret = -EIO; + goto exit_unlock_port; } if ((port->port_write_buf=buf) == NULL) { printk(KERN_ERR "gs_open: (%d,%p,%p) cannot allocate port write buffer\n", port_num, tty, file); port->port_in_use = 0; - spin_unlock_irqrestore(&port->port_lock, flags); - up(sem); - return -ENOMEM; + ret = -ENOMEM; + goto exit_unlock_port; } } @@ -646,9 +892,8 @@ printk(KERN_ERR "gs_open: (%d,%p,%p) port disconnected (3)\n", port_num, tty, file); port->port_in_use = 0; - spin_unlock_irqrestore(&port->port_lock, flags); - up(sem); - return -EIO; + ret = -EIO; + goto exit_unlock_port; } tty->driver_data = port; @@ -656,12 +901,20 @@ port->port_open_count = 1; port->port_in_use = 0; + gs_debug("gs_open: (%d,%p,%p) completed\n", port_num, tty, file); + + ret = 0; + +exit_unlock_port: spin_unlock_irqrestore(&port->port_lock, flags); up(sem); + return ret; - gs_debug("gs_open: (%d,%p,%p) completed\n", port_num, tty, file); +exit_unlock_dev: + spin_unlock_irqrestore(&dev->dev_lock, flags); + up(sem); + return ret; - return 0; } /* @@ -689,24 +942,18 @@ printk(KERN_ERR "gs_close: (%d,%p,%p) port is already closed\n", port->port_num, tty, file); - spin_unlock_irqrestore(&port->port_lock, flags); - up(sem); - return; + goto exit; } - if (port->port_open_count > 0) { + if (port->port_open_count > 1) { --port->port_open_count; - spin_unlock_irqrestore(&port->port_lock, flags); - up(sem); - return; + goto exit; } /* free disconnected port on final close */ if (port->port_dev == NULL) { kfree(port); - spin_unlock_irqrestore(&port->port_lock, flags); - up(sem); - return; + goto exit; } /* mark port as closed but in use, we can drop port lock */ @@ -727,9 +974,7 @@ /* (might have happened during the above sleep) */ if (port->port_dev == NULL) { kfree(port); - spin_unlock_irqrestore(&port->port_lock, flags); - up(sem); - return; + goto exit; } gs_buf_clear(port->port_write_buf); @@ -738,11 +983,12 @@ port->port_tty = NULL; port->port_in_use = 0; - spin_unlock_irqrestore(&port->port_lock, flags); - up(sem); - gs_debug("gs_close: (%d,%p,%p) completed\n", port->port_num, tty, file); + +exit: + spin_unlock_irqrestore(&port->port_lock, flags); + up(sem); } /* @@ -752,6 +998,7 @@ { unsigned long flags; struct gs_port *port = tty->driver_data; + int ret; if (port == NULL) { printk(KERN_ERR "gs_write: NULL port pointer\n"); @@ -769,15 +1016,15 @@ if (port->port_dev == NULL) { printk(KERN_ERR "gs_write: (%d,%p) port is not connected\n", port->port_num, tty); - spin_unlock_irqrestore(&port->port_lock, flags); - return -EIO; + ret = -EIO; + goto exit; } if (port->port_open_count == 0) { printk(KERN_ERR "gs_write: (%d,%p) port is closed\n", port->port_num, tty); - spin_unlock_irqrestore(&port->port_lock, flags); - return -EBADF; + ret = -EBADF; + goto exit; } count = gs_buf_put(port->port_write_buf, buf, count); @@ -790,6 +1037,10 @@ count); return count; + +exit: + spin_unlock_irqrestore(&port->port_lock, flags); + return ret; } /* @@ -812,19 +1063,18 @@ if (port->port_dev == NULL) { printk(KERN_ERR "gs_put_char: (%d,%p) port is not connected\n", port->port_num, tty); - spin_unlock_irqrestore(&port->port_lock, flags); - return; + goto exit; } if (port->port_open_count == 0) { printk(KERN_ERR "gs_put_char: (%d,%p) port is closed\n", port->port_num, tty); - spin_unlock_irqrestore(&port->port_lock, flags); - return; + goto exit; } gs_buf_put(port->port_write_buf, &ch, 1); +exit: spin_unlock_irqrestore(&port->port_lock, flags); } @@ -849,20 +1099,23 @@ printk(KERN_ERR "gs_flush_chars: (%d,%p) port is not connected\n", port->port_num, tty); - spin_unlock_irqrestore(&port->port_lock, flags); - return; + goto exit; } if (port->port_open_count == 0) { printk(KERN_ERR "gs_flush_chars: (%d,%p) port is closed\n", port->port_num, tty); - spin_unlock_irqrestore(&port->port_lock, flags); - return; + goto exit; } spin_unlock_irqrestore(&port->port_lock, flags); gs_send(gs_device); + + return; + +exit: + spin_unlock_irqrestore(&port->port_lock, flags); } /* @@ -1059,17 +1312,16 @@ if (len < size) size = len; - if (size == 0) { - spin_unlock(&port->port_lock); - return 0; - } + if (size == 0) + goto exit; size = gs_buf_get(port->port_write_buf, packet, size); - wake_up_interruptible(&port->port_tty->write_wait); + if (port->port_tty) + wake_up_interruptible(&port->port_tty->write_wait); +exit: spin_unlock(&port->port_lock); - return size; } @@ -1090,6 +1342,7 @@ { unsigned int len; struct gs_port *port; + int ret; /* TEMPORARY -- only port 0 is supported right now */ port = dev->dev_port[0]; @@ -1102,18 +1355,25 @@ spin_lock(&port->port_lock); + if (port->port_open_count == 0) { + printk(KERN_ERR "gs_recv_packet: port=%d, port is closed\n", + port->port_num); + ret = -EIO; + goto exit; + } + if (port->port_tty == NULL) { printk(KERN_ERR "gs_recv_packet: port=%d, NULL tty pointer\n", port->port_num); - spin_unlock(&port->port_lock); - return -EIO; + ret = -EIO; + goto exit; } if (port->port_tty->magic != TTY_MAGIC) { printk(KERN_ERR "gs_recv_packet: port=%d, bad tty magic\n", port->port_num); - spin_unlock(&port->port_lock); - return -EIO; + ret = -EIO; + goto exit; } len = (unsigned int)(TTY_FLIPBUF_SIZE - port->port_tty->flip.count); @@ -1128,9 +1388,11 @@ wake_up_interruptible(&port->port_tty->read_wait); } - spin_unlock(&port->port_lock); + ret = 0; - return 0; +exit: + spin_unlock(&port->port_lock); + return ret; } /* @@ -1235,21 +1497,7 @@ struct usb_ep *ep; struct gs_dev *dev; - usb_ep_autoconfig_reset(gadget); - - ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc); - if (!ep) - goto autoconf_fail; - EP_IN_NAME = ep->name; - ep->driver_data = ep; /* claim the endpoint */ - - ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc); - if (!ep) - goto autoconf_fail; - EP_OUT_NAME = ep->name; - ep->driver_data = ep; /* claim the endpoint */ - - /* device specific bcdDevice value in device descriptor */ + /* device specific */ if (gadget_is_net2280(gadget)) { gs_device_desc.bcdDevice = __constant_cpu_to_le16(GS_VERSION_NUM|0x0001); @@ -1259,9 +1507,13 @@ } else if (gadget_is_sh(gadget)) { gs_device_desc.bcdDevice = __constant_cpu_to_le16(GS_VERSION_NUM|0x0003); + /* sh doesn't support multiple interfaces or configs */ + use_acm = 0; } else if (gadget_is_sa1100(gadget)) { gs_device_desc.bcdDevice = __constant_cpu_to_le16(GS_VERSION_NUM|0x0004); + /* sa1100 doesn't support necessary endpoints */ + use_acm = 0; } else if (gadget_is_goku(gadget)) { gs_device_desc.bcdDevice = __constant_cpu_to_le16(GS_VERSION_NUM|0x0005); @@ -1274,6 +1526,9 @@ } else if (gadget_is_lh7a40x(gadget)) { gs_device_desc.bcdDevice = __constant_cpu_to_le16(GS_VERSION_NUM|0x0008); + } else if (gadget_is_n9604(gadget)) { + gs_device_desc.bcdDevice = + __constant_cpu_to_le16(GS_VERSION_NUM|0x0009); } else { printk(KERN_WARNING "gs_bind: controller '%s' not recognized\n", gadget->name); @@ -1282,11 +1537,44 @@ __constant_cpu_to_le16(GS_VERSION_NUM|0x0099); } + usb_ep_autoconfig_reset(gadget); + + ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc); + if (!ep) + goto autoconf_fail; + EP_IN_NAME = ep->name; + ep->driver_data = ep; /* claim the endpoint */ + + ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc); + if (!ep) + goto autoconf_fail; + EP_OUT_NAME = ep->name; + ep->driver_data = ep; /* claim the endpoint */ + + if (use_acm) { + ep = usb_ep_autoconfig(gadget, &gs_fullspeed_notify_desc); + if (!ep) { + printk(KERN_ERR "gs_bind: cannot run ACM on %s\n", gadget->name); + goto autoconf_fail; + } + gs_device_desc.idProduct = __constant_cpu_to_le16( + GS_CDC_PRODUCT_ID), + EP_NOTIFY_NAME = ep->name; + ep->driver_data = ep; /* claim the endpoint */ + } + + gs_device_desc.bDeviceClass = use_acm + ? USB_CLASS_COMM : USB_CLASS_VENDOR_SPEC; gs_device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; + #ifdef CONFIG_USB_GADGET_DUALSPEED + gs_qualifier_desc.bDeviceClass = use_acm + ? USB_CLASS_COMM : USB_CLASS_VENDOR_SPEC; /* assume ep0 uses the same packet size for both speeds */ gs_qualifier_desc.bMaxPacketSize0 = gs_device_desc.bMaxPacketSize0; /* assume endpoints are dual-speed */ + gs_highspeed_notify_desc.bEndpointAddress = + gs_fullspeed_notify_desc.bEndpointAddress; gs_highspeed_in_desc.bEndpointAddress = gs_fullspeed_in_desc.bEndpointAddress; gs_highspeed_out_desc.bEndpointAddress = @@ -1295,11 +1583,17 @@ usb_gadget_set_selfpowered(gadget); + if (gadget->is_otg) { + gs_otg_descriptor.bmAttributes |= USB_OTG_HNP, + gs_bulk_config_desc.bmAttributes |= USB_CONFIG_ATT_WAKEUP; + gs_acm_config_desc.bmAttributes |= USB_CONFIG_ATT_WAKEUP; + } + gs_device = dev = kmalloc(sizeof(struct gs_dev), GFP_KERNEL); if (dev == NULL) return -ENOMEM; - snprintf (manufacturer, sizeof(manufacturer), + snprintf(manufacturer, sizeof(manufacturer), UTS_SYSNAME " " UTS_RELEASE " with %s", gadget->name); memset(dev, 0, sizeof(struct gs_dev)); @@ -1349,8 +1643,10 @@ /* read/write requests already freed, only control request remains */ if (dev != NULL) { - if (dev->dev_ctrl_req != NULL) + if (dev->dev_ctrl_req != NULL) { gs_free_req(gadget->ep0, dev->dev_ctrl_req); + dev->dev_ctrl_req = NULL; + } gs_free_ports(dev); kfree(dev); set_gadget_data(gadget, NULL); @@ -1369,10 +1665,51 @@ * Returns the size of the data sent to the host, or a negative * error number. */ -static int gs_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) +static int gs_setup(struct usb_gadget *gadget, + const struct usb_ctrlrequest *ctrl) +{ + int ret = -EOPNOTSUPP; + struct gs_dev *dev = get_gadget_data(gadget); + struct usb_request *req = dev->dev_ctrl_req; + + switch (ctrl->bRequestType & USB_TYPE_MASK) { + case USB_TYPE_STANDARD: + ret = gs_setup_standard(gadget,ctrl); + break; + + case USB_TYPE_CLASS: + ret = gs_setup_class(gadget,ctrl); + break; + + default: + printk(KERN_ERR "gs_setup: unknown request, type=%02x, request=%02x, value=%04x, index=%04x, length=%d\n", + ctrl->bRequestType, ctrl->bRequest, ctrl->wValue, + ctrl->wIndex, ctrl->wLength); + break; + } + + /* respond with data transfer before status phase? */ + if (ret >= 0) { + req->length = ret; + req->zero = ret < ctrl->wLength + && (ret % gadget->ep0->maxpacket) == 0; + ret = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC); + if (ret < 0) { + printk(KERN_ERR "gs_setup: cannot queue response, ret=%d\n", + ret); + req->status = 0; + gs_setup_complete(gadget->ep0, req); + } + } + + /* device either stalls (ret < 0) or reports success */ + return ret; +} + +static int gs_setup_standard(struct usb_gadget *gadget, + const struct usb_ctrlrequest *ctrl) { int ret = -EOPNOTSUPP; - unsigned int sv_config; struct gs_dev *dev = get_gadget_data(gadget); struct usb_request *req = dev->dev_ctrl_req; @@ -1398,10 +1735,14 @@ break; case USB_DT_OTHER_SPEED_CONFIG: + if (!gadget->is_dualspeed) + break; + /* fall through */ #endif /* CONFIG_USB_GADGET_DUALSPEED */ case USB_DT_CONFIG: - ret = gs_build_config_desc(req->buf, gadget->speed, - ctrl->wValue >> 8, ctrl->wValue & 0xff); + ret = gs_build_config_buf(req->buf, gadget->speed, + ctrl->wValue >> 8, ctrl->wValue & 0xff, + gadget->is_otg); if (ret >= 0) ret = min(ctrl->wLength, (u16)ret); break; @@ -1432,59 +1773,106 @@ break; case USB_REQ_SET_INTERFACE: - if (ctrl->bRequestType != USB_RECIP_INTERFACE) + if (ctrl->bRequestType != USB_RECIP_INTERFACE + || !dev->dev_config || ctrl->wIndex >= GS_MAX_NUM_INTERFACES) break; - spin_lock(&dev->dev_lock); if (dev->dev_config == GS_BULK_CONFIG_ID - && ctrl->wIndex == GS_INTERFACE_ID - && ctrl->wValue == GS_ALT_INTERFACE_ID) { - sv_config = dev->dev_config; - /* since there is only one interface, setting the */ - /* interface is equivalent to setting the config */ - gs_reset_config(dev); - gs_set_config(dev, sv_config); - ret = 0; + && ctrl->wIndex != GS_BULK_INTERFACE_ID) + break; + /* no alternate interface settings */ + if (ctrl->wValue != 0) + break; + spin_lock(&dev->dev_lock); + /* PXA hardware partially handles SET_INTERFACE; + * we need to kluge around that interference. */ + if (gadget_is_pxa(gadget)) { + ret = gs_set_config(dev, use_acm ? + GS_ACM_CONFIG_ID : GS_BULK_CONFIG_ID); + goto set_interface_done; } + if (dev->dev_config != GS_BULK_CONFIG_ID + && ctrl->wIndex == GS_CONTROL_INTERFACE_ID) { + if (dev->dev_notify_ep) { + usb_ep_disable(dev->dev_notify_ep); + usb_ep_enable(dev->dev_notify_ep, dev->dev_notify_ep_desc); + } + } else { + usb_ep_disable(dev->dev_in_ep); + usb_ep_disable(dev->dev_out_ep); + usb_ep_enable(dev->dev_in_ep, dev->dev_in_ep_desc); + usb_ep_enable(dev->dev_out_ep, dev->dev_out_ep_desc); + } + ret = 0; +set_interface_done: spin_unlock(&dev->dev_lock); break; case USB_REQ_GET_INTERFACE: - if (ctrl->bRequestType != (USB_DIR_IN|USB_RECIP_INTERFACE)) + if (ctrl->bRequestType != (USB_DIR_IN|USB_RECIP_INTERFACE) + || dev->dev_config == GS_NO_CONFIG_ID) break; - if (dev->dev_config == GS_NO_CONFIG_ID) - break; - if (ctrl->wIndex != GS_INTERFACE_ID) { + if (ctrl->wIndex >= GS_MAX_NUM_INTERFACES + || (dev->dev_config == GS_BULK_CONFIG_ID + && ctrl->wIndex != GS_BULK_INTERFACE_ID)) { ret = -EDOM; break; } - *(u8 *)req->buf = GS_ALT_INTERFACE_ID; + /* no alternate interface settings */ + *(u8 *)req->buf = 0; ret = min(ctrl->wLength, (u16)1); break; default: - printk(KERN_ERR "gs_setup: unknown request, type=%02x, request=%02x, value=%04x, index=%04x, length=%d\n", + printk(KERN_ERR "gs_setup: unknown standard request, type=%02x, request=%02x, value=%04x, index=%04x, length=%d\n", ctrl->bRequestType, ctrl->bRequest, ctrl->wValue, ctrl->wIndex, ctrl->wLength); break; - } - /* respond with data transfer before status phase? */ - if (ret >= 0) { - req->length = ret; - req->zero = ret < ctrl->wLength - && (ret % gadget->ep0->maxpacket) == 0; - ret = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC); - if (ret < 0) { - printk(KERN_ERR - "gs_setup: cannot queue response, ret=%d\n", - ret); - req->status = 0; - gs_setup_complete(gadget->ep0, req); + return ret; +} + +static int gs_setup_class(struct usb_gadget *gadget, + const struct usb_ctrlrequest *ctrl) +{ + int ret = -EOPNOTSUPP; + struct gs_dev *dev = get_gadget_data(gadget); + struct gs_port *port = dev->dev_port[0]; /* ACM only has one port */ + struct usb_request *req = dev->dev_ctrl_req; + + switch (ctrl->bRequest) { + case USB_CDC_REQ_SET_LINE_CODING: + ret = min(ctrl->wLength, + (u16)sizeof(struct usb_cdc_line_coding)); + if (port) { + spin_lock(&port->port_lock); + memcpy(&port->port_line_coding, req->buf, ret); + spin_unlock(&port->port_lock); } + break; + + case USB_CDC_REQ_GET_LINE_CODING: + port = dev->dev_port[0]; /* ACM only has one port */ + ret = min(ctrl->wLength, + (u16)sizeof(struct usb_cdc_line_coding)); + if (port) { + spin_lock(&port->port_lock); + memcpy(req->buf, &port->port_line_coding, ret); + spin_unlock(&port->port_lock); + } + break; + + case USB_CDC_REQ_SET_CONTROL_LINE_STATE: + ret = 0; + break; + + default: + printk(KERN_ERR "gs_setup: unknown class request, type=%02x, request=%02x, value=%04x, index=%04x, length=%d\n", + ctrl->bRequestType, ctrl->bRequest, ctrl->wValue, + ctrl->wIndex, ctrl->wLength); + break; } - /* device either stalls (ret < 0) or reports success */ return ret; } @@ -1543,6 +1931,7 @@ int ret = 0; struct usb_gadget *gadget = dev->dev_gadget; struct usb_ep *ep; + struct usb_endpoint_descriptor *ep_desc; struct usb_request *req; struct gs_req_entry *req_entry; @@ -1556,55 +1945,90 @@ gs_reset_config(dev); - if (config == GS_NO_CONFIG_ID) + switch (config) { + case GS_NO_CONFIG_ID: return 0; - - if (config != GS_BULK_CONFIG_ID) + case GS_BULK_CONFIG_ID: + if (use_acm) + return -EINVAL; + /* device specific optimizations */ + if (gadget_is_net2280(gadget)) + net2280_set_fifo_mode(gadget, 1); + break; + case GS_ACM_CONFIG_ID: + if (!use_acm) + return -EINVAL; + /* device specific optimizations */ + if (gadget_is_net2280(gadget)) + net2280_set_fifo_mode(gadget, 1); + break; + default: return -EINVAL; + } - /* device specific optimizations */ - if (gadget_is_net2280(gadget)) - net2280_set_fifo_mode(gadget, 1); + dev->dev_config = config; gadget_for_each_ep(ep, gadget) { - if (strcmp(ep->name, EP_IN_NAME) == 0) { - ret = usb_ep_enable(ep, - gadget->speed == USB_SPEED_HIGH ? - &gs_highspeed_in_desc : &gs_fullspeed_in_desc); + if (EP_NOTIFY_NAME + && strcmp(ep->name, EP_NOTIFY_NAME) == 0) { + ep_desc = GS_SPEED_SELECT( + gadget->speed == USB_SPEED_HIGH, + &gs_highspeed_notify_desc, + &gs_fullspeed_notify_desc); + ret = usb_ep_enable(ep,ep_desc); + if (ret == 0) { + ep->driver_data = dev; + dev->dev_notify_ep = ep; + dev->dev_notify_ep_desc = ep_desc; + } else { + printk(KERN_ERR "gs_set_config: cannot enable notify endpoint %s, ret=%d\n", + ep->name, ret); + goto exit_reset_config; + } + } + + else if (strcmp(ep->name, EP_IN_NAME) == 0) { + ep_desc = GS_SPEED_SELECT( + gadget->speed == USB_SPEED_HIGH, + &gs_highspeed_in_desc, + &gs_fullspeed_in_desc); + ret = usb_ep_enable(ep,ep_desc); if (ret == 0) { ep->driver_data = dev; dev->dev_in_ep = ep; + dev->dev_in_ep_desc = ep_desc; } else { printk(KERN_ERR "gs_set_config: cannot enable in endpoint %s, ret=%d\n", ep->name, ret); - gs_reset_config(dev); - return ret; + goto exit_reset_config; } } else if (strcmp(ep->name, EP_OUT_NAME) == 0) { - ret = usb_ep_enable(ep, - gadget->speed == USB_SPEED_HIGH ? - &gs_highspeed_out_desc : + ep_desc = GS_SPEED_SELECT( + gadget->speed == USB_SPEED_HIGH, + &gs_highspeed_out_desc, &gs_fullspeed_out_desc); + ret = usb_ep_enable(ep,ep_desc); if (ret == 0) { ep->driver_data = dev; dev->dev_out_ep = ep; + dev->dev_out_ep_desc = ep_desc; } else { printk(KERN_ERR "gs_set_config: cannot enable out endpoint %s, ret=%d\n", ep->name, ret); - gs_reset_config(dev); - return ret; + goto exit_reset_config; } } } - if (dev->dev_in_ep == NULL || dev->dev_out_ep == NULL) { - gs_reset_config(dev); + if (dev->dev_in_ep == NULL || dev->dev_out_ep == NULL + || (config != GS_BULK_CONFIG_ID && dev->dev_notify_ep == NULL)) { printk(KERN_ERR "gs_set_config: cannot find endpoints\n"); - return -ENODEV; + ret = -ENODEV; + goto exit_reset_config; } /* allocate and queue read requests */ @@ -1617,10 +2041,9 @@ ret); } } else { - gs_reset_config(dev); - printk(KERN_ERR - "gs_set_config: cannot allocate read requests\n"); - return -ENOMEM; + printk(KERN_ERR "gs_set_config: cannot allocate read requests\n"); + ret = -ENOMEM; + goto exit_reset_config; } } @@ -1631,20 +2054,22 @@ req_entry->re_req->complete = gs_write_complete; list_add(&req_entry->re_entry, &dev->dev_req_list); } else { - gs_reset_config(dev); - printk(KERN_ERR - "gs_set_config: cannot allocate write requests\n"); - return -ENOMEM; + printk(KERN_ERR "gs_set_config: cannot allocate write requests\n"); + ret = -ENOMEM; + goto exit_reset_config; } } - dev->dev_config = config; - - printk(KERN_INFO "gs_set_config: %s configured for %s speed\n", + printk(KERN_INFO "gs_set_config: %s configured, %s speed %s config\n", GS_LONG_NAME, - gadget->speed == USB_SPEED_HIGH ? "high" : "full"); + gadget->speed == USB_SPEED_HIGH ? "high" : "full", + config == GS_BULK_CONFIG_ID ? "BULK" : "CDC-ACM"); return 0; + +exit_reset_config: + gs_reset_config(dev); + return ret; } /* @@ -1681,6 +2106,10 @@ /* disable endpoints, forcing completion of pending i/o; */ /* completion handlers free their requests in this case */ + if (dev->dev_notify_ep) { + usb_ep_disable(dev->dev_notify_ep); + dev->dev_notify_ep = NULL; + } if (dev->dev_in_ep) { usb_ep_disable(dev->dev_in_ep); dev->dev_in_ep = NULL; @@ -1692,41 +2121,48 @@ } /* - * gs_build_config_desc + * gs_build_config_buf * - * Builds a config descriptor in the given buffer and returns the + * Builds the config descriptors in the given buffer and returns the * length, or a negative error number. */ -static int gs_build_config_desc(u8 *buf, enum usb_device_speed speed, u8 type, unsigned int index) +static int gs_build_config_buf(u8 *buf, enum usb_device_speed speed, + u8 type, unsigned int index, int is_otg) { + int len; int high_speed; - int len = USB_DT_CONFIG_SIZE + USB_DT_INTERFACE_SIZE - + GS_NUM_ENDPOINTS * USB_DT_ENDPOINT_SIZE; + const struct usb_config_descriptor *config_desc; + const struct usb_descriptor_header **function; - /* only one config */ - if (index != 0) + if (index >= gs_device_desc.bNumConfigurations) return -EINVAL; - memcpy(buf, &gs_config_desc, USB_DT_CONFIG_SIZE); - ((struct usb_config_descriptor *)buf)->bDescriptorType = type; - ((struct usb_config_descriptor *)buf)->wTotalLength = __constant_cpu_to_le16(len); - buf += USB_DT_CONFIG_SIZE; - - memcpy(buf, &gs_interface_desc, USB_DT_INTERFACE_SIZE); - buf += USB_DT_INTERFACE_SIZE; - /* other speed switches high and full speed */ high_speed = (speed == USB_SPEED_HIGH); if (type == USB_DT_OTHER_SPEED_CONFIG) high_speed = !high_speed; - memcpy(buf, - high_speed ? &gs_highspeed_in_desc : &gs_fullspeed_in_desc, - USB_DT_ENDPOINT_SIZE); - buf += USB_DT_ENDPOINT_SIZE; - memcpy(buf, - high_speed ? &gs_highspeed_out_desc : &gs_fullspeed_out_desc, - USB_DT_ENDPOINT_SIZE); + if (use_acm) { + config_desc = &gs_acm_config_desc; + function = GS_SPEED_SELECT(high_speed, + gs_acm_highspeed_function, + gs_acm_fullspeed_function); + } else { + config_desc = &gs_bulk_config_desc; + function = GS_SPEED_SELECT(high_speed, + gs_bulk_highspeed_function, + gs_bulk_fullspeed_function); + } + + /* for now, don't advertise srp-only devices */ + if (!is_otg) + function++; + + len = usb_gadget_config_buf(config_desc, buf, GS_MAX_DESC_LEN, function); + if (len < 0) + return len; + + ((struct usb_config_descriptor *)buf)->bDescriptorType = type; return len; } @@ -1748,8 +2184,7 @@ if (req != NULL) { req->length = len; - req->buf = usb_ep_alloc_buffer(ep, len, &req->dma, - kmalloc_flags); + req->buf = kmalloc(len, kmalloc_flags); if (req->buf == NULL) { usb_ep_free_request(ep, req); return NULL; @@ -1767,9 +2202,7 @@ static void gs_free_req(struct usb_ep *ep, struct usb_request *req) { if (ep != NULL && req != NULL) { - if (req->buf != NULL) - usb_ep_free_buffer(ep, req->buf, req->dma, - req->length); + kfree(req->buf); usb_ep_free_request(ep, req); } } @@ -1836,6 +2269,10 @@ memset(port, 0, sizeof(struct gs_port)); port->port_dev = dev; port->port_num = i; + port->port_line_coding.dwDTERate = GS_DEFAULT_DTE_RATE; + port->port_line_coding.bCharFormat = GS_DEFAULT_CHAR_FORMAT; + port->port_line_coding.bParityType = GS_DEFAULT_PARITY; + port->port_line_coding.bDataBits = GS_DEFAULT_DATA_BITS; spin_lock_init(&port->port_lock); init_waitqueue_head(&port->port_write_wait); @@ -1878,8 +2315,10 @@ if (port->port_open_count > 0 || port->port_in_use) { port->port_dev = NULL; wake_up_interruptible(&port->port_write_wait); - wake_up_interruptible(&port->port_tty->read_wait); - wake_up_interruptible(&port->port_tty->write_wait); + if (port->port_tty) { + wake_up_interruptible(&port->port_tty->read_wait); + wake_up_interruptible(&port->port_tty->write_wait); + } } else { kfree(port); } diff -Nru a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c --- a/drivers/usb/gadget/zero.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/gadget/zero.c 2004-11-10 17:19:04 -08:00 @@ -396,7 +396,7 @@ #endif /* !CONFIG_USB_GADGET_DUALSPEED */ -static char manufacturer [40]; +static char manufacturer [50]; static char serial [40]; /* static strings, in UTF-8 */ @@ -1189,7 +1189,7 @@ } else if (gadget_is_lh7a40x(gadget)) { device_desc.bcdDevice = __constant_cpu_to_le16 (0x0209); } else if (gadget_is_n9604(gadget)) { - device_desc.bcdDevice = __constant_cpu_to_le16 (0x020a); + device_desc.bcdDevice = __constant_cpu_to_le16 (0x0210); } else { /* gadget zero is so simple (for now, no altsettings) that * it SHOULD NOT have problems with bulk-capable hardware. diff -Nru a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig --- a/drivers/usb/host/Kconfig 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/host/Kconfig 2004-11-10 17:19:06 -08:00 @@ -1,3 +1,21 @@ +# Host-side USB depends on having a host controller +# NOTE: dummy_hcd is always an option, but it's ignored here ... +# NOTE: SL-811 option should be board-specific ... +config USB_ARCH_HAS_HCD + boolean + default y if USB_ARCH_HAS_OHCI + default y if ARM # SL-811 + default PCI + +# many non-PCI hcds implement OHCI +config USB_ARCH_HAS_OHCI + boolean + default y if SA1111 + default y if ARCH_OMAP + default y if ARCH_LH7A404 + default y if PXA27x + default PCI + # # USB Host Controller Drivers # @@ -6,7 +24,7 @@ config USB_EHCI_HCD tristate "EHCI HCD (USB 2.0) support" - depends on USB + depends on USB && PCI ---help--- The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0 "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware. @@ -51,8 +69,8 @@ config USB_OHCI_HCD tristate "OHCI HCD support" - depends on USB - select ISP1301_OMAP if MACH_OMAP_H2 + depends on USB && USB_ARCH_HAS_OHCI + select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 ---help--- The Open Host Controller Interface (OHCI) is a standard for accessing USB 1.1 host controller hardware. It does more in hardware than Intel's @@ -68,7 +86,7 @@ config USB_UHCI_HCD tristate "UHCI HCD (most Intel and VIA) support" - depends on USB + depends on USB && PCI ---help--- The Universal Host Controller Interface is a standard by Intel for accessing the USB hardware in the PC (which is also called the USB diff -Nru a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c --- a/drivers/usb/host/ehci-dbg.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/host/ehci-dbg.c 2004-11-10 17:19:06 -08:00 @@ -185,7 +185,7 @@ } static int __attribute__((__unused__)) -dbg_status_buf (char *buf, unsigned len, char *label, u32 status) +dbg_status_buf (char *buf, unsigned len, const char *label, u32 status) { return scnprintf (buf, len, "%s%sstatus %04x%s%s%s%s%s%s%s%s%s%s", @@ -204,7 +204,7 @@ } static int __attribute__((__unused__)) -dbg_intr_buf (char *buf, unsigned len, char *label, u32 enable) +dbg_intr_buf (char *buf, unsigned len, const char *label, u32 enable) { return scnprintf (buf, len, "%s%sintrenable %02x%s%s%s%s%s%s", @@ -221,7 +221,8 @@ static const char *const fls_strings [] = { "1024", "512", "256", "??" }; -static int dbg_command_buf (char *buf, unsigned len, char *label, u32 command) +static int +dbg_command_buf (char *buf, unsigned len, const char *label, u32 command) { return scnprintf (buf, len, "%s%scommand %06x %s=%d ithresh=%d%s%s%s%s period=%s%s %s", @@ -240,7 +241,7 @@ } static int -dbg_port_buf (char *buf, unsigned len, char *label, int port, u32 status) +dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status) { char *sig; @@ -276,19 +277,19 @@ {} static inline int __attribute__((__unused__)) -dbg_status_buf (char *buf, unsigned len, char *label, u32 status) +dbg_status_buf (char *buf, unsigned len, const char *label, u32 status) { return 0; } static inline int __attribute__((__unused__)) -dbg_command_buf (char *buf, unsigned len, char *label, u32 command) +dbg_command_buf (char *buf, unsigned len, const char *label, u32 command) { return 0; } static inline int __attribute__((__unused__)) -dbg_intr_buf (char *buf, unsigned len, char *label, u32 enable) +dbg_intr_buf (char *buf, unsigned len, const char *label, u32 enable) { return 0; } static inline int __attribute__((__unused__)) -dbg_port_buf (char *buf, unsigned len, char *label, int port, u32 status) +dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status) { return 0; } #endif /* DEBUG */ diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c --- a/drivers/usb/host/ehci-hcd.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/host/ehci-hcd.c 2004-11-10 17:19:05 -08:00 @@ -97,7 +97,7 @@ * 2001-June Works with usb-storage and NEC EHCI on 2.4 */ -#define DRIVER_VERSION "2004-May-10" +#define DRIVER_VERSION "26 Oct 2004" #define DRIVER_AUTHOR "David Brownell" #define DRIVER_DESC "USB 2.0 'Enhanced' Host Controller (EHCI) Driver" @@ -207,7 +207,7 @@ } /* idle the controller (from running) */ -static void ehci_ready (struct ehci_hcd *ehci) +static void ehci_quiesce (struct ehci_hcd *ehci) { u32 temp; @@ -217,11 +217,8 @@ #endif /* wait for any schedule enables/disables to take effect */ - temp = 0; - if (ehci->async->qh_next.qh) - temp = STS_ASS; - if (ehci->next_uframe != -1) - temp |= STS_PSS; + temp = readl (&ehci->regs->command) << 10; + temp &= STS_ASS | STS_PSS; if (handshake (&ehci->regs->status, STS_ASS | STS_PSS, temp, 16 * 125) != 0) { ehci->hcd.state = USB_STATE_HALT; @@ -347,9 +344,18 @@ #ifdef CONFIG_PCI /* EHCI 0.96 and later may have "extended capabilities" */ - if (hcd->self.controller->bus == &pci_bus_type) + if (hcd->self.controller->bus == &pci_bus_type) { + struct pci_dev *pdev = to_pci_dev(ehci->hcd.self.controller); + + /* AMD8111 EHCI doesn't work, according to AMD errata */ + if ((pdev->vendor == PCI_VENDOR_ID_AMD) + && (pdev->device == 0x7463)) { + ehci_info (ehci, "ignoring AMD8111 (errata)\n"); + return -EIO; + } + temp = HCC_EXT_CAPS (readl (&ehci->caps->hcc_params)); - else + } else temp = 0; while (temp && count--) { u32 cap; @@ -362,10 +368,6 @@ if (bios_handoff (ehci, temp, cap) != 0) return -EOPNOTSUPP; break; - case 0x0a: /* appendix C */ - ehci_dbg (ehci, "debug registers, BAR %d offset %d\n", - (cap >> 29) & 0x07, (cap >> 16) & 0x0fff); - break; case 0: /* illegal reserved capability */ ehci_warn (ehci, "illegal capability!\n"); cap = 0; @@ -397,17 +399,22 @@ int retval; u32 hcc_params; u8 sbrn = 0; + int first; - init_timer (&ehci->watchdog); - ehci->watchdog.function = ehci_watchdog; - ehci->watchdog.data = (unsigned long) ehci; + /* skip some things on restart paths */ + first = (ehci->watchdog.data == 0); + if (first) { + init_timer (&ehci->watchdog); + ehci->watchdog.function = ehci_watchdog; + ehci->watchdog.data = (unsigned long) ehci; + } /* * hw default: 1K periodic list heads, one per frame. * periodic_size can shrink by USBCMD update if hcc_params allows. */ ehci->periodic_size = DEFAULT_I_TDPS; - if ((retval = ehci_mem_init (ehci, GFP_KERNEL)) < 0) + if (first && (retval = ehci_mem_init (ehci, GFP_KERNEL)) < 0) return retval; /* controllers may cache some of the periodic schedule ... */ @@ -418,6 +425,7 @@ ehci->i_thresh = 2 + HCC_ISOC_THRES (hcc_params); ehci->reclaim = NULL; + ehci->reclaim_ready = 0; ehci->next_uframe = -1; /* controller state: unknown --> reset */ @@ -464,14 +472,16 @@ * its dummy is used in hw_alt_next of many tds, to prevent the qh * from automatically advancing to the next td after short reads. */ - ehci->async->qh_next.qh = NULL; - ehci->async->hw_next = QH_NEXT (ehci->async->qh_dma); - ehci->async->hw_info1 = cpu_to_le32 (QH_HEAD); - ehci->async->hw_token = cpu_to_le32 (QTD_STS_HALT); - ehci->async->hw_qtd_next = EHCI_LIST_END; - ehci->async->qh_state = QH_STATE_LINKED; - ehci->async->hw_alt_next = QTD_NEXT (ehci->async->dummy->qtd_dma); - writel ((u32)ehci->async->qh_dma, &ehci->regs->async_next); + if (first) { + ehci->async->qh_next.qh = NULL; + ehci->async->hw_next = QH_NEXT (ehci->async->qh_dma); + ehci->async->hw_info1 = cpu_to_le32 (QH_HEAD); + ehci->async->hw_token = cpu_to_le32 (QTD_STS_HALT); + ehci->async->hw_qtd_next = EHCI_LIST_END; + ehci->async->qh_state = QH_STATE_LINKED; + ehci->async->hw_alt_next = QTD_NEXT (ehci->async->dummy->qtd_dma); + writel ((u32)ehci->async->qh_dma, &ehci->regs->async_next); + } /* * hcc_params controls whether ehci->regs->segment must (!!!) @@ -522,12 +532,15 @@ /* wire up the root hub */ bus = hcd_to_bus (hcd); - udev = usb_alloc_dev (NULL, bus, 0); + udev = first ? usb_alloc_dev (NULL, bus, 0) : bus->root_hub; if (!udev) { done2: ehci_mem_cleanup (ehci); return -ENOMEM; } + udev->speed = USB_SPEED_HIGH; + udev->state = first ? USB_STATE_ATTACHED : USB_STATE_CONFIGURED; + udev->dev.power.power_state = PM_SUSPEND_ON; /* * Start, enabling full USB 2.0 functionality ... usb 1.1 devices @@ -535,8 +548,10 @@ * involved with the root hub. (Except where one is integrated, * and there's no companion controller unless maybe for USB OTG.) */ - ehci->reboot_notifier.notifier_call = ehci_reboot; - register_reboot_notifier (&ehci->reboot_notifier); + if (first) { + ehci->reboot_notifier.notifier_call = ehci_reboot; + register_reboot_notifier (&ehci->reboot_notifier); + } ehci->hcd.state = USB_STATE_RUNNING; writel (FLAG_CF, &ehci->regs->configured_flag); @@ -544,21 +559,23 @@ temp = HC_VERSION(readl (&ehci->caps->hc_capbase)); ehci_info (ehci, - "USB %x.%x enabled, EHCI %x.%02x, driver %s\n", + "USB %x.%x %s, EHCI %x.%02x, driver %s\n", ((sbrn & 0xf0)>>4), (sbrn & 0x0f), + first ? "initialized" : "restarted", temp >> 8, temp & 0xff, DRIVER_VERSION); /* * From here on, khubd concurrently accesses the root * hub; drivers will be talking to enumerated devices. + * (On restart paths, khubd already knows about the root + * hub and could find work as soon as we wrote FLAG_CF.) * * Before this point the HC was idle/ready. After, khubd * and device drivers may start it running. */ - udev->speed = USB_SPEED_HIGH; - if (hcd_register_root (udev, hcd) != 0) { + if (first && hcd_register_root (udev, hcd) != 0) { if (hcd->state == USB_STATE_RUNNING) - ehci_ready (ehci); + ehci_quiesce (ehci); ehci_reset (ehci); usb_put_dev (udev); retval = -ENODEV; @@ -567,7 +584,8 @@ writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */ - create_debug_files (ehci); + if (first) + create_debug_files (ehci); return 0; } @@ -581,24 +599,23 @@ ehci_dbg (ehci, "stop\n"); - /* no more interrupts ... */ - if (hcd->state == USB_STATE_RUNNING) - ehci_ready (ehci); - if (in_interrupt ()) { /* must not happen!! */ - ehci_err (ehci, "stopped in_interrupt!\n"); - return; - } - del_timer_sync (&ehci->watchdog); - /* Turn off port power on all root hub ports. */ rh_ports = HCS_N_PORTS (ehci->hcs_params); - for (port = 1; port <= rh_ports; port++) { - ehci_hub_control(hcd, ClearPortFeature, USB_PORT_FEAT_POWER, + for (port = 1; port <= rh_ports; port++) + (void) ehci_hub_control(hcd, + ClearPortFeature, USB_PORT_FEAT_POWER, port, NULL, 0); - } + + /* no more interrupts ... */ + del_timer_sync (&ehci->watchdog); + + spin_lock_irq(&ehci->lock); + if (HCD_IS_RUNNING (ehci->hcd.state)) + ehci_quiesce (ehci); ehci_reset (ehci); writel (0, &ehci->regs->intr_enable); + spin_unlock_irq(&ehci->lock); /* let companion controllers work when we aren't */ writel (0, &ehci->regs->configured_flag); @@ -636,7 +653,8 @@ /* suspend/resume, section 4.3 */ -/* These routines rely on PCI to handle powerdown and wakeup, and +/* These routines rely on the bus (pci, platform, etc) + * to handle powerdown and wakeup, and currently also on * transceivers that don't need any software attention to set up * the right sort of wakeup. */ @@ -645,6 +663,9 @@ { struct ehci_hcd *ehci = hcd_to_ehci (hcd); + if (hcd->self.root_hub->dev.power.power_state) + return 0; + while (time_before (jiffies, ehci->next_statechange)) msleep (100); @@ -663,19 +684,51 @@ static int ehci_resume (struct usb_hcd *hcd) { struct ehci_hcd *ehci = hcd_to_ehci (hcd); - int retval; + unsigned port; + struct usb_device *root = hcd->self.root_hub; + int retval = -EINVAL; // maybe restore (PCI) FLADJ while (time_before (jiffies, ehci->next_statechange)) msleep (100); -#ifdef CONFIG_USB_SUSPEND - retval = usb_resume_device (hcd->self.root_hub); -#else - /* FIXME lock root hub */ - retval = ehci_hub_resume (hcd); -#endif + /* If any port is suspended, we know we can/must resume the HC. */ + for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; ) { + u32 status; + port--; + status = readl (&ehci->regs->port_status [port]); + if (status & PORT_SUSPEND) { + down (&hcd->self.root_hub->serialize); + retval = ehci_hub_resume (hcd); + up (&hcd->self.root_hub->serialize); + break; + } + if (!root->children [port]) + continue; + dbg_port (ehci, __FUNCTION__, port + 1, status); + usb_set_device_state (root->children[port], + USB_STATE_NOTATTACHED); + } + + /* Else reset, to cope with power loss or flush-to-storage + * style "resume" having activated BIOS during reboot. + */ + if (port == 0) { + (void) ehci_halt (ehci); + (void) ehci_reset (ehci); + (void) ehci_hc_reset (hcd); + + /* emptying the schedule aborts any urbs */ + spin_lock_irq (&ehci->lock); + if (ehci->reclaim) + ehci->reclaim_ready = 1; + ehci_work (ehci, NULL); + spin_unlock_irq (&ehci->lock); + + /* restart; khubd will disconnect devices */ + retval = ehci_start (hcd); + } if (retval == 0) hcd->self.controller->power.power_state = 0; return retval; @@ -711,7 +764,8 @@ * misplace IRQs, and should let us run completely without IRQs. * such lossage has been observed on both VT6202 and VT8235. */ - if ((ehci->async->qh_next.ptr != 0) || (ehci->periodic_sched != 0)) + if (HCD_IS_RUNNING (ehci->hcd.state) && (ehci->async->qh_next.ptr != 0 + || ehci->periodic_sched != 0)) timer_action (ehci, TIMER_IO_WATCHDOG); } @@ -857,6 +911,30 @@ } } +static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh) +{ + /* if we need to use IAA and it's busy, defer */ + if (qh->qh_state == QH_STATE_LINKED + && ehci->reclaim + && HCD_IS_RUNNING (ehci->hcd.state)) { + struct ehci_qh *last; + + for (last = ehci->reclaim; + last->reclaim; + last = last->reclaim) + continue; + qh->qh_state = QH_STATE_UNLINK_WAIT; + last->reclaim = qh; + + /* bypass IAA if the hc can't care */ + } else if (!HCD_IS_RUNNING (ehci->hcd.state) && ehci->reclaim) + end_unlink_async (ehci, NULL); + + /* something else might have unlinked the qh by now */ + if (qh->qh_state == QH_STATE_LINKED) + start_unlink_async (ehci, qh); +} + /* remove from hardware lists * completions normally happen asynchronously */ @@ -875,28 +953,7 @@ qh = (struct ehci_qh *) urb->hcpriv; if (!qh) break; - - /* if we need to use IAA and it's busy, defer */ - if (qh->qh_state == QH_STATE_LINKED - && ehci->reclaim - && HCD_IS_RUNNING (ehci->hcd.state) - ) { - struct ehci_qh *last; - - for (last = ehci->reclaim; - last->reclaim; - last = last->reclaim) - continue; - qh->qh_state = QH_STATE_UNLINK_WAIT; - last->reclaim = qh; - - /* bypass IAA if the hc can't care */ - } else if (!HCD_IS_RUNNING (ehci->hcd.state) && ehci->reclaim) - end_unlink_async (ehci, NULL); - - /* something else might have unlinked the qh by now */ - if (qh->qh_state == QH_STATE_LINKED) - start_unlink_async (ehci, qh); + unlink_async (ehci, qh); break; case PIPE_INTERRUPT: @@ -949,7 +1006,7 @@ struct ehci_hcd *ehci = hcd_to_ehci (hcd); int epnum; unsigned long flags; - struct ehci_qh *qh; + struct ehci_qh *qh, *tmp; /* ASSERT: any requests/urbs are being unlinked */ /* ASSERT: nobody can be submitting urbs for this any more */ @@ -975,6 +1032,16 @@ if (!HCD_IS_RUNNING (ehci->hcd.state)) qh->qh_state = QH_STATE_IDLE; switch (qh->qh_state) { + case QH_STATE_LINKED: + for (tmp = ehci->async->qh_next.qh; + tmp && tmp != qh; + tmp = tmp->qh_next.qh) + continue; + /* periodic qh self-unlinks on empty */ + if (!tmp) + goto nogood; + unlink_async (ehci, qh); + /* FALL THROUGH */ case QH_STATE_UNLINK: /* wait for hw to finish? */ idle_timeout: spin_unlock_irqrestore (&ehci->lock, flags); @@ -988,6 +1055,7 @@ } /* else FALL THROUGH */ default: +nogood: /* caller was supposed to have unlinked any requests; * that's not our job. just leak this memory. */ @@ -1028,7 +1096,6 @@ * memory lifecycle (except per-request) */ .hcd_alloc = ehci_hcd_alloc, - .hcd_free = ehci_hcd_free, /* * managing i/o requests and associated device resources diff -Nru a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c --- a/drivers/usb/host/ehci-hub.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/usb/host/ehci-hub.c 2004-11-10 17:19:07 -08:00 @@ -35,7 +35,6 @@ struct ehci_hcd *ehci = hcd_to_ehci (hcd); struct usb_device *root = hcd_to_bus (&ehci->hcd)->root_hub; int port; - int status = 0; if (root->dev.power.power_state != 0) return 0; @@ -45,10 +44,23 @@ port = HCS_N_PORTS (ehci->hcs_params); spin_lock_irq (&ehci->lock); + /* for hcd->state HCD_STATE_SUSPENDED, also stop the non-USB side */ + root->dev.power.power_state = 3; + root->state = USB_STATE_SUSPENDED; + + /* stop schedules, clean any completed work */ + if (HCD_IS_RUNNING(hcd->state)) + ehci_quiesce (ehci); + ehci->command = readl (&ehci->regs->command); + if (ehci->reclaim) + ehci->reclaim_ready = 1; + ehci_work(ehci, NULL); + /* suspend any active/unsuspended ports, maybe allow wakeup */ while (port--) { - u32 t1 = readl (&ehci->regs->port_status [port]); - u32 t2 = t1; + u32 __iomem *reg = &ehci->regs->port_status [port]; + u32 t1 = readl (reg); + u32 t2 = t1; if ((t1 & PORT_PE) && !(t1 & PORT_OWNER)) t2 |= PORT_SUSPEND; @@ -60,24 +72,16 @@ if (t1 != t2) { ehci_vdbg (ehci, "port %d, %08x -> %08x\n", port + 1, t1, t2); - writel (t2, &ehci->regs->port_status [port]); + writel (t2, reg); } } - /* stop schedules, then turn off HC and clean any completed work */ - if (hcd->state == USB_STATE_RUNNING) - ehci_ready (ehci); - ehci->command = readl (&ehci->regs->command); - writel (ehci->command & ~CMD_RUN, &ehci->regs->command); - if (ehci->reclaim) - ehci->reclaim_ready = 1; - ehci_work(ehci, NULL); - (void) handshake (&ehci->regs->status, STS_HALT, STS_HALT, 2000); + /* turn off now-idle HC */ + ehci_halt (ehci); - root->dev.power.power_state = 3; ehci->next_statechange = jiffies + msecs_to_jiffies(10); spin_unlock_irq (&ehci->lock); - return status; + return 0; } @@ -96,12 +100,16 @@ /* re-init operational registers in case we lost power */ if (readl (&ehci->regs->intr_enable) == 0) { + temp = 1; writel (INTR_MASK, &ehci->regs->intr_enable); writel (0, &ehci->regs->segment); writel (ehci->periodic_dma, &ehci->regs->frame_list); writel ((u32)ehci->async->qh_dma, &ehci->regs->async_next); - /* FIXME will this work even (pci) vAUX was lost? */ - } + /* FIXME will this work even if (pci) vAUX was lost? */ + } else + temp = 0; + ehci_dbg(ehci, "resume root hub%s\n", + temp ? " after power loss" : ""); /* restore CMD_RUN, framelist size, and irq threshold */ writel (ehci->command, &ehci->regs->command); @@ -135,8 +143,10 @@ temp |= CMD_ASE; if (ehci->periodic_sched) temp |= CMD_PSE; - if (temp) - writel (ehci->command | temp, &ehci->regs->command); + if (temp) { + ehci->command |= temp; + writel (ehci->command, &ehci->regs->command); + } root->dev.power.power_state = 0; ehci->next_statechange = jiffies + msecs_to_jiffies(5); diff -Nru a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c --- a/drivers/usb/host/ehci-mem.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/host/ehci-mem.c 2004-11-10 17:19:06 -08:00 @@ -50,11 +50,6 @@ return NULL; } -static void ehci_hcd_free (struct usb_hcd *hcd) -{ - kfree (hcd_to_ehci (hcd)); -} - /*-------------------------------------------------------------------------*/ /* Allocate the key transfer structures from the previously allocated pool */ diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c --- a/drivers/usb/host/ehci-q.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/host/ehci-q.c 2004-11-10 17:19:06 -08:00 @@ -307,6 +307,9 @@ } else { stopped = 1; + if (unlikely (!HCD_IS_RUNNING (ehci->hcd.state))) + urb->status = -ESHUTDOWN; + /* ignore active urbs unless some previous qtd * for the urb faulted (including short read) or * its urb was canceled. we may patch qh or qtds. diff -Nru a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c --- a/drivers/usb/host/ehci-sched.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/usb/host/ehci-sched.c 2004-11-10 17:19:03 -08:00 @@ -353,8 +353,8 @@ hcd_to_bus (&ehci->hcd)->bandwidth_allocated -= (qh->usecs + qh->c_usecs) / qh->period; - dbg ("descheduled qh %p, period = %d frame = %d count = %d, urbs = %d", - qh, qh->period, frame, + ehci_dbg (ehci, "descheduled qh%d/%p frame=%d count=%d, urbs=%d\n", + qh->period, qh, frame, atomic_read (&qh->kref.refcount), ehci->periodic_sched); } @@ -486,13 +486,14 @@ qh->hw_info2 &= ~__constant_cpu_to_le32(0xffff); qh->hw_info2 |= cpu_to_le32 (1 << uframe) | c_mask; } else - dbg ("reused previous qh %p schedule", qh); + ehci_dbg (ehci, "reused qh %p schedule\n", qh); /* stuff into the periodic schedule */ qh->qh_state = QH_STATE_LINKED; - dbg ("scheduled qh %p usecs %d/%d period %d.0 starting %d.%d (gap %d)", - qh, qh->usecs, qh->c_usecs, - qh->period, frame, uframe, qh->gap_uf); + ehci_dbg(ehci, + "scheduled qh%d/%p usecs %d/%d starting %d.%d (gap %d)\n", + qh->period, qh, qh->usecs, qh->c_usecs, + frame, uframe, qh->gap_uf); do { if (unlikely (ehci->pshadow [frame].ptr != 0)) { @@ -1835,7 +1836,9 @@ while (q.ptr != 0) { unsigned uf; union ehci_shadow temp; + int live; + live = HCD_IS_RUNNING (ehci->hcd.state); switch (type) { case Q_TYPE_QH: /* handle any completions */ @@ -1860,7 +1863,7 @@ case Q_TYPE_ITD: /* skip itds for later in the frame */ rmb (); - for (uf = uframes; uf < 8; uf++) { + for (uf = live ? uframes : 8; uf < 8; uf++) { if (0 == (q.itd->hw_transaction [uf] & ITD_ACTIVE)) continue; @@ -1884,7 +1887,8 @@ q = *q_p; break; case Q_TYPE_SITD: - if (q.sitd->hw_results & SITD_ACTIVE) { + if ((q.sitd->hw_results & SITD_ACTIVE) + && live) { q_p = &q.sitd->sitd_next; hw_p = &q.sitd->hw_next; type = Q_NEXT_TYPE (q.sitd->hw_next); diff -Nru a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h --- a/drivers/usb/host/ehci.h 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/host/ehci.h 2004-11-10 17:19:06 -08:00 @@ -47,6 +47,13 @@ #define EHCI_MAX_ROOT_PORTS 15 /* see HCS_N_PORTS */ struct ehci_hcd { /* one per controller */ + + /* glue to PCI and HCD framework */ + struct usb_hcd hcd; /* must come first! */ + struct ehci_caps __iomem *caps; + struct ehci_regs __iomem *regs; + __u32 hcs_params; /* cached register copy */ + spinlock_t lock; /* async schedule support */ @@ -68,12 +75,6 @@ /* per root hub port */ unsigned long reset_done [EHCI_MAX_ROOT_PORTS]; - - /* glue to PCI and HCD framework */ - struct usb_hcd hcd; - struct ehci_caps __iomem *caps; - struct ehci_regs __iomem *regs; - __u32 hcs_params; /* cached register copy */ /* per-HC memory pools (could be per-bus, but ...) */ struct dma_pool *qh_pool; /* qh per active urb */ diff -Nru a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c --- a/drivers/usb/host/ohci-dbg.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/host/ohci-dbg.c 2004-11-10 17:19:06 -08:00 @@ -134,13 +134,13 @@ struct ohci_regs __iomem *regs = controller->regs; u32 temp; - temp = ohci_readl (®s->revision) & 0xff; + temp = ohci_readl (controller, ®s->revision) & 0xff; ohci_dbg_sw (controller, next, size, "OHCI %d.%d, %s legacy support registers\n", 0x03 & (temp >> 4), (temp & 0x0f), (temp & 0x10) ? "with" : "NO"); - temp = ohci_readl (®s->control); + temp = ohci_readl (controller, ®s->control); ohci_dbg_sw (controller, next, size, "control 0x%03x%s%s%s HCFS=%s%s%s%s%s CBSR=%d\n", temp, @@ -155,7 +155,7 @@ temp & OHCI_CTRL_CBSR ); - temp = ohci_readl (®s->cmdstatus); + temp = ohci_readl (controller, ®s->cmdstatus); ohci_dbg_sw (controller, next, size, "cmdstatus 0x%05x SOC=%d%s%s%s%s\n", temp, (temp & OHCI_SOC) >> 16, @@ -166,26 +166,33 @@ ); ohci_dump_intr_mask (controller, "intrstatus", - ohci_readl (®s->intrstatus), next, size); + ohci_readl (controller, ®s->intrstatus), + next, size); ohci_dump_intr_mask (controller, "intrenable", - ohci_readl (®s->intrenable), next, size); + ohci_readl (controller, ®s->intrenable), + next, size); // intrdisable always same as intrenable maybe_print_eds (controller, "ed_periodcurrent", - ohci_readl (®s->ed_periodcurrent), next, size); + ohci_readl (controller, ®s->ed_periodcurrent), + next, size); maybe_print_eds (controller, "ed_controlhead", - ohci_readl (®s->ed_controlhead), next, size); + ohci_readl (controller, ®s->ed_controlhead), + next, size); maybe_print_eds (controller, "ed_controlcurrent", - ohci_readl (®s->ed_controlcurrent), next, size); + ohci_readl (controller, ®s->ed_controlcurrent), + next, size); maybe_print_eds (controller, "ed_bulkhead", - ohci_readl (®s->ed_bulkhead), next, size); + ohci_readl (controller, ®s->ed_bulkhead), + next, size); maybe_print_eds (controller, "ed_bulkcurrent", - ohci_readl (®s->ed_bulkcurrent), next, size); + ohci_readl (controller, ®s->ed_bulkcurrent), + next, size); maybe_print_eds (controller, "donehead", - ohci_readl (®s->donehead), next, size); + ohci_readl (controller, ®s->donehead), next, size); } #define dbg_port_sw(hc,num,value,next,size) \ @@ -269,7 +276,7 @@ ohci_dump_status (controller, NULL, NULL); if (controller->hcca) ohci_dbg (controller, - "hcca frame #%04x\n", OHCI_FRAME_NO(controller->hcca)); + "hcca frame #%04x\n", ohci_frame_no(controller)); ohci_dump_roothub (controller, 1, NULL, NULL); } @@ -279,13 +286,13 @@ static void ohci_dump_td (const struct ohci_hcd *ohci, const char *label, const struct td *td) { - u32 tmp = le32_to_cpup (&td->hwINFO); + u32 tmp = hc32_to_cpup (ohci, &td->hwINFO); ohci_dbg (ohci, "%s td %p%s; urb %p index %d; hw next td %08x\n", label, td, (tmp & TD_DONE) ? " (DONE)" : "", td->urb, td->index, - le32_to_cpup (&td->hwNextTD)); + hc32_to_cpup (ohci, &td->hwNextTD)); if ((tmp & TD_ISO) == 0) { const char *toggle, *pid; u32 cbp, be; @@ -306,8 +313,8 @@ TD_CC_GET(tmp), /* EC, */ toggle, (tmp & TD_DI) >> 21, pid, (tmp & TD_R) ? "R" : ""); - cbp = le32_to_cpup (&td->hwCBP); - be = le32_to_cpup (&td->hwBE); + cbp = hc32_to_cpup (ohci, &td->hwCBP); + be = hc32_to_cpup (ohci, &td->hwBE); ohci_dbg (ohci, " cbp %08x be %08x (len %d)\n", cbp, be, cbp ? (be + 1 - cbp) : 0); } else { @@ -318,10 +325,10 @@ (tmp & TD_DI) >> 21, tmp & 0x0000ffff); ohci_dbg (ohci, " bp0 %08x be %08x\n", - le32_to_cpup (&td->hwCBP) & ~0x0fff, - le32_to_cpup (&td->hwBE)); + hc32_to_cpup (ohci, &td->hwCBP) & ~0x0fff, + hc32_to_cpup (ohci, &td->hwBE)); for (i = 0; i < MAXPSW; i++) { - u16 psw = le16_to_cpup (&td->hwPSW [i]); + u16 psw = hc16_to_cpup (ohci, &td->hwPSW [i]); int cc = (psw >> 12) & 0x0f; ohci_dbg (ohci, " psw [%d] = %2x, CC=%x %s=%d\n", i, psw, cc, @@ -336,33 +343,34 @@ ohci_dump_ed (const struct ohci_hcd *ohci, const char *label, const struct ed *ed, int verbose) { - __le32 tmp = ed->hwINFO; + u32 tmp = hc32_to_cpu (ohci, ed->hwINFO); char *type = ""; ohci_dbg (ohci, "%s, ed %p state 0x%x type %s; next ed %08x\n", label, ed, ed->state, edstring (ed->type), - le32_to_cpup (&ed->hwNextED)); + hc32_to_cpup (ohci, &ed->hwNextED)); switch (tmp & (ED_IN|ED_OUT)) { case ED_OUT: type = "-OUT"; break; case ED_IN: type = "-IN"; break; /* else from TDs ... control */ } ohci_dbg (ohci, - " info %08x MAX=%d%s%s%s%s EP=%d%s DEV=%d\n", le32_to_cpu (tmp), - 0x03ff & (le32_to_cpu (tmp) >> 16), + " info %08x MAX=%d%s%s%s%s EP=%d%s DEV=%d\n", tmp, + 0x03ff & (tmp >> 16), (tmp & ED_DEQUEUE) ? " DQ" : "", (tmp & ED_ISO) ? " ISO" : "", (tmp & ED_SKIP) ? " SKIP" : "", (tmp & ED_LOWSPEED) ? " LOW" : "", - 0x000f & (le32_to_cpu (tmp) >> 7), + 0x000f & (tmp >> 7), type, - 0x007f & le32_to_cpu (tmp)); + 0x007f & tmp); + tmp = hc32_to_cpup (ohci, &ed->hwHeadP); ohci_dbg (ohci, " tds: head %08x %s%s tail %08x%s\n", - le32_to_cpup (&ed->hwHeadP), - (ed->hwHeadP & ED_C) ? data1 : data0, - (ed->hwHeadP & ED_H) ? " HALT" : "", - le32_to_cpup (&ed->hwTailP), + tmp, + (tmp & ED_C) ? data1 : data0, + (tmp & ED_H) ? " HALT" : "", + hc32_to_cpup (ohci, &ed->hwTailP), verbose ? "" : " (not listing)"); if (verbose) { struct list_head *tmp; @@ -394,13 +402,6 @@ #else -static inline struct ohci_hcd *dev_to_ohci (struct device *dev) -{ - struct usb_hcd *hcd = dev_get_drvdata (dev); - - return hcd_to_ohci (hcd); -} - static ssize_t show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed) { @@ -415,23 +416,23 @@ /* dump a snapshot of the bulk or control schedule */ while (ed) { - __le32 info = ed->hwINFO; - u32 scratch = le32_to_cpup (&ed->hwINFO); - struct list_head *entry; - struct td *td; + u32 info = hc32_to_cpu (ohci, ed->hwINFO); + u32 headp = hc32_to_cpu (ohci, ed->hwHeadP); + struct list_head *entry; + struct td *td; temp = scnprintf (buf, size, "ed/%p %cs dev%d ep%d%s max %d %08x%s%s %s", ed, (info & ED_LOWSPEED) ? 'l' : 'f', - scratch & 0x7f, - (scratch >> 7) & 0xf, + info & 0x7f, + (info >> 7) & 0xf, (info & ED_IN) ? "in" : "out", - 0x03ff & (scratch >> 16), - scratch, + 0x03ff & (info >> 16), + info, (info & ED_SKIP) ? " s" : "", - (ed->hwHeadP & ED_H) ? " H" : "", - (ed->hwHeadP & ED_C) ? data1 : data0); + (headp & ED_H) ? " H" : "", + (headp & ED_C) ? data1 : data0); size -= temp; buf += temp; @@ -439,21 +440,21 @@ u32 cbp, be; td = list_entry (entry, struct td, td_list); - scratch = le32_to_cpup (&td->hwINFO); - cbp = le32_to_cpup (&td->hwCBP); - be = le32_to_cpup (&td->hwBE); + info = hc32_to_cpup (ohci, &td->hwINFO); + cbp = hc32_to_cpup (ohci, &td->hwCBP); + be = hc32_to_cpup (ohci, &td->hwBE); temp = scnprintf (buf, size, "\n\ttd %p %s %d cc=%x urb %p (%08x)", td, ({ char *pid; - switch (scratch & TD_DP) { + switch (info & TD_DP) { case TD_DP_SETUP: pid = "setup"; break; case TD_DP_IN: pid = "in"; break; case TD_DP_OUT: pid = "out"; break; default: pid = "(?)"; break; } pid;}), cbp ? (be + 1 - cbp) : 0, - TD_CC_GET (scratch), td->urb, scratch); + TD_CC_GET (info), td->urb, info); size -= temp; buf += temp; } @@ -541,8 +542,7 @@ /* show more info the first time around */ if (temp == seen_count) { - __le32 info = ed->hwINFO; - u32 scratch = le32_to_cpup (&ed->hwINFO); + u32 info = hc32_to_cpu (ohci, ed->hwINFO); struct list_head *entry; unsigned qlen = 0; @@ -554,15 +554,17 @@ " (%cs dev%d ep%d%s-%s qlen %u" " max %d %08x%s%s)", (info & ED_LOWSPEED) ? 'l' : 'f', - scratch & 0x7f, - (scratch >> 7) & 0xf, + info & 0x7f, + (info >> 7) & 0xf, (info & ED_IN) ? "in" : "out", (info & ED_ISO) ? "iso" : "int", qlen, - 0x03ff & (scratch >> 16), - scratch, + 0x03ff & (info >> 16), + info, (info & ED_SKIP) ? " K" : "", - (ed->hwHeadP & ED_H) ? " H" : ""); + (ed->hwHeadP & + cpu_to_hc32(ohci, ED_H)) ? + " H" : ""); size -= temp; next += temp; @@ -634,10 +636,10 @@ /* hcca */ if (ohci->hcca) ohci_dbg_sw (ohci, &next, &size, - "hcca frame 0x%04x\n", OHCI_FRAME_NO(ohci->hcca)); + "hcca frame 0x%04x\n", ohci_frame_no(ohci)); /* other registers mostly affect frame timings */ - rdata = ohci_readl (®s->fminterval); + rdata = ohci_readl (ohci, ®s->fminterval); temp = scnprintf (next, size, "fmintvl 0x%08x %sFSMPS=0x%04x FI=0x%04x\n", rdata, (rdata >> 31) ? "FIT " : "", @@ -645,20 +647,20 @@ size -= temp; next += temp; - rdata = ohci_readl (®s->fmremaining); + rdata = ohci_readl (ohci, ®s->fmremaining); temp = scnprintf (next, size, "fmremaining 0x%08x %sFR=0x%04x\n", rdata, (rdata >> 31) ? "FRT " : "", rdata & 0x3fff); size -= temp; next += temp; - rdata = ohci_readl (®s->periodicstart); + rdata = ohci_readl (ohci, ®s->periodicstart); temp = scnprintf (next, size, "periodicstart 0x%04x\n", rdata & 0x3fff); size -= temp; next += temp; - rdata = ohci_readl (®s->lsthresh); + rdata = ohci_readl (ohci, ®s->lsthresh); temp = scnprintf (next, size, "lsthresh 0x%04x\n", rdata & 0x3fff); size -= temp; diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c --- a/drivers/usb/host/ohci-hcd.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/usb/host/ohci-hcd.c 2004-11-10 17:19:02 -08:00 @@ -140,7 +140,6 @@ static void ohci_dump (struct ohci_hcd *ohci, int verbose); static int ohci_init (struct ohci_hcd *ohci); -static int ohci_restart (struct ohci_hcd *ohci); static void ohci_stop (struct usb_hcd *hcd); #include "ohci-hub.c" @@ -154,6 +153,11 @@ module_param (power_switching, bool, 0); MODULE_PARM_DESC (power_switching, "true (not default) to switch port power"); +/* Some boards leave IR set wrongly, since they fail BIOS/SMM handshakes */ +static int no_handshake = 0; +module_param (no_handshake, bool, 0); +MODULE_PARM_DESC (no_handshake, "true (not default) disables BIOS handshake"); + /*-------------------------------------------------------------------------*/ /* @@ -256,7 +260,7 @@ if (retval < 0) goto fail0; if (ed->type == PIPE_ISOCHRONOUS) { - u16 frame = OHCI_FRAME_NO(ohci->hcca); + u16 frame = ohci_frame_no(ohci); /* delay a few frames before the first TD */ frame += max_t (u16, 8, ed->interval); @@ -399,14 +403,14 @@ { struct ohci_hcd *ohci = hcd_to_ohci (hcd); - return OHCI_FRAME_NO(ohci->hcca); + return ohci_frame_no(ohci); } static void ohci_usb_reset (struct ohci_hcd *ohci) { - ohci->hc_control = ohci_readl (&ohci->regs->control); + ohci->hc_control = ohci_readl (ohci, &ohci->regs->control); ohci->hc_control &= OHCI_CTRL_RWC; - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); } /*-------------------------------------------------------------------------* @@ -426,7 +430,8 @@ #ifndef IR_DISABLE /* SMM owns the HC? not for long! */ - if (ohci_readl (&ohci->regs->control) & OHCI_CTRL_IR) { + if (!no_handshake && ohci_readl (ohci, + &ohci->regs->control) & OHCI_CTRL_IR) { ohci_dbg (ohci, "USB HC TakeOver from BIOS/SMM\n"); /* this timeout is arbitrary. we make it long, so systems @@ -435,9 +440,9 @@ */ temp = 500; /* arbitrary: five seconds */ - writel (OHCI_INTR_OC, &ohci->regs->intrenable); - writel (OHCI_OCR, &ohci->regs->cmdstatus); - while (ohci_readl (&ohci->regs->control) & OHCI_CTRL_IR) { + ohci_writel (ohci, OHCI_INTR_OC, &ohci->regs->intrenable); + ohci_writel (ohci, OHCI_OCR, &ohci->regs->cmdstatus); + while (ohci_readl (ohci, &ohci->regs->control) & OHCI_CTRL_IR) { msleep (10); if (--temp == 0) { ohci_err (ohci, "USB HC TakeOver failed!\n"); @@ -449,9 +454,9 @@ #endif /* Disable HC interrupts */ - writel (OHCI_INTR_MIE, &ohci->regs->intrdisable); + ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable); // flush the writes - (void) ohci_readl (&ohci->regs->control); + (void) ohci_readl (ohci, &ohci->regs->control); if (ohci->hcca) return 0; @@ -487,7 +492,7 @@ /* boot firmware should have set this up (5.1.1.3.1) */ if (first) { - temp = ohci_readl (&ohci->regs->fminterval); + temp = ohci_readl (ohci, &ohci->regs->fminterval); ohci->fminterval = temp & 0x3fff; if (ohci->fminterval != FI) ohci_dbg (ohci, "fminterval delta %d\n", @@ -500,7 +505,7 @@ * saved if boot firmware (BIOS/SMM/...) told us it's connected * (for OHCI integrated on mainboard, it normally is) */ - ohci->hc_control = ohci_readl (&ohci->regs->control); + ohci->hc_control = ohci_readl (ohci, &ohci->regs->control); ohci_dbg (ohci, "resetting from state '%s', control = 0x%x\n", hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS), ohci->hc_control); @@ -526,20 +531,20 @@ temp = 50 /* msec wait */; break; } - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); // flush the writes - (void) ohci_readl (&ohci->regs->control); + (void) ohci_readl (ohci, &ohci->regs->control); msleep(temp); if (power_switching) { unsigned ports = roothub_a (ohci) & RH_A_NDP; /* power down each port */ for (temp = 0; temp < ports; temp++) - writel (RH_PS_LSDA, + ohci_writel (ohci, RH_PS_LSDA, &ohci->regs->roothub.portstatus [temp]); } // flush those writes - (void) ohci_readl (&ohci->regs->control); + (void) ohci_readl (ohci, &ohci->regs->control); memset (ohci->hcca, 0, sizeof (struct ohci_hcca)); /* 2msec timelimit here means no irqs/preempt */ @@ -547,9 +552,9 @@ retry: /* HC Reset requires max 10 us delay */ - writel (OHCI_HCR, &ohci->regs->cmdstatus); + ohci_writel (ohci, OHCI_HCR, &ohci->regs->cmdstatus); temp = 30; /* ... allow extra time */ - while ((ohci_readl (&ohci->regs->cmdstatus) & OHCI_HCR) != 0) { + while ((ohci_readl (ohci, &ohci->regs->cmdstatus) & OHCI_HCR) != 0) { if (--temp == 0) { spin_unlock_irq (&ohci->lock); ohci_err (ohci, "USB HC reset timed out!\n"); @@ -568,27 +573,27 @@ * easily be a longstanding bug in chip init on Linux. */ if (ohci->flags & OHCI_QUIRK_INITRESET) { - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); // flush those writes - (void) ohci_readl (&ohci->regs->control); + (void) ohci_readl (ohci, &ohci->regs->control); } - writel (ohci->fminterval, &ohci->regs->fminterval); + ohci_writel (ohci, ohci->fminterval, &ohci->regs->fminterval); /* Tell the controller where the control and bulk lists are * The lists are empty now. */ - writel (0, &ohci->regs->ed_controlhead); - writel (0, &ohci->regs->ed_bulkhead); + ohci_writel (ohci, 0, &ohci->regs->ed_controlhead); + ohci_writel (ohci, 0, &ohci->regs->ed_bulkhead); /* a reset clears this */ - writel ((u32) ohci->hcca_dma, &ohci->regs->hcca); + ohci_writel (ohci, (u32) ohci->hcca_dma, &ohci->regs->hcca); periodic_reinit (ohci); /* some OHCI implementations are finicky about how they init. * bogus values here mean not even enumeration could work. */ - if ((ohci_readl (&ohci->regs->fminterval) & 0x3fff0000) == 0 - || !ohci_readl (&ohci->regs->periodicstart)) { + if ((ohci_readl (ohci, &ohci->regs->fminterval) & 0x3fff0000) == 0 + || !ohci_readl (ohci, &ohci->regs->periodicstart)) { if (!(ohci->flags & OHCI_QUIRK_INITRESET)) { ohci->flags |= OHCI_QUIRK_INITRESET; ohci_dbg (ohci, "enabling initreset quirk\n"); @@ -596,24 +601,24 @@ } spin_unlock_irq (&ohci->lock); ohci_err (ohci, "init err (%08x %04x)\n", - ohci_readl (&ohci->regs->fminterval), - ohci_readl (&ohci->regs->periodicstart)); + ohci_readl (ohci, &ohci->regs->fminterval), + ohci_readl (ohci, &ohci->regs->periodicstart)); return -EOVERFLOW; } /* start controller operations */ ohci->hc_control &= OHCI_CTRL_RWC; ohci->hc_control |= OHCI_CONTROL_INIT | OHCI_USB_OPER; - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); ohci->hcd.state = USB_STATE_RUNNING; /* wake on ConnectStatusChange, matching external hubs */ - writel (RH_HS_DRWE, &ohci->regs->roothub.status); + ohci_writel (ohci, RH_HS_DRWE, &ohci->regs->roothub.status); /* Choose the interrupts we care about now, others later on demand */ mask = OHCI_INTR_INIT; - writel (mask, &ohci->regs->intrstatus); - writel (mask, &ohci->regs->intrenable); + ohci_writel (ohci, mask, &ohci->regs->intrstatus); + ohci_writel (ohci, mask, &ohci->regs->intrenable); /* handle root hub init quirks ... */ temp = roothub_a (ohci); @@ -634,11 +639,12 @@ */ temp |= RH_A_NPS; } - writel (temp, &ohci->regs->roothub.a); - writel (RH_HS_LPSC, &ohci->regs->roothub.status); - writel (power_switching ? RH_B_PPCM : 0, &ohci->regs->roothub.b); + ohci_writel (ohci, temp, &ohci->regs->roothub.a); + ohci_writel (ohci, RH_HS_LPSC, &ohci->regs->roothub.status); + ohci_writel (ohci, power_switching ? RH_B_PPCM : 0, + &ohci->regs->roothub.b); // flush those writes - (void) ohci_readl (&ohci->regs->control); + (void) ohci_readl (ohci, &ohci->regs->control); spin_unlock_irq (&ohci->lock); @@ -661,7 +667,7 @@ if (!udev) { disable (ohci); ohci->hc_control &= ~OHCI_CTRL_HCFS; - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); return -ENOMEM; } @@ -670,7 +676,7 @@ usb_put_dev (udev); disable (ohci); ohci->hc_control &= ~OHCI_CTRL_HCFS; - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); return -ENODEV; } if (ohci->power_budget) @@ -693,17 +699,18 @@ /* we can eliminate a (slow) ohci_readl() if _only_ WDH caused this irq */ if ((ohci->hcca->done_head != 0) - && ! (le32_to_cpup (&ohci->hcca->done_head) & 0x01)) { + && ! (hc32_to_cpup (ohci, &ohci->hcca->done_head) + & 0x01)) { ints = OHCI_INTR_WDH; /* cardbus/... hardware gone before remove() */ - } else if ((ints = ohci_readl (®s->intrstatus)) == ~(u32)0) { + } else if ((ints = ohci_readl (ohci, ®s->intrstatus)) == ~(u32)0) { disable (ohci); ohci_dbg (ohci, "device removed!\n"); return IRQ_HANDLED; /* interrupt for some other device? */ - } else if ((ints &= ohci_readl (®s->intrenable)) == 0) { + } else if ((ints &= ohci_readl (ohci, ®s->intrenable)) == 0) { return IRQ_NONE; } @@ -723,12 +730,12 @@ if (ints & OHCI_INTR_WDH) { if (HCD_IS_RUNNING(hcd->state)) - writel (OHCI_INTR_WDH, ®s->intrdisable); + ohci_writel (ohci, OHCI_INTR_WDH, ®s->intrdisable); spin_lock (&ohci->lock); dl_done_list (ohci, ptregs); spin_unlock (&ohci->lock); if (HCD_IS_RUNNING(hcd->state)) - writel (OHCI_INTR_WDH, ®s->intrenable); + ohci_writel (ohci, OHCI_INTR_WDH, ®s->intrenable); } /* could track INTR_SO to reduce available PCI/... bandwidth */ @@ -738,18 +745,17 @@ */ spin_lock (&ohci->lock); if (ohci->ed_rm_list) - finish_unlinks (ohci, OHCI_FRAME_NO(ohci->hcca), - ptregs); + finish_unlinks (ohci, ohci_frame_no(ohci), ptregs); if ((ints & OHCI_INTR_SF) != 0 && !ohci->ed_rm_list && HCD_IS_RUNNING(ohci->hcd.state)) - writel (OHCI_INTR_SF, ®s->intrdisable); + ohci_writel (ohci, OHCI_INTR_SF, ®s->intrdisable); spin_unlock (&ohci->lock); if (HCD_IS_RUNNING(ohci->hcd.state)) { - writel (ints, ®s->intrstatus); - writel (OHCI_INTR_MIE, ®s->intrenable); + ohci_writel (ohci, ints, ®s->intrstatus); + ohci_writel (ohci, OHCI_INTR_MIE, ®s->intrenable); // flush those writes - (void) ohci_readl (&ohci->regs->control); + (void) ohci_readl (ohci, &ohci->regs->control); } return IRQ_HANDLED; @@ -769,7 +775,7 @@ flush_scheduled_work(); ohci_usb_reset (ohci); - writel (OHCI_INTR_MIE, &ohci->regs->intrdisable); + ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable); remove_debug_files (ohci); ohci_mem_cleanup (ohci); @@ -811,7 +817,7 @@ switch (ed->state) { case ED_OPER: ed->state = ED_UNLINK; - ed->hwINFO |= ED_DEQUEUE; + ed->hwINFO |= cpu_to_hc32(ohci, ED_DEQUEUE); ed_deschedule (ohci, ed); ed->ed_next = ohci->ed_rm_list; @@ -855,9 +861,10 @@ */ i = roothub_a (ohci) & RH_A_NDP; while (i--) - writel (RH_PS_PSS, + ohci_writel (ohci, RH_PS_PSS, &ohci->regs->roothub.portstatus [temp]); ohci_dbg (ohci, "restart complete\n"); + ohci->hcd.state = USB_STATE_RUNNING; } return 0; } diff -Nru a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c --- a/drivers/usb/host/ohci-hub.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/usb/host/ohci-hub.c 2004-11-10 17:19:02 -08:00 @@ -43,6 +43,7 @@ static void dl_done_list (struct ohci_hcd *, struct pt_regs *); static void finish_unlinks (struct ohci_hcd *, u16 , struct pt_regs *); +static int ohci_restart (struct ohci_hcd *ohci); static int ohci_hub_suspend (struct usb_hcd *hcd) { @@ -57,14 +58,14 @@ spin_lock_irq (&ohci->lock); - ohci->hc_control = ohci_readl (&ohci->regs->control); + ohci->hc_control = ohci_readl (ohci, &ohci->regs->control); switch (ohci->hc_control & OHCI_CTRL_HCFS) { case OHCI_USB_RESUME: ohci_dbg (ohci, "resume/suspend?\n"); ohci->hc_control &= ~OHCI_CTRL_HCFS; ohci->hc_control |= OHCI_USB_RESET; - writel (ohci->hc_control, &ohci->regs->control); - (void) ohci_readl (&ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); + (void) ohci_readl (ohci, &ohci->regs->control); /* FALL THROUGH */ case OHCI_USB_RESET: status = -EBUSY; @@ -82,9 +83,9 @@ int limit; ohci->hc_control &= ~OHCI_SCHED_ENABLES; - writel (ohci->hc_control, &ohci->regs->control); - ohci->hc_control = ohci_readl (&ohci->regs->control); - writel (OHCI_INTR_SF, &ohci->regs->intrstatus); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); + ohci->hc_control = ohci_readl (ohci, &ohci->regs->control); + ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrstatus); /* sched disables take effect on the next frame, * then the last WDH could take 6+ msec @@ -94,15 +95,17 @@ while (limit > 0) { udelay (250); limit =- 250; - if (ohci_readl (&ohci->regs->intrstatus) & OHCI_INTR_SF) + if (ohci_readl (ohci, &ohci->regs->intrstatus) + & OHCI_INTR_SF) break; } dl_done_list (ohci, NULL); mdelay (7); } dl_done_list (ohci, NULL); - finish_unlinks (ohci, OHCI_FRAME_NO(ohci->hcca), NULL); - writel (ohci_readl (&ohci->regs->intrstatus), &ohci->regs->intrstatus); + finish_unlinks (ohci, ohci_frame_no(ohci), NULL); + ohci_writel (ohci, ohci_readl (ohci, &ohci->regs->intrstatus), + &ohci->regs->intrstatus); /* maybe resume can wake root hub */ if (ohci->hcd.remote_wakeup) @@ -113,8 +116,8 @@ /* Suspend hub */ ohci->hc_control &= ~OHCI_CTRL_HCFS; ohci->hc_control |= OHCI_USB_SUSPEND; - writel (ohci->hc_control, &ohci->regs->control); - (void) ohci_readl (&ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); + (void) ohci_readl (ohci, &ohci->regs->control); /* no resumes until devices finish suspending */ ohci->next_statechange = jiffies + msecs_to_jiffies (5); @@ -152,7 +155,7 @@ return -EAGAIN; spin_lock_irq (&ohci->lock); - ohci->hc_control = ohci_readl (&ohci->regs->control); + ohci->hc_control = ohci_readl (ohci, &ohci->regs->control); if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) { /* this can happen after suspend-to-disk */ ohci_dbg (ohci, "BIOS/SMM active, control %03x\n", @@ -162,8 +165,8 @@ case OHCI_USB_SUSPEND: ohci->hc_control &= ~(OHCI_CTRL_HCFS|OHCI_SCHED_ENABLES); ohci->hc_control |= OHCI_USB_RESUME; - writel (ohci->hc_control, &ohci->regs->control); - (void) ohci_readl (&ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); + (void) ohci_readl (ohci, &ohci->regs->control); ohci_dbg (ohci, "resume root hub\n"); break; case OHCI_USB_RESUME: @@ -190,19 +193,21 @@ temp = roothub_a (ohci) & RH_A_NDP; enables = 0; while (temp--) { - u32 stat = ohci_readl (&ohci->regs->roothub.portstatus [temp]); + u32 stat = ohci_readl (ohci, + &ohci->regs->roothub.portstatus [temp]); /* force global, not selective, resume */ if (!(stat & RH_PS_PSS)) continue; - writel (RH_PS_POCI, &ohci->regs->roothub.portstatus [temp]); + ohci_writel (ohci, RH_PS_POCI, + &ohci->regs->roothub.portstatus [temp]); } /* Some controllers (lucent) need extra-long delays */ ohci->hcd.state = USB_STATE_RESUMING; mdelay (20 /* usb 11.5.1.10 */ + 15); - temp = ohci_readl (&ohci->regs->control); + temp = ohci_readl (ohci, &ohci->regs->control); temp &= OHCI_CTRL_HCFS; if (temp != OHCI_USB_RESUME) { ohci_err (ohci, "controller won't resume\n"); @@ -210,32 +215,33 @@ } /* disable old schedule state, reinit from scratch */ - writel (0, &ohci->regs->ed_controlhead); - writel (0, &ohci->regs->ed_controlcurrent); - writel (0, &ohci->regs->ed_bulkhead); - writel (0, &ohci->regs->ed_bulkcurrent); - writel (0, &ohci->regs->ed_periodcurrent); - writel ((u32) ohci->hcca_dma, &ohci->regs->hcca); + ohci_writel (ohci, 0, &ohci->regs->ed_controlhead); + ohci_writel (ohci, 0, &ohci->regs->ed_controlcurrent); + ohci_writel (ohci, 0, &ohci->regs->ed_bulkhead); + ohci_writel (ohci, 0, &ohci->regs->ed_bulkcurrent); + ohci_writel (ohci, 0, &ohci->regs->ed_periodcurrent); + ohci_writel (ohci, (u32) ohci->hcca_dma, &ohci->regs->hcca); periodic_reinit (ohci); /* interrupts might have been disabled */ - writel (OHCI_INTR_INIT, &ohci->regs->intrenable); + ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable); if (ohci->ed_rm_list) - writel (OHCI_INTR_SF, &ohci->regs->intrenable); - writel (ohci_readl (&ohci->regs->intrstatus), &ohci->regs->intrstatus); + ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrenable); + ohci_writel (ohci, ohci_readl (ohci, &ohci->regs->intrstatus), + &ohci->regs->intrstatus); /* Then re-enable operations */ - writel (OHCI_USB_OPER, &ohci->regs->control); - (void) ohci_readl (&ohci->regs->control); + ohci_writel (ohci, OHCI_USB_OPER, &ohci->regs->control); + (void) ohci_readl (ohci, &ohci->regs->control); msleep (3); temp = OHCI_CONTROL_INIT | OHCI_USB_OPER; if (ohci->hcd.can_wakeup) temp |= OHCI_CTRL_RWC; ohci->hc_control = temp; - writel (temp, &ohci->regs->control); - (void) ohci_readl (&ohci->regs->control); + ohci_writel (ohci, temp, &ohci->regs->control); + (void) ohci_readl (ohci, &ohci->regs->control); /* TRSMRCY */ msleep (10); @@ -250,13 +256,14 @@ temp = 0; if (!ohci->ed_rm_list) { if (ohci->ed_controltail) { - writel (find_head (ohci->ed_controltail)->dma, - &ohci->regs->ed_controlhead); + ohci_writel (ohci, + find_head (ohci->ed_controltail)->dma, + &ohci->regs->ed_controlhead); enables |= OHCI_CTRL_CLE; temp |= OHCI_CLF; } if (ohci->ed_bulktail) { - writel (find_head (ohci->ed_bulktail)->dma, + ohci_writel (ohci, find_head (ohci->ed_bulktail)->dma, &ohci->regs->ed_bulkhead); enables |= OHCI_CTRL_BLE; temp |= OHCI_BLF; @@ -268,10 +275,10 @@ if (enables) { ohci_dbg (ohci, "restarting schedules ... %08x\n", enables); ohci->hc_control |= enables; - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); if (temp) - writel (temp, &ohci->regs->cmdstatus); - (void) ohci_readl (&ohci->regs->control); + ohci_writel (ohci, temp, &ohci->regs->cmdstatus); + (void) ohci_readl (ohci, &ohci->regs->control); } ohci->hcd.state = USB_STATE_RUNNING; @@ -312,8 +319,8 @@ if (ports > MAX_ROOT_PORTS) { if (!HCD_IS_RUNNING(ohci->hcd.state)) return -ESHUTDOWN; - ohci_err (ohci, "bogus NDP=%d, rereads as NDP=%d\n", - ports, ohci_readl (&ohci->regs->roothub.a) & RH_A_NDP); + ohci_err (ohci, "bogus NDP=%d, rereads as NDP=%d\n", ports, + ohci_readl (ohci, &ohci->regs->roothub.a) & RH_A_NDP); /* retry later; "should not happen" */ return 0; } @@ -402,7 +409,7 @@ temp |= 0x0010; else if (rh & RH_A_OCPM) /* per-port overcurrent reporting? */ temp |= 0x0008; - desc->wHubCharacteristics = cpu_to_le16 (temp); + desc->wHubCharacteristics = cpu_to_hc16 (ohci, temp); /* two bitmaps: ports removable, and usb 1.0 legacy PortPwrCtrlMask */ rh = roothub_b (ohci); @@ -428,12 +435,12 @@ port--; /* start port reset before HNP protocol times out */ - status = ohci_readl(&ohci->regs->roothub.portstatus [port]); + status = ohci_readl(ohci, &ohci->regs->roothub.portstatus [port]); if (!(status & RH_PS_CCS)) return -ENODEV; /* khubd will finish the reset later */ - writel(RH_PS_PRS, &ohci->regs->roothub.portstatus [port]); + ohci_writel(ohci, RH_PS_PRS, &ohci->regs->roothub.portstatus [port]); return 0; } @@ -470,7 +477,7 @@ { u32 __iomem *portstat = &ohci->regs->roothub.portstatus [port]; u32 temp; - u16 now = readl(&ohci->regs->fmnumber); + u16 now = ohci_readl(ohci, &ohci->regs->fmnumber); u16 reset_done = now + PORT_RESET_MSEC; /* build a "continuous enough" reset signal, with up to @@ -480,7 +487,7 @@ do { /* spin until any current reset finishes */ for (;;) { - temp = ohci_readl (portstat); + temp = ohci_readl (ohci, portstat); if (!(temp & RH_PS_PRS)) break; udelay (500); @@ -489,12 +496,12 @@ if (!(temp & RH_PS_CCS)) break; if (temp & RH_PS_PRSC) - writel (RH_PS_PRSC, portstat); + ohci_writel (ohci, RH_PS_PRSC, portstat); /* start the next reset, sleep till it's probably done */ - writel (RH_PS_PRS, portstat); + ohci_writel (ohci, RH_PS_PRS, portstat); msleep(PORT_RESET_HW_MSEC); - now = readl(&ohci->regs->fmnumber); + now = ohci_readl(ohci, &ohci->regs->fmnumber); } while (tick_before(now, reset_done)); /* caller synchronizes using PRSC */ } @@ -516,7 +523,8 @@ case ClearHubFeature: switch (wValue) { case C_HUB_OVER_CURRENT: - writel (RH_HS_OCIC, &ohci->regs->roothub.status); + ohci_writel (ohci, RH_HS_OCIC, + &ohci->regs->roothub.status); case C_HUB_LOCAL_POWER: break; default: @@ -559,8 +567,9 @@ default: goto error; } - writel (temp, &ohci->regs->roothub.portstatus [wIndex]); - // ohci_readl (&ohci->regs->roothub.portstatus [wIndex]); + ohci_writel (ohci, temp, + &ohci->regs->roothub.portstatus [wIndex]); + // ohci_readl (ohci, &ohci->regs->roothub.portstatus [wIndex]); break; case GetHubDescriptor: ohci_hub_descriptor (ohci, (struct usb_hub_descriptor *) buf); @@ -603,11 +612,11 @@ start_hnp(ohci); else #endif - writel (RH_PS_PSS, + ohci_writel (ohci, RH_PS_PSS, &ohci->regs->roothub.portstatus [wIndex]); break; case USB_PORT_FEAT_POWER: - writel (RH_PS_PPS, + ohci_writel (ohci, RH_PS_PPS, &ohci->regs->roothub.portstatus [wIndex]); break; case USB_PORT_FEAT_RESET: diff -Nru a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c --- a/drivers/usb/host/ohci-lh7a404.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/host/ohci-lh7a404.c 2004-11-10 17:19:06 -08:00 @@ -146,6 +146,7 @@ usb_bus_init (&hcd->self); hcd->self.op = &usb_hcd_operations; + hcd->self.release = &usb_hcd_release; hcd->self.hcpriv = (void *) hcd; hcd->self.bus_name = "lh7a404"; hcd->product_desc = "LH7A404 OHCI"; @@ -165,9 +166,8 @@ err2: hcd_buffer_destroy (hcd); - if (hcd) - driver->hcd_free(hcd); err1: + kfree(hcd); lh7a404_stop_hc(dev); release_mem_region(dev->resource[0].start, dev->resource[0].end @@ -191,8 +191,6 @@ */ void usb_hcd_lh7a404_remove (struct usb_hcd *hcd, struct platform_device *dev) { - void *base; - pr_debug ("remove: %s, state %x", hcd->self.bus_name, hcd->state); if (in_interrupt ()) @@ -211,9 +209,6 @@ usb_deregister_bus (&hcd->self); - base = hcd->regs; - hcd->driver->hcd_free (hcd); - lh7a404_stop_hc(dev); release_mem_region(dev->resource[0].start, dev->resource[0].end @@ -265,7 +260,6 @@ * memory lifecycle (except per-request) */ .hcd_alloc = ohci_hcd_alloc, - .hcd_free = ohci_hcd_free, /* * managing i/o requests and associated device resources diff -Nru a/drivers/usb/host/ohci-mem.c b/drivers/usb/host/ohci-mem.c --- a/drivers/usb/host/ohci-mem.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/host/ohci-mem.c 2004-11-10 17:19:05 -08:00 @@ -40,11 +40,6 @@ return NULL; } -static void ohci_hcd_free (struct usb_hcd *hcd) -{ - kfree (hcd_to_ohci (hcd)); -} - /*-------------------------------------------------------------------------*/ static int ohci_mem_init (struct ohci_hcd *ohci) @@ -104,7 +99,7 @@ if (td) { /* in case hc fetches it, make it look dead */ memset (td, 0, sizeof *td); - td->hwNextTD = cpu_to_le32 (dma); + td->hwNextTD = cpu_to_hc32 (hc, dma); td->td_dma = dma; /* hashed in td_fill */ } @@ -120,7 +115,7 @@ prev = &(*prev)->td_hash; if (*prev) *prev = td->td_hash; - else if ((td->hwINFO & TD_DONE) != 0) + else if ((td->hwINFO & cpu_to_hc32(hc, TD_DONE)) != 0) ohci_dbg (hc, "no hash for td %p\n", td); dma_pool_free (hc->td_cache, td, td->td_dma); } diff -Nru a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c --- a/drivers/usb/host/ohci-omap.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/host/ohci-omap.c 2004-11-10 17:19:05 -08:00 @@ -42,21 +42,7 @@ static int omap_ohci_clock_power(int on) { if (on) { - if (cpu_is_omap1510()) { - /* Use DPLL, not APLL */ - omap_writel(omap_readl(ULPD_APLL_CTRL) & ~APLL_NDPLL_SWITCH, - ULPD_APLL_CTRL); - - /* Enable DPLL */ - omap_writel(omap_readl(ULPD_DPLL_CTRL) | DPLL_PLL_ENABLE, - ULPD_DPLL_CTRL); - - /* Software request for USB 48MHz clock */ - omap_writel(omap_readl(ULPD_SOFT_REQ) | SOFT_REQ_REG_REQ, - ULPD_SOFT_REQ); - - while (!(omap_readl(ULPD_DPLL_CTRL) & DPLL_LOCK)); - } + /* for 1510, 48MHz DPLL is set up in usb init */ if (cpu_is_omap16xx()) { /* Enable OHCI */ @@ -98,14 +84,16 @@ { if (on) { if (machine_is_omap_innovator() && cpu_is_omap1510()) - fpga_write(fpga_read(INNOVATOR_FPGA_CAM_USB_CONTROL) | 0x20, + fpga_write(fpga_read(INNOVATOR_FPGA_CAM_USB_CONTROL) + | ((1 << 5/*usb1*/) | (1 << 3/*usb2*/)), INNOVATOR_FPGA_CAM_USB_CONTROL); else if (machine_is_omap_osk()) { /* FIXME: GPIO1 -> 1 on the TPS65010 I2C chip */ } } else { if (machine_is_omap_innovator() && cpu_is_omap1510()) - fpga_write(fpga_read(INNOVATOR_FPGA_CAM_USB_CONTROL) & ~0x20, + fpga_write(fpga_read(INNOVATOR_FPGA_CAM_USB_CONTROL) + & ~((1 << 5/*usb1*/) | (1 << 3/*usb2*/)), INNOVATOR_FPGA_CAM_USB_CONTROL); else if (machine_is_omap_osk()) { /* FIXME: GPIO1 -> 0 on the TPS65010 I2C chip */ @@ -322,7 +310,7 @@ retval = omap_start_hc(ohci, pdev); if (retval < 0) - goto err2; + goto err1; retval = hcd_buffer_create (hcd); if (retval != 0) { @@ -342,6 +330,7 @@ usb_bus_init (&hcd->self); hcd->self.op = &usb_hcd_operations; + hcd->self.release = &usb_hcd_release; hcd->self.hcpriv = (void *) hcd; hcd->self.bus_name = pdev->dev.bus_id; hcd->product_desc = "OMAP OHCI"; @@ -359,9 +348,8 @@ err2: hcd_buffer_destroy (hcd); - if (hcd) - driver->hcd_free(hcd); err1: + kfree(hcd); omap_stop_hc(pdev); release_mem_region(pdev->resource[0].start, @@ -387,8 +375,6 @@ */ void usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev) { - void *base; - dev_info(&pdev->dev, "remove: state %x\n", hcd->state); if (in_interrupt ()) @@ -410,9 +396,6 @@ usb_deregister_bus (&hcd->self); - base = hcd->regs; - hcd->driver->hcd_free (hcd); - omap_stop_hc(pdev); release_mem_region(pdev->resource[0].start, @@ -464,7 +447,6 @@ * memory lifecycle (except per-request) */ .hcd_alloc = ohci_hcd_alloc, - .hcd_free = ohci_hcd_free, /* * managing i/o requests and associated device resources diff -Nru a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c --- a/drivers/usb/host/ohci-pci.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/host/ohci-pci.c 2004-11-10 17:19:05 -08:00 @@ -204,7 +204,6 @@ * memory lifecycle (except per-request) */ .hcd_alloc = ohci_hcd_alloc, - .hcd_free = ohci_hcd_free, /* * managing i/o requests and associated device resources diff -Nru a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c --- a/drivers/usb/host/ohci-pxa27x.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/host/ohci-pxa27x.c 2004-11-10 17:19:04 -08:00 @@ -244,6 +244,7 @@ usb_bus_init (&hcd->self); hcd->self.op = &usb_hcd_operations; + hcd->self.release = &usb_hcd_release; hcd->self.hcpriv = (void *) hcd; hcd->self.bus_name = "pxa27x"; hcd->product_desc = "PXA27x OHCI"; @@ -262,9 +263,8 @@ err2: hcd_buffer_destroy (hcd); - if (hcd) - driver->hcd_free(hcd); err1: + kfree(hcd); pxa27x_stop_hc(dev); release_mem_region(dev->resource[0].start, dev->resource[0].end @@ -288,8 +288,6 @@ */ void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *dev) { - void *base; - pr_debug ("remove: %s, state %x", hcd->self.bus_name, hcd->state); if (in_interrupt ()) @@ -308,9 +306,6 @@ usb_deregister_bus (&hcd->self); - base = hcd->regs; - hcd->driver->hcd_free (hcd); - pxa27x_stop_hc(dev); release_mem_region(dev->resource[0].start, dev->resource[0].end - dev->resource[0].start + 1); @@ -359,7 +354,6 @@ * memory lifecycle (except per-request) */ .hcd_alloc = ohci_hcd_alloc, - .hcd_free = ohci_hcd_free, /* * managing i/o requests and associated device resources diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c --- a/drivers/usb/host/ohci-q.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/host/ohci-q.c 2004-11-10 17:19:06 -08:00 @@ -78,7 +78,7 @@ if (hcd_to_bus (&ohci->hcd)->bandwidth_isoc_reqs == 0 && hcd_to_bus (&ohci->hcd)->bandwidth_int_reqs == 0) { ohci->hc_control &= ~(OHCI_CTRL_PLE|OHCI_CTRL_IE); - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); } } @@ -131,12 +131,12 @@ unsigned i; ohci_vdbg (ohci, "link %sed %p branch %d [%dus.], interval %d\n", - (ed->hwINFO & ED_ISO) ? "iso " : "", + (ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "", ed, ed->branch, ed->load, ed->interval); for (i = ed->branch; i < NUM_INTS; i += ed->interval) { struct ed **prev = &ohci->periodic [i]; - __le32 *prev_p = &ohci->hcca->int_table [i]; + __hc32 *prev_p = &ohci->hcca->int_table [i]; struct ed *here = *prev; /* sorting each branch by period (slow before fast) @@ -156,7 +156,7 @@ ed->hwNextED = *prev_p; wmb (); *prev = ed; - *prev_p = cpu_to_le32(ed->dma); + *prev_p = cpu_to_hc32(ohci, ed->dma); wmb(); } ohci->load [i] += ed->load; @@ -193,17 +193,20 @@ case PIPE_CONTROL: if (ohci->ed_controltail == NULL) { WARN_ON (ohci->hc_control & OHCI_CTRL_CLE); - writel (ed->dma, &ohci->regs->ed_controlhead); + ohci_writel (ohci, ed->dma, + &ohci->regs->ed_controlhead); } else { ohci->ed_controltail->ed_next = ed; - ohci->ed_controltail->hwNextED = cpu_to_le32 (ed->dma); + ohci->ed_controltail->hwNextED = cpu_to_hc32 (ohci, + ed->dma); } ed->ed_prev = ohci->ed_controltail; if (!ohci->ed_controltail && !ohci->ed_rm_list) { wmb(); ohci->hc_control |= OHCI_CTRL_CLE; - writel (0, &ohci->regs->ed_controlcurrent); - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, 0, &ohci->regs->ed_controlcurrent); + ohci_writel (ohci, ohci->hc_control, + &ohci->regs->control); } ohci->ed_controltail = ed; break; @@ -211,17 +214,19 @@ case PIPE_BULK: if (ohci->ed_bulktail == NULL) { WARN_ON (ohci->hc_control & OHCI_CTRL_BLE); - writel (ed->dma, &ohci->regs->ed_bulkhead); + ohci_writel (ohci, ed->dma, &ohci->regs->ed_bulkhead); } else { ohci->ed_bulktail->ed_next = ed; - ohci->ed_bulktail->hwNextED = cpu_to_le32 (ed->dma); + ohci->ed_bulktail->hwNextED = cpu_to_hc32 (ohci, + ed->dma); } ed->ed_prev = ohci->ed_bulktail; if (!ohci->ed_bulktail && !ohci->ed_rm_list) { wmb(); ohci->hc_control |= OHCI_CTRL_BLE; - writel (0, &ohci->regs->ed_bulkcurrent); - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, 0, &ohci->regs->ed_bulkcurrent); + ohci_writel (ohci, ohci->hc_control, + &ohci->regs->control); } ohci->ed_bulktail = ed; break; @@ -257,7 +262,7 @@ for (i = ed->branch; i < NUM_INTS; i += ed->interval) { struct ed *temp; struct ed **prev = &ohci->periodic [i]; - __le32 *prev_p = &ohci->hcca->int_table [i]; + __hc32 *prev_p = &ohci->hcca->int_table [i]; while (*prev && (temp = *prev) != ed) { prev_p = &temp->hwNextED; @@ -272,7 +277,7 @@ hcd_to_bus (&ohci->hcd)->bandwidth_allocated -= ed->load / ed->interval; ohci_vdbg (ohci, "unlink %sed %p branch %d [%dus.], interval %d\n", - (ed->hwINFO & ED_ISO) ? "iso " : "", + (ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "", ed, ed->branch, ed->load, ed->interval); } @@ -300,7 +305,7 @@ */ static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed) { - ed->hwINFO |= ED_SKIP; + ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP); wmb (); ed->state = ED_UNLINK; @@ -320,10 +325,12 @@ if (ed->ed_prev == NULL) { if (!ed->hwNextED) { ohci->hc_control &= ~OHCI_CTRL_CLE; - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, + &ohci->regs->control); // a ohci_readl() later syncs CLE with the HC } else - writel (le32_to_cpup (&ed->hwNextED), + ohci_writel (ohci, + hc32_to_cpup (ohci, &ed->hwNextED), &ohci->regs->ed_controlhead); } else { ed->ed_prev->ed_next = ed->ed_next; @@ -344,10 +351,12 @@ if (ed->ed_prev == NULL) { if (!ed->hwNextED) { ohci->hc_control &= ~OHCI_CTRL_BLE; - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, + &ohci->regs->control); // a ohci_readl() later syncs BLE with the HC } else - writel (le32_to_cpup (&ed->hwNextED), + ohci_writel (ohci, + hc32_to_cpup (ohci, &ed->hwNextED), &ohci->regs->ed_bulkhead); } else { ed->ed_prev->ed_next = ed->ed_next; @@ -416,7 +425,7 @@ goto done; } ed->dummy = td; - ed->hwTailP = cpu_to_le32 (td->td_dma); + ed->hwTailP = cpu_to_hc32 (ohci, td->td_dma); ed->hwHeadP = ed->hwTailP; /* ED_C, ED_H zeroed */ ed->state = ED_IDLE; ed->type = type; @@ -427,21 +436,19 @@ */ if (ed->state == ED_IDLE) { u32 info; - __le32 hw_info; info = usb_pipedevice (pipe); info |= (ep >> 1) << 7; info |= usb_maxpacket (udev, pipe, is_out) << 16; - hw_info = cpu_to_le32 (info); if (udev->speed == USB_SPEED_LOW) - hw_info |= ED_LOWSPEED; + info |= ED_LOWSPEED; /* only control transfers store pids in tds */ if (type != PIPE_CONTROL) { - hw_info |= is_out ? ED_OUT : ED_IN; + info |= is_out ? ED_OUT : ED_IN; if (type != PIPE_BULK) { /* periodic transfers... */ if (type == PIPE_ISOCHRONOUS) - hw_info |= ED_ISO; + info |= ED_ISO; else if (interval > 32) /* iso can be bigger */ interval = 32; ed->interval = interval; @@ -452,7 +459,7 @@ / 1000; } } - ed->hwINFO = hw_info; + ed->hwINFO = cpu_to_hc32(ohci, info); } done: @@ -470,7 +477,7 @@ */ static void start_ed_unlink (struct ohci_hcd *ohci, struct ed *ed) { - ed->hwINFO |= ED_DEQUEUE; + ed->hwINFO |= cpu_to_hc32 (ohci, ED_DEQUEUE); ed_deschedule (ohci, ed); /* rm_list is just singly linked, for simplicity */ @@ -479,17 +486,17 @@ ohci->ed_rm_list = ed; /* enable SOF interrupt */ - writel (OHCI_INTR_SF, &ohci->regs->intrstatus); - writel (OHCI_INTR_SF, &ohci->regs->intrenable); + ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrstatus); + ohci_writel (ohci, OHCI_INTR_SF, &ohci->regs->intrenable); // flush those writes, and get latest HCCA contents - (void) ohci_readl (&ohci->regs->control); + (void) ohci_readl (ohci, &ohci->regs->control); /* SF interrupt might get delayed; record the frame counter value that * indicates when the HC isn't looking at it, so concurrent unlinks * behave. frame_no wraps every 2^16 msec, and changes right before * SF is triggered. */ - ed->tick = OHCI_FRAME_NO(ohci->hcca) + 1; + ed->tick = ohci_frame_no(ohci) + 1; } @@ -541,19 +548,19 @@ if (!len) data = 0; - td->hwINFO = cpu_to_le32 (info); + td->hwINFO = cpu_to_hc32 (ohci, info); if (is_iso) { - td->hwCBP = cpu_to_le32 (data & 0xFFFFF000); - td->hwPSW [0] = cpu_to_le16 ((data & 0x0FFF) | 0xE000); + td->hwCBP = cpu_to_hc32 (ohci, data & 0xFFFFF000); + td->hwPSW [0] = cpu_to_hc16 (ohci, (data & 0x0FFF) | 0xE000); td->ed->last_iso = info & 0xffff; } else { - td->hwCBP = cpu_to_le32 (data); + td->hwCBP = cpu_to_hc32 (ohci, data); } if (data) - td->hwBE = cpu_to_le32 (data + len - 1); + td->hwBE = cpu_to_hc32 (ohci, data + len - 1); else td->hwBE = 0; - td->hwNextTD = cpu_to_le32 (td_pt->td_dma); + td->hwNextTD = cpu_to_hc32 (ohci, td_pt->td_dma); /* append to queue */ list_add_tail (&td->td_list, &td->ed->td_list); @@ -594,7 +601,7 @@ if (!usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), is_out)) { usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), is_out, 1); - urb_priv->ed->hwHeadP &= ~ED_C; + urb_priv->ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_C); } urb_priv->td_cnt = 0; @@ -643,7 +650,7 @@ /* maybe kickstart bulk list */ if (urb_priv->ed->type == PIPE_BULK) { wmb (); - writel (OHCI_BLF, &ohci->regs->cmdstatus); + ohci_writel (ohci, OHCI_BLF, &ohci->regs->cmdstatus); } break; @@ -665,7 +672,7 @@ td_fill (ohci, info, data, 0, urb, cnt++); /* maybe kickstart control list */ wmb (); - writel (OHCI_CLF, &ohci->regs->cmdstatus); + ohci_writel (ohci, OHCI_CLF, &ohci->regs->cmdstatus); break; /* ISO has no retransmit, so no toggle; and it uses special TDs. @@ -694,7 +701,7 @@ if (periodic) { wmb (); ohci->hc_control |= OHCI_CTRL_PLE|OHCI_CTRL_IE; - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); } // ASSERT (urb_priv->length == cnt); @@ -709,14 +716,14 @@ */ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td) { - u32 tdINFO = le32_to_cpup (&td->hwINFO); + u32 tdINFO = hc32_to_cpup (ohci, &td->hwINFO); int cc = 0; list_del (&td->td_list); /* ISO ... drivers see per-TD length/status */ if (tdINFO & TD_ISO) { - u16 tdPSW = le16_to_cpu (td->hwPSW [0]); + u16 tdPSW = hc16_to_cpu (ohci, td->hwPSW [0]); int dlen = 0; /* NOTE: assumes FC in tdINFO == 0 (and MAXPSW == 1) */ @@ -748,7 +755,7 @@ */ } else { int type = usb_pipetype (urb->pipe); - u32 tdBE = le32_to_cpup (&td->hwBE); + u32 tdBE = hc32_to_cpup (ohci, &td->hwBE); cc = TD_CC_GET (tdINFO); @@ -769,7 +776,7 @@ urb->actual_length += tdBE - td->data_dma + 1; else urb->actual_length += - le32_to_cpup (&td->hwCBP) + hc32_to_cpup (ohci, &td->hwCBP) - td->data_dma; } @@ -790,14 +797,14 @@ struct urb *urb = td->urb; struct ed *ed = td->ed; struct list_head *tmp = td->td_list.next; - __le32 toggle = ed->hwHeadP & ED_C; + __hc32 toggle = ed->hwHeadP & cpu_to_hc32 (ohci, ED_C); /* clear ed halt; this is the td that caused it, but keep it inactive * until its urb->complete() has a chance to clean up. */ - ed->hwINFO |= ED_SKIP; + ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP); wmb (); - ed->hwHeadP &= ~ED_H; + ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_H); /* put any later tds from this urb onto the donelist, after 'td', * order won't matter here: no errors, and nothing was transferred. @@ -805,7 +812,7 @@ */ while (tmp != &ed->td_list) { struct td *next; - __le32 info; + __hc32 info; next = list_entry (tmp, struct td, td_list); tmp = next->td_list.next; @@ -821,8 +828,8 @@ * and clear ED_SKIP. */ info = next->hwINFO; - info |= cpu_to_le32 (TD_DONE); - info &= ~cpu_to_le32 (TD_CC); + info |= cpu_to_hc32 (ohci, TD_DONE); + info &= ~cpu_to_hc32 (ohci, TD_CC); next->hwINFO = info; next->next_dl_td = rev; @@ -850,7 +857,7 @@ urb, urb->dev->devpath, usb_pipeendpoint (urb->pipe), usb_pipein (urb->pipe) ? "in" : "out", - le32_to_cpu (td->hwINFO), + hc32_to_cpu (ohci, td->hwINFO), cc, cc_to_error [cc]); } @@ -866,7 +873,7 @@ struct td *td_rev = NULL; struct td *td = NULL; - td_dma = le32_to_cpup (&ohci->hcca->done_head); + td_dma = hc32_to_cpup (ohci, &ohci->hcca->done_head); ohci->hcca->done_head = 0; wmb(); @@ -882,19 +889,20 @@ break; } - td->hwINFO |= cpu_to_le32 (TD_DONE); - cc = TD_CC_GET (le32_to_cpup (&td->hwINFO)); + td->hwINFO |= cpu_to_hc32 (ohci, TD_DONE); + cc = TD_CC_GET (hc32_to_cpup (ohci, &td->hwINFO)); /* Non-iso endpoints can halt on error; un-halt, * and dequeue any other TDs from this urb. * No other TD could have caused the halt. */ - if (cc != TD_CC_NOERROR && (td->ed->hwHeadP & ED_H)) + if (cc != TD_CC_NOERROR + && (td->ed->hwHeadP & cpu_to_hc32 (ohci, ED_H))) td_rev = ed_halted (ohci, td, cc, td_rev); td->next_dl_td = td_rev; td_rev = td; - td_dma = le32_to_cpup (&td->hwNextTD); + td_dma = hc32_to_cpup (ohci, &td->hwNextTD); } return td_rev; } @@ -911,7 +919,7 @@ for (last = &ohci->ed_rm_list, ed = *last; ed != NULL; ed = *last) { struct list_head *entry, *tmp; int completed, modified; - __le32 *prev; + __hc32 *prev; /* only take off EDs that the HC isn't using, accounting for * frame counter wraps and EDs with partially retired TDs @@ -929,7 +937,8 @@ td = list_entry (ed->td_list.next, struct td, td_list); - head = le32_to_cpu (ed->hwHeadP) & TD_MASK; + head = hc32_to_cpu (ohci, ed->hwHeadP) & + TD_MASK; /* INTR_WDH may need to clean up first */ if (td->td_dma != head) @@ -960,7 +969,7 @@ struct td *td; struct urb *urb; urb_priv_t *urb_priv; - __le32 savebits; + __hc32 savebits; td = list_entry (entry, struct td, td_list); urb = td->urb; @@ -972,7 +981,7 @@ } /* patch pointer hc uses */ - savebits = *prev & ~cpu_to_le32 (TD_MASK); + savebits = *prev & ~cpu_to_hc32 (ohci, TD_MASK); *prev = td->hwNextTD | savebits; /* HC may have partly processed this TD */ @@ -990,10 +999,10 @@ /* ED's now officially unlinked, hc doesn't see */ ed->state = ED_IDLE; - ed->hwHeadP &= ~ED_H; + ed->hwHeadP &= ~cpu_to_hc32(ohci, ED_H); ed->hwNextED = 0; wmb (); - ed->hwINFO &= ~(ED_SKIP | ED_DEQUEUE); + ed->hwINFO &= ~cpu_to_hc32 (ohci, ED_SKIP | ED_DEQUEUE); /* but if there's work queued, reschedule */ if (!list_empty (&ed->td_list)) { @@ -1015,24 +1024,27 @@ command |= OHCI_CLF; if (!(ohci->hc_control & OHCI_CTRL_CLE)) { control |= OHCI_CTRL_CLE; - writel (0, &ohci->regs->ed_controlcurrent); + ohci_writel (ohci, 0, + &ohci->regs->ed_controlcurrent); } } if (ohci->ed_bulktail) { command |= OHCI_BLF; if (!(ohci->hc_control & OHCI_CTRL_BLE)) { control |= OHCI_CTRL_BLE; - writel (0, &ohci->regs->ed_bulkcurrent); + ohci_writel (ohci, 0, + &ohci->regs->ed_bulkcurrent); } } /* CLE/BLE to enable, CLF/BLF to (maybe) kickstart */ if (control) { ohci->hc_control |= control; - writel (ohci->hc_control, &ohci->regs->control); + ohci_writel (ohci, ohci->hc_control, + &ohci->regs->control); } if (command) - writel (command, &ohci->regs->cmdstatus); + ohci_writel (ohci, command, &ohci->regs->cmdstatus); } } @@ -1072,18 +1084,19 @@ start_ed_unlink (ohci, ed); /* ... reenabling halted EDs only after fault cleanup */ - } else if ((ed->hwINFO & (ED_SKIP | ED_DEQUEUE)) == ED_SKIP) { + } else if ((ed->hwINFO & cpu_to_hc32 (ohci, ED_SKIP | ED_DEQUEUE)) + == cpu_to_hc32 (ohci, ED_SKIP)) { td = list_entry (ed->td_list.next, struct td, td_list); - if (!(td->hwINFO & TD_DONE)) { - ed->hwINFO &= ~ED_SKIP; + if (!(td->hwINFO & cpu_to_hc32 (ohci, TD_DONE))) { + ed->hwINFO &= ~cpu_to_hc32 (ohci, ED_SKIP); /* ... hc may need waking-up */ switch (ed->type) { case PIPE_CONTROL: - writel (OHCI_CLF, + ohci_writel (ohci, OHCI_CLF, &ohci->regs->cmdstatus); break; case PIPE_BULK: - writel (OHCI_BLF, + ohci_writel (ohci, OHCI_BLF, &ohci->regs->cmdstatus); break; } diff -Nru a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c --- a/drivers/usb/host/ohci-sa1111.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/host/ohci-sa1111.c 2004-11-10 17:19:04 -08:00 @@ -194,6 +194,7 @@ usb_bus_init (&hcd->self); hcd->self.op = &usb_hcd_operations; + hcd->self.release = &usb_hcd_release; hcd->self.hcpriv = (void *) hcd; hcd->self.bus_name = "sa1111"; hcd->product_desc = "SA-1111 OHCI"; @@ -213,9 +214,8 @@ err2: hcd_buffer_destroy (hcd); - if (hcd) - driver->hcd_free(hcd); err1: + kfree(hcd); sa1111_stop_hc(dev); release_mem_region(dev->res.start, dev->res.end - dev->res.start + 1); return retval; @@ -237,8 +237,6 @@ */ void usb_hcd_sa1111_remove (struct usb_hcd *hcd, struct sa1111_dev *dev) { - void *base; - info ("remove: %s, state %x", hcd->self.bus_name, hcd->state); if (in_interrupt ()) @@ -257,9 +255,6 @@ usb_deregister_bus (&hcd->self); - base = hcd->regs; - hcd->driver->hcd_free (hcd); - sa1111_stop_hc(dev); release_mem_region(dev->res.start, dev->res.end - dev->res.start + 1); } @@ -308,7 +303,6 @@ * memory lifecycle (except per-request) */ .hcd_alloc = ohci_hcd_alloc, - .hcd_free = ohci_hcd_free, /* * managing i/o requests and associated device resources diff -Nru a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h --- a/drivers/usb/host/ohci.h 2004-11-10 17:19:07 -08:00 +++ b/drivers/usb/host/ohci.h 2004-11-10 17:19:07 -08:00 @@ -6,6 +6,14 @@ * * This file is licenced under the GPL. */ + +/* + * __hc32 and __hc16 are "Host Controller" types, they may be equivalent to + * __leXX (normally) or __beXX (given OHCI_BIG_ENDIAN), depending on the + * host controller implementation. + */ +typedef __u32 __bitwise __hc32; +typedef __u16 __bitwise __hc16; /* * OHCI Endpoint Descriptor (ED) ... holds TD queue @@ -15,21 +23,21 @@ * both EHCI and UHCI call similar structures a "QH". */ struct ed { - /* first fields are hardware-specified, le32 */ - __le32 hwINFO; /* endpoint config bitmap */ + /* first fields are hardware-specified */ + __hc32 hwINFO; /* endpoint config bitmap */ /* info bits defined by hcd */ -#define ED_DEQUEUE __constant_cpu_to_le32(1 << 27) +#define ED_DEQUEUE (1 << 27) /* info bits defined by the hardware */ -#define ED_ISO __constant_cpu_to_le32(1 << 15) -#define ED_SKIP __constant_cpu_to_le32(1 << 14) -#define ED_LOWSPEED __constant_cpu_to_le32(1 << 13) -#define ED_OUT __constant_cpu_to_le32(0x01 << 11) -#define ED_IN __constant_cpu_to_le32(0x02 << 11) - __le32 hwTailP; /* tail of TD list */ - __le32 hwHeadP; /* head of TD list (hc r/w) */ -#define ED_C __constant_cpu_to_le32(0x02) /* toggle carry */ -#define ED_H __constant_cpu_to_le32(0x01) /* halted */ - __le32 hwNextED; /* next ED in list */ +#define ED_ISO (1 << 15) +#define ED_SKIP (1 << 14) +#define ED_LOWSPEED (1 << 13) +#define ED_OUT (0x01 << 11) +#define ED_IN (0x02 << 11) + __hc32 hwTailP; /* tail of TD list */ + __hc32 hwHeadP; /* head of TD list (hc r/w) */ +#define ED_C (0x02) /* toggle carry */ +#define ED_H (0x01) /* halted */ + __hc32 hwNextED; /* next ED in list */ /* rest are purely for the driver's use */ dma_addr_t dma; /* addr of ED */ @@ -69,8 +77,8 @@ * and 4.3.2 (iso) */ struct td { - /* first fields are hardware-specified, le32 */ - __le32 hwINFO; /* transfer info bitmask */ + /* first fields are hardware-specified */ + __hc32 hwINFO; /* transfer info bitmask */ /* hwINFO bits for both general and iso tds: */ #define TD_CC 0xf0000000 /* condition code */ @@ -99,13 +107,13 @@ /* (no hwINFO #defines yet for iso tds) */ - __le32 hwCBP; /* Current Buffer Pointer (or 0) */ - __le32 hwNextTD; /* Next TD Pointer */ - __le32 hwBE; /* Memory Buffer End Pointer */ + __hc32 hwCBP; /* Current Buffer Pointer (or 0) */ + __hc32 hwNextTD; /* Next TD Pointer */ + __hc32 hwBE; /* Memory Buffer End Pointer */ /* PSW is only for ISO */ #define MAXPSW 1 /* hardware allows 8 */ - __le16 hwPSW [MAXPSW]; + __hc16 hwPSW [MAXPSW]; /* rest are purely for the driver's use */ __u8 index; @@ -170,20 +178,20 @@ */ struct ohci_hcca { #define NUM_INTS 32 - __le32 int_table [NUM_INTS]; /* periodic schedule */ + __hc32 int_table [NUM_INTS]; /* periodic schedule */ /* * OHCI defines u16 frame_no, followed by u16 zero pad. * Since some processors can't do 16 bit bus accesses, * portable access must be a 32 bit byteswapped access. */ - __le32 frame_no; /* current frame number */ -#define OHCI_FRAME_NO(hccap) ((u16)le32_to_cpup(&(hccap)->frame_no)) - __le32 done_head; /* info returned for an interrupt */ + __hc32 frame_no; /* current frame number */ + __hc32 done_head; /* info returned for an interrupt */ u8 reserved_for_hc [116]; u8 what [4]; /* spec only identifies 252 bytes :) */ } __attribute__ ((aligned(256))); +#define ohci_frame_no(ohci) ((u16)hc32_to_cpup(ohci,&(ohci)->hcca->frame_no)) /* * This is the structure of the OHCI controller's memory mapped I/O region. @@ -192,36 +200,36 @@ */ struct ohci_regs { /* control and status registers (section 7.1) */ - __u32 revision; - __u32 control; - __u32 cmdstatus; - __u32 intrstatus; - __u32 intrenable; - __u32 intrdisable; + __hc32 revision; + __hc32 control; + __hc32 cmdstatus; + __hc32 intrstatus; + __hc32 intrenable; + __hc32 intrdisable; /* memory pointers (section 7.2) */ - __u32 hcca; - __u32 ed_periodcurrent; - __u32 ed_controlhead; - __u32 ed_controlcurrent; - __u32 ed_bulkhead; - __u32 ed_bulkcurrent; - __u32 donehead; + __hc32 hcca; + __hc32 ed_periodcurrent; + __hc32 ed_controlhead; + __hc32 ed_controlcurrent; + __hc32 ed_bulkhead; + __hc32 ed_bulkcurrent; + __hc32 donehead; /* frame counters (section 7.3) */ - __u32 fminterval; - __u32 fmremaining; - __u32 fmnumber; - __u32 periodicstart; - __u32 lsthresh; + __hc32 fminterval; + __hc32 fmremaining; + __hc32 fmnumber; + __hc32 periodicstart; + __hc32 lsthresh; /* Root hub ports (section 7.4) */ struct ohci_roothub_regs { - __u32 a; - __u32 b; - __u32 status; + __hc32 a; + __hc32 b; + __hc32 status; #define MAX_ROOT_PORTS 15 /* maximum OHCI root hub ports (RH_A_NDP) */ - __u32 portstatus [MAX_ROOT_PORTS]; + __hc32 portstatus [MAX_ROOT_PORTS]; } roothub; /* and optional "legacy support" registers (appendix B) at 0x0100 */ @@ -337,6 +345,11 @@ */ struct ohci_hcd { + /* + * framework state + */ + struct usb_hcd hcd; /* must come first! */ + spinlock_t lock; /* @@ -387,36 +400,15 @@ #define OHCI_QUIRK_AMD756 0x01 /* erratum #4 */ #define OHCI_QUIRK_SUPERIO 0x02 /* natsemi */ #define OHCI_QUIRK_INITRESET 0x04 /* SiS, OPTi, ... */ +#define OHCI_BIG_ENDIAN 0x08 /* big endian HC */ // there are also chip quirks/bugs in init logic - /* - * framework state - */ - struct usb_hcd hcd; }; #define hcd_to_ohci(hcd_ptr) container_of(hcd_ptr, struct ohci_hcd, hcd) /*-------------------------------------------------------------------------*/ -static inline void disable (struct ohci_hcd *ohci) -{ - ohci->hcd.state = USB_STATE_HALT; -} - -#define FI 0x2edf /* 12000 bits per frame (-1) */ -#define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7)) -#define LSTHRESH 0x628 /* lowspeed bit threshold */ - -static inline void periodic_reinit (struct ohci_hcd *ohci) -{ - u32 fi = ohci->fminterval & 0x0ffff; - - writel (((9 * fi) / 10) & 0x3fff, &ohci->regs->periodicstart); -} - -/*-------------------------------------------------------------------------*/ - #ifndef DEBUG #define STUB_DEBUG_FILES #endif /* DEBUG */ @@ -438,44 +430,162 @@ /*-------------------------------------------------------------------------*/ +/* + * While most USB host controllers implement their registers and + * in-memory communication descriptors in little-endian format, + * a minority (notably the IBM STB04XXX and the Motorola MPC5200 + * processors) implement them in big endian format. + * + * This attempts to support either format at compile time without a + * runtime penalty, or both formats with the additional overhead + * of checking a flag bit. + */ + +#ifdef CONFIG_USB_OHCI_BIG_ENDIAN + +#ifdef CONFIG_USB_OHCI_LITTLE_ENDIAN +#define big_endian(ohci) (ohci->flags & OHCI_BIG_ENDIAN) /* either */ +#else +#define big_endian(ohci) 1 /* only big endian */ +#endif + +/* + * Big-endian read/write functions are arch-specific. + * Other arches can be added if/when they're needed. + */ +#if defined(CONFIG_PPC) +#define readl_be(addr) in_be32((__force unsigned *)addr) +#define writel_be(val, addr) out_be32((__force unsigned *)addr, val) +#endif + +static inline unsigned int ohci_readl (const struct ohci_hcd *ohci, + __hc32 __iomem * regs) +{ + return big_endian(ohci) ? readl_be (regs) : readl ((__force u32 *)regs); +} + +static inline void ohci_writel (const struct ohci_hcd *ohci, + const unsigned int val, __hc32 __iomem *regs) +{ + big_endian(ohci) ? writel_be (val, regs) : + writel (val, (__force u32 *)regs); +} + +#else /* !CONFIG_USB_OHCI_BIG_ENDIAN */ + +#define big_endian(ohci) 0 /* only little endian */ + #ifdef CONFIG_ARCH_LH7A404 /* Marc Singer: at the time this code was written, the LH7A404 * had a problem reading the USB host registers. This * implementation of the ohci_readl function performs the read * twice as a work-around. */ -static inline unsigned int ohci_readl (void* regs) +static inline unsigned int +ohci_readl (const struct ohci_hcd *ohci, const __hc32 *regs) { - *(volatile unsigned int*) regs; - return *(volatile unsigned int*) regs; + *(volatile __force unsigned int*) regs; + return *(volatile __force unsigned int*) regs; } #else /* Standard version of ohci_readl uses standard, platform * specific implementation. */ -static inline unsigned int ohci_readl (void __iomem * regs) +static inline unsigned int +ohci_readl (const struct ohci_hcd *ohci, __hc32 __iomem * regs) { - return readl (regs); + return readl(regs); } #endif +static inline void ohci_writel (const struct ohci_hcd *ohci, + const unsigned int val, __hc32 __iomem *regs) +{ + writel (val, regs); +} + +#endif /* !CONFIG_USB_OHCI_BIG_ENDIAN */ + +/*-------------------------------------------------------------------------*/ + +/* cpu to ohci */ +static inline __hc16 cpu_to_hc16 (const struct ohci_hcd *ohci, const u16 x) +{ + return big_endian(ohci) ? cpu_to_be16(x) : cpu_to_le16(x); +} + +static inline __hc16 cpu_to_hc16p (const struct ohci_hcd *ohci, const u16 *x) +{ + return big_endian(ohci) ? cpu_to_be16p(x) : cpu_to_le16p(x); +} + +static inline __hc32 cpu_to_hc32 (const struct ohci_hcd *ohci, const u32 x) +{ + return big_endian(ohci) ? cpu_to_be32(x) : cpu_to_le32(x); +} + +static inline __hc32 cpu_to_hc32p (const struct ohci_hcd *ohci, const u32 *x) +{ + return big_endian(ohci) ? cpu_to_be32p(x) : cpu_to_le32p(x); +} + +/* ohci to cpu */ +static inline u16 hc16_to_cpu (const struct ohci_hcd *ohci, const __hc16 x) +{ + return big_endian(ohci) ? be16_to_cpu(x) : le16_to_cpu(x); +} + +static inline u16 hc16_to_cpup (const struct ohci_hcd *ohci, const __hc16 *x) +{ + return big_endian(ohci) ? be16_to_cpup(x) : le16_to_cpup(x); +} + +static inline u32 hc32_to_cpu (const struct ohci_hcd *ohci, const __hc32 x) +{ + return big_endian(ohci) ? be32_to_cpu(x) : le32_to_cpu(x); +} + +static inline u32 hc32_to_cpup (const struct ohci_hcd *ohci, const __hc32 *x) +{ + return big_endian(ohci) ? be32_to_cpup(x) : le32_to_cpup(x); +} + +/*-------------------------------------------------------------------------*/ + +static inline void disable (struct ohci_hcd *ohci) +{ + ohci->hcd.state = USB_STATE_HALT; +} + +#define FI 0x2edf /* 12000 bits per frame (-1) */ +#define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7)) +#define LSTHRESH 0x628 /* lowspeed bit threshold */ + +static inline void periodic_reinit (struct ohci_hcd *ohci) +{ + u32 fi = ohci->fminterval & 0x0ffff; + + ohci_writel (ohci, ((9 * fi) / 10) & 0x3fff, + &ohci->regs->periodicstart); +} + /* AMD-756 (D2 rev) reports corrupt register contents in some cases. * The erratum (#4) description is incorrect. AMD's workaround waits * till some bits (mostly reserved) are clear; ok for all revs. */ #define read_roothub(hc, register, mask) ({ \ - u32 temp = ohci_readl (&hc->regs->roothub.register); \ + u32 temp = ohci_readl (hc, &hc->regs->roothub.register); \ if (temp == -1) \ disable (hc); \ else if (hc->flags & OHCI_QUIRK_AMD756) \ while (temp & mask) \ - temp = ohci_readl (&hc->regs->roothub.register); \ + temp = ohci_readl (hc, &hc->regs->roothub.register); \ temp; }) static u32 roothub_a (struct ohci_hcd *hc) { return read_roothub (hc, a, 0xfc0fe000); } static inline u32 roothub_b (struct ohci_hcd *hc) - { return ohci_readl (&hc->regs->roothub.b); } + { return ohci_readl (hc, &hc->regs->roothub.b); } static inline u32 roothub_status (struct ohci_hcd *hc) - { return ohci_readl (&hc->regs->roothub.status); } + { return ohci_readl (hc, &hc->regs->roothub.status); } static u32 roothub_portstatus (struct ohci_hcd *hc, int i) { return read_roothub (hc, portstatus [i], 0xffe0fce0); } diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c --- a/drivers/usb/host/uhci-hcd.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/host/uhci-hcd.c 2004-11-10 17:19:06 -08:00 @@ -92,7 +92,7 @@ static kmem_cache_t *uhci_up_cachep; /* urb_priv */ -static int uhci_get_current_frame_number(struct uhci_hcd *uhci); +static unsigned int uhci_get_current_frame_number(struct uhci_hcd *uhci); static int uhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb); static void uhci_unlink_generic(struct uhci_hcd *uhci, struct urb *urb); static void uhci_remove_pending_urbps(struct uhci_hcd *uhci); @@ -174,7 +174,7 @@ */ static void uhci_insert_td_frame_list(struct uhci_hcd *uhci, struct uhci_td *td, unsigned framenum) { - framenum %= UHCI_NUMFRAMES; + framenum &= (UHCI_NUMFRAMES - 1); td->frame = framenum; @@ -765,8 +765,12 @@ uhci_insert_tds_in_qh(qh, urb, UHCI_PTR_BREADTH); - /* Low-speed transfers get a different queue, and won't hog the bus */ - if (urb->dev->speed == USB_SPEED_LOW) + /* Low-speed transfers get a different queue, and won't hog the bus. + * Also, some devices enumerate better without FSBR; the easiest way + * to do that is to put URBs on the low-speed queue while the device + * is in the DEFAULT state. */ + if (urb->dev->speed == USB_SPEED_LOW || + urb->dev->state == USB_STATE_DEFAULT) skelqh = uhci->skel_ls_control_qh; else { skelqh = uhci->skel_fs_control_qh; @@ -1141,15 +1145,14 @@ limits = isochronous_find_limits(uhci, urb, &start, &end); if (urb->transfer_flags & URB_ISO_ASAP) { - if (limits) { - int curframe; - - curframe = uhci_get_current_frame_number(uhci) % UHCI_NUMFRAMES; - urb->start_frame = (curframe + 10) % UHCI_NUMFRAMES; - } else + if (limits) + urb->start_frame = + (uhci_get_current_frame_number(uhci) + + 10) & (UHCI_NUMFRAMES - 1); + else urb->start_frame = end; } else { - urb->start_frame %= UHCI_NUMFRAMES; + urb->start_frame &= (UHCI_NUMFRAMES - 1); /* FIXME: Sanity check */ } @@ -1510,7 +1513,7 @@ * * returns the current frame number for a USB bus/controller. */ -static int uhci_get_current_frame_number(struct uhci_hcd *uhci) +static unsigned int uhci_get_current_frame_number(struct uhci_hcd *uhci) { return inw(uhci->io_addr + USBFRNUM); } @@ -1848,10 +1851,10 @@ } } -static void start_hc(struct uhci_hcd *uhci) +static int start_hc(struct uhci_hcd *uhci) { unsigned long io_addr = uhci->io_addr; - int timeout = 1000; + int timeout = 10; /* * Reset the HC - this will force us to get a @@ -1861,10 +1864,11 @@ */ outw(USBCMD_HCRESET, io_addr + USBCMD); while (inw(io_addr + USBCMD) & USBCMD_HCRESET) { - if (!--timeout) { + if (--timeout < 0) { dev_err(uhci_dev(uhci), "USBCMD_HCRESET timed out!\n"); - break; + return -ETIMEDOUT; } + msleep(1); } /* Turn on PIRQ and all interrupts */ @@ -1883,6 +1887,7 @@ outw(USBCMD_RS | USBCMD_CF | USBCMD_MAXP, io_addr + USBCMD); uhci->hcd.state = USB_STATE_RUNNING; + return 0; } /* @@ -2134,7 +2139,8 @@ * the memory writes above before the I/O transfers in start_hc(). */ mb(); - start_hc(uhci); + if ((retval = start_hc(uhci)) != 0) + goto err_alloc_skelqh; init_stall_timer(hcd); @@ -2240,6 +2246,7 @@ static int uhci_resume(struct usb_hcd *hcd) { struct uhci_hcd *uhci = hcd_to_uhci(hcd); + int rc; pci_set_master(to_pci_dev(uhci_dev(uhci))); @@ -2262,7 +2269,8 @@ USBLEGSUP_DEFAULT); } else { reset_hc(uhci); - start_hc(uhci); + if ((rc = start_hc(uhci)) != 0) + return rc; } uhci->hcd.state = USB_STATE_RUNNING; return 0; @@ -2282,11 +2290,6 @@ return &uhci->hcd; } -static void uhci_hcd_free(struct usb_hcd *hcd) -{ - kfree(hcd_to_uhci(hcd)); -} - /* Are there any URBs for a particular device/endpoint on a given list? */ static int urbs_for_ep_list(struct list_head *head, struct hcd_dev *hdev, int ep) @@ -2351,7 +2354,6 @@ .stop = uhci_stop, .hcd_alloc = uhci_hcd_alloc, - .hcd_free = uhci_hcd_free, .urb_enqueue = uhci_urb_enqueue, .urb_dequeue = uhci_urb_dequeue, diff -Nru a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h --- a/drivers/usb/host/uhci-hcd.h 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/host/uhci-hcd.h 2004-11-10 17:19:06 -08:00 @@ -324,7 +324,7 @@ * a subset of what the full implementation needs. */ struct uhci_hcd { - struct usb_hcd hcd; + struct usb_hcd hcd; /* must come first! */ #ifdef CONFIG_PROC_FS /* procfs */ diff -Nru a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c --- a/drivers/usb/host/uhci-hub.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/usb/host/uhci-hub.c 2004-11-10 17:19:02 -08:00 @@ -44,6 +44,8 @@ test_bit(port, &uhci->port_c_suspend)) *buf |= (1 << (port + 1)); } + if (*buf && uhci->state == UHCI_SUSPENDED) + uhci->resume_detect = 1; return !!*buf; } diff -Nru a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig --- a/drivers/usb/input/Kconfig 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/input/Kconfig 2004-11-10 17:19:06 -08:00 @@ -1,7 +1,7 @@ # # USB Input driver configuration # -comment "USB Human Interface Devices (HID)" +comment "USB Input Devices" depends on USB config USB_HID @@ -12,7 +12,8 @@ mice, joysticks, graphic tablets, or any other HID based devices to your computer via USB. You also need to select HID Input layer support (below) if you want to use keyboards, mice, joysticks and - the like. + the like ... as well as Uninterruptible Power Supply (UPS) and + monitor control devices. You can't use this driver and the HIDBP (Boot Protocol) keyboard and mouse drivers at the same time. More information is available: @@ -24,7 +25,7 @@ module will be called usbhid. comment "Input core support is needed for USB HID input layer or HIDBP support" - depends on USB && INPUT=n + depends on USB_HID && INPUT=n config USB_HIDINPUT bool "HID input layer support" @@ -32,8 +33,7 @@ depends on INPUT && USB_HID help Say Y here if you want to use a USB keyboard, mouse or joystick, - or any other HID input device. You also need "Input core support", - (CONFIG_INPUT), which you select under "Input device support", above. + or any other HID input device. If unsure, say Y. @@ -87,7 +87,6 @@ This module supports these devices separately using a separate event interface on /dev/usb/hiddevX (char 180:96 to 180:111). - This driver requires CONFIG_USB_HID. If unsure, say Y. diff -Nru a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c --- a/drivers/usb/input/hid-core.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/input/hid-core.c 2004-11-10 17:19:05 -08:00 @@ -925,6 +925,7 @@ case -ECONNRESET: /* unlink */ case -ENOENT: case -ESHUTDOWN: + case -EPERM: return; case -ETIMEDOUT: /* NAK */ break; @@ -1430,6 +1431,7 @@ #define USB_VENDOR_ID_CYPRESS 0x04b4 #define USB_DEVICE_ID_CYPRESS_MOUSE 0x0001 +#define USB_DEVICE_ID_CYPRESS_HIDCOM 0x5500 #define USB_VENDOR_ID_BERKSHIRE 0x0c98 #define USB_DEVICE_ID_BERKSHIRE_PCWD 0x1140 @@ -1463,6 +1465,9 @@ #define USB_DEVICE_ID_CODEMERCS_IOW48 0x1502 #define USB_DEVICE_ID_CODEMERCS_IOW28 0x1503 +#define USB_VENDOR_ID_DELORME 0x1163 +#define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100 + static struct hid_blacklist { __u16 idVendor; __u16 idProduct; @@ -1535,6 +1540,7 @@ { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_BACK }, { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_EXTRA }, + { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_CHIC, USB_DEVICE_ID_CHIC_GAMEPAD, HID_QUIRK_BADPAD }, @@ -1550,6 +1556,8 @@ { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW48, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW28, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE, HID_QUIRK_IGNORE }, + { 0, 0 } }; @@ -1694,8 +1702,8 @@ init_waitqueue_head(&hid->wait); - hid->outlock = SPIN_LOCK_UNLOCKED; - hid->ctrllock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&hid->outlock); + spin_lock_init(&hid->ctrllock); hid->version = le16_to_cpu(hdesc->bcdHID); hid->country = hdesc->bCountryCode; @@ -1833,6 +1841,30 @@ return 0; } +static int hid_suspend(struct usb_interface *intf, u32 state) +{ + struct hid_device *hid = usb_get_intfdata (intf); + + usb_kill_urb(hid->urbin); + intf->dev.power.power_state = state; + dev_dbg(&intf->dev, "suspend\n"); + return 0; +} + +static int hid_resume(struct usb_interface *intf) +{ + struct hid_device *hid = usb_get_intfdata (intf); + int status; + + intf->dev.power.power_state = PM_SUSPEND_ON; + if (hid->open) + status = usb_submit_urb(hid->urbin, GFP_NOIO); + else + status = 0; + dev_dbg(&intf->dev, "resume status %d\n", status); + return status; +} + static struct usb_device_id hid_usb_ids [] = { { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS, .bInterfaceClass = USB_INTERFACE_CLASS_HID }, @@ -1846,6 +1878,8 @@ .name = "usbhid", .probe = hid_probe, .disconnect = hid_disconnect, + .suspend = hid_suspend, + .resume = hid_resume, .id_table = hid_usb_ids, }; diff -Nru a/drivers/usb/input/powermate.c b/drivers/usb/input/powermate.c --- a/drivers/usb/input/powermate.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/input/powermate.c 2004-11-10 17:19:05 -08:00 @@ -349,7 +349,7 @@ return -ENOMEM; } - pm->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&pm->lock); init_input_dev(&pm->input); /* get a handle to the interrupt data pipe */ diff -Nru a/drivers/usb/media/dabusb.c b/drivers/usb/media/dabusb.c --- a/drivers/usb/media/dabusb.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/media/dabusb.c 2004-11-10 17:19:05 -08:00 @@ -595,8 +595,7 @@ if (file->f_flags & O_NONBLOCK) { return -EBUSY; } - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout (HZ / 2); + msleep_interruptible(500); if (signal_pending (current)) { return -EAGAIN; diff -Nru a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c --- a/drivers/usb/media/ov511.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/usb/media/ov511.c 2004-11-10 17:19:03 -08:00 @@ -4756,7 +4756,7 @@ pos = (unsigned long)ov->fbuf; while (size > 0) { - page = page_to_pfn(vmalloc_to_page((void *)pos)); + page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) { up(&ov->lock); return -EAGAIN; diff -Nru a/drivers/usb/media/se401.c b/drivers/usb/media/se401.c --- a/drivers/usb/media/se401.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/usb/media/se401.c 2004-11-10 17:19:03 -08:00 @@ -1168,7 +1168,7 @@ } pos = (unsigned long)se401->fbuf; while (size > 0) { - page = page_to_pfn(vmalloc_to_page((void *)pos)); + page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) { up(&se401->lock); return -EAGAIN; diff -Nru a/drivers/usb/media/sn9c102_core.c b/drivers/usb/media/sn9c102_core.c --- a/drivers/usb/media/sn9c102_core.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/usb/media/sn9c102_core.c 2004-11-10 17:19:02 -08:00 @@ -1555,7 +1555,7 @@ pos = (unsigned long)cam->frame[i].bufmem; while (size > 0) { /* size is page-aligned */ - page = page_to_pfn(vmalloc_to_page((void *)pos)); + page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, vma->vm_page_prot)) { up(&cam->fileop_sem); diff -Nru a/drivers/usb/media/stv680.c b/drivers/usb/media/stv680.c --- a/drivers/usb/media/stv680.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/media/stv680.c 2004-11-10 17:19:05 -08:00 @@ -498,12 +498,6 @@ /**************************************************************************** * sysfs ***************************************************************************/ -static inline struct usb_stv *cd_to_stv(struct class_device *cd) -{ - struct video_device *vdev = to_video_device(cd); - return video_get_drvdata(vdev); -} - #define stv680_file(name, variable, field) \ static ssize_t show_##name(struct class_device *class_dev, char *buf) \ { \ @@ -1277,7 +1271,7 @@ } pos = (unsigned long) stv680->fbuf; while (size > 0) { - page = page_to_pfn(vmalloc_to_page((void *)pos)); + page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) { up (&stv680->lock); return -EAGAIN; diff -Nru a/drivers/usb/media/usbvideo.c b/drivers/usb/media/usbvideo.c --- a/drivers/usb/media/usbvideo.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/usb/media/usbvideo.c 2004-11-10 17:19:07 -08:00 @@ -505,72 +505,6 @@ } /* - * usbvideo_DrawLine() - * - * A standard implementation of Bresenham's line drawing algorithm. - * This procedure is provided primarily for debugging or demo - * purposes. - */ -void usbvideo_DrawLine( - struct usbvideo_frame *frame, - int x1, int y1, - int x2, int y2, - unsigned char cr, unsigned char cg, unsigned char cb) -{ - int i, dx, dy, np, d; - int dinc1, dinc2, x, xinc1, xinc2, y, yinc1, yinc2; - - if ((dx = x2 - x1) < 0) - dx = -dx; - if ((dy = y2 - y1) < 0) - dy = -dy; - if (dx >= dy) { - np = dx + 1; - d = (2 * dy) - dx; - dinc1 = dy << 1; - dinc2 = (dy - dx) << 1; - xinc1 = 1; - xinc2 = 1; - yinc1 = 0; - yinc2 = 1; - } else { - np = dy + 1; - d = (2 * dx) - dy; - dinc1 = dx << 1; - dinc2 = (dx - dy) << 1; - xinc1 = 0; - xinc2 = 1; - yinc1 = 1; - yinc2 = 1; - } - /* Make sure x and y move in the right directions */ - if (x1 > x2) { - xinc1 = -xinc1; - xinc2 = -xinc2; - } - if (y1 > y2) { - yinc1 = -yinc1; - yinc2 = -yinc2; - } - for (i=0, x=x1, y=y1; i < np; i++) { - if (frame->palette == VIDEO_PALETTE_RGB24) { -/* TODO */ RGB24_PUTPIXEL(frame, x, y, cr, cg, cb); - } - if (d < 0) { - d += dinc1; - x += xinc1; - y += yinc1; - } else { - d += dinc2; - x += xinc2; - y += yinc2; - } - } -} - -EXPORT_SYMBOL(usbvideo_DrawLine); - -/* * usbvideo_TestPattern() * * Procedure forms a test pattern (yellow grid on blue background). @@ -658,6 +592,8 @@ EXPORT_SYMBOL(usbvideo_TestPattern); + +#ifdef DEBUG /* * usbvideo_HexDump() * @@ -687,16 +623,7 @@ EXPORT_SYMBOL(usbvideo_HexDump); -/* Debugging aid */ -void usbvideo_SayAndWait(const char *what) -{ - wait_queue_head_t wq; - init_waitqueue_head(&wq); - info("Say: %s", what); - interruptible_sleep_on_timeout (&wq, HZ*3); /* Timeout */ -} - -EXPORT_SYMBOL(usbvideo_SayAndWait); +#endif /* ******************************************************************** */ @@ -1153,7 +1080,7 @@ pos = (unsigned long) uvd->fbuf; while (size > 0) { - page = page_to_pfn(vmalloc_to_page((void *)pos)); + page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) return -EAGAIN; diff -Nru a/drivers/usb/media/vicam.c b/drivers/usb/media/vicam.c --- a/drivers/usb/media/vicam.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/usb/media/vicam.c 2004-11-10 17:19:03 -08:00 @@ -1045,7 +1045,7 @@ pos = (unsigned long)cam->framebuf; while (size > 0) { - page = page_to_pfn(vmalloc_to_page((void *)pos)); + page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) return -EAGAIN; diff -Nru a/drivers/usb/media/w9968cf.c b/drivers/usb/media/w9968cf.c --- a/drivers/usb/media/w9968cf.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/media/w9968cf.c 2004-11-10 17:19:06 -08:00 @@ -2904,7 +2904,7 @@ return -EINVAL; while (vsize > 0) { - page = page_to_pfn(vmalloc_to_page((void *)pos)); + page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page + vma->vm_pgoff, PAGE_SIZE, vma->vm_page_prot)) return -EAGAIN; diff -Nru a/drivers/usb/media/w9968cf.h b/drivers/usb/media/w9968cf.h --- a/drivers/usb/media/w9968cf.h 2004-11-10 17:19:02 -08:00 +++ b/drivers/usb/media/w9968cf.h 2004-11-10 17:19:02 -08:00 @@ -135,7 +135,7 @@ #define W9968CF_MODULE_NAME "V4L driver for W996[87]CF JPEG USB " \ "Dual Mode Camera Chip" -#define W9968CF_MODULE_VERSION "1:1.32-basic" +#define W9968CF_MODULE_VERSION "1:1.33-basic" #define W9968CF_MODULE_AUTHOR "(C) 2002-2004 Luca Risolia" #define W9968CF_AUTHOR_EMAIL "" #define W9968CF_MODULE_LICENSE "GPL" diff -Nru a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig --- a/drivers/usb/misc/Kconfig 2004-11-10 17:19:07 -08:00 +++ b/drivers/usb/misc/Kconfig 2004-11-10 17:19:07 -08:00 @@ -121,6 +121,16 @@ To compile this driver as a module, choose M here: the module will be called cytherm. +config USB_PHIDGETKIT + tristate "USB PhidgetKit support" + depends on USB + help + Say Y here if you want to connect a PhidgetKit USB device from + Phidgets Inc. + + To compile this driver as a module, choose M here: the + module will be called phidgetkit. + config USB_PHIDGETSERVO tristate "USB PhidgetServo support" depends on USB diff -Nru a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile --- a/drivers/usb/misc/Makefile 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/misc/Makefile 2004-11-10 17:19:04 -08:00 @@ -10,8 +10,9 @@ obj-$(CONFIG_USB_LCD) += usblcd.o obj-$(CONFIG_USB_LED) += usbled.o obj-$(CONFIG_USB_LEGOTOWER) += legousbtower.o +obj-$(CONFIG_USB_PHIDGETKIT) += phidgetkit.o +obj-$(CONFIG_USB_PHIDGETSERVO) += phidgetservo.o obj-$(CONFIG_USB_RIO500) += rio500.o obj-$(CONFIG_USB_TEST) += usbtest.o obj-$(CONFIG_USB_TIGL) += tiglusb.o obj-$(CONFIG_USB_USS720) += uss720.o -obj-$(CONFIG_USB_PHIDGETSERVO) += phidgetservo.o diff -Nru a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/misc/phidgetkit.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,581 @@ +/* + * USB PhidgetInterfaceKit driver 1.0 + * + * Copyright (C) 2004 Sean Young + * Copyright (C) 2004 Greg Kroah-Hartman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This is a driver for the USB PhidgetInterfaceKit. + */ + +#include +#include +#include +#include +#include +#include +#include + +#define DRIVER_AUTHOR "Sean Young " +#define DRIVER_DESC "USB PhidgetInterfaceKit Driver" + +#define USB_VENDOR_ID_GLAB 0x06c2 +#define USB_DEVICE_ID_INTERFACEKIT004 0x0040 +#define USB_DEVICE_ID_INTERFACEKIT888 0x0045 +#define USB_DEVICE_ID_INTERFACEKIT047 0x0051 +#define USB_DEVICE_ID_INTERFACEKIT088 0x0053 + +#define USB_VENDOR_ID_WISEGROUP 0x0925 +#define USB_DEVICE_ID_INTERFACEKIT884 0x8201 + +#define MAX_INTERFACES 8 + +struct driver_interfacekit { + int sensors; + int inputs; + int outputs; + int has_lcd; +}; +#define ifkit(_sensors, _inputs, _outputs, _lcd) \ +static struct driver_interfacekit ph_##_sensors##_inputs##_outputs = { \ + .sensors = _sensors, \ + .inputs = _inputs, \ + .outputs = _outputs, \ + .has_lcd = _lcd, \ +}; +ifkit(0, 0, 4, 0); +ifkit(8, 8, 8, 0); +ifkit(0, 4, 7, 1); +ifkit(8, 8, 4, 0); +ifkit(0, 8, 8, 1); + +struct phidget_interfacekit { + struct usb_device *udev; + struct usb_interface *intf; + struct driver_interfacekit *ifkit; + int outputs[MAX_INTERFACES]; + int inputs[MAX_INTERFACES]; + int sensors[MAX_INTERFACES]; + u8 lcd_files_on; + + struct urb *irq; + unsigned char *data; + dma_addr_t data_dma; +}; + +static struct usb_device_id id_table[] = { + {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT004), + .driver_info = (kernel_ulong_t)&ph_004}, + {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT888), + .driver_info = (kernel_ulong_t)&ph_888}, + {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT047), + .driver_info = (kernel_ulong_t)&ph_047}, + {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT088), + .driver_info = (kernel_ulong_t)&ph_088}, + {USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_INTERFACEKIT884), + .driver_info = (kernel_ulong_t)&ph_884}, + {} +}; +MODULE_DEVICE_TABLE(usb, id_table); + +static int change_outputs(struct phidget_interfacekit *kit, int output_num, int enable) +{ + unsigned char *buffer; + int retval; + int n; + + buffer = kmalloc(4, GFP_KERNEL); + if (!buffer) { + dev_err(&kit->udev->dev, "%s - out of memory\n", + __FUNCTION__); + return -ENOMEM; + } + + kit->outputs[output_num] = enable; + memset(buffer, 0, 4); + for (n=0; n<8; n++) { + if (kit->outputs[n]) { + buffer[0] |= 1 << n; + } + } + + dev_dbg(&kit->udev->dev, "data: %02x %02x\n", buffer[0], buffer[1]); + + retval = usb_control_msg(kit->udev, + usb_sndctrlpipe(kit->udev, 0), + 0x09, 0x21, 0x0200, 0x0000, buffer, 4, 2 * HZ); + + if (retval != 4) + dev_err(&kit->udev->dev, "retval = %d\n", retval); + kfree(buffer); + + return retval < 0 ? retval : 0; +} + +static int change_string(struct phidget_interfacekit *kit, const char *display, unsigned char row) +{ + unsigned char *buffer; + unsigned char *form_buffer; + int retval = -ENOMEM; + int i,j, len, buf_ptr; + + buffer = kmalloc(8, GFP_KERNEL); + form_buffer = kmalloc(30, GFP_KERNEL); + if ((!buffer) || (!form_buffer)) { + dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__); + goto exit; + } + + len = strlen(display); + if (len > 20) + len = 20; + + dev_dbg(&kit->udev->dev, "Setting LCD line %d to %s\n", row, display); + + form_buffer[0] = row * 0x40 + 0x80; + form_buffer[1] = 0x02; + buf_ptr = 2; + for (i = 0; i 7) + len = 7; + else + len = (buf_ptr - i); + for (j = 0; j < len; j++) + buffer[j] = form_buffer[i + j]; + buffer[7] = len; + + retval = usb_control_msg(kit->udev, + usb_sndctrlpipe(kit->udev, 0), + 0x09, 0x21, 0x0200, 0x0000, buffer, 8, 2 * HZ); + if (retval < 0) + goto exit; + } + + retval = 0; +exit: + kfree(buffer); + kfree(form_buffer); + + return retval; +} + +#define set_lcd_line(number) \ +static ssize_t lcd_line_##number(struct device *dev, const char *buf, size_t count) \ +{ \ + struct usb_interface *intf = to_usb_interface(dev); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ + change_string(kit, buf, number - 1); \ + return count; \ +} \ +static DEVICE_ATTR(lcd_line_##number, S_IWUGO, NULL, lcd_line_##number); +set_lcd_line(1); +set_lcd_line(2); + +static ssize_t set_backlight(struct device *dev, const char *buf, size_t count) +{ + struct usb_interface *intf = to_usb_interface(dev); + struct phidget_interfacekit *kit = usb_get_intfdata(intf); + int enabled; + unsigned char *buffer; + int retval = -ENOMEM; + + buffer = kmalloc(8, GFP_KERNEL); + if (!buffer) { + dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__); + goto exit; + } + + if (sscanf(buf, "%d", &enabled) < 1) { + retval = -EINVAL; + goto exit; + } + memset(buffer, 0x00, 8); + if (enabled) + buffer[0] = 0x01; + buffer[7] = 0x11; + + dev_dbg(&kit->udev->dev, "Setting backlight to %s\n", enabled ? "on" : "off"); + + retval = usb_control_msg(kit->udev, + usb_sndctrlpipe(kit->udev, 0), + 0x09, 0x21, 0x0200, 0x0000, buffer, 8, 2 * HZ); + if (retval < 0) + goto exit; + + retval = count; +exit: + kfree(buffer); + return retval; +} +static DEVICE_ATTR(backlight, S_IWUGO, NULL, set_backlight); + +static void remove_lcd_files(struct phidget_interfacekit *kit) +{ + if (kit->lcd_files_on) { + dev_dbg(&kit->udev->dev, "Removing lcd files\n"); + device_remove_file(&kit->intf->dev, &dev_attr_lcd_line_1); + device_remove_file(&kit->intf->dev, &dev_attr_lcd_line_2); + device_remove_file(&kit->intf->dev, &dev_attr_backlight); + } +} + +static ssize_t enable_lcd_files(struct device *dev, const char *buf, size_t count) +{ + struct usb_interface *intf = to_usb_interface(dev); + struct phidget_interfacekit *kit = usb_get_intfdata(intf); + int enable; + + if (kit->ifkit->has_lcd == 0) + return -ENODEV; + + if (sscanf(buf, "%d", &enable) < 1) + return -EINVAL; + + if (enable) { + if (!kit->lcd_files_on) { + dev_dbg(&kit->udev->dev, "Adding lcd files\n"); + device_create_file(&kit->intf->dev, &dev_attr_lcd_line_1); + device_create_file(&kit->intf->dev, &dev_attr_lcd_line_2); + device_create_file(&kit->intf->dev, &dev_attr_backlight); + kit->lcd_files_on = 1; + } + } else { + if (kit->lcd_files_on) { + remove_lcd_files(kit); + kit->lcd_files_on = 0; + } + } + + return count; +} +static DEVICE_ATTR(lcd, S_IWUGO, NULL, enable_lcd_files); + +static void interfacekit_irq(struct urb *urb, struct pt_regs *regs) +{ + struct phidget_interfacekit *kit = urb->context; + unsigned char *buffer = kit->data; + int status; + int n; + + switch (urb->status) { + case 0: /* success */ + break; + case -ECONNRESET: /* unlink */ + case -ENOENT: + case -ESHUTDOWN: + return; + /* -EPIPE: should clear the halt */ + default: /* error */ + goto resubmit; + } + + for (n=0; n<8; n++) { + kit->inputs[n] = buffer[1] & (1 << n) ? 1 : 0; + } + + if (buffer[0] & 1) { + kit->sensors[4] = buffer[2] + (buffer[3] & 0x0f) * 256; + kit->sensors[5] = buffer[4] + (buffer[3] & 0xf0) * 16; + kit->sensors[6] = buffer[5] + (buffer[6] & 0x0f) * 256; + kit->sensors[7] = buffer[7] + (buffer[6] & 0xf0) * 16; + } else { + kit->sensors[0] = buffer[2] + (buffer[3] & 0x0f) * 256; + kit->sensors[1] = buffer[4] + (buffer[3] & 0xf0) * 16; + kit->sensors[2] = buffer[5] + (buffer[6] & 0x0f) * 256; + kit->sensors[3] = buffer[7] + (buffer[6] & 0xf0) * 16; + } + +resubmit: + status = usb_submit_urb(urb, SLAB_ATOMIC); + if (status) + err("can't resubmit intr, %s-%s/interfacekit0, status %d", + kit->udev->bus->bus_name, + kit->udev->devpath, status); +} + +#define show_set_output(value) \ +static ssize_t set_output##value(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct usb_interface *intf = to_usb_interface(dev); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ + int enabled; \ + int retval; \ + \ + if (sscanf(buf, "%d", &enabled) < 1) { \ + return -EINVAL; \ + } \ + \ + retval = change_outputs(kit, value - 1, enabled ? 1 : 0); \ + \ + return retval ? retval : count; \ +} \ + \ +static ssize_t show_output##value(struct device *dev, char *buf) \ +{ \ + struct usb_interface *intf = to_usb_interface(dev); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ + \ + return sprintf(buf, "%d\n", kit->outputs[value - 1 ]); \ +} \ +static DEVICE_ATTR(output##value, S_IWUGO | S_IRUGO, \ + show_output##value, set_output##value); +show_set_output(1); +show_set_output(2); +show_set_output(3); +show_set_output(4); +show_set_output(5); +show_set_output(6); +show_set_output(7); +show_set_output(8); /* should be MAX_INTERFACES - 1 */ + +#define show_input(value) \ +static ssize_t show_input##value(struct device *dev, char *buf) \ +{ \ + struct usb_interface *intf = to_usb_interface(dev); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ + \ + return sprintf(buf, "%d\n", kit->inputs[value - 1]); \ +} \ +static DEVICE_ATTR(input##value, S_IRUGO, show_input##value, NULL); + +show_input(1); +show_input(2); +show_input(3); +show_input(4); +show_input(5); +show_input(6); +show_input(7); +show_input(8); /* should be MAX_INTERFACES - 1 */ + +#define show_sensor(value) \ +static ssize_t show_sensor##value(struct device *dev, char *buf) \ +{ \ + struct usb_interface *intf = to_usb_interface(dev); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ + \ + return sprintf(buf, "%d\n", kit->sensors[value - 1]); \ +} \ +static DEVICE_ATTR(sensor##value, S_IRUGO, show_sensor##value, NULL); + +show_sensor(1); +show_sensor(2); +show_sensor(3); +show_sensor(4); +show_sensor(5); +show_sensor(6); +show_sensor(7); +show_sensor(8); /* should be MAX_INTERFACES - 1 */ + +static int interfacekit_probe(struct usb_interface *intf, const struct usb_device_id *id) +{ + struct usb_device *dev = interface_to_usbdev(intf); + struct usb_host_interface *interface; + struct usb_endpoint_descriptor *endpoint; + struct phidget_interfacekit *kit; + struct driver_interfacekit *ifkit; + int pipe, maxp; + + ifkit = (struct driver_interfacekit *)id->driver_info; + if (!ifkit) + return -ENODEV; + + interface = intf->cur_altsetting; + if (interface->desc.bNumEndpoints != 1) + return -ENODEV; + + endpoint = &interface->endpoint[0].desc; + if (!(endpoint->bEndpointAddress & 0x80)) + return -ENODEV; + /* + * bmAttributes + */ + pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); + maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); + + kit = kmalloc(sizeof(*kit), GFP_KERNEL); + if (kit == NULL) { + dev_err(&intf->dev, "%s - out of memory\n", __FUNCTION__); + return -ENOMEM; + } + memset(kit, 0, sizeof(*kit)); + kit->ifkit = ifkit; + + kit->data = usb_buffer_alloc(dev, 8, SLAB_ATOMIC, &kit->data_dma); + if (!kit->data) { + kfree(kit); + return -ENOMEM; + } + + kit->irq = usb_alloc_urb(0, GFP_KERNEL); + if (!kit->irq) { + usb_buffer_free(dev, 8, kit->data, kit->data_dma); + kfree(kit); + return -ENOMEM; + } + + kit->udev = usb_get_dev(dev); + kit->intf = intf; + usb_fill_int_urb(kit->irq, kit->udev, pipe, kit->data, + (maxp > 8 ? 8 : maxp), + interfacekit_irq, kit, endpoint->bInterval); + kit->irq->transfer_dma = kit->data_dma; + kit->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; + + usb_set_intfdata(intf, kit); + + if (usb_submit_urb(kit->irq, GFP_KERNEL)) { + return -EIO; + } + + if (ifkit->outputs == 8) { + device_create_file(&intf->dev, &dev_attr_output1); + device_create_file(&intf->dev, &dev_attr_output2); + device_create_file(&intf->dev, &dev_attr_output3); + device_create_file(&intf->dev, &dev_attr_output4); + device_create_file(&intf->dev, &dev_attr_output5); + device_create_file(&intf->dev, &dev_attr_output6); + device_create_file(&intf->dev, &dev_attr_output7); + device_create_file(&intf->dev, &dev_attr_output8); + } + + if (ifkit->inputs >= 4) { + device_create_file(&intf->dev, &dev_attr_input1); + device_create_file(&intf->dev, &dev_attr_input2); + device_create_file(&intf->dev, &dev_attr_input3); + device_create_file(&intf->dev, &dev_attr_input4); + } + if (ifkit->inputs == 8) { + device_create_file(&intf->dev, &dev_attr_input5); + device_create_file(&intf->dev, &dev_attr_input6); + device_create_file(&intf->dev, &dev_attr_input7); + device_create_file(&intf->dev, &dev_attr_input8); + } + + if (ifkit->sensors >= 4) { + device_create_file(&intf->dev, &dev_attr_sensor1); + device_create_file(&intf->dev, &dev_attr_sensor2); + device_create_file(&intf->dev, &dev_attr_sensor3); + device_create_file(&intf->dev, &dev_attr_sensor4); + } + if (ifkit->sensors >= 7) { + device_create_file(&intf->dev, &dev_attr_sensor5); + device_create_file(&intf->dev, &dev_attr_sensor6); + device_create_file(&intf->dev, &dev_attr_sensor7); + } + if (ifkit->sensors == 8) { + device_create_file(&intf->dev, &dev_attr_sensor8); + } + + if (ifkit->has_lcd) + device_create_file(&intf->dev, &dev_attr_lcd); + + dev_info(&intf->dev, "USB PhidgetInterfaceKit %d/%d/%d attached\n", + ifkit->inputs, ifkit->outputs, ifkit->sensors); + + return 0; +} + +static void interfacekit_disconnect(struct usb_interface *interface) +{ + struct phidget_interfacekit *kit; + + kit = usb_get_intfdata(interface); + usb_set_intfdata(interface, NULL); + if (!kit) + return; + + if (kit->ifkit->outputs == MAX_INTERFACES) { + device_remove_file(&interface->dev, &dev_attr_output1); + device_remove_file(&interface->dev, &dev_attr_output2); + device_remove_file(&interface->dev, &dev_attr_output3); + device_remove_file(&interface->dev, &dev_attr_output4); + device_remove_file(&interface->dev, &dev_attr_output5); + device_remove_file(&interface->dev, &dev_attr_output6); + device_remove_file(&interface->dev, &dev_attr_output7); + device_remove_file(&interface->dev, &dev_attr_output7); + } + + if (kit->ifkit->inputs >= 4) { + device_remove_file(&interface->dev, &dev_attr_input1); + device_remove_file(&interface->dev, &dev_attr_input2); + device_remove_file(&interface->dev, &dev_attr_input3); + device_remove_file(&interface->dev, &dev_attr_input4); + } + if (kit->ifkit->inputs == 8) { + device_remove_file(&interface->dev, &dev_attr_input5); + device_remove_file(&interface->dev, &dev_attr_input6); + device_remove_file(&interface->dev, &dev_attr_input7); + device_remove_file(&interface->dev, &dev_attr_input8); + } + + if (kit->ifkit->sensors >= 4) { + device_remove_file(&interface->dev, &dev_attr_sensor1); + device_remove_file(&interface->dev, &dev_attr_sensor2); + device_remove_file(&interface->dev, &dev_attr_sensor3); + device_remove_file(&interface->dev, &dev_attr_sensor4); + } + if (kit->ifkit->sensors >= 7) { + device_remove_file(&interface->dev, &dev_attr_sensor5); + device_remove_file(&interface->dev, &dev_attr_sensor6); + device_remove_file(&interface->dev, &dev_attr_sensor7); + } + if (kit->ifkit->sensors == 8) { + device_remove_file(&interface->dev, &dev_attr_sensor8); + } + if (kit->ifkit->has_lcd) + device_create_file(&interface->dev, &dev_attr_lcd); + + dev_info(&interface->dev, "USB PhidgetInterfaceKit %d/%d/%d detached\n", + kit->ifkit->inputs, kit->ifkit->outputs, kit->ifkit->sensors); + + usb_kill_urb(kit->irq); + usb_free_urb(kit->irq); + usb_buffer_free(kit->udev, 8, kit->data, kit->data_dma); + + usb_put_dev(kit->udev); + kfree(kit); +} + +static struct usb_driver interfacekit_driver = { + .owner = THIS_MODULE, + .name = "phidgetkit", + .probe = interfacekit_probe, + .disconnect = interfacekit_disconnect, + .id_table = id_table +}; + +static int __init interfacekit_init(void) +{ + int retval = 0; + + retval = usb_register(&interfacekit_driver); + if (retval) + err("usb_register failed. Error number %d", retval); + + return retval; +} + +static void __exit interfacekit_exit(void) +{ + usb_deregister(&interfacekit_driver); +} + +module_init(interfacekit_init); +module_exit(interfacekit_exit); + +MODULE_AUTHOR(DRIVER_AUTHOR); +MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/usb/misc/tiglusb.c b/drivers/usb/misc/tiglusb.c --- a/drivers/usb/misc/tiglusb.c 2004-11-10 17:19:02 -08:00 +++ b/drivers/usb/misc/tiglusb.c 2004-11-10 17:19:02 -08:00 @@ -4,7 +4,7 @@ * Target: Texas Instruments graphing calculators (http://lpg.ticalc.org). * * Copyright (C) 2001-2004: - * Romain Lievin + * Romain Lievin * Julien BLACHE * under the terms of the GNU General Public License. * @@ -14,7 +14,7 @@ * and the website at: http://lpg.ticalc.org/prj_usb/ * for more info. * - * History : + * History: * 1.0x, Romain & Julien: initial submit. * 1.03, Greg Kroah: modifications. * 1.04, Julien: clean-up & fixes; Romain: 2.4 backport. @@ -22,6 +22,7 @@ * 1.06, Romain: synched with 2.5, version/firmware changed (confusing). * 1.07, Romain: fixed bad use of usb_clear_halt (invalid argument); * timeout argument checked in ioctl + clean-up. + * 1.08, Romain: added support of USB port embedded on some TI's handhelds. */ #include @@ -41,7 +42,7 @@ /* * Version Information */ -#define DRIVER_VERSION "1.07" +#define DRIVER_VERSION "1.08" #define DRIVER_AUTHOR "Romain Lievin & Julien Blache " #define DRIVER_DESC "TI-GRAPH LINK USB (aka SilverLink) driver" #define DRIVER_LICENSE "GPL" @@ -115,8 +116,7 @@ return -EBUSY; } - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout (HZ / 2); + msleep_interruptible(500); if (signal_pending (current)) { return -EAGAIN; @@ -178,11 +178,11 @@ if (!s->dev) return -EIO; - buffer = kmalloc(BULK_RCV_MAX, GFP_KERNEL); + buffer = kmalloc (s->max_ps, GFP_KERNEL); if (!buffer) return -ENOMEM; - bytes_to_read = (count >= BULK_RCV_MAX) ? BULK_RCV_MAX : count; + bytes_to_read = (count >= s->max_ps) ? s->max_ps : count; pipe = usb_rcvbulkpipe (s->dev, 1); result = usb_bulk_msg (s->dev, pipe, buffer, bytes_to_read, @@ -235,11 +235,11 @@ if (!s->dev) return -EIO; - buffer = kmalloc(BULK_SND_MAX, GFP_KERNEL); + buffer = kmalloc (s->max_ps, GFP_KERNEL); if (!buffer) return -ENOMEM; - bytes_to_write = (count >= BULK_SND_MAX) ? BULK_SND_MAX : count; + bytes_to_write = (count >= s->max_ps) ? s->max_ps : count; if (copy_from_user (buffer, buf, bytes_to_write)) { ret = -EFAULT; goto out; @@ -309,6 +309,15 @@ if (clear_pipes (s->dev)) ret = -EIO; break; + case IOCTL_TIUSB_GET_MAXPS: + if (copy_to_user((int *) arg, &s->max_ps, sizeof(int))) + return -EFAULT; + break; + case IOCTL_TIUSB_GET_DEVID: + if (copy_to_user((int *) arg, &s->dev->descriptor.idProduct, + sizeof(int))) + return -EFAULT; + break; default: ret = -ENOTTY; break; @@ -341,6 +350,9 @@ int minor = -1; int i, err = 0; ptiglusb_t s; + struct usb_host_config *conf; + struct usb_host_interface *ifdata = NULL; + int max_ps; dbg ("probing vendor id 0x%x, device id 0x%x", dev->descriptor.idVendor, dev->descriptor.idProduct); @@ -355,19 +367,31 @@ goto out; } - if ((dev->descriptor.idProduct != 0xe001) - && (dev->descriptor.idVendor != 0x451)) { + if (dev->descriptor.idVendor != 0x451) { err = -ENODEV; goto out; } - // NOTE: it's already in this config, this shouldn't be needed. - // is this working around some hardware bug? - if (usb_reset_configuration (dev) < 0) { - err ("tiglusb_probe: reset_configuration failed"); - err = -ENODEV; - goto out; - } + if ((dev->descriptor.idProduct != 0xe001) && + (dev->descriptor.idProduct != 0xe004) && + (dev->descriptor.idProduct != 0xe008)) { + err = -ENODEV; + goto out; + } + + /* + * TI introduced some new handhelds with embedded USB port. + * Port advertises same config as SilverLink cable but with a + * different maximum packet size (64 rather than 32). + */ + + conf = dev->actconfig; + ifdata = conf->interface[0]->cur_altsetting; + max_ps = ifdata->endpoint[0].desc.wMaxPacketSize; + + info("max packet size of %d/%d bytes\n", + ifdata->endpoint[0].desc.wMaxPacketSize, + ifdata->endpoint[1].desc.wMaxPacketSize); /* * Find a tiglusb struct @@ -390,6 +414,7 @@ down (&s->mutex); s->remove_pending = 0; s->dev = dev; + s->max_ps = max_ps; up (&s->mutex); dbg ("bound to interface"); diff -Nru a/drivers/usb/misc/tiglusb.h b/drivers/usb/misc/tiglusb.h --- a/drivers/usb/misc/tiglusb.h 2004-11-10 17:19:07 -08:00 +++ b/drivers/usb/misc/tiglusb.h 2004-11-10 17:19:07 -08:00 @@ -18,12 +18,6 @@ #define MAXTIGL 16 /* - * Max. packetsize for IN and OUT pipes - */ -#define BULK_RCV_MAX 32 -#define BULK_SND_MAX 32 - -/* * The driver context... */ @@ -42,6 +36,8 @@ driver_state_t state; /* started/stopped */ int opened; /* tru if open */ int remove_pending; + + int max_ps; /* max packet size */ } tiglusb_t, *ptiglusb_t; #endif diff -Nru a/drivers/usb/net/Kconfig b/drivers/usb/net/Kconfig --- a/drivers/usb/net/Kconfig 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/net/Kconfig 2004-11-10 17:19:05 -08:00 @@ -185,6 +185,14 @@ Choose this option if you're using a host-to-host cable with one of these chips. +config USB_KC2190 + boolean "KT Technology KC2190 based cables (InstaNet)" + default y + depends on USB_USBNET && EXPERIMENTAL + help + Choose this option if you're using a host-to-host cable + with one of these chips. + comment "Intelligent USB Devices/Gadgets" depends on USB_USBNET diff -Nru a/drivers/usb/net/catc.c b/drivers/usb/net/catc.c --- a/drivers/usb/net/catc.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/net/catc.c 2004-11-10 17:19:04 -08:00 @@ -773,8 +773,8 @@ catc->usbdev = usbdev; catc->netdev = netdev; - catc->tx_lock = SPIN_LOCK_UNLOCKED; - catc->ctrl_lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&catc->tx_lock); + spin_lock_init(&catc->ctrl_lock); init_timer(&catc->timer); catc->timer.data = (long) catc; diff -Nru a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c --- a/drivers/usb/net/kaweth.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/net/kaweth.c 2004-11-10 17:19:05 -08:00 @@ -246,7 +246,7 @@ struct kaweth_ethernet_configuration configuration; struct net_device_stats stats; -} __attribute__ ((packed)); +}; /**************************************************************** @@ -651,7 +651,7 @@ ****************************************************************/ static int kaweth_open(struct net_device *net) { - struct kaweth_device *kaweth = (struct kaweth_device *)net->priv; + struct kaweth_device *kaweth = netdev_priv(net); int res; kaweth_dbg("Opening network device."); @@ -689,7 +689,7 @@ ****************************************************************/ static int kaweth_close(struct net_device *net) { - struct kaweth_device *kaweth = net->priv; + struct kaweth_device *kaweth = netdev_priv(net); netif_stop_queue(net); @@ -729,7 +729,8 @@ struct sk_buff *skb = kaweth->tx_skb; if (unlikely(urb->status != 0)) - kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status); + if (urb->status != -ENOENT) + kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status); netif_wake_queue(kaweth->net); dev_kfree_skb_irq(skb); @@ -740,7 +741,7 @@ ****************************************************************/ static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net) { - struct kaweth_device *kaweth = net->priv; + struct kaweth_device *kaweth = netdev_priv(net); __le16 *private_header; int res; @@ -811,7 +812,7 @@ ****************************************************************/ static void kaweth_set_rx_mode(struct net_device *net) { - struct kaweth_device *kaweth = net->priv; + struct kaweth_device *kaweth = netdev_priv(net); __u16 packet_filter_bitmap = KAWETH_PACKET_FILTER_DIRECTED | KAWETH_PACKET_FILTER_BROADCAST | @@ -868,7 +869,8 @@ ****************************************************************/ static struct net_device_stats *kaweth_netdev_stats(struct net_device *dev) { - return &((struct kaweth_device *)dev->priv)->stats; + struct kaweth_device *kaweth = netdev_priv(dev); + return &kaweth->stats; } /**************************************************************** @@ -876,7 +878,7 @@ ****************************************************************/ static void kaweth_tx_timeout(struct net_device *net) { - struct kaweth_device *kaweth = net->priv; + struct kaweth_device *kaweth = netdev_priv(net); kaweth_warn("%s: Tx timed out. Resetting.", net->name); kaweth->stats.tx_errors++; @@ -911,12 +913,14 @@ (int)dev->descriptor.bLength, (int)dev->descriptor.bDescriptorType); - if(!(kaweth = kmalloc(sizeof(struct kaweth_device), GFP_KERNEL))) + netdev = alloc_etherdev(sizeof(*kaweth)); + if (!netdev) return -ENOMEM; - memset(kaweth, 0, sizeof(struct kaweth_device)); - + kaweth = netdev_priv(netdev); kaweth->dev = dev; + kaweth->net = netdev; + spin_lock_init(&kaweth->device_lock); init_waitqueue_head(&kaweth->term_wait); @@ -941,9 +945,7 @@ 100, 2)) < 0) { kaweth_err("Error downloading firmware (%d)", result); - free_page((unsigned long)kaweth->firmware_buf); - kfree(kaweth); - return -EIO; + goto err_fw; } if ((result = kaweth_download_firmware(kaweth, @@ -952,9 +954,7 @@ 100, 3)) < 0) { kaweth_err("Error downloading firmware fix (%d)", result); - free_page((unsigned long)kaweth->firmware_buf); - kfree(kaweth); - return -EIO; + goto err_fw; } if ((result = kaweth_download_firmware(kaweth, @@ -963,9 +963,8 @@ 126, 2)) < 0) { kaweth_err("Error downloading trigger code (%d)", result); - free_page((unsigned long)kaweth->firmware_buf); - kfree(kaweth); - return -EIO; + goto err_fw; + } if ((result = kaweth_download_firmware(kaweth, @@ -974,23 +973,20 @@ 126, 3)) < 0) { kaweth_err("Error downloading trigger code fix (%d)", result); - free_page((unsigned long)kaweth->firmware_buf); - kfree(kaweth); - return -EIO; + goto err_fw; } if ((result = kaweth_trigger_firmware(kaweth, 126)) < 0) { kaweth_err("Error triggering firmware (%d)", result); - free_page((unsigned long)kaweth->firmware_buf); - kfree(kaweth); - return -EIO; + goto err_fw; } /* Device will now disappear for a moment... */ kaweth_info("Firmware loaded. I'll be back..."); +err_fw: free_page((unsigned long)kaweth->firmware_buf); - kfree(kaweth); + free_netdev(netdev); return -EIO; } @@ -998,8 +994,7 @@ if(result < 0) { kaweth_err("Error reading configuration (%d), no net device created", result); - kfree(kaweth); - return -EIO; + goto err_free_netdev; } kaweth_info("Statistics collection: %x", kaweth->configuration.statistics_mask); @@ -1017,18 +1012,17 @@ &bcast_addr, sizeof(bcast_addr))) { kaweth_err("Firmware not functioning properly, no net device created"); - kfree(kaweth); - return -EIO; + goto err_free_netdev; } if(kaweth_set_urb_size(kaweth, KAWETH_BUF_SIZE) < 0) { kaweth_dbg("Error setting URB size"); - goto err_no_netdev; + goto err_free_netdev; } if(kaweth_set_sofs_wait(kaweth, KAWETH_SOFS_TO_WAIT) < 0) { kaweth_err("Error setting SOFS wait"); - goto err_no_netdev; + goto err_free_netdev; } result = kaweth_set_receive_filter(kaweth, @@ -1038,20 +1032,14 @@ if(result < 0) { kaweth_err("Error setting receive filter"); - kfree(kaweth); - return -EIO; + goto err_free_netdev; } kaweth_dbg("Initializing net device."); - if (!(netdev = alloc_etherdev(0))) { - kfree(kaweth); - return -ENOMEM; - } - kaweth->tx_urb = usb_alloc_urb(0, GFP_KERNEL); if (!kaweth->tx_urb) - goto err_no_urb; + goto err_free_netdev; kaweth->rx_urb = usb_alloc_urb(0, GFP_KERNEL); if (!kaweth->rx_urb) goto err_only_tx; @@ -1072,26 +1060,23 @@ if (!kaweth->rx_buf) goto err_all_but_rxbuf; - kaweth->net = netdev; - memcpy(kaweth->net->broadcast, &bcast_addr, sizeof(bcast_addr)); - memcpy(kaweth->net->dev_addr, - &kaweth->configuration.hw_addr, + memcpy(netdev->broadcast, &bcast_addr, sizeof(bcast_addr)); + memcpy(netdev->dev_addr, &kaweth->configuration.hw_addr, sizeof(kaweth->configuration.hw_addr)); - kaweth->net->priv = kaweth; - kaweth->net->open = kaweth_open; - kaweth->net->stop = kaweth_close; - - kaweth->net->watchdog_timeo = KAWETH_TX_TIMEOUT; - kaweth->net->tx_timeout = kaweth_tx_timeout; - - kaweth->net->hard_start_xmit = kaweth_start_xmit; - kaweth->net->set_multicast_list = kaweth_set_rx_mode; - kaweth->net->get_stats = kaweth_netdev_stats; - kaweth->net->mtu = le16_to_cpu(kaweth->configuration.segment_size); - SET_ETHTOOL_OPS(kaweth->net, &ops); + netdev->open = kaweth_open; + netdev->stop = kaweth_close; + + netdev->watchdog_timeo = KAWETH_TX_TIMEOUT; + netdev->tx_timeout = kaweth_tx_timeout; + + netdev->hard_start_xmit = kaweth_start_xmit; + netdev->set_multicast_list = kaweth_set_rx_mode; + netdev->get_stats = kaweth_netdev_stats; + netdev->mtu = le16_to_cpu(kaweth->configuration.segment_size); + SET_ETHTOOL_OPS(netdev, &ops); - memset(&kaweth->stats, 0, sizeof(kaweth->stats)); + /* kaweth is zeroed as part of alloc_netdev */ INIT_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl, (void *)kaweth); @@ -1128,10 +1113,9 @@ usb_free_urb(kaweth->rx_urb); err_only_tx: usb_free_urb(kaweth->tx_urb); -err_no_urb: +err_free_netdev: free_netdev(netdev); -err_no_netdev: - kfree(kaweth); + return -EIO; } @@ -1141,6 +1125,7 @@ static void kaweth_disconnect(struct usb_interface *intf) { struct kaweth_device *kaweth = usb_get_intfdata(intf); + struct net_device *netdev; kaweth_info("Unregistering"); @@ -1149,40 +1134,23 @@ kaweth_warn("unregistering non-existant device"); return; } - + netdev = kaweth->net; kaweth->removed = 1; usb_kill_urb(kaweth->irq_urb); usb_kill_urb(kaweth->rx_urb); + usb_kill_urb(kaweth->tx_urb); - /* we need to wait for the urb to be cancelled, if it is active */ - spin_lock(&kaweth->device_lock); - if (usb_unlink_urb(kaweth->tx_urb) == -EINPROGRESS) { - spin_unlock(&kaweth->device_lock); - wait_event(kaweth->term_wait, kaweth->end); - } else { - spin_unlock(&kaweth->device_lock); - } - - if(kaweth->net) { - if(kaweth->net->flags & IFF_UP) { - kaweth_dbg("Closing net device"); - dev_close(kaweth->net); - } - - kaweth_dbg("Unregistering net device"); - unregister_netdev(kaweth->net); - free_netdev(kaweth->net); - } + kaweth_dbg("Unregistering net device"); + unregister_netdev(netdev); usb_free_urb(kaweth->rx_urb); usb_free_urb(kaweth->tx_urb); usb_free_urb(kaweth->irq_urb); - usb_buffer_free(kaweth->dev, KAWETH_BUF_SIZE, (void *)kaweth->rx_buf, kaweth->rxbufferhandle); usb_buffer_free(kaweth->dev, INTBUFFERSIZE, (void *)kaweth->intbuffer, kaweth->intbufferhandle); - kfree(kaweth); + free_netdev(netdev); } diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c --- a/drivers/usb/net/usbnet.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/net/usbnet.c 2004-11-10 17:19:04 -08:00 @@ -31,6 +31,7 @@ * - GeneSys GL620USB-A * - NetChip 1080 (interoperates with NetChip Win32 drivers) * - Prolific PL-2301/2302 (replaces "plusb" driver) + * - KC Technology KC2190 * * + Smart USB devices can support such links directly, using Internet * standard protocols instead of proprietary host-to-device links. @@ -106,6 +107,7 @@ * 22-aug-2003 AX8817X support (Dave Hollis). * 14-jun-2004 Trivial patch for AX8817X based Buffalo LUA-U2-KTX in Japan * (Neil Bortnak) + * 03-nov-2004 Trivial patch for KC2190 (KC-190) chip. (Jonathan McDowell) * *-------------------------------------------------------------------------*/ @@ -134,7 +136,7 @@ #include #include -#define DRIVER_VERSION "25-Aug-2003" +#define DRIVER_VERSION "03-Nov-2004" /*-------------------------------------------------------------------------*/ @@ -567,7 +569,7 @@ static void ax8817x_set_multicast(struct net_device *net) { - struct usbnet *dev = (struct usbnet *) net->priv; + struct usbnet *dev = netdev_priv(net); struct ax8817x_data *data = (struct ax8817x_data *)&dev->data; u8 rx_ctl = 0x8c; @@ -610,7 +612,7 @@ static int ax8817x_mdio_read(struct net_device *netdev, int phy_id, int loc) { - struct usbnet *dev = netdev->priv; + struct usbnet *dev = netdev_priv(netdev); u16 res; u8 buf[1]; @@ -623,7 +625,7 @@ static void ax8817x_mdio_write(struct net_device *netdev, int phy_id, int loc, int val) { - struct usbnet *dev = netdev->priv; + struct usbnet *dev = netdev_priv(netdev); u16 res = val; u8 buf[1]; @@ -634,7 +636,7 @@ static void ax8817x_get_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo) { - struct usbnet *dev = (struct usbnet *)net->priv; + struct usbnet *dev = netdev_priv(net); u8 opt; if (ax8817x_read_cmd(dev, AX_CMD_READ_MONITOR_MODE, 0, 0, 1, &opt) < 0) { @@ -654,7 +656,7 @@ static int ax8817x_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo) { - struct usbnet *dev = (struct usbnet *)net->priv; + struct usbnet *dev = netdev_priv(net); u8 opt = 0; u8 buf[1]; @@ -675,7 +677,7 @@ static int ax8817x_get_eeprom(struct net_device *net, struct ethtool_eeprom *eeprom, u8 *data) { - struct usbnet *dev = (struct usbnet *)net->priv; + struct usbnet *dev = netdev_priv(net); u16 *ebuf = (u16 *)data; int i; @@ -704,14 +706,14 @@ static int ax8817x_get_settings(struct net_device *net, struct ethtool_cmd *cmd) { - struct usbnet *dev = (struct usbnet *)net->priv; + struct usbnet *dev = netdev_priv(net); return mii_ethtool_gset(&dev->mii,cmd); } static int ax8817x_set_settings(struct net_device *net, struct ethtool_cmd *cmd) { - struct usbnet *dev = (struct usbnet *)net->priv; + struct usbnet *dev = netdev_priv(net); return mii_ethtool_sset(&dev->mii,cmd); } @@ -2159,6 +2161,13 @@ #endif /* CONFIG_USB_PL2301 */ + +#ifdef CONFIG_USB_KC2190 +#define HAVE_HARDWARE +static const struct driver_info kc2190_info = { + .description = "KC Technology KC-190", +}; +#endif /* CONFIG_USB_KC2190 */ #ifdef CONFIG_USB_ARMLINUX @@ -2276,7 +2285,7 @@ static int usbnet_change_mtu (struct net_device *net, int new_mtu) { - struct usbnet *dev = (struct usbnet *) net->priv; + struct usbnet *dev = netdev_priv(net); if (new_mtu <= MIN_PACKET || new_mtu > MAX_PACKET) return -EINVAL; @@ -2302,7 +2311,8 @@ static struct net_device_stats *usbnet_get_stats (struct net_device *net) { - return &((struct usbnet *) net->priv)->stats; + struct usbnet *dev = netdev_priv(net); + return &dev->stats; } /*-------------------------------------------------------------------------*/ @@ -2569,7 +2579,7 @@ static int usbnet_stop (struct net_device *net) { - struct usbnet *dev = (struct usbnet *) net->priv; + struct usbnet *dev = netdev_priv(net); int temp; DECLARE_WAIT_QUEUE_HEAD (unlink_wakeup); DECLARE_WAITQUEUE (wait, current); @@ -2616,7 +2626,7 @@ static int usbnet_open (struct net_device *net) { - struct usbnet *dev = (struct usbnet *) net->priv; + struct usbnet *dev = netdev_priv(net); int retval = 0; struct driver_info *info = dev->driver_info; @@ -2666,7 +2676,7 @@ static void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info) { - struct usbnet *dev = net->priv; + struct usbnet *dev = netdev_priv(net); strncpy (info->driver, driver_name, sizeof info->driver); strncpy (info->version, DRIVER_VERSION, sizeof info->version); @@ -2677,7 +2687,7 @@ static u32 usbnet_get_link (struct net_device *net) { - struct usbnet *dev = net->priv; + struct usbnet *dev = netdev_priv(net); /* If a check_connect is defined, return it's results */ if (dev->driver_info->check_connect) @@ -2689,14 +2699,14 @@ static u32 usbnet_get_msglevel (struct net_device *net) { - struct usbnet *dev = net->priv; + struct usbnet *dev = netdev_priv(net); return dev->msg_level; } static void usbnet_set_msglevel (struct net_device *net, u32 level) { - struct usbnet *dev = net->priv; + struct usbnet *dev = netdev_priv(net); dev->msg_level = level; } @@ -2705,7 +2715,7 @@ { #ifdef NEED_MII { - struct usbnet *dev = (struct usbnet *)net->priv; + struct usbnet *dev = netdev_priv(net); if (dev->mii.mdio_read != NULL && dev->mii.mdio_write != NULL) return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); @@ -2817,7 +2827,7 @@ static void usbnet_tx_timeout (struct net_device *net) { - struct usbnet *dev = (struct usbnet *) net->priv; + struct usbnet *dev = netdev_priv(net); unlink_urbs (dev, &dev->txq); tasklet_schedule (&dev->bh); @@ -2829,7 +2839,7 @@ static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) { - struct usbnet *dev = (struct usbnet *) net->priv; + struct usbnet *dev = netdev_priv(net); int length; int retval = NET_XMIT_SUCCESS; struct urb *urb = NULL; @@ -3014,6 +3024,7 @@ { struct usbnet *dev; struct usb_device *xdev; + struct net_device *net; dev = usb_get_intfdata(intf); usb_set_intfdata(intf, NULL); @@ -3026,7 +3037,8 @@ xdev->bus->bus_name, xdev->devpath, dev->driver_info->description); - unregister_netdev (dev->net); + net = dev->net; + unregister_netdev (net); /* we don't hold rtnl here ... */ flush_scheduled_work (); @@ -3034,8 +3046,7 @@ if (dev->driver_info->unbind) dev->driver_info->unbind (dev, intf); - free_netdev(dev->net); - kfree (dev); + free_netdev(net); usb_put_dev (xdev); } @@ -3069,12 +3080,13 @@ status = -ENOMEM; // set up our own records - if (!(dev = kmalloc (sizeof *dev, GFP_KERNEL))) { + net = alloc_etherdev(sizeof(*dev)); + if (!net) { dbg ("can't kmalloc dev"); goto out; } - memset (dev, 0, sizeof *dev); + dev = netdev_priv(net); dev->udev = xdev; dev->driver_info = info; dev->msg_level = msg_level; @@ -3088,14 +3100,8 @@ dev->delay.data = (unsigned long) dev; init_timer (&dev->delay); - // set up network interface records - net = alloc_etherdev(0); - if (!net) - goto out1; - SET_MODULE_OWNER (net); dev->net = net; - net->priv = dev; strcpy (net->name, "usb%d"); memcpy (net->dev_addr, node_id, sizeof node_id); @@ -3144,8 +3150,8 @@ dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1); - SET_NETDEV_DEV(dev->net, &udev->dev); - status = register_netdev (dev->net); + SET_NETDEV_DEV(net, &udev->dev); + status = register_netdev (net); if (status) goto out3; devinfo (dev, "register usbnet at usb-%s-%s, %s", @@ -3156,16 +3162,15 @@ usb_set_intfdata (udev, dev); // start as if the link is up - netif_device_attach (dev->net); + netif_device_attach (net); return 0; out3: if (info->unbind) info->unbind (dev, udev); - free_netdev(net); out1: - kfree(dev); + free_netdev(net); out: usb_put_dev(xdev); return status; @@ -3253,6 +3258,10 @@ USB_DEVICE (0x6189, 0x182d), .driver_info = (unsigned long) &ax8817x_info, }, { + // corega FEther USB2-TX + USB_DEVICE (0x07aa, 0x0017), + .driver_info = (unsigned long) &ax8817x_info, +}, { // Surecom EP-1427X-2 USB_DEVICE (0x1189, 0x0893), .driver_info = (unsigned long) &ax8817x_info, @@ -3293,6 +3302,13 @@ }, { USB_DEVICE (0x067b, 0x0001), // PL-2302 .driver_info = (unsigned long) &prolific_info, +}, +#endif + +#ifdef CONFIG_USB_KC2190 +{ + USB_DEVICE (0x050f, 0x0190), // KC-190 + .driver_info = (unsigned long) &kc2190_info, }, #endif diff -Nru a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig --- a/drivers/usb/serial/Kconfig 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/serial/Kconfig 2004-11-10 17:19:05 -08:00 @@ -89,6 +89,21 @@ To compile this driver as a module, choose M here: the module will be called digi_acceleport. +config USB_SERIAL_CYPRESS_M8 + tristate "USB Cypress M8 USB Serial Driver" + depends on USB_SERIAL && EXPERIMENTAL + help + Say Y here if you want to use a device that contains the Cypress + USB to Serial microcontroller, such as the DeLorme Earthmate GPS. + + Attempted SMP support... send bug reports! + + Supported microcontrollers in the CY4601 family are: + CY7C63741 CY7C63742 CY7C63743 CY7C64013 + + To compile this driver as a module, choose M here: the + module will be called cypress_m8. + config USB_SERIAL_EMPEG tristate "USB Empeg empeg-car Mark I/II Driver" depends on USB_SERIAL diff -Nru a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile --- a/drivers/usb/serial/Makefile 2004-11-10 17:19:03 -08:00 +++ b/drivers/usb/serial/Makefile 2004-11-10 17:19:03 -08:00 @@ -13,6 +13,7 @@ obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o obj-$(CONFIG_USB_SERIAL_CYBERJACK) += cyberjack.o +obj-$(CONFIG_USB_SERIAL_CYPRESS_M8) += cypress_m8.o obj-$(CONFIG_USB_SERIAL_DIGI_ACCELEPORT) += digi_acceleport.o obj-$(CONFIG_USB_SERIAL_EDGEPORT) += io_edgeport.o obj-$(CONFIG_USB_SERIAL_EDGEPORT_TI) += io_ti.o diff -Nru a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c --- a/drivers/usb/serial/belkin_sa.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/usb/serial/belkin_sa.c 2004-11-10 17:19:05 -08:00 @@ -607,6 +607,7 @@ MODULE_AUTHOR( DRIVER_AUTHOR ); MODULE_DESCRIPTION( DRIVER_DESC ); +MODULE_VERSION( DRIVER_VERSION ); MODULE_LICENSE("GPL"); module_param(debug, bool, S_IRUGO | S_IWUSR); diff -Nru a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c --- a/drivers/usb/serial/cyberjack.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/usb/serial/cyberjack.c 2004-11-10 17:19:06 -08:00 @@ -502,6 +502,7 @@ MODULE_AUTHOR( DRIVER_AUTHOR ); MODULE_DESCRIPTION( DRIVER_DESC ); +MODULE_VERSION( DRIVER_VERSION ); MODULE_LICENSE("GPL"); module_param(debug, bool, S_IRUGO | S_IWUSR); diff -Nru a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/serial/cypress_m8.c 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,1222 @@ +/* + * USB Cypress M8 driver + * + * Copyright (C) 2004 + * Lonnie Mendez (dignome@gmail.com) + * Copyright (C) 2003,2004 + * Neil Whelchel (koyama@firstlight.net) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * See Documentation/usb/usb-serial.txt for more information on using this driver + * + * See http://geocities.com/i0xox0i for information on this driver and the + * earthmate usb device. + * + * + * Lonnie Mendez + * 04-10-2004 + * Driver modified to support dynamic line settings. Various improvments + * and features. + * + * Neil Whelchel + * 10-2003 + * Driver first released. + * + * + * Long Term TODO: + * Improve transfer speeds - both read/write are somewhat slow + * at this point. + */ + +/* Neil Whelchel wrote the cypress m8 implementation */ +/* Thanks to cypress for providing references for the hid reports. */ +/* Thanks to Jiang Zhang for providing links and for general help. */ +/* Code originates and was built up from ftdi_sio, belkin, pl2303 and others. */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_USB_SERIAL_DEBUG + static int debug = 1; +#else + static int debug; +#endif + +static int stats; + +#include "usb-serial.h" +#include "cypress_m8.h" + +/* + * Version Information + */ +#define DRIVER_VERSION "v1.06" +#define DRIVER_AUTHOR "Lonnie Mendez , Neil Whelchel " +#define DRIVER_DESC "Cypress USB to Serial Driver" + +static struct usb_device_id id_table_earthmate [] = { + { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) }, + { } /* Terminating entry */ +}; + +static struct usb_device_id id_table_cyphidcomrs232 [] = { + { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, + { } /* Terminating entry */ +}; + +static struct usb_device_id id_table_combined [] = { + { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) }, + { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, + { } /* Terminating entry */ +}; + +MODULE_DEVICE_TABLE (usb, id_table_combined); + +static struct usb_driver cypress_driver = { + .name = "cypress", + .probe = usb_serial_probe, + .disconnect = usb_serial_disconnect, + .id_table = id_table_combined, +}; + +struct cypress_private { + spinlock_t lock; /* private lock */ + int chiptype; /* identifier of device, for quirks/etc */ + int bytes_in; /* used for statistics */ + int bytes_out; /* used for statistics */ + int cmd_count; /* used for statistics */ + int cmd_ctrl; /* always set this to 1 before issuing a command */ + int termios_initialized; + __u8 line_control; /* holds dtr / rts value */ + __u8 current_status; /* received from last read - info on dsr,cts,cd,ri,etc */ + __u8 current_config; /* stores the current configuration byte */ + __u8 rx_flags; /* throttling - used from whiteheat/ftdi_sio */ + int baud_rate; /* stores current baud rate in integer form */ + int cbr_mask; /* stores current baud rate in masked form */ + int isthrottled; /* if throttled, discard reads */ + wait_queue_head_t delta_msr_wait; /* used for TIOCMIWAIT */ + char prev_status, diff_status; /* used for TIOCMIWAIT */ + /* we pass a pointer to this as the arguement sent to cypress_set_termios old_termios */ + struct termios tmp_termios; /* stores the old termios settings */ + int write_interval; /* interrupt out write interval, as obtained from interrupt_out_urb */ + int writepipe; /* used for clear halt, if necessary */ +}; + +/* function prototypes for the Cypress USB to serial device */ +static int cypress_earthmate_startup (struct usb_serial *serial); +static int cypress_hidcom_startup (struct usb_serial *serial); +static void cypress_shutdown (struct usb_serial *serial); +static int cypress_open (struct usb_serial_port *port, struct file *filp); +static void cypress_close (struct usb_serial_port *port, struct file *filp); +static int cypress_write (struct usb_serial_port *port, const unsigned char *buf, int count); +static int cypress_write_room (struct usb_serial_port *port); +static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg); +static void cypress_set_termios (struct usb_serial_port *port, struct termios * old); +static int cypress_tiocmget (struct usb_serial_port *port, struct file *file); +static int cypress_tiocmset (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear); +static int cypress_chars_in_buffer (struct usb_serial_port *port); +static void cypress_throttle (struct usb_serial_port *port); +static void cypress_unthrottle (struct usb_serial_port *port); +static void cypress_read_int_callback (struct urb *urb, struct pt_regs *regs); +static void cypress_write_int_callback (struct urb *urb, struct pt_regs *regs); +static int mask_to_rate (unsigned mask); +static unsigned rate_to_mask (int rate); + +static struct usb_serial_device_type cypress_earthmate_device = { + .owner = THIS_MODULE, + .name = "DeLorme Earthmate USB", + .short_name = "earthmate", + .id_table = id_table_earthmate, + .num_interrupt_in = 1, + .num_interrupt_out = 1, + .num_bulk_in = NUM_DONT_CARE, + .num_bulk_out = NUM_DONT_CARE, + .num_ports = 1, + .attach = cypress_earthmate_startup, + .shutdown = cypress_shutdown, + .open = cypress_open, + .close = cypress_close, + .write = cypress_write, + .write_room = cypress_write_room, + .ioctl = cypress_ioctl, + .set_termios = cypress_set_termios, + .tiocmget = cypress_tiocmget, + .tiocmset = cypress_tiocmset, + .chars_in_buffer = cypress_chars_in_buffer, + .throttle = cypress_throttle, + .unthrottle = cypress_unthrottle, + .read_int_callback = cypress_read_int_callback, + .write_int_callback = cypress_write_int_callback, +}; + +static struct usb_serial_device_type cypress_hidcom_device = { + .owner = THIS_MODULE, + .name = "HID->COM RS232 Adapter", + .short_name = "cyphidcom", + .id_table = id_table_cyphidcomrs232, + .num_interrupt_in = 1, + .num_interrupt_out = 1, + .num_bulk_in = NUM_DONT_CARE, + .num_bulk_out = NUM_DONT_CARE, + .num_ports = 1, + .attach = cypress_hidcom_startup, + .shutdown = cypress_shutdown, + .open = cypress_open, + .close = cypress_close, + .write = cypress_write, + .write_room = cypress_write_room, + .ioctl = cypress_ioctl, + .set_termios = cypress_set_termios, + .tiocmget = cypress_tiocmget, + .tiocmset = cypress_tiocmset, + .chars_in_buffer = cypress_chars_in_buffer, + .throttle = cypress_throttle, + .unthrottle = cypress_unthrottle, + .read_int_callback = cypress_read_int_callback, + .write_int_callback = cypress_write_int_callback, +}; + + +/***************************************************************************** + * Cypress serial helper functions + *****************************************************************************/ + + +/* This function can either set or retreive the current serial line settings */ +static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_mask, int data_bits, int stop_bits, + int parity_enable, int parity_type, int reset, int cypress_request_type) +{ + int i, n_baud_rate = 0, retval = 0; + struct cypress_private *priv; + __u8 feature_buffer[5]; + __u8 config; + unsigned long flags; + + dbg("%s", __FUNCTION__); + + priv = usb_get_serial_port_data(port); + + switch(cypress_request_type) { + case CYPRESS_SET_CONFIG: + + /* + * The general purpose firmware for the Cypress M8 allows for a maximum speed + * of 57600bps (I have no idea whether DeLorme chose to use the general purpose + * firmware or not), if you need to modify this speed setting for your own + * project please add your own chiptype and modify the code likewise. The + * Cypress HID->COM device will work successfully up to 115200bps. + */ + if (baud_mask != priv->cbr_mask) { + dbg("%s - baud rate is changing", __FUNCTION__); + if ( priv->chiptype == CT_EARTHMATE ) { + /* 300 and 600 baud rates are supported under the generic firmware, + * but are not used with NMEA and SiRF protocols */ + + if ( (baud_mask == B300) || (baud_mask == B600) ) { + err("%s - failed setting baud rate, unsupported speed (default to 4800)", + __FUNCTION__); + n_baud_rate = 4800; + } else if ( (n_baud_rate = mask_to_rate(baud_mask)) == -1) { + err("%s - failed setting baud rate, unsupported speed (default to 4800)", + __FUNCTION__); + n_baud_rate = 4800; + } + } else if (priv->chiptype == CT_CYPHIDCOM) { + if ( (n_baud_rate = mask_to_rate(baud_mask)) == -1) { + err("%s - failed setting baud rate, unsupported speed (default to 4800)", + __FUNCTION__); + n_baud_rate = 4800; + } + } else if (priv->chiptype == CT_GENERIC) { + if ( (n_baud_rate = mask_to_rate(baud_mask)) == -1) { + err("%s - failed setting baud rate, unsupported speed (default to 4800)", + __FUNCTION__); + n_baud_rate = 4800; + } + } else { + info("%s - please define your chiptype, using 4800bps default", __FUNCTION__); + n_baud_rate = 4800; + } + } else { /* baud rate not changing, keep the old */ + n_baud_rate = priv->baud_rate; + } + dbg("%s - baud rate is being sent as %d", __FUNCTION__, n_baud_rate); + + + /* + * This algorithm accredited to Jiang Jay Zhang... thanks for all the help! + */ + for (i = 0; i < 4; ++i) { + feature_buffer[i] = ( n_baud_rate >> (i*8) & 0xFF ); + } + + config = 0; // reset config byte + config |= data_bits; // assign data bits in 2 bit space ( max 3 ) + /* 1 bit gap */ + config |= (stop_bits << 3); // assign stop bits in 1 bit space + config |= (parity_enable << 4); // assign parity flag in 1 bit space + config |= (parity_type << 5); // assign parity type in 1 bit space + /* 1 bit gap */ + config |= (reset << 7); // assign reset at end of byte, 1 bit space + + feature_buffer[4] = config; + + dbg("%s - device is being sent this feature report:", __FUNCTION__); + dbg("%s - %02X - %02X - %02X - %02X - %02X", __FUNCTION__, feature_buffer[0], feature_buffer[1], + feature_buffer[2], feature_buffer[3], feature_buffer[4]); + + retval = usb_control_msg (port->serial->dev, usb_sndctrlpipe(port->serial->dev, 0), + HID_REQ_SET_REPORT, USB_DIR_OUT | USB_RECIP_INTERFACE | USB_TYPE_CLASS, + 0x0300, 0, feature_buffer, 5, 500); + + if (retval != 5) + err("%s - failed sending serial line settings - %d", __FUNCTION__, retval); + else { + spin_lock_irqsave(&priv->lock, flags); + priv->baud_rate = n_baud_rate; + priv->cbr_mask = baud_mask; + priv->current_config = config; + ++priv->cmd_count; + spin_unlock_irqrestore(&priv->lock, flags); + } + break; + case CYPRESS_GET_CONFIG: + dbg("%s - retreiving serial line settings", __FUNCTION__); + /* reset values in feature buffer */ + memset(feature_buffer, 0, 5); + + retval = usb_control_msg (port->serial->dev, usb_rcvctrlpipe(port->serial->dev, 0), + HID_REQ_GET_REPORT, USB_DIR_IN | USB_RECIP_INTERFACE | USB_TYPE_CLASS, + 0x0300, 0, feature_buffer, 5, 500); + if (retval != 5) { + err("%s - failed to retreive serial line settings - %d", __FUNCTION__, retval); + return retval; + } else { + spin_lock_irqsave(&priv->lock, flags); + /* store the config in one byte, and later use bit masks to check values */ + priv->current_config = feature_buffer[4]; + /* reverse the process above to get the baud_mask value */ + n_baud_rate = 0; // reset bits + for (i = 0; i < 4; ++i) { + n_baud_rate |= ( feature_buffer[i] << (i*8) ); + } + + priv->baud_rate = n_baud_rate; + if ( (priv->cbr_mask = rate_to_mask(n_baud_rate)) == 0x40) + dbg("%s - failed setting the baud mask (not defined)", __FUNCTION__); + ++priv->cmd_count; + spin_unlock_irqrestore(&priv->lock, flags); + } + break; + default: + err("%s - unsupported serial control command issued", __FUNCTION__); + } + return retval; +} /* cypress_serial_control */ + + +/* given a baud mask, it will return speed on success */ +static int mask_to_rate (unsigned mask) +{ + int rate; + + switch (mask) { + case B0: rate = 0; break; + case B300: rate = 300; break; + case B600: rate = 600; break; + case B1200: rate = 1200; break; + case B2400: rate = 2400; break; + case B4800: rate = 4800; break; + case B9600: rate = 9600; break; + case B19200: rate = 19200; break; + case B38400: rate = 38400; break; + case B57600: rate = 57600; break; + case B115200: rate = 115200; break; + default: rate = -1; + } + + return rate; +} + + +static unsigned rate_to_mask (int rate) +{ + unsigned mask; + + switch (rate) { + case 0: mask = B0; break; + case 300: mask = B300; break; + case 600: mask = B600; break; + case 1200: mask = B1200; break; + case 2400: mask = B2400; break; + case 4800: mask = B4800; break; + case 9600: mask = B9600; break; + case 19200: mask = B19200; break; + case 38400: mask = B38400; break; + case 57600: mask = B57600; break; + case 115200: mask = B115200; break; + default: mask = 0x40; + } + + return mask; +} +/***************************************************************************** + * Cypress serial driver functions + *****************************************************************************/ + + +static int generic_startup (struct usb_serial *serial) +{ + struct cypress_private *priv; + + dbg("%s - port %d", __FUNCTION__, serial->port[0]->number); + + priv = kmalloc(sizeof (struct cypress_private), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + memset(priv, 0x00, sizeof (struct cypress_private)); + spin_lock_init(&priv->lock); + init_waitqueue_head(&priv->delta_msr_wait); + priv->writepipe = serial->port[0]->interrupt_out_urb->pipe; + + /* free up interrupt_out buffer / urb allocated by usbserial + * for this port as we use our own urbs for writing */ + if (serial->port[0]->interrupt_out_buffer) { + kfree(serial->port[0]->interrupt_out_buffer); + serial->port[0]->interrupt_out_buffer = NULL; + } + if (serial->port[0]->interrupt_out_urb) { + priv->write_interval = serial->port[0]->interrupt_out_urb->interval; + usb_free_urb(serial->port[0]->interrupt_out_urb); + serial->port[0]->interrupt_out_urb = NULL; + } else /* still need a write interval */ + priv->write_interval = 10; + + priv->cmd_ctrl = 0; + priv->line_control = 0; + priv->termios_initialized = 0; + priv->rx_flags = 0; + usb_set_serial_port_data(serial->port[0], priv); + + return (0); +} + + +static int cypress_earthmate_startup (struct usb_serial *serial) +{ + struct cypress_private *priv; + + dbg("%s", __FUNCTION__); + + if (generic_startup(serial)) { + dbg("%s - Failed setting up port %d", __FUNCTION__, serial->port[0]->number); + return 1; + } + + priv = usb_get_serial_port_data(serial->port[0]); + priv->chiptype = CT_EARTHMATE; + + return (0); +} /* cypress_earthmate_startup */ + + +static int cypress_hidcom_startup (struct usb_serial *serial) +{ + struct cypress_private *priv; + + dbg("%s", __FUNCTION__); + + if (generic_startup(serial)) { + dbg("%s - Failed setting up port %d", __FUNCTION__, serial->port[0]->number); + return 1; + } + + priv = usb_get_serial_port_data(serial->port[0]); + priv->chiptype = CT_CYPHIDCOM; + + return (0); +} /* cypress_hidcom_startup */ + + +static void cypress_shutdown (struct usb_serial *serial) +{ + struct cypress_private *priv; + + dbg ("%s - port %d", __FUNCTION__, serial->port[0]->number); + + /* all open ports are closed at this point */ + + priv = usb_get_serial_port_data(serial->port[0]); + + if (priv) { + kfree(priv); + usb_set_serial_port_data(serial->port[0], NULL); + } +} + + +static int cypress_open (struct usb_serial_port *port, struct file *filp) +{ + struct cypress_private *priv = usb_get_serial_port_data(port); + struct usb_serial *serial = port->serial; + unsigned long flags; + int result = 0; + + dbg("%s - port %d", __FUNCTION__, port->number); + + spin_lock_irqsave(&priv->lock, flags); + /* reset read/write statistics */ + priv->bytes_in = 0; + priv->bytes_out = 0; + priv->cmd_count = 0; + + /* turn on dtr / rts since we are not flow controlling by default */ + priv->line_control = CONTROL_DTR | CONTROL_RTS; /* sent in status byte */ + spin_unlock_irqrestore(&priv->lock, flags); + priv->cmd_ctrl = 1; + result = cypress_write(port, NULL, 0); + + port->tty->low_latency = 1; + + /* termios defaults are set by usb_serial_init */ + + cypress_set_termios(port, &priv->tmp_termios); + + if (result) { + dev_err(&port->dev, "%s - failed setting the control lines - error %d\n", __FUNCTION__, result); + return result; + } else + dbg("%s - success setting the control lines", __FUNCTION__); + + /* throttling off */ + spin_lock_irqsave(&priv->lock, flags); + priv->rx_flags = 0; + spin_unlock_irqrestore(&priv->lock, flags); + + /* setup the port and + * start reading from the device */ + if(!port->interrupt_in_urb){ + err("%s - interrupt_in_urb is empty!", __FUNCTION__); + return(-1); + } + + usb_fill_int_urb(port->interrupt_in_urb, serial->dev, + usb_rcvintpipe(serial->dev, port->interrupt_in_endpointAddress), + port->interrupt_in_urb->transfer_buffer, port->interrupt_in_urb->transfer_buffer_length, + cypress_read_int_callback, port, port->interrupt_in_urb->interval); + result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); + + if (result){ + dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result); + } + + return result; +} /* cypress_open */ + + +static void cypress_close(struct usb_serial_port *port, struct file * filp) +{ + struct cypress_private *priv = usb_get_serial_port_data(port); + unsigned int c_cflag; + unsigned long flags; + + dbg("%s - port %d", __FUNCTION__, port->number); + + if (port->tty) { + c_cflag = port->tty->termios->c_cflag; + if (c_cflag & HUPCL) { + /* drop dtr and rts */ + priv = usb_get_serial_port_data(port); + spin_lock_irqsave(&priv->lock, flags); + priv->line_control = 0; + priv->cmd_ctrl = 1; + spin_unlock_irqrestore(&priv->lock, flags); + cypress_write(port, NULL, 0); + } + } + + if (port->interrupt_in_urb) { + dbg("%s - stopping read urb", __FUNCTION__); + usb_kill_urb (port->interrupt_in_urb); + } + + if (stats) + dev_info (&port->dev, "Statistics: %d Bytes In | %d Bytes Out | %d Commands Issued\n", + priv->bytes_in, priv->bytes_out, priv->cmd_count); +} /* cypress_close */ + + +static int cypress_write(struct usb_serial_port *port, const unsigned char *buf, int count) +{ + struct cypress_private *priv = usb_get_serial_port_data(port); + unsigned long flags; + struct urb *urb; + int status, s_pos = 0; + __u8 transfer_size = 0; + __u8 *buffer; + + dbg("%s - port %d", __FUNCTION__, port->number); + + spin_lock_irqsave(&priv->lock, flags); + if (count == 0 && !priv->cmd_ctrl) { + spin_unlock_irqrestore(&priv->lock, flags); + dbg("%s - write request of 0 bytes", __FUNCTION__); + return 0; + } + + if (priv->cmd_ctrl) + ++priv->cmd_count; + priv->cmd_ctrl = 0; + spin_unlock_irqrestore(&priv->lock, flags); + + dbg("%s - interrupt out size is %d", __FUNCTION__, port->interrupt_out_size); + dbg("%s - count is %d", __FUNCTION__, count); + + /* Allocate buffer and urb */ + buffer = kmalloc (port->interrupt_out_size, GFP_ATOMIC); + if (!buffer) { + dev_err(&port->dev, "ran out of memory for buffer\n"); + return -ENOMEM; + } + + urb = usb_alloc_urb (0, GFP_ATOMIC); + if (!urb) { + dev_err(&port->dev, "failed allocating write urb\n"); + kfree (buffer); + return -ENOMEM; + } + + memset(buffer, 0, port->interrupt_out_size); // test if this is needed... probably not since loop removed + + spin_lock_irqsave(&priv->lock, flags); + switch (port->interrupt_out_size) { + case 32: + // this is for the CY7C64013... + transfer_size = min (count, 30); + buffer[0] = priv->line_control; + buffer[1] = transfer_size; + s_pos = 2; + break; + case 8: + // this is for the CY7C63743... + transfer_size = min (count, 7); + buffer[0] = priv->line_control | transfer_size; + s_pos = 1; + break; + default: + dbg("%s - wrong packet size", __FUNCTION__); + spin_unlock_irqrestore(&priv->lock, flags); + kfree (buffer); + usb_free_urb (urb); + return -1; + } + + if (priv->line_control & CONTROL_RESET) + priv->line_control &= ~CONTROL_RESET; + spin_unlock_irqrestore(&priv->lock, flags); + + /* copy data to offset position in urb transfer buffer */ + memcpy (&buffer[s_pos], buf, transfer_size); + + usb_serial_debug_data (debug, &port->dev, __FUNCTION__, port->interrupt_out_size, buffer); + + /* build up the urb */ + usb_fill_int_urb (urb, port->serial->dev, + usb_sndintpipe(port->serial->dev, port->interrupt_out_endpointAddress), + buffer, port->interrupt_out_size, + cypress_write_int_callback, port, priv->write_interval); + + status = usb_submit_urb(urb, GFP_ATOMIC); + + if (status) { + dev_err(&port->dev, "%s - usb_submit_urb (write interrupt) failed with status %d\n", + __FUNCTION__, status); + transfer_size = status; + kfree (buffer); + goto exit; + } + + spin_lock_irqsave(&priv->lock, flags); + priv->bytes_out += transfer_size; + spin_unlock_irqrestore(&priv->lock, flags); + +exit: + /* buffer free'd in callback */ + usb_free_urb (urb); + + return transfer_size; + +} /* cypress_write */ + + +static int cypress_write_room(struct usb_serial_port *port) +{ + dbg("%s - port %d", __FUNCTION__, port->number); + + /* + * We really can take anything the user throw at us + * but let's pick a nice big number to tell the tty + * layer that we have lots of free space + */ + + return 2048; +} + + +static int cypress_tiocmget (struct usb_serial_port *port, struct file *file) +{ + struct cypress_private *priv = usb_get_serial_port_data(port); + __u8 status, control; + unsigned int result = 0; + unsigned long flags; + + dbg("%s - port %d", __FUNCTION__, port->number); + + spin_lock_irqsave(&priv->lock, flags); + control = priv->line_control; + status = priv->current_status; + spin_unlock_irqrestore(&priv->lock, flags); + + result = ((control & CONTROL_DTR) ? TIOCM_DTR : 0) + | ((control & CONTROL_RTS) ? TIOCM_RTS : 0) + | ((status & UART_CTS) ? TIOCM_CTS : 0) + | ((status & UART_DSR) ? TIOCM_DSR : 0) + | ((status & UART_RI) ? TIOCM_RI : 0) + | ((status & UART_CD) ? TIOCM_CD : 0); + + dbg("%s - result = %x", __FUNCTION__, result); + + return result; +} + + +static int cypress_tiocmset (struct usb_serial_port *port, struct file *file, + unsigned int set, unsigned int clear) +{ + struct cypress_private *priv = usb_get_serial_port_data(port); + unsigned long flags; + + dbg("%s - port %d", __FUNCTION__, port->number); + + spin_lock_irqsave(&priv->lock, flags); + if (set & TIOCM_RTS) + priv->line_control |= CONTROL_RTS; + if (set & TIOCM_DTR) + priv->line_control |= CONTROL_DTR; + if (clear & TIOCM_RTS) + priv->line_control &= ~CONTROL_RTS; + if (clear & TIOCM_DTR) + priv->line_control &= ~CONTROL_DTR; + spin_unlock_irqrestore(&priv->lock, flags); + + priv->cmd_ctrl = 1; + return cypress_write(port, NULL, 0); +} + + +static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg) +{ + struct cypress_private *priv = usb_get_serial_port_data(port); + + dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); + + switch (cmd) { + case TIOCGSERIAL: + if (copy_to_user((void __user *)arg, port->tty->termios, sizeof(struct termios))) { + return -EFAULT; + } + return (0); + break; + case TIOCSSERIAL: + if (copy_from_user(port->tty->termios, (void __user *)arg, sizeof(struct termios))) { + return -EFAULT; + } + /* here we need to call cypress_set_termios to invoke the new settings */ + cypress_set_termios(port, &priv->tmp_termios); + return (0); + break; + /* these are called when setting baud rate from gpsd */ + case TCGETS: + if (copy_to_user((void __user *)arg, port->tty->termios, sizeof(struct termios))) { + return -EFAULT; + } + return (0); + break; + case TCSETS: + if (copy_from_user(port->tty->termios, (void __user *)arg, sizeof(struct termios))) { + return -EFAULT; + } + /* here we need to call cypress_set_termios to invoke the new settings */ + cypress_set_termios(port, &priv->tmp_termios); + return (0); + break; + /* This code comes from drivers/char/serial.c and ftdi_sio.c */ + case TIOCMIWAIT: + while (priv != NULL) { + interruptible_sleep_on(&priv->delta_msr_wait); + /* see if a signal did it */ + if (signal_pending(current)) + return -ERESTARTSYS; + else { + char diff = priv->diff_status; + + if (diff == 0) { + return -EIO; /* no change => error */ + } + + /* consume all events */ + priv->diff_status = 0; + + /* return 0 if caller wanted to know about these bits */ + if ( ((arg & TIOCM_RNG) && (diff & UART_RI)) || + ((arg & TIOCM_DSR) && (diff & UART_DSR)) || + ((arg & TIOCM_CD) && (diff & UART_CD)) || + ((arg & TIOCM_CTS) && (diff & UART_CTS)) ) { + return 0; + } + /* otherwise caller can't care less about what happened, + * and so we continue to wait for more events. + */ + } + } + return 0; + break; + default: + break; + } + + dbg("%s - arg not supported - it was 0x%04x - check include/asm/ioctls.h", __FUNCTION__, cmd); + + return -ENOIOCTLCMD; +} /* cypress_ioctl */ + + +static void cypress_set_termios (struct usb_serial_port *port, struct termios *old_termios) +{ + struct cypress_private *priv = usb_get_serial_port_data(port); + struct tty_struct *tty; + int data_bits, stop_bits, parity_type, parity_enable; + unsigned cflag, iflag, baud_mask; + unsigned long flags; + + dbg("%s - port %d", __FUNCTION__, port->number); + + tty = port->tty; + if ((!tty) || (!tty->termios)) { + dbg("%s - no tty structures", __FUNCTION__); + return; + } + + spin_lock_irqsave(&priv->lock, flags); + if (!priv->termios_initialized) { + if (priv->chiptype == CT_EARTHMATE) { + *(tty->termios) = tty_std_termios; + tty->termios->c_cflag = B4800 | CS8 | CREAD | HUPCL | CLOCAL; + } else if (priv->chiptype == CT_CYPHIDCOM) { + *(tty->termios) = tty_std_termios; + tty->termios->c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; + } + priv->termios_initialized = 1; + } + spin_unlock_irqrestore(&priv->lock, flags); + + cflag = tty->termios->c_cflag; + iflag = tty->termios->c_iflag; + + /* check if there are new settings */ + if (old_termios) { + if ((cflag != old_termios->c_cflag) || + (RELEVANT_IFLAG(iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) { + dbg("%s - attempting to set new termios settings", __FUNCTION__); + /* should make a copy of this in case something goes wrong in the function, we can restore it */ + spin_lock_irqsave(&priv->lock, flags); + priv->tmp_termios = *(tty->termios); + spin_unlock_irqrestore(&priv->lock, flags); + } else { + dbg("%s - nothing to do, exiting", __FUNCTION__); + return; + } + } else + return; + + /* set number of data bits, parity, stop bits */ + /* when parity is disabled the parity type bit is ignored */ + + stop_bits = cflag & CSTOPB ? 1 : 0; /* 1 means 2 stop bits, 0 means 1 stop bit */ + + if (cflag & PARENB) { + parity_enable = 1; + parity_type = cflag & PARODD ? 1 : 0; /* 1 means odd parity, 0 means even parity */ + } else + parity_enable = parity_type = 0; + + if (cflag & CSIZE) { + switch (cflag & CSIZE) { + case CS5: data_bits = 0; break; + case CS6: data_bits = 1; break; + case CS7: data_bits = 2; break; + case CS8: data_bits = 3; break; + default: err("%s - CSIZE was set, but not CS5-CS8", __FUNCTION__); data_bits = 3; + } + } else + data_bits = 3; + + spin_lock_irqsave(&priv->lock, flags); + if ((cflag & CBAUD) == B0) { + /* drop dtr and rts */ + dbg("%s - dropping the lines, baud rate 0bps", __FUNCTION__); + baud_mask = B0; + priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS); + } else { + baud_mask = (cflag & CBAUD); + switch(baud_mask) { + case B300: dbg("%s - setting baud 300bps", __FUNCTION__); break; + case B600: dbg("%s - setting baud 600bps", __FUNCTION__); break; + case B1200: dbg("%s - setting baud 1200bps", __FUNCTION__); break; + case B2400: dbg("%s - setting baud 2400bps", __FUNCTION__); break; + case B4800: dbg("%s - setting baud 4800bps", __FUNCTION__); break; + case B9600: dbg("%s - setting baud 9600bps", __FUNCTION__); break; + case B19200: dbg("%s - setting baud 19200bps", __FUNCTION__); break; + case B38400: dbg("%s - setting baud 38400bps", __FUNCTION__); break; + case B57600: dbg("%s - setting baud 57600bps", __FUNCTION__); break; + case B115200: dbg("%s - setting baud 115200bps", __FUNCTION__); break; + default: dbg("%s - unknown masked baud rate", __FUNCTION__); + } + priv->line_control |= CONTROL_DTR; + + /* this is probably not what I think it is... check into it */ + if (cflag & CRTSCTS) + priv->line_control |= CONTROL_RTS; + else + priv->line_control &= ~CONTROL_RTS; + } + spin_unlock_irqrestore(&priv->lock, flags); + + dbg("%s - sending %d stop_bits, %d parity_enable, %d parity_type, %d data_bits (+5)", __FUNCTION__, + stop_bits, parity_enable, parity_type, data_bits); + + cypress_serial_control(port, baud_mask, data_bits, stop_bits, parity_enable, + parity_type, 0, CYPRESS_SET_CONFIG); + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(50*HZ/1000); /* give some time between change and read (50ms) */ + + /* we perform a CYPRESS_GET_CONFIG so that the current settings are filled into the private structure + * this should confirm that all is working if it returns what we just set */ + cypress_serial_control(port, 0, 0, 0, 0, 0, 0, CYPRESS_GET_CONFIG); + + /* Here we can define custom tty settings for devices + * + * the main tty base comes from empeg.c + */ + + spin_lock_irqsave(&priv->lock, flags); + if ( (priv->chiptype == CT_EARTHMATE) && (priv->baud_rate == 4800) ) { + + dbg("Using custom termios settings for a baud rate of 4800bps."); + /* define custom termios settings for NMEA protocol */ + + + tty->termios->c_iflag /* input modes - */ + &= ~(IGNBRK /* disable ignore break */ + | BRKINT /* disable break causes interrupt */ + | PARMRK /* disable mark parity errors */ + | ISTRIP /* disable clear high bit of input characters */ + | INLCR /* disable translate NL to CR */ + | IGNCR /* disable ignore CR */ + | ICRNL /* disable translate CR to NL */ + | IXON); /* disable enable XON/XOFF flow control */ + + tty->termios->c_oflag /* output modes */ + &= ~OPOST; /* disable postprocess output characters */ + + tty->termios->c_lflag /* line discipline modes */ + &= ~(ECHO /* disable echo input characters */ + | ECHONL /* disable echo new line */ + | ICANON /* disable erase, kill, werase, and rprnt special characters */ + | ISIG /* disable interrupt, quit, and suspend special characters */ + | IEXTEN); /* disable non-POSIX special characters */ + + } else if (priv->chiptype == CT_CYPHIDCOM) { + + // Software app handling it for device... + + } else { + + /* do something here */ + + } + spin_unlock_irqrestore(&priv->lock, flags); + + /* set lines */ + priv->cmd_ctrl = 1; + cypress_write(port, NULL, 0); + + return; +} /* cypress_set_termios */ + + +static int cypress_chars_in_buffer(struct usb_serial_port *port) +{ + dbg("%s - port %d", __FUNCTION__, port->number); + + /* + * We can't really account for how much data we + * have sent out, but hasn't made it through to the + * device, so just tell the tty layer that everything + * is flushed. + */ + + return 0; +} + + +static void cypress_throttle (struct usb_serial_port *port) +{ + struct cypress_private *priv = usb_get_serial_port_data(port); + unsigned long flags; + + dbg("%s - port %d", __FUNCTION__, port->number); + + spin_lock_irqsave(&priv->lock, flags); + priv->rx_flags = THROTTLED; + spin_unlock_irqrestore(&priv->lock, flags); +} + + +static void cypress_unthrottle (struct usb_serial_port *port) +{ + struct cypress_private *priv = usb_get_serial_port_data(port); + int actually_throttled, result; + unsigned long flags; + + dbg("%s - port %d", __FUNCTION__, port->number); + + spin_lock_irqsave(&priv->lock, flags); + actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; + priv->rx_flags = 0; + spin_unlock_irqrestore(&priv->lock, flags); + + if (actually_throttled) { + port->interrupt_in_urb->dev = port->serial->dev; + + result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); + if (result) + dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result); + } +} + + +static void cypress_read_int_callback(struct urb *urb, struct pt_regs *regs) +{ + struct usb_serial_port *port = (struct usb_serial_port *)urb->context; + struct cypress_private *priv = usb_get_serial_port_data(port); + struct tty_struct *tty; + unsigned char *data = urb->transfer_buffer; + unsigned long flags; + char tty_flag = TTY_NORMAL; + int bytes=0; + int result; + int i=0; + + dbg("%s - port %d", __FUNCTION__, port->number); + + if (urb->status) { + dbg("%s - nonzero read status received: %d", __FUNCTION__, urb->status); + return; + } + + spin_lock_irqsave(&priv->lock, flags); + if (priv->rx_flags & THROTTLED) { + priv->rx_flags |= ACTUALLY_THROTTLED; + spin_unlock_irqrestore(&priv->lock, flags); + return; + } + spin_unlock_irqrestore(&priv->lock, flags); + + tty = port->tty; + if (!tty) { + dbg("%s - bad tty pointer - exiting", __FUNCTION__); + return; + } + + usb_serial_debug_data (debug, &port->dev, __FUNCTION__, urb->actual_length, data); + + spin_lock_irqsave(&priv->lock, flags); + switch(urb->actual_length) { + case 32: + // This is for the CY7C64013... + priv->current_status = data[0] & 0xF8; + bytes = data[1]+2; + i=2; + break; + case 8: + // This is for the CY7C63743... + priv->current_status = data[0] & 0xF8; + bytes = (data[0] & 0x07)+1; + i=1; + break; + default: + dbg("%s - wrong packet size - received %d bytes", __FUNCTION__, urb->actual_length); + spin_unlock_irqrestore(&priv->lock, flags); + goto continue_read; + } + spin_unlock_irqrestore(&priv->lock, flags); + + spin_lock_irqsave(&priv->lock, flags); + /* check to see if status has changed */ + if (priv != NULL) { + if (priv->current_status != priv->prev_status) { + priv->diff_status |= priv->current_status ^ priv->prev_status; + wake_up_interruptible(&priv->delta_msr_wait); + priv->prev_status = priv->current_status; + } + } + spin_unlock_irqrestore(&priv->lock, flags); + + /* hangup, as defined in acm.c... this might be a bad place for it though */ + if (tty && !(tty->termios->c_cflag & CLOCAL) && !(priv->current_status & UART_CD)) { + dbg("%s - calling hangup", __FUNCTION__); + tty_hangup(tty); + goto continue_read; + } + + /* There is one error bit... I'm assuming it is a parity error indicator + * as the generic firmware will set this bit to 1 if a parity error occurs. + * I can not find reference to any other error events. + * + */ + spin_lock_irqsave(&priv->lock, flags); + if (priv->current_status & CYP_ERROR) { + spin_unlock_irqrestore(&priv->lock, flags); + tty_flag = TTY_PARITY; + dbg("%s - Parity Error detected", __FUNCTION__); + } else + spin_unlock_irqrestore(&priv->lock, flags); + + /* process read if there is data other than line status */ + if (tty && (bytes > i)) { + for (; i < bytes ; ++i) { + dbg("pushing byte number %d - %d",i,data[i]); + if(tty->flip.count >= TTY_FLIPBUF_SIZE) { + tty_flip_buffer_push(tty); + } + tty_insert_flip_char(tty, data[i], tty_flag); + } + tty_flip_buffer_push(port->tty); + } + + spin_lock_irqsave(&priv->lock, flags); + priv->bytes_in += bytes; /* control and status byte(s) are also counted */ + spin_unlock_irqrestore(&priv->lock, flags); + +continue_read: + + /* Continue trying to always read... unless the port has closed. */ + + if (port->open_count > 0) { + usb_fill_int_urb(port->interrupt_in_urb, port->serial->dev, + usb_rcvintpipe(port->serial->dev, port->interrupt_in_endpointAddress), + port->interrupt_in_urb->transfer_buffer, + port->interrupt_in_urb->transfer_buffer_length, + cypress_read_int_callback, port, + port->interrupt_in_urb->interval); + result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); + if (result) + dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); + } + + return; +} /* cypress_read_int_callback */ + + +static void cypress_write_int_callback(struct urb *urb, struct pt_regs *regs) +{ + struct usb_serial_port *port = (struct usb_serial_port *)urb->context; + + /* free up the transfer buffer, as usb_free_urb() does not do this */ + kfree (urb->transfer_buffer); + + dbg("%s - port %d", __FUNCTION__, port->number); + + if (urb->status) { + dbg("%s - nonzero write status received: %d", __FUNCTION__, urb->status); + return; + } + + schedule_work(&port->work); +} + + +/***************************************************************************** + * Module functions + *****************************************************************************/ + +static int __init cypress_init(void) +{ + int retval; + + dbg("%s", __FUNCTION__); + + retval = usb_serial_register(&cypress_earthmate_device); + if (retval) + goto failed_em_register; + retval = usb_serial_register(&cypress_hidcom_device); + if (retval) + goto failed_hidcom_register; + retval = usb_register(&cypress_driver); + if (retval) + goto failed_usb_register; + + info(DRIVER_DESC " " DRIVER_VERSION); + return 0; +failed_usb_register: + usb_deregister(&cypress_driver); +failed_hidcom_register: + usb_serial_deregister(&cypress_hidcom_device); +failed_em_register: + usb_serial_deregister(&cypress_earthmate_device); + + return retval; +} + + +static void __exit cypress_exit (void) +{ + dbg("%s", __FUNCTION__); + + usb_deregister (&cypress_driver); + usb_serial_deregister (&cypress_earthmate_device); + usb_serial_deregister (&cypress_hidcom_device); +} + + +module_init(cypress_init); +module_exit(cypress_exit); + +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); +MODULE_LICENSE("GPL"); + +module_param(debug, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(debug, "Debug enabled or not"); +module_param(stats, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(stats, "Enable statistics or not"); diff -Nru a/drivers/usb/serial/cypress_m8.h b/drivers/usb/serial/cypress_m8.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/serial/cypress_m8.h 2004-11-10 17:19:07 -08:00 @@ -0,0 +1,55 @@ +#ifndef CYPRESS_M8_H +#define CYPRESS_M8_H + +/* definitions and function prototypes used for the cypress USB to Serial controller */ + +/* For sending our feature buffer - controlling serial communication states */ +/* Linux HID has no support for serial devices so we do this through the driver */ +#define HID_REQ_GET_REPORT 0x01 +#define HID_REQ_SET_REPORT 0x09 + +/* List other cypress USB to Serial devices here, and add them to the id_table */ + +/* DeLorme Earthmate USB - a GPS device */ +#define VENDOR_ID_DELORME 0x1163 +#define PRODUCT_ID_EARTHMATEUSB 0x0100 + +/* Cypress HID->COM RS232 Adapter */ +#define VENDOR_ID_CYPRESS 0x04b4 +#define PRODUCT_ID_CYPHIDCOM 0x5500 +/* End of device listing */ + +/* Used for setting / requesting serial line settings */ +#define CYPRESS_SET_CONFIG 0x01 +#define CYPRESS_GET_CONFIG 0x02 + +/* Used for throttle control */ +#define THROTTLED 0x1 +#define ACTUALLY_THROTTLED 0x2 + +/* chiptypes - used in case firmware differs from the generic form ... offering + * different baud speeds/etc. + */ + +#define CT_EARTHMATE 0x01 +#define CT_CYPHIDCOM 0x02 +#define CT_GENERIC 0x0F +/* End of chiptype definitions */ + +/* RS-232 serial data communication protocol definitions */ +/* these are sent / read at byte 0 of the input/output hid reports */ +/* You can find these values defined in the CY4601 USB to Serial design notes */ + +#define CONTROL_DTR 0x20 /* data terminal ready - flow control - host to device */ +#define UART_DSR 0x20 /* data set ready - flow control - device to host */ +#define CONTROL_RTS 0x10 /* request to send - flow control - host to device */ +#define UART_CTS 0x10 /* clear to send - flow control - device to host */ +#define UART_RI 0x10 /* ring indicator - modem - device to host */ +#define UART_CD 0x40 /* carrier detect - modem - device to host */ +#define CYP_ERROR 0x08 /* received from input report - device to host */ +/* Note - the below has nothing to to with the "feature report" reset */ +#define CONTROL_RESET 0x08 /* sent with output report - host to device */ + +/* End of RS-232 protocol definitions */ + +#endif /* CYPRESS_M8_H */ diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c --- a/drivers/usb/serial/pl2303.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/serial/pl2303.c 2004-11-10 17:19:04 -08:00 @@ -77,6 +77,7 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) }, + { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, { USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) }, @@ -90,6 +91,7 @@ { USB_DEVICE(SITECOM_VENDOR_ID, SITECOM_PRODUCT_ID) }, { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_ID) }, { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_ID) }, + { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X65) }, { } /* Terminating entry */ }; @@ -1188,6 +1190,7 @@ module_exit(pl2303_exit); MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_VERSION(DRIVER_VERSION); MODULE_LICENSE("GPL"); module_param(debug, bool, S_IRUGO | S_IWUSR); diff -Nru a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h --- a/drivers/usb/serial/pl2303.h 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/serial/pl2303.h 2004-11-10 17:19:04 -08:00 @@ -9,7 +9,8 @@ */ #define PL2303_VENDOR_ID 0x067b #define PL2303_PRODUCT_ID 0x2303 -#define PL2303_PRODUCT_ID_RSAQ2 0x04bb +#define PL2303_PRODUCT_ID_RSAQ2 0x04bb +#define PL2303_PRODUCT_ID_PHAROS 0xaaa0 #define ATEN_VENDOR_ID 0x0557 #define ATEN_VENDOR_ID2 0x0547 @@ -47,6 +48,8 @@ #define ALCATEL_PRODUCT_ID 0x02df /* Samsung I330 phone cradle */ -#define SAMSUNG_VENDOR_ID 0x04e8 -#define SAMSUNG_PRODUCT_ID 0x8001 +#define SAMSUNG_VENDOR_ID 0x04e8 +#define SAMSUNG_PRODUCT_ID 0x8001 +#define SIEMENS_VENDOR_ID 0x11f5 +#define SIEMENS_PRODUCT_ID_X65 0x0003 diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c --- a/drivers/usb/serial/usb-serial.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/usb/serial/usb-serial.c 2004-11-10 17:19:07 -08:00 @@ -452,18 +452,14 @@ port = serial->port[i]; if (!port) continue; - if (port->read_urb) { - usb_kill_urb(port->read_urb); - usb_free_urb(port->read_urb); - } - if (port->write_urb) { - usb_kill_urb(port->write_urb); - usb_free_urb(port->write_urb); - } - if (port->interrupt_in_urb) { - usb_kill_urb(port->interrupt_in_urb); - usb_free_urb(port->interrupt_in_urb); - } + usb_kill_urb(port->read_urb); + usb_free_urb(port->read_urb); + usb_kill_urb(port->write_urb); + usb_free_urb(port->write_urb); + usb_kill_urb(port->interrupt_in_urb); + usb_free_urb(port->interrupt_in_urb); + usb_kill_urb(port->interrupt_out_urb); + usb_free_urb(port->interrupt_out_urb); kfree(port->bulk_in_buffer); kfree(port->bulk_out_buffer); kfree(port->interrupt_in_buffer); @@ -484,7 +480,7 @@ struct usb_serial *serial; struct usb_serial_port *port; unsigned int portNumber; - int retval = 0; + int retval = -ENODEV; dbg("%s", __FUNCTION__); @@ -493,10 +489,8 @@ /* get the serial object associated with this tty pointer */ serial = usb_serial_get_by_index(tty->index); - if (!serial) { - retval = -ENODEV; + if (!serial) goto bailout; - } /* set up our port structure making the tty driver remember our port object, and us it */ portNumber = tty->index - serial->minor; @@ -508,10 +502,11 @@ /* lock this module before we call it, this may, which means we must bail out, safe because we are called with BKL held */ if (!try_module_get(serial->type->owner)) { - retval = -ENODEV; + kref_put(&serial->kref, destroy_serial); goto bailout; } + retval = 0; ++port->open_count; if (port->open_count == 1) { /* only call the device specific open if this @@ -799,18 +794,14 @@ struct usb_serial_port *port = to_usb_serial_port(dev); dbg ("%s - %s", __FUNCTION__, dev->bus_id); - if (port->read_urb) { - usb_kill_urb(port->read_urb); - usb_free_urb(port->read_urb); - } - if (port->write_urb) { - usb_kill_urb(port->write_urb); - usb_free_urb(port->write_urb); - } - if (port->interrupt_in_urb) { - usb_kill_urb(port->interrupt_in_urb); - usb_free_urb(port->interrupt_in_urb); - } + usb_kill_urb(port->read_urb); + usb_free_urb(port->read_urb); + usb_kill_urb(port->write_urb); + usb_free_urb(port->write_urb); + usb_kill_urb(port->interrupt_in_urb); + usb_free_urb(port->interrupt_in_urb); + usb_kill_urb(port->interrupt_out_urb); + usb_free_urb(port->interrupt_out_urb); kfree(port->bulk_in_buffer); kfree(port->bulk_out_buffer); kfree(port->interrupt_in_buffer); @@ -867,6 +858,7 @@ struct usb_host_interface *iface_desc; struct usb_endpoint_descriptor *endpoint; struct usb_endpoint_descriptor *interrupt_in_endpoint[MAX_NUM_PORTS]; + struct usb_endpoint_descriptor *interrupt_out_endpoint[MAX_NUM_PORTS]; struct usb_endpoint_descriptor *bulk_in_endpoint[MAX_NUM_PORTS]; struct usb_endpoint_descriptor *bulk_out_endpoint[MAX_NUM_PORTS]; struct usb_serial_device_type *type = NULL; @@ -875,6 +867,7 @@ int buffer_size; int i; int num_interrupt_in = 0; + int num_interrupt_out = 0; int num_bulk_in = 0; int num_bulk_out = 0; int num_ports = 0; @@ -922,7 +915,7 @@ if ((endpoint->bEndpointAddress & 0x80) && ((endpoint->bmAttributes & 3) == 0x02)) { /* we found a bulk in endpoint */ - dbg("found bulk in"); + dbg("found bulk in on endpoint %d", i); bulk_in_endpoint[num_bulk_in] = endpoint; ++num_bulk_in; } @@ -930,7 +923,7 @@ if (((endpoint->bEndpointAddress & 0x80) == 0x00) && ((endpoint->bmAttributes & 3) == 0x02)) { /* we found a bulk out endpoint */ - dbg("found bulk out"); + dbg("found bulk out on endpoint %d", i); bulk_out_endpoint[num_bulk_out] = endpoint; ++num_bulk_out; } @@ -938,10 +931,18 @@ if ((endpoint->bEndpointAddress & 0x80) && ((endpoint->bmAttributes & 3) == 0x03)) { /* we found a interrupt in endpoint */ - dbg("found interrupt in"); + dbg("found interrupt in on endpoint %d", i); interrupt_in_endpoint[num_interrupt_in] = endpoint; ++num_interrupt_in; } + + if (((endpoint->bEndpointAddress & 0x80) == 0x00) && + ((endpoint->bmAttributes & 3) == 0x03)) { + /* we found an interrupt out endpoint */ + dbg("found interrupt out on endpoint %d", i); + interrupt_out_endpoint[num_interrupt_out] = endpoint; + ++num_interrupt_out; + } } #if defined(CONFIG_USB_SERIAL_PL2303) || defined(CONFIG_USB_SERIAL_PL2303_MODULE) @@ -1018,11 +1019,13 @@ serial->num_bulk_in = num_bulk_in; serial->num_bulk_out = num_bulk_out; serial->num_interrupt_in = num_interrupt_in; + serial->num_interrupt_out = num_interrupt_out; /* create our ports, we need as many as the max endpoints */ /* we don't use num_ports here cauz some devices have more endpoint pairs than ports */ max_endpoints = max(num_bulk_in, num_bulk_out); max_endpoints = max(max_endpoints, num_interrupt_in); + max_endpoints = max(max_endpoints, num_interrupt_out); max_endpoints = max(max_endpoints, (int)serial->num_ports); serial->num_port_pointers = max_endpoints; dbg("%s - setting up %d port structures for this device", __FUNCTION__, max_endpoints); @@ -1086,29 +1089,61 @@ port); } - for (i = 0; i < num_interrupt_in; ++i) { - endpoint = interrupt_in_endpoint[i]; - port = serial->port[i]; - port->interrupt_in_urb = usb_alloc_urb(0, GFP_KERNEL); - if (!port->interrupt_in_urb) { - dev_err(&interface->dev, "No free urbs available\n"); - goto probe_error; + if (serial->type->read_int_callback) { + for (i = 0; i < num_interrupt_in; ++i) { + endpoint = interrupt_in_endpoint[i]; + port = serial->port[i]; + port->interrupt_in_urb = usb_alloc_urb(0, GFP_KERNEL); + if (!port->interrupt_in_urb) { + dev_err(&interface->dev, "No free urbs available\n"); + goto probe_error; + } + buffer_size = endpoint->wMaxPacketSize; + port->interrupt_in_endpointAddress = endpoint->bEndpointAddress; + port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL); + if (!port->interrupt_in_buffer) { + dev_err(&interface->dev, "Couldn't allocate interrupt_in_buffer\n"); + goto probe_error; + } + usb_fill_int_urb (port->interrupt_in_urb, dev, + usb_rcvintpipe (dev, + endpoint->bEndpointAddress), + port->interrupt_in_buffer, buffer_size, + serial->type->read_int_callback, port, + endpoint->bInterval); } - buffer_size = endpoint->wMaxPacketSize; - port->interrupt_in_endpointAddress = endpoint->bEndpointAddress; - port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL); - if (!port->interrupt_in_buffer) { - dev_err(&interface->dev, "Couldn't allocate interrupt_in_buffer\n"); - goto probe_error; + } else if (num_interrupt_in) { + dbg("the device claims to support interrupt in transfers, but read_int_callback is not defined"); + } + + if (serial->type->write_int_callback) { + for (i = 0; i < num_interrupt_out; ++i) { + endpoint = interrupt_out_endpoint[i]; + port = serial->port[i]; + port->interrupt_out_urb = usb_alloc_urb(0, GFP_KERNEL); + if (!port->interrupt_out_urb) { + dev_err(&interface->dev, "No free urbs available\n"); + goto probe_error; + } + buffer_size = endpoint->wMaxPacketSize; + port->interrupt_out_size = buffer_size; + port->interrupt_out_endpointAddress = endpoint->bEndpointAddress; + port->interrupt_out_buffer = kmalloc (buffer_size, GFP_KERNEL); + if (!port->interrupt_out_buffer) { + dev_err(&interface->dev, "Couldn't allocate interrupt_out_buffer\n"); + goto probe_error; + } + usb_fill_int_urb (port->interrupt_out_urb, dev, + usb_sndintpipe (dev, + endpoint->bEndpointAddress), + port->interrupt_out_buffer, buffer_size, + serial->type->write_int_callback, port, + endpoint->bInterval); } - usb_fill_int_urb (port->interrupt_in_urb, dev, - usb_rcvintpipe (dev, - endpoint->bEndpointAddress), - port->interrupt_in_buffer, buffer_size, - serial->type->read_int_callback, port, - endpoint->bInterval); + } else if (num_interrupt_out) { + dbg("the device claims to support interrupt out transfers, but write_int_callback is not defined"); } - + /* if this device type has an attach function, call it */ if (type->attach) { if (!try_module_get(type->owner)) { @@ -1170,6 +1205,14 @@ if (port->interrupt_in_urb) usb_free_urb (port->interrupt_in_urb); kfree(port->interrupt_in_buffer); + } + for (i = 0; i < num_interrupt_out; ++i) { + port = serial->port[i]; + if (!port) + continue; + if (port->interrupt_out_urb) + usb_free_urb (port->interrupt_out_urb); + kfree(port->interrupt_out_buffer); } /* return the minor range that this device had */ diff -Nru a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h --- a/drivers/usb/serial/usb-serial.h 2004-11-10 17:19:07 -08:00 +++ b/drivers/usb/serial/usb-serial.h 2004-11-10 17:19:07 -08:00 @@ -74,6 +74,11 @@ * @interrupt_in_urb: pointer to the interrupt in struct urb for this port. * @interrupt_in_endpointAddress: endpoint address for the interrupt in pipe * for this port. + * @interrupt_out_buffer: pointer to the interrupt out buffer for this port. + * @interrupt_out_size: the size of the interrupt_out_buffer, in bytes. + * @interrupt_out_urb: pointer to the interrupt out struct urb for this port. + * @interrupt_out_endpointAddress: endpoint address for the interrupt out pipe + * for this port. * @bulk_in_buffer: pointer to the bulk in buffer for this port. * @read_urb: pointer to the bulk in struct urb for this port. * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this @@ -99,6 +104,11 @@ struct urb * interrupt_in_urb; __u8 interrupt_in_endpointAddress; + unsigned char * interrupt_out_buffer; + int interrupt_out_size; + struct urb * interrupt_out_urb; + __u8 interrupt_out_endpointAddress; + unsigned char * bulk_in_buffer; int bulk_in_size; struct urb * read_urb; @@ -135,6 +145,7 @@ * @minor: the starting minor number for this device * @num_ports: the number of ports this device has * @num_interrupt_in: number of interrupt in endpoints we have + * @num_interrupt_out: number of interrupt out endpoints we have * @num_bulk_in: number of bulk in endpoints we have * @num_bulk_out: number of bulk out endpoints we have * @vendor: vendor id of this device @@ -153,6 +164,7 @@ unsigned char num_ports; unsigned char num_port_pointers; char num_interrupt_in; + char num_interrupt_out; char num_bulk_in; char num_bulk_out; __u16 vendor; @@ -188,6 +200,8 @@ * of the devices this structure can support. * @num_interrupt_in: the number of interrupt in endpoints this device will * have. + * @num_interrupt_out: the number of interrupt out endpoints this device will + * have. * @num_bulk_in: the number of bulk in endpoints this device will have. * @num_bulk_out: the number of bulk out endpoints this device will have. * @num_ports: the number of different ports this device will have. @@ -220,6 +234,7 @@ char *short_name; const struct usb_device_id *id_table; char num_interrupt_in; + char num_interrupt_out; char num_bulk_in; char num_bulk_out; char num_ports; @@ -251,6 +266,7 @@ int (*tiocmset) (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear); void (*read_int_callback)(struct urb *urb, struct pt_regs *regs); + void (*write_int_callback)(struct urb *urb, struct pt_regs *regs); void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs); void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs); }; diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c --- a/drivers/usb/serial/visor.c 2004-11-10 17:19:03 -08:00 +++ b/drivers/usb/serial/visor.c 2004-11-10 17:19:03 -08:00 @@ -381,10 +381,17 @@ .read_bulk_callback = visor_read_bulk_callback, }; +struct visor_private { + spinlock_t lock; + int bytes_in; + int bytes_out; + int outstanding_urbs; +}; -static int bytes_in; -static int bytes_out; +/* number of outstanding urbs to prevent userspace DoS from happening */ +#define URB_UPPER_LIMIT 42 +static int stats; /****************************************************************************** * Handspring Visor specific driver functions @@ -392,6 +399,8 @@ static int visor_open (struct usb_serial_port *port, struct file *filp) { struct usb_serial *serial = port->serial; + struct visor_private *priv = usb_get_serial_port_data(port); + unsigned long flags; int result = 0; dbg("%s - port %d", __FUNCTION__, port->number); @@ -402,8 +411,11 @@ return -ENODEV; } - bytes_in = 0; - bytes_out = 0; + spin_lock_irqsave(&priv->lock, flags); + priv->bytes_in = 0; + priv->bytes_out = 0; + priv->outstanding_urbs = 0; + spin_unlock_irqrestore(&priv->lock, flags); /* * Force low_latency on so that our tty_push actually forces the data @@ -441,6 +453,7 @@ static void visor_close (struct usb_serial_port *port, struct file * filp) { + struct visor_private *priv = usb_get_serial_port_data(port); unsigned char *transfer_buffer; dbg("%s - port %d", __FUNCTION__, port->number); @@ -461,20 +474,32 @@ kfree (transfer_buffer); } - /* Uncomment the following line if you want to see some statistics in your syslog */ - /* dev_info (&port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */ + if (stats) + dev_info(&port->dev, "Bytes In = %d Bytes Out = %d\n", + priv->bytes_in, priv->bytes_out); } static int visor_write (struct usb_serial_port *port, const unsigned char *buf, int count) { + struct visor_private *priv = usb_get_serial_port_data(port); struct usb_serial *serial = port->serial; struct urb *urb; unsigned char *buffer; + unsigned long flags; int status; dbg("%s - port %d", __FUNCTION__, port->number); + spin_lock_irqsave(&priv->lock, flags); + if (priv->outstanding_urbs > URB_UPPER_LIMIT) { + spin_unlock_irqrestore(&priv->lock, flags); + dev_dbg(&port->dev, "write limit hit\n"); + return 0; + } + ++priv->outstanding_urbs; + spin_unlock_irqrestore(&priv->lock, flags); + buffer = kmalloc (count, GFP_ATOMIC); if (!buffer) { dev_err(&port->dev, "out of memory\n"); @@ -506,7 +531,10 @@ count = status; kfree (buffer); } else { - bytes_out += count; + spin_lock_irqsave(&priv->lock, flags); + ++priv->outstanding_urbs; + priv->bytes_out += count; + spin_unlock_irqrestore(&priv->lock, flags); } /* we are done with this urb, so let the host driver @@ -547,6 +575,8 @@ static void visor_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; + struct visor_private *priv = usb_get_serial_port_data(port); + unsigned long flags; /* free up the transfer buffer, as usb_free_urb() does not do this */ kfree (urb->transfer_buffer); @@ -557,6 +587,10 @@ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); + spin_lock_irqsave(&priv->lock, flags); + --priv->outstanding_urbs; + spin_unlock_irqrestore(&priv->lock, flags); + schedule_work(&port->work); } @@ -564,8 +598,10 @@ static void visor_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; - struct tty_struct *tty; + struct visor_private *priv = usb_get_serial_port_data(port); unsigned char *data = urb->transfer_buffer; + struct tty_struct *tty; + unsigned long flags; int i; int result; @@ -590,7 +626,9 @@ } tty_flip_buffer_push(tty); } - bytes_in += urb->actual_length; + spin_lock_irqsave(&priv->lock, flags); + priv->bytes_in += urb->actual_length; + spin_unlock_irqrestore(&priv->lock, flags); /* Continue trying to always read */ usb_fill_bulk_urb (port->read_urb, port->serial->dev, @@ -825,6 +863,22 @@ return num_ports; } +static int generic_startup(struct usb_serial *serial) +{ + struct visor_private *priv; + int i; + + for (i = 0; i < serial->num_ports; ++i) { + priv = kmalloc (sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + memset (priv, 0x00, sizeof(*priv)); + spin_lock_init(&priv->lock); + usb_set_serial_port_data(serial->port[i], priv); + } + return 0; +} + static int clie_3_5_startup (struct usb_serial *serial) { struct device *dev = &serial->dev->dev; @@ -864,7 +918,7 @@ return -EIO; } - return 0; + return generic_startup(serial); } static int treo_attach (struct usb_serial *serial) @@ -903,7 +957,7 @@ COPY_PORT(serial->port[1], swap_port); kfree(swap_port); - return 0; + return generic_startup(serial); } static int clie_5_attach (struct usb_serial *serial) @@ -924,7 +978,7 @@ /* port 0 now uses the modified endpoint Address */ serial->port[0]->bulk_out_endpointAddress = serial->port[1]->bulk_out_endpointAddress; - return 0; + return generic_startup(serial); } static void visor_shutdown (struct usb_serial *serial) @@ -1080,8 +1134,11 @@ module_param(debug, bool, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(debug, "Debug enabled or not"); +module_param(stats, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(stats, "Enables statistics or not"); module_param(vendor, ushort, 0); MODULE_PARM_DESC(vendor, "User specified vendor ID"); module_param(product, ushort, 0); MODULE_PARM_DESC(product, "User specified product ID"); + diff -Nru a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c --- a/drivers/usb/storage/scsiglue.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/usb/storage/scsiglue.c 2004-11-10 17:19:04 -08:00 @@ -175,7 +175,7 @@ US_DEBUGP("%s called\n", __FUNCTION__); srb->host_scribble = (unsigned char *)us; - /* enqueue the command */ + /* check for state-transition errors */ if (us->sm_state != US_STATE_IDLE || us->srb != NULL) { printk(KERN_ERR USB_STORAGE "Error in %s: " "state = %d, us->srb = %p\n", @@ -183,10 +183,17 @@ return SCSI_MLQUEUE_HOST_BUSY; } + /* fail the command if we are disconnecting */ + if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) { + US_DEBUGP("Fail command during disconnect\n"); + srb->result = DID_NO_CONNECT << 16; + done(srb); + return 0; + } + + /* enqueue the command and wake up the control thread */ srb->scsi_done = done; us->srb = srb; - - /* wake up the process task */ up(&(us->sema)); return 0; diff -Nru a/drivers/video/Kconfig b/drivers/video/Kconfig --- a/drivers/video/Kconfig 2004-11-10 17:19:02 -08:00 +++ b/drivers/video/Kconfig 2004-11-10 17:19:02 -08:00 @@ -41,7 +41,7 @@ config FB_MODE_HELPERS bool "Enable Video Mode Handling Helpers" depends on FB - default y + default n ---help--- This enables functions for handling video modes using the Generalized Timing Formula and the EDID parser. A few drivers rely @@ -61,10 +61,10 @@ parameters in terms of number of tiles instead of number of pixels. For example, to draw a single character, instead of using bitmaps, an index to an array of bitmaps will be used. To clear or move a - rectangular section of a screen, the rectangle willbe described in + rectangular section of a screen, the rectangle will be described in terms of number of tiles in the x- and y-axis. - This is particularly important to one driver, the matroxfb. If + This is particularly important to one driver, matroxfb. If unsure, say N. config FB_CIRRUS @@ -517,6 +517,27 @@ If unsure, say N. +config FB_INTEL + tristate "Intel 830M/845G/852GM/855GM/865G support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI && X86 && !X86_64 + select AGP + select AGP_INTEL + help + This driver supports the on-board graphics built in to the Intel + 830M/845G/852GM/855GM/865G chipsets. + Say Y if you have and plan to use such a board. + + To compile this driver as a module, choose M here: the + module will be called intelfb. + +config FB_INTEL_DEBUG + bool "Intel driver Debug Messages" + depends on FB_INTEL + ---help--- + Say Y here if you want the Intel driver to output all sorts + of debugging informations to provide to the maintainer when + something goes wrong. + config FB_MATROX tristate "Matrox acceleration" depends on FB && PCI @@ -750,6 +771,19 @@ framebuffer device. The ATI product support page for these boards is at . +config FB_ATY_GENERIC_LCD + bool "Mach64 generic LCD support (EXPERIMENTAL)" + depends on FB_ATY_CT + help + Say Y if you have a laptop with an ATI Rage LT PRO, Rage Mobility, + Rage XC, or Rage XL chipset. + +config FB_ATY_XL_INIT + bool "Rage XL No-BIOS Init support" + depends on FB_ATY_CT + help + Say Y here to support booting a Rage XL without BIOS support. + config FB_ATY_GX bool "Mach64 GX support" if PCI depends on FB_ATY @@ -761,11 +795,41 @@ is at . -config FB_ATY_XL_INIT - bool " Rage XL No-BIOS Init support" if FB_ATY_CT - depends on FB_ATY +config FB_SAVAGE + tristate "S3 Savage support" + depends on FB && PCI && EXPERIMENTAL + select I2C_ALGOBIT if FB_SAVAGE_I2C + select I2C if FB_SAVAGE_I2C + select FB_MODE_HELPERS help - Say Y here to support booting a Rage XL without BIOS support. + This driver supports notebooks and computers with S3 Savage PCI/AGP + chips. + + Say Y if you have such a graphics card. + + To compile this driver as a module, choose M here; the module + will be called savagefb. + +config FB_SAVAGE_I2C + tristate "Enable DDC2 Support" + depends on FB_SAVAGE + help + This enables I2C support for S3 Savage Chipsets. This is used + only for getting EDID information from the attached display + allowing for robust video mode handling and switching. + + Because fbdev-2.6 requires that drivers must be able to + independently validate video mode parameters, you should say Y + here. + +config FB_SAVAGE_ACCEL + tristate "Enable Console Acceleration" + depends on FB_SAVAGE + default n + help + This option will compile in console acceleration support. If + the resulting framebuffer console has bothersome glitches, then + choose N here. config FB_SIS tristate "SiS acceleration" diff -Nru a/drivers/video/Makefile b/drivers/video/Makefile --- a/drivers/video/Makefile 2004-11-10 17:19:02 -08:00 +++ b/drivers/video/Makefile 2004-11-10 17:19:02 -08:00 @@ -23,15 +23,20 @@ obj-$(CONFIG_FB_PM3) += pm3fb.o obj-$(CONFIG_FB_MATROX) += matrox/ cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_RIVA) += riva/ cfbimgblt.o vgastate.o +obj-$(CONFIG_FB_RIVA) += riva/ cfbimgblt.o cfbfillrect.o \ + cfbcopyarea.o vgastate.o obj-$(CONFIG_FB_ATY) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_ATY128) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_RADEON) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_SIS) += sis/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_KYRO) += kyro/ cfbfillrect.o cfbcopyarea.o cfbimgblt.o - +obj-$(CONFIG_FB_SAVAGE) += savage/ cfbfillrect.o cfbcopyarea.o \ + cfbimgblt.o obj-$(CONFIG_FB_I810) += cfbcopyarea.o cfbfillrect.o cfbimgblt.o \ vgastate.o +obj-$(CONFIG_FB_INTEL) += cfbfillrect.o cfbcopyarea.o \ + cfbimgblt.o + obj-$(CONFIG_FB_RADEON_OLD) += radeonfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_NEOMAGIC) += neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o vgastate.o obj-$(CONFIG_FB_VIRGE) += virgefb.o diff -Nru a/drivers/video/acornfb.c b/drivers/video/acornfb.c --- a/drivers/video/acornfb.c 2004-11-10 17:19:07 -08:00 +++ b/drivers/video/acornfb.c 2004-11-10 17:19:07 -08:00 @@ -1280,13 +1280,7 @@ printk("acornfb: freed %dK memory\n", mb_freed); } -static struct device acornfb_device = { - .bus_id = "acornfb", - .coherent_dma_mask = 0xffffffff, -}; - -int __init -acornfb_init(void) +static int __init acornfb_probe(struct device *dev) { unsigned long size; u_int h_sync, v_sync; @@ -1299,7 +1293,7 @@ acornfb_init_fbinfo(); - current_par.dev = &acornfb_device; + current_par.dev = dev; if (current_par.montype == -1) current_par.montype = acornfb_detect_monitortype(); @@ -1332,7 +1326,6 @@ } } - fb_info.currcon = -1; fb_info.screen_base = (char *)SCREEN_BASE; fb_info.fix.smem_start = SCREEN_START; current_par.using_vram = 0; @@ -1459,6 +1452,17 @@ if (register_framebuffer(&fb_info) < 0) return -EINVAL; return 0; +} + +static struct device_driver acornfb_driver = { + .name = "acornfb", + .bus = &platform_bus_type, + .probe = acornfb_probe, +}; + +static int __init acornfb_init(void) +{ + return driver_register(&acornfb_driver); } module_init(acornfb_init); diff -Nru a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c --- a/drivers/video/asiliantfb.c 2004-11-10 17:19:06 -08:00 +++ b/drivers/video/asiliantfb.c 2004-11-10 17:19:06 -08:00 @@ -575,9 +575,6 @@ init_asiliant(p, addr); - /* Clear the entire framebuffer */ - memset(p->screen_base, 0, 0x200000); - pci_set_drvdata(dp, p); return 0; } diff -Nru a/drivers/video/aty/Makefile b/drivers/video/aty/Makefile --- a/drivers/video/aty/Makefile 2004-11-10 17:19:03 -08:00 +++ b/drivers/video/aty/Makefile 2004-11-10 17:19:03 -08:00 @@ -2,9 +2,9 @@ obj-$(CONFIG_FB_ATY128) += aty128fb.o obj-$(CONFIG_FB_RADEON) += radeonfb.o -atyfb-y := atyfb_base.o mach64_accel.o +atyfb-y := atyfb_base.o mach64_accel.o mach64_cursor.o atyfb-$(CONFIG_FB_ATY_GX) += mach64_gx.o -atyfb-$(CONFIG_FB_ATY_CT) += mach64_ct.o mach64_cursor.o +atyfb-$(CONFIG_FB_ATY_CT) += mach64_ct.o atyfb-objs := $(atyfb-y) radeonfb-y := radeon_base.o radeon_pm.o radeon_monitor.o radeon_accel.o diff -Nru a/drivers/video/aty/ati_ids.h b/drivers/video/aty/ati_ids.h --- a/drivers/video/aty/ati_ids.h 2004-11-10 17:19:04 -08:00 +++ b/drivers/video/aty/ati_ids.h 2004-11-10 17:19:04 -08:00 @@ -64,6 +64,7 @@ #define PCI_CHIP_MACH64LQ 0x4C51 #define PCI_CHIP_MACH64LR 0x4C52 #define PCI_CHIP_MACH64LS 0x4C53 +#define PCI_CHIP_MACH64LT 0x4C54 #define PCI_CHIP_RADEON_LW 0x4C57 #define PCI_CHIP_RADEON_LX 0x4C58 #define PCI_CHIP_RADEON_LY 0x4C59 diff -Nru a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c --- a/drivers/video/aty/aty128fb.c 2004-11-10 17:19:04 -08:00 +++ b/drivers/video/aty/aty128fb.c 2004-11-10 17:19:04 -08:00 @@ -939,7 +939,7 @@ rom_base = ioremap(segstart, 0x10000); if (rom_base == NULL) return NULL; - if ((*rom_base == 0x55) && (((*(rom_base + 1)) & 0xff) == 0xaa)) + if (readb(rom_base) == 0x55 && readb(rom_base + 1) == 0xaa) break; iounmap(rom_base); rom_base = NULL; diff -Nru a/drivers/video/aty/atyfb.h b/drivers/video/aty/atyfb.h --- a/drivers/video/aty/atyfb.h 2004-11-10 17:19:05 -08:00 +++ b/drivers/video/aty/atyfb.h 2004-11-10 17:19:05 -08:00 @@ -3,6 +3,8 @@ */ #include +#include +#include /* * Elements of the hardware specific atyfb_par structure */ @@ -10,16 +12,60 @@ struct crtc { u32 vxres; u32 vyres; + u32 xoffset; + u32 yoffset; + u32 bpp; u32 h_tot_disp; u32 h_sync_strt_wid; u32 v_tot_disp; u32 v_sync_strt_wid; + u32 vline_crnt_vline; u32 off_pitch; u32 gen_cntl; u32 dp_pix_width; /* acceleration */ u32 dp_chain_mask; /* acceleration */ +#ifdef CONFIG_FB_ATY_GENERIC_LCD + u32 horz_stretching; + u32 vert_stretching; + u32 ext_vert_stretch; + u32 shadow_h_tot_disp; + u32 shadow_h_sync_strt_wid; + u32 shadow_v_tot_disp; + u32 shadow_v_sync_strt_wid; + u32 lcd_gen_cntl; + u32 lcd_config_panel; + u32 lcd_index; +#endif +}; + +struct aty_interrupt { + wait_queue_head_t wait; + unsigned int count; + int pan_display; +}; + +struct pll_info { + int pll_max; + int pll_min; + int sclk, mclk, mclk_pm, xclk; + int ref_div; + int ref_clk; }; +typedef struct { + u16 unknown1; + u16 PCLK_min_freq; + u16 PCLK_max_freq; + u16 unknown2; + u16 ref_freq; + u16 ref_divider; + u16 unknown3; + u16 MCLK_pwd; + u16 MCLK_max_freq; + u16 XCLK_max_freq; + u16 SCLK_freq; +} __attribute__ ((packed)) PLL_BLOCK_MACH64; + struct pll_514 { u8 m; u8 n; @@ -36,16 +82,39 @@ u8 pll_ref_div; u8 pll_gen_cntl; u8 mclk_fb_div; + u8 mclk_fb_mult; /* 2 ro 4 */ +/* u8 sclk_fb_div;*/ u8 pll_vclk_cntl; u8 vclk_post_div; u8 vclk_fb_div; u8 pll_ext_cntl; - u32 dsp_config; /* Mach64 GTB DSP */ - u32 dsp_on_off; /* Mach64 GTB DSP */ +/* u8 ext_vpll_cntl; + u8 spll_cntl2;*/ + u32 dsp_config; /* Mach64 GTB DSP */ + u32 dsp_on_off; /* Mach64 GTB DSP */ + u32 dsp_loop_latency; + u32 fifo_size; + u32 xclkpagefaultdelay; + u32 xclkmaxrasdelay; + u8 xclk_ref_div; + u8 xclk_post_div; u8 mclk_post_div_real; + u8 xclk_post_div_real; u8 vclk_post_div_real; + u8 features; +#ifdef CONFIG_FB_ATY_GENERIC_LCD + u32 xres; /* use for LCD stretching/scaling */ +#endif }; +/* + for pll_ct.features +*/ +#define DONT_USE_SPLL 0x1 +#define DONT_USE_XDLL 0x2 +#define USE_CPUCLK 0x4 +#define POWERDOWN_PLL 0x8 + union aty_pll { struct pll_ct ct; struct pll_514 ibm514; @@ -56,42 +125,68 @@ * The hardware parameters for each card */ -struct aty_cursor { - u8 bits[8][64]; - u8 mask[8][64]; - u8 __iomem *ram; -}; - struct atyfb_par { struct aty_cmap_regs __iomem *aty_cmap_regs; + struct { u8 red, green, blue; } palette[256]; const struct aty_dac_ops *dac_ops; const struct aty_pll_ops *pll_ops; - struct aty_cursor *cursor; void __iomem *ati_regbase; - unsigned long clk_wr_offset; + unsigned long clk_wr_offset; /* meaning overloaded, clock id by CT */ struct crtc crtc; union aty_pll pll; + struct pll_info pll_limits; u32 features; u32 ref_clk_per; u32 pll_per; u32 mclk_per; + u32 xclk_per; u8 bus_type; u8 ram_type; u8 mem_refresh_rate; - u8 blitter_may_be_busy; + u16 pci_id; u32 accel_flags; + int blitter_may_be_busy; + int asleep; + int lock_blank; + unsigned long res_start; + unsigned long res_size; #ifdef __sparc__ struct pci_mmap_map *mmap_map; u8 mmaped; +#endif int open; +#ifdef CONFIG_FB_ATY_GENERIC_LCD + unsigned long bios_base_phys; + unsigned long bios_base; + unsigned long lcd_table; + u16 lcd_width; + u16 lcd_height; + u32 lcd_pixclock; + u16 lcd_refreshrate; + u16 lcd_htotal; + u16 lcd_hdisp; + u16 lcd_hsync_dly; + u16 lcd_hsync_len; + u16 lcd_vtotal; + u16 lcd_vdisp; + u16 lcd_vsync_len; + u16 lcd_right_margin; + u16 lcd_lower_margin; + u16 lcd_hblank_len; + u16 lcd_vblank_len; #endif -#ifdef CONFIG_PMAC_PBOOK - struct fb_info *next; - unsigned char *save_framebuffer; - unsigned long save_pll[64]; + unsigned long aux_start; /* auxiliary aperture */ + unsigned long aux_size; + struct aty_interrupt vblank; + unsigned long irq_flags; + unsigned int irq; + spinlock_t int_lock; +#ifdef CONFIG_MTRR + int mtrr_aper; + int mtrr_reg; #endif }; - + /* * ATI Mach64 features */ @@ -101,7 +196,7 @@ #define M64F_RESET_3D 0x00000001 #define M64F_MAGIC_FIFO 0x00000002 #define M64F_GTB_DSP 0x00000004 -#define M64F_FIFO_24 0x00000008 +#define M64F_FIFO_32 0x00000008 #define M64F_SDRAM_MAGIC_PLL 0x00000010 #define M64F_MAGIC_POSTDIV 0x00000020 #define M64F_INTEGRATED 0x00000040 @@ -116,9 +211,10 @@ #define M64F_G3_PB_1_1 0x00008000 #define M64F_G3_PB_1024x768 0x00010000 #define M64F_EXTRA_BRIGHT 0x00020000 -#define M64F_LT_SLEEP 0x00040000 +#define M64F_LT_LCD_REGS 0x00040000 #define M64F_XL_DLL 0x00080000 - +#define M64F_MFB_FORCE_4 0x00100000 +#define M64F_HW_TRIPLE 0x00200000 /* * Register access @@ -137,8 +233,7 @@ #endif } -static inline void aty_st_le32(int regindex, u32 val, - const struct atyfb_par *par) +static inline void aty_st_le32(int regindex, u32 val, const struct atyfb_par *par) { /* Hack for bloc 1, should be cleanly optimized by compiler */ if (regindex >= 0x400) @@ -163,8 +258,7 @@ #endif } -static inline void aty_st_8(int regindex, u8 val, - const struct atyfb_par *par) +static inline void aty_st_8(int regindex, u8 val, const struct atyfb_par *par) { /* Hack for bloc 1, should be cleanly optimized by compiler */ if (regindex >= 0x400) @@ -177,17 +271,10 @@ #endif } -static inline u8 aty_ld_pll(int offset, const struct atyfb_par *par) -{ - u8 res; - - /* write addr byte */ - aty_st_8(CLOCK_CNTL + 1, (offset << 2), par); - /* read the register value */ - res = aty_ld_8(CLOCK_CNTL + 2, par); - return res; -} - +#if defined(CONFIG_PM) || defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) +extern void aty_st_lcd(int index, u32 val, const struct atyfb_par *par); +extern u32 aty_ld_lcd(int index, const struct atyfb_par *par); +#endif /* * DAC operations @@ -195,14 +282,14 @@ struct aty_dac_ops { int (*set_dac) (const struct fb_info * info, - const union aty_pll * pll, u32 bpp, u32 accel); + const union aty_pll * pll, u32 bpp, u32 accel); }; -extern const struct aty_dac_ops aty_dac_ibm514; /* IBM RGB514 */ -extern const struct aty_dac_ops aty_dac_ati68860b; /* ATI 68860-B */ -extern const struct aty_dac_ops aty_dac_att21c498; /* AT&T 21C498 */ -extern const struct aty_dac_ops aty_dac_unsupported; /* unsupported */ -extern const struct aty_dac_ops aty_dac_ct; /* Integrated */ +extern const struct aty_dac_ops aty_dac_ibm514; /* IBM RGB514 */ +extern const struct aty_dac_ops aty_dac_ati68860b; /* ATI 68860-B */ +extern const struct aty_dac_ops aty_dac_att21c498; /* AT&T 21C498 */ +extern const struct aty_dac_ops aty_dac_unsupported; /* unsupported */ +extern const struct aty_dac_ops aty_dac_ct; /* Integrated */ /* @@ -210,37 +297,32 @@ */ struct aty_pll_ops { - int (*var_to_pll) (const struct fb_info * info, u32 vclk_per, - u8 bpp, union aty_pll * pll); - u32(*pll_to_var) (const struct fb_info * info, - const union aty_pll * pll); - void (*set_pll) (const struct fb_info * info, - const union aty_pll * pll); + int (*var_to_pll) (const struct fb_info * info, u32 vclk_per, u32 bpp, union aty_pll * pll); + u32 (*pll_to_var) (const struct fb_info * info, const union aty_pll * pll); + void (*set_pll) (const struct fb_info * info, const union aty_pll * pll); + void (*get_pll) (const struct fb_info *info, union aty_pll * pll); + int (*init_pll) (const struct fb_info * info, union aty_pll * pll); }; -extern const struct aty_pll_ops aty_pll_ati18818_1; /* ATI 18818 */ -extern const struct aty_pll_ops aty_pll_stg1703; /* STG 1703 */ -extern const struct aty_pll_ops aty_pll_ch8398; /* Chrontel 8398 */ -extern const struct aty_pll_ops aty_pll_att20c408; /* AT&T 20C408 */ -extern const struct aty_pll_ops aty_pll_ibm514; /* IBM RGB514 */ -extern const struct aty_pll_ops aty_pll_unsupported; /* unsupported */ -extern const struct aty_pll_ops aty_pll_ct; /* Integrated */ +extern const struct aty_pll_ops aty_pll_ati18818_1; /* ATI 18818 */ +extern const struct aty_pll_ops aty_pll_stg1703; /* STG 1703 */ +extern const struct aty_pll_ops aty_pll_ch8398; /* Chrontel 8398 */ +extern const struct aty_pll_ops aty_pll_att20c408; /* AT&T 20C408 */ +extern const struct aty_pll_ops aty_pll_ibm514; /* IBM RGB514 */ +extern const struct aty_pll_ops aty_pll_unsupported; /* unsupported */ +extern const struct aty_pll_ops aty_pll_ct; /* Integrated */ -extern void aty_set_pll_ct(const struct fb_info *info, - const union aty_pll *pll); -extern void aty_calc_pll_ct(const struct fb_info *info, - struct pll_ct *pll); +extern void aty_set_pll_ct(const struct fb_info *info, const union aty_pll *pll); +extern u8 aty_ld_pll_ct(int offset, const struct atyfb_par *par); /* * Hardware cursor support */ -extern struct aty_cursor *aty_init_cursor(struct fb_info *info); +extern int aty_init_cursor(struct fb_info *info); extern int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor); -extern void aty_set_cursor_color(struct fb_info *info); -extern void aty_set_cursor_shape(struct fb_info *info); /* * Hardware acceleration @@ -260,6 +342,5 @@ } extern void aty_reset_engine(const struct atyfb_par *par); -extern void aty_init_engine(struct atyfb_par *par, - struct fb_info *info); +extern void aty_init_engine(struct atyfb_par *par, struct fb_info *info); diff -Nru a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c --- a/drivers/video/aty/atyfb_base.c 2004-11-10 17:19:05 -08:00 +++ b/drivers/video/aty/atyfb_base.c 2004-11-10 17:19:05 -08:00 @@ -1,6 +1,7 @@ /* * ATI Frame Buffer Device Driver Core * + * Copyright (C) 2004 Alex Kern * Copyright (C) 1997-2001 Geert Uytterhoeven * Copyright (C) 1998 Bernd Harries * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) @@ -24,10 +25,13 @@ * Harry AC Eaton * Anthony Tong * + * Generic LCD support written by Daniel Mantione, ported from 2.4.20 by Alex Kern + * Many Thanks to Ville Syrjälä for patches and fixing nasting 16 bit color bug. + * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive for * more details. - * + * * Many thanks to Nitya from ATI devrel for support and patience ! */ @@ -38,15 +42,16 @@ - cursor support on all cards and all ramdacs. - cursor parameters controlable via ioctl()s. - guess PLL and MCLK based on the original PLL register values initialized - by the BIOS or Open Firmware (if they are initialized). + by Open Firmware (if they are initialized). BIOS is done - (Anyone to help with this?) + (Anyone with Mac to help with this?) ******************************************************************************/ #include #include +#include #include #include #include @@ -54,19 +59,20 @@ #include #include #include -#include #include #include #include #include -#include -#include +#include +#include +#include #include #include #include