pandora-kernel.git
17 years agotc86c001: add missing __init tag for tc86c001_ide_init()
Bartlomiej Zolnierkiewicz [Wed, 7 Feb 2007 17:19:09 +0000 (18:19 +0100)]
tc86c001: add missing __init tag for tc86c001_ide_init()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agotc86c001: mark init_chipset_tc86c001() with __devinit tag
Andrew Morton [Wed, 7 Feb 2007 17:19:01 +0000 (18:19 +0100)]
tc86c001: mark init_chipset_tc86c001() with __devinit tag

Signed-off-by: Andrew Morton <akpm@osdl.org>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agotc86c001: init_hwif_tc86c001() can be static
Adrian Bunk [Wed, 7 Feb 2007 17:18:52 +0000 (18:18 +0100)]
tc86c001: init_hwif_tc86c001() can be static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add Toshiba TC86C001 IDE driver (take 2)
Sergei Shtylyov [Wed, 7 Feb 2007 17:18:45 +0000 (18:18 +0100)]
ide: add Toshiba TC86C001 IDE driver (take 2)

This is the driver for the Toshiba TC86C001 GOKU-S PCI IDE controller,
completely reworked from the original brain-damaged Toshiba's 2.4 version.

This single channel UltraDMA/66 controller is very simple in programming,
yet Toshiba managed to plant many interesting bugs in it.  The particularly
nasty "limitation 5" (as they call the errata) caused me to abuse the IDE
core in a possibly most interesting way so far.  However, this is still
better than the #ifdef mess in drivers/ide/ide-io.c that the original
version included (well, it had much more mess)...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Alan Cox <alan@redhat.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agopdc202xx_new: remove check_in_drive_lists abomination
Sergei Shtylyov [Wed, 7 Feb 2007 17:18:39 +0000 (18:18 +0100)]
pdc202xx_new: remove check_in_drive_lists abomination

Fold check_in_drive_lists() into quirkproc() handler in both PDC202xx
drivers-- this function was never called with a list other than
pdc_quirk_drives and was a bad example of code overall...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agopdc202xx_new: remove useless code
Sergei Shtylyov [Wed, 7 Feb 2007 17:18:37 +0000 (18:18 +0100)]
pdc202xx_new: remove useless code

Remove the following useless fragments from the driver:

- the ide_dma_lostirq() and ide_dma_timeout() handlers which boil down to just
  printing the incoherent reset message and calling their default counterparts;

- check for non-NULL drive->id in the ide_dma_check() handler -- this is assumed
  to be true by all other handlers (also, get rid of unnecessary nesting of the
  conditional statements there);

- the comment before pdcnew_tune_drive() which has nothing to do with the code.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoslc90e66: carry over fixes from piix driver
Sergei Shtylyov [Wed, 7 Feb 2007 17:18:34 +0000 (18:18 +0100)]
slc90e66: carry over fixes from piix driver

Synchronize with version 0.46 of the Intel PIIX/ICH driver:

- carry over Alan's and my own fixes in the tuneproc() method and my cleanups
  both there and in the ratemask() method;

- SLC90E66 only supports MW DMA modes 1/2 and SW DMA mode 2 (just like Intel
  chips), so don't claim support for other MW/SW DMA modes;

- don't check dor non-NULL drive->id in the ide_dma_check() method -- this is
  assumed to be true in all other drivers;

- do some coding/formatting cleanups while at it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agopiix: tuneproc() fixes/cleanups
Sergei Shtylyov [Wed, 7 Feb 2007 17:18:28 +0000 (18:18 +0100)]
piix: tuneproc() fixes/cleanups

Fix/cleanup the driver's tuneproc() and ratemask() methods:

- PPE, IE, and TIME bits need to be cleared beforehand for the slave drive as
  well as master (Alan probably just forgot about it);

- this driver only supports PIO modes up to 4, so must pass the correct limit
  to ide_get_best_pio_mode();

- use min_t() macro instead of min();

- simplify slave vs master drive evaluation;

- do come coding and formatting cleanups...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agopiix: fix 82371MX enablebits
Sergei Shtylyov [Wed, 7 Feb 2007 17:18:25 +0000 (18:18 +0100)]
piix: fix 82371MX enablebits

According to the datasheet, Intel 82371MX (MPIIX) actually has only a
single IDE channel mapped to the primary or secondary ports depending on
the value of the bit 14 of the IDETIM register at PCI config.  offset 0x6C
(the register at 0x6F which the driver refers to.  doesn't exist).  So,
disguise the controller as dual channel and set enablebits masks/values
such that only either primary or secondary channel is detected enabled.
Also, preclude the IDE probing code from reading PCI BARs, this controller
just doesn't have them (it's not the separate PCI function like the other
PCI controllers), it only decodes the legacy addresses.

