firefly-linux-kernel-4.4.55.git
16 years ago[POWERPC] Make smp_send_stop() handle panic and xmon reboot
Olof Johansson [Fri, 28 Dec 2007 04:11:09 +0000 (15:11 +1100)]
[POWERPC] Make smp_send_stop() handle panic and xmon reboot

smp_send_stop() will send an IPI to all other cpus to shut them down.
However, for the case of xmon-based reboots (as well as potentially some
panics), the other cpus are (or might be) spinning with interrupts off,
and won't take the IPI.

Current code will drop us into the debugger when the IPI fails, which
means we're in an infinite loop that we can't get out of without an
external reset of some sort.

Instead, make the smp_send_stop() IPI call path just print the warning
about being unable to send IPIs, but make it return so the rest of the
shutdown sequence can continue. It's not perfect, but the lesser of
two evils.

Also move the call_lock handling outside of smp_call_function_map so we
can avoid deadlocks in smp_send_stop().

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Make smp_call_function_map static
Olof Johansson [Fri, 28 Dec 2007 04:08:36 +0000 (15:08 +1100)]
[POWERPC] Make smp_call_function_map static

smp_call_function_map should be static, and for consistency prepend it
with __ like other local helper functions in the same file.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoMerge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerp...
Paul Mackerras [Thu, 24 Jan 2008 04:29:14 +0000 (15:29 +1100)]
Merge branch 'for-2.6.25' of /linux/kernel/git/galak/powerpc into for-2.6.25

16 years ago[POWERPC] Add initial storcenter config file.
Jon Loeliger [Wed, 23 Jan 2008 18:43:14 +0000 (12:43 -0600)]
[POWERPC] Add initial storcenter config file.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Acked-by: Andy Wilcox <andy@protium.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Add initial iomega StorCenter board port.
Jon Loeliger [Wed, 23 Jan 2008 18:42:50 +0000 (12:42 -0600)]
[POWERPC] Add initial iomega StorCenter board port.

Use cuImage bootwrapper until U-Boot port is completed.
Derived heavily from Linkstation port.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Acked-by: Andy Wilcox <andy@protium.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Add StorCenter DTS first draft.
Jon Loeliger [Wed, 23 Jan 2008 18:42:29 +0000 (12:42 -0600)]
[POWERPC] Add StorCenter DTS first draft.

Based on the Kurobox DTS files.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Acked-by: Andy Wilcox <andy@protium.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Add _nmask_and_or_msr() declartion to asm-powerpc/system.h
Jon Loeliger [Wed, 23 Jan 2008 18:42:07 +0000 (12:42 -0600)]
[POWERPC] Add _nmask_and_or_msr() declartion to asm-powerpc/system.h

Prevents miscellaneous users from declaring it locally.

Signed-off-by: Jon Loeliger <jdl@freecale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agofs_enet: Add fixed-phy support for fs_enet
Jochen Friedrich [Tue, 18 Dec 2007 15:25:43 +0000 (16:25 +0100)]
fs_enet: Add fixed-phy support for fs_enet

This patch adds support to use the fixed-link property of an ethernet node
to fs_enet for the CONFIG_PPC_CPM_NEW_BINDING case.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Acked-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Vitali Bordug <vitb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 8xx: Use machine_*_initcall() hooks in platform code
Grant Likely [Mon, 21 Jan 2008 18:58:06 +0000 (11:58 -0700)]
[POWERPC] 8xx: Use machine_*_initcall() hooks in platform code

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Fix compile error if CONFIG_STX_GP3 is defined
Kumar Gala [Wed, 23 Jan 2008 12:36:40 +0000 (06:36 -0600)]
[POWERPC] Fix compile error if CONFIG_STX_GP3 is defined

cpmux is need in all cases, having wrapped by the ifndef CONFIG_STX_GP3
was causing a compile error.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Move RapidIO support code from arch/ppc
Kumar Gala [Wed, 23 Jan 2008 12:12:06 +0000 (06:12 -0600)]
[POWERPC] Move RapidIO support code from arch/ppc

Do just enough to move the RapidIO support code for 85xx over from arch/ppc
into arch/powerpc and make it still build.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[RAPIDIO] Fix compile error and warning
Kumar Gala [Wed, 23 Jan 2008 11:53:47 +0000 (05:53 -0600)]
[RAPIDIO] Fix compile error and warning

drivers/rapidio/rio.c: In function 'rio_get_asm':
drivers/rapidio/rio.c:413: error: implicit declaration of function 'in_interrupt'
drivers/rapidio/rio.c: In function 'rio_init_mports':
drivers/rapidio/rio.c:480: warning: format '%8.8lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t'
drivers/rapidio/rio.c:480: warning: format '%8.8lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t'

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 86xx: MPC8641 HPCN - call of_platform_bus_probe()
Wade Farnsworth [Tue, 22 Jan 2008 20:17:45 +0000 (13:17 -0700)]
[POWERPC] 86xx: MPC8641 HPCN - call of_platform_bus_probe()

Call of_platform_bus_probe() on the MPC8641 HPCN, similar to what is
done for other platforms.

Signed-off-by: Wade Farnsworth <wfarnsworth@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 86xx: Add localbus and flash nodes to mpc8641_hpcn.dts
Wade Farnsworth [Tue, 22 Jan 2008 20:13:39 +0000 (13:13 -0700)]
[POWERPC] 86xx: Add localbus and flash nodes to mpc8641_hpcn.dts

Add local bus, flash, and MTD partition nodes to mpc8641_hpcn.dts

Also add compatible field for the soc node, so that it will be picked up
by of_platform_bus_probe().

