]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
17 years agosched: fix sched_domain sysctl registration again
Milton Miller [Wed, 24 Oct 2007 16:23:48 +0000 (18:23 +0200)]
sched: fix sched_domain sysctl registration again

commit  029190c515f15f512ac85de8fc686d4dbd0ae731 (cpuset
sched_load_balance flag) was not tested SCHED_DEBUG enabled as
committed as it dereferences NULL when used and it reordered
the sysctl registration to cause it to never show any domains
or their tunables.

Fixes:

1) restore arch_init_sched_domains ordering
we can't walk the domains before we build them

presently we register cpus with empty directories (no domain
directories or files).

2) make unregister_sched_domain_sysctl do nothing when already unregistered
detach_destroy_domains is now called one set of cpus at a time
unregister_syctl dereferences NULL if called with a null.

While the the function would always dereference null if called
twice, in the previous code it was always called once and then
was followed a register.  So only the hidden bug of the
sysctl_root_table not being allocated followed by an attempt to
free it would have shown the error.

3) always call unregister and register in partition_sched_domains
The code is "smart" about unregistering only needed domains.
Since we aren't guaranteed any calls to unregister, always
unregister.   Without calling register on the way out we
will not have a table or any sysctl tree.

4) warn if register is called without unregistering
The previous table memory is lost, leaving pointers to the
later freed memory in sysctl and leaking the memory of the
tables.

Before this patch on a 2-core 4-thread box compiled for SMT and NUMA,
the domains appear empty (there are actually 3 levels per cpu).  And as
soon as two domains a null pointer is dereferenced (unreliable in this
case is stack garbage):

bu19a:~# ls -R /proc/sys/kernel/sched_domain/
/proc/sys/kernel/sched_domain/:
cpu0  cpu1  cpu2  cpu3

/proc/sys/kernel/sched_domain/cpu0:

/proc/sys/kernel/sched_domain/cpu1:

/proc/sys/kernel/sched_domain/cpu2:

/proc/sys/kernel/sched_domain/cpu3:

bu19a:~# mkdir /dev/cpuset
bu19a:~# mount -tcpuset cpuset /dev/cpuset/
bu19a:~# cd /dev/cpuset/
bu19a:/dev/cpuset# echo 0 > sched_load_balance
bu19a:/dev/cpuset# mkdir one
bu19a:/dev/cpuset# echo 1 > one/cpus
bu19a:/dev/cpuset# echo 0 > one/sched_load_balance
Unable to handle kernel paging request for data at address 0x00000018
Faulting instruction address: 0xc00000000006b608
NIP: c00000000006b608 LR: c00000000006b604 CTR: 0000000000000000
REGS: c000000018d973f0 TRAP: 0300   Not tainted  (2.6.23-bml)
MSR: 9000000000009032 <EE,ME,IR,DR>  CR: 28242442  XER: 00000000
DAR: 0000000000000018, DSISR: 0000000040000000
TASK = c00000001912e340[1987] 'bash' THREAD: c000000018d94000 CPU: 2
..
NIP [c00000000006b608] .unregister_sysctl_table+0x38/0x110
LR [c00000000006b604] .unregister_sysctl_table+0x34/0x110
Call Trace:
[c000000018d97670] [c000000007017270] 0xc000000007017270 (unreliable)
[c000000018d97720] [c000000000058710] .detach_destroy_domains+0x30/0xb0
[c000000018d977b0] [c00000000005cf1c] .partition_sched_domains+0x1bc/0x230
[c000000018d97870] [c00000000009fdc4] .rebuild_sched_domains+0xb4/0x4c0
[c000000018d97970] [c0000000000a02e8] .update_flag+0x118/0x170
[c000000018d97a80] [c0000000000a1768] .cpuset_common_file_write+0x568/0x820
[c000000018d97c00] [c00000000009d95c] .cgroup_file_write+0x7c/0x180
[c000000018d97cf0] [c0000000000e76b8] .vfs_write+0xe8/0x1b0
[c000000018d97d90] [c0000000000e810c] .sys_write+0x4c/0x90
[c000000018d97e30] [c00000000000852c] syscall_exit+0x0/0x40

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoLinux 2.6.24-rc1
Linus Torvalds [Wed, 24 Oct 2007 03:50:57 +0000 (20:50 -0700)]
Linux 2.6.24-rc1

The patch is big.  Really big.  You just won't believe how vastly hugely
mindbogglingly big it is.  I mean you may think it's a long way down the
road to the chemist, but that's just peanuts to how big the patch from
2.6.23 is.

But it's all good.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoadd port definition for mcf UART driver
Greg Ungerer [Wed, 24 Oct 2007 02:03:52 +0000 (12:03 +1000)]
add port definition for mcf UART driver

Add a port type definition for the Freescale UART driver ports (mcf.c).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: remove unused machdep variable definitions
Greg Ungerer [Wed, 24 Oct 2007 02:04:13 +0000 (12:04 +1000)]
m68knommu: remove unused machdep variable definitions

Remove old definitions of the timer function pointers.
Add definitions of the common hardware timer functions.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: define DMA channels for ColdFire 532x
Greg Ungerer [Wed, 24 Oct 2007 02:04:08 +0000 (12:04 +1000)]
m68knommu: define DMA channels for ColdFire 532x

Create definition for DMA channels on the ColdFire 532x family.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: add platform struct for ColdFire UART driver
Greg Ungerer [Wed, 24 Oct 2007 02:03:56 +0000 (12:03 +1000)]
m68knommu: add platform struct for ColdFire UART driver