[ Alan sayeth " MPIIX does not work with or without the change.  It needs its
  own different driver and not to use setup-pci.  Huge job and since it works
  well with libata who cares.  Ditto the early PIIX chip." ]

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: HPT36x PCI clock detection fix
Sergei Shtylyov [Wed, 7 Feb 2007 17:18:20 +0000 (18:18 +0100)]
hpt366: HPT36x PCI clock detection fix

Fix minor coding mistake in the HPT36x PCI clock detection code noticed by
Bartlomiej Zolnierkiewicz -- it always reported 33 MHz due to the missing
'break' statements.  This, however, most probably never mattered -- in fact, I
was thinking of removing the 25/40 MHz cases completely since HPT36x BIOSes
didn't seem to set any other value than 7 into the 'cmd_high_time' field, i.e.
 supported only 33 MHz PCI.

Note that in the original driver there was another bug: 25 and 40 MHz cases
were interchanged.  Since the 'cmd_high_time' field is in units of PCI clocks,
a lower clock count just *cannot* correspond to a higher frequency, i.  e.  it
should be 5 for 25 MHz PCI and 9 for 40 MHz PCI, not the other way around.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: init code rewrite
Sergei Shtylyov [Wed, 7 Feb 2007 17:18:16 +0000 (18:18 +0100)]
hpt366: init code rewrite

Finally, rework the driver init.  code to correctly handle all the chip
variants HighPoint has created so far.  This should cure the rest of the
timing issues in the driver (especially, on 66 MHz PCI) caused by the
HighPoint's habit of switching the base DPLL clock with every new revision
of the chips...

  - switch to using the enumeration type to differ between the numerous chip
    variants, matching PCI device/revision ID with the chip type early, at the
    init_setup stage;

  - extend the hpt_info structure to hold the DPLL and PCI clock frequencies,
    stop duplicating it for each channel by storing the pointer in the pci_dev
    structure: first, at the init_setup stage, point it to a static "template"
    with only the chip type and its specific base DPLL frequency, the highest
    supported DMA mode, and the chip settings table pointer filled, then, at
    the init_chipset stage, allocate per-chip instance  and fill it with the
    rest of the necessary information;

  - get rid of the constant thresholds in the HPT37x PCI clock detection code,
    switch  to calculating  PCI clock frequency based on the chip's base DPLL
    frequency;

  - switch to using the DPLL clock and enable UltraATA/133 mode by default on
    anything newer than HPT370/A;

  - fold PCI clock detection and DPLL setup code into init_chipset_hpt366(),
    unify the HPT36x/37x setup code and the speedproc handlers by joining the
    register setting lists into the table indexed by the clock selected;

  - add enablebits for all the chips to avoid touching disabled channels
    (though the HighPoint BIOS seem to only disable the primary one on
    HPT371/N);

  - separate the UltraDMA and MWDMA masks there to avoid changing PIO timings
    when setting an UltraDMA mode in hpt37x_tune_chipset().

This version has been tested on HPT370/302/371N.

Thanks to Alan for the inspiration. Hopefully, his libata driver will also
benefit from the work done on this "obsolete" driver...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: clean up DMA timeout handling for HPT370
Sergei Shtylyov [Wed, 7 Feb 2007 17:18:13 +0000 (18:18 +0100)]
hpt366: clean up DMA timeout handling for HPT370

Clean up DMA timeout handling for HPT370:

- hpt370_lostirq_timeout() cleared the DMA status which made __ide_dma_end()
   called afterwards return the incorrect result, and the DMA engine was reset
   both before and after stopping DMA while the HighPoint drivers only do it
   after (which seems logical) -- fix this and also rename the function;

- get rid of the needless mutual recursion in hpt370_ide_dma_end() and
   hpt370_ide_dma_timeout();

- get rid of hpt370_lostirq_timeout() since hwif->ide_dma_end() called from
   the driver's interrupt handler later does all its work.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: merge HPT37x speedproc handlers
Sergei Shtylyov [Wed, 7 Feb 2007 17:18:11 +0000 (18:18 +0100)]
hpt366: merge HPT37x speedproc handlers

Continue with the driver rewrite:

- move the interrupt twiddling code from the speedproc handlers into the
    init_hwif_hpt366 which allows to merge the two HPT37x speedproc handlers
    into one;

- get rid of in init_hpt366 which solely consists of the duplicate code, then
    fold init_hpt37x() into init_chipset_hpt366();

- fix hpt3xx_tune_drive() to always set the PIO mode requested, not the best
    possible one, change hpt366_config_drive_xfer_rate() accordingly, simplify
    it a bit;

- group all the DMA related code together init_hwif_hpt366(), and generally
    clean up and beautify it.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: cache channel's MCR address
Sergei Shtylyov [Wed, 7 Feb 2007 17:18:05 +0000 (18:18 +0100)]
hpt366: cache channel's MCR address

Begin the real driver redesign. For the starters:

- cache the offset of the IDE channel's MISC. control registers which are used
   throughout the driver in hwif->select_data;

- only touch the relevant MCR when detecting the cable type on HPT374's
   function 1;

- make HPT36x's speedproc handler look the same way as HPT37x ones; fix the
   PIO timing register mask for HPT37x.

- rename all the HPT3xx register related variables consistently; clean up the
   whitespace.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: switch to using pci_get_slot
Sergei Shtylyov [Wed, 7 Feb 2007 17:17:54 +0000 (18:17 +0100)]
hpt366: switch to using pci_get_slot

Switch to using pci_get_slot() to get to the function 1 of HPT36x/374 chips --
there's no need for the driver itself to walk the list of the PCI devices, and
it also forgets to check the bus number of the device found.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: print the real chip name at startup
Sergei Shtylyov [Wed, 7 Feb 2007 17:17:51 +0000 (18:17 +0100)]
hpt366: print the real chip name at startup

- Rework the driver setup code so that it prefixes the driver startup
  messages with the real chip name.

- Print the measured f_CNT value and the DPLL setting for non-HPT3xx
  chips as well.

- Claim the extra 240 bytes of I/O space for all chips, not only for
  those having PCI device ID of 0x0004.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: rework rate filtering tidy
Andrew Morton [Wed, 7 Feb 2007 17:17:37 +0000 (18:17 +0100)]
hpt366: rework rate filtering tidy

Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: rework rate filtering
Sergei Shtylyov [Wed, 7 Feb 2007 17:17:37 +0000 (18:17 +0100)]
hpt366: rework rate filtering

- Rework hpt3xx_ratemask() and hpt3xx_ratefilter() so that the former
  returns the max.  mode computed at the load time and doesn't have to do
  bad Ultra33 drive list lookups anymore; remove the duplicate code from
  the latter function.  Move the quirky drive list lookup into
  hpt3xx_quirkproc() where it should have been from the start...

- Disable UltraATA/100 for HPT370 by default as the 33 MHz ATA clock
  being used does not allow for it, and this *greatly* increases the
  transfer speed.

- Save some space by using byte-wide fields in struct hpt_info; switch to
  reading the 8-bit PCI revision ID reg.  only, not the whole 32-bit reg.

- Start incrementing the driver version number with each patch (should
  have been done from the first one posted).

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Wed, 7 Feb 2007 01:24:58 +0000 (17:24 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: (27 commits)
  [IA64] swiotlb abstraction (e.g. for Xen)
  [IA64] swiotlb cleanup
  [IA64] make swiotlb use bus_to_virt/virt_to_bus
  [IA64] swiotlb bug fixes
  [IA64] Hook up getcpu system call for IA64
  [IA64] clean up sparsemem memory_present call
  [IA64] show_mem() for IA64 sparsemem NUMA
  [IA64] missing exports hwsw_sync_...
  [IA64] virt_to_page() can be called with NULL arg
  [IA64] alignment bug in ldscript
  [IA64] register memory ranges in a consistent manner
  [IA64] Enable SWIOTLB only when needed
  [IA64-SGI] Check for TIO errors on shub2 Altix
  [IA64] remove bogus prototype ia64_esi_init()
  [IA64] Clear IRQ affinity when unregistered
  [IA64] fix ACPI Kconfig issues
  [IA64] Fix NULL-pointer dereference in ia64_machine_kexec()
  [IA64] find thread for user rbs address
  [IA64] use snprintf() on features field of /proc/cpuinfo
  [IA64] enable singlestep on system call
  ...

17 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Tue, 6 Feb 2007 22:59:27 +0000 (14:59 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: ocfs2_link() journal credits update

17 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Tue, 6 Feb 2007 22:56:37 +0000 (14:56 -0800)]
Merge branch 'for-linus' of /linux/kernel/git/jikos/hid

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid:
  USB HID: handle multi-interface devices for Apple macbook pro properly
  HID: move away from DEBUG defines in favor of CONFIG_HID_DEBUG
  USB HID: fix bogus comment in hid_get_class_descriptor()
  USB HID: remove hid_find_field_by_usage()
  HID: API - fix leftovers of hidinput API in USB HID
  HID: hid debug from hid-debug.h to hid layer
  hid: force feedback driver for PantherLord USB/PS2 2in1 Adapter
  hid: quirk for multi-input devices with unneeded output reports
  hid: allow force feedback for multi-input devices

17 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
Linus Torvalds [Tue, 6 Feb 2007 22:55:33 +0000 (14:55 -0800)]
Merge branch 'for-linus' of /linux/kernel/git/roland/infiniband

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IB/ehca: Remove obsolete prototypes
  IB/ehca: Remove use of do_mmap()
  RDMA/addr: Handle ethernet neighbour updates during route resolution
  IB: Make sure struct ib_user_mad.data is aligned
  IB/srp: Don't wait for response when QP is in error state.
  IB: Return qp pointer as part of ib_wc
  IB: Include <linux/kref.h> explicitly in <rdma/ib_verbs.h>

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Tue, 6 Feb 2007 22:54:54 +0000 (14:54 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (32 commits)
  mmc: tifm: replace kmap with page_address
  mmc: sdhci: fix voltage ocr
  mmc: sdhci: replace kmap with page_address
  mmc: wbsd: replace kmap with page_address
  mmc: handle pci_enable_device() return value in sdhci
  mmc: Proper unclaim in mmc_block
  mmc: change wbsd mailing list
  mmc: Graceful fallback for fancy features
  mmc: Handle wbsd's stupid command list
  mmc: Allow host drivers to specify max block count
  mmc: Allow host drivers to specify a max block size
  tifm_sd: add suspend and resume functionality
  tifm_core: add suspend/resume infrastructure for tifm devices
  tifm_7xx1: prettify
  tifm_7xx1: recognize device 0xac8f as supported
  tifm_7xx1: switch from workqueue to kthread
  tifm_7xx1: Merge media insert and media remove functions
  tifm_7xx1: simplify eject function
  Add dummy_signal_irq function to save check in ISR
  Remove unused return value from signal_irq callback
  ...

17 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Tue, 6 Feb 2007 22:45:32 +0000 (14:45 -0800)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (37 commits)
  [S390] Avoid excessive inlining.
  [S390] Mark kernel text section read-only.
  [S390] Convert memory detection into C code.
  [S390] Calibrate delay and bogomips.
  [S390] Hypervisor filesystem (s390_hypfs) for z/VM
  [S390] Add crypto support for 3592 tape devices
  [S390] boot from NSS support
  [S390] Support for s390 Pseudo Random Number Generator
  [S390] ETR support.
  [S390] noexec protection
  [S390] move crypto options and some cleanup.
  [S390] cio: Don't spam debug feature.
  [S390] Cleanup of CHSC event handling.
  [S390] cio: declare hardware structures packed.
  [S390] Add set_fs(USER_DS) to start_thread().
  [S390] cio: Catch operand exceptions on stsch.
  [S390] Fix register usage description.
  [S390] kretprobe_trampoline_holder() in wrong section.
  [S390] Fix kprobes breakpoint handling.
  [S390] Update maintainers file.
  ...

17 years ago[PATCH] Keys: Fix key serial number collision handling
David Howells [Tue, 6 Feb 2007 13:45:51 +0000 (13:45 +0000)]
[PATCH] Keys: Fix key serial number collision handling

Fix the key serial number collision avoidance code in key_alloc_serial().

This didn't use to be so much of a problem as the key serial numbers were
allocated from a simple incremental counter, and it would have to go through
two billion keys before it could possibly encounter a collision.  However, now
that random numbers are used instead, collisions are much more likely.

This is fixed by finding a hole in the rbtree where the next unused serial
number ought to be and using that by going almost back to the top of the
insertion routine and redoing the insertion with the new serial number rather
than trying to be clever and attempting to work out the insertion point
pointer directly.

This fixes kernel BZ #7727.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Tue, 6 Feb 2007 22:42:20 +0000 (14:42 -0800)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Minor cleanup
  [CIFS] Missing free in error path
  [CIFS] Reduce cifs stack space usage
  [CIFS] lseek polling returned stale EOF

17 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Tue, 6 Feb 2007 22:35:30 +0000 (14:35 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (40 commits)
  [MIPS] Yosemite: Fix missing parens in SERIAL_READ_1 macro
  [MIPS] Fix warnings in run_uncached on 32bit kernel
  [MIPS] Comment fix
  [MIPS] MT: Nuke duplicate mips_mt_regdump() prototype.
  [MIPS] Alchemy:  Fix PCI-memory access
  [MIPS] Move .set reorder out of conditional code
  [MIPS] Check FCSR for pending interrupts before restoring from a context.
  [MIPS] Jaguar ATX: Fix large number of warnings.
  [MIPS] Jaguar: Fix MAC address detection after platform_device conversion.
  [MIPS] SMTC: Make a bunch of functions and variables static.
  [MIPS] Use compat_sys_pselect6
  [MIPS] SMTC: Cleanup idle hook invocation.
  [MIPS] SELinux: Add security hooks to mips-mt {get,set}affinity
  [MIPS] IRIX: Linux coding style cleanups.
  [MIPS] PB1100: Fix pile of warnings
  [MIPS] Alchemy: Fix bunch of warnings
  [MIPS] Whitespace cleanups.
  [MIPS] Alchemy: Fix bunch more warnings.
  [MIPS] Use ARRAY_SIZE macro when appropriate
  [MIPS] Fix some whitespace damage
  ...

17 years ago[PATCH] kbuild: correctly skip tilded backups in localversion files
Oleg Verych [Tue, 6 Feb 2007 01:18:22 +0000 (02:18 +0100)]
[PATCH] kbuild: correctly skip tilded backups in localversion files

 Tildes as in path as in filenames are handled correctly now:
 only files, containing tilde '~', are backups, thus are not valid.

 [KJ]:
 Definition of `space' was removed, scripts/Kbuild.include has one.
 That definition was taken right from the GNU make manual, while Kbuild's
 version is original.

Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Bastian Blank <bastian@waldi.eu.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Oleg Verych <olecom@flower.upol.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kbuild: improve option checking, Kbuild.include cleanup
Oleg Verych [Tue, 6 Feb 2007 01:18:21 +0000 (02:18 +0100)]
[PATCH] kbuild: improve option checking, Kbuild.include cleanup

 GNU binutils, root users, tmpfiles, external modules ro builds must
 be fixed to do the right thing now.

Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Horst Schirmeier <horst@schirmeier.com>
Cc: Jan Beulich <jbeulich@novell.com>
Cc: Daniel Drake <dsd@gentoo.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Oleg Verych <olecom@flower.upol.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kbuild scripts: replace gawk, head, bc with shell, update
Oleg Verych [Tue, 6 Feb 2007 01:18:20 +0000 (02:18 +0100)]
[PATCH] kbuild scripts: replace gawk, head, bc with shell, update

  Replacing overhead of using some (external) programs
  instead of good old `sh'.

Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: William Stearns <wstearns@pobox.com>
Cc: Martin Schlemmer <azarah@nosferatu.za.org>
Signed-off-by: Oleg Verych <olecom@flower.upol.cz>
Acked-by: Mark Lord <lkml@rtr.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[CIFS] Minor cleanup
Steve French [Tue, 6 Feb 2007 20:43:30 +0000 (20:43 +0000)]
[CIFS] Minor cleanup

Missing tab.  Missing entry in changelog

Signed-off-by: Steve French <sfrench@us.ibm.com>
17 years ago[MIPS] Yosemite: Fix missing parens in SERIAL_READ_1 macro
Ralf Baechle [Tue, 6 Feb 2007 16:43:31 +0000 (16:43 +0000)]
[MIPS] Yosemite: Fix missing parens in SERIAL_READ_1 macro

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Fix warnings in run_uncached on 32bit kernel
Yoichi Yuasa [Tue, 6 Feb 2007 01:59:22 +0000 (10:59 +0900)]
[MIPS] Fix warnings in run_uncached on 32bit kernel

arch/mips/lib/uncached.c: In function 'run_uncached':
arch/mips/lib/uncached.c:47: warning: comparison is always true due to limited range of data type
arch/mips/lib/uncached.c:48: warning: comparison is always false due to limited range of data type
arch/mips/lib/uncached.c:57: warning: comparison is always true due to limited range of data type
arch/mips/lib/uncached.c:58: warning: comparison is always false due to limited range of data type

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Comment fix
Chris Dearman [Thu, 1 Feb 2007 19:54:13 +0000 (19:54 +0000)]
[MIPS] Comment fix

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] MT: Nuke duplicate mips_mt_regdump() prototype.
Ralf Baechle [Sun, 4 Feb 2007 23:23:00 +0000 (23:23 +0000)]
[MIPS] MT: Nuke duplicate mips_mt_regdump() prototype.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Alchemy: Fix PCI-memory access
Alexander Bigga [Thu, 21 Dec 2006 10:25:19 +0000 (11:25 +0100)]
[MIPS] Alchemy:  Fix PCI-memory access

The problem was introduced in 2.6.18.3 with the casting of some
36bit-defines (PCI memory) in au1000.h to resource_size_t which may be
u32 or u64 depending on the experimental CONFIG_RESOURCES_64BIT.

With unset CONFIG_RESOURCES_64BIT, the pci-memory cannot be accessed
because the ioremap in arch/mips/au1000/common/pci.c already used the
truncated addresses.
With set CONFIG_RESOURCES_64BIT, things get even worse, because PCI-scan
aborts, due to resource conflict: request_resource() in arch/mips/pci/pci.c
fails because the maximum iomem-address is 0xffffffff (32bit) but the
pci-memory-start-address is 0x440000000 (36bit).

To get pci working again, I propose the following patch:

1. remove the resource_size_t-casting from au1000.h again
2. make the casting in arch/mips/au1000/common/pci.c (it's allowed and
necessary here. The 36bit-handling will be done in __fixup_bigphys_addr).

With this patch pci works again like in 2.6.18.2, the gcc-compile warnings
in pci.c are gone and it doesn't depend on CONFIG_EXPERIMENTAL.

Signed-off-by: Alexander Bigga <ab@mycable.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Move .set reorder out of conditional code
Chris Dearman [Thu, 1 Feb 2007 19:54:13 +0000 (19:54 +0000)]
[MIPS] Move .set reorder out of conditional code

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Check FCSR for pending interrupts before restoring from a context.
Chris Dearman [Thu, 1 Feb 2007 19:54:13 +0000 (19:54 +0000)]
[MIPS] Check FCSR for pending interrupts before restoring from a context.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Jaguar ATX: Fix large number of warnings.
Ralf Baechle [Tue, 7 Nov 2006 09:23:57 +0000 (09:23 +0000)]
[MIPS] Jaguar ATX: Fix large number of warnings.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Jaguar: Fix MAC address detection after platform_device conversion.
Ralf Baechle [Tue, 7 Nov 2006 09:25:51 +0000 (09:25 +0000)]
[MIPS] Jaguar: Fix MAC address detection after platform_device conversion.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: Make a bunch of functions and variables static.
Ralf Baechle [Mon, 5 Feb 2007 00:33:21 +0000 (00:33 +0000)]
[MIPS] SMTC: Make a bunch of functions and variables static.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Use compat_sys_pselect6
Joseph S. Myers [Wed, 10 Jan 2007 12:30:50 +0000 (12:30 +0000)]
[MIPS] Use compat_sys_pselect6

The N32 and O32 pselect6 syscalls need to use compat_sys_pselect6 to
translate arguments from 32-bit to 64-bit layout.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: Cleanup idle hook invocation.
Ralf Baechle [Mon, 5 Feb 2007 00:34:20 +0000 (00:34 +0000)]
[MIPS] SMTC: Cleanup idle hook invocation.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SELinux: Add security hooks to mips-mt {get,set}affinity
David Quigley [Wed, 28 Jun 2006 13:36:46 +0000 (09:36 -0400)]
[MIPS] SELinux: Add security hooks to mips-mt {get,set}affinity

This patch adds LSM hooks into the setaffinity and getaffinity functions
for the mips architecture to enable security modules to control these
operations between tasks with different security attributes. This
implementation uses the existing task_setscheduler and task_getscheduler
LSM hooks.

Signed-Off-By: David Quigley <dpquigl@tycho.nsa.gov>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] IRIX: Linux coding style cleanups.
Ralf Baechle [Mon, 5 Feb 2007 00:05:08 +0000 (00:05 +0000)]
[MIPS] IRIX: Linux coding style cleanups.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] PB1100: Fix pile of warnings
Ralf Baechle [Tue, 7 Nov 2006 10:19:05 +0000 (10:19 +0000)]
[MIPS] PB1100: Fix pile of warnings

  CC      arch/mips/au1000/pb1100/board_setup.o
arch/mips/au1000/pb1100/board_setup.c: In function â€˜board_setup’:
arch/mips/au1000/pb1100/board_setup.c:104: warning: passing argument 1 of â€˜readb’ makes pointer from integer without a cast
arch/mips/au1000/pb1100/board_setup.c:105: warning: passing argument 1 of â€˜readb’ makes pointer from integer without a cast
arch/mips/au1000/pb1100/board_setup.c:105: warning: passing argument 2 of â€˜writeb’ makes pointer from integer without a cast
arch/mips/au1000/pb1100/board_setup.c:109: warning: passing argument 1 of â€˜readb’ makes pointer from integer without a cast
arch/mips/au1000/pb1100/board_setup.c:110: warning: passing argument 1 of â€˜readb’ makes pointer from integer without a cast
arch/mips/au1000/pb1100/board_setup.c:110: warning: passing argument 2 of â€˜writeb’ makes pointer from integer without a cast
arch/mips/au1000/pb1100/board_setup.c:51: warning: unused variable â€˜sys_clksrc’
arch/mips/au1000/pb1100/board_setup.c:51: warning: unused variable â€˜sys_freqctrl’
arch/mips/au1000/pb1100/board_setup.c:50: warning: unused variable â€˜pin_func’

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Alchemy: Fix bunch of warnings
Ralf Baechle [Tue, 7 Nov 2006 09:58:30 +0000 (09:58 +0000)]
[MIPS] Alchemy: Fix bunch of warnings

  CC      arch/mips/au1000/common/pci.o
arch/mips/au1000/common/pci.c:42: warning: large integer implicitly truncated to unsigned type
arch/mips/au1000/common/pci.c:43: warning: large integer implicitly truncated to unsigned type
arch/mips/au1000/common/pci.c:49: warning: large integer implicitly truncated to unsigned type
arch/mips/au1000/common/pci.c:50: warning: large integer implicitly truncated to unsigned type
arch/mips/au1000/common/pci.c: In function â€˜au1x_pci_setup’:
arch/mips/au1000/common/pci.c:82: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Whitespace cleanups.
Ralf Baechle [Mon, 5 Feb 2007 00:10:11 +0000 (00:10 +0000)]
[MIPS] Whitespace cleanups.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Alchemy: Fix bunch more warnings.
Ralf Baechle [Tue, 7 Nov 2006 10:22:31 +0000 (10:22 +0000)]
[MIPS] Alchemy: Fix bunch more warnings.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Use ARRAY_SIZE macro when appropriate
Ahmed S. Darwish [Mon, 5 Feb 2007 02:42:11 +0000 (04:42 +0200)]
[MIPS] Use ARRAY_SIZE macro when appropriate

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Fix some whitespace damage
Jan Altenberg [Thu, 25 Jan 2007 19:46:14 +0000 (20:46 +0100)]
[MIPS] Fix some whitespace damage

Signed-off-by: Jan Altenberg <jan@linutronix.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Add missing ifdef arch/mips/pmc-sierra/yosemite/setup.c
Mathieu Desnoyers [Sun, 4 Feb 2007 04:16:51 +0000 (23:16 -0500)]
[MIPS] Add missing ifdef arch/mips/pmc-sierra/yosemite/setup.c

early_serial_setup is only defined when CONFIG_SERIAL_8250 is set.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Fix pb1200/irqmap.c and apply some missed patches
Atsushi Nemoto [Sat, 3 Feb 2007 15:57:25 +0000 (00:57 +0900)]
[MIPS] Fix pb1200/irqmap.c and apply some missed patches

pb1200/irqmap.c had been broken a while due to non-named initializer
and had missed some recent IRQ related changes.  Apply these commits
to this file.

[MIPS] IRQ cleanups
commit 1603b5aca4f15b34848fb5594d0c7b6333b99144
[MIPS] use generic_handle_irq, handle_level_irq, handle_percpu_irq
commit 1417836e81c0ab8f5a0bfeafa90d3eaa41b2a067
[MIPS] Compile __do_IRQ() when really needed
commit e77c232cfc6e1250b2916a7c69225d6634d05a49

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Do not allow oprofile to be enabled on SMTC.
Ralf Baechle [Fri, 2 Feb 2007 11:13:35 +0000 (11:13 +0000)]
[MIPS] Do not allow oprofile to be enabled on SMTC.

Oprofile cannot work on SMTC due to the limited number of counters.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Remove superfluous "ifdef CONFIG_KGDB".
Robert P. J. Day [Thu, 1 Feb 2007 10:45:14 +0000 (05:45 -0500)]
[MIPS] Remove superfluous "ifdef CONFIG_KGDB".

Given that the Makefiles involved already have conditional compilation of
 the form:

  obj-$(CONFIG_KGDB)      += dbg_io.o

there seems to be little value for the dbg_io.c source files to check
that config variable yet again.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] vpe_elfload and vpe_run are only used locally, make them static.
Ralf Baechle [Tue, 6 Feb 2007 16:53:17 +0000 (16:53 +0000)]
[MIPS] vpe_elfload and vpe_run are only used locally, make them static.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: remove unused atomic_postclear
Ralf Baechle [Tue, 6 Feb 2007 16:53:16 +0000 (16:53 +0000)]
[MIPS] SMTC: remove unused atomic_postclear

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Move some kernel globals from asm file to C file.
Atsushi Nemoto [Tue, 23 Jan 2007 16:21:05 +0000 (01:21 +0900)]
[MIPS] Move some kernel globals from asm file to C file.

