firefly-linux-kernel-4.4.55.git
17 years agosky2: add support for read/write of EEPROM
Stephen Hemminger [Mon, 9 Jul 2007 22:33:39 +0000 (15:33 -0700)]
sky2: add support for read/write of EEPROM

Add get/set eeprom support for sky2.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: unmark as EXPERIMENTAL
Stephen Hemminger [Mon, 9 Jul 2007 22:33:38 +0000 (15:33 -0700)]
sky2: unmark as EXPERIMENTAL

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: receive fill
Stephen Hemminger [Mon, 9 Jul 2007 22:33:37 +0000 (15:33 -0700)]
sky2: receive fill

Simplify receive buffer refill logic. Rather than trying to update
incrementally; do receive ring refill at end of receive processing.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: check for more work before leaving NAPI
Stephen Hemminger [Mon, 9 Jul 2007 22:33:36 +0000 (15:33 -0700)]
sky2: check for more work before leaving NAPI

This patch avoids generating another IRQ if more packets
arrive while in the NAPI poll routine. Before marking device as
finished, it rechecks that the status ring is empty.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: debug interface
Stephen Hemminger [Mon, 9 Jul 2007 22:33:35 +0000 (15:33 -0700)]
sky2: debug interface

Add an optional debug interface for displaying state of transmit/receive
rings. Creates a file debugfs/sky2/ethX for each device that is up.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: carrier management
Stephen Hemminger [Mon, 9 Jul 2007 22:33:34 +0000 (15:33 -0700)]
sky2: carrier management

Make sky2 handle carrier similar to other drivers,
eliminate some possible races in carrier state transistions.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: restore workarounds for lost interrupts
Stephen Hemminger [Mon, 9 Jul 2007 22:33:33 +0000 (15:33 -0700)]
sky2: restore workarounds for lost interrupts

This patch restores a couple of workarounds from 2.6.16:
 * restart transmit moderation timer in case it expires during IRQ routine
 * default to having 10 HZ watchdog timer.