Add platform support structure for use with new ColdFire UART driver.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: mark mem init functions as __init
Greg Ungerer [Wed, 24 Oct 2007 02:03:46 +0000 (12:03 +1000)]
m68knommu: mark mem init functions as __init

Mark the m68knommu memory init functions as __init.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: mark setup_arch() as __init
Greg Ungerer [Wed, 24 Oct 2007 02:03:41 +0000 (12:03 +1000)]
m68knommu: mark setup_arch() as __init

Mark the m68knommu setup_arch() function as __init.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: cleanup 68VZ328 init code
Greg Ungerer [Wed, 24 Oct 2007 02:03:32 +0000 (12:03 +1000)]
m68knommu: cleanup 68VZ328 init code

Removed header includes not needed.
Remove use of old m68knommu timer function pointers.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: cleanup 68EZ328 init code
Greg Ungerer [Wed, 24 Oct 2007 02:03:28 +0000 (12:03 +1000)]
m68knommu: cleanup 68EZ328 init code

Clean up 68EZ328 timer support code. Removed header includes not needed.
Remove use of old m68knommu timer function pointers.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: cleanup 68360 startup code
Greg Ungerer [Wed, 24 Oct 2007 02:03:25 +0000 (12:03 +1000)]
m68knommu: cleanup 68360 startup code

Clean up 68360 timer support code. Removed header includes not needed.
Remove use of old m68knommu timer function pointers. Use common function
naming for 68328 timer functions.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: cleanup 68328 timer code
Greg Ungerer [Wed, 24 Oct 2007 02:03:20 +0000 (12:03 +1000)]
m68knommu: cleanup 68328 timer code

Use common function naming for 68328 timer functions to make them
consistent with the various other hardware m68knommu timers.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: cleanup 68328 init code
Greg Ungerer [Wed, 24 Oct 2007 02:03:16 +0000 (12:03 +1000)]
m68knommu: cleanup 68328 init code

Clean up 68328 timer support code. Removed header includes not needed.
Remove use of old m68knommu timer function pointers.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: remove unused variables in setup.c
Greg Ungerer [Wed, 24 Oct 2007 02:03:10 +0000 (12:03 +1000)]
m68knommu: remove unused variables in setup.c

Remove unused variables from setup.c code.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Wed, 24 Oct 2007 01:57:39 +0000 (18:57 -0700)]
Merge branch 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6

* 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  [SPARC, XEN, NET/CXGB3] use irq_handler_t where appropriate
  drivers/char/riscom8: clean up irq handling
  isdn/sc: irq handler clean
  isdn/act2000: fix major bug. clean irq handler.
  char/pcmcia/synclink_cs: trim trailing whitespace
  drivers/char/ip2: separate polling and irq-driven work entry points
  drivers/char/ip2: split out irq core logic into separate function
  [NETDRVR] lib82596, netxen: delete pointless tests from irq handler
  Eliminate pointless casts from void* in a few driver irq handlers.
  [PARPORT] Remove unused 'irq' argument from parport irq functions
  [PARPORT] Kill useful 'irq' arg from parport_{generic_irq,ieee1284_interrupt}
  [PARPORT] Consolidate code copies into a single generic irq handler

17 years agoMerge branch 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
Linus Torvalds [Wed, 24 Oct 2007 01:57:22 +0000 (18:57 -0700)]
Merge branch 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6

* 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  ni5010: kill unused variable
  eexpress: fix !SMP unused-var warning
  cgroup: kill unused variable

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Wed, 24 Oct 2007 01:56:54 +0000 (18:56 -0700)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (39 commits)
  Remove Andrew Morton from list of net driver maintainers.
  bonding: Acquire correct locks in alb for promisc change
  bonding: Convert more locks to _bh, acquire rtnl, for new locking
  bonding: Convert locks to _bh, rework alb locking for new locking
  bonding: Convert miimon to new locking
  bonding: Convert balance-rr transmit to new locking
  Convert bonding timers to workqueues
  Update MAINTAINERS to reflect my (jgarzik's) current efforts.
  pasemi_mac: fix typo
  defxx.c: dfx_bus_init() is __devexit not __devinit
  s390 MAINTAINERS
  remove header_ops bug in qeth driver
  sky2: crash on remove
  MIPSnet: Delete all the useless debugging printks.
  AR7 ethernet: small post-merge cleanups and fixes
  mv643xx_eth: Hook up mv643xx_get_sset_count
  mv643xx_eth: Remove obsolete checksum offload comment
  mv643xx_eth: Merge drivers/net/mv643xx_eth.h into mv643xx_eth.c
  mv643xx_eth: Remove unused register defines
  mv643xx_eth: Clean up mv643xx_eth.h
  ...

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Wed, 24 Oct 2007 01:56:21 +0000 (18:56 -0700)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  jmicron: update quirk for JMB361/3/5/6
  libata: add HTS542525K9SA00 to NCQ blacklist
  libata-core: auditting chk_status v check_status
  [libata] checkpatch-inspired cleanups

17 years agoni5010: kill unused variable
Jeff Garzik [Tue, 23 Oct 2007 22:36:43 +0000 (18:36 -0400)]
ni5010: kill unused variable

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoeexpress: fix !SMP unused-var warning
Jeff Garzik [Tue, 23 Oct 2007 22:36:42 +0000 (18:36 -0400)]
eexpress: fix !SMP unused-var warning

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agocgroup: kill unused variable
Jeff Garzik [Tue, 23 Oct 2007 22:36:44 +0000 (18:36 -0400)]
cgroup: kill unused variable

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agojmicron: update quirk for JMB361/3/5/6
Tejun Heo [Tue, 23 Oct 2007 06:27:31 +0000 (15:27 +0900)]
jmicron: update quirk for JMB361/3/5/6

Set bits 0, 4, 5 and 7 of PCI configuration register 0x40 in the
quirk.  This has the following effects and is recommended by the
vendor.

* Force enable of IDE channels (used to be left alone as BIOS
  configured)

* Change initial phase behavior of PIO cycle such that the host pulls
  down the bus instead of tristating it.  Vendor recommends this
  setting.

The above settings are better for the current generation of
controllers and needed for the upcoming next generation.

Tested on JMB363.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Ethan Hsiao <ethanhsiao@jmicron.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: add HTS542525K9SA00 to NCQ blacklist
Tejun Heo [Tue, 23 Oct 2007 10:07:49 +0000 (19:07 +0900)]
libata: add HTS542525K9SA00 to NCQ blacklist

Another one doing spurious NCQ completions.  Blacklist it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata-core: auditting chk_status v check_status
Alan Cox [Tue, 23 Oct 2007 15:50:02 +0000 (16:50 +0100)]
libata-core: auditting chk_status v check_status

Did a complete audit of these and found we have another error case.

ata_bus_softreset calls ata_check_status which means that it tries to do
an ioread8 on the port blindly and check versus 0xFF for an error.

It should of course be using the ap->ops method for this via chk_status,
and this bug causes a wrog status call on the NS87415 at least.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] checkpatch-inspired cleanups
Jeff Garzik [Fri, 19 Oct 2007 10:42:56 +0000 (06:42 -0400)]
[libata] checkpatch-inspired cleanups