This get rid of some undesirable hole in BSS section due to random
order of placement.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Remove _fdata from asm-mips/sections.h
Atsushi Nemoto [Tue, 23 Jan 2007 13:29:06 +0000 (22:29 +0900)]
[MIPS] Remove _fdata from asm-mips/sections.h

There is no _fdata symbol in kernel.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Kconfig: Provide sane NR_CPUS defaults for more configurations
Ralf Baechle [Tue, 6 Feb 2007 16:53:15 +0000 (16:53 +0000)]
[MIPS] Kconfig: Provide sane NR_CPUS defaults for more configurations

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] vr41xx: Use symbolic names for IRQ numers
Yoichi Yuasa [Thu, 18 Jan 2007 13:27:11 +0000 (22:27 +0900)]
[MIPS] vr41xx: Use symbolic names for IRQ numers

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] use name instead of typename for each irq_chip
Atsushi Nemoto [Sun, 14 Jan 2007 15:07:25 +0000 (00:07 +0900)]
[MIPS] use name instead of typename for each irq_chip

The "typename" field was obsoleted by the "name" field.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Kconfig: Move some entries to appropriate menu
Atsushi Nemoto [Tue, 16 Jan 2007 14:29:11 +0000 (23:29 +0900)]
[MIPS] Kconfig: Move some entries to appropriate menu