Signed-off-by: Wade Farnsworth <wfarnsworth@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 8xx: adder875 - Fix flash bus-width and remove duplicate __initdata
Scott Wood [Tue, 22 Jan 2008 18:31:41 +0000 (12:31 -0600)]
[POWERPC] 8xx: adder875 - Fix flash bus-width and remove duplicate __initdata

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: Update MPC8313e RDB defconfig for MTD, NAND, JFFS2.
Scott Wood [Thu, 17 Jan 2008 22:38:11 +0000 (16:38 -0600)]
[POWERPC] 83xx: Update MPC8313e RDB defconfig for MTD, NAND, JFFS2.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: MPC8313e RDB - Add NOR flash to the device tree.
Scott Wood [Thu, 17 Jan 2008 22:37:56 +0000 (16:37 -0600)]
[POWERPC] 83xx: MPC8313e RDB - Add NOR flash to the device tree.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: MPC8313e RBD add NAND to device tree
Scott Wood [Thu, 17 Jan 2008 22:37:51 +0000 (16:37 -0600)]
[POWERPC] 83xx: MPC8313e RBD add NAND to device tree

Add NAND to device tree, and call of_platform_bus_probe().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 82xx: Embedded Planet EP8248E support
Scott Wood [Thu, 17 Jan 2008 22:32:05 +0000 (16:32 -0600)]
[POWERPC] 82xx: Embedded Planet EP8248E support

This board is also resold by Freescale under the names
"QUICCStart MPC8248 Evaluation System" and "CWH-PPC-8248N-VE".

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 8xx: Analogue & Micro Adder875 board support.
Scott Wood [Thu, 17 Jan 2008 22:31:40 +0000 (16:31 -0600)]
[POWERPC] 8xx: Analogue & Micro Adder875 board support.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 85xx: Respect KERNELBASE, PAGE_OFFSET, and PHYSICAL_START on e500
Dale Farnsworth [Thu, 22 Nov 2007 15:46:20 +0000 (08:46 -0700)]
[POWERPC] 85xx: Respect KERNELBASE, PAGE_OFFSET, and PHYSICAL_START on e500

The e500 MMU init code previously assumed KERNELBASE always equaled
PAGE_OFFSET and PHYSICAL_START was 0.  This is useful for kdump
support as well as asymetric multicore.

For the initial kdump support the secondary kernel will run at 32M
but need access to all of memory so we bump the initial TLB up to
64M.  This also matches with the forth coming ePAPR spec.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] fsl_soc: Fix get_immrbase() to use ranges, rather than reg.
Scott Wood [Mon, 14 Jan 2008 16:29:35 +0000 (10:29 -0600)]
[POWERPC] fsl_soc: Fix get_immrbase() to use ranges, rather than reg.

Don't depend on the reg property as a way to determine the base
of the immr space.  The reg property might be defined differently for
different SoC families.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Update MPC8610 HPCD to support audio drivers
Timur Tabi [Fri, 18 Jan 2008 15:24:53 +0000 (09:24 -0600)]
[POWERPC] Update MPC8610 HPCD to support audio drivers

Update the MPC8610 HPCD files to support the audio driver.  Update
booting-without-of.txt with information on the SSI device.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Add IPIC Kconfig option
John Rigby [Fri, 18 Jan 2008 00:05:31 +0000 (17:05 -0700)]
[POWERPC] Add IPIC Kconfig option

IPIC is not just for 83xx anymore so make it a separate config option.

Signed-off-by: John Rigby <jrigby@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Add support for mpc512x interrupts to ipic
John Rigby [Fri, 18 Jan 2008 00:05:32 +0000 (17:05 -0700)]
[POWERPC] Add support for mpc512x interrupts to ipic

Added ipic_info entries for vectors used by 512x that
were previously unused by 83xx.

Signed-off-by: John Rigby <jrigby@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Fix carry bug in 128-bit unsigned integer adding
Liu Yu [Fri, 18 Jan 2008 03:21:39 +0000 (11:21 +0800)]
[POWERPC] Fix carry bug in 128-bit unsigned integer adding

Synchronize it to the definition in include/math-emu/op-4.h for short term.

Signed-off-by: Liu Yu <Yu.Liu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 85xx: mpc85xx_ads: add in missing of_node_put()
Paul Gortmaker [Wed, 2 Jan 2008 17:50:01 +0000 (12:50 -0500)]
[POWERPC] 85xx: mpc85xx_ads: add in missing of_node_put()

Add in missing of_node_put() after cpm2_pic_init(). This and other coding
style cleanups as suggested by Stephen Rothwell.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] qe-uart: add support for Freescale QUICCEngine UART
Timur Tabi [Tue, 15 Jan 2008 15:56:13 +0000 (09:56 -0600)]
[POWERPC] qe-uart: add support for Freescale QUICCEngine UART

Add file ucc_uart.c, a serial device driver for the Freescale QUICCEngine.
Update the Kconfig and Makefile accordingly.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] QE: Add support for Freescale QUICCEngine UART
Timur Tabi [Wed, 9 Jan 2008 23:35:05 +0000 (17:35 -0600)]
[POWERPC] QE: Add support for Freescale QUICCEngine UART

Add support for UART serial ports using a Freescale QUICCEngine. Update
booting-without-of.txt to define new properties for a QE UART node.  Update
the MPC8323E-MDS device tree to add UCC5 as a UART.  Update the QE library
to support slow UCC devices and modules.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] QE: Add ability to upload QE firmware
Timur Tabi [Tue, 8 Jan 2008 16:30:58 +0000 (10:30 -0600)]
[POWERPC] QE: Add ability to upload QE firmware

Define the layout of a binary blob that contains a QE firmware and instructions
on how to upload it.  Add function qe_upload_firmware() to parse the blob
and perform the actual upload.  Fully define 'struct rsp' in immap_qe.h to
include the actual RISC Special Registers.  Added description of a new
QE firmware node to booting-without-of.txt.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] fsl_soc: add support to gianfar for fixed-link property
Vitaly Bordug [Thu, 6 Dec 2007 22:51:31 +0000 (01:51 +0300)]
[POWERPC] fsl_soc: add support to gianfar for fixed-link property

fixed-link says: register new "Fixed/emulated PHY", i.e. PHY that
not connected to the real MDIO bus.

Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] MPC8349E-mITX: Vitesse 7385 PHY is not connected to the MDIO bus
Vitaly Bordug [Thu, 6 Dec 2007 22:51:39 +0000 (01:51 +0300)]
[POWERPC] MPC8349E-mITX: Vitesse 7385 PHY is not connected to the MDIO bus