Tackle the relatively sane complaints of checkpatch --file.

The vast majority is indentation and whitespace changes, the rest are

* #include fixes
* printk KERN_xxx prefix addition
* BSS/initializer cleanups

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoRemove Andrew Morton from list of net driver maintainers.
Jeff Garzik [Wed, 24 Oct 2007 00:56:59 +0000 (20:56 -0400)]
Remove Andrew Morton from list of net driver maintainers.

He now rules the world, not just this tiny tract of land.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: Andrew Morton
17 years agobonding: Acquire correct locks in alb for promisc change
Jay Vosburgh [Thu, 18 Oct 2007 00:37:51 +0000 (17:37 -0700)]
bonding: Acquire correct locks in alb for promisc change

Update ALB mode monitor to hold correct locks (RTNL and nothing
else) when calling dev_set_promiscuity.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agobonding: Convert more locks to _bh, acquire rtnl, for new locking
Jay Vosburgh [Thu, 18 Oct 2007 00:37:50 +0000 (17:37 -0700)]
bonding: Convert more locks to _bh, acquire rtnl, for new locking

Convert more lock acquisitions to _bh flavor to avoid deadlock
with workqueue activity and add acquisition of RTNL in appropriate places.
Affects ALB mode, as well as core bonding functions and sysfs.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agobonding: Convert locks to _bh, rework alb locking for new locking
Jay Vosburgh [Thu, 18 Oct 2007 00:37:49 +0000 (17:37 -0700)]
bonding: Convert locks to _bh, rework alb locking for new locking

Convert locking-related activity to new & improved system.
Convert some lock acquisitions to _bh and rework parts of ALB mode, both
to avoid deadlocks with workqueue activity.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agobonding: Convert miimon to new locking
Jay Vosburgh [Thu, 18 Oct 2007 00:37:48 +0000 (17:37 -0700)]
bonding: Convert miimon to new locking

Convert mii (link state) monitor to acquire correct locks for
failover events.  In particular, failovers generally require RTNL at a low
level (when manipulating device MAC addresses, for example) and no other
locks.  The high level monitor is responsible for acquiring a known set
of locks, RTNL, the bond->lock for read and the slave_lock for write, and
the low level failover processing can then release appropriate locks as
needed.  This patch provides the high level portion.

As it is undesirable to acquire RTNL for every monitor pass (which
may occur as often as every 10 ms), the miimon has been converted to
do conditional locking.  A first pass inspects all slaves to determine
if any action is required, and if so, a second pass (after acquring RTNL)
is done to perform any actions (doing a complete rescan, as the situation
may have changed when all locks were released).

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agobonding: Convert balance-rr transmit to new locking
Jay Vosburgh [Thu, 18 Oct 2007 00:37:47 +0000 (17:37 -0700)]
bonding: Convert balance-rr transmit to new locking

Change locking in balance-rr transmit processing to use a free
running counter to determine which slave to transmit on.  Instead, a
free-running counter is maintained, and modulo arithmetic used to select
a slave for transmit.

This removes lock operations from the TX path, and eliminates
a deadlock introduced by the conversion to work queues.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoConvert bonding timers to workqueues
Jay Vosburgh [Thu, 18 Oct 2007 00:37:45 +0000 (17:37 -0700)]
Convert bonding timers to workqueues