Currently KEXEC is in "Machine selection", SECCOMP, PM, APM are in
"Executable file formats" menu.  Move KEXEC and SECCOMP to "Kernel
type" and PM, APM to new "Power management options" menu.  Also
replace "config PM" with kernel/power/Kconfig.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] vr41xx: add MACINT controls
Yoichi Yuasa [Thu, 11 Jan 2007 14:53:18 +0000 (23:53 +0900)]
[MIPS] vr41xx: add MACINT controls

This patch has added MACINT controls.
They are necessary for VR4133 ethernet driver.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] FLATMEM: introduce PHYS_OFFSET.
Franck Bui-Huu [Wed, 10 Jan 2007 08:44:05 +0000 (09:44 +0100)]
[MIPS] FLATMEM: introduce PHYS_OFFSET.

The old code was assuming that min_low_pfn was always 0. This
means that platforms having a big hole at their memory start
paid the price of wasting some memory for the allocation of
unused entries in mem_map[].

This patch prevents this waste.

It introduces PHYS_OFFSET define which is the start of the
physical memory and uses it wherever needed. Specially when
converting physical/virtual addresses into virtual/physical
ones.

Currently all platforms defines PHYS_OFFSET to 0.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Setup min_low_pfn/max_low_pfn correctly
Franck Bui-Huu [Wed, 10 Jan 2007 08:44:04 +0000 (09:44 +0100)]
[MIPS] Setup min_low_pfn/max_low_pfn correctly