At this point it more important not to hang than to worry about the
power cost.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Mon, 9 Jul 2007 22:50:56 +0000 (15:50 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (31 commits)
  firewire: fw-sbp2: fix DMA mapping of management ORBs
  firewire: fw-sbp2: fix DMA mapping of command ORBs
  firewire: fw-sbp2: fix DMA mapping of S/G tables
  firewire: fw-sbp2: add a boundary check
  firewire: fw-sbp2: correctly align page tables
  firewire: fw-sbp2: memset wants string.h
  firewire: fw-sbp2: use correct speed in sbp2_agent_reset
  firewire: fw-sbp2: correctly dereference by container_of
  firewire: Document userspace ioctl interface.
  firewire: fw-sbp2: implement nonexclusive login
  firewire: fw-sbp2: let SCSI shutdown commands through before logout
  firewire: fw-sbp2: implement max sectors limit for some old bridges
  firewire: simplify a struct type
  firewire: support S100B...S400B and link slower than PHY
  firewire: optimize gap count with 1394b leaf nodes
  firewire: remove unused macro
  firewire: missing newline in printk
  firewire: fw-sbp2: remove unused struct member
  ieee1394: remove old isochronous ABI
  ieee1394: sbp2: change some module parameters from int to bool
  ...

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Mon, 9 Jul 2007 22:50:31 +0000 (15:50 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: handle cases of volume knobs generating relative values
  HID: Logitech keyboard 0xc311 needs reset leds quirk
  HID: support for logitech cordless desktop LX500 special mapping
  HID: fix autocentering of PID devices
  HID: separate quirks for report descriptor fixup
  HID: Add NOGET quirk for all NCR devices
  HID: support for Petalynx Maxter remote control
  HID: fix mismatch between hid-input HUT find/search mapping and the HUT
  HID: support for Gameron dual psx adaptor
  USB HID: avoid flush_scheduled_work()
  HID: Use menuconfig objects
  HID: force hid-input for Microsoft SideWinder GameVoice device
  HID: input mapping for Chicony KU-0418 tactical pad
  HID: make debugging output runtime-configurable

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Mon, 9 Jul 2007 22:26:43 +0000 (15:26 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (75 commits)
  Ethernet driver for EISA only SNI RM200/RM400 machines
  Extract chip specific code out of lasi_82596.c
  ehea: Whitespace cleanup
  pasemi_mac: Fix TX interrupt threshold
  spidernet: Replace literal with const
  r8169: perform RX config change after mac filtering
  r8169: mac address change support
  r8169: display some extra debug information during startup
  r8169: add endianess annotations to [RT]xDesc
  r8169: align the IP header when there is no DMA constraint
  r8169: add bit description for the TxPoll register
  r8169: cleanup
  r8169: remove the media option
  r8169: small 8101 comment
  r8169: confusion between hardware and IP header alignment
  r8169: merge with version 8.001.00 of Realtek's r8168 driver
  r8169: merge with version 6.001.00 of Realtek's r8169 driver
  r8169: prettify mac_version
  r8169: populate the hw_start handler for the 8110
  r8169: populate the hw_start handler for the 8168
  ...

17 years agofirewire: fw-sbp2: fix DMA mapping of management ORBs
Stefan Richter [Mon, 2 Jul 2007 19:04:44 +0000 (21:04 +0200)]
firewire: fw-sbp2: fix DMA mapping of management ORBs

The CPU must not touch the buffer after it was DMA-mapped.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: fw-sbp2: fix DMA mapping of command ORBs
Stefan Richter [Mon, 2 Jul 2007 19:04:08 +0000 (21:04 +0200)]
firewire: fw-sbp2: fix DMA mapping of command ORBs

The CPU must not touch the buffer after it was DMA-mapped.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: fw-sbp2: fix DMA mapping of S/G tables
Stefan Richter [Mon, 2 Jul 2007 20:07:34 +0000 (22:07 +0200)]
firewire: fw-sbp2: fix DMA mapping of S/G tables

  - The CPU must not touch the buffer after it was DMA-mapped.
  - The size argument of dma_unmap_single(...page_table...) was bogus.
  - Move a comment closer to the code to which it refers to.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: fw-sbp2: add a boundary check
Stefan Richter [Sun, 1 Jul 2007 11:56:03 +0000 (13:56 +0200)]
firewire: fw-sbp2: add a boundary check

Add rudimentary check for the case that the page table overflows due to
merging of s/g elements by the IOMMU.  This would have lead to
overwriting of arbitrary memory.

After this change I expect that an offending command will be
unsuccessfully retried until the scsi_device is taken offline by SCSI
core.  It's a border case and not worth to implement a recovery
strategy.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: fw-sbp2: correctly align page tables
Stefan Richter [Sun, 1 Jul 2007 11:55:31 +0000 (13:55 +0200)]
firewire: fw-sbp2: correctly align page tables

This is required per SBP-2 clause 5.2.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: fw-sbp2: memset wants string.h
Stefan Richter [Sun, 1 Jul 2007 11:54:57 +0000 (13:54 +0200)]
firewire: fw-sbp2: memset wants string.h

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: fw-sbp2: use correct speed in sbp2_agent_reset
Stefan Richter [Sun, 1 Jul 2007 11:54:24 +0000 (13:54 +0200)]
firewire: fw-sbp2: use correct speed in sbp2_agent_reset

noticed by Jay Fenlason

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: fw-sbp2: correctly dereference by container_of
Jay Fenlason [Wed, 27 Jun 2007 20:04:33 +0000 (16:04 -0400)]
firewire: fw-sbp2: correctly dereference by container_of

Replace a cast with a container_of().  As long as nobody reorders the
structure elements, they do the same thing, but container_of() is more
readable.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (added complete_command_orb)
Acked-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: Document userspace ioctl interface.
Kristian Høgsberg [Thu, 21 Jun 2007 22:20:34 +0000 (00:20 +0200)]
firewire: Document userspace ioctl interface.

The isochronous packet format is still not documented, but this
is a good first step.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (format, wording)
17 years agofirewire: fw-sbp2: implement nonexclusive login
Stefan Richter [Sun, 17 Jun 2007 21:55:41 +0000 (23:55 +0200)]
firewire: fw-sbp2: implement nonexclusive login

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: fw-sbp2: let SCSI shutdown commands through before logout
Stefan Richter [Mon, 18 Jun 2007 16:46:49 +0000 (18:46 +0200)]
firewire: fw-sbp2: let SCSI shutdown commands through before logout

This affects of course only the "soft shutdown" case, e.g. "modprobe -r
firewire-sbp2", while it doesn't matter for hot unplug.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: fw-sbp2: implement max sectors limit for some old bridges
Stefan Richter [Sun, 17 Jun 2007 21:52:08 +0000 (23:52 +0200)]
firewire: fw-sbp2: implement max sectors limit for some old bridges

This currently only affects one bridge in the hardwired blacklist.
I don't own one of those, hence haven't tested it.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: simplify a struct type
Stefan Richter [Sun, 17 Jun 2007 21:39:58 +0000 (23:39 +0200)]
firewire: simplify a struct type

cleanup after "firewire: support S100B...S400B and link slower than PHY"

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: support S100B...S400B and link slower than PHY
Stefan Richter [Sun, 10 Jun 2007 19:31:36 +0000 (21:31 +0200)]
firewire: support S100B...S400B and link slower than PHY

Use a speed probe to determine the speed over 1394b buses and of nodes
which report a link speed less than their PHY speed.

Log the effective maximum speed of newly created nodes in dmesg.

Also, read the config ROM (except bus info block) at the maximum speed
rather than S100.  This isn't a real optimization though because we
still only use quadlet read requests for the entire ROM.

The patch also adds support for S1600 and S3200, although such hardware
does not exist yet.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: optimize gap count with 1394b leaf nodes
Stefan Richter [Mon, 18 Jun 2007 17:44:12 +0000 (19:44 +0200)]
firewire: optimize gap count with 1394b leaf nodes

Table-based gap count optimization cannot be used if 1394b repeater PHYs
are present.  But it does work with 1394b leaf nodes.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
17 years agofirewire: remove unused macro
Stefan Richter [Sat, 9 Jun 2007 17:27:07 +0000 (19:27 +0200)]
firewire: remove unused macro

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: missing newline in printk
Stefan Richter [Sat, 9 Jun 2007 17:26:22 +0000 (19:26 +0200)]
firewire: missing newline in printk

Also remove some errno printouts which will be shown by infrastructure
code anyway.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: fw-sbp2: remove unused struct member
Stefan Richter [Fri, 11 May 2007 21:04:08 +0000 (23:04 +0200)]
firewire: fw-sbp2: remove unused struct member

cleanup after support of single-buffer requests was dropped

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
17 years agoieee1394: remove old isochronous ABI
Stefan Richter [Sun, 24 Jun 2007 13:31:54 +0000 (15:31 +0200)]
ieee1394: remove old isochronous ABI

Based on patch "the scheduled removal of RAW1394_REQ_ISO_{SEND,LISTEN}"
from Adrian Bunk, November 20 2006.

This patch also removes the underlying facilities in ohci1394 and
disables them in pcilynx.  That is, hpsb_host_driver.devctl() and
hpsb_host_driver.transmit_packet() are no longer used for iso reception
and transmission.

Since video1394 and dv1394 only work with ohci1394 and raw1394's rawiso
interface has never been implemented in pcilynx, pcilynx is now no
longer useful for isochronous applications.

raw1394 will still handle the request types but will complete the
requests with errors that indicate API version conflicts.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: sbp2: change some module parameters from int to bool
Stefan Richter [Sun, 17 Jun 2007 21:54:52 +0000 (23:54 +0200)]
ieee1394: sbp2: change some module parameters from int to bool

This is upwards compatible, except that integer values other than 0 or 1
are no longer accepted.  But values like "Y", "N", "no", "nnoooh!" work
now.

Also, improve a comment on the serialize_io parameter and make the
ORB_SET_EXCLUSIVE macro ultra-safe.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: first minimal NUMA awareness
Stefan Richter [Sun, 8 Jul 2007 11:34:21 +0000 (13:34 +0200)]
ieee1394: first minimal NUMA awareness

Association of a host device with a node on NUMA machines optimizes
allocations of skbs given from the networking stack to eth1394.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: revert parent device to that in 2.6.20
Stefan Richter [Sun, 27 May 2007 21:14:05 +0000 (23:14 +0200)]
ieee1394: eth1394: revert parent device to that in 2.6.20

After ieee1394 was converted away from class_device like the networking
subsystem was already in 2.6.21, eth1394's device may point to the
fw-host device as its parent again like in 2.6.20.

This affects userspace tools which examine the sysfs representation of
eth1394's device.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: nodemgr: parallelize between several hosts
Stefan Richter [Sun, 17 Jun 2007 21:47:45 +0000 (23:47 +0200)]
ieee1394: nodemgr: parallelize between several hosts

Remove the global nodemgr_serialize mutex which enclosed most of the
host thread event loop.  This allows for parallelism between several
host adapter cards.

Properly serialize the driver hooks .update(), .suspend(), .resume(),
and .remove() by means of device->sem.  These hooks can be called from
outside the host threads' contexts.

Get() and put() the device.driver when calling its hooks.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: convert ieee1394 from "struct class_device" to "struct device"
Kay Sievers [Fri, 25 May 2007 09:50:53 +0000 (11:50 +0200)]
ieee1394: convert ieee1394 from "struct class_device" to "struct device"

Here is a straightforward conversion to "struct device". The "struct
class_device" will be removed from the kernel.

It seems to work fine for me with and without CONFIG_SYSFS_DEPRECATED
set.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: raw1394: fix a 32/64-bits compat fix
Stefan Richter [Wed, 4 Jul 2007 21:13:53 +0000 (23:13 +0200)]
ieee1394: raw1394: fix a 32/64-bits compat fix

I was told that only i386 aligns 64 bit integers at 4 bytes boundaries
while all other architectures (32 bit architectures with 64 bit
siblings) align it on 8 bytes boundaries.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel, amendment
Stefan Richter [Mon, 21 May 2007 16:52:06 +0000 (18:52 +0200)]
ieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel, amendment

Pointed out by Arnd Bergmann:  PPC32 aligns this at 64bit, IA32 packs
it.  A kernel-wide available __compat_u64 which is 4-byte aligned on
AMD64 and IA64 would be nicer though.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel
Petr Vandrovec [Mon, 7 May 2007 02:14:47 +0000 (04:14 +0200)]
ieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel

Add compat_ioctl.  Although all structures are more or less same,
raw1394_iso_packets got pointer inside, and raw1394_cycle_timer got unwanted
padding in the middle.  I did not add any translation for ioctls passing array
of integers around as integers seem to have same size (32 bits) on all
architectures supported by Linux.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Acked-by: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (split into 3 patches)
17 years agoieee1394: raw1394: Fix write() for 32bit userland on 64bit kernel
Petr Vandrovec [Mon, 7 May 2007 02:14:47 +0000 (04:14 +0200)]
ieee1394: raw1394: Fix write() for 32bit userland on 64bit kernel

* write(fd, buf, 52) from 32bit app was returning 56.  Most of callers did not
  care, but some (arm registration) did, and anyway it looks bad if request for
  writing 52 bytes returns 56.  And returning sizeof anything in 'int' is not
  good as well.  So all functions now return '0' instead of
  sizeof(struct raw1394_request) on success, and write() itself provides correct
  return value (it just returns value it was asked to write on success as raw1394
  does not do any partial writes at all).

* Related to this was problem that write() could have returned 0 when kernel
  state would become corrupted and moved to different state than
  opened/initialized/connected.  Now it returns -EBADFD which seemed appropriate.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Acked-by: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (split into 3 patches)
17 years agoieee1394: raw1394: Fix read() for 32bit userland on 64bit kernel
Petr Vandrovec [Mon, 7 May 2007 02:14:47 +0000 (04:14 +0200)]
ieee1394: raw1394: Fix read() for 32bit userland on 64bit kernel

read() always failed with -EFAULT.  This was happening due to
raw1394_compat_read copying data to wrong location - access_ok always
failed as 'r' is kernel address, not user.  Whole function just tried to
copy data from 'r' to 'r', which is not good.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Acked-by: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (split into 3 patches)
17 years agoieee1394: add comments in struct hpsb_packet
Stefan Richter [Sat, 19 May 2007 10:29:37 +0000 (12:29 +0200)]
ieee1394: add comments in struct hpsb_packet

to clarify who is supposed to set what

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: ohci1394: remove dead CONFIG variable
Stefan Richter [Thu, 3 May 2007 18:24:19 +0000 (20:24 +0200)]
ieee1394: ohci1394: remove dead CONFIG variable

spotted by Robert P. J. Day <rpjday@mindspring.com>

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agodrivers/ide/ide-dma.c: unexport ide_set_dma
Adrian Bunk [Mon, 9 Jul 2007 21:17:59 +0000 (23:17 +0200)]
drivers/ide/ide-dma.c: unexport ide_set_dma

ide_set_dma no longer has any modular user.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agovia82cxxx: backport short cables support from pata_via.c
Bartlomiej Zolnierkiewicz [Mon, 9 Jul 2007 21:17:58 +0000 (23:17 +0200)]
via82cxxx: backport short cables support from pata_via.c

Backport short cables support from pata_via.c.

This patch should allow UDMA > 2 modes on Acer Ferrari 3400.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
17 years agosis5513: backport short cables support from pata_sis.c
Bartlomiej Zolnierkiewicz [Mon, 9 Jul 2007 21:17:58 +0000 (23:17 +0200)]
sis5513: backport short cables support from pata_sis.c

Backport short cables support from pata_sis.c.

This patch allows UDMA > 2 modes on ASUS A6K.

Thanks to testing this patch goes out to Jiri Stavinoha.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
17 years agoalim15x3: backport short cables support from pata_ali.c
Bartlomiej Zolnierkiewicz [Mon, 9 Jul 2007 21:17:58 +0000 (23:17 +0200)]
alim15x3: backport short cables support from pata_ali.c

Backport short cables support from pata_ali.c and while at it cleanup
existing cable detection code.

This patch should allow UDMA > 2 modes on HP Pavilion N5430 and Fujitsu P2000.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
17 years agopiix: backport short cables support from ata_piix.c
Bartlomiej Zolnierkiewicz [Mon, 9 Jul 2007 21:17:58 +0000 (23:17 +0200)]
piix: backport short cables support from ata_piix.c

Backport short cables support from ata_piix.c.

This patch should allow UDMA > 2 modes on:
- Acer 5602WLMi
- Acer 3682WLMi
- Asus W5F
- Acer Aspire 2023WLMi

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
17 years agoide: add short cables support
Bartlomiej Zolnierkiewicz [Mon, 9 Jul 2007 21:17:58 +0000 (23:17 +0200)]
ide: add short cables support

This patch allows users to override both host and device side cable detection
with "ideX=ata66" kernel parameter.  Thanks to this it should be now possible
to use UDMA > 2 modes on systems (laptops mainly) which use short 40-pin cable
instead of 80-pin one.

Next patches add automatic detection of some systems using short cables.

Changes:

* Rename hwif->udma_four to hwif->cbl and make it u8.

* Convert all existing users accordingly (use ATA_CBL_* defines while at it).

* Add ATA_CBL_PATA40_SHORT support to ide-iops.c:eighty_ninty_three().

* Use ATA_CBL_PATA40_SHORT for "ideX=ata66" kernel parameter.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
17 years agoide: convert ide_find_best_mode() users to use ide_max_dma_mode()
Bartlomiej Zolnierkiewicz [Mon, 9 Jul 2007 21:17:57 +0000 (23:17 +0200)]
ide: convert ide_find_best_mode() users to use ide_max_dma_mode()

ide-timing.h:

* remove handling of DMA modes from ide_find_best_mode() and rename it to
  ide_find_best_pio_mode()

* drop no longer needed "map" argument from ide_find_best_pio_mode()
  and delete needless ->id check

* remove no longer needed XFER_SWDMA and XFER_UDMA* defines

au1xxx-ide.c:

* use ide_max_dma_mode() instead of ide_find_best_mode()

* remove needless CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA #ifdef

amd74xx.c:

* store UDMA masks in amd_ide_chip[] and while at it make "base" field
  to be u8 instead of unsigned long

* convert the driver to use UDMA masks from amd_ide_chip[]

* use ide_max_dma_mode() and ide_find_best_pio_mode() instead
  of ide_find_best_mode()

* delete stale comment from amd74xx_ide_dma_check()

* remove no longer needed AMD_UDMA* defines

via82cxxx.c:

* remove unused DISPLAY_VIA_TIMINGS define

* store UDMA masks in via_isa_bridges[] and while at it make "flags" field
  to be u8 instead of u16

* convert the driver to use UDMA masks from via_isa_bridges[]

* use ide_max_dma_mode() and ide_find_best_pio_mode() instead
  of ide_find_best_mode()

* remove no longer needed VIA_UDMA* defines

pmac.c:

* use ide_max_dma_mode() instead of ide_find_best_mode()

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
17 years agoide: fix pre-EIDE SWDMA support
Bartlomiej Zolnierkiewicz [Mon, 9 Jul 2007 21:17:57 +0000 (23:17 +0200)]
ide: fix pre-EIDE SWDMA support

If the word 62 is not defined use the word 52 to get SWDMA mask
in ide_get_mode_mask().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agodrivers/ide/legacy/hd.c: Array size calculation using sizeof replaced with ARRAY_SIZE
Andi Drebes [Mon, 9 Jul 2007 21:17:57 +0000 (23:17 +0200)]
drivers/ide/legacy/hd.c: Array size calculation using sizeof replaced with ARRAY_SIZE

This patch replaces an array size calculation in drivers/ide/legacy/hd.c
that was done using sizeof with the ARRAY_SIZE macro.

Tested by compilation on an i386 box using "allyesconfig".
Diffed against Linus' git-tree.

Signed-off-by: Andi Drebes <lists-receive@programmierforen.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: remove content related to dead CONFIG_BLK_DEV_MAC_MEDIABAY config variable
Robert P. J. Day [Mon, 9 Jul 2007 21:17:57 +0000 (23:17 +0200)]
ide: remove content related to dead CONFIG_BLK_DEV_MAC_MEDIABAY config variable

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: remove references to the non-existent CONFIG_SCSI_EATA_DMA
Robert P. J. Day [Mon, 9 Jul 2007 21:17:57 +0000 (23:17 +0200)]
ide: remove references to the non-existent CONFIG_SCSI_EATA_DMA

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide-cd: replace C code with call to ARRAY_SIZE() macro
Robert P. J. Day [Mon, 9 Jul 2007 21:17:57 +0000 (23:17 +0200)]
ide-cd: replace C code with call to ARRAY_SIZE() macro

Delete the unnecessary macro ARY_LEN and use ARRAY_SIZE directly.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide_in_drive_list(): "ALL" is not a wildcard anymore
Junio C Hamano [Mon, 9 Jul 2007 21:17:57 +0000 (23:17 +0200)]
ide_in_drive_list(): "ALL" is not a wildcard anymore

This removes the support to treat "ALL" as a wildcard for
firmware revision.  This is made a separate patch, as it will
break out-of-tree ide drivers that feed its own table that uses
"ALL" as the wildcard to ide_in_drive_list().

Signed-off-by: Junio C Hamano <junkio@cox.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agomips au1xxx_ide.h: use NULL as firmware-revision wildcard
Junio C Hamano [Mon, 9 Jul 2007 21:17:56 +0000 (23:17 +0200)]
mips au1xxx_ide.h: use NULL as firmware-revision wildcard

This updates the DMA whitelist in MIPS specific au1xxx ide
driver to use NULL instead of "ALL" as the wildcard.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide_in_drive_list(): accept NULL as the wildcard for firmware revision
Junio C Hamano [Mon, 9 Jul 2007 21:17:56 +0000 (23:17 +0200)]
ide_in_drive_list(): accept NULL as the wildcard for firmware revision

Earlier, the matching of (model,rev) in ide-dma black/white list
handling was to consider "ALL" in the table to match any
revision.  This makes NULL to be also an accepted wildcard, and
changes the entries of tables in ide-dma.c to use NULL.

The code still accepts "ALL" as the wildcard, in order to keep
any out-of-tree ide driver that feeds its own table that uses
"ALL" as the wildcard to ide_in_drive_list() function from
breaking.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoaec62xx: kill speedproc() method wrapper (take 2)
Sergei Shtylyov [Mon, 9 Jul 2007 21:17:56 +0000 (23:17 +0200)]
aec62xx: kill speedproc() method wrapper (take 2)

There's no reason to have the speedproc() method wrapper for the two quite
different chip families, so just get rid of it.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: use mutex instead of ide_setting_sem semaphore in IDE driver
Matthias Kaehlcke [Mon, 9 Jul 2007 21:17:56 +0000 (23:17 +0200)]
ide: use mutex instead of ide_setting_sem semaphore in IDE driver

The IDE driver uses a semaphore as mutex.
Use the mutex API instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
--

17 years agoaec62xx: remove init_dma() method (take 2)
Sergei Shtylyov [Mon, 9 Jul 2007 21:17:56 +0000 (23:17 +0200)]
aec62xx: remove init_dma() method (take 2)

Get rid of the init_dma() method (which had no particular reason to exist) by
folding it into the init_hwif() method. While at it, also perform some cleanup
in the latter method:

- get rid of the useless clearing of hwif->autodma;

- fold the serialization code into one 'if' statement;

- fold setting the drives' 'autotune' and 'autodma' fields into the single
  statements...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoaec62xx: rework init_setup_aec6x80()
Sergei Shtylyov [Mon, 9 Jul 2007 21:17:56 +0000 (23:17 +0200)]
aec62xx: rework init_setup_aec6x80()

Rework init_setup_aec6x80() so that it won't rewrite the constant name strings
anymore -- in order to do this:

- in aec62xx_init_one(), pass a local copy of 'struct pci_device_id' down the
  call chain;

- change the names for in aec62xx_chipsets[] to default to AEC-6280[R];

- override the 'name' field in init_setup_aec6x80() only if bit 4 of the DMA
  status register is set.

While at it, also change the 'udma_mask' field for AEC-6x80R chips in this
function and remove the code doing the same from the init_hwif() method...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agocmd64x: init. code cleanup
Sergei Shtylyov [Mon, 9 Jul 2007 21:17:55 +0000 (23:17 +0200)]
cmd64x: init. code cleanup

Fix two minor issues with PCI0646 chip reporting in the init_chipset() method:
"IRQ workaround enabled" message printed out not only for revision 0x01 and
"CMD646: chipset revision" printed twice (by IDE core and the driver itself).
Also, remove empty/pointless switch cases for the chips other than PCI0646,
duplicate write to the MRDMODE register when enabling interrupts and MEMORY
READ LINE cycles, and needless/misplaced initialization of the timing registers
in this method.
Switch to reading only the PCI revision ID register itself, not the whole 32
bits at its address in init_chipset() and init_hwif() methods; in addition,
get rid of the useless clearing of hwif->autodma and perform some cosmetic
style changes in the latter method.
Refactor ata66_cmd64x() by moving all the code into the 'switch' statement,
renaming/adding variables, and fixing the coding style.
While at it, finally get rid of the meaningless aliasing register #define's...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: simplify UltraDMA filtering (take 4)
Sergei Shtylyov [Mon, 9 Jul 2007 21:17:55 +0000 (23:17 +0200)]
hpt366: simplify UltraDMA filtering (take 4)

Simplify UltraDMA mode filtering in the driver:

- make use of the newly introduced 'udma_mask' field of 'ide_pci_device_t' to
  set the correct hwif->ultra_mask, modifying init_setup_hpt366() to select
  the correct mask based on the chip revision;

- replace 'max_mode' field of the 'struct hpt_info' with 'max_ultra' specifying
  the maximum UltraDMA mode allowed;

- rewrite hpt3xx_udma_filter() to differ the filters based on the 'chip_type'
  field, and only use it for HPT366 and HPT370[A] where it's really necessary.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: use mutex instead of ide_cfg_sem semaphore in IDE driver
Matthias Kaehlcke [Mon, 9 Jul 2007 21:17:55 +0000 (23:17 +0200)]
ide: use mutex instead of ide_cfg_sem semaphore in IDE driver

The IDE driver uses a semaphore as mutex.
Use the mutex API instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: make void and rename ide_dma_timeout() method
Sergei Shtylyov [Mon, 9 Jul 2007 21:17:54 +0000 (23:17 +0200)]
ide: make void and rename ide_dma_timeout() method

Since ide_dma_timeout() method's result is discarded, make it return 'void'.
While at it, drop 'ide_' from the method's name, drop the '__' prefix from
the default method's name, and do some cleanups in this method driver-wise:

- in ide-dma.c, au1xxx-ide.c, and pdc202xx_old.c, define/use 'hwif' variable;

- in au1xxx-ide.c, get rid of commented out printk();

- in sl82c105.c, get rid of unnecessary variables.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: make void and rename ide_dma_lostirq() method
Sergei Shtylyov [Mon, 9 Jul 2007 21:17:54 +0000 (23:17 +0200)]
ide: make void and rename ide_dma_lostirq() method

Since ide_dma_lostirq() method's result is discarded, make it return 'void'.
While at it, rename the method to dma_lost_irq(), drop the '__' prefix from the
default method's name, and do some cleanups in this method driver-wise:

- in aec62xx.c, rename the method in accordance with other drivers, and get rid
  of unnecessary variables there;

- in pdc202xx_old.c, define/use 'hwif' variable;

- in sgiioc4.c, rearrange the code to call the resetproc() method directly.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoserverworks: always tune CSB6
Bartlomiej Zolnierkiewicz [Mon, 9 Jul 2007 21:17:53 +0000 (23:17 +0200)]
serverworks: always tune CSB6

Switch the driver to always program DMA/PIO timings and set device transfer
mode instead of trusting BIOS on CSB6 controllers (libata pata_serverworks.c
driver is also doing things this way and there were no problems reported so
far).  While doing conversion I noticed that the old code had many issues:

* the code was assuming that hwif->dma_status is always valid
  (which obviously isn't true if hwif->dma_base == NULL)

* value of "(ultra_timing >> (4*unit)) & ~(0xF0)" expression wasn't checked
  to fit into udma_modes[5]

* code validating DMA timings didn't validate corresponding PIO timings

* extra CSB5 PIO register wasn't validated et all

* hwif->ide_dma_off_quietly() is always called before ide_set_dma() (which in
  turn calls hwif->speedproc() method - svwks_tune_chipset() in this case)
  so the code depending on DMA capable bit of DMA status to be set was never
  executed (=> the code was never validating DMA timings despite actually
  enabling DMA if the PIO timings were OK!)

* on resume driver dependend entirely on BIOS to restore timings and set
  transfer mode on the device

While at it:

There is no need to read PIO/MWDMA timings now so don't do it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
Linus Torvalds [Mon, 9 Jul 2007 20:09:16 +0000 (13:09 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/shaggy/jfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
  JFS: Update print_hex_dump() syntax
  JFS: use print_hex_dump() rather than private dump_mem() function
  JFS: Whitespace cleanup and remove some dead code

17 years agosched: add CFS credits
Ingo Molnar [Mon, 9 Jul 2007 16:52:01 +0000 (18:52 +0200)]
sched: add CFS credits

add credits for recent major scheduler contributions:

  Con Kolivas, for pioneering the fair-scheduling approach
  Peter Williams, for smpnice
  Mike Galbraith, for interactivity tuning of CFS
  Srivatsa Vaddagiri, for group scheduling enhancements

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: micro-optimize mmdrop()
Ingo Molnar [Mon, 9 Jul 2007 16:52:01 +0000 (18:52 +0200)]
sched: micro-optimize mmdrop()

micro-optimize mmdrop(). Improves schedule()'s assembly a bit.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: more agressive idle balancing
Ingo Molnar [Mon, 9 Jul 2007 16:52:01 +0000 (18:52 +0200)]
sched: more agressive idle balancing

the Linux scheduler is starving a number of workloads. So default
to more agressive idle-balancing. This hurts lmbench context-switching
numbers (which was the main reason we sucked at idle-balancing for
such a long time) but the lmbench numbers are fine once the system is
minimally utilized.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: clean up sleep_on() APIs
Ingo Molnar [Mon, 9 Jul 2007 16:52:01 +0000 (18:52 +0200)]
sched: clean up sleep_on() APIs

clean up the sleep_on() APIs:

 - do not use fastcall
 - replace fragile macro magic with proper inline functions

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: style cleanups
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: style cleanups

4 small style cleanups to sched.c: checkpatch.pl is now happy about
the totality of sched.c [ignoring false positives] - yay! ;-)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: do not set softirqs to nice +19
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: do not set softirqs to nice +19

do not set softirqs to nice +19. _If_ for whatever reason
we missed to process some high-prio softirq and woke up
ksoftirqd, we should give it a fair chance to actually
get some work done, even if the system is under load.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: simplify sched_find_first_bit()
Mike Galbraith [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: simplify sched_find_first_bit()

simplify sched_rt.c's sched_find_first_bit() function: there are
only 100 RT priority levels left.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: add CFS documentation
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: add CFS documentation

add Documentation/sched-design-CFS.txt

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: scheduler debugging, enable in Kconfig
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: scheduler debugging, enable in Kconfig

enable CONFIG_SCHED_DEBUG in lib/Kconfig.debug.

the runtime overhead of this option is very small.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: scheduler debugging, core
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: scheduler debugging, core

scheduler debugging core: implement /proc/sched_debug and
/proc/<PID>/sched files for scheduler debugging.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: add CFS debug sysctls
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: add CFS debug sysctls

add CFS debug sysctls: only tweakable if SCHED_DEBUG is enabled.
This allows for faster debugging of scheduler problems.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: remove old cpu accounting field
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: remove old cpu accounting field

remove the old cpu-accounting field from signal_struct, now
that the code is using CFS's stats.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: remove unused rq types from sched.c
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: remove unused rq types from sched.c

remove unused rq types from sched.c, now that we switched
over to CFS.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: remove batch_task()
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: remove batch_task()

batch_task() in sched.h is now unused - remove it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: remove interactivity types from sched.h
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: remove interactivity types from sched.h

remove now-unused types/fields used by the old scheduler.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: remove interactivity types
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: remove interactivity types

remove now unused interactivity-heuristics related defined and
types of the old scheduler.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: clean up include files in sched.c
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: clean up include files in sched.c

clean up include files in sched.c, they were still old-style <asm/>.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: clean up fastcall uses of sched_fork()/sched_exit()
Ingo Molnar [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: clean up fastcall uses of sched_fork()/sched_exit()

sched_fork()/sched_exit() does not need to specify fastcall anymore,
as the x86 kernel defaults to regparm3, and no assembly code calls
these functions.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: update delay-accounting to use CFS's precise stats
Balbir Singh [Mon, 9 Jul 2007 16:52:00 +0000 (18:52 +0200)]
sched: update delay-accounting to use CFS's precise stats

update delay-accounting to use CFS's precise stats.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: make use of precise accounting for /proc task stats
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: make use of precise accounting for /proc task stats

make use of CFS's precise accounting to drive /proc/<pid>/stat statistics.

this code was co-authored by:

 Balbir Singh <balbir@linux.vnet.ibm.com>
 Dmitry Adamushko <dmitry.adamushko@gmail.com>
 Ingo Molnar <mingo@elte.hu>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
17 years agosched: turn on the use of unstable events
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: turn on the use of unstable events

make use of sched-clock-unstable events.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: x86, track TSC-unstable events
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: x86, track TSC-unstable events

track TSC-unstable events and propagate it to the scheduler code.
Also allow sched_clock() to be used when the TSC is unstable,
the rq_clock() wrapper creates a reliable clock out of it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: cfs core code
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: cfs core code

apply the CFS core code.

this change switches over the scheduler core to CFS's modular
design and makes use of kernel/sched_fair/rt/idletask.c to implement
Linux's scheduling policies.

thanks to Andrew Morton and Thomas Gleixner for lots of detailed review
feedback and for fixlets.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
17 years agosched: remove the sleep-bonus interactivity code
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: remove the sleep-bonus interactivity code

remove the sleep-bonus interactivity code from the core scheduler.

scheduling policy is implemented in the policy modules, and CFS does
not need such type of heuristics.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: remove expired_starving()
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: remove expired_starving()

remove the expired_starving() heuristics from the core scheduler.

CFS does not need it, and this did not really work well in practice
anyway, due to the rq->nr_running multiplier to STARVATION_LIMIT.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: remove sleep_type
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: remove sleep_type

remove the sleep_type heuristics from the core scheduler - scheduling
policy is implemented in the scheduling-policy modules. (and CFS does
not use this type of sleep-type heuristics)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: cfs, add load-calculation methods
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: cfs, add load-calculation methods

add the new load-calculation methods of CFS.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: clean up __normal_prio() position
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: clean up __normal_prio() position

clean up: move __normal_prio() in head of normal_prio().

no code changed.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: cleanup: move dequeue/enqueue_task()
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: cleanup: move dequeue/enqueue_task()

cleanup: move dequeue/enqueue_task() to a more logical place, to
not split up __normal_prio()/normal_prio().

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: move around resched_task()
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: move around resched_task()

move resched_task()/resched_cpu() into the 'public interfaces'
section of sched.c, for use by kernel/sched_fair/rt/idletask.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: remove the SleepAVG field
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: remove the SleepAVG field

remove the SleepAVG field from /proc/<pid>/status, as
with the removal of the sleep-average code this value
no longer makes sense.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: clean up the rt priority macros
Ingo Molnar [Mon, 9 Jul 2007 16:51:59 +0000 (18:51 +0200)]
sched: clean up the rt priority macros

clean up the rt priority macros, pointed out by Andrew Morton.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: add cfs_rq ops
Ingo Molnar [Mon, 9 Jul 2007 16:51:58 +0000 (18:51 +0200)]
sched: add cfs_rq ops

add the set_task_cfs_rq() abstraction needed by CONFIG_FAIR_GROUP_SCHED.

(not activated yet)

Signed-off-by: Ingo Molnar <mingo@elte.hu>