]> Pileus Git - ~andy/linux/log
~andy/linux
16 years agoV4L/DVB (7830): dvb_ca_en50221: Fix High CPU load in 'top' due to budget_av slot...
Robert Schedel [Sat, 3 May 2008 15:58:36 +0000 (12:58 -0300)]
V4L/DVB (7830): dvb_ca_en50221: Fix High CPU load in 'top' due to budget_av slot polling

This change addresses kernel bug #10459: In kernel 2.6.25 the
budget_av driver polls for an CI slot in 100ms intervals (because no
interrupt solution for budget_av cards is feasible due to HW reasons).
If no CI/CAM is connected to the DVB card, polling times out only after 250ms.
This periodic polling leads to high CPU load.

The change increases the polling interval for empty slots from 100ms to 5s.
Intervals for remaining slot states (invalid, in progress, ready) are unchanged,
as they are either temporary conditions or no timeout should occur.

Signed-off-by: Robert Schedel <r.schedel@yahoo.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7829): cx23885: remove remaining references to dvb-pll
Michael Krufky [Fri, 2 May 2008 19:20:10 +0000 (16:20 -0300)]
V4L/DVB (7829): cx23885: remove remaining references to dvb-pll

The cx23885 driver used to use dvb-pll for LG-TDVS-H064F support on the
FusionHDTV5 Express.  This has since been converted to use tuner-simple
instead, once digital tuning support was added to tuner-simple.

Since cx23885 no longer uses dvb-pll, remove the #include "dvb-pll.h",
and the DVB_PLL Kconfig selection.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7828): cx23885: update model matrix for Hauppauge WinTV HVR-1200 & WinTV...
Michael Krufky [Fri, 2 May 2008 19:14:33 +0000 (16:14 -0300)]
V4L/DVB (7828): cx23885: update model matrix for Hauppauge WinTV HVR-1200 & WinTV HVR-1700

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7827): cx23885: add missing subsystem ID for Hauppauge HVR-1200 OEM
Michael Krufky [Fri, 2 May 2008 19:12:44 +0000 (16:12 -0300)]
V4L/DVB (7827): cx23885: add missing subsystem ID for Hauppauge HVR-1200 OEM

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7823): em28xx: add additional usb subids for Hauppauge HVR-950
Michael Krufky [Thu, 1 May 2008 21:02:30 +0000 (18:02 -0300)]
V4L/DVB (7823): em28xx: add additional usb subids for Hauppauge HVR-950

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7813): Fix compilation, when V4L1_COMPAT is disabled
Mauro Carvalho Chehab [Thu, 1 May 2008 05:17:24 +0000 (02:17 -0300)]
V4L/DVB (7813): Fix compilation, when V4L1_COMPAT is disabled

This driver uses some sysfs helper functions that are available only for legacy
drivers. It also requires linux/mm.h.

This patch fixes compiliation when not in compat mode.

Thanks to Ingo Molnar for identifying this issue.

Acked-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7810): soc_camera: mt9v022 and mt9m001 depend on I2C
Guennadi Liakhovetski [Wed, 30 Apr 2008 12:21:33 +0000 (09:21 -0300)]
V4L/DVB (7810): soc_camera: mt9v022 and mt9m001 depend on I2C

Both mt9v022 and mt9m001 cameras are controlled over the I2C bus.
Respectively, their drivers require I2C to be built successfully.
Thanks to Ingo Molnar for reporting the build-breakage.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7808): cx23885: fix kbuild dependencies
Michael Krufky [Wed, 30 Apr 2008 15:36:09 +0000 (12:36 -0300)]
V4L/DVB (7808): cx23885: fix kbuild dependencies

Thanks to Ingo Molnar for finding this.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7807): cx88: Fix error handling, when dvb_attach() fails
Mauro Carvalho Chehab [Wed, 30 Apr 2008 21:14:36 +0000 (18:14 -0300)]
V4L/DVB (7807): cx88: Fix error handling, when dvb_attach() fails

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7806): em28xx: dvb_unregister_frontend() shouldn't be called, if not registe...
Mauro Carvalho Chehab [Wed, 30 Apr 2008 21:13:46 +0000 (18:13 -0300)]
V4L/DVB (7806): em28xx: dvb_unregister_frontend() shouldn't be called, if not registered yet

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7805): saa7134: dvb_unregister_frontend() shouldn't be called, if not regist...
Mauro Carvalho Chehab [Wed, 30 Apr 2008 21:13:05 +0000 (18:13 -0300)]
V4L/DVB (7805): saa7134: dvb_unregister_frontend() shouldn't be called, if not registered yet

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7804): tea5767: Fix error logic
Mauro Carvalho Chehab [Wed, 30 Apr 2008 18:45:00 +0000 (15:45 -0300)]
V4L/DVB (7804): tea5767: Fix error logic

As pointed by Andrew Morton, the error testing were wrong. After reviewing
tea5767, it were returning a positive value for errors.

So, the double errors were cancelling each other.

This patch fix it properly. It also considers any positive value as ok, on
tuner-core.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7802): tuner: Failures at tuner_attach were producing OOPS
Mauro Carvalho Chehab [Wed, 30 Apr 2008 18:29:57 +0000 (15:29 -0300)]
V4L/DVB (7802): tuner: Failures at tuner_attach were producing OOPS

As reported by Mike Galbraith <efault@gmx.de>:

[   13.666587] TUNER: Unable to find symbol tda829x_probe()
[   13.674638] tuner' 1-004b: chip found @ 0x96 (saa7133[0])
[   13.691175] DVB: Unable to find symbol tda9887_attach()
[   13.698968] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
[   13.709509] IP: [<ffffffff80302934>] strlcpy+0x11/0x36
[   13.711135] PGD be167067 PUD be140067 PMD 0
[   13.711137] Oops: 0000 [1] SMP

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7801): saa7134: detach frontend, if tuner or Diseqc attach fails
Mauro Carvalho Chehab [Wed, 30 Apr 2008 18:27:55 +0000 (15:27 -0300)]
V4L/DVB (7801): saa7134: detach frontend, if tuner or Diseqc attach fails

Before this patch, an error at tuner or diseqc were discarded by the driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7800): tuner_symbol_probe(): don't do symbol_put() if symbol_request() failed
Andrew Morton [Wed, 30 Apr 2008 14:40:17 +0000 (11:40 -0300)]
V4L/DVB (7800): tuner_symbol_probe(): don't do symbol_put() if symbol_request() failed