This patch makes a better usage of these two globals.
'min_low_pfn' is now correctly setup for all configs, which
allow us to rely on it in boot memory code init.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Unify memset.S
Atsushi Nemoto [Sun, 17 Dec 2006 15:07:40 +0000 (00:07 +0900)]
[MIPS] Unify memset.S

The 32-bit version and 64-bit version are almost equal.  Unify them.
This makes further improvements (for example, supporting CDEX, etc.)
easier.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] prom_free_prom_memory cleanup
Atsushi Nemoto [Fri, 29 Dec 2006 15:43:59 +0000 (00:43 +0900)]
[MIPS] prom_free_prom_memory cleanup

Current prom_free_prom_memory() implementations are almost same as
free_init_pages(), or no-op.  Make free_init_pages() extern (again)
and make prom_free_prom_memory() use it.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Make I8259A_IRQ_BASE customizable
Atsushi Nemoto [Sun, 14 Jan 2007 14:41:42 +0000 (23:41 +0900)]
[MIPS] Make I8259A_IRQ_BASE customizable

Move I8259A_IRQ_BASE from asm/i8259.h to asm/mach-generic/irq.h and
make it really customizable.  And remove I8259_IRQ_BASE declared on
some platforms.  Currently only NEC_CMBVR4133 is using custom
I8259A_IRQ_BASE value.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Define MIPS_CPU_IRQ_BASE in generic header
Atsushi Nemoto [Sun, 7 Jan 2007 17:14:29 +0000 (02:14 +0900)]
[MIPS] Define MIPS_CPU_IRQ_BASE in generic header