...thus use fixed-link to register proper "Fixed PHY"

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agophy/fixed.c: rework to not duplicate PHY layer functionality
Vitaly Bordug [Thu, 6 Dec 2007 22:51:22 +0000 (01:51 +0300)]
phy/fixed.c: rework to not duplicate PHY layer functionality

With that patch fixed.c now fully emulates MDIO bus, thus no need
to duplicate PHY layer functionality. That, in turn, drastically
simplifies the code, and drops down line count.

As an additional bonus, now there is no need to register MDIO bus
for each PHY, all emulated PHYs placed on the platform fixed MDIO bus.
There is also no more need to pre-allocate PHYs via .config option,
this is all now handled dynamically.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] MPC8349E-mITX: introduce localbus and pata nodes
Anton Vorontsov [Tue, 4 Dec 2007 19:45:31 +0000 (22:45 +0300)]
[POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

This patch adds localbus and pata nodes to use CF IDE interface
on MPC8349E-mITX boards.

Patch also adds code to probe localbus.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: USB device tree cleanups
Li Yang [Tue, 8 Jan 2008 07:18:46 +0000 (15:18 +0800)]
[POWERPC] 83xx: USB device tree cleanups

Remove device_type = "usb" for 83xx SoC USB controller

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: Add MPC837x USB platform support
Li Yang [Tue, 8 Jan 2008 07:18:45 +0000 (15:18 +0800)]
[POWERPC] 83xx: Add MPC837x USB platform support

Add chip specific and board specific initialization for MPC837x USB.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: add device trees for MPC837x MDS board
Li Yang [Mon, 7 Jan 2008 12:03:18 +0000 (20:03 +0800)]
[POWERPC] 83xx: add device trees for MPC837x MDS board

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Fix incorrect interrupt map on FSL reference boards
Kumar Gala [Fri, 18 Jan 2008 04:32:49 +0000 (22:32 -0600)]
[POWERPC] Fix incorrect interrupt map on FSL reference boards

The ULI based boards had the interrupt maps for USB on the ULI incorrectly
set.

Also, the MPC8572DS was missing the interrupt-map-mask for the 3rd PCIe
controller.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] bootwrapper: convert cuboot-8{3,5}xx to dt_fixup_mac_address_by_alias
Kumar Gala [Tue, 15 Jan 2008 15:33:56 +0000 (09:33 -0600)]
[POWERPC] bootwrapper: convert cuboot-8{3,5}xx to dt_fixup_mac_address_by_alias

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] bootwrapper: Add find_node_by_alias and dt_fixup_mac_address_by_alias
Kumar Gala [Tue, 15 Jan 2008 15:30:32 +0000 (09:30 -0600)]
[POWERPC] bootwrapper: Add find_node_by_alias and dt_fixup_mac_address_by_alias

Add the ability to set the mac address given the alias for the device.
Removes the need for having a linux,network-index property.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: convert boards to use machine_device_initcall
Kumar Gala [Tue, 15 Jan 2008 15:47:10 +0000 (09:47 -0600)]
[POWERPC] 83xx: convert boards to use machine_device_initcall

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 85xx: convert boards to use machine_device_initcall
Kumar Gala [Tue, 15 Jan 2008 15:42:36 +0000 (09:42 -0600)]
[POWERPC] 85xx: convert boards to use machine_device_initcall

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Fixup use of phys_addr_t in mpic code
Becky Bruce [Tue, 15 Jan 2008 02:56:18 +0000 (20:56 -0600)]
[POWERPC] Fixup use of phys_addr_t in mpic code

The mpic_map() and __mpic_map_mmio() need to use phys_addr_t for the
physical address they are passed.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Remove update_bridge_resource
Kumar Gala [Tue, 15 Jan 2008 02:42:53 +0000 (20:42 -0600)]
[POWERPC] Remove update_bridge_resource

The 85xx/86xx pci code no longer uses update_bridge_resource and it was the
only caller.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] FSL: Rework PCI/PCIe support for 85xx/86xx
Kumar Gala [Mon, 14 Jan 2008 23:02:19 +0000 (17:02 -0600)]
[POWERPC] FSL: Rework PCI/PCIe support for 85xx/86xx

The current PCI code for Freescale 85xx/86xx was treating the virtual
P2P PCIe bridge as a transparent bridge.  Rather than doing that fixup
the virtual P2P bridge by copying the resources from the PHB.

Also, fixup a bit of the code for dealing with resource_size_t being
64-bits and how we set ATMU registers for >4G.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Fixup transparent P2P resources
Kumar Gala [Mon, 14 Jan 2008 15:41:36 +0000 (09:41 -0600)]
[POWERPC] Fixup transparent P2P resources

For transparent P2P bridges the first 3 resources may get set from based on
BAR registers and need to get fixed up. Where as the remainder come from the
parent bus and have already been fixed up.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Ensure we only handle PowerMac PCI bus fixup for memory resources
Kumar Gala [Sat, 12 Jan 2008 23:23:26 +0000 (17:23 -0600)]
[POWERPC] Ensure we only handle PowerMac PCI bus fixup for memory resources

The fixup code that handles the case for PowerMac's that leave bridge
windows open over an inaccessible region should only be applied to
memory resources (IORESOURCE_MEM).  If not we can get it trying to fixup
IORESOURCE_IO on some systems since the other conditions that are used to
detect the case can easily match for IORESOURCE_IO.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Fix handling of memreserve if the range lands in highmem
Kumar Gala [Wed, 9 Jan 2008 17:27:23 +0000 (11:27 -0600)]
[POWERPC] Fix handling of memreserve if the range lands in highmem

There were several issues if a memreserve range existed and happened
to be in highmem:

* The bootmem allocator is only aware of lowmem so calling
  reserve_bootmem with a highmem address would cause a BUG_ON