Because it goes BUG.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoext4: mballoc fix mb_normalize_request algorithm for 1KB block size filesystems
Valerie Clement [Tue, 13 May 2008 23:31:14 +0000 (19:31 -0400)]
ext4: mballoc fix mb_normalize_request algorithm for 1KB block size filesystems

In case of inode preallocation, the number of blocks to allocate depends
on the file size and it is calculated in ext4_mb_normalize_request().
Each group in the filesystem is then checked to find one that can be
used for allocation; this is done in ext4_mb_good_group().

When a file bigger than 4MB is created, the requested number of blocks
to preallocate, calculated by ext4_mb_normalize_request is 4096.
However for a filesystem with 1KB block size, the maximum size of the
block buddies used by the multiblock allocator is 2048, so none of
groups in the filesystem satisfies the search criteria in
ext4_mb_good_group(). Scanning all the filesystem groups impacts
performance.

This was demonstrated by using a freshly created, 70GB, 1k block
filesystem, with caches dropped write before the test via
/proc/sys/vm/drop_caches, and with the filesystem mounted with
nodelalloc and nodealloc,nomballoc.  The time to write an 8 megabyte
file using "dd if=/dev/zero of=/mnt/test/fo bs=8k count=1k conv=fsync"
took 35.5091 seconds (236kB/s) with nodellaloc, and 0.233754 seconds
(35.9 MB/s) with the nodelloc,nomballoc options.  With a 1TB partition,
it took several minutes to write 8MB!

This patch modifies the algorithm in ext4_mb_normalize_group_request to
calculate the number of blocks to allocate by taking into account the
maximum size of free blocks chunks handled by the multiblock allocator.

It has also been tested for filesystems with 2KB and 4KB block sizes to
ensure that those cases don't regress.

Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoext4: fix typos in messages and comments (journalled -> journaled)
Jan Kara [Wed, 14 May 2008 01:27:55 +0000 (21:27 -0400)]
ext4: fix typos in messages and comments (journalled -> journaled)

Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoext4: fix synchronization of quota files in journal=data mode
Jan Kara [Tue, 13 May 2008 23:11:51 +0000 (19:11 -0400)]
ext4: fix synchronization of quota files in journal=data mode

In journal=data mode, it is not enough to do write_inode_now as done in
vfs_quota_on() to write all data to their final location (which is
needed for quota_read to work correctly).  Calling journal_flush() does
its job.

Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoext4: Fix mount messages when quota disabled
Jan Kara [Tue, 13 May 2008 23:11:51 +0000 (19:11 -0400)]
ext4: Fix mount messages when quota disabled

When quota is disabled, we should not print 'journaled quota not
supported' when user tried to mount non-journaled quota. Also fix typo
in the message.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoext4: correct mount option parsing to detect when quota options can be changed
Jan Kara [Tue, 13 May 2008 23:11:51 +0000 (19:11 -0400)]
ext4: correct mount option parsing to detect when quota options can be changed