The irq_base for {mips,rm7k,rm9k}_cpu_irq_init() are constant on all
platforms and are same value on most platforms (0 or 16, depends on
CONFIG_I8259).  Define them in asm-mips/mach-generic/irq.h and make
them customizable.  This will save a few cycle on each CPU interrupt.

A good side effect is removing some dependencies to MALTA in generic
SMTC code.

Although MIPS_CPU_IRQ_BASE is customizable, this patch changes irq
mappings on DDB5477, EMMA2RH and MIPS_SIM, since really customizing
them might cause some header dependency problem and there seems no
good reason to customize it.  So currently only VR41XX is using custom
MIPS_CPU_IRQ_BASE value, which is 0 regardless of CONFIG_I8259.

Testing this patch on those platforms is greatly appreciated.  Thank
you.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Remove unused rm9k_cpu_irq_disable()
Atsushi Nemoto [Sun, 7 Jan 2007 15:20:24 +0000 (00:20 +0900)]
[MIPS] Remove unused rm9k_cpu_irq_disable()

rm9k_cpu_irq_disable() is unused since commit
1603b5aca4f15b34848fb5594d0c7b6333b99144.  Remove it.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[IA64] swiotlb abstraction (e.g. for Xen)
Jan Beulich [Tue, 6 Feb 2007 02:53:04 +0000 (18:53 -0800)]
[IA64] swiotlb abstraction (e.g. for Xen)

Add abstraction so that the file can be used by environments other than IA64
and EM64T, namely for Xen.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] swiotlb cleanup
Jan Beulich [Tue, 6 Feb 2007 02:51:25 +0000 (18:51 -0800)]
[IA64] swiotlb cleanup

