12 years agoMerge branch 'iommu-fixes-2.6.28' of git://
Ingo Molnar [Thu, 6 Nov 2008 14:23:35 +0000 (15:23 +0100)]
Merge branch 'iommu-fixes-2.6.28' of git://git./linux/kernel/git/joro/linux-2.6-iommu into x86/urgent

12 years agoAMD IOMMU: fix lazy IO/TLB flushing in unmap path
Joerg Roedel [Thu, 6 Nov 2008 13:59:05 +0000 (14:59 +0100)]
AMD IOMMU: fix lazy IO/TLB flushing in unmap path

Lazy flushing needs to take care of the unmap path too which is not yet
implemented and leads to stale IO/TLB entries. This is fixed by this

Signed-off-by: Joerg Roedel <>
12 years agox86: add smp_mb() before sending INVALIDATE_TLB_VECTOR
Suresh Siddha [Tue, 4 Nov 2008 21:53:04 +0000 (13:53 -0800)]
x86: add smp_mb() before sending INVALIDATE_TLB_VECTOR

Impact: fix rare x2apic hang

On x86, x2apic mode accesses for sending IPI's don't have serializing
semantics. If the IPI receivner refers(in lock-free fashion) to some
memory setup by the sender, the need for smp_mb() before sending the
IPI becomes critical in x2apic mode.

Add the smp_mb() in native_flush_tlb_others() before sending the IPI.

Signed-off-by: Suresh Siddha <>
Signed-off-by: Ingo Molnar <>
12 years agox86: remove VISWS and PARAVIRT around NR_IRQS puzzle
Yinghai Lu [Thu, 6 Nov 2008 07:36:48 +0000 (23:36 -0800)]
x86: remove VISWS and PARAVIRT around NR_IRQS puzzle

Impact: fix warning message when PARAVIRT is set in config

Remove stale #ifdef components from our IRQ sizing logic.
x86/Voyager is the only holdout.

Signed-off-by: Yinghai Lu <>
Signed-off-by: Ingo Molnar <>
12 years agox86: mention ACPI in top-level Kconfig menu
Bjorn Helgaas [Wed, 5 Nov 2008 19:37:27 +0000 (13:37 -0600)]
x86: mention ACPI in top-level Kconfig menu

Impact: clarify menuconfig text

Mention ACPI in the top-level menu to give a clue as to where
it lives. This matches what ia64 does.

Signed-off-by: Bjorn Helgaas <>
Signed-off-by: Ingo Molnar <>
12 years agox86: size NR_IRQS on 32-bit systems the same way as 64-bit
Yinghai Lu [Tue, 4 Nov 2008 22:10:13 +0000 (14:10 -0800)]
x86: size NR_IRQS on 32-bit systems the same way as 64-bit

Impact: make NR_IRQS big enough for system with lots of apic/pins

If lots of IO_APIC's are there (or can be there), size the same way
as 64-bit, depending on MAX_IO_APICS and NR_CPUS.

This fixes the boot problem reported by Ben Hutchings on a 32-bit
server with 5 IO-APICs and 240 IO-APIC pins.

Signed-off-by: Yinghai <>
Tested-by: Ben Hutchings <>
Signed-off-by: Ingo Molnar <>
12 years agox86: don't allow nr_irqs > NR_IRQS
Ben Hutchings [Wed, 5 Nov 2008 12:04:46 +0000 (12:04 +0000)]
x86: don't allow nr_irqs > NR_IRQS

Impact: fix boot hang on 32-bit systems with more than 224 IO-APIC pins

On some 32-bit systems with a lot of IO-APICs probe_nr_irqs() can
return a value larger than NR_IRQS. This will lead to probe_irq_on()
overrunning the irq_desc array.

I hit this when running net-next-2.6 (close to 2.6.28-rc3) on a
Supermicro dual Xeon system.  NR_IRQS is 224 but probe_nr_irqs() detects
5 IOAPICs and returns 240.  Here are the log messages:

Tue Nov  4 16:53:47 2008 ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
Tue Nov  4 16:53:47 2008 IOAPIC[0]: apic_id 1, version 32, address 0xfec00000, GSI 0-23
Tue Nov  4 16:53:47 2008 ACPI: IOAPIC (id[0x02] address[0xfec81000] gsi_base[24])
Tue Nov  4 16:53:47 2008 IOAPIC[1]: apic_id 2, version 32, address 0xfec81000, GSI 24-47
Tue Nov  4 16:53:47 2008 ACPI: IOAPIC (id[0x03] address[0xfec81400] gsi_base[48])
Tue Nov  4 16:53:47 2008 IOAPIC[2]: apic_id 3, version 32, address 0xfec81400, GSI 48-71
Tue Nov  4 16:53:47 2008 ACPI: IOAPIC (id[0x04] address[0xfec82000] gsi_base[72])
Tue Nov  4 16:53:47 2008 IOAPIC[3]: apic_id 4, version 32, address 0xfec82000, GSI 72-95
Tue Nov  4 16:53:47 2008 ACPI: IOAPIC (id[0x05] address[0xfec82400] gsi_base[96])
Tue Nov  4 16:53:47 2008 IOAPIC[4]: apic_id 5, version 32, address 0xfec82400, GSI 96-119
Tue Nov  4 16:53:47 2008 ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 high edge)
Tue Nov  4 16:53:47 2008 ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
Tue Nov  4 16:53:47 2008 Enabling APIC mode:  Flat.  Using 5 I/O APICs

Signed-off-by: Ben Hutchings <>
Acked-by: Yinghai Lu <>
Signed-off-by: Ingo Molnar <>
12 years agox86/docs: remove noirqbalance param docs
Mark McLoughlin [Tue, 4 Nov 2008 12:46:03 +0000 (12:46 +0000)]
x86/docs: remove noirqbalance param docs

Impact: documentation fix

irqbalance was removed by:

  commit 8b8e8c1bf7275eca859fe551dfa484134eaf013b
  Author: Yinghai Lu <>
  Date:   Tue Aug 19 20:50:23 2008 -0700

Remove the associated documentation for noirqbalance.

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Ingo Molnar <>
12 years agox86: don't use tsc_khz to calculate lpj if notsc is passed
Alok Kataria [Mon, 3 Nov 2008 19:18:47 +0000 (11:18 -0800)]
x86: don't use tsc_khz to calculate lpj if notsc is passed

Impact: fix udelay when "notsc" boot parameter is passed

With notsc passed on commandline, tsc may not be used for
udelays, make sure that we do not use tsc_khz to calculate
the lpj value in such cases.

Reported-by: Bartlomiej Zolnierkiewicz <>
Signed-off-by: Alok N Kataria <>
Cc: <>
Signed-off-by: Ingo Molnar <>
12 years agox86, voyager: fix smp_intr_init() compile breakage
James Bottomley [Fri, 31 Oct 2008 17:59:49 +0000 (13:59 -0400)]
x86, voyager: fix smp_intr_init() compile breakage

Impact: fix x86/Voyager build

Looks like this became static on the rest of x86.  Fix it up by adding
an external definition to mach-voyager/setup.c

Signed-off-by: Ingo Molnar <>
12 years agoLinux v2.6.28-rc3 v2.6.28-rc3
Linus Torvalds [Sun, 2 Nov 2008 22:17:19 +0000 (14:17 -0800)]
Linux v2.6.28-rc3