* All highmem pages were provided to the buddy allocator

Added a lmb_is_reserved() api that we now use to determine if a highem
page should continue to be PageReserved or provided to the buddy
allocator.

Also, we incorrectly reported the amount of pages reserved since all
highmem pages are initally marked reserved and we clear the
PageReserved flag as we "free" up the highmem pages.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoMerge branch 'linux-2.6'
Paul Mackerras [Wed, 23 Jan 2008 23:07:21 +0000 (10:07 +1100)]
Merge branch 'linux-2.6'

16 years ago[POWERPC] Provide a way to protect 4k subpages when using 64k pages
Paul Mackerras [Wed, 23 Jan 2008 21:35:13 +0000 (08:35 +1100)]
[POWERPC] Provide a way to protect 4k subpages when using 64k pages

Using 64k pages on 64-bit PowerPC systems makes life difficult for
emulators that are trying to emulate an ISA, such as x86, which use a
smaller page size, since the emulator can no longer use the MMU and
the normal system calls for controlling page protections.  Of course,
the emulator can emulate the MMU by checking and possibly remapping
the address for each memory access in software, but that is pretty
slow.

This provides a facility for such programs to control the access
permissions on individual 4k sub-pages of 64k pages.  The idea is
that the emulator supplies an array of protection masks to apply to a
specified range of virtual addresses.  These masks are applied at the
level where hardware PTEs are inserted into the hardware page table
based on the Linux PTEs, so the Linux PTEs are not affected.  Note
that this new mechanism does not allow any access that would otherwise
be prohibited; it can only prohibit accesses that would otherwise be
allowed.  This new facility is only available on 64-bit PowerPC and
only when the kernel is configured for 64k pages.

The masks are supplied using a new subpage_prot system call, which
takes a starting virtual address and length, and a pointer to an array
of protection masks in memory.  The array has a 32-bit word per 64k
page to be protected; each 32-bit word consists of 16 2-bit fields,
for which 0 allows any access (that is otherwise allowed), 1 prevents
write accesses, and 2 or 3 prevent any access.

Implicit in this is that the regions of the address space that are
protected are switched to use 4k hardware pages rather than 64k
hardware pages (on machines with hardware 64k page support).  In fact
the whole process is switched to use 4k hardware pages when the
subpage_prot system call is used, but this could be improved in future
to switch only the affected segments.

The subpage protection bits are stored in a 3 level tree akin to the
page table tree.  The top level of this tree is stored in a structure
that is appended to the top level of the page table tree, i.e., the
pgd array.  Since it will often only be 32-bit addresses (below 4GB)
that are protected, the pointers to the first four bottom level pages
are also stored in this structure (each bottom level page contains the
protection bits for 1GB of address space), so the protection bits for
addresses below 4GB can be accessed with one fewer loads than those
for higher addresses.

Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoUpdate ctime and mtime for memory-mapped files
Anton Salikhmetov [Tue, 22 Jan 2008 23:21:18 +0000 (02:21 +0300)]
Update ctime and mtime for memory-mapped files

Update ctime and mtime for memory-mapped files at a write access on
a present, read-only PTE, as well as at a write on a non-present PTE.

Signed-off-by: Anton Salikhmetov <salikhmetov@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: GEODE fix a race condition in the MFGPT timer tick
Jordan Crouse [Tue, 22 Jan 2008 22:30:16 +0000 (23:30 +0100)]
x86: GEODE fix a race condition in the MFGPT timer tick

When we set the MFGPT timer tick, there is a chance that we'll
immediately assert an event.  If for some reason the IRQ routing
for this clock has been setup for some other purpose, then we
could end up firing an interrupt into the SMM handler or worse.

This rearranges the timer tick init function to initalize the handler
before we set up the MFGPT clock to make sure that even if we get
an event, it will go to the handler.

Furthermore, in the handler we need to make sure that we clear the
event, even if the timer isn't running.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Arnd Hannemann <hannemann@i4.informatik.rwth-aachen.de>
16 years agoFix file references in documentation and Kconfig
Johann Felix Soden [Sun, 20 Jan 2008 13:41:18 +0000 (14:41 +0100)]
Fix file references in documentation and Kconfig

Fix typo in arch/powerpc/boot/flatdevtree_env.h.
There is no Documentation/networking/ixgbe.txt.

README.cycladesZ is now in Documentation/.
wavelan.p.h is now in drivers/net/wireless/.
HFS.txt is now Documentation/filesystems/hfs.txt.
OSS-files are now in sound/oss/.

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
Linus Torvalds [Tue, 22 Jan 2008 17:25:55 +0000 (09:25 -0800)]
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6

* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6:
  hwmon: (it87) request only Environment Controller ports

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
Linus Torvalds [Tue, 22 Jan 2008 17:19:06 +0000 (09:19 -0800)]
Merge git://git./linux/kernel/git/x86/linux-2.6-x86

* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  Revert "x86: fix NMI watchdog & 'stopped time' problem"

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Tue, 22 Jan 2008 17:18:45 +0000 (09:18 -0800)]
Merge git://git./linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  sched: group scheduler, set uid share fix

16 years agorcu: fix section mismatch
Randy Dunlap [Tue, 22 Jan 2008 11:31:39 +0000 (03:31 -0800)]
rcu: fix section mismatch

rcu_online_cpu() should be __cpuinit instead of __devinit.

WARNING: vmlinux.o(.text+0x4b6d5): Section mismatch: reference to .init.text: (between 'rcu_cpu_notify' and 'wakeme_after_rcu')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoW1: w1_therm.c is flagging 0C etc as invalid
David Fries [Tue, 22 Jan 2008 11:31:39 +0000 (03:31 -0800)]
W1: w1_therm.c is flagging 0C etc as invalid

The extra rom[0] check is flagging valid temperatures as invalid when
there is already a CRC data transmission check.

w1_therm_read_bin()
if (rom[8] == crc && rom[0])
verdict = 1;