- add proper __init decoration to swiotlb's init code (and the code calling
  it, where not already the case)

- replace uses of 'unsigned long' with dma_addr_t where appropriate

- do miscellaneous simplicfication and cleanup

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] make swiotlb use bus_to_virt/virt_to_bus
Jan Beulich [Tue, 6 Feb 2007 02:49:45 +0000 (18:49 -0800)]
[IA64] make swiotlb use bus_to_virt/virt_to_bus

Convert all phys_to_virt/virt_to_phys uses to bus_to_virt/virt_to_bus, as is
what is meant and what is needed in (at least) some virtualized environments
like Xen.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] swiotlb bug fixes
Jan Beulich [Tue, 6 Feb 2007 02:46:40 +0000 (18:46 -0800)]
[IA64] swiotlb bug fixes

This patch fixes
- marking I-cache clean of pages DMAed to now only done for IA64
- broken multiple inclusion in include/asm-x86_64/swiotlb.h
- missing call to mark_clean in swiotlb_sync_sg()
- a (perhaps only theoretical) issue in swiotlb_dma_supported() when
io_tlb_end is exactly at the end of memory

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Hook up getcpu system call for IA64
Fenghua Yu [Tue, 6 Feb 2007 00:07:57 +0000 (16:07 -0800)]
[IA64] Hook up getcpu system call for IA64

getcpu system call returns cpu# and node# on which this system call and
its caller are running. This patch hooks up its implementation on IA64.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] clean up sparsemem memory_present call
Bob Picco [Tue, 6 Feb 2007 00:20:08 +0000 (16:20 -0800)]
[IA64] clean up sparsemem memory_present call

Eliminate arch specific memory_present call ia64 NUMA by utilizing
sparse_memory_present_with_active_regions.

Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] show_mem() for IA64 sparsemem NUMA
George Beshers [Tue, 6 Feb 2007 00:20:04 +0000 (16:20 -0800)]
[IA64] show_mem() for IA64 sparsemem NUMA

On the ia64 architecture only this patch upgrades show_mem() for sparse
memory to be the same as it was for discontig memory.  It has been shown to
work on NUMA and flatmem architectures.

Signed-off-by: George Beshers <gbeshers@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] missing exports hwsw_sync_...
Jan Beulich [Tue, 6 Feb 2007 00:20:03 +0000 (16:20 -0800)]
[IA64] missing exports hwsw_sync_...

Add missing exports to allow several drivers to be built as module with
CONFIG_IA64_HP_ZX1_SWIOTLB.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] virt_to_page() can be called with NULL arg
Kirill Korotaev [Tue, 6 Feb 2007 00:20:00 +0000 (16:20 -0800)]
[IA64] virt_to_page() can be called with NULL arg

It does not return NULL when arg is NULL.

Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] alignment bug in ldscript
Kirill Korotaev [Tue, 6 Feb 2007 00:19:59 +0000 (16:19 -0800)]
[IA64] alignment bug in ldscript

Occasionally the FSYS_RETURN patch list can have an odd length, causing other
data structures to get out of alignment.  In OpenVZ it is odd and we get
misaligned kernel image, which does not boot.

Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] register memory ranges in a consistent manner
Bob Picco [Tue, 30 Jan 2007 10:11:09 +0000 (02:11 -0800)]
[IA64] register memory ranges in a consistent manner

While pursuing and unrelated issue with 64Mb granules I noticed a problem
related to inconsistent use of add_active_range.  There doesn't appear any
reason to me why FLATMEM versus DISCONTIG_MEM should register memory to
add_active_range with different code.  So I've changed the code into a
common implementation.

The other subtle issue fixed by this patch was calling add_active_range in
count_node_pages before granule aligning is performed.  We were lucky with
16MB granules but not so with 64MB granules.  count_node_pages has reserved
regions filtered out and as a consequence linked kernel text and data
aren't covered by calls to count_node_pages.  So linked kernel regions
wasn't reported to add_active_regions.  This resulted in free_initmem
causing numerous bad_page reports.  This won't occur with this patch
because now all known memory regions are reported by
register_active_ranges.

Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Bob Picco <bob.picco@hp.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Enable SWIOTLB only when needed
Jan Beulich [Wed, 3 Jan 2007 09:26:21 +0000 (09:26 +0000)]
[IA64] Enable SWIOTLB only when needed

Don't force CONFIG_SWIOTLB on when not actually needed (i.e. HP_ZX1 and
SGI_SN2).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64-SGI] Check for TIO errors on shub2 Altix
Russ Anderson [Mon, 8 Jan 2007 22:05:08 +0000 (16:05 -0600)]
[IA64-SGI] Check for TIO errors on shub2 Altix

The shub2 error interrupt handler must check for TIO errors.

Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] remove bogus prototype ia64_esi_init()
Alex Williamson [Mon, 15 Jan 2007 16:33:55 +0000 (09:33 -0700)]
[IA64] remove bogus prototype ia64_esi_init()

This function doesn't exist.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Clear IRQ affinity when unregistered
Alex Williamson [Thu, 25 Jan 2007 05:48:04 +0000 (22:48 -0700)]
[IA64] Clear IRQ affinity when unregistered

When we offline a CPU, migrate_irqs() tries to determine whether the
affinity bits of the IRQ descriptor match any of the remaining online
CPUs.  If not, it fixes up the interrupt to point somewhere else.
Unfortunately, if an IRQ is unregistered the IRQ descriptor may still
have affinity to the CPU being offlined, but the no_irq_chip handler
doesn't provide a set_affinity function.  This causes us to hit the
WARN_ON in migrate_irqs().

The easiest solution seems to be setting all the bits in the affinity
mask when the last interrupt is removed from the vector.  I hit this on
an older kernel with Xen/ia64 using driver domains (so it probably needs
more testing on upstream).  Xen essentially uses the bind/unbind
interface in sysfs to unregister a device from a driver and thus
unregister the interrupt.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] fix ACPI Kconfig issues
Len Brown [Fri, 26 Jan 2007 05:38:53 +0000 (00:38 -0500)]
[IA64] fix ACPI Kconfig issues

All IA64 systems except IA64_HP_SIM include ACPI and PCI.
So prevent IA64 Kconfigs that try to do irritating things like building
PCI without building ACPI.

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Fix NULL-pointer dereference in ia64_machine_kexec()
Bernhard Walle [Sun, 28 Jan 2007 12:47:02 +0000 (13:47 +0100)]
[IA64] Fix NULL-pointer dereference in ia64_machine_kexec()