We should not allow user to change quota mount options when quota is
just suspended.  It would make mount options and internal quota state
inconsistent.  Also we should not allow user to change quota format when
quota is turned on.  On the other hand we can just silently ignore when
some option is set to the value it already has (mount does this on
remount).

Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
16 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 13 May 2008 19:33:56 +0000 (12:33 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: user_regset_view table fix for ia32 on 64-bit
  x86: arch/x86/mm/pat.c - fix warning
  x86: fix csum_partial() export
  x86: early_init_centaur(): use set_cpu_cap()
  x86: fix app crashes after SMP resume
  x86: wakeup.lds.S - section ordering fix
  x86: [VOYAGER] fix duplicate phys_cpu_present_map symbol
  x86/pci: fix broken ISA DMA

16 years agoRDMA/cxgb3: Wrap the software send queue pointer as needed on flush
Steve Wise [Tue, 13 May 2008 18:52:55 +0000 (11:52 -0700)]
RDMA/cxgb3: Wrap the software send queue pointer as needed on flush

cxio_flush_sq() was failing to wrap around the software send queue
causing garbage completion entries on a flush operation.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Change ipath_devdata.ipath_sdma_status to be unsigned long
Roland Dreier [Tue, 13 May 2008 18:51:23 +0000 (11:51 -0700)]
IB/ipath: Change ipath_devdata.ipath_sdma_status to be unsigned long

Andrew Morton <akpm@linux-foundation.org> pointed out that bitops
should take an unsigned long * arg.  However, the ipath driver was
doing bitops on struct ipath_devdata.ipath_sdma_status, which is u64.
Change this member to unsigned long to avoid tons of warnings when x86
fixes the bitops to take unsigned long * instead of void *.

Also, change the IPATH_SDMA_RUNNING and IPATH_SDMA_SHUTDOWN bit
numbers to 30 and 31 (instead of 62 and 63) so that we're not setting
another booby trap for someone who tries to make ipath work on a
32-bit architecture.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Make ipath_portdata work with struct pid * not pid_t
Pavel Emelyanov [Tue, 13 May 2008 18:45:32 +0000 (11:45 -0700)]
IB/ipath: Make ipath_portdata work with struct pid * not pid_t

The official reason is "with the presence of pid namespaces in the
kernel using pid_t-s inside one is no longer safe."

But the reason I fix this right now is the following:

About a month ago (when 2.6.25 was not yet released) there still was a
one last caller of a to-be-deprecated-soon function find_pid() - the
kill_proc() function, which in turn was only used by nfs callback
code.

During the last merge window, this last caller was finally eliminated
by some NFS patch(es) and I was about to finally kill this kill_proc()
and find_pid(), but found, that I was late and the kill_proc is now
called from the ipath driver since commit 58411d1c ("IB/ipath: Head of
Line blocking vs forward progress of user apps").

So here's a patch that fixes this code to use struct pid * and (!)
the kill_pid routine.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix RDMA read response sequence checking
Ralph Campbell [Tue, 13 May 2008 18:42:20 +0000 (11:42 -0700)]
IB/ipath: Fix RDMA read response sequence checking

If an out of sequence RDMA read response middle or last packet is
received, we should only resend the RDMA read request on the first
out of sequence packet and drop subsequent out of sequence packets
otherwise, we get "too many retries".

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix many locking issues when switching to error state
Ralph Campbell [Tue, 13 May 2008 18:41:29 +0000 (11:41 -0700)]
IB/ipath: Fix many locking issues when switching to error state

The send DMA hardware queue voided a number of prior assumptions about
when a send is complete which led to completions being generated out of
order.  There were also a number of locking issues when switching the QP
to the error or reset states, and we implement the IB_QPS_SQD state.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix RC and UC error handling
Ralph Campbell [Tue, 13 May 2008 18:40:25 +0000 (11:40 -0700)]
IB/ipath: Fix RC and UC error handling

When errors are detected in RC, the QP should transition to the
IB_QPS_ERR state, not the IB_QPS_SQE state. Also, when the error is on
the responder side, the receive work completion error was incorrect
(remote vs. local).

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/nes: Fix up nes_lro_max_aggr module parameter
Roland Dreier [Tue, 13 May 2008 18:27:25 +0000 (11:27 -0700)]
RDMA/nes: Fix up nes_lro_max_aggr module parameter

Fix some bugs with the max_aggr module parameter added with LRO support:

 - The module parameter value ignored and not actually used to set
   lro_mgr.max_aggr.
 - MODULE_PARM_DESC had a typo "_mro_" instead of "_lro_" so it didn't
   end up describing the actual module parameter.
 - The nes_lro_max_aggr variable was declared as unsigned, but the
   module_param line said "int" instead of "uint" for the type.
 - The default value for the parameter was stuck in the permissions
   field of module_param, which led to nonsensical permissions for the
   file under /sys/module/iw_nes/param.
 - The parameter was used in only one file but defined in another, which
   led to the variable being global for no good reason.  Move everything
   related to the parameter to the file nes_hw.c where it is actually
   used.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Tue, 13 May 2008 18:24:51 +0000 (11:24 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] qla1280: Fix queue depth problem
  [SCSI] aha152x: Fix oops on module removal
  [SCSI] aha152x: fix init suspiciously returned 1, it should follow 0/-E convention
  [SCSI] libiscsi regression in 2.6.25: fix setting of recv timer
  [SCSI] libiscsi regression in 2.6.25: fix nop timer handling
  [SCSI] gdth: fix Error: Driver 'gdth' is already registered, aborting...
  [SCSI] gdth: fix timer handling

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Tue, 13 May 2008 17:48:35 +0000 (10:48 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  ACPI/PCI: another multiple _OSC memory leak fix
  x86/PCI: X86_PAT & mprotect
  PCI: enable nv_msi_ht_cap_quirk for ALi bridges
  PCI: Make the intel-iommu_wait_op macro work when jiffies are not running
  ACPI/PCI: handle multiple _OSC
  ACPI/PCI: handle multiple _OSC
  x86/PCI: fix broken ISA DMA
  PCI ACPI: fix uninitialized variable in __pci_osc_support_set

16 years agox86: user_regset_view table fix for ia32 on 64-bit
Roland McGrath [Fri, 9 May 2008 22:43:44 +0000 (15:43 -0700)]
x86: user_regset_view table fix for ia32 on 64-bit

The user_regset_view table for the 32-bit regsets on the 64-bit build had
the wrong sizes for the FP regsets.  This bug had no user-visible effect
(just on kernel modules using the user_regset interfaces and the like).
But the fix is trivial and risk-free.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: arch/x86/mm/pat.c - fix warning
Pranith Kumar [Mon, 12 May 2008 09:22:26 +0000 (14:52 +0530)]
x86: arch/x86/mm/pat.c - fix warning

fix this warning:

 arch/x86/mm/pat.c: In function `phys_mem_access_prot_allowed':
 arch/x86/mm/pat.c:558: warning: long long unsigned int format, long
 unsigned int arg (arg 6)
 arch/x86/mm/pat.c: In function `map_devmem':
 arch/x86/mm/pat.c:580: warning: long long unsigned int format, long
 unsigned int arg (arg 6)

Signed-off-by: D Pranith Kumar <bobby.prani@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix csum_partial() export
Ingo Molnar [Tue, 13 May 2008 08:36:22 +0000 (10:36 +0200)]
x86: fix csum_partial() export

Fix this symbol export problem:

    Building modules, stage 2.
    MODPOST 193 modules
    ERROR: "csum_partial" [fs/reiserfs/reiserfs.ko] undefined!
    make[1]: *** [__modpost] Error 1
    make: *** [modules] Error 2

This is due to a known weakness of symbol exports: if a symbol's
only in-core user is an EXPORT_SYMBOL from a lib-y section, the
symbol is not linked in.

The solution is to move the export to x8664_ksyms_64.c - but the real
solution would be to fix kbuild.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: early_init_centaur(): use set_cpu_cap()
Andrew Morton [Tue, 13 May 2008 02:31:20 +0000 (19:31 -0700)]
x86: early_init_centaur(): use set_cpu_cap()

arch/x86/kernel/setup_64.c:954: warning: passing argument 2 of 'set_bit' from incompatible pointer type

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix app crashes after SMP resume
Hugh Dickins [Tue, 13 May 2008 13:26:57 +0000 (14:26 +0100)]
x86: fix app crashes after SMP resume

After resume on a 2cpu laptop, kernel builds collapse with a sed hang,
sh or make segfault (often on 20295564), real-time signal to cc1 etc.

Several hurdles to jump, but a manually-assisted bisect led to -rc1's
d2bcbad5f3ad38a1c09861bca7e252dde7bb8259 x86: do not zap_low_mappings
in __smp_prepare_cpus.  Though the low mappings were removed at bootup,
they were left behind (with Global flags helping to keep them in TLB)
after resume or cpu online, causing the crashes seen.

Reinstate zap_low_mappings (with local __flush_tlb_all) for each cpu_up
on x86_32.  This used to be serialized by smp_commenced_mask: that's now
gone, but a low_mappings flag will do.  No need for native_smp_cpus_done
to repeat the zap: let mem_init zap BSP's low mappings just like on UP.

(In passing, fix error code from native_cpu_up: do_boot_cpu returns a
variety of diagnostic values, Dprintk what it says but convert to -EIO.
And save_pg_dir separately before zap_low_mappings: doesn't matter now,
but zapping twice in succession wiped out resume's swsusp_pg_dir.)

That worked well on the duo and one quad, but wouldn't boot 3rd or 4th
cpu on P4 Xeon, oopsing just after unlock_ipi_call_lock.  The TLB flush
IPI now being sent reveals a long-standing bug: the booting cpu has its
APIC readied in smp_callin at the top of start_secondary, but isn't put
into the cpu_online_map until just before that unlock_ipi_call_lock.

So native_smp_call_function_mask to online cpus would send_IPI_allbutself,
including the cpu just coming up, though it has been excluded from the
count to wait for: by the time it handles the IPI, the call data on
native_smp_call_function_mask's stack may well have been overwritten.

So fall back to send_IPI_mask while cpu_online_map does not match
cpu_callout_map: perhaps there's a better APICological fix to be
made at the start_secondary end, but I wouldn't know that.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years ago[SCSI] qla1280: Fix queue depth problem
Jeremy Higdon [Mon, 12 May 2008 06:17:03 +0000 (23:17 -0700)]
[SCSI] qla1280: Fix queue depth problem

The qla1280 driver was ANDing the output value of mailbox register
0 with (1 << target-number) to determine whether to enable queueing
on the target in question.

But mailbox register 0 has the status code for the mailbox command
(in this case, Set Target Parameters).  Potential values are:
/*
 * ISP mailbox command complete status codes
 */

So clearly that is in error.  I can't think what the author of that
line was looking for in a mailbox register, so I just eliminated the
AND.  flag is used later in the function, and I think that the later
usage was also wrong, though it was used to set values that aren't
used.  Oh well, an overhaul of this driver is not what I want to do
now -- just a bugfix.

After the fix, I found that my disks were getting a queue depth of
255, which is far too many.  Most SCSI disks are limited to 32 or
64.  In any case, there's no point, queueing up a bunch of commands
to the adapter that will just result in queue full or starve other
targets from being issued commands due to running out of internal
memory.  So I dropped default queue depth to 32 (from which 1 is
subtracted elsewhere, giving net of 31).

I tested with a Seagate ST336753LC, and results look good, so
I'm satisfied with this patch.

Signed-off-by: Jeremy Higdon <jeremy@sgi.com>
Acked-by: Jes Sorensen <jes@sgi.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoACPI/PCI: another multiple _OSC memory leak fix
Kenji Kaneshige [Tue, 13 May 2008 07:48:50 +0000 (16:48 +0900)]
ACPI/PCI: another multiple _OSC memory leak fix

The acpi_query_osc() function can be called for the ACPI object that
doesn't have _OSC method. In this case, acpi_get_osc_data() would
allocate a useless memory region. To avoid this, we need to check the
existence of _OSC before calling acpi_get_osc_data() in acpi_query_osc().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agox86/PCI: X86_PAT & mprotect
Venki Pallipadi [Fri, 9 May 2008 20:05:19 +0000 (13:05 -0700)]
x86/PCI: X86_PAT & mprotect

Some versions of X used the mprotect workaround to change caching type from UC
to WB, so that it can then use mtrr to program WC for that region [1].  Change
the mmap of pci space through /sys or /proc interfaces from UC to UC_MINUS.
With this change, X will not need to use mprotect workaround to get WC type
since the MTRR mapping type will be honored.

The bug in mprotect that clobbers PAT bits is fixed in a follow on patch. So,
this X workaround will stop working as well.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoPCI: enable nv_msi_ht_cap_quirk for ALi bridges
Björn Krombholz [Sun, 11 May 2008 22:24:27 +0000 (00:24 +0200)]
PCI: enable nv_msi_ht_cap_quirk for ALi bridges

This applies the NVidia MSI enabled flag for HT capable devices quirk
to ALi bridges as well.

As described in more detail in http://bugzilla.kernel.org/show_bug.cgi?id=10667
this is required for my board which is using an nForce 3 250Gb chipset with an
ALi M1695 northbridge.

It fixes a regression introduced in 2.6.24 that made the internal NIC of the
board unusable (MSI initialisation of the NIC but disabled MSI on the
northbridge devices.

Signed-off-by: Björn Krombholz <fox.box@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoPCI: Make the intel-iommu_wait_op macro work when jiffies are not running
mark gross [Mon, 12 May 2008 20:41:57 +0000 (13:41 -0700)]
PCI: Make the intel-iommu_wait_op macro work when jiffies are not running

The following patch changes the intel-iommu.c code to use the TSC
instead of jiffies for detecting bad DMAR functionality.  Some systems
with bad bios's have been seen to hang in early boot spinning in the
IOMMU_WAIT_IO macro.  This patch will replace the infinite loop with a call to
panic.

Signed-off-by: Mark Gross <mgross@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoACPI/PCI: handle multiple _OSC
Kenji Kaneshige [Mon, 12 May 2008 13:55:45 +0000 (22:55 +0900)]
ACPI/PCI: handle multiple _OSC

The pci_osc_control_set() function can be called for the ACPI object
that doesn't have _OSC method. In this case, acpi_get_osc_data() would
allocate a useless memory region. To avoid this, we need to check the
existence of _OSC before calling acpi_get_osc_data(). Here is a patch
to fix this problem in pci_osc_control_set.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoACPI/PCI: handle multiple _OSC
Shaohua Li [Mon, 12 May 2008 02:48:10 +0000 (10:48 +0800)]
ACPI/PCI: handle multiple _OSC

There is an IA64 system here which have two pci root bridges with _OSC.
One _OSC disables SHPC control bit but the other not. Below patch makes
_OSC data per-device instead of one global, otherwise linux takes both
root bridges don't support SHPC.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agox86/PCI: fix broken ISA DMA
Takashi Iwai [Fri, 9 May 2008 06:06:55 +0000 (08:06 +0200)]
x86/PCI: fix broken ISA DMA

Rene Herman reported:

> commit 8779f2fc3b84ebb6c5181fb13d702e9944c16069
>
> "x86: don't try to allocate from DMA zone at first"
>
> breaks all of ISA DMA. Or all of ALSA ISA DMA at least. All
> ISA soundcards are silent following that commit -- no error
> messages, everything appears fine, just silence.

That patch is buggy. We had an implicit assumption that
dev = NULL for ISA devices that require 24bit DMA.

The recent work on x86 dma_alloc_coherent() breaks the ISA DMA buffer
allocation, which is represented by "dev = NULL" and requires 24bit
DMA implicitly.

Bisected-by: Rene Herman <rene.herman@keyaccess.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoPCI ACPI: fix uninitialized variable in __pci_osc_support_set
Kenji Kaneshige [Thu, 8 May 2008 05:37:25 +0000 (14:37 +0900)]
PCI ACPI: fix uninitialized variable in __pci_osc_support_set

Fix uninitialized variable in __pci_osc_support_set().

If the ACPI namespace doesn't have any device object corresponding to
the specified hid, 'retval' in __pci_osc_support_set() is not changed
by the acpi_query_osc() callback. Since 'retval' is not initizlized in
the current implementation, the contents of 'retval' is undefined in
this case. This causes a mis-handling of ctrlset_buf[OSC_SUPPORT_TYPE]
and will cause an unexpected result in the subsequent
pci_osc_control_set() call as a result.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Tue, 13 May 2008 16:49:06 +0000 (09:49 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  [ALSA] ASoC: Fix wrong enum count for jack_function in N810 machine driver
  [ALSA] ASoC: build fix for snd_soc_info_bool_ext
  [ALSA] ASoC: Fix TLV320AIC3X mono line output interconnect
  [ALSA] soc - fsl_ssi.c fix "BUG: scheduling while atomic"
  [ALSA] emux midi synthesizer doesn't honor SOFT_PEDAL-release event

16 years agoeCryptFS: fix imbalanced mutex locking
Cyrill Gorcunov [Mon, 12 May 2008 21:02:40 +0000 (14:02 -0700)]
eCryptFS: fix imbalanced mutex locking

Fix imbalanced calls for mutex lock/unlock on ecryptfs_daemon_hash_mux
Revealed by Ingo Molnar: http://lkml.org/lkml/2008/5/7/260

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agovt/fbcon: fix background color on line feed
Jan Engelhardt [Mon, 12 May 2008 21:02:39 +0000 (14:02 -0700)]
vt/fbcon: fix background color on line feed

Another addendum to commit c9e587abfdec2c2aaa55fab83bcb4972e2f84f9b
("vt: fix background color on line feed").

fbcon still was not doing the right thing (read: continued to do old
behavior).  fbcon_clear() seems to clear the new line (e.g.  where your new
prompt appears after doing echo -en "\e[42mfoo\n"), while scr_memsetw clears
the previous one only (where "foo" appears).  So just temporarily set the
video_erase_char to the scrl_erase_char so that fbcon_clear does the right
thing.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agovt/fbcon: update scrl_erase_char after 256/512-glyph font switch
Jan Engelhardt [Mon, 12 May 2008 21:02:38 +0000 (14:02 -0700)]
vt/fbcon: update scrl_erase_char after 256/512-glyph font switch

Addendum to commit c9e587abfdec2c2aaa55fab83bcb4972e2f84f9b ("vt: fix
background color on line feed").

vc->vc_scrl_erase_char was not updated when fbcon switches between
256- and 512-glyph fonts.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agortc: m41t80: include <linux/kernel.h> for printk()
Maciej W. Rozycki [Mon, 12 May 2008 21:02:38 +0000 (14:02 -0700)]
rtc: m41t80: include <linux/kernel.h> for printk()

The driver uses printk(), but does not include <linux/kernel.h> -- add it.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexander Bigga <ab@mycable.de>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRTC/watchdog: M41T80: fix a potential use of unitialized data
Maciej W. Rozycki [Mon, 12 May 2008 21:02:35 +0000 (14:02 -0700)]
RTC/watchdog: M41T80: fix a potential use of unitialized data

Watchdog handlers within the driver make use of "save_client" -- make sure it
has been initalized before the handlers are registered.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexander Bigga <ab@mycable.de>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/char/synclink_gt.c: don't return an uninitialised local
Andrew Morton [Mon, 12 May 2008 21:02:34 +0000 (14:02 -0700)]
drivers/char/synclink_gt.c: don't return an uninitialised local

drivers/char/synclink_gt.c: In function 'put_char':
drivers/char/synclink_gt.c:919: warning: 'ret' may be used uninitialized in this function

The compiler speaketh truth.

Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix misuses of bdevname()
Jean Delvare [Mon, 12 May 2008 21:02:33 +0000 (14:02 -0700)]
Fix misuses of bdevname()

bdevname() fills the buffer that it is given as a parameter, so calling
strcpy() or snprintf() on the returned value is redundant (and probably not
guaranteed to work - I don't think strcpy and snprintf support overlapping
buffers.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofuse: add flag to turn on big writes
Miklos Szeredi [Mon, 12 May 2008 21:02:32 +0000 (14:02 -0700)]
fuse: add flag to turn on big writes

Prior to 2.6.26 fuse only supported single page write requests.  In theory all
fuse filesystem should be able support bigger than 4k writes, as there's
nothing in the API to prevent it.  Unfortunately there's a known case in
NTFS-3G where big writes cause filesystem corruption.  There could also be
other filesystems, where the lack of testing with big write requests would
result in bugs.

To prevent such problems on a kernel upgrade, disable big writes by default,
but let filesystems set a flag to turn it on.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Szabolcs Szakacsits <szaka@ntfs-3g.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocgroups: fix documentation
Dhaval Giani [Mon, 12 May 2008 21:02:31 +0000 (14:02 -0700)]
cgroups: fix documentation

Correct the cgroups documentation to reflect the correct file names.

Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Sudhir Kumar <skumar@linux.vnet.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemcg: fix possible panic when CONFIG_MM_OWNER=y
KOSAKI Motohiro [Mon, 12 May 2008 21:02:31 +0000 (14:02 -0700)]
memcg: fix possible panic when CONFIG_MM_OWNER=y

When mm destruction happens, we should pass mm_update_next_owner() the old mm.
 But unfortunately new mm is passed in exec_mmap().

Thus, kernel panic is possible when a multi-threaded process uses exec().

Also, the owner member comment description is wrong.  mm->owner does not
necessarily point to the thread group leader.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: "Paul Menage" <menage@google.com>
Cc: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agospi_mpc83xx: much improved driver
Joakim Tjernlund [Mon, 12 May 2008 21:02:30 +0000 (14:02 -0700)]
spi_mpc83xx: much improved driver

The current driver may cause glitches on SPI CLK line since one must disable
the SPI controller before changing any HW settings.  Fix this by implementing
a local spi_transfer function that won't change speed and/or word size while
CS is active.

While doing that heavy lifting a few other issues were addressed too:
 - Make word size 16 and 32 work too.
 - Honor bits_per_word and speed_hz in spi transaction.
 - Optimize the common path.

This also stops using the "bitbang" framework (except for a few constants).

[Roel Kluin <12o3l@tiscali.nl>: "irq" needs to be signed]
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocpumask: remove bitmap_scnprintf_len and cpumask_scnprintf_len
Paul Jackson [Mon, 12 May 2008 21:02:29 +0000 (14:02 -0700)]
cpumask: remove bitmap_scnprintf_len and cpumask_scnprintf_len

They aren't used.  They were briefly used as part of some other patches to
provide an alternative format for displaying some /proc and /sys cpumasks.
They probably should have been removed when those other patches were dropped,
in favor of a different solution.

Signed-off-by: Paul Jackson <pj@sgi.com>
Cc: "Mike Travis" <travis@sgi.com>
Cc: "Bert Wesarg" <bert.wesarg@googlemail.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbdev: do not let CONFIG_FB_DEFERRED_IO default to y
Geert Uytterhoeven [Mon, 12 May 2008 21:02:28 +0000 (14:02 -0700)]
fbdev: do not let CONFIG_FB_DEFERRED_IO default to y

CONFIG_FB_DEFERRED_IO can not be turned off, while it's already selected
automatically by the drivers that need it.

Although it's nice to have more compile-coverage, not being able to disable a
rarely used feature is annoying.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatmel_lcdfb: fix pixclock divider calculation
Nicolas Ferre [Mon, 12 May 2008 21:02:25 +0000 (14:02 -0700)]
atmel_lcdfb: fix pixclock divider calculation

Fix divider calculation and allow CLKVAL = 0 (divisor 2)

It was not possible to get the clock value 0 (divisor 2) because
the test "<=0" force the BYPASS bit to be activated instead.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Per Hedblom <per.hedblom@abem.se>
Cc: Roel Kluin <12o3l@tiscali.nl>
Cc: Jan Weber <jw022609@uni-greifswald.de>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agortc: rtc_time_to_tm: use unsigned arithmetic
Maciej W. Rozycki [Mon, 12 May 2008 21:02:24 +0000 (14:02 -0700)]
rtc: rtc_time_to_tm: use unsigned arithmetic

The input argument to rtc_time_to_tm() is unsigned as well as are members of
the output structure.  However signed arithmetic is used within for
calculations leading to incorrect results for input values outside the signed
positive range.  If this happens the time of day returned is out of range.

Found the problem when fiddling with the RTC and the driver where year was set
to an unexpectedly large value like 2070, e.g.:

rtc0: setting system clock to 2070-01-01 1193046:71582832:26 UTC (3155760954)

while it should be:

rtc0: setting system clock to 2070-01-01 00:15:54 UTC (3155760954)

Changing types to unsigned fixes the problem.

[akpm@linux-foundation.org: remove old-fashioned `register' keyword]
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: missing sections for linker script
Greg Ungerer [Mon, 12 May 2008 21:02:23 +0000 (14:02 -0700)]
m68knommu: missing sections for linker script

Include the missing kcrctab and kcrctab_unused sections into the m68knommu
linker script.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoinit: don't lose initcall return values
Cyrill Gorcunov [Mon, 12 May 2008 21:02:22 +0000 (14:02 -0700)]
init: don't lose initcall return values

There is an ability to lose an initcall return value if it happened with irq
disabled or imbalanced preemption (and if we debug initcall).

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoUpdate Geode mailing list in MAINTAINERS
Jordan Crouse [Mon, 12 May 2008 21:02:22 +0000 (14:02 -0700)]
Update Geode mailing list in MAINTAINERS

Update the Geode list location in the MAINTAINERS file.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix hfsplus oops on image without extents
Eric Sesterhenn [Mon, 12 May 2008 21:02:21 +0000 (14:02 -0700)]
Fix hfsplus oops on image without extents

Fix an oops with a corrupted hfs+ image.

See http://bugzilla.kernel.org/show_bug.cgi?id=10548 for details.

Problem is that we call hfs_btree_open() from hfsplus_fill_super() to set
HFSPLUS_SB(sb).[ext_tree|cat_tree] Both trees are still NULL at this moment.
If hfs_btree_open() fails for any reason it calls iput() on the page, which
gets to hfsplus_releasepage() which tries to access HFSPLUS_SB(sb).* which is
still NULL and oopses while dereferencing it.

[akpm@linux-foundation.org: build fix]
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoparisc: fix DISCONTIGMEM compile breakage
Mel Gorman [Mon, 12 May 2008 21:02:19 +0000 (14:02 -0700)]
parisc: fix DISCONTIGMEM compile breakage

PA-RISC to aid debugging prints out the zonelists setup by the system.  A
bad call to node_zonelist() breaks at compile-time.  This patch fixes it.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoPNP: set IRQ index in sysfs "set irq" interface
Bjorn Helgaas [Mon, 12 May 2008 21:02:18 +0000 (14:02 -0700)]
PNP: set IRQ index in sysfs "set irq" interface

We have to set the ISAPNP register index when setting an IRQ via the sysfs
interface.  We already do it for IO, MEM, and DMA resources; I just missed the
IRQ one.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomn10300: replace deprecated "TOPDIR" with newer "srctree"
Robert P. J. Day [Mon, 12 May 2008 21:02:17 +0000 (14:02 -0700)]
mn10300: replace deprecated "TOPDIR" with newer "srctree"

This would appear to be the last reference to TOPDIR in the entire tree, after
which i'm guessing that variable can be dropped.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: David Howells <dhowells@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/video/pnx4008: eliminate double free
Julia Lawall [Mon, 12 May 2008 21:02:16 +0000 (14:02 -0700)]
drivers/video/pnx4008: eliminate double free

The function framebuffer_release just calls kfree, so calling kfree
subsequently on the same argument represents a double free.  The comments with
the definition of framebuffer_release in drivers/video/fbsysfs.c suggest that
a more elaborate definition of this function is planned, such that the
splitting up of framebuffer_release and kfree as done in the second instance
might someday make sense, but it does not make sense now.

This was found using the following semantic match.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression E;
@@

* kfree(E);
...
* framebuffer_release(E);

@@
expression E;
@@

* framebuffer_release(E);
...
* kfree(E);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Vitaly Wool <vitalywool@gmail.com>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Grigory Tolstolytkin <gtolstolytkin@ru.mvista.com>
Cc: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomm/pdflush.c: merge the same code in two path
Denis Cheng [Mon, 12 May 2008 21:02:14 +0000 (14:02 -0700)]
mm/pdflush.c: merge the same code in two path

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoadt7473: minor documentation update
Darrick J. Wong [Mon, 12 May 2008 21:02:13 +0000 (14:02 -0700)]
adt7473: minor documentation update

Add a sentence about when fan speed increases to maximum.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocapabilities: add bounding set to /proc/self/status
Serge E. Hallyn [Mon, 12 May 2008 21:02:13 +0000 (14:02 -0700)]
capabilities: add bounding set to /proc/self/status

There is currently no way to query the bounding set of another task.  As there
appears to be no security reason not to, and as Michael Kerrisk points out the
following valid reasons to do so exist:

* consistency (I can see all of the other per-thread/process sets in
  /proc/.../status)

* debugging -- I could imagine that it would make the job of debugging an
  application that uses capabilities a little simpler.

this patch adds the bounding set to /proc/self/status right after the
effective set.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Andrew G. Morgan <morgan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomd: fix raid5 'repair' operations
Dan Williams [Mon, 12 May 2008 21:02:12 +0000 (14:02 -0700)]
md: fix raid5 'repair' operations

commit bd2ab67030e9116f1e4aae1289220255412b37fd "md: close a livelock window
in handle_parity_checks5" introduced a bug in handling 'repair' operations.
After a repair operation completes we clear the state bits tracking this
operation.  However, they are cleared too early and this results in the code
deciding to re-run the parity check operation.  Since we have done the repair
in memory the second check does not find a mismatch and thus does not do a
writeback.

Test results:
$ echo repair > /sys/block/md0/md/sync_action
$ cat /sys/block/md0/md/mismatch_cnt
51072
$ echo repair > /sys/block/md0/md/sync_action
$ cat /sys/block/md0/md/mismatch_cnt
0

(also fix incorrect indentation)

Cc: <stable@kernel.org>
Tested-by: George Spelvin <linux@horizon.com>
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotridentfb: improve clock setting accuracy
Krzysztof Helt [Mon, 12 May 2008 21:02:11 +0000 (14:02 -0700)]
tridentfb: improve clock setting accuracy

Improve clock calculation precision (to kHz from MHz) and removes parameter
field vclk from the tridentfb_par structure.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotridentfb: remove misplaced enable_mmio()
Krzysztof Helt [Mon, 12 May 2008 21:02:09 +0000 (14:02 -0700)]
tridentfb: remove misplaced enable_mmio()

Remove redundant enable_mmio() call as the mmio mode is enabled in the probe
function earlier.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agommc: make one-bit signed bitfields unsigned
Harvey Harrison [Mon, 12 May 2008 21:02:08 +0000 (14:02 -0700)]
mmc: make one-bit signed bitfields unsigned

Otherwise it can only take the values 0/-1 which doesn't seem to
have been intended.

drivers/mmc/host/sdhci.h:190:20: error: dubious one-bit signed bitfield

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Pierre Ossman <drzeus-list@drzeus.cx>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoquota: don't call sync_fs() from vfs_quota_off() when there's no quota turn off
Jan Kara [Mon, 12 May 2008 21:02:08 +0000 (14:02 -0700)]
quota: don't call sync_fs() from vfs_quota_off() when there's no quota turn off

Sometimes, vfs_quota_off() is called on a partially set up super block (for
example when fill_super() fails for some reason).  In such cases we cannot
call ->sync_fs() because it can Oops because of not properly filled in super
block.  So in case we find there's not quota to turn off, we just skip
everything and return which fixes the above problem.

[akpm@linux-foundation.org: fxi tpyo]
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoufs: remove unneeded ufs_put_inode prototype
Christoph Hellwig [Mon, 12 May 2008 21:02:06 +0000 (14:02 -0700)]
ufs: remove unneeded ufs_put_inode prototype

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomake vmstat cpu-unplug safe
KOSAKI Motohiro [Mon, 12 May 2008 21:02:06 +0000 (14:02 -0700)]
make vmstat cpu-unplug safe

When accessing cpu_online_map, we should prevent dynamic changing
of cpu_online_map by get_online_cpus().

Unfortunately, all_vm_events() doesn't do that.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: ColdFire add support for kernel preemption (missing chunk)
Sebastian Siewior [Mon, 12 May 2008 21:02:05 +0000 (14:02 -0700)]
m68knommu: ColdFire add support for kernel preemption (missing chunk)

As the subject says this patch adds the support for kernel preemption on
m68knommu Coldfire.  I thing the same changes could be applied to 68360 &
68328 but since I don't have the HW, I don't touch it.  Kconfig enables the
preemption item only on coldfire.

This is a missing chunk from Sebastian's original patch that I lost from the
first submission.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoecryptfs: clean up (un)lock_parent
Miklos Szeredi [Mon, 12 May 2008 21:02:04 +0000 (14:02 -0700)]
ecryptfs: clean up (un)lock_parent

dget(dentry->d_parent) --> dget_parent(dentry)

unlock_parent() is racy and unnecessary.  Replace single caller with
unlock_dir().

There are several other suspect uses of ->d_parent in ecryptfs...

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/misc/sgi-xp: replace partid_t with a short
Dean Nelson [Mon, 12 May 2008 21:02:03 +0000 (14:02 -0700)]
drivers/misc/sgi-xp: replace partid_t with a short

In preparation for supporting greater than 64 partitions replace partid_t by
short in drivers/misc/sgi-xp.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Acked-by: Robin Holt <holt@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/misc/sgi-xp: clean up return values
Dean Nelson [Mon, 12 May 2008 21:02:02 +0000 (14:02 -0700)]
drivers/misc/sgi-xp: clean up return values

Make XP return values more generic to XP and not so tied to XPC by changing
enum xpc_retval to xp_retval, along with changing return value prefixes from
xpc to xp.  Also, cleanup a comment block that referenced some of these return
values as well as the handling of BTE related return values.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Acked-by: Robin Holt <holt@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agospi: pxa2xx_spi clock resume bugfix
Eric BENARD [Mon, 12 May 2008 21:02:01 +0000 (14:02 -0700)]
spi: pxa2xx_spi clock resume bugfix

There is a typo in pxa2xx_spi.c, comment says "Enable the SSP clock", code
says: clk_disable ...  so after resume, the SSP is dead.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Ned Forrester <nforrester@whoi.edu>
Cc: Stephen Street <stephen@streetfiresound.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: track and make up lost ticks
Jeff Dike [Mon, 12 May 2008 21:02:00 +0000 (14:02 -0700)]
uml: track and make up lost ticks

Alarm delivery could be noticably late in the !CONFIG_NOHZ case because lost
ticks weren't being taken into account.  This is now treated more carefully,
with the time between ticks being calculated and the appropriate number of
ticks delivered to the timekeeping system.

Cc: Nix <nix@esperi.org.uk>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: style fixes in the random driver
Jeff Dike [Mon, 12 May 2008 21:01:59 +0000 (14:01 -0700)]
uml: style fixes in the random driver

Give random.c a style workover while I'm changing it.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: random driver fixes
Jeff Dike [Mon, 12 May 2008 21:01:58 +0000 (14:01 -0700)]
uml: random driver fixes

The random driver would essentially hang if the host's /dev/random returned
-EAGAIN.  There was a test of need_resched followed by a schedule inside the
loop, but that didn't help and it's the wrong way to work anyway.

The right way is to ask for an interrupt when there is input available from
the host and handle it then rather than polling.

Now, when the host's /dev/random returns -EAGAIN, the driver asks for a wakeup
when there's randomness available again and sleeps.  The interrupt routine
just wakes up whatever processes are sleeping on host_read_wait.

There is an atomic_t, host_sleep_count, which counts the number of processes
waiting for randomness.  When this reaches zero, the interrupt is disabled.

An added complication is that async I/O notification was only recently added
to /dev/random (by me), so essentially all hosts will lack it.  So, we use the
sigio workaround here, which is to have a separate thread poll on the
descriptor and send an interrupt when there is input on it.  This mechanism is
activated when a process gets -EAGAIN (activating this multiple times is
harmless, if a bit wasteful) and deactivated by the last process still
waiting.

The module name was changed from "random" to "hw_random" in order for udev to
recognize it.

The sigio workaround needed some changes.  sigio_broken was added for cases
when we know that async notification doesn't work.  This is now called from
maybe_sigio_broken, which deals with pts devices.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: physical memory shouldn't include initial stack
Jeff Dike [Mon, 12 May 2008 21:01:57 +0000 (14:01 -0700)]
uml: physical memory shouldn't include initial stack

The top of physical memory should be below the initial process stack, not the
top of the address space, at least for as long as the stack isn't known to the
kernel VM system and appropriately reserved.

Cc: "Christopher S. Aker" <caker@theshore.net>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: use PAGE_SIZE in linker scripts
Cyrill Gorcunov [Mon, 12 May 2008 21:01:56 +0000 (14:01 -0700)]
uml: use PAGE_SIZE in linker scripts

This patch includes page.h header into linker scripts that allow us to
use PAGE_SIZE macro instead of numeric constant.

To be able to include page.h into linker scripts page.h is needed for
some modification - i.e.  we need to use __ASSEMBLY__ and _AC macro

[jdike@linux.intel.com - fixed conflict with as-layout.h]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: use DIV_ROUND_UP
Jiri Olsa [Mon, 12 May 2008 21:01:56 +0000 (14:01 -0700)]
uml: use DIV_ROUND_UP

I just saw similar patches in the janitor kernel's list, and spotted place it
fits.

Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: fix CONFIG_RAW dependencies
Robert P. J. Day [Mon, 12 May 2008 21:01:55 +0000 (14:01 -0700)]
uml: fix CONFIG_RAW dependencies

Add the BLOCK dependency for RAW_DRIVER, to match what's in
drivers/char/Kconfig.  Also, while we're there, update the alleged
obsolesence of RAW_DRIVER since it doesn't seem to be going away any
time soon.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: use __SPIN_LOCK_UNLOCKED
Jeff Dike [Mon, 12 May 2008 21:01:54 +0000 (14:01 -0700)]
uml: use __SPIN_LOCK_UNLOCKED

From: Robert P. J. Day <rpjday@crashcourse.ca>

Use newer, non-deprecated __SPIN_LOCK_UNLOCKED macro.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: fix bad NTP interaction with clock
Jeff Dike [Mon, 12 May 2008 21:01:53 +0000 (14:01 -0700)]
uml: fix bad NTP interaction with clock

UML's supposed nanosecond clock interacts badly with NTP when NTP
decides that the clock has drifted ahead and needs to be slowed down.
Slowing down the clock is done by decrementing the cycle-to-nanosecond
multiplier, which is 1.  Decrementing that gives you 0 and time is
stopped.

This is fixed by switching to a microsecond clock, with a multiplier
of 1000.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: remove unused header
Jeff Dike [Mon, 12 May 2008 21:01:52 +0000 (14:01 -0700)]
uml: remove unused header

From: Adrian Bunk <bunk@kernel.org>

This patch removes the unused and broken (the normal asm/keyboard.h
files no longer exists) include/asm-um/keyboard.h

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: fix build when SLOB is enabled
Jeff Dike [Mon, 12 May 2008 21:01:52 +0000 (14:01 -0700)]
uml: fix build when SLOB is enabled

Reintroduce uml_kmalloc for the benefit of UML libc code.  The
previous tactic of declaring __kmalloc so it could be called directly
from the libc side of the house turned out to be getting too intimate
with slab, and it doesn't work with slob.

So, the uml_kmalloc wrapper is back.  It calls kmalloc or whatever
that translates into, and libc code calls it.

kfree is left alone since that still works, leaving a somewhat
inconsistent API.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: fix errno return
Johann Felix Soden [Mon, 12 May 2008 21:01:51 +0000 (14:01 -0700)]
uml: fix errno return

Error returns are negative.

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: tidy ptrace interface
Jeff Dike [Mon, 12 May 2008 21:01:50 +0000 (14:01 -0700)]
uml: tidy ptrace interface

Tidy the ptrace interface code.  Removed a bunch of unused macros.
Started converting register sets from arrays of longs to structures.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: move hppfs_kern.c to hppfs.c
Jeff Dike [Mon, 12 May 2008 21:01:50 +0000 (14:01 -0700)]
uml: move hppfs_kern.c to hppfs.c

There's no reason for the _kern in hppfs_kern.c, so move it to hppfs.c.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: hppfs fixes
Jeff Dike [Mon, 12 May 2008 21:01:49 +0000 (14:01 -0700)]
uml: hppfs fixes

hppfs tidying and fixes noticed during hch's get_inode work -
      style fixes
      a copy_to_user got its return value checked
      hppfs_write no longer fiddles file->f_pos because it gets and
returns pos in its arguments
      hppfs_delete_inode dputs the underlyng procfs dentry stored in
its private data and mntputs the vfsmnt stashed in s_fs_info
      hppfs_put_super no longer needs to mntput the s_fs_info, so it
no longer needs to exist
      hppfs_readlink and hppfs_follow_link were doing a bunch of stuff
with a struct file which they didn't use
      there is now a ->permission which calls generic_permission
      get_inode was always returning 0 for some reason - it now
returns an inode if nothing bad happened

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: style fixes
Jeff Dike [Mon, 12 May 2008 21:01:48 +0000 (14:01 -0700)]
uml: style fixes

A few random style fixes.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: redo host capability detection and disabling
Jeff Dike [Mon, 12 May 2008 21:01:47 +0000 (14:01 -0700)]
uml: redo host capability detection and disabling

Redo how host capabilities are recorded at startup and disabled on the
command line.

There are now explicit variables saying what's been disabled by the
command line rather than the implicitness of the have_* variable being
zero.  The capability variables now start at zero and are set to one
as their capabilities are found to be present on the host.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>