Requiring rom[0] to be non-zero will flag as invalid temperature
conversions when the low byte is zero, specifically the temperatures 0C,
16C, 32C, 48C, -16C, -32C, and -48C.

The CRC check is produced on the device for the previous 8 bytes and is
required to ensure the data integrity in transmission.  I don't see why the
extra check for rom[0] being non-zero is in there.  Evgeniy Polyakov didn't
know either.  Just for a check I unplugged the sensor, executed a
temperature conversion, and read the results.  The read was all ff's, which
also failed the CRC, so it doesn't need to protect against a disconnected
sensor.

I have more extensive patches in the work, but these two trivial ones will
do for today.  I would like to hear from people who use the ds2490 USB to
one wire dongle.  1 if you would be willing to test the patches as I
currently only have the one sensor on a short parisite powered wire, 2 if
there is any cheap sources for the ds2490.

Signed-off-by: David Fries <david@fries.net>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoW1: w1_therm.c ds18b20 decode freezing temperatures correctly
David Fries [Tue, 22 Jan 2008 11:31:37 +0000 (03:31 -0800)]
W1: w1_therm.c ds18b20 decode freezing temperatures correctly

Correct the decoding of negative C temperatures.  The code did a binary OR
of two bytes to make a 16 bit value, but assignd it to an integer.  This
caused the value to not be sign extended and to loose that it was a
negative number in the assignment.

Before the patch (in my freezer),
w1_slave
ed fe 4b 46 7f ff 03 10 e4 : crc=e4 YES
ed fe 4b 46 7f ff 03 10 e4 t=4078
With the patch,
e3 fe 4b 46 7f ff 0d 10 81 : crc=81 YES
e3 fe 4b 46 7f ff 0d 10 81 t=-17

Signed-off-by: David Fries <david@fries.net>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agohwmon: (it87) request only Environment Controller ports
Bjorn Helgaas [Tue, 22 Jan 2008 12:21:03 +0000 (07:21 -0500)]
hwmon: (it87) request only Environment Controller ports

The IT8705F and related parts are Super I/O controllers that contain
many separate devices.

Some BIOSes describe IT8705F I/O port usage under a motherboard device
(PNP0C02) with overlapping regions, e.g., 0x290-0x29f and 0x290-0x294.

The it87 driver supports only the Environment Controller, which requires
only two ISA ports, but it used to request an eight-port range.  If that
range exceeds a range reported by the BIOS, as 0x290-0x297 would, the
request fails, and the it87 driver cannot claim the device.

This patch makes the it87 driver request only the two ports used for the
Environment Controller device.

Systems where this problem has been reported:
    Gigabyte GA-K8N Ultra 9
    Gigabyte M56S-S3
    Gigabyte GA-965G-DS3

Kernel bug reports:
    http://bugzilla.kernel.org/show_bug.cgi?id=9514
    http://lkml.org/lkml/2007/12/4/466

Related change:
    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a7839e960675b549f06209d18283d5cee2ce9261

    The patch above increases the number of PNP port resources we support.
    Prior to this patch, we ignored some port resources, which masked the
    it87 problem.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
16 years agosched: group scheduler, set uid share fix
Ingo Molnar [Tue, 22 Jan 2008 10:24:58 +0000 (11:24 +0100)]
sched: group scheduler, set uid share fix

setting cpu share to 1 causes hangs, as reported in:

    http://bugzilla.kernel.org/show_bug.cgi?id=9779

as the default share is 1024, the values of 0 and 1 can indeed
cause problems. Limit it to 2 or higher values.

These values can only be set by the root user - but still it
makes sense to protect against nonsensical values.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoRevert "x86: fix NMI watchdog & 'stopped time' problem"
Thomas Gleixner [Tue, 22 Jan 2008 09:23:01 +0000 (10:23 +0100)]
Revert "x86: fix NMI watchdog & 'stopped time' problem"

This reverts commit d4d25deca49ec2527a634557bf5a6cf449f85deb.

It tried to fix long standing bugzilla entries, but the solution was
reported to break other systems. The reporter of

http://bugzilla.kernel.org/show_bug.cgi?id=9791

tracked it down to this commit and confirmed that reverting the patch
restores the correct behaviour. It's too late in the release cycle to
find a better solution than reverting the commit to avoid regressions.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
16 years agoMakefile: Change typoed 'behavour' to 'behaviour'
Linus Nilsson [Sun, 20 Jan 2008 16:10:01 +0000 (17:10 +0100)]
Makefile: Change typoed 'behavour' to 'behaviour'

Change two occurances of "behavour" to "behaviour".