This patch fixes a NULL-pointer dereference in ia64_machine_kexec().

The variable ia64_kimage is set in machine_kexec_prepare() which is
called from sys_kexec_load(). If kdump wasn't configured before,
ia64_kimage is NULL.  machine_kdump_on_init() passes ia64_kimage() to
machine_kexec() which assumes a valid value.

The patch also adds a few sanity checks for the image to simplify
debugging of similar problems in future.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] find thread for user rbs address
bibo,mao [Tue, 30 Jan 2007 03:02:19 +0000 (11:02 +0800)]
[IA64] find thread for user rbs address

I encountered one problem when running ptrace test case the situation
is this: traced process's syscall parameter needs to be accessed, but
for sys_clone system call with clone_flag (CLONE_VFORK | CLONE_VM |
SIGCHLD) parameter.  This syscall's parameter accessing result is wrong.

The reason is that vforked child process mm point is the same, but
tgid is different. Without this patch find_thread_for_addr will return
vforked process if vforked process is also stopped, but not the thread
which calls vfork syscall.

Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] use snprintf() on features field of /proc/cpuinfo
Aron Griffis [Mon, 5 Feb 2007 21:54:31 +0000 (13:54 -0800)]
[IA64] use snprintf() on features field of /proc/cpuinfo

Some patches have turned up on xen-devel recently to convert strcpy()
to safer alternatives and so forth.  While reviewing those patches
I noticed that the features string building could be cleaned up.

This patch uses snprintf() instead of strcpy() and direct character
pointer manipulation.  It makes the features string building safe and
gets rid of the special case for features output in show_cpuinfo()

Additionally I removed the (int) cast of ARRAY_SIZE, which seems to
serve no purpose.

Signed-off-by: Aron Griffis <aron@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] enable singlestep on system call
bibo,mao [Wed, 31 Jan 2007 09:50:31 +0000 (17:50 +0800)]
[IA64] enable singlestep on system call

As is pointed out in
http://www.gelato.org/community/view_linear.php?id=1_1036&from=authors&value=Ian%20Wienand#1_1039,
if single step on break instruction, the break fault has higher
priority than the single-step trap. When the break fault handler
is entered, it advances the IP by 1 instruction so break instruction
single-stepping is skipped, actually it is next instruction which
is single stepped.

This patch modifies this, it adds TIF_SINGLESTEP bit for thread
flags, and generate a fake sigtrap when single stepping break
instruction. Test case in attachment can verify this. Any comments
is welcome.

Signed-off-by: bibo, mao <bibo.mao@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] kexec: Move machine_shutdown from machine_kexec.c to process.c
Horms [Mon, 5 Feb 2007 21:49:10 +0000 (13:49 -0800)]
[IA64] kexec: Move machine_shutdown from machine_kexec.c to process.c

This moves the ia64 implementation of machine_shutdown() from
machine_kexec.c to process.c, which is in keeping with the implelmentation
on other architectures, and seems like a much more appropriate home for it.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[S390] Avoid excessive inlining.
Heiko Carstens [Mon, 5 Feb 2007 20:18:53 +0000 (21:18 +0100)]
[S390] Avoid excessive inlining.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Mark kernel text section read-only.
Heiko Carstens [Mon, 5 Feb 2007 20:18:41 +0000 (21:18 +0100)]
[S390] Mark kernel text section read-only.

Set read-only flag in the page table entries for the kernel image text
section. This will catch all instruction caused corruptions withing the
text section.
Instruction replacement via kprobes still works, since it bypasses now
dynamic address translation.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Convert memory detection into C code.
Heiko Carstens [Mon, 5 Feb 2007 20:18:37 +0000 (21:18 +0100)]
[S390] Convert memory detection into C code.

Hopefully this will make it more maintainable and less error prone.
Code makes use of search_exception_tables(). Since it calls this
function before the kernel exeception table is sorted, there is an
early call to sort_main_extable().

This way it's easy to use the already present infrastructure of fixup
sections. Also this would allows to easily convert the rest of
head[31|64].S into C code.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Calibrate delay and bogomips.
Martin Schwidefsky [Mon, 5 Feb 2007 20:18:31 +0000 (21:18 +0100)]
[S390] Calibrate delay and bogomips.

Preset the bogomips number to the cpu capacity value reported by
store system information in SYSIB 1.2.2. This value is constant
for a particular machine model and can be used to determine
relative performance differences between machines.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Hypervisor filesystem (s390_hypfs) for z/VM
Michael Holzheu [Mon, 5 Feb 2007 20:18:29 +0000 (21:18 +0100)]
[S390] Hypervisor filesystem (s390_hypfs) for z/VM

This is an extension of the already existing hypfs for LPAR (DIAG 204).
Data returned by DIAG 2fc is exported using the s390_hypfs when Linux
is running under z/VM. Information about cpus and memory is provided.
Data is put into different virtual files which can be accessed from user
space. All values are represented as ASCII strings

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Add crypto support for 3592 tape devices
Michael Holzheu [Mon, 5 Feb 2007 20:18:26 +0000 (21:18 +0100)]
[S390] Add crypto support for 3592 tape devices

3592 tape devices are able to write data encrpyted on tape mediums.
This z/Linux device driver support includes the following functions:
 * ioctl to switch on/off encryption
 * ioctl to query encryption status of drive
 * ioctls to set and query key encrypting keys (kekls)
 * long busy interrupt handling

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] boot from NSS support
Hongjie Yang [Mon, 5 Feb 2007 20:18:24 +0000 (21:18 +0100)]
[S390] boot from NSS support

Add support to boot from a named saved segment (NSS).

Signed-off-by: Hongjie Yang <hongjie@us.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Support for s390 Pseudo Random Number Generator
Jan Glauber [Mon, 5 Feb 2007 20:18:22 +0000 (21:18 +0100)]
[S390] Support for s390 Pseudo Random Number Generator

Starting with the z9 the CPU Cryptographic Assist Facility comes with
an integrated Pseudo Random Number Generator. The generator creates
random numbers by an algorithm similar to the ANSI X9.17 standard.
The pseudo-random numbers can be accessed via a character device driver
node called /dev/prandom. Similar to /dev/urandom any amount of bytes
can be read from the device without blocking.

Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>