Convert bonding timers to workqueues.  This converts the various
monitor functions to run in periodic work queues instead of timers.  This
patch introduces the framework and convers the calls, but does not resolve
various locking issues, and does not stand alone.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoUpdate MAINTAINERS to reflect my (jgarzik's) current efforts.
Jeff Garzik [Wed, 24 Oct 2007 00:22:12 +0000 (20:22 -0400)]
Update MAINTAINERS to reflect my (jgarzik's) current efforts.

Remove net driver entries (they fall under the more general 'net driver
maintainer') umbrella.

Remove entries for older drivers that either no longer exist, are about
to be removed, or I no longer care about.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agopasemi_mac: fix typo
Olof Johansson [Sat, 20 Oct 2007 19:10:03 +0000 (14:10 -0500)]
pasemi_mac: fix typo

Add missing &:

drivers/net/pasemi_mac.c: In function 'pasemi_mac_clean_rx':
drivers/net/pasemi_mac.c:553: warning: passing argument 1 of 'prefetch'
makes pointer from integer without a cast

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agodefxx.c: dfx_bus_init() is __devexit not __devinit
Maciej W. Rozycki [Mon, 22 Oct 2007 17:13:24 +0000 (18:13 +0100)]
defxx.c: dfx_bus_init() is __devexit not __devinit

 The dfx_bus_uninit() call is called from dfx_unregister() which is
__devexit and which is ultimately the ->remove call for the device.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agos390 MAINTAINERS
Ursula Braun [Mon, 22 Oct 2007 14:16:15 +0000 (16:16 +0200)]
s390 MAINTAINERS

adding Frank Blaschka to s390 networking maintainers

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoremove header_ops bug in qeth driver
Ursula Braun [Mon, 22 Oct 2007 14:16:14 +0000 (16:16 +0200)]
remove header_ops bug in qeth driver

Remove qeth bug caused by commit:
[NET]: Move hardware header operations out of netdevice.

This is the second part of the qeth header_ops patch, since
first patch sent 10/19 has been insufficient.
Nevertheless first patch is still valid and should be kept.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: crash on remove
Stephen Hemminger [Mon, 22 Oct 2007 20:39:09 +0000 (13:39 -0700)]
sky2: crash on remove

Fix off-by one in remove logic that just got introduced.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoMIPSnet: Delete all the useless debugging printks.
Ralf Baechle [Mon, 22 Oct 2007 23:35:26 +0000 (00:35 +0100)]
MIPSnet: Delete all the useless debugging printks.

Plus minor formatting fixes.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoAR7 ethernet: small post-merge cleanups and fixes
Matteo Croce [Tue, 23 Oct 2007 17:12:22 +0000 (19:12 +0200)]
AR7 ethernet: small post-merge cleanups and fixes

Signed-off-by: Matteo Croce <technoboy85@gmail.com>
Signed-off-by: Eugene Konev <ejka@imfi.kspu.ru>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoMerge branch 'features' of git://farnsworth.org/dale/linux-2.6-mv643xx_eth into upstream
Jeff Garzik [Wed, 24 Oct 2007 00:15:54 +0000 (20:15 -0400)]
Merge branch 'features' of git://farnsworth.org/dale/linux-2.6-mv643xx_eth into upstream

17 years agoMerge branch 'bug-fixes' of git://farnsworth.org/dale/linux-2.6-mv643xx_eth into...
Jeff Garzik [Wed, 24 Oct 2007 00:15:05 +0000 (20:15 -0400)]
Merge branch 'bug-fixes' of git://farnsworth.org/dale/linux-2.6-mv643xx_eth into upstream

17 years agoMerge branch 'upstream-jeff' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu...
Jeff Garzik [Wed, 24 Oct 2007 00:13:24 +0000 (20:13 -0400)]
Merge branch 'upstream-jeff' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 into upstream

17 years ago[SPARC, XEN, NET/CXGB3] use irq_handler_t where appropriate
Jeff Garzik [Fri, 19 Oct 2007 07:12:20 +0000 (03:12 -0400)]
[SPARC, XEN, NET/CXGB3] use irq_handler_t where appropriate

Rather than hand-rolling our own prototype, make the code more
future-proof by using the standard irq_handler_t typedef.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agodrivers/char/riscom8: clean up irq handling
Jeff Garzik [Tue, 23 Oct 2007 23:12:11 +0000 (19:12 -0400)]
drivers/char/riscom8: clean up irq handling

Make irq handling more efficient, by passing board pointer via
request_irq() to our irq handler's dev_id argument.

This eliminates a table lookup upon each interrupt, and eliminates an
associated global variable (the table).

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoisdn/sc: irq handler clean
Jeff Garzik [Fri, 19 Oct 2007 23:31:27 +0000 (19:31 -0400)]
isdn/sc: irq handler clean

* pass card number to irq handler

* use card number in irq handler to avoid looping through each adapter

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoisdn/act2000: fix major bug. clean irq handler.
Jeff Garzik [Fri, 19 Oct 2007 23:30:28 +0000 (19:30 -0400)]
isdn/act2000: fix major bug. clean irq handler.

* invert sense of request_irq() test.  otherwise we will always fail,
  when IRQ is available.

* no need to use 'irq' function arg, its stored in a data struct already

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agochar/pcmcia/synclink_cs: trim trailing whitespace
Jeff Garzik [Fri, 19 Oct 2007 19:45:35 +0000 (15:45 -0400)]
char/pcmcia/synclink_cs: trim trailing whitespace

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agodrivers/char/ip2: separate polling and irq-driven work entry points
Jeff Garzik [Fri, 19 Oct 2007 19:38:40 +0000 (15:38 -0400)]
drivers/char/ip2: separate polling and irq-driven work entry points

Polling currently calls the irq handler, which loops through all the
boards, calling the work function for all polling boards with work.

irq handling loops through all the boards, finding the specific board
that applies to us, and calling the work just for that one board.

The two logics are sufficiently different to warrant different
functions, rather than being slack and calling the same function in two
different ways.

This serves to make the interrupt handler a -lot- more efficient.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agodrivers/char/ip2: split out irq core logic into separate function
Jeff Garzik [Fri, 19 Oct 2007 19:24:59 +0000 (15:24 -0400)]
drivers/char/ip2: split out irq core logic into separate function

No changes besides code movement and glue.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years ago[NETDRVR] lib82596, netxen: delete pointless tests from irq handler
Jeff Garzik [Fri, 19 Oct 2007 07:14:03 +0000 (03:14 -0400)]
[NETDRVR] lib82596, netxen: delete pointless tests from irq handler

Remove always-false tests in irq handler.

Also a few other minor cleanups.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoEliminate pointless casts from void* in a few driver irq handlers.
Jeff Garzik [Fri, 19 Oct 2007 07:10:11 +0000 (03:10 -0400)]
Eliminate pointless casts from void* in a few driver irq handlers.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years ago[PARPORT] Remove unused 'irq' argument from parport irq functions
Jeff Garzik [Fri, 19 Oct 2007 06:54:26 +0000 (02:54 -0400)]
[PARPORT] Remove unused 'irq' argument from parport irq functions

None of the drivers with a struct pardevice's ->irq_func() hook ever
used the 'irq' argument passed to it, so remove it.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years ago[PARPORT] Kill useful 'irq' arg from parport_{generic_irq,ieee1284_interrupt}
Jeff Garzik [Fri, 19 Oct 2007 05:56:02 +0000 (01:56 -0400)]
[PARPORT] Kill useful 'irq' arg from parport_{generic_irq,ieee1284_interrupt}

parport_ieee1284_interrupt() was not using its first arg at all.
Delete.

parport_generic_irq()'s second arg makes its first arg completely
redundant.  Delete, and use port->irq in the one place where we actually
need it.

Also, s/__inline__/inline/ to make the code look nicer.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years ago[PARPORT] Consolidate code copies into a single generic irq handler
Jeff Garzik [Fri, 19 Oct 2007 05:42:14 +0000 (01:42 -0400)]
[PARPORT] Consolidate code copies into a single generic irq handler

Several arches used the exact same code for their parport irq handling.
Make that code generic, in parport_irq_handler().

Also, s/__inline__/inline/ in include/linux/parport.h.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoNFS: Fix for bug in handling of errors for O_DIRECT writes
Neil Brown [Tue, 23 Oct 2007 21:09:13 +0000 (17:09 -0400)]
NFS: Fix for bug in handling of errors for O_DIRECT writes

Commit eda3cef8dd2b83875affe82595db9d0c278879b2 ("NFS: Fix error
handling in nfs_direct_write_result()") ensured that if a WRITE returns
an error, then data->res.verf->committed is not tested (as it is not
initialised).

Then commit 60fa3f769f7651a60125a0f44e3ffe3246d7cf39 ("NFS: Fix two bugs
in the O_DIRECT write code") inadvertently reverted this while fixing
other problems.

So move the test so that we never examine ->committed in an error case,
and fix a speeling error while we are there.

Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge ssh://master.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
Linus Torvalds [Tue, 23 Oct 2007 23:38:03 +0000 (16:38 -0700)]
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86

* ssh://master.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (35 commits)
  x86: Add HPET force support for MCP55 (nForce 5) chipsets
  x86: Force enable HPET for CK804 (nForce 4) chipsets
  x86: clean up setup.h and the boot code
  x86: Save registers in saved_context during suspend and hibernation
  x86: merge setup_32/64.h
  x86: merge signal_32/64.h
  x86: merge required-features.h
  x86: merge sigcontext_32/64.h
  x86: merge msr_32/64.h
  x86: merge mttr_32/64.h
  x86: merge statfs_32/64.h
  x86: merge stat_32/64.h
  x86: merge shmbuf_32/64.h
  x86: merge ptrace_32/64.h
  x86: merge msgbuf_32/64.h
  x86: merge elf_32/64.h
  x86: merge byteorder_32/64.h
  x86: whitespace cleanup of mce_64.c
  x86: consolidate the cpu/ related code usage
  x86: prepare consolidation of cpu/ related code usage
  ...

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Tue, 23 Oct 2007 23:37:29 +0000 (16:37 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (39 commits)
  [SCSI] qla2xxx: Update version number to 8.02.00-k5.
  [SCSI] qla2xxx: Correct display of ISP serial-number.
  [SCSI] qla2xxx: Correct residual-count handling discrepancies during UNDERRUN handling.
  [SCSI] qla2xxx: Make driver (mostly) legacy I/O port free.
  [SCSI] qla2xxx: Fix issue where final flash-segment updates were falling into the slow-path write handler.
  [SCSI] qla2xxx: Handle unaligned sector writes during NVRAM/VPD updates.
  [SCSI] qla2xxx: Defer explicit interrupt-polling processing to init-time scenarios.
  [SCSI] qla2xxx: Resync with latest HBA SSID specification -- 2.2u.
  [SCSI] sym53c8xx: Remove sym_xpt_async_sent_bdr
  [SCSI] sym53c8xx: Remove pci_dev pointer from sym_shcb
  [SCSI] sym53c8xx: Make interrupt handler capable of returning IRQ_NONE
  [SCSI] sym53c8xx: Get rid of IRQ_FMT and IRQ_PRM
  [SCSI] sym53c8xx: Use scmd_printk where appropriate
  [SCSI] sym53c8xx: Simplify DAC DMA handling
  [SCSI] sym53c8xx: Remove tag_ctrl module parameter
  [SCSI] sym53c8xx: Remove io_ws, mmio_ws and ram_ws elements
  [SCSI] sym53c8xx: Remove ->device_id
  [SCSI] sym53c8xx: Use pdev->revision
  [SCSI] sym53c8xx: PCI Error Recovery support
  [SCSI] sym53c8xx: Stop overriding scsi_done
  ...

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Tue, 23 Oct 2007 23:36:30 +0000 (16:36 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] Documentation/watchdog/src/watchdog-simple.c: improve this code
  [WATCHDOG] AR7: watchdog timer
  [WATCHDOG] Linux kernel IPC SBC Watchdog Timer driver

17 years agoMerge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Tue, 23 Oct 2007 23:32:11 +0000 (16:32 -0700)]
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4630/1: Fix the vector stride of the double vector instruction.
  [ARM] 4629/1: Fix VFP emulation code to clear all exception flags of FPEXC
  [ARM] 4613/1: pxa300: MFP typo fix

17 years agox86: Add HPET force support for MCP55 (nForce 5) chipsets
Carlos Corbacho [Fri, 19 Oct 2007 18:34:15 +0000 (19:34 +0100)]
x86: Add HPET force support for MCP55 (nForce 5) chipsets

Add support to force_hpet for all known MCP55 (nForce 5) chipset
LPC bridges.

These are the untested nForce 5 chips (taken from Mikko's original
patch, and checked against pci.ids).

Signed-off-by: Carlos Corbacho <cathectic@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
 arch/x86/kernel/quirks.c |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

17 years agox86: Force enable HPET for CK804 (nForce 4) chipsets
Carlos Corbacho [Fri, 19 Oct 2007 17:51:27 +0000 (18:51 +0100)]
x86: Force enable HPET for CK804 (nForce 4) chipsets

This patch adds a quirk from LinuxBIOS to force enable HPET on
the nVidia CK804 (nForce 4) chipset.

This quirk can very likely support more than just nForce 4
(LinuxBIOS use the same code for nForce 5), and possibly nForce 3,
but I don't have those chipsets, so cannot add and test them.

Tested on an Abit KN9 (CK804).

Signed-off-by: Carlos Corbacho <cathectic@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
 Documentation/kernel-parameters.txt |    3 +-
 arch/x86/kernel/quirks.c            |   37 +++++++++++++++++++++++++++++++++++-
 2 files changed, 38 insertions(+), 2 deletions(-)

17 years agox86: clean up setup.h and the boot code
H. Peter Anvin [Tue, 23 Oct 2007 20:37:25 +0000 (22:37 +0200)]
x86: clean up setup.h and the boot code

Make <asm/setup.h> usable by the boot code.

Clean up vestiges of the old command-line protocol from setup.h and
head_32.S (it is still supported from the boot loader point of
view, since it is converted to the new command-line protocol by the
boot code.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: Save registers in saved_context during suspend and hibernation
Rafael J. Wysocki [Tue, 23 Oct 2007 20:37:24 +0000 (22:37 +0200)]
x86: Save registers in saved_context during suspend and hibernation

During hibernation and suspend on x86_64 save CPU registers in the saved_context
structure rather than in a handful of separate variables.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge setup_32/64.h
Thomas Gleixner [Tue, 23 Oct 2007 20:37:24 +0000 (22:37 +0200)]
x86: merge setup_32/64.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge signal_32/64.h
Thomas Gleixner [Tue, 23 Oct 2007 20:37:24 +0000 (22:37 +0200)]
x86: merge signal_32/64.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge required-features.h
Brian Gerst [Sat, 20 Oct 2007 17:41:41 +0000 (13:41 -0400)]
x86: merge required-features.h

Signed-off-by: Brian Gerst <bgerst@didntduck.org>
17 years agox86: merge sigcontext_32/64.h
Thomas Gleixner [Tue, 23 Oct 2007 20:37:24 +0000 (22:37 +0200)]
x86: merge sigcontext_32/64.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge msr_32/64.h
Thomas Gleixner [Tue, 23 Oct 2007 20:37:24 +0000 (22:37 +0200)]
x86: merge msr_32/64.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge mttr_32/64.h
Thomas Gleixner [Tue, 23 Oct 2007 20:37:24 +0000 (22:37 +0200)]
x86: merge mttr_32/64.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge statfs_32/64.h
Thomas Gleixner [Tue, 23 Oct 2007 20:37:24 +0000 (22:37 +0200)]
x86: merge statfs_32/64.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge stat_32/64.h
Thomas Gleixner [Tue, 23 Oct 2007 20:37:24 +0000 (22:37 +0200)]
x86: merge stat_32/64.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge shmbuf_32/64.h
Thomas Gleixner [Tue, 23 Oct 2007 20:37:24 +0000 (22:37 +0200)]
x86: merge shmbuf_32/64.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge ptrace_32/64.h
Thomas Gleixner [Tue, 23 Oct 2007 20:37:24 +0000 (22:37 +0200)]
x86: merge ptrace_32/64.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge msgbuf_32/64.h
Thomas Gleixner [Tue, 23 Oct 2007 20:37:24 +0000 (22:37 +0200)]
x86: merge msgbuf_32/64.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge elf_32/64.h
Thomas Gleixner [Tue, 23 Oct 2007 20:37:23 +0000 (22:37 +0200)]
x86: merge elf_32/64.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge byteorder_32/64.h
Thomas Gleixner [Tue, 23 Oct 2007 20:37:23 +0000 (22:37 +0200)]
x86: merge byteorder_32/64.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: whitespace cleanup of mce_64.c
Thomas Gleixner [Tue, 23 Oct 2007 20:37:23 +0000 (22:37 +0200)]
x86: whitespace cleanup of mce_64.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: consolidate the cpu/ related code usage
Thomas Gleixner [Tue, 23 Oct 2007 20:37:23 +0000 (22:37 +0200)]
x86: consolidate the cpu/ related code usage

The x86_64 arch/x86/kernel/Makefile uses references into
arch/x86/kernel/cpu/... to use code from there.

Unifiy it with the nicely structured i386 way and reuse the existing
subdirectory make rules.

Also move the machine check related source into ...kernel/cpu/mcheck,
where the other machine check related code is.

No code change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: prepare consolidation of cpu/ related code usage
Thomas Gleixner [Tue, 23 Oct 2007 20:37:23 +0000 (22:37 +0200)]
x86: prepare consolidation of cpu/ related code usage

Move mce.c to mce_32.c to allow the later move of the x86_64 mce.c
from arch/x86/kernel/ to ...kernel/cpu/mcheck

No code change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: prepare consolidation of cpu/ related Makefiles
Thomas Gleixner [Tue, 23 Oct 2007 20:37:23 +0000 (22:37 +0200)]
x86: prepare consolidation of cpu/ related Makefiles

Prepare the makefiles in x86/kernel/cpu and x86/kernel/cpu/mcheck to
be used by the x86_64 build as well.

No code change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: Unify arch/x86/kernel/acpi Makefiles
Thomas Gleixner [Tue, 23 Oct 2007 20:37:23 +0000 (22:37 +0200)]
x86: Unify arch/x86/kernel/acpi Makefiles

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: merge arch/x86/crypto Makefiles
Thomas Gleixner [Tue, 23 Oct 2007 20:37:23 +0000 (22:37 +0200)]
x86: merge arch/x86/crypto Makefiles

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: Add BITS to allow simple Makefile sharing
Thomas Gleixner [Tue, 23 Oct 2007 20:37:23 +0000 (22:37 +0200)]
x86: Add BITS to allow simple Makefile sharing

Preperatory patch to simplify the sharing of Makefiles in
arch/x86.

Linus came up with this during a discussion about the ugliness of
ifeq($CONFIG_X86_32),y) and obj-$(CONFIG_X86_32) in the shared
Makefiles.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: unify div64{,_32,_64}.h
Chris Snook [Sat, 20 Oct 2007 11:51:29 +0000 (07:51 -0400)]
x86: unify div64{,_32,_64}.h

Unify x86 div64.h headers.

Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify a.out{,_32,_64}.h
Chris Snook [Sat, 20 Oct 2007 10:37:01 +0000 (06:37 -0400)]
x86: unify a.out{,_32,_64}.h

Unify x86 a.out_32.h and a.out_64.h

[ tglx: Kbuild fixup ]

Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify crash_32/64.c
Hiroshi Shimamoto [Sat, 20 Oct 2007 01:24:20 +0000 (18:24 -0700)]
x86: unify crash_32/64.c

Most of contents in crash are same.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: add safe_smp_processor_id for x86_64
Hiroshi Shimamoto [Sat, 20 Oct 2007 01:23:02 +0000 (18:23 -0700)]
x86: add safe_smp_processor_id for x86_64

Preperatory patch to allow crash_32/64.c merging

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: add lapic_shutdown for x86_64
Hiroshi Shimamoto [Sat, 20 Oct 2007 01:21:11 +0000 (18:21 -0700)]
x86: add lapic_shutdown for x86_64

Preperatory patch to allow crash_32/64.c merging

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: merge mmu{,_32,_64}.h
Chris Snook [Sat, 20 Oct 2007 06:56:59 +0000 (02:56 -0400)]
x86: merge mmu{,_32,_64}.h

Merge mmu_32.h and mmu_64.h into mmu.h.

Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: ARRAY_SIZE cleanup
Alejandro Martinez Ruiz [Wed, 17 Oct 2007 12:38:58 +0000 (14:38 +0200)]
x86: ARRAY_SIZE cleanup

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: fix more TSC clock source calibration errors
Dave Johnson [Tue, 23 Oct 2007 20:37:22 +0000 (22:37 +0200)]
x86: fix more TSC clock source calibration errors

The previous patch wasn't correctly handling the 'count' variable.  If
a CPU gave bad results on the 1st or 2nd run but good results on the
3rd, it wouldn't do the correct thing.  No idea if any such CPU
exists, but the patch below handles that case by discarding the bad
runs.

If a bad result (too quick, or too slow) occurs on any of the 3 runs
it will be discarded.

Also updated some comments to explain what's going on.

Signed-off-by: Dave Johnson <djohnson@sw.starentnetworks.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: fix TSC clock source calibration error
Dave Johnson [Tue, 23 Oct 2007 20:37:22 +0000 (22:37 +0200)]
x86: fix TSC clock source calibration error

I ran into this problem on a system that was unable to obtain NTP sync
because the clock was running very slow (over 10000ppm slow). ntpd had
declared all of its peers 'reject' with 'peer_dist' reason.

On investigation, the tsc_khz variable was significantly incorrect
causing xtime to run slow.  After a reboot tsc_khz was correct so I
did a reboot test to see how often the problem occurred:

Test was done on a 2000 Mhz Xeon system.  Of 689 reboots, 8 of them
had unacceptable tsc_khz values (>500ppm):

 range of tsc_khz  # of boots  % of boots
 ----------------  ----------  ----------
        < 1999750           0      0.000%
1999750 - 1999800          21      3.048%
1999800 - 1999850         166     24.128%
1999850 - 1999900         241     35.029%
1999900 - 1999950         211     30.669%
1999950 - 2000000          42      6.105%
2000000 - 2000000           0      0.000%
2000050 - 2000100           0      0.000%
                   [...]
2000100 - 2015000           1      0.145%  << BAD
2015000 - 2030000           6      0.872%  << BAD
2030000 - 2045000           1      0.145%  << BAD
2045000 <                   0      0.000%

The worst boot was 2032.577 Mhz, over 1.5% off!

It appears that on rare occasions, mach_countup() is taking longer to
complete than necessary.

I suspect that this is caused by the CPU taking a periodic SMI
interrupt right at the end of the 30ms calibration loop.  This would
cause the loop to delay while the SMI BIOS hander runs. The resulting
TSC value is beyond what it actually should be resulting in a higher
tsc_khz.

The below patch makes native_calculate_cpu_khz() take the best
(shortest duration, lowest khz) run of it's 3 calibration loops.  If a
SMI goes off causing a bad result (long duration, higher khz) it will
be discarded.

With the patch applied, 300 boots of the same system produce good
results:

 range of tsc_khz  # of boots  % of boots
 ----------------  ----------  ----------
        < 1999750           0      0.000%
1999750 - 1999800          30     10.000%
1999800 - 1999850         166     55.333%
1999850 - 1999900          89     29.667%
1999900 - 1999950          15      5.000%
1999950 <                   0      0.000%

Problem was found and tested against 2.6.18.  Patch is against 2.6.22.

Signed-off-by: Dave Johnson <djohnson@sw.starentnetworks.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: lock bitops
Nick Piggin [Fri, 19 Oct 2007 05:13:02 +0000 (07:13 +0200)]
x86: lock bitops

I missed an obvious one!

x86 CPUs are defined not to reorder stores past earlier loads, so there is
no hardware memory barrier required to implement a release-consistent store
(all stores are, by definition).

So ditch the generic lock bitops, and implement optimised versions for x86,
which removes the mfence from __clear_bit_unlock (which is already a useful
primitive for SLUB).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: add instrumentation menu
Adrian Bunk [Mon, 22 Oct 2007 02:48:08 +0000 (04:48 +0200)]
x86: add instrumentation menu

It seems commit 09cadedbdc01f1a4bea1f427d4fb4642eaa19da9 was incomplete
due to a clash with the x86 architecture merge.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years ago[WATCHDOG] Documentation/watchdog/src/watchdog-simple.c: improve this code
WANG Cong [Sat, 6 Oct 2007 03:17:13 +0000 (11:17 +0800)]
[WATCHDOG] Documentation/watchdog/src/watchdog-simple.c: improve this code

Make some improvements for Documentation/watchdog/src/watchdog-simple.c.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
17 years ago[WATCHDOG] AR7: watchdog timer
Matteo Croce [Thu, 20 Sep 2007 16:06:41 +0000 (18:06 +0200)]
[WATCHDOG] AR7: watchdog timer

Driver for the watchdog timer. Still doesn't reboots the machine
on some boards, but we have improved and cleaned it

Signed-off-by: Matteo Croce <technoboy85@gmail.com>
Signed-off-by: Nicolas Thill <nico@openwrt.org>
Signed-off-by: Enrik Berkhan <Enrik.Berkhan@akk.org>
Signed-off-by: Christer Weinigel <wingel@nano-system.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG] Linux kernel IPC SBC Watchdog Timer driver
Veljkovic Srdjan [Wed, 12 Sep 2007 13:22:26 +0000 (15:22 +0200)]
[WATCHDOG] Linux kernel IPC SBC Watchdog Timer driver

ICP's Wafer 5823 SBC has, as far as I can tell, the same WDT as many,
if not all ICP's SBC's (that do have a WDT). I have tested it with
several boards, including Rocky 4783, Rocky 3703 and Rocky 3782.

I propose a rename of the  Wafer 5823 watchdog timer driver
to something like "IPC (SBC) Watchdog Timer", to reflect that it
works with other IPC boards (maybe even all of them).

Signed-off-by: Veljkovic Srdjan <sveljko@gvs.co.yu>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[SCSI] qla2xxx: Update version number to 8.02.00-k5.
Andrew Vasquez [Fri, 19 Oct 2007 22:59:20 +0000 (15:59 -0700)]
[SCSI] qla2xxx: Update version number to 8.02.00-k5.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Correct display of ISP serial-number.
Andrew Vasquez [Fri, 19 Oct 2007 22:59:19 +0000 (15:59 -0700)]
[SCSI] qla2xxx: Correct display of ISP serial-number.

The original serial-number calculations based on WWPN no longer
apply to newer ISPs (ISP24xx and ISP25xx).  These newer board's
serial number reside in the VPD.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>