Signed-off-by: Linus Nilsson <lajnold@acc.umu.se>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Tue, 22 Jan 2008 03:45:49 +0000 (19:45 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/selinux-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  selinux: fix memory leak in netlabel code

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 22 Jan 2008 03:42:25 +0000 (19:42 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  [ICMP]: ICMP_MIB_OUTMSGS increment duplicated
  [IPV6]: RFC 2011 compatibility broken
  [IPV6]: ICMP6_MIB_OUTMSGS increment duplicated
  [NET]: rtnl_link: fix use-after-free
  [AF_KEY]: Fix skb leak on pfkey_send_migrate() error
  [ATM] atm/suni.c: Fix section mismatch.
  [ATM] atm/idt77105.c: Fix section mismatch.
  [IrDA]: af_irda memory leak fixes
  [NEIGH]: Revert 'Fix race between neigh_parms_release and neightbl_fill_parms'
  [NETFILTER]: bridge-netfilter: fix net_device refcnt leaks
  [IPV6] ROUTE: Make sending algorithm more friendly with RFC 4861.
  [IPV4] FIB_HASH : Avoid unecessary loop in fn_hash_dump_zone()
  [NET]: Fix interrupt semaphore corruption in Intel drivers.
  [IPV4] fib_trie: fix duplicated route issue
  [IPV4] fib_hash: fix duplicated route issue
  [IPV6]: Mischecked tw match in __inet6_check_established.
  rfkill: call rfkill_led_trigger_unregister() on error

16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Tue, 22 Jan 2008 03:40:05 +0000 (19:40 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  tc35815: Use irq number for tc35815-mac platform device id
  [MIPS] Malta: Fix reading the PCI clock frequency on big-endian
  [MIPS] SMTC: Fix build error.

16 years agoFix filesystem capability support
Andrew G. Morgan [Tue, 22 Jan 2008 01:18:30 +0000 (17:18 -0800)]
Fix filesystem capability support

In linux-2.6.24-rc1, security/commoncap.c:cap_inh_is_capped() was
introduced. It has the exact reverse of its intended behavior. This
led to an unintended privilege esculation involving a process'
inheritable capability set.

To be exposed to this bug, you need to have Filesystem Capabilities
enabled and in use. That is:

- CONFIG_SECURITY_FILE_CAPABILITIES must be defined for the buggy code
  to be compiled in.

- You also need to have files on your system marked with fI bits raised.

Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
16 years agos3c2410_fb: fix line length calculation
Stefan Schmidt [Tue, 22 Jan 2008 01:18:27 +0000 (17:18 -0800)]
s3c2410_fb: fix line length calculation

Fix line length calculation. var->width is the size of the display in mm. We
like to use the pixel size.

Without this fix, dynamic (fbset) based resolution and depths changes with
s3c2410_fb don't work at all.

Spotted by john cass <johnpcass@yahoo.com>

Signed-off-by: Stefan Schmidt <stefan@openmoko.org>
Signed-off-by: Harald Welte <laforge@openmoko.org>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
16 years agoCRIS: add missed local_irq_restore call
Cyrill Gorcunov [Tue, 22 Jan 2008 01:18:26 +0000 (17:18 -0800)]
CRIS: add missed local_irq_restore call

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
16 years agotimer: fix section mismatch
Randy Dunlap [Tue, 22 Jan 2008 01:18:25 +0000 (17:18 -0800)]
timer: fix section mismatch

The caller is __cpuinit.
Also, this code block and its caller are inside #ifdef CONFIG_HOTPLUG_CPU
blocks, so this code should reflect that config symbol's usage.

WARNING: vmlinux.o(.text+0x4252f): Section mismatch: reference to .init.text: (between 'timer_cpu_notify' and 'msleep')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
16 years agohrtimer: fix section mismatch
Randy Dunlap [Tue, 22 Jan 2008 01:18:24 +0000 (17:18 -0800)]
hrtimer: fix section mismatch

Fix section mismatch in hrtimer.c:

WARNING: vmlinux.o(.text+0x50c61): Section mismatch: reference to .init.text: (between 'hrtimer_cpu_notify' and 'down_read_trylock')

Noticed by Johannes Berg and confirmed by Sam Ravnborg.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
16 years agokeyspan: fix oops
Alan Cox [Tue, 22 Jan 2008 01:18:24 +0000 (17:18 -0800)]
keyspan: fix oops

If we get a data URB back from the hardware after we have put the tty to
bed we go kaboom.  Fortunately all we need to do is process the URB without
trying to ram its contents down the throat of an ex-tty.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
16 years agotc35815: Use irq number for tc35815-mac platform device id
Atsushi Nemoto [Fri, 18 Jan 2008 16:15:52 +0000 (01:15 +0900)]
tc35815: Use irq number for tc35815-mac platform device id

The tc35815-mac platform device used a pci bus number and a devfn to
identify its target device, but the pci bus number may vary if some
bus-bridges are found.  Use irq number which is be unique for embedded
controllers.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Malta: Fix reading the PCI clock frequency on big-endian
Dmitri Vorobiev [Mon, 14 Jan 2008 21:27:46 +0000 (00:27 +0300)]
[MIPS] Malta: Fix reading the PCI clock frequency on big-endian

The JMPRS register on Malta boards keeps a 32-bit CPU-endian
value. The readw() function assumes that the value it reads is a
little-endian 16-bit number. Therefore, using readw() to obtain
the value of the JMPRS register is a mistake. This error leads
to incorrect reading of the PCI clock frequency on big-endian
during board start-up.

Change readw() to __raw_readl().

This was tested by injecting a call to printk() and verifying
that the value of the jmpr variable was consistent with current
setting of the JP4 "PCI CLK" jumper.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] SMTC: Fix build error.
Frank Rowand [Tue, 15 Jan 2008 22:26:44 +0000 (14:26 -0800)]
[MIPS] SMTC: Fix build error.

Fix compile warning (which becomes compile error due to -Werror).  Type of
argument "flags" for spin_lock_irqsave() was incorrect in some functions.

Signed-off-by: Frank Rowand <frank.rowand@am.sony.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoselinux: fix memory leak in netlabel code
Paul Moore [Mon, 21 Jan 2008 22:31:00 +0000 (09:31 +1100)]
selinux: fix memory leak in netlabel code

Fix a memory leak in security_netlbl_sid_to_secattr() as reported here:
 * https://bugzilla.redhat.com/show_bug.cgi?id=352281

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@namei.org>
16 years ago[POWERPC] mpc5200: merge defconfigs for all mpc5200 boards
Grant Likely [Mon, 21 Jan 2008 18:22:22 +0000 (11:22 -0700)]
[POWERPC] mpc5200: merge defconfigs for all mpc5200 boards

There is no reason to have separate defconfigs for each mpc5200 board.
Instead, here is a common defconfig that can be used for all supported
platforms.

Merging the defconfigs means there are fewer configuration to test when
compile testing all of arch/powerpc and should make support easier.

Supported boards:
Lite5200(b), Efika, TQM5200, CM5200, MotionPro

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
16 years ago[POWERPC] mpc5200: Cleanup checkpatch.pl problems in mpc52xx_uart.c
John Rigby [Wed, 16 Jan 2008 21:37:25 +0000 (08:37 +1100)]
[POWERPC] mpc5200: Cleanup checkpatch.pl problems in mpc52xx_uart.c

In preparation of adding MPC5121 support
cleanup some things that checkpatch.pl complains
about also some minor fixes suggested by
Stephen Rothwell.

Signed-off-by: John Rigby <jrigby@freescale.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
16 years ago[POWERPC] Separate MPC52xx PSC FIFO registers from rest of PSC
John Rigby [Wed, 16 Jan 2008 21:37:24 +0000 (08:37 +1100)]
[POWERPC] Separate MPC52xx PSC FIFO registers from rest of PSC

This is in preparation for the addition of MPC512x
PSC support.  The main difference in the 512x is
in the fifo registers.

Signed-off-by: John Rigby <jrigby@freescale.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
16 years ago[ICMP]: ICMP_MIB_OUTMSGS increment duplicated
Wang Chen [Mon, 21 Jan 2008 11:39:45 +0000 (03:39 -0800)]
[ICMP]: ICMP_MIB_OUTMSGS increment duplicated

Commit "96793b482540f3a26e2188eaf75cb56b7829d3e3" (Add ICMPMsgStats
MIB (RFC 4293)) made a mistake.

In that patch, David L added a icmp_out_count() in
ip_push_pending_frames(), remove icmp_out_count() from
icmp_reply(). But he forgot to remove icmp_out_count() from
icmp_send() too.  Since icmp_send and icmp_reply will call
icmp_push_reply, which will call ip_push_pending_frames, a duplicated
increment happened in icmp_send.

This patch remove the icmp_out_count from icmp_send too.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: RFC 2011 compatibility broken
Wang Chen [Mon, 21 Jan 2008 11:05:43 +0000 (03:05 -0800)]
[IPV6]: RFC 2011 compatibility broken

The snmp6 entry name was changed, and it broke compatibility
to RFC 2011.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: ICMP6_MIB_OUTMSGS increment duplicated
Wang Chen [Mon, 21 Jan 2008 11:04:47 +0000 (03:04 -0800)]
[IPV6]: ICMP6_MIB_OUTMSGS increment duplicated

icmpv6_send() calls ip6_push_pending_frames() indirectly.
Both ip6_push_pending_frames() and icmpv6_send() increment
counter ICMP6_MIB_OUTMSGS.

This patch remove the increment from icmpv6_send.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: rtnl_link: fix use-after-free
Patrick McHardy [Mon, 21 Jan 2008 01:25:14 +0000 (17:25 -0800)]
[NET]: rtnl_link: fix use-after-free

When unregistering the rtnl_link_ops, all existing devices using
the ops are destroyed. With nested devices this may lead to a
use-after-free despite the use of for_each_netdev_safe() in case
the upper device is next in the device list and is destroyed
by the NETDEV_UNREGISTER notifier.

The easy fix is to restart scanning the device list after removing
a device. Alternatively we could add new devices to the front of
the list to avoid having dependant devices follow the device they
depend on. A third option would be to only restart scanning if
dev->iflink of the next device matches dev->ifindex of the current
one. For now this seems like the safest solution.

With this patch, the veth rtnl_link_ops unregistration can use
rtnl_link_unregister() directly since it now also handles destruction
of multiple devices at once.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AF_KEY]: Fix skb leak on pfkey_send_migrate() error
Patrick McHardy [Mon, 21 Jan 2008 01:24:29 +0000 (17:24 -0800)]
[AF_KEY]: Fix skb leak on pfkey_send_migrate() error

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM] atm/suni.c: Fix section mismatch.
Adrian Bunk [Mon, 21 Jan 2008 01:23:12 +0000 (17:23 -0800)]
[ATM] atm/suni.c: Fix section mismatch.

