Arnd Bergmann [Thu, 19 Jul 2012 21:19:26 +0000 (23:19 +0200)]
Merge tag 'topic/fixed' of git://git./linux/kernel/git/broonie/regulator into late/board
regulator: Fixed voltage regulator registration APIs
Some new convenience APIs for registering fixed voltage regulators.
* tag 'topic/fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: extend the fixed dummy voltage regulator to accept voltage
regulator: support multiple dummy fixed regulators
Dependency for renesas/board branch.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Thu, 19 Jul 2012 21:17:12 +0000 (23:17 +0200)]
Merge branch 'soc' of git://git./linux/kernel/git/rafael/renesas into late/soc
updates for Renesas ARM-based SoCs for v3.6. Included are:
* Updates for the r8a7740, sh73a0 and sh7372 SoCs from Kuninori Morimoto.
* Low-level power management code reorganization from Kuninori Morimoto.
* Wakeup signaling rework for sh7372 and DT support bits for r8a7740 and
sh7377 from Magnus Damm.
* Assorted fixes.
This branch also includes fixes based on top of v3.5-rc3 that have
been already merged into arm-soc and mainline, which are not listed below.
* 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas: (43 commits)
ARM: shmobile: Fix build problem in pm-sh7372.c for unusual .config
ARM: shmobile: Take cpuidle dependencies into account correctly
ARM: mach-shmobile: sh7377 generic board support via DT
ARM: mach-shmobile: r8a7740 generic board support via DT
ARM: shmobile: sh7372: completely switch over to using pm-rmobile API
ARM: shmobile: ap4evb: switch to using pm-rmobile API
ARM: shmobile: mackerel: switch to using pm-rmobile API
ARM: shmobile: sh7372: add pm-rmobile domain support
ARM: shmobile: r8a7740: add A4LC pm domain support
ARM: shmobile: r8a7740: add A3SP pm domain support
ARM: shmobile: r8a7740: add A4S pm domain support
ARM: shmobile: r8a7740: fixup: MSEL1CR 7bit control
ARM: shmobile: soc-core: add R-mobile PM domain common APIs
ARM: shmobile: sh7372 A3SM CPUIdle support
ARM: shmobile: Use INTCA with sh7372 A3SM power domain
ARM: mach-shmobile: Convert sh_clk_mstp32_register to sh_clk_mstp_register
ARM: shmobile: use common DMAEngine definitions on sh7372
ARM: shmobile: use common DMAEngine definitions on sh73a0
ARM: shmobile: sh73a0: add DMAEngine support for MPDMAC
ARM: shmobile: sh73a0: add USB clock support
...
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Rafael J. Wysocki [Wed, 11 Jul 2012 21:02:37 +0000 (23:02 +0200)]
Merge branch 'renesas-sh7377' into renesas-soc
* renesas-sh7377:
ARM: mach-shmobile: sh7377 generic board support via DT
Rafael J. Wysocki [Wed, 11 Jul 2012 21:02:31 +0000 (23:02 +0200)]
Merge branch 'renesas-sh7372' into renesas-soc
* renesas-sh7372:
ARM: shmobile: Fix build problem in pm-sh7372.c for unusual .config
ARM: shmobile: Take cpuidle dependencies into account correctly
ARM: shmobile: sh7372: completely switch over to using pm-rmobile API
ARM: shmobile: ap4evb: switch to using pm-rmobile API
ARM: shmobile: mackerel: switch to using pm-rmobile API
ARM: shmobile: sh7372: add pm-rmobile domain support
ARM: shmobile: sh7372 A3SM CPUIdle support
ARM: shmobile: Use INTCA with sh7372 A3SM power domain
ARM: shmobile: use common DMAEngine definitions on sh7372
ARM: shmobile: sh7372: remove unused sh7372_a3sp_init() on !CONFIG_PM
Rafael J. Wysocki [Wed, 11 Jul 2012 21:02:18 +0000 (23:02 +0200)]
Merge branch 'renesas-sh73a0' into renesas-soc
* renesas-sh73a0:
ARM: shmobile: use common DMAEngine definitions on sh73a0
ARM: shmobile: sh73a0: add DMAEngine support for MPDMAC
ARM: shmobile: sh73a0: add USB clock support
Rafael J. Wysocki [Wed, 11 Jul 2012 21:02:05 +0000 (23:02 +0200)]
Merge branch 'renesas-r8a7740' into renesas-soc
* renesas-r8a7740:
ARM: mach-shmobile: r8a7740 generic board support via DT
ARM: shmobile: r8a7740: add A4LC pm domain support
ARM: shmobile: r8a7740: add A3SP pm domain support
ARM: shmobile: r8a7740: add A4S pm domain support
ARM: shmobile: r8a7740: fixup: MSEL1CR 7bit control
ARM: shmobile: use common DMAEngine definitions on r8a7740
ARM: shmobile: r8a7740: add DMAEngine support for USB
ARM: shmobile: r8a7740: add DMAEngine support for SDHI
ARM: shmobile: r8a7740: add DMAEngine support for FSI
Rafael J. Wysocki [Wed, 11 Jul 2012 21:01:33 +0000 (23:01 +0200)]
Merge branch 'renesas-soc-core' into renesas-soc
* renesas-soc-core:
ARM: shmobile: soc-core: add R-mobile PM domain common APIs
ARM: mach-shmobile: Convert sh_clk_mstp32_register to sh_clk_mstp_register
ARM: shmobile: add common DMAEngine definitions
ARM: shmobile: add common extra gpio functions
Conflicts:
arch/arm/mach-shmobile/clock-r8a7740.c
Rafael J. Wysocki [Wed, 11 Jul 2012 21:00:18 +0000 (23:00 +0200)]
Merge branch 'renesas-fixes' into renesas-soc
* renesas-fixes:
ARM: shmobile: r8a7779: Route all interrupts to ARM
ARM: shmobile: kzm9d: use late init machine hook
ARM: shmobile: kzm9g: use late init machine hook
ARM: mach-shmobile: armadillo800eva: Use late init machine hook
Rafael J. Wysocki [Wed, 11 Jul 2012 20:55:12 +0000 (22:55 +0200)]
ARM: shmobile: Fix build problem in pm-sh7372.c for unusual .config
If neither CONFIG_SUSPEND nor CONFIG_CPU_IDLE is set in the kernel
configuration file, build error occurs in
arch/arm/mach-shmobile/pm-sh7372.c.
Fix it by rearranging #ifdefs in that file to make the
definition of sh7372_suspend_init() depend only on
CONFIG_SUSPEND and the definition of sh7372_cpuidle_init()
depend only on CONFIG_CPU_IDLE.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Magnus Damm <damm@opensource.se>
Magnus Damm [Wed, 11 Jul 2012 20:54:05 +0000 (22:54 +0200)]
ARM: shmobile: Take cpuidle dependencies into account correctly
The sh7372's cpuidle code uses cpu_suspend() and cpu_resume() in
its implementation of the .enter() callback for deeper C-states, so
make ARCH_SH7372 select ARM_CPU_SUSPEND if CPU_IDLE is set to satisfy
all of the build dependencies (it has to be selected for CONFIG_PM
as well for the system suspend handling).
[rjw: Added the subject and changelog.]
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Magnus Damm [Fri, 6 Jul 2012 08:10:02 +0000 (17:10 +0900)]
ARM: mach-shmobile: sh7377 generic board support via DT
Add generic DT board support for the sh7377 SoC.
SCIF serial ports and timers are kept as regular
platform devices. Other on-chip and on-board devices
should be configured via the device tree.
At this point there is no interrupt controller support
in place but such code will be added over time when
proper IRQ domain support has been added to INTC.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Magnus Damm [Fri, 6 Jul 2012 08:08:07 +0000 (17:08 +0900)]
ARM: mach-shmobile: r8a7740 generic board support via DT
Add generic DT board support for the r8a7740 SoC.
SCIF serial ports and timers are kept as regular
platform devices. Other on-chip and on-board devices
should be configured via the device tree.
At this point there is no interrupt controller support
in place but such code will be added over time when
proper IRQ domain support has been added to INTC.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Thu, 5 Jul 2012 08:29:37 +0000 (01:29 -0700)]
ARM: shmobile: sh7372: completely switch over to using pm-rmobile API
Now, all sh7372 platforms are switched over to use pm-rmobile base PM domain,
and no one is using original sh7372_pm_domain APIs.
We can remove these, switching has been fully completed.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Thu, 5 Jul 2012 08:29:17 +0000 (01:29 -0700)]
ARM: shmobile: ap4evb: switch to using pm-rmobile API
This patch switches ap4evb platform to use pm-rmobile base common API.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Thu, 5 Jul 2012 08:28:54 +0000 (01:28 -0700)]
ARM: shmobile: mackerel: switch to using pm-rmobile API
This patch switches mackerel platform to use pm-rmobile base common API.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Thu, 5 Jul 2012 08:28:32 +0000 (01:28 -0700)]
ARM: shmobile: sh7372: add pm-rmobile domain support
This patch adds pm-rmobile common API base PM domain.
sh7372 CPU/platform will switch to using it from
original implementation
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Rafael J. Wysocki [Fri, 6 Jul 2012 18:43:44 +0000 (20:43 +0200)]
Merge branch 'renesas-soc-core' into renesas-sh7372
* renesas-soc-core:
ARM: shmobile: soc-core: add R-mobile PM domain common APIs
ARM: mach-shmobile: Convert sh_clk_mstp32_register to sh_clk_mstp_register
Kuninori Morimoto [Thu, 5 Jul 2012 08:26:53 +0000 (01:26 -0700)]
ARM: shmobile: r8a7740: add A4LC pm domain support
This patch adds basic A4LC pm domain support.
Now, below devices can be controled by PM
MERAM, LCDC, VOU, ICBS, SDENC-Link
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Thu, 5 Jul 2012 08:26:31 +0000 (01:26 -0700)]
ARM: shmobile: r8a7740: add A3SP pm domain support
This patch adds basic A3SP pm domain support.
Now, below devices can be controled by PM
DMAC1/2/3, IPMMU, DDM, FLCTL, SYS-HPB, BBIF1, MSIOF1/2,
SCIFA,SCIFB, IIC1, IrDA, USBH, USBDMAC, SDHI0/1/2, TPU,
DREQPAK (Sys), MMCIF, RSPI, SIM, USBF
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Thu, 5 Jul 2012 08:25:58 +0000 (01:25 -0700)]
ARM: shmobile: r8a7740: add A4S pm domain support
This patch adds basic A4S pm domain support.
Now, below devices can be controled by PM
Common-SHwy, Common-HPB, BSC, MFI, MMFROM, HS-SHwy,
SYS-HPB, INTCA, DBSC, DDRPHY (Logic),
ATAPI, GbEther, AXI-bus
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Thu, 5 Jul 2012 08:25:24 +0000 (01:25 -0700)]
ARM: shmobile: r8a7740: fixup: MSEL1CR 7bit control
MSEL1CR 7bit selects IRQ7 source pin which was
VBUS pin or A21/MSIOF0_RSYNC/MSIOF1_TSYNC pin.
But current pfc-r8a7740 MSEL1CR 7bit setting was wrong.
This patch fix it up
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Rafael J. Wysocki [Fri, 6 Jul 2012 18:39:54 +0000 (20:39 +0200)]
Merge branch 'renesas-soc-core' into renesas-r8a7740
* renesas-soc-core:
ARM: shmobile: soc-core: add R-mobile PM domain common APIs
ARM: mach-shmobile: Convert sh_clk_mstp32_register to sh_clk_mstp_register
Conflicts:
arch/arm/mach-shmobile/clock-r8a7740.c
Kuninori Morimoto [Thu, 5 Jul 2012 08:24:46 +0000 (01:24 -0700)]
ARM: shmobile: soc-core: add R-mobile PM domain common APIs
This patch adds Renesas R-mobile series common PM domain APIs.
R-mobile CPU can use/switch this API
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Magnus Damm [Thu, 5 Jul 2012 05:46:47 +0000 (14:46 +0900)]
ARM: shmobile: sh7372 A3SM CPUIdle support
Add CPUIdle support for the A3SM power domain on sh7372.
With this in place we can turn off more of the SoC during
run time and save power. Makes use of the recently introduced
sh7372 INTCA A3SM power domain wakeup support.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Magnus Damm [Thu, 5 Jul 2012 05:46:07 +0000 (14:46 +0900)]
ARM: shmobile: Use INTCA with sh7372 A3SM power domain
Convert the sh7372 A3SM power domain code to allow
waking up through INTCA and SYSC instead of only
relying on SYSC for wakeups. This allows us to
enter A3SM more or less regardless of the state
of the rest of the system.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Nobuhiro Iwamatsu [Wed, 27 Jun 2012 00:59:00 +0000 (09:59 +0900)]
ARM: mach-shmobile: Convert sh_clk_mstp32_register to sh_clk_mstp_register
sh_clk_mstp32_register is deprecated. This convert to sh_clk_mstp_register.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Mon, 25 Jun 2012 10:43:19 +0000 (03:43 -0700)]
ARM: shmobile: use common DMAEngine definitions on sh7372
This patch switch over to use common DMAEngine definitions,
and reduced a waste of code.
It is easy to understand if sh_dmae_pdata / sh_dmae_slave_config
settings are used defined value instead of direct value.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Rafael J. Wysocki [Sat, 30 Jun 2012 13:16:35 +0000 (15:16 +0200)]
Merge branch 'renesas-soc-core' into renesas-sh7372
* renesas-soc-core:
ARM: shmobile: add common DMAEngine definitions
ARM: shmobile: add common extra gpio functions
Kuninori Morimoto [Mon, 25 Jun 2012 10:43:28 +0000 (03:43 -0700)]
ARM: shmobile: use common DMAEngine definitions on sh73a0
This patch switch over to use common DMAEngine definitions,
and reduced a waste of code.
It is easy to understand if sh_dmae_pdata / sh_dmae_slave_config
settings are used defined value instead of direct value.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Mon, 25 Jun 2012 10:39:20 +0000 (03:39 -0700)]
ARM: shmobile: sh73a0: add DMAEngine support for MPDMAC
Current shdmac can support MPDMAC (= sound DMA) on sh73a0.
This support reduce CPU load when sound was playback.
On v2.0 manual, MPDMAC MID/RID number were wrong.
This patch is using the number which seems correct.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Mon, 25 Jun 2012 10:34:49 +0000 (03:34 -0700)]
ARM: shmobile: sh73a0: add USB clock support
It is required from renesas_usbhs driver.
This patch is based on v2.0 manual.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Rafael J. Wysocki [Sat, 30 Jun 2012 13:13:34 +0000 (15:13 +0200)]
Merge branch 'renesas-soc-core' into renesas-sh73a0
* renesas-soc-core:
ARM: shmobile: add common DMAEngine definitions
ARM: shmobile: add common extra gpio functions
Kuninori Morimoto [Mon, 25 Jun 2012 10:43:10 +0000 (03:43 -0700)]
ARM: shmobile: use common DMAEngine definitions on r8a7740
This patch switch over to use common DMAEngine definitions,
and reduced a waste of code.
It is easy to understand if sh_dmae_pdata / sh_dmae_slave_config
settings are used defined value instead of direct value.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Mon, 25 Jun 2012 10:37:10 +0000 (03:37 -0700)]
ARM: shmobile: r8a7740: add DMAEngine support for USB
Current shdmac can support USB DMAC on r8a7740.
This support reduce CPU duty when USB access.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Mon, 25 Jun 2012 10:37:00 +0000 (03:37 -0700)]
ARM: shmobile: r8a7740: add DMAEngine support for SDHI
Current shdmac can support SDHI DMAC on r8a7740.
This support reduce CPU duty when SDHI access.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Mon, 25 Jun 2012 10:36:49 +0000 (03:36 -0700)]
ARM: shmobile: r8a7740: add DMAEngine support for FSI
Current shdmac can support FSI DMAC on r8a7740.
This support reduce CPU duty when sound was playback.
This patch is based on v1.0 manual
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Rafael J. Wysocki [Sat, 30 Jun 2012 13:04:01 +0000 (15:04 +0200)]
Merge branch 'renesas-soc-core' into renesas-r8a7740
* renesas-soc-core:
ARM: shmobile: add common DMAEngine definitions
ARM: shmobile: add common extra gpio functions
Kuninori Morimoto [Mon, 25 Jun 2012 10:43:00 +0000 (03:43 -0700)]
ARM: shmobile: add common DMAEngine definitions
Current shmobile have DMAEngine specific settings on each CPU code,
but SH-ARM DMAC use same value.
This patch adds new dma-register.h header to share definitions
and reduce a waste of code on SH-ARM architecture.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Mon, 25 Jun 2012 10:41:09 +0000 (03:41 -0700)]
ARM: shmobile: add common extra gpio functions
Current gpio frame work doesn't have the method to control
just pull up/down/free, but some SH-ARM boards need such kind of operation.
This patch adds common extra gpio functions for SH-ARM.
But these functions should be replaced by correct
gpio function in the future.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Sun, 24 Jun 2012 20:00:13 +0000 (22:00 +0200)]
ARM: shmobile: sh7372: remove unused sh7372_a3sp_init() on !CONFIG_PM
767c0f3aed74be56f268709f5347e6c86d52b408
(PM / shmobile: Remove the stay_on flag from SH7372's PM domains)
commit removed sh7372_a3sp_init().
Now, there is no user for it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Phil Edworthy [Fri, 22 Jun 2012 23:12:09 +0000 (01:12 +0200)]
ARM: shmobile: r8a7779: Route all interrupts to ARM
Without this, the interrupts for I2C, VIN, GPIO, SDHC, HSCIF and
HPB-DMAC are sent to the SH processor.
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Thu, 21 Jun 2012 05:41:34 +0000 (22:41 -0700)]
ARM: shmobile: kzm9d: use late init machine hook
Since commit
21cc1b7ede3cf456cf1d51f8a906093261f7c111 ("ARM: shmobile:
use machine specific hook for late init") suspend and CPU idle are not
initialized automatically anymore. Set shmobile_init_late() as the
machine late init hook to initialize them.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Thu, 21 Jun 2012 05:40:08 +0000 (22:40 -0700)]
ARM: shmobile: kzm9g: use late init machine hook
Since commit
21cc1b7ede3cf456cf1d51f8a906093261f7c111 ("ARM: shmobile:
use machine specific hook for late init") suspend and CPU idle are not
initialized automatically anymore. Set shmobile_init_late() as the
machine late init hook to initialize them.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Laurent Pinchart [Wed, 20 Jun 2012 10:53:25 +0000 (12:53 +0200)]
ARM: mach-shmobile: armadillo800eva: Use late init machine hook
Since commit
21cc1b7ede3cf456cf1d51f8a906093261f7c111 ("ARM: shmobile:
use machine specific hook for late init") suspend and CPU idle are not
initialized automatically anymore. Set shmobile_init_late() as the
machine late init hook to initialize them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Rafael J. Wysocki [Wed, 20 Jun 2012 10:48:31 +0000 (12:48 +0200)]
Merge branch 'renesas-sh73a0' into renesas-soc
* renesas-sh73a0:
ARM: shmobile: sh73a0: add FSI clock
Kuninori Morimoto [Tue, 12 Jun 2012 09:43:40 +0000 (02:43 -0700)]
ARM: shmobile: sh73a0: add FSI clock
This patch is required from FSI sound driver
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Tue, 12 Jun 2012 09:37:16 +0000 (02:37 -0700)]
ARM: shmobile: r8a7740: add FSI-B (for HDMI) GPIO support
In order to enable FSI-B selection from platform board,
this patch adds its interface to GPIO framework.
This patch is based on v1.0 manual
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Tue, 12 Jun 2012 09:36:58 +0000 (02:36 -0700)]
ARM: shmobile: r8a7740: add FSI parent clock support
r8a7740 FSI can select its parent clock,
and its selection is dependent on platform board.
In order to enable FSI parent selection from platform board,
this patch adds its interface to clock framework.
This patch is based on v1.0 manual
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Tue, 12 Jun 2012 09:36:39 +0000 (02:36 -0700)]
ARM: shmobile: r8a7740: add CEU clock support
It is required from sh_mobile_ceu_camera driver.
This patch is based on v1.0 manual
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Tue, 12 Jun 2012 09:36:21 +0000 (02:36 -0700)]
ARM: shmobile: r8a7740: add MERAM work-around
r8a7740 chip has lasting errata on MERAM buffer, and this patch adds
its work-around on setup-r8a7740.c
It solved CEU/VIO6C/2D-DMAC/VCP1/VPU5F/JPU/DISP memroy access error.
But MERAM driver can't control this issue,
since this work-around requires access to non-MERAM register address.
So, This it will be called as board specific code at this point.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Tue, 12 Jun 2012 09:35:58 +0000 (02:35 -0700)]
ARM: shmobile: r8a7740: add HDMI GPIO support
In order to enable HDMI GPIO selection from platform board,
this patch adds its interface to GPIO framework.
This patch is based on v1.0 manual
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Tue, 12 Jun 2012 09:35:36 +0000 (02:35 -0700)]
ARM: shmobile: r8a7740: add HDMI clock support
It is required from sh_mobile_hdmi driver.
This patch is based on v1.0 manual
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Tue, 12 Jun 2012 09:35:15 +0000 (02:35 -0700)]
ARM: shmobile: r8a7740: add HDMI interrupt support
It is required from sh_mobile_hdmi driver.
This patch is based on v1.0 manual
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Guennadi Liakhovetski [Wed, 20 Jun 2012 10:15:59 +0000 (12:15 +0200)]
ARM: mach-shmobile: add missing GPIO IRQ configuration on mackerel
SDHI0 card-detect GPIO IRQ on mackarel currently works, because it is the
default configuration of IRQ26. However, we should not rely on this and
should configure the function explicitly.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Nobuhiro Iwamatsu [Wed, 20 Jun 2012 09:30:41 +0000 (11:30 +0200)]
ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled
Build failed, when SMP is enabled and EMEV2 is not enabled.
arch/arm/mach-shmobile/built-in.o: In function `shmobile_platform_cpu_kill':
/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:62: undefined reference to `emev2_platform_cpu_kill'
arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_get_core_count':
/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:39: undefined reference to `emev2_get_core_count'
arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_prepare_cpus':
/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:53: undefined reference to `emev2_smp_prepare_cpus'
arch/arm/mach-shmobile/built-in.o: In function `platform_secondary_init':
/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:78: undefined reference to `emev2_secondary_init'
arch/arm/mach-shmobile/built-in.o: In function `boot_secondary':
/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:90: undefined reference to `emev2_boot_secondary
This is the cause by when EMEV2 is disabled, that the check by OF of EMEV2 is
performed in platsmp.c.
This patch revise what the function about EMEV2 may not be used in this file,
when EMEV2 is not enabled.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Acked-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Wed, 20 Jun 2012 09:30:32 +0000 (11:30 +0200)]
ARM: shmobile: sh7372: bugfix: chclr_offset base
chclr_write() will use (chan_reg + chclr_offset).
In sh7372 case, DMA1CHCLR is started from 0xfe008220,
and chan_reg is started from 0xfe008020 (= sh7372_dmae0_resources).
Thus, chclr_offset should be (0x220 - 0x20) instead of 0x220.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Kuninori Morimoto [Wed, 20 Jun 2012 09:30:25 +0000 (11:30 +0200)]
ARM: shmobile: sh73a0: bugfix: SY-DMAC number
681e1b3eeb3606e06a7c4984e8058df84296f8bb
(ARM: mach-shmobile: sh73a0 DMA Engine support for SY-DMAC)
adds SY-DMAC, but it is 218, not 318
This patch is based on v2.0 manual
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Guennadi Liakhovetski [Tue, 19 Jun 2012 15:44:39 +0000 (17:44 +0200)]
regulator: extend the fixed dummy voltage regulator to accept voltage
Trivially extend the regulator_register_always_on() helper function to be
even more useful by adding a voltage parameter to it.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Guennadi Liakhovetski [Tue, 19 Jun 2012 15:43:56 +0000 (17:43 +0200)]
regulator: support multiple dummy fixed regulators
Currently regulator_register_fixed() uses a constant name to register a
fixed dummy regulator. This is sufficient in principle, since there is no
reason to register multiple such regulators. The user can simply supply all
consumers in one array and use it to initialise such a regulator. However,
in some cases it can be convenient to register multiple such regulators.
This is also a prerequisite for the upcoming patch, that will add a voltage
parameter to this function. The original function is provided as a wrapper
macro.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Linus Torvalds [Sun, 17 Jun 2012 00:25:17 +0000 (17:25 -0700)]
Linux 3.5-rc3
Linus Torvalds [Sun, 17 Jun 2012 00:01:41 +0000 (17:01 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs
Pull btrfs compile warning fixes from Chris Mason.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
Btrfs: cast devid to unsigned long long for printk %llu
Btrfs: init old_generation in get_old_root
Linus Torvalds [Sun, 17 Jun 2012 00:00:15 +0000 (17:00 -0700)]
Merge branch 'stable' of git://git./linux/kernel/git/cmetcalf/linux-tile
Pull arch/tile update from Chris Metcalf:
"This one-line bug fix unbreaks glibc robust mutexes (among other
things no doubt), from code merged in during the 3.5 merge window but
which we had been running internally at Tilera for almost a year."
* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
tile: fix bug in get_user() for 4-byte values
Linus Torvalds [Sat, 16 Jun 2012 23:59:05 +0000 (16:59 -0700)]
Merge tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6
Pull fbdev fixes from Florian Tobias Schandinat:
- two fixes for s3c-fb by Jingoo Han (including a fix for a potential
division by zero)
- a couple of randconfig fixes by Arnd Bergmann
- a cleanup for bfin_adv7393fb by Emil Goode
* tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6:
video: s3c-fb: fix possible division by zero in s3c_fb_calc_pixclk
video: s3c-fb: clear SHADOWCON register when clearing hardware window registers
drivers/tosa: driver needs I2C and SPI to compile
drivers/savagefb: use mdelay instead of udelay
video/console: automatically select a font
video/ili9320: do not mark exported functions __devexit
drivers/video: use correct __devexit_p annotation
video: bfin_adv7393fb: Convert to kstrtouint_from_user
Chris Metcalf [Sat, 16 Jun 2012 20:53:06 +0000 (16:53 -0400)]
tile: fix bug in get_user() for 4-byte values
The definition of 32-bit values in the 64-bit tilegx architecture is that
they should be sign-extended regardless of whether they are considered
signed or unsigned by the compiler. Accordingly, we need to use an
"ld4s" rather than "ld4u" to load and sign-extend for get_user().
This fixes glibc bug 14238 (see http://sourceware.org/bugzilla),
introduced during the 3.5 merge window.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Hugh Dickins [Sat, 16 Jun 2012 00:55:50 +0000 (17:55 -0700)]
swap: fix shmem swapping when more than 8 areas
Minchan Kim reports that when a system has many swap areas, and tmpfs
swaps out to the ninth or more, shmem_getpage_gfp()'s attempts to read
back the page cannot locate it, and the read fails with -ENOMEM.
Whoops. Yes, I blindly followed read_swap_header()'s pte_to_swp_entry(
swp_entry_to_pte()) technique for determining maximum usable swap
offset, without stopping to realize that that actually depends upon the
pte swap encoding shifting swap offset to the higher bits and truncating
it there. Whereas our radix_tree swap encoding leaves offset in the
lower bits: it's swap "type" (that is, index of swap area) that was
truncated.
Fix it by reducing the SWP_TYPE_SHIFT() in swapops.h, and removing the
broken radix_to_swp_entry(swp_to_radix_entry()) from read_swap_header().
This does not reduce the usable size of a swap area any further, it
leaves it as claimed when making the original commit: no change from 3.0
on x86_64, nor on i386 without PAE; but 3.0's 512GB is reduced to 128GB
per swapfile on i386 with PAE. It's not a change I would have risked
five years ago, but with x86_64 supported for ten years, I believe it's
appropriate now.
Hmm, and what if some architecture implements its swap pte with offset
encoded below type? That would equally break the maximum usable swap
offset check. Happily, they all follow the same tradition of encoding
offset above type, but I'll prepare a check on that for next.
Reported-and-Reviewed-and-Tested-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: stable@vger.kernel.org [3.1, 3.2, 3.3, 3.4]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 16 Jun 2012 00:39:32 +0000 (17:39 -0700)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"This is a couple of minor fixes, one for a preempt warning in the
mpt2sas driver and one is a config failure with the new sd async
domain."
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
[SCSI] Fix sd_probe_domain config problem
[SCSI] mpt2sas: Fix unsafe using smp_processor_id() in preemptible
Linus Torvalds [Sat, 16 Jun 2012 00:37:23 +0000 (17:37 -0700)]
Merge tag 'nfs-for-3.5-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfixes from Trond Myklebust:
"Highlights include:
- Fix a couple of mount regressions due to the recent cleanups.
- Fix an Oops in the open recovery code
- Fix an rpc_pipefs upcall hang that results from some of the net
namespace work from 3.4.x (stable kernel candidate).
- Fix a couple of write and o_direct regressions that were found at
last weeks Bakeathon testing event in Ann Arbor."
* tag 'nfs-for-3.5-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
NFS: add an endian notation for sparse
NFSv4.1: integer overflow in decode_cb_sequence_args()
rpc_pipefs: allow rpc_purge_list to take a NULL waitq pointer
NFSv4 do not send an empty SETATTR compound
NFSv2: EOF incorrectly set on short read
NFS: Use the NFS_DEFAULT_VERSION for v2 and v3 mounts
NFS: fix directio refcount bug on commit
NFSv4: Fix unnecessary delegation returns in nfs4_do_open
NFSv4.1: Convert another trivial printk into a dprintk
NFS4: Fix open bug when pnfs module blacklisted
NFS: Remove incorrect BUG_ON in nfs_found_client
NFS: Map minor mismatch error to protocol not support error.
NFS: Fix a commit bug
NFS4: Set parsed mount data version to 4
NFSv4.1: Ensure we clear session state flags after a session creation
NFSv4.1: Convert a trivial printk into a dprintk
NFSv4: Fix up decode_attr_mdsthreshold
NFSv4: Fix an Oops in the open recovery code
NFSv4.1: Fix a request leak on the back channel
Linus Torvalds [Sat, 16 Jun 2012 00:35:01 +0000 (17:35 -0700)]
Merge branch 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull DMA-mapping fixes from Marek Szyprowski:
"A set of minor fixes for dma-mapping code (ARM and x86) required for
Contiguous Memory Allocator (CMA) patches merged in v3.5-rc1."
* 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
x86: dma-mapping: fix broken allocation when dma_mask has been provided
ARM: dma-mapping: fix debug messages in dmabounce code
ARM: mm: fix type of the arm_dma_limit global variable
ARM: dma-mapping: Add missing static storage class specifier
Linus Torvalds [Sat, 16 Jun 2012 00:28:20 +0000 (17:28 -0700)]
Merge tag 'for-linus' of git://git./linux/kernel/git/paulus/powerpc
Pull PowerPC fix from Paul Mackerras:
"Just one commit, and a one-liner at that, but an important one;
without it hard_irq_disable() does nothing on powerpc."
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
Make hard_irq_disable() actually hard-disable interrupts
Linus Torvalds [Sat, 16 Jun 2012 00:27:31 +0000 (17:27 -0700)]
Merge branch 'for-3.5' of git://linux-nfs.org/~bfields/linux
Pull two nfsd bugfixes from J. Bruce Fields.
* 'for-3.5' of git://linux-nfs.org/~bfields/linux:
nfsd4: BUG_ON(!is_spin_locked()) no good on UP kernels
NFS: hard-code init_net for NFS callback transports
Linus Torvalds [Sat, 16 Jun 2012 00:17:15 +0000 (17:17 -0700)]
Merge tag 'stable/for-linus-3.5-rc2-tag' of git://git./linux/kernel/git/konrad/xen
Pull five Xen bug-fixes from Konrad Rzeszutek Wilk:
- When booting as PVHVM we would try to use PV console - but would not validate
the parameters causing us to crash during restore b/c we re-use the wrong event
channel.
- When booting on machines with SR-IOV PCI bridge we didn't check for the bridge
and tried to use it.
- Under AMD machines would advertise the APERFMPERF resulting in needless amount
of MSRs from the guest.
- A global value (xen_released_pages) was not subtracted at bootup when pages
were added back in. This resulted in the balloon worker having the wrong
account of how many pages were truly released.
- Fix dead-lock when xen-blkfront is run in the same domain as xen-blkback.
* tag 'stable/for-linus-3.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen: mark local pages as FOREIGN in the m2p_override
xen/setup: filter APERFMPERF cpuid feature out
xen/balloon: Subtract from xen_released_pages the count that is populated.
xen/pci: Check for PCI bridge before using it.
xen/events: Add WARN_ON when quick lookup found invalid type.
xen/hvc: Check HVM_PARAM_CONSOLE_[EVTCHN|PFN] for correctness.
xen/hvc: Fix error cases around HVM_PARAM_CONSOLE_PFN
xen/hvc: Collapse error logic.
Linus Torvalds [Sat, 16 Jun 2012 00:10:02 +0000 (17:10 -0700)]
Merge tag 'usb-3.5-rc3' of git://git./linux/kernel/git/gregkh/usb
Pull USB fixes from Greg Kroah-Hartman:
"Here are a bunch of tiny fixes for the USB core and drivers for
3.5-rc3
A bunch of gadget fixes, and new device ids, as well as some fixes for
a number of different regressions that have been reported recently.
We also fixed some PCI host controllers to resolve a long-standing bug
with a whole class of host controllers that have been plaguing people
for a number of kernel releases, preventing their systems from
suspending properly.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'usb-3.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (41 commits)
USB: fix gathering of interface associations
usb: ehci-sh: fix illegal phy_init() running when platform_data is NULL
usb: cdc-acm: fix devices not unthrottled on open
Fix OMAP EHCI suspend/resume failure (i693)
USB: ohci-hub: Mark ohci_finish_controller_resume() as __maybe_unused
usb: use usb_serial_put in usb_serial_probe errors
USB: EHCI: Fix build warning in xilinx ehci driver
USB: fix PS3 EHCI systems
xHCI: Increase the timeout for controller save/restore state operation
xhci: Don't free endpoints in xhci_mem_cleanup()
xhci: Fix invalid loop check in xhci_free_tt_info()
xhci: Fix error path return value.
USB: Checking the wrong variable in usb_disable_lpm()
usb-storage: Add 090c:1000 to unusal-devs
USB: serial-generic: use a single set of device IDs
USB: serial: Enforce USB driver and USB serial driver match
USB: add NO_D3_DURING_SLEEP flag and revert
151b61284776be2
USB: option: add more YUGA device ids
USB: mos7840: Fix compilation of usb serial driver
USB: option: fix memory leak
...
Linus Torvalds [Sat, 16 Jun 2012 00:07:48 +0000 (17:07 -0700)]
Merge git://git./linux/kernel/git/davem/ide
Pull IDE fixes from David S. Miller:
1) Two fixes to icside, one for a build failure and another for a
warning. From Christian Dietrich.
2) Fix a bit operation that did erroneous masking, from Julia Lawall.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
drivers/ide/ide-cs.c: adjust suspicious bit operation
ide: icside.c: fix printk format string compile warning
ide: icside.c: Fix compile with CONFIG_BLK_DEV_IDEDMA_ICS=n
Chris Mason [Sat, 16 Jun 2012 00:07:17 +0000 (20:07 -0400)]
Btrfs: cast devid to unsigned long long for printk %llu
Avoid warning in 32 bit machines
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Linus Torvalds [Sat, 16 Jun 2012 00:07:06 +0000 (17:07 -0700)]
Merge git://git./linux/kernel/git/davem/sparc
Pull sparc update from David S. Miller:
"This just removes some sparc headers that were never, ever, used."
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
sparc: remove two unused headers
Chris Mason [Sat, 16 Jun 2012 00:02:02 +0000 (20:02 -0400)]
Btrfs: init old_generation in get_old_root
gcc was giving an uninit variable warning here. Strictly
speaking we don't need to init it, but this will make things
much less error prone.
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Linus Torvalds [Fri, 15 Jun 2012 23:59:19 +0000 (16:59 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar.
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/smp: Fix topology checks on AMD MCM CPUs
x86/mm: Fix some kernel-doc warnings
x86, um: Correct syscall table type attributes breaking gcc 4.8
Linus Torvalds [Fri, 15 Jun 2012 23:58:10 +0000 (16:58 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar.
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
watchdog: Quiet down the boot messages
perf/x86: Fix broken LBR fixup code
tracing: Have tracing_off() actually turn tracing off
Linus Torvalds [Fri, 15 Jun 2012 23:52:35 +0000 (16:52 -0700)]
Merge branch 'core-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull core updates (RCU and locking) from Ingo Molnar:
"Most of the diffstat comes from the RCU slow boot regression fixes,
but there's also a debuggability improvements/fixes."
* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
memblock: Document memblock_is_region_{memory,reserved}()
rcu: Precompute RCU_FAST_NO_HZ timer offsets
rcu: Move RCU_FAST_NO_HZ per-CPU variables to rcu_dynticks structure
rcu: Update RCU_FAST_NO_HZ tracing for lazy callbacks
rcu: RCU_FAST_NO_HZ detection of callback adoption
spinlock: Indicate that a lockup is only suspected
kdump: Execute kmsg_dump(KMSG_DUMP_PANIC) after smp_send_stop()
panic: Make panic_on_oops configurable
Linus Torvalds [Fri, 15 Jun 2012 23:07:24 +0000 (16:07 -0700)]
Merge git://git./linux/kernel/git/nab/target-pending
Pull target updates from Nicholas Bellinger:
"This series contains post merge qla_target.c / tcm_qla2xxx bugfixes
from the past weeks, including the patch to allow target-core to use
an optional session shutdown callback to help address an active I/O
shutdown bug in tcm_qla2xxx code (Joern).
Also included is a target regression bugfix releated to explict ALUA
target port group CDB emulation that is CC'ed to stable (Roland)."
* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
qla2xxx: Remove version.h header file inclusion
tcm_qla2xxx: Handle malformed wwn strings properly
tcm_qla2xxx: tcm_qla2xxx_handle_tmr() can be static
qla2xxx: Don't leak commands we give up on in qlt_do_work()
qla2xxx: Don't crash if we can't find cmd for failed CTIO
tcm_qla2xxx: Don't insert nacls without sessions into the btree
target: Return error to initiator if SET TARGET PORT GROUPS emulation fails
tcm_qla2xxx: Clear session s_id + loop_id earlier during shutdown
tcm_qla2xxx: Convert to TFO->put_session() usage
target: Add TFO->put_session() caller for HW fabric session shutdown
Linus Torvalds [Fri, 15 Jun 2012 23:04:37 +0000 (16:04 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs
Pull btrfs update from Chris Mason:
"The dates look like I had to rebase this morning because there was a
compiler warning for a printk arg that I had missed earlier.
These are all fixes, including one to prevent using stale pointers for
device names, and lots of fixes around transaction abort cleanups
(Josef, Liu Bo).
Jan Schmidt also sent in a number of fixes for the new reference
number tracking code.
Liu Bo beat me to updating the MAINTAINERS file. Since he thought to
also fix the git url, I kept his commit."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (24 commits)
Btrfs: update MAINTAINERS info for BTRFS FILE SYSTEM
Btrfs: destroy the items of the delayed inodes in error handling routine
Btrfs: make sure that we've made everything in pinned tree clean
Btrfs: avoid memory leak of extent state in error handling routine
Btrfs: do not resize a seeding device
Btrfs: fix missing inherited flag in rename
Btrfs: fix incompat flags setting
Btrfs: fix defrag regression
Btrfs: call filemap_fdatawrite twice for compression
Btrfs: keep inode pinned when compressing writes
Btrfs: implement ->show_devname
Btrfs: use rcu to protect device->name
Btrfs: unlock everything properly in the error case for nocow
Btrfs: fix btrfs_destroy_marked_extents
Btrfs: abort the transaction if the commit fails
Btrfs: wake up transaction waiters when aborting a transaction
Btrfs: fix locking in btrfs_destroy_delayed_refs
Btrfs: pass locked_page into extent_clear_unlock_delalloc if theres an error
Btrfs: fix race in tree mod log addition
Btrfs: add btrfs_next_old_leaf
...
Liu Bo [Thu, 14 Jun 2012 08:23:25 +0000 (02:23 -0600)]
Btrfs: update MAINTAINERS info for BTRFS FILE SYSTEM
Update to the latest btrfs's maintainer mail and git repo.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Miao Xie [Thu, 14 Jun 2012 08:23:22 +0000 (02:23 -0600)]
Btrfs: destroy the items of the delayed inodes in error handling routine
the items of the delayed inodes were forgotten to be freed, this patch
fixes it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Liu Bo [Thu, 14 Jun 2012 08:23:21 +0000 (02:23 -0600)]
Btrfs: make sure that we've made everything in pinned tree clean
Since we have two trees for recording pinned extents, we need to go through
both of them to make sure that we've done everything clean.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Liu Bo [Thu, 14 Jun 2012 08:23:20 +0000 (02:23 -0600)]
Btrfs: avoid memory leak of extent state in error handling routine
We've forgotten to clear extent states in pinned tree, which will results in
space counter mismatch and memory leak:
WARNING: at fs/btrfs/extent-tree.c:7537 btrfs_free_block_groups+0x1f3/0x2e0 [btrfs]()
...
space_info 2 has
8380416 free, is not full
space_info total=
12582912, used=4096, pinned=4096, reserved=0, may_use=0, readonly=
4194304
btrfs state leak: start
29364224 end
29376511 state 1 in tree
ffff880075f20090 refs 1
...
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Liu Bo [Thu, 14 Jun 2012 08:23:19 +0000 (02:23 -0600)]
Btrfs: do not resize a seeding device
Seeding devices are not supposed to change any more.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Liu Bo [Thu, 14 Jun 2012 08:23:18 +0000 (02:23 -0600)]
Btrfs: fix missing inherited flag in rename
When we move a file into a directory with compression flag, we need to
inherite BTRFS_INODE_COMPRESS and clear BTRFS_INODE_NOCOMPRESS as well.
But if we move a file into a directory without compression flag, we need
to clear both of them.
It is the way how our setflags deals with compression flag, so keep
the same behaviour here.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Chris Mason [Fri, 15 Jun 2012 01:33:34 +0000 (21:33 -0400)]
Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into for-linus
Paul Mackerras [Fri, 15 Jun 2012 04:51:39 +0000 (14:51 +1000)]
Make hard_irq_disable() actually hard-disable interrupts
At present, hard_irq_disable() does nothing on powerpc because of
this code in include/linux/interrupt.h:
#ifndef hard_irq_disable
#define hard_irq_disable() do { } while(0)
#endif
So we need to make our hard_irq_disable be a macro. It was previously
a macro until commit
7230c56441 ("powerpc: Rework lazy-interrupt
handling") changed it to a static inline function.
Cc: stable@vger.kernel.org
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
--
arch/powerpc/include/asm/hw_irq.h | 3 +++
1 file changed, 3 insertions(+)
Li Zefan [Mon, 11 Jun 2012 09:10:51 +0000 (17:10 +0800)]
Btrfs: fix incompat flags setting
It's a bug, but it happens to work, as BTRFS_COMPRESS_LZO == 2, which
has only one bit set.
Signed-off-by: Li Zefan <lizefan@huawei.com>
Li Zefan [Mon, 11 Jun 2012 08:03:35 +0000 (16:03 +0800)]
Btrfs: fix defrag regression
If a file has 3 small extents:
| ext1 | ext2 | ext3 |
Running "btrfs fi defrag" will only defrag the last two extents, if those
extent mappings hasn't been read into memory from disk.
This bug was introduced by commit
17ce6ef8d731af5edac8c39e806db4c7e1f6956f
("Btrfs: add a check to decide if we should defrag the range")
The cause is, that commit looked into previous and next extents using
lookup_extent_mapping() only.
While at it, remove the code that checks the previous extent, since
it's sufficient to check the next extent.
Signed-off-by: Li Zefan <lizefan@huawei.com>
Josef Bacik [Fri, 8 Jun 2012 19:26:47 +0000 (15:26 -0400)]
Btrfs: call filemap_fdatawrite twice for compression
I removed this in an earlier commit and I was wrong. Because compression
can return from filemap_fdatawrite() without having actually set any of it's
pages as writeback() it can make filemap_fdatawait() do essentially nothing,
and then we won't find any ordered extents because they may not have been
created yet. So not only does this make fsync() completely useless, but it
will also screw up if you truncate on a non-page aligned offset since we
zero out the end and then wait on ordered extents and then call drop caches.
We can drop the cache before the io completes and then we try to unpin the
extent we just wrote we won't find it and everything goes sideways. So fix
this by putting it back and put a giant comment there to keep me from trying
to remove it in the future. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Josef Bacik [Fri, 8 Jun 2012 19:16:12 +0000 (15:16 -0400)]
Btrfs: keep inode pinned when compressing writes
A user reported lots of problems using compression on the new code and it
turns out part of the problem was that igrab() was failing when we added a
new ordered extent. This is because when writing out an inode under
compression we immediately return without actually doing anything to the
pages, and then in another thread at some point down the line actually do
the ordered dance. The problem is between the point that we start writeback
and we actually add the ordered extent we could be trying to reclaim the
inode, which makes igrab() return NULL. So we need to do an igrab() when we
create the async extent and then drop it when we are done with it. This
makes sure we stay pinned in memory until the ordered extent can get a
reference on it and we are good to go. With this patch we no longer panic
in btrfs_finish_ordered_io(). Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Josef Bacik [Tue, 5 Jun 2012 18:13:12 +0000 (14:13 -0400)]
Btrfs: implement ->show_devname
Because btrfs can remove the device that was mounted we need to have a
->show_devname so that in this case we can print out some other device in
the file system to /proc/mount. So if there are multiple devices in a btrfs
file system we will just print the device with the lowest devid that we can
find. This will make everything consistent and deal with device removal
properly. The drawback is if you mount with a device that is higher than
the lowest devicd it won't show up as the mounted device in /proc/mounts,
but this is a small price to pay. This was inspired by Miao Xie's patch.
Thanks,
Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <josef@redhat.com>
Josef Bacik [Mon, 4 Jun 2012 18:03:51 +0000 (14:03 -0400)]
Btrfs: use rcu to protect device->name
Al pointed out that we can just toss out the old name on a device and add a
new one arbitrarily, so anybody who uses device->name in printk could
possibly use free'd memory. Instead of adding locking around all of this he
suggested doing it with RCU, so I've introduced a struct rcu_string that
does just that and have gone through and protected all accesses to
device->name that aren't under the uuid_mutex with rcu_read_lock(). This
protects us and I will use it for dealing with removing the device that we
used to mount the file system in a later patch. Thanks,
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <josef@redhat.com>
Josef Bacik [Thu, 31 May 2012 19:58:55 +0000 (15:58 -0400)]
Btrfs: unlock everything properly in the error case for nocow
I was getting hung on umount when a transaction was aborted because a range
of one of the free space inodes was still locked. This is because the nocow
stuff doesn't unlock anything on error. This fixed the problem and I
verified that is what was happening. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Josef Bacik [Thu, 31 May 2012 19:54:30 +0000 (15:54 -0400)]
Btrfs: fix btrfs_destroy_marked_extents
So we're forcing the eb's to have their ref count set to 1 so invalidatepage
works but this breaks lots of things, for example root nodes, and is just
plain wrong, we don't need to just evict all of this stuff. Also drop the
invalidatepage altogether and add a page_cache_release(). With this patch
we no longer hang when trying to access the root nodes after an aborted
transaction and we no longer leak memory. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Josef Bacik [Thu, 31 May 2012 19:52:43 +0000 (15:52 -0400)]
Btrfs: abort the transaction if the commit fails
If a transaction commit fails we don't abort it so we don't set an error on
the file system. This patch fixes that by actually calling the abort stuff
and then adding a check for a fs error in the transaction start stuff to
make sure it is caught properly. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Josef Bacik [Thu, 31 May 2012 19:49:57 +0000 (15:49 -0400)]
Btrfs: wake up transaction waiters when aborting a transaction
I was getting lots of hung tasks and a NULL pointer dereference because we
are not cleaning up the transaction properly when it aborts. First we need
to reset the running_transaction to NULL so we don't get a bad dereference
for any start_transaction callers after this. Also we cannot rely on
waitqueue_active() since it's just a list_empty(), so just call wake_up()
directly since that will do the barrier for us and such. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Josef Bacik [Thu, 31 May 2012 15:06:33 +0000 (11:06 -0400)]
Btrfs: fix locking in btrfs_destroy_delayed_refs
The transaction abort stuff was throwing warnings from the list debugging
code because we do a list_del_init outside of the delayed_refs spin lock.
The delayed refs locking makes baby Jesus cry so it's not hard to get wrong,
but we need to take the ref head mutex to make sure it's not being processed
currently, and so if it is we need to drop the spin lock and then take and
drop the mutex and do the search again. If we can take the mutex then we
can safely remove the head from the list and carry on. Now when the
transaction aborts I don't get the list debugging warnings. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>