12 years agoMerge git://
Linus Torvalds [Sun, 2 Nov 2008 21:32:26 +0000 (13:32 -0800)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://
  ide-gd: re-get capacity on revalidate
  tx4938ide: Avoid underflow on calculation of a wait cycle
  tx4938ide: Do not call devm_ioremap for whole 128KB
  tx4938ide: Check minimum cycle time and SHWT range (v2)
  ide: Switch to a common address
  ide-cd: fix DMA alignment regression

12 years agoide-gd: re-get capacity on revalidate
Borislav Petkov [Sun, 2 Nov 2008 20:40:10 +0000 (21:40 +0100)]
ide-gd: re-get capacity on revalidate

We need to re-get a removable media's capacity when revalidating the
disk so that its partitions get rescanned by the block layer.

Signed-off-by: Borislav Petkov <>
Cc: Tejun Heo <>
Signed-off-by: Bartlomiej Zolnierkiewicz <>
12 years agotx4938ide: Avoid underflow on calculation of a wait cycle
Atsushi Nemoto [Sun, 2 Nov 2008 20:40:10 +0000 (21:40 +0100)]
tx4938ide: Avoid underflow on calculation of a wait cycle

Make 'wt' variable signed while it can be negative during calculation.

Suggested-by: Sergei Shtylyov <>
Signed-off-by: Atsushi Nemoto <>
Signed-off-by: Bartlomiej Zolnierkiewicz <>
12 years agotx4938ide: Do not call devm_ioremap for whole 128KB
Atsushi Nemoto [Sun, 2 Nov 2008 20:40:09 +0000 (21:40 +0100)]
tx4938ide: Do not call devm_ioremap for whole 128KB

Call devm_ioremap() for CS0 and CS1 separetely.
And some style cleanups.

Suggested-by: Sergei Shtylyov <>
Signed-off-by: Atsushi Nemoto <>
Acked-by: Sergei Shtylyov <>
Signed-off-by: Bartlomiej Zolnierkiewicz <>
12 years agotx4938ide: Check minimum cycle time and SHWT range (v2)
Atsushi Nemoto [Sun, 2 Nov 2008 20:40:09 +0000 (21:40 +0100)]
tx4938ide: Check minimum cycle time and SHWT range (v2)

SHWT value is used as address valid to -CSx assertion and -CSx to -DIOx
assertion setup time, and contrarywise, -DIOx to -CSx release and -CSx
release to address invalid hold time, so it actualy applies 4 times and
so constitutes -DIOx recovery time.  Check requirement of the recovery
time and cycle time.  Also check SHWT maximum value.

Suggested-by: Sergei Shtylyov <>
Signed-off-by: Atsushi Nemoto <>
Acked-by: Sergei Shtylyov <>
Signed-off-by: Bartlomiej Zolnierkiewicz <>
12 years agoide: Switch to a common address
Alan Cox [Sun, 2 Nov 2008 20:40:08 +0000 (21:40 +0100)]
ide: Switch to a common address

Signed-off-by: Alan Cox <>
Signed-off-by: Bartlomiej Zolnierkiewicz <>
12 years agoide-cd: fix DMA alignment regression
Borislav Petkov [Sun, 2 Nov 2008 20:40:07 +0000 (21:40 +0100)]
ide-cd: fix DMA alignment regression

e5318b531b008c79d2a0c0df06a7b8628da38e2f ("ide: use the dma safe check for
REQ_TYPE_ATA_PC") introduced a regression which caused some ATAPI drives to
turn off DMA for REQ_TYPE_BLOCK_PC commands while burning and thus degrading
performance and ultimately causing an excessive amount of underruns.

The issue is documented also in:

Signed-off-by: Borislav Petkov <>
Cc: FUJITA Tomonori <>
Tested-by: Valerio Passini <>
[bart: fixup patch description per comments from Sergei Shtylyov]
Signed-off-by: Bartlomiej Zolnierkiewicz <>
12 years agoMerge git://
Linus Torvalds [Sun, 2 Nov 2008 18:16:44 +0000 (10:16 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://
  sparc64: Fix PCI resource mapping on sparc64
  sparc64: Kill annoying warning when building compat_binfmt_elf.o
  sparc32: kernel/trace/trace.c wants DIE_OOPS
  sparc64: Fix __copy_{to,from}_user_inatomic defines.

12 years agoMerge git://
Linus Torvalds [Sun, 2 Nov 2008 18:15:52 +0000 (10:15 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git:// (33 commits)
  af_unix: netns: fix problem of return value
  IRDA: remove double inclusion of module.h
  udp: multicast packets need to check namespace
  net: add documentation for skb recycling
  key: fix setkey(8) policy set breakage
  bpa10x: free sk_buff with kfree_skb
  xfrm: do not leak ESRCH to user space
  net: Really remove all of LOOPBACK_TSO code.
  netfilter: nf_conntrack_proto_gre: switch to register_pernet_gen_subsys()
  netns: add register_pernet_gen_subsys/unregister_pernet_gen_subsys
  net: delete excess kernel-doc notation
  pppoe: Fix socket leak.
  gianfar: Don't reset TBI<->SerDes link if it's already up
  gianfar: Fix race in TBI/SerDes configuration
  at91_ether: request/free GPIO for PHY interrupt
  amd8111e: fix dma_free_coherent context
  atl1: fix vlan tag regression
  SMC91x: delete unused local variable "lp"
  myri10ge: fix stop/go mmio ordering
  bonding: fix panic when taking bond interface down before removing module

12 years agolinux/string.h: fix comment typo
Jeff Garzik [Sun, 2 Nov 2008 14:51:27 +0000 (09:51 -0500)]
linux/string.h: fix comment typo


Signed-off-by: Jeff Garzik <>
Signed-off-by: Linus Torvalds <>
12 years agosparc64: Fix PCI resource mapping on sparc64
Max Dmitrichenko [Sun, 2 Nov 2008 07:34:10 +0000 (00:34 -0700)]
sparc64: Fix PCI resource mapping on sparc64

There is a problem discovered in recent versions of ATI Mach64 driver
in on sparc64 architecture. In short, the driver fails to mmap
MMIO aperture (PCI resource #2).

I've found that kernel's __pci_mmap_make_offset() returns EINVAL. It
checks whether user attempts to mmap more than the resource length,
which is 0x1000 bytes in our case. But PAGE_SIZE on SPARC64 is 0x2000
and this is what actually is being mmaped. So __pci_mmap_make_offset()
failed for this PCI resource.

Signed-off-by: Max Dmitrichenko <>
Signed-off-by: David S. Miller <>
12 years agosparc64: Kill annoying warning when building compat_binfmt_elf.o
David S. Miller [Sun, 2 Nov 2008 07:15:38 +0000 (00:15 -0700)]
sparc64: Kill annoying warning when building compat_binfmt_elf.o

GCC warns because some tests against 32-bit values never evaluate to
true due to how TASK_SIZE is defined.

I always wanted to mimick powerpc's definition of TASK_SIZE, which
is simply TASK_SIZE_OF(current) and that also fixes the warning.

Signed-off-by: David S. Miller <>
12 years agosparc32: kernel/trace/trace.c wants DIE_OOPS
Al Viro [Sun, 2 Nov 2008 04:44:01 +0000 (21:44 -0700)]
sparc32: kernel/trace/trace.c wants DIE_OOPS

Signed-off-by: Al Viro <>
Signed-off-by: David S. Miller <>
12 years agosparc64: Fix __copy_{to,from}_user_inatomic defines.
Hugh Dickins [Sun, 2 Nov 2008 04:41:40 +0000 (21:41 -0700)]
sparc64: Fix __copy_{to,from}_user_inatomic defines.

Alexander Beregalov reports oops in __bzero() called from
copy_from_user_fixup() called from iov_iter_copy_from_user_atomic(),
when running dbench on tmpfs on sparc64: its __copy_from_user_inatomic
and __copy_to_user_inatomic should be avoiding, not calling, the fixups.

Signed-off-by: Hugh Dickins <>
Signed-off-by: David S. Miller <>
12 years agoaf_unix: netns: fix problem of return value
Jianjun Kong [Sun, 2 Nov 2008 04:37:27 +0000 (21:37 -0700)]
af_unix: netns: fix problem of return value

fix problem of return value

net/unix/af_unix.c: unix_net_init()
when error appears, it should return 'error', not always return 0.

Signed-off-by: Jianjun Kong <>
Signed-off-by: David S. Miller <>
12 years agoIRDA: remove double inclusion of module.h
Alexander Beregalov [Sun, 2 Nov 2008 04:30:50 +0000 (21:30 -0700)]
IRDA: remove double inclusion of module.h

Signed-off-by: Alexander Beregalov <>
Signed-off-by: David S. Miller <>
12 years agoudp: multicast packets need to check namespace
Eric Dumazet [Sun, 2 Nov 2008 04:22:23 +0000 (21:22 -0700)]
udp: multicast packets need to check namespace

Current UDP multicast delivery is not namespace aware.

Signed-off-by: Eric Dumazet <>
Acked-by: Pavel Emelyanov <>
Signed-off-by: David S. Miller <>
12 years agonet: add documentation for skb recycling
Stephen Hemminger [Sun, 2 Nov 2008 04:01:09 +0000 (21:01 -0700)]
net: add documentation for skb recycling

Commit 04a4bb55bcf35b63d40fd2725e58599ff8310dd7 ("net: add
skb_recycle_check() to enable netdriver skb recycling") added a
method for network drivers to recycle skbuffs, but while use of
this mechanism was documented in the commit message, it should
really have been added as a docbook comment as well -- this
patch does that.

Signed-off-by: Stephen Hemminger <>
Signed-off-by: Lennert Buytenhek <>
Signed-off-by: David S. Miller <>
12 years agosparc32: kernel/trace/trace.c wants DIE_OOPS
Al Viro [Sat, 1 Nov 2008 18:20:29 +0000 (18:20 +0000)]
sparc32: kernel/trace/trace.c wants DIE_OOPS

Signed-off-by: Al Viro <>
Signed-off-by: Linus Torvalds <>
12 years agoel3_common_init() should be __devinit, not __init
Al Viro [Sat, 1 Nov 2008 18:20:19 +0000 (18:20 +0000)]
el3_common_init() should be __devinit, not __init

Signed-off-by: Al Viro <>
Signed-off-by: Linus Torvalds <>
12 years agomissing dependencies on HAVE_CLK in drivers/mfd
Al Viro [Sat, 1 Nov 2008 18:19:59 +0000 (18:19 +0000)]
missing dependencies on HAVE_CLK in drivers/mfd

Signed-off-by: Al Viro <>
Signed-off-by: Linus Torvalds <>
12 years agosection fixes for cirrusfb
Al Viro [Sat, 1 Nov 2008 18:20:39 +0000 (18:20 +0000)]
section fixes for cirrusfb

cirrusfb_zorro_unmap() may be called both from __devexit and (on
cleanup path) from __devinit.  So it needs to be a normal function,
same as for cirrusfb_pci_unmap()

Signed-off-by: Al Viro <>
Signed-off-by: Linus Torvalds <>
12 years agoPM_TEST_SUSPEND should depend on RTC_CLASS, not RTC_LIB
Al Viro [Sat, 1 Nov 2008 18:20:09 +0000 (18:20 +0000)]
PM_TEST_SUSPEND should depend on RTC_CLASS, not RTC_LIB

Insufficient dependency - we really want CONFIG_RTC_CLASS=y there.
That will give us CONFIG_RTC_LIB=y, so the old dependency can be
simply replaced.

Signed-off-by: Al Viro <>
Signed-off-by: Linus Torvalds <>
12 years agooss: fix O_NONBLOCK in dmasound_core
Al Viro [Sat, 1 Nov 2008 18:19:49 +0000 (18:19 +0000)]
oss: fix O_NONBLOCK in dmasound_core

We broke O_NONBLOCK handling in OSS dmasound_core in 2.3.11-pre3 - the
original code copied f_flags to open_mode and then checked for
O_NONBLOCK in there, but that got changed to copying f_mode and
O_NONBLOCK has not reached that field in any kernel version.

Since we do not care for any other bits, the fix is obvious...

Signed-off-by: Al Viro <>
Signed-off-by: Linus Torvalds <>
12 years agoMerge branch 'x86-fixes-for-linus' of git://
Linus Torvalds [Sat, 1 Nov 2008 17:36:30 +0000 (10:36 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://
  x86: fix AMDC1E and XTOPOLOGY conflict in cpufeature
  x86: build fix

12 years agoinit/do_mounts_md.c: remove duplicated #include
Huang Weiyi [Fri, 31 Oct 2008 04:47:23 +0000 (12:47 +0800)]
init/do_mounts_md.c: remove duplicated #include

Removed duplicated #include <linux/delay.h> in init/do_mounts_md.c.

The same compile error ("error: implicit declaration of function
'msleep'") got fixed twice:

 - f8b77d39397e1510b1a3bcfd385ebd1a45aae77f ("init/do_mounts_md.c:
   msleep compile fix")

 - 73b4a24f5ff09389ba6277c53a266b142f655ed2 ("init/do_mounts_md.c must
   #include <linux/delay.h>")

by people adding the <linux/delay.h> include in two slightly different
places.  Andrew's quilt scripts happily ignore the fuzz, and will
re-apply the patch even though they had conflicts.

Signed-off-by: Huang Weiyi <>
Signed-off-by: Linus Torvalds <>
12 years agox86: Clean up late e820 resource allocation
Linus Torvalds [Sat, 1 Nov 2008 17:17:22 +0000 (10:17 -0700)]
x86: Clean up late e820 resource allocation

This makes the late e820 resources use 'insert_resource_expand_to_fit()'
instead of doing a 'reserve_region_with_split()', and also avoids
marking them as IORESOURCE_BUSY.

This results in us being perfectly happy to use pre-existing PCI
resources even if they were marked as being in a reserved region, while
still avoiding any _new_ allocations in the reserved regions.  It also
makes for a simpler and more accurate resource tree.

Example resource allocation from Jonathan Corbet, who has firmware that
has an e820 reserved entry that covered a big range (e0000000-fed003ff),
and that had various PCI resources in it set up by firmware.

With old kernels, the reserved range would force us to re-allocate all
pre-existing PCI resources, and his reserved range would end up looking
like this:

e0000000-fed003ff : reserved
  fec00000-fec00fff : IOAPIC 0
  fed00000-fed003ff : HPET 0

where only the pre-allocated special regions (IOAPIC and HPET) were kept

With 2.6.28-rc2, which uses 'reserve_region_with_split()', Jonathan's
resource tree looked like this:

e0000000-fe7fffff : reserved
fe800000-fe8fffff : PCI Bus 0000:01
 fe800000-fe8fffff : reserved
fe900000-fe9d9aff : reserved
fe9d9b00-fe9d9bff : 0000:00:1f.3
 fe9d9b00-fe9d9bff : reserved
fe9d9c00-fe9d9fff : 0000:00:1a.7
 fe9d9c00-fe9d9fff : reserved
fe9da000-fe9dafff : 0000:00:03.3
 fe9da000-fe9dafff : reserved
fe9db000-fe9dbfff : 0000:00:19.0
 fe9db000-fe9dbfff : reserved
fe9dc000-fe9dffff : 0000:00:1b.0
 fe9dc000-fe9dffff : reserved
fe9e0000-fe9fffff : 0000:00:19.0
 fe9e0000-fe9fffff : reserved
fea00000-fea7ffff : 0000:00:02.0
 fea00000-fea7ffff : reserved
fea80000-feafffff : 0000:00:02.1
 fea80000-feafffff : reserved
feb00000-febfffff : 0000:00:02.0
 feb00000-febfffff : reserved
fec00000-fed003ff : reserved
 fec00000-fec00fff : IOAPIC 0
 fed00000-fed003ff : HPET 0

and because the reserved entry had been split and moved into the
individual resources, and because it used the IORESOURCE_BUSY flag, the
drivers that actually wanted to _use_ those resources couldn't actually
attach to them:

e1000e 0000:00:19.0: BAR 0: can't reserve mem region [0xfe9e0000-0xfe9fffff]
HDA Intel 0000:00:1b.0: BAR 0: can't reserve mem region [0xfe9dc000-0xfe9dffff]

with this patch, the resource tree instead becomes

e0000000-fed003ff : reserved
  fe800000-fe8fffff : PCI Bus 0000:01
  fe9d9b00-fe9d9bff : 0000:00:1f.3
  fe9d9c00-fe9d9fff : 0000:00:1a.7
    fe9d9c00-fe9d9fff : ehci_hcd
  fe9da000-fe9dafff : 0000:00:03.3
  fe9db000-fe9dbfff : 0000:00:19.0
    fe9db000-fe9dbfff : e1000e
  fe9dc000-fe9dffff : 0000:00:1b.0
    fe9dc000-fe9dffff : ICH HD audio
  fe9e0000-fe9fffff : 0000:00:19.0
    fe9e0000-fe9fffff : e1000e
  fea00000-fea7ffff : 0000:00:02.0
  fea80000-feafffff : 0000:00:02.1
  feb00000-febfffff : 0000:00:02.0
  fec00000-fec00fff : IOAPIC 0
  fed00000-fed003ff : HPET 0

ie the one reserved region now ends up surrounding all the PCI resources
that were allocated inside of it by firmware, and because it is not
marked BUSY, drivers have no problem attaching to the pre-allocated

Reported-and-tested-by: Jonathan Corbet <>
Cc: Yinghai Lu <>
Cc: Ingo Molnar <>
Cc: Robert Hancock <>
Signed-off-by: Linus Torvalds <>
12 years agoreserve_region_with_split: Fix GFP_KERNEL usage under spinlock
Linus Torvalds [Sat, 1 Nov 2008 16:53:58 +0000 (09:53 -0700)]
reserve_region_with_split: Fix GFP_KERNEL usage under spinlock

This one apparently doesn't generate any warnings, because the function
is only used during system bootup, when the warnings are disabled.  But
it's still very wrong.

The __reserve_region_with_split() function is called with the
resource_lock held for writing, so it must only ever do GFP_ATOMIC

Signed-off-by: Linus Torvalds <>
12 years agoMerge branch 'link_removal' of git://
Linus Torvalds [Sat, 1 Nov 2008 16:52:43 +0000 (09:52 -0700)]
Merge branch 'link_removal' of git://

* 'link_removal' of git://
  [CRIS] Remove links from CRIS build
  [CRIS] Merge asm-offsets.c for both arches into one file.

12 years agoMerge branch 'cris_move' of git://
Linus Torvalds [Sat, 1 Nov 2008 16:51:51 +0000 (09:51 -0700)]
Merge branch 'cris_move' of git://

* 'cris_move' of git://
  [CRIS] Move header files from include to arch/cris/include.
  [CRISv32] Remove warning in io.h

12 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Sat, 1 Nov 2008 16:50:38 +0000 (09:50 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://
  SELinux: properly handle empty tty_files list

12 years agoremove unused #include <version.h>'s
Huang Weiyi [Fri, 31 Oct 2008 14:50:04 +0000 (22:50 +0800)]
remove unused #include <version.h>'s

The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <>
Signed-off-by: Linus Torvalds <>
12 years agosaner FASYNC handling on file close
Al Viro [Fri, 31 Oct 2008 23:28:30 +0000 (23:28 +0000)]
saner FASYNC handling on file close

As it is, all instances of ->release() for files that have ->fasync()
need to remember to evict file from fasync lists; forgetting that
creates a hole and we actually have a bunch that *does* forget.

So let's keep our lives simple - let __fput() check FASYNC in
file->f_flags and call ->fasync() there if it's been set.  And lose that
crap in ->release() instances - leaving it there is still valid, but we
don't have to bother anymore.

Signed-off-by: Al Viro <>
Signed-off-by: Linus Torvalds <>
12 years agofile caps: always start with clear bprm->caps_*
Serge Hallyn [Thu, 30 Oct 2008 16:52:23 +0000 (11:52 -0500)]
file caps: always start with clear bprm->caps_*

While Linux doesn't honor setuid on scripts.  However, it mistakenly
behaves differently for file capabilities.

This patch fixes that behavior by making sure that get_file_caps()
begins with empty bprm->caps_*.  That way when a script is loaded,
its bprm->caps_* may be filled when binfmt_misc calls prepare_binprm(),
but they will be cleared again when binfmt_elf calls prepare_binprm()
next to read the interpreter's file capabilities.

Signed-off-by: Serge Hallyn <>
Acked-by: David Howells <>
Acked-by: Andrew G. Morgan <>
Signed-off-by: Linus Torvalds <>
12 years agokey: fix setkey(8) policy set breakage
Alexey Dobriyan [Fri, 31 Oct 2008 23:41:26 +0000 (16:41 -0700)]
key: fix setkey(8) policy set breakage

Steps to reproduce:

#/usr/sbin/setkey -f

add ah 24500 -A hmac-md5 "1234567890123456";
add esp 24501 -E 3des-cbc "123456789012123456789012";

spdadd any -P out ipsec

setkey: invalid keymsg length

Policy dump will bail out with the same message after that.

-recv(4, "\2\16\0\0\32\0\3\0\0\0\0\0\37\r\0\0\3\0\5\0\377 \0\0\2\0\0\0\300\250\0*\0"..., 32768, 0) = 208
+recv(4, "\2\16\0\0\36\0\3\0\0\0\0\0H\t\0\0\3\0\5\0\377 \0\0\2\0\0\0\300\250\0*\0"..., 32768, 0) = 208

Signed-off-by: Alexey Dobriyan <>
Signed-off-by: David S. Miller <>
12 years agoMerge branch 'for-2.6.28' of git://
Linus Torvalds [Fri, 31 Oct 2008 22:44:08 +0000 (15:44 -0700)]
Merge branch 'for-2.6.28' of git://

* 'for-2.6.28' of git://
  NLM: Set address family before calling nlm_host_rebooted()
  nfsd: fix failure to set eof in readdir in some situations

12 years agoSELinux: properly handle empty tty_files list
Eric Paris [Fri, 31 Oct 2008 21:40:00 +0000 (17:40 -0400)]
SELinux: properly handle empty tty_files list

SELinux has wrongly (since 2004) had an incorrect test for an empty
tty->tty_files list.  With an empty list selinux would be pointing to part
of the tty struct itself and would then proceed to dereference that value
and again dereference that result.  An F10 change to plymouth on a ppc64
system is actually currently triggering this bug.  This patch uses
list_empty() to handle empty lists rather than looking at a meaningless

[note, this fixes the oops reported in]

Signed-off-by: Eric Paris <>
Signed-off-by: James Morris <>
12 years ago[CRIS] Remove links from CRIS build
Jesper Nilsson [Wed, 22 Oct 2008 21:57:53 +0000 (23:57 +0200)]
[CRIS] Remove links from CRIS build

Remove the links to architecture and machine dependent directories
(boot, lib, drivers, arch, mach)

The links were created and used mostly from the arch/cris/Makefile,
so why not dispense with them altogether?
Changed $(ARCH) to "cris" in Makefile, it is easier to read this way.

The CRISv32 head.S common files for the kernel and compressed images
needed to be modified to use ifdefs instead of using the now removed
mach link. Since there are only two versions, this is not a huge loss
in readability.

The link to is also replaced with a merged version
which uses ifdefs to select the correct layout. before and after are identical.

Signed-off-by: Jesper Nilsson <>
Acked-by: Sam Ravnborg <>
12 years ago[CRIS] Merge asm-offsets.c for both arches into one file.
Jesper Nilsson [Tue, 21 Oct 2008 20:10:27 +0000 (22:10 +0200)]
[CRIS] Merge asm-offsets.c for both arches into one file.

Eliminates the link to arch specific asm-offsets.c from CRIS
architecture build system.

Resulting asm-offsets.s are identical before and after change
for both arch-v10 and arch-v32.

Signed-off-by: Jesper Nilsson <>
Acked-by: Sam Ravnborg <>
12 years agoMerge branch 'merge' of git://
Linus Torvalds [Fri, 31 Oct 2008 15:14:15 +0000 (08:14 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git:// (23 commits)
  Revert "powerpc: Sync RPA note in zImage with kernel's RPA note"
  powerpc: Fix compile errors with CONFIG_BUG=n
  powerpc: Fix format string warning in arch/powerpc/boot/main.c
  powerpc: Fix bug in kernel copy of libfdt's fdt_subnode_offset_namelen()
  powerpc: Remove duplicate DMA entry from mpc8313erdb device tree
  powerpc/cell/OProfile: Fix on-stack array size in activate spu profiling function
  powerpc/mpic: Fix regression caused by change of default IRQ affinity
  powerpc: Update remaining dma_mapping_ops to use map/unmap_page
  powerpc/pci: Fix unmapping of IO space on 64-bit
  powerpc/pci: Properly allocate bus resources for hotplug PHBs
  OF-device: Don't overwrite numa_node in device registration
  powerpc: Fix swapcontext system for VSX + old ucontext size
  powerpc: Fix compiler warning for the relocatable kernel
  powerpc: Work around ld bug in older binutils
  powerpc/ppc64/kdump: Better flag for running relocatable
  powerpc: Use is_kdump_kernel()
  powerpc: Kexec exit should not use magic numbers
  powerpc/44x: Update 44x defconfigs
  powerpc/40x: Update 40x defconfigs
  powerpc: enable heap randomization for linkstations

12 years agoMerge git://
Linus Torvalds [Fri, 31 Oct 2008 14:53:17 +0000 (07:53 -0700)]
Merge git://git./linux/kernel/git/lethal/sh-2.6

* git:// (21 commits)
  sh: fix sh2a cache entry_mask
  sh: Enable NFS root in Migo-R defconfig.
  sh: FTRACE renamed to FUNCTION_TRACER.
  sh: Fix up the shared IRQ demuxer's control bit testing logic.
  Define SCSPTR1 for SH 7751R
  sh: Add sci_rxd_in of SH4-202
  Add support usb setting on sh 7366
  sh: Change register name SCSPTR to SCSPTR2
  sh: use the new byteorder headers.
  sh: SHmedia ISA tuning fixups.
  sh: Kill off long-dead HD64465 cchip support.
  sh: Revert "SH 7366 needs SCIF_ONLY"
  sh: Simplify and lock down the ISA tuning.
  sh: sh7785lcr: Select uImage as default image target.
  sh: Add on-chip RTC support for SH7722.
  SH 7366 needs SCIF_ONLY
  gdrom: Fix compile error
  sh: Provide a sample defconfig for the UL2 (SH7366) board.
  sh: Fix FPU tuning on toolchains with mismatched multilib targets.
  sh: oprofile: Fix up the SH7750 performance counter name.

12 years agoMerge git://
Linus Torvalds [Fri, 31 Oct 2008 14:52:51 +0000 (07:52 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://
  sparc64: Add missing null terminating entry to bq4802_match[].
  sparc: use the new byteorder headers
  rtc-m48t59: shift zero year to 1968 on sparc (rev 2)
  dbri: check dma_alloc_coherent errors
  sparc64: remove byteshifting from out* helpers

12 years agoMerge branch 'for_linus' of git://
Linus Torvalds [Fri, 31 Oct 2008 14:52:12 +0000 (07:52 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/tytso/ext4

* 'for_linus' of git://
  delay capable() check in ext4_has_free_blocks()
  merge ext4_claim_free_blocks & ext4_has_free_blocks
  jbd2: Call the commit callback before the transaction could get dropped
  ext4: fix a bug accessing freed memory in ext4_abort
  ext3: fix a bug accessing freed memory in ext3_abort

12 years agoMerge branch 'upstream-linus' of git://
Linus Torvalds [Fri, 31 Oct 2008 14:47:57 +0000 (07:47 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://
  libata: add whitelist for devices with known good pata-sata bridges
  sata_via: fix support for 5287
  libata: Avoid overflow in ata_tf_to_lba48() when tf->hba_lbal > 127
  ATA: remove excess kernel-doc notation

12 years agoRevert "powerpc: Sync RPA note in zImage with kernel's RPA note"
Paul Mackerras [Fri, 31 Oct 2008 11:27:17 +0000 (22:27 +1100)]
Revert "powerpc: Sync RPA note in zImage with kernel's RPA note"

This reverts commit 91a00302959545a9ae423e99732b1e46eb19e877, plus
commit 0dcd440120ef12879ff34fc78d7e4abf171c79e4 ("powerpc: Revert CHRP
boot wrapper to real-base = 12MB on 32-bit") which depended on it.

Commit 91a00302 was causing NVRAM corruption on some pSeries machines,
for as-yet unknown reasons, so this reverts it until the cause is

Signed-off-by: Paul Mackerras <>
12 years agoMerge branch 'merge' of
Paul Mackerras [Fri, 31 Oct 2008 10:34:56 +0000 (21:34 +1100)]
Merge branch 'merge' of /linux/kernel/git/galak/powerpc into merge

12 years agopowerpc: Fix compile errors with CONFIG_BUG=n
Paul Mackerras [Fri, 31 Oct 2008 10:34:09 +0000 (21:34 +1100)]
powerpc: Fix compile errors with CONFIG_BUG=n

This makes sure we don't try to call find_bug or is_warning_bug when
CONFIG_BUG=n and CONFIG_XMON=y.  Otherwise we get these errors:

arch/powerpc/xmon/xmon.c: In function ‘print_bug_trap’:
arch/powerpc/xmon/xmon.c:1364: error: implicit declaration of function ‘find_bug’
arch/powerpc/xmon/xmon.c:1364: warning: assignment makes pointer from integer without a cast
arch/powerpc/xmon/xmon.c:1367: error: implicit declaration of function ‘is_warning_bug’
arch/powerpc/xmon/xmon.c:1374: error: dereferencing pointer to incomplete type
make[2]: *** [arch/powerpc/xmon/xmon.o] Error 1
make[1]: *** [arch/powerpc/xmon] Error 2
make: *** [sub-make] Error 2

Signed-off-by: Paul Mackerras <>
12 years agox86: fix AMDC1E and XTOPOLOGY conflict in cpufeature
Venki Pallipadi [Tue, 7 Oct 2008 20:33:12 +0000 (13:33 -0700)]
x86: fix AMDC1E and XTOPOLOGY conflict in cpufeature

Impact: fix xsave slowdown regression

Fix two features from conflicting in feature bits.

Fixes this performance regression:

   Subject: cpu2000(both float and int) 13% regression with 2.6.28-rc1

Reported-by: "Zhang, Yanmin" <>
Bisected-by: "Zhang, Yanmin" <>
Signed-off-by: Venkatesh Pallipadi <>
Signed-off-by: Ingo Molnar <>
12 years agopowerpc: Fix format string warning in arch/powerpc/boot/main.c
Jon Smirl [Thu, 30 Oct 2008 16:51:32 +0000 (16:51 +0000)]
powerpc: Fix format string warning in arch/powerpc/boot/main.c

Fix format string warning in arch/powerpc/boot/main.c.  Also correct
a typo ("uncomressed") on the same line.

 BOOTCC  arch/powerpc/boot/main.o
arch/powerpc/boot/main.c: In function 'prep_kernel':
arch/powerpc/boot/main.c:65: warning: format '%08x' expects type
'unsigned int', but argument 3 has type 'long unsigned int'

Signed-off-by: Jon Smirl <>
Acked-by: David Gibson <>
Signed-off-by: Paul Mackerras <>
12 years agopowerpc: Fix bug in kernel copy of libfdt's fdt_subnode_offset_namelen()
David Gibson [Thu, 30 Oct 2008 16:37:05 +0000 (16:37 +0000)]
powerpc: Fix bug in kernel copy of libfdt's fdt_subnode_offset_namelen()

There's currently an off-by-one bug in fdt_subnode_offset_namelen()
which causes it to keep searching after it's finished the subnodes of
the given parent, and into the subnodes of siblings of the original
node which come after it in the tree.  This bug was introduced in
commit ed95d7450dcbfeb45ffc9d39b1747aee82b49a51 ("powerpc: Update
in-kernel dtc and libfdt to version 1.2.0").

A patch has already been submitted to dtc/libfdt mainline.  We don't
really want to pull in a new upstream version during the 2.6.28 cycle,
but we should still fix this bug, hence this standalone version of the
fix for the in-kernel libfdt.

Signed-off-by: David Gibson <>
Signed-off-by: Paul Mackerras <>
12 years agox86: build fix
Ingo Molnar [Fri, 31 Oct 2008 08:31:38 +0000 (09:31 +0100)]
x86: build fix

Impact: build fix on certain UP configs


 arch/x86/kernel/cpu/common.c: In function 'cpu_init':
 arch/x86/kernel/cpu/common.c:1141: error: 'boot_cpu_id' undeclared (first use in this function)
 arch/x86/kernel/cpu/common.c:1141: error: (Each undeclared identifier is reported only once
 arch/x86/kernel/cpu/common.c:1141: error: for each function it appears in.)

Pull in asm/smp.h on UP, so that we get the definition of

Signed-off-by: Ingo Molnar <>
12 years agobpa10x: free sk_buff with kfree_skb
Ilpo Järvinen [Fri, 31 Oct 2008 07:40:19 +0000 (00:40 -0700)]
bpa10x: free sk_buff with kfree_skb

Inspired by Sergio Luis' similar patches, I finally found
a case which is trivial enough that spatch won't choke
on it.

Signed-off-by: Ilpo Järvinen <>
Acked-by: Marcel Holtmann <>
Signed-off-by: David S. Miller <>
12 years agopowerpc: Remove duplicate DMA entry from mpc8313erdb device tree
Mike Dyer [Wed, 29 Oct 2008 10:10:06 +0000 (10:10 +0000)]
powerpc: Remove duplicate DMA entry from mpc8313erdb device tree

Commit 574366128db29e7da609ec1f9c01bf9d80adec87 added a duplicate
DMA controller node.

Signed-off-by: Mike Dyer <>
Signed-off-by: Kumar Gala <>
12 years agosh: fix sh2a cache entry_mask
Yoshihiro Shimoda [Thu, 7 Aug 2008 04:54:59 +0000 (13:54 +0900)]
sh: fix sh2a cache entry_mask

fix sh2a cache entry_mask in __flush_{purge,invalidate}_region.

Signed-off-by: Yoshihiro Shimoda <>
Signed-off-by: Paul Mundt <>
12 years agosh: Enable NFS root in Migo-R defconfig.
Kuninori Morimoto [Fri, 31 Oct 2008 07:01:19 +0000 (16:01 +0900)]
sh: Enable NFS root in Migo-R defconfig.

Signed-off-by: Kuninori Morimoto <>
Signed-off-by: Paul Mundt <>
12 years agosh: FTRACE renamed to FUNCTION_TRACER.
Paul Mundt [Fri, 31 Oct 2008 07:20:36 +0000 (16:20 +0900)]

Signed-off-by: Paul Mundt <>
12 years agoMerge branch 'master' of
Paul Mundt [Fri, 31 Oct 2008 07:18:02 +0000 (16:18 +0900)]
Merge branch 'master' of /linux/kernel/git/torvalds/linux-2.6

12 years agosh: Fix up the shared IRQ demuxer's control bit testing logic.
Michael Trimarchi [Fri, 31 Oct 2008 07:10:23 +0000 (16:10 +0900)]
sh: Fix up the shared IRQ demuxer's control bit testing logic.

Correct the interrupt handler in sh4 serial device, return the correct
value and check for what is anabled in the SCSCR register. The sh7722 is
broken just sending a break using minicom.

Signed-off-by: Michael Trimarchi <>
Signed-off-by: Paul Mundt <>
12 years agoDefine SCSPTR1 for SH 7751R
Matt Fleming [Wed, 29 Oct 2008 07:16:02 +0000 (07:16 +0000)]
Define SCSPTR1 for SH 7751R

After the recent commit to kill off SCI/SCIF special casing SH 7751R
fails to compile with CONFIG_SH_RTS7751R2D set. This is because SCSPTR1
is undefined. Take the value for SCSPTR1 from the SH7751R Group Hardware

Signed-off-by: Matt Fleming <>
Signed-off-by: Paul Mundt <>
12 years agoxfrm: do not leak ESRCH to user space [Thu, 23 Oct 2008 04:27:19 +0000 (04:27 +0000)]
xfrm: do not leak ESRCH to user space

I noticed that, under certain conditions, ESRCH can be leaked from the
xfrm layer to user space through sys_connect. In particular, this seems
to happen reliably when the kernel fails to resolve a template either
because the AF_KEY receive buffer being used by racoon is full or
because the SA entry we are trying to use is in XFRM_STATE_EXPIRED

However, since this could be a transient issue it could be argued that
EAGAIN would be more appropriate. Besides this error code is not even
documented in the man page for sys_connect (as of man-pages 3.07).

Signed-off-by: Fernando Luis Vazquez Cao <>
Signed-off-by: David S. Miller <>
12 years agosh: Add sci_rxd_in of SH4-202
Nobuhiro Iwamatsu [Wed, 29 Oct 2008 04:33:45 +0000 (13:33 +0900)]
sh: Add sci_rxd_in of SH4-202

SH4-202 doesn't have SCSXX1. But it is treated so that there is SCSPTR1 in
current code. This patch add sci_rxd_in of SH4-202.

Signed-off-by: Nobuhiro Iwamatsu <>
Signed-off-by: Paul Mundt <>
12 years agoAdd support usb setting on sh 7366
Kuninori Morimoto [Thu, 30 Oct 2008 05:49:03 +0000 (14:49 +0900)]
Add support usb setting on sh 7366

This patch add usb setting for sh 7366

Signed-off-by: Kuninori Morimoto <>
Signed-off-by: Paul Mundt <>
12 years agosh: Change register name SCSPTR to SCSPTR2
Nobuhiro Iwamatsu [Wed, 29 Oct 2008 04:34:50 +0000 (13:34 +0900)]
sh: Change register name SCSPTR to SCSPTR2

This change a name of SCSPTR used in sci_rxd_in of SH5-101.
SCSPTR is not declared and will become the error.

Signed-off-by: Nobuhiro Iwamatsu <>
Signed-off-by: Paul Mundt <>
12 years agosh: use the new byteorder headers.
Harvey Harrison [Fri, 31 Oct 2008 07:01:22 +0000 (16:01 +0900)]
sh: use the new byteorder headers.

Signed-off-by: Harvey Harrison <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Paul Mundt <>
12 years agonet: Really remove all of LOOPBACK_TSO code.
David S. Miller [Fri, 31 Oct 2008 07:00:33 +0000 (00:00 -0700)]
net: Really remove all of LOOPBACK_TSO code.

As noticed by Saikiran Madugula, commit 7447ef63cf2dfdc444f4c72ae13f604350b2e25f
("loopback: Remove rest of LOOPBACK_TSO code.") got rid of
emulate_large_send_offload() but didn't get rid of the call
site as well.

Signed-off-by: David S. Miller <>
12 years agosh: SHmedia ISA tuning fixups.
Paul Mundt [Fri, 31 Oct 2008 06:58:53 +0000 (15:58 +0900)]
sh: SHmedia ISA tuning fixups.

SH-5 doesn't support any elaborate ISA inheritance schemes (-dsp, -up,
etc.), so only bother with that if we are building an sh32 kernel.

Signed-off-by: Paul Mundt <>
12 years agoMerge branch 'master' of git://
David S. Miller [Fri, 31 Oct 2008 06:57:40 +0000 (23:57 -0700)]
Merge branch 'master' of git://

12 years agonetfilter: nf_conntrack_proto_gre: switch to register_pernet_gen_subsys()
Alexey Dobriyan [Fri, 31 Oct 2008 06:55:44 +0000 (23:55 -0700)]
netfilter: nf_conntrack_proto_gre: switch to register_pernet_gen_subsys()

register_pernet_gen_device() can't be used is nf_conntrack_pptp module is
also used (compiled in or loaded).

Right now, proto_gre_net_exit() is called before nf_conntrack_pptp_net_exit().
The former shutdowns and frees GRE piece of netns, however the latter
absolutely needs it to flush keymap. Oops is inevitable.

Switch to shiny new register_pernet_gen_subsys() to get correct ordering in
netns ops list.

Signed-off-by: Alexey Dobriyan <>
Signed-off-by: Patrick McHardy <>
Signed-off-by: David S. Miller <>
12 years agonetns: add register_pernet_gen_subsys/unregister_pernet_gen_subsys
Alexey Dobriyan [Fri, 31 Oct 2008 06:55:16 +0000 (23:55 -0700)]
netns: add register_pernet_gen_subsys/unregister_pernet_gen_subsys

netns ops which are registered with register_pernet_gen_device() are
shutdown strictly before those which are registered with
register_pernet_subsys(). Sometimes this leads to opposite (read: buggy)
shutdown ordering between two modules.

Add register_pernet_gen_subsys()/unregister_pernet_gen_subsys() for modules
which aren't elite enough for entry in struct net, and which can't use
register_pernet_gen_device(). PPTP conntracking module is such one.

Signed-off-by: Alexey Dobriyan <>
Signed-off-by: Patrick McHardy <>
Signed-off-by: David S. Miller <>
12 years agonet: delete excess kernel-doc notation
Randy Dunlap [Fri, 31 Oct 2008 06:54:35 +0000 (23:54 -0700)]
net: delete excess kernel-doc notation

Remove excess kernel-doc function parameters from networking header
& driver files:

Warning(include/net/sock.h:946): Excess function parameter or struct member 'sk' description in 'sk_filter_release'
Warning(include/linux/netdevice.h:1545): Excess function parameter or struct member 'cpu' description in 'netif_tx_lock'
Warning(drivers/net/wan/z85230.c:712): Excess function parameter or struct member 'regs' description in 'z8530_interrupt'

Signed-off-by: Randy Dunlap <>
Signed-off-by: David S. Miller <>
12 years agoMerge branch 'davem-fixes' of
David S. Miller [Fri, 31 Oct 2008 06:50:18 +0000 (23:50 -0700)]
Merge branch 'davem-fixes' of /linux/kernel/git/jgarzik/netdev-2.6

12 years agoMerge branch 'master' of git://
David S. Miller [Fri, 31 Oct 2008 06:35:23 +0000 (23:35 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

12 years agopppoe: Fix socket leak.
David S. Miller [Fri, 31 Oct 2008 06:11:44 +0000 (23:11 -0700)]
pppoe: Fix socket leak.

Move SKB trim before we lookup the socket so we don't have to
put it on failure.

Based upon an initial patch by Jarek Poplawski and suggestions
from Herbert Xu.

Signed-off-by: David S. Miller <>
12 years agosparc64: Add missing null terminating entry to bq4802_match[].
David S. Miller [Fri, 31 Oct 2008 05:58:06 +0000 (22:58 -0700)]
sparc64: Add missing null terminating entry to bq4802_match[].

Signed-off-by: David S. Miller <>
12 years agolibata: add whitelist for devices with known good pata-sata bridges
Jens Axboe [Wed, 27 Aug 2008 13:23:18 +0000 (15:23 +0200)]
libata: add whitelist for devices with known good pata-sata bridges

libata currently imposes a UDMA5 max transfer rate and 200 sector max
transfer size for SATA devices that sit behind a pata-sata bridge. Lots
of devices have known good bridges that don't need this limit applied.
The MTRON SSD disks are such devices. Transfer rates are increased by
20-30% with the restriction removed.

So add a "blacklist" entry for the MTRON devices, with a flag indicating
that the bridge is known good.

Signed-off-by: Jeff Garzik <>
12 years agosata_via: fix support for 5287
Tejun Heo [Tue, 21 Oct 2008 15:46:36 +0000 (00:46 +0900)]
sata_via: fix support for 5287

5287 used to be treated as vt6420 but it didn't work.  It's new family
of controllers called vt8251 which hosts four SATA ports as M/S of the
two ATA ports.  This configuration is rather peculiar in that although
the M/S devices are on the same port, each have its own SCR (or
equivalent link status/control) registers which screws up the
port-link-device hierarchy assumed by libata.  Another controller
which falls into this category is ata_piix w/ SIDPR access.

libata now has facility to deal with this class of controllers named
slave_link.  A low level driver for such controllers can just call
ata_slave_link_init() on the respective ports and libata will handle
all the difficult parts like following up with single SRST after
hardresetting both ports.

This patch creates new controller class vt8251, implements slave_link
aware init sequence and config space based SCR access for it and moves
5287 to the new class.

This patch is based on Joseph Chan's larger patch which was created
before slave_link was implemented in libata.

Signed-off-by: Tejun Heo <>
Cc: Joseph Chan <>
Signed-off-by: Jeff Garzik <>
12 years agolibata: Avoid overflow in ata_tf_to_lba48() when tf->hba_lbal > 127
Roland Dreier [Tue, 28 Oct 2008 23:52:20 +0000 (16:52 -0700)]
libata: Avoid overflow in ata_tf_to_lba48() when tf->hba_lbal > 127

In ata_tf_to_lba48(), when evaluating

(tf->hob_lbal & 0xff) << 24

the expression is promoted to signed int (since int can hold all values
of u8).  However, if hob_lbal is 128 or more, then it is treated as a
negative signed value and sign-extended when promoted to u64 to | into
sectors, which leads to the MSB 32 bits of section getting set

For example, Phillip O'Donnell <> reported
that a 1.5GB drive caused:

    ata3.00: HPA detected: current 2930277168, native 18446744072344861488

where 2930277168 == 0xAEA87B30 and 18446744072344861488 == 0xffffffffaea87b30
which shows the problem when hob_lbal is 0xae.

Fix this by adding a cast to u64, just as is used by for hob_lbah and
hob_lbam in the function.

Reported-by: Phillip O'Donnell <>
Signed-off-by: Roland Dreier <>
Signed-off-by: Jeff Garzik <>
12 years agoATA: remove excess kernel-doc notation
Randy Dunlap [Thu, 30 Oct 2008 05:35:08 +0000 (22:35 -0700)]
ATA: remove excess kernel-doc notation

Remove excess kernel-doc function parameter notation from drivers/ata/:

Warning(drivers/ata/libata-core.c:1622): Excess function parameter or struct member 'fn' description in 'ata_pio_queue_task'
Warning(drivers/ata/libata-core.c:4655): Excess function parameter or struct member 'err_mask' description in 'ata_qc_complete'
Warning(drivers/ata/ata_piix.c:751): Excess function parameter or struct member 'udma' description in 'do_pata_set_dmamode'

Signed-off-by: Randy Dunlap <>
Signed-off-by: Jeff Garzik <>
12 years agopowerpc/cell/OProfile: Fix on-stack array size in activate spu profiling function
Carl Love [Wed, 29 Oct 2008 05:06:45 +0000 (05:06 +0000)]
powerpc/cell/OProfile: Fix on-stack array size in activate spu profiling function

The size of the pm_signal_local array should be equal to the
number of SPUs being configured in the array.  Currently, the
array is of size 4 (NR_PHYS_CTRS) but being indexed by a for
loop from 0 to 7 (NUM_SPUS_PER_NODE).  This could potentially
cause an oops or random memory corruption since the pm_signal_local
array is on the stack.  This fixes it.

Signed-off-by: Carl Love <>
Signed-off-by: Paul Mackerras <>
12 years agopowerpc/mpic: Fix regression caused by change of default IRQ affinity
Kumar Gala [Tue, 28 Oct 2008 18:01:39 +0000 (18:01 +0000)]
powerpc/mpic: Fix regression caused by change of default IRQ affinity

The Freescale implementation of MPIC only allows a single CPU destination
for non-IPI interrupts.  We add a flag to the mpic_init to distinquish
these variants of MPIC.  We pull in the irq_choose_cpu from sparc64 to
select a single CPU as the destination of the interrupt.

This is to deal with the fact that the default smp affinity was
changed by commit 18404756765c713a0be4eb1082920c04822ce588 ("genirq:
Expose default irq affinity mask (take 3)") to be all CPUs.

Signed-off-by: Kumar Gala <>
Signed-off-by: Paul Mackerras <>
12 years agopowerpc: Update remaining dma_mapping_ops to use map/unmap_page
Mark Nelson [Mon, 27 Oct 2008 20:38:08 +0000 (20:38 +0000)]
powerpc: Update remaining dma_mapping_ops to use map/unmap_page

After the merge of the 32 and 64bit DMA code, dma_direct_ops lost
their map/unmap_single() functions but gained map/unmap_page().  This
caused a problem for Cell because Cell's dma_iommu_fixed_ops called
the dma_direct_ops if the fixed linear mapping was to be used or the
iommu ops if the dynamic window was to be used.  So in order to fix
this problem we need to update the 64bit DMA code to use

First, we update the generic IOMMU code so that iommu_map_single()
becomes iommu_map_page() and iommu_unmap_single() becomes
iommu_unmap_page().  Then we propagate these changes up through all
the callers of these two functions and in the process update all the
dma_mapping_ops so that they have map/unmap_page rahter than
map/unmap_single.  We can do this because on 64bit there is no HIGHMEM
memory so map/unmap_page ends up performing exactly the same function
as map/unmap_single, just taking different arguments.

This has no affect on drivers because the dma_map_single_attrs() just
ends up calling the map_page() function of the appropriate
dma_mapping_ops and similarly the dma_unmap_single_attrs() calls

This fixes an oops on Cell blades, which oops on boot without this
because they call dma_direct_ops.map_single, which is NULL.

Signed-off-by: Mark Nelson <>
Signed-off-by: Paul Mackerras <>
12 years agopowerpc/pci: Fix unmapping of IO space on 64-bit
Benjamin Herrenschmidt [Mon, 27 Oct 2008 19:48:47 +0000 (19:48 +0000)]
powerpc/pci: Fix unmapping of IO space on 64-bit

A typo/thinko made us pass the wrong argument to __flush_hash_table_range
when unplugging bridges, thus not flushing all the translations for
the IO space on unplug.  The third parameter to __flush_hash_table_range
is `end', not `size'.

This causes the hypervisor to refuse unplugging slots.

Signed-off-by: Benjamin Herrenschmidt <>
Signed-off-by: Paul Mackerras <>
12 years agopowerpc/pci: Properly allocate bus resources for hotplug PHBs
Nathan Fontenot [Mon, 27 Oct 2008 19:48:17 +0000 (19:48 +0000)]
powerpc/pci: Properly allocate bus resources for hotplug PHBs

Resources for PHB's that are dynamically added to a system are not
properly allocated in the resource tree.

Not having these resources allocated causes an oops when removing
the PHB when we try to release them.

The diff appears a bit messy, this is mainly due to moving everything
one tab to the left in the pcibios_allocate_bus_resources routine.
The functionality change in this routine is only that the
list_for_each_entry() loop is pulled out and moved to the necessary
calling routine.

Signed-off-by: Nathan Fontenot <>
Signed-off-by: Benjamin Herrenschmidt <>
Signed-off-by: Paul Mackerras <>
12 years agoOF-device: Don't overwrite numa_node in device registration
Jeremy Kerr [Sun, 26 Oct 2008 21:51:25 +0000 (21:51 +0000)]
OF-device: Don't overwrite numa_node in device registration

Currently, the numa_node of OF-devices will be overwritten during
device_register, which simply sets the node to -1.  On cell machines,
this means that devices can't find their IOMMU, which is referenced
through the device's numa node.

Set the numa node for OF devices with no parent, and use the
lower-level device_initialize and device_add functions, so that the
node is preserved.

We can remove the call to set_dev_node in of_device_alloc, as it
will be overwritten during register.

Signed-off-by: Jeremy Kerr <>
Signed-off-by: Paul Mackerras <>
12 years agopowerpc: Fix swapcontext system for VSX + old ucontext size
Michael Neuling [Thu, 23 Oct 2008 00:42:36 +0000 (00:42 +0000)]
powerpc: Fix swapcontext system for VSX + old ucontext size

Since VSX support was added, we now have two sizes of ucontext_t;
the older, smaller size without the extra VSX state, and the new
larger size with the extra VSX state.  A program using the
sys_swapcontext system call and supplying smaller ucontext_t
structures will currently get an EINVAL error if the task has
used VSX (e.g. because of calling library code that uses VSX) and
the old_ctx argument is non-NULL (i.e. the program is asking for
its current context to be saved).  Thus the program will start
getting EINVAL errors on calls that previously worked.

This commit changes this behaviour so that we don't send an EINVAL in
this case.  It will now return the smaller context but the VSX MSR bit
will always be cleared to indicate that the ucontext_t doesn't include
the extra VSX state, even if the task has executed VSX instructions.

Both 32 and 64 bit cases are updated.

[ - also fix some access_ok() and get_user() calls]

Thanks to Ben Herrenschmidt for noticing this problem.

Signed-off-by: Michael Neuling <>
Signed-off-by: Paul Mackerras <>
12 years agopowerpc: Fix compiler warning for the relocatable kernel
Michael Neuling [Wed, 22 Oct 2008 19:39:49 +0000 (19:39 +0000)]
powerpc: Fix compiler warning for the relocatable kernel

Fixes this warning:
 arch/powerpc/kernel/setup_64.c:447:5: warning: "kernstart_addr" is not defined

which arises because PHYSICAL_START is no longer a constant when

Signed-off-by: Michael Neuling <>
Signed-off-by: Paul Mackerras <>
12 years agopowerpc: Work around ld bug in older binutils
Paul Mackerras [Wed, 22 Oct 2008 18:43:45 +0000 (18:43 +0000)]
powerpc: Work around ld bug in older binutils

Commit 549e8152de8039506f69c677a4546e5427aa6ae7 ("powerpc: Make the
64-bit kernel as a position-independent executable") added lines to to add the extra sections needed to implement a
relocatable kernel.  However, those lines seem to trigger a bug in
older versions of GNU ld (such as 2.16.1) when building a
non-relocatable kernel.  Since ld 2.16.1 is still a popular choice for
cross-toolchains, this adds an #ifdef to so the added
lines are only included when building a relocatable kernel.

Signed-off-by: Paul Mackerras <>
12 years agopowerpc/ppc64/kdump: Better flag for running relocatable
Milton Miller [Thu, 23 Oct 2008 18:41:09 +0000 (18:41 +0000)]
powerpc/ppc64/kdump: Better flag for running relocatable

The __kdump_flag ABI is overly constraining for future development.

As of 2.6.27, the kernel entry point has 4 constraints:  Offset 0 is
the starting point for the master (boot) cpu (entered with r3 pointing
to the device tree structure), offset 0x60 is code for the slave cpus
(entered with r3 set to their device tree physical id), offset 0x20 is
used by the iseries hypervisor, and secondary cpus must be well behaved
when the first 256 bytes are copied to address 0.

Placing the __kdump_flag at 0x18 is bad because:

- It was taking the last 8 bytes before the iseries hypervisor data.
- It was 8 bytes for a boolean flag
- It had no way of identifying that the flag was present
- It does leave any room for the master to add any additional code
  before branching, which hurts debug.
- It will be unnecessarily hard for 32 bit code to be common (8 bytes)

Now that we have eliminated the use of __kdump_flag in favor of
the standard is_kdump_kernel(), this flag only controls run without
relocating the kernel to PHYSICAL_START (0), so rename it __run_at_load.

Move the flag to 0x5c, 1 word before the secondary cpu entry point at
0x60.  Initialize it with "run0" to say it will run at 0 unless it is
set to 1.  It only exists if we are relocatable.

Signed-off-by: Milton Miller <>
Signed-off-by: Michael Neuling <>
Signed-off-by: Paul Mackerras <>
12 years agopowerpc: Use is_kdump_kernel()
Milton Miller [Wed, 22 Oct 2008 20:39:04 +0000 (15:39 -0500)]
powerpc: Use is_kdump_kernel()

linux/crash_dump.h defines is_kdump_kernel() to be used by code that
needs to know if the previous kernel crashed instead of a (clean) boot
or reboot.

This updates the just added powerpc code to use it.  This is needed
for the next commit, which will remove __kdump_flag.

Signed-off-by: Milton Miller <>
Signed-off-by: Paul Mackerras <>