EXPORT_SYMBOL'ed code mustn't be __*init.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM] atm/idt77105.c: Fix section mismatch.
Adrian Bunk [Mon, 21 Jan 2008 01:22:28 +0000 (17:22 -0800)]
[ATM] atm/idt77105.c: Fix section mismatch.

EXPORT_SYMBOL'ed code mustn't be __*init.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IrDA]: af_irda memory leak fixes
Jesper Juhl [Mon, 21 Jan 2008 00:58:04 +0000 (16:58 -0800)]
[IrDA]: af_irda memory leak fixes

Here goes an IrDA patch against your latest net-2.6 tree.

This patch fixes some af_irda memory leaks.  It also checks for
irias_new_obect() return value.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NEIGH]: Revert 'Fix race between neigh_parms_release and neightbl_fill_parms'
David S. Miller [Mon, 21 Jan 2008 00:39:03 +0000 (16:39 -0800)]
[NEIGH]: Revert 'Fix race between neigh_parms_release and neightbl_fill_parms'

Commit 9cd40029423701c376391da59d2c6469672b4bed (Fix race between
neigh_parms_release and neightbl_fill_parms) introduced device
reference counting regressions for several people, see:

http://bugzilla.kernel.org/show_bug.cgi?id=9778

for example.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: bridge-netfilter: fix net_device refcnt leaks
Patrick McHardy [Sun, 20 Jan 2008 14:25:48 +0000 (06:25 -0800)]
[NETFILTER]: bridge-netfilter: fix net_device refcnt leaks

When packets are flood-forwarded to multiple output devices, the
bridge-netfilter code reuses skb->nf_bridge for each clone to store
the bridge port. When queueing packets using NFQUEUE netfilter takes
a reference to skb->nf_bridge->physoutdev, which is overwritten
when the packet is forwarded to the second port. This causes
refcount unterflows for the first device and refcount leaks for all
others. Additionally this provides incorrect data to the iptables
physdev match.

Unshare skb->nf_bridge by copying it if it is shared before assigning
the physoutdev device.

Reported, tested and based on initial patch by
Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6] ROUTE: Make sending algorithm more friendly with RFC 4861.
YOSHIFUJI Hideaki [Sat, 19 Jan 2008 08:35:16 +0000 (00:35 -0800)]
[IPV6] ROUTE: Make sending algorithm more friendly with RFC 4861.

We omit (or delay) sending NSes for known-to-unreachable routers (in
NUD_FAILED state) according to RFC 4191 (Default Router Preferences
and More-Specific Routes).  But this is not fully compatible with RFC
4861 (Neighbor Discovery Protocol for IPv6), which does not remember
unreachability of neighbors.

So, let's avoid mixing sending algorithm of RFC 4191 and that of RFC
4861, and make the algorithm more friendly with RFC 4861 if RFC 4191
is disabled.

Issue was found by IPv6 Ready Logo Core Self_Test 1.5.0b2 (by TAHI
Project), and has been tracked down by Mitsuru Chinen
<mitch@linux.vnet.ibm.com>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4] FIB_HASH : Avoid unecessary loop in fn_hash_dump_zone()
Eric Dumazet [Fri, 18 Jan 2008 12:30:21 +0000 (04:30 -0800)]
[IPV4] FIB_HASH : Avoid unecessary loop in fn_hash_dump_zone()

I noticed "ip route list" was slower than "cat /proc/net/route" on a
machine with a full Internet routing table (214392 entries : Special
thanks to Robert ;) )

This is similar to problem reported in commit
d8c9283089287341c85a0a69de32c2287a990e71 ("[IPV4] ROUTE: ip_rt_dump()
is unecessary slow")

Fix is to avoid scanning the begining of fz_hash table, but directly
seek to the right offset.

Before patch :

time ip route >/tmp/ROUTE

real    0m1.285s
user    0m0.712s
sys     0m0.436s

After patch

# time ip route >/tmp/ROUTE

real    0m0.835s
user    0m0.692s
sys     0m0.124s

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Fix interrupt semaphore corruption in Intel drivers.
David S. Miller [Fri, 18 Jan 2008 12:21:39 +0000 (04:21 -0800)]
[NET]: Fix interrupt semaphore corruption in Intel drivers.

Several of the Intel ethernet drivers keep an atomic counter used to
manage when to actually hit the hardware with a disable or an enable.

The way the net_rx_work() breakout logic works during a pending
napi_disable() is that it simply unschedules the poll even if it
still has work.

This can potentially leave interrupts disabled, but that is OK
because all of the drivers are about to disable interrupts
anyways in all such code paths that do a napi_disable().

Unfortunately, this trips up the semaphore used here in the Intel
drivers.  If you hit this case, when you try to bring the interface
back up it won't enable interrupts.  A reload of the driver module
fixes it of course.

So what we do is make sure all the sequences now go:

napi_disable();
atomic_set(&adapter->irq_sem, 0);
*_irq_disable();

which makes sure the counter is always in the correct state.

Reported by Robert Olsson.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4] fib_trie: fix duplicated route issue
Joonwoo Park [Fri, 18 Jan 2008 11:45:18 +0000 (03:45 -0800)]
[IPV4] fib_trie: fix duplicated route issue

http://bugzilla.kernel.org/show_bug.cgi?id=9493

The fib allows making identical routes with 'ip route replace'.
This patch makes the fib return -EEXIST if replacement would cause duplication.

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4] fib_hash: fix duplicated route issue
Joonwoo Park [Fri, 18 Jan 2008 11:44:48 +0000 (03:44 -0800)]
[IPV4] fib_hash: fix duplicated route issue

http://bugzilla.kernel.org/show_bug.cgi?id=9493

The fib allows making identical routes with 'ip route replace'.
This patch makes the fib return -EEXIST if replacement would cause duplication.

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Mischecked tw match in __inet6_check_established.
Pavel Emelyanov [Fri, 18 Jan 2008 11:27:12 +0000 (03:27 -0800)]
[IPV6]: Mischecked tw match in __inet6_check_established.

When looking for a conflicting connection the !sk->sk_bound_dev_if
check is performed only for live sockets, but not for timewait-ed.

This is not the case for ipv4, for __inet6_lookup_established in
both ipv4 and ipv6 and for other places that check for tw-s.

Was this missed accidentally? If so, then this patch fixes it and
besides makes use if the dif variable declared in the function.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agorfkill: call rfkill_led_trigger_unregister() on error
Eric Paris [Sun, 13 Jan 2008 21:20:56 +0000 (16:20 -0500)]
rfkill: call rfkill_led_trigger_unregister() on error

Code inspection turned up that error cases in rfkill_register() do not
call rfkill_led_trigger_unregister() even though we have already
registered.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoMerge branch 'omap-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
Russell King [Sun, 20 Jan 2008 10:18:12 +0000 (10:18 +0000)]
Merge branch 'omap-fixes' of git://git./linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  ARM: OMAP1: Fix compile for board-nokia770
  ARM: OMAP1: Keymap fix for f-sample and p2-sample

16 years ago[ARM] 4748/1: dca: source drivers/dca/Kconfig in arch/arm/Kconfig to fix warning
Dan Williams [Fri, 18 Jan 2008 22:26:10 +0000 (23:26 +0100)]
[ARM] 4748/1: dca: source drivers/dca/Kconfig in arch/arm/Kconfig to fix warning

'select' used by config symbol 'INTEL_IOATDMA' refers to undefined symbol 'DCA'

Although drivers/dma is currently the only user future drivers outside of
drivers/dma may select this option so it is better to add this to
arch/arm/Kconfig than move DCA to drivers/dma/Kconfig.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] pxa: don't rely on r2 being preserved over a function call
Russell King [Fri, 11 Jan 2008 12:23:58 +0000 (12:23 +0000)]
[ARM] pxa: don't rely on r2 being preserved over a function call

r2 is not guaranteed to be preserved over a function call, so relying
on it to store the link register over the call to sleep_phys_sp() is
unreliable.  Store the link register on the stack instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agoRemove bogus duplicate CONFIG_LGUEST_GUEST entry.
Rusty Russell [Sun, 20 Jan 2008 00:54:18 +0000 (11:54 +1100)]
Remove bogus duplicate CONFIG_LGUEST_GUEST entry.

It was moved to arch/x86/lguest/Kconfig, but I lost the deletion part in a
patch suffle.  My confused one-liner "fix" to turn it on is also reverted:
84f7466ee20cc094aa38617abfa2f3834871f054

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>