09 Jan, 2012
5 commits
-
Add PFC support for a 32-bit unlock register. Needed to
drive the r8a7779 PFC that comes with a funky PMMR register.Signed-off-by: Magnus Damm
Signed-off-by: Paul Mundt -
Add support for variable config reg hardware by adding
the macro PINMUX_CFG_REG_VAR(). The width of each bitfield
needs to be passed to the macro, and the correct space must
be consumed by each bitfield in the enum table following the
macro. Data registers still need to have fixed bitfields.Signed-off-by: Magnus Damm
Signed-off-by: Paul Mundt -
Add a helper function for shared config reg access
calculations. This allows us to reduce the amount
of duplicated code, and at the same time prepare
for a common place for future variable bitwidth
config reg support.Signed-off-by: Magnus Damm
Signed-off-by: Paul Mundt -
Update the way the PFC code is passing bitfield
selection between configure register functions.Convert the code from using index only to bitfield
number and selected value. First step towards future
variable bitfield width support.Signed-off-by: Magnus Damm
Signed-off-by: Paul Mundt -
Introduce gpio_read_bit() for data register read access
and modify sh_gpio_get_value() to make use of the new
function instead of gpio_read_reg(). The purpose of
this change is to update the code to only use the
gpio_read_reg() function for config register access.Signed-off-by: Magnus Damm
Signed-off-by: Paul Mundt
09 Dec, 2011
1 commit
-
Add support for non-entity mapped PFC registers through
the use of struct resource and ioremap()/iounmap().The PFC main data structure gets updated with a pointer
to a struct resources array that point out all register
windows used by the PFC instance. The register definitions
are kept as physical addresses but the PFC code will do
transparent conversion into virtual addresses whenever
register windows are specified using with struct resource.To introduce as little performance penalty as possible the
virtual address of each data register is cached in memory.
The virtual address of each configuration register is however
calculated during run time. This because the configuration
is considered slow path so focus is instead put on keeping
memory foot print as small as possible.The PFC register access code is in this patch updated from
__raw_readN() / __raw_writeN() into ioreadN() / iowriteN().This patch is needed to support the PFC block in r8a7779.
Signed-off-by: Magnus Damm
Signed-off-by: Paul Mundt
30 Nov, 2011
1 commit
-
* 'dev' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: fix racy use-after-free in ext4_end_io_dio()
29 Nov, 2011
12 commits
-
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: convert drivers/hwmon/* to use module_platform_driver()
hwmon: Remove redundant spi driver bus initialization -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
efivars: add missing parameter to efi_pstore_read() -
In the case where CONFIG_PSTORE=n, the function efi_pstore_read() doesn't
have the correct list of parameters. This patch provides a definition
of efi_pstore_read() with 'char **buf' added to fix this warning:
"drivers/firmware/efivars.c:609: warning: initialization from".problem introduced in commit f6f8285132907757ef84ef8dae0a1244b8cde6ac
Signed-off-by: Christoph Fritz
Signed-off-by: Tony Luck -
* 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cgroup_freezer: fix freezing groups with stopped tasks -
* 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
percpu: explain why per_cpu_ptr_to_phys() is more complicated than necessary
percpu: fix chunk range calculation
percpu: rename pcpu_mem_alloc to pcpu_mem_zalloc -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
pstore: pass allocated memory region back to caller -
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/exynos: fixed wrong err ptr usage and destroy call in exeception
drm/exynos: Add disable of manager
drm/exynos: include linux/module.h
drm/exynos: fix vblank bug.
drm/exynos: changed buffer structure.
drm/exynos: removed unnecessary variable.
drm/exynos: use gem create function generically
drm/exynos: checked for null pointer
drm/exynos: added crtc dpms for disable crtc
drm/exynos: removed meaningless parameter from fbdev update
drm/exynos: restored kernel_fb_list when reiniting fb_helper
drm/exynos: changed exynos_drm_display to exynos_drm_display_ops
drm/exynos: added manager object to connector
drm/exynos: fixed converting between display mode and timing
drm/exynos: fixed connector flag with hpd and interlace scan for hdmi
drm/exynos: added kms poll for handling hpd event -
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (28 commits)
ALSA: hda - Fix jack-detection control of VT1708
ALSA: hda - cut and paste typo in cs420x_models[]
ALSA: hda/realtek - Minor cleanup
ALSA: hda/realtek - Fix missing inits of item indices for auto-mic
ALSA: hda - Fix invalid pin and GPIO for Apple laptops with CS codecs
ALSA: hda - Check subdevice mask in snd_hda_check_board_codec_sid_config()
ALSA: hda - fail ELD reading early
ALSA: lx6464es - fix device communication via command bus
ALSA: lx6464es - command buffer API cleanup
ALSA: hda - repoll ELD content for multiple times
ALSA: hdspm - Fix PCI ID for PCIe RME MADI cards
ASoC: Ensure WM8731 register cache is synced when resuming from disabled
ALSA: cs5535 - Fix an endianness conversion
ASoC: cs4271: Fix wrong mask parameter in some snd_soc_update_bits calls
ASoC: wm_hubs: fix DB_RANGE size
ASoC: wm9090: fix DB_RANGE size
ASoC: wm8993: fix DB_RANGE size
ASoC: wm8962: fix DB_RANGE size
ASoC: sgtl5000: fix DB_RANGE size
ASoC: rt5631: fix DB_RANGE size
... -
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
hrtimer: Fix extra wakeups from __remove_hrtimer()
timekeeping: add arch_offset hook to ktime_get functions
clocksource: Avoid selecting mult values that might overflow when adjusted
time: Improve documentation of timekeeeping_adjust() -
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
genirq: Don't allow per cpu interrupts to be suspended -
Commit fa27271bc8d2("genirq: Fixup poll handling") introduced a
regression that broke irqfixup/irqpoll for some hardware configurations.Amidst reorganizing 'try_one_irq', that patch removed a test that
checked for 'action->handler' returning IRQ_HANDLED, before acting on
the interrupt. Restoring this test back returns the functionality lost
since 2.6.39. In the current set of tests, after 'action' is set, it
must precede '!action->next' to take effect.With this and my previous patch to irq/spurious.c, c75d720fca8a, all
IRQ regressions that I have encountered are fixed.Signed-off-by: Edward Donovan
Reported-and-tested-by: Rogério Brito
Cc: Thomas Gleixner
Cc: stable@kernel.org (2.6.39+)
Signed-off-by: Linus Torvalds
28 Nov, 2011
6 commits
-
* 'exynos-drm' of git://git.infradead.org/users/kmpark/linux-samsung:
drm/exynos: fixed wrong err ptr usage and destroy call in exeception
drm/exynos: Add disable of manager
drm/exynos: include linux/module.h
drm/exynos: fix vblank bug.
drm/exynos: changed buffer structure.
drm/exynos: removed unnecessary variable.
drm/exynos: use gem create function generically
drm/exynos: checked for null pointer
drm/exynos: added crtc dpms for disable crtc
drm/exynos: removed meaningless parameter from fbdev update
drm/exynos: restored kernel_fb_list when reiniting fb_helper
drm/exynos: changed exynos_drm_display to exynos_drm_display_ops
drm/exynos: added manager object to connector
drm/exynos: fixed converting between display mode and timing
drm/exynos: fixed connector flag with hpd and interlace scan for hdmi
drm/exynos: added kms poll for handling hpd event -
* 'fbdev-for-linus' of git://github.com/schandinat/linux-2.6:
viafb: correct sync polarity for OLPC DCON
video:da8xx-fb: Disable and reset sequence on version2 of LCDC
OMAPDSS: DISPC: skip scaling calculations when not scaling
OMAPFB: fix compilation warnings due to missing include
OMAPDSS: HDMI: fix returned HDMI pixel clock -
Revert a hunk in drivers/net/wireless/ath/ath9k/hw.c introduced by
commit 2577c6e8f232 ("ath9k_hw: Add support for AR946/8x chipsets") that
caused a nasty regression to appear on my Acer Ferrari One (the box
locks up entirely at random times after the wireless has been started
without any way to get debug information out of it).Signed-off-by: Rafael J. Wysocki
Acked-by: Felix Fietkau
Signed-off-by: Linus Torvalds -
VT1708 has no support for unsolicited events per jack-plug, the driver
implements the workq for polling the jack-detection. The mixer element
"Jack Detect" was supposed to control this behavior on/off, but this
doesn't work properly as is now. The workq is always started and the
HP automute is always enabled.This patch fixes the jack-detect control behavior by triggering / stopping
the work appropriately at the state change. Also the work checks the
internal state to continue scheduling or not.Cc: [v3.1]
Signed-off-by: Takashi Iwai -
The CS420X_IMAC27 was copied from the line before but CS420X_APPLE
was clearly intented.Signed-off-by: Dan Carpenter
Signed-off-by: Takashi Iwai
27 Nov, 2011
3 commits
-
Fix build failure in staging iio driver:
.../drivers/staging/iio/industrialio-core.c: In function 'iio_event_getfd':
.../drivers/staging/iio/industrialio-core.c:262:32: error:
'ev_int' undeclared (first use in this function)Also convert the rest of the function to use the new variable.
Signed-off-by: Andy Whitcroft
Signed-off-by: Linus Torvalds -
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/44x: Add mtd ndfc to the ppx44x defconfig
powerpc: Fix compiliation with hugetlbfs enabled
arch/powerpc/sysdev/ehv_pic.c: add missing kfree
powerpc/fsl-lbc: Fix for fsl_upm
drivers/edac/mpc85xx_edac.c: fix memory controller compatible for edac
powerpc/qe: Fixup QE_General4 errata
powerpc/85xx: Fix compile error on p3060_qds.c
powerpc/p3060qds: Fix select of 'MPC8xxx_GPIO'
powerpc/p1023: set IRQ[4:6,11] to active-high level sensitive for PCIe -
This patch converts the drivers in drivers/hwmon/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.Cc: Donggeun Kim
Cc: Simon Guinot
Cc: Lars-Peter Clausen
Cc: MyungJoo Ham
Cc: Ben Dooks
Cc: Hans de Goede
Cc: J Keerthy
Cc: David S. Miller
Cc: Mark Brown
Signed-off-by: Axel Lin
Acked-by: Mark Brown
Signed-off-by: Guenter Roeck
26 Nov, 2011
2 commits
-
* git://github.com/herbertx/crypto:
crypto: mv_cesa - fix hashing of chunks > 1920 bytes -
* 'gpio-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
gpio: pca953x: Staticise pca953x_get_altdata()
25 Nov, 2011
5 commits
-
In ancient times it was necessary to manually initialize the bus field of an
spi_driver to spi_bus_type. These days this is done in spi_register_driver(),
so we can drop the manual assignment.The patch was generated using the following coccinelle semantic patch:
//
@@
identifier _driver;
@@
struct spi_driver _driver = {
.driver = {
- .bus = &spi_bus_type,
},
};
//Signed-off-by: Lars-Peter Clausen
Cc: Jean Delvare
Cc: Guenter Roeck
Cc: lm-sensors@lm-sensors.org
Signed-off-by: Guenter Roeck -
ext4_end_io_dio() queues io_end->work and then clears iocb->private;
however, io_end->work calls aio_complete() which frees the iocb
object. If that slab object gets reallocated, then ext4_end_io_dio()
can end up clearing someone else's iocb->private, this use-after-free
can cause a leak of a struct ext4_io_end_t structure.Detected and tested with slab poisoning.
[ Note: Can also reproduce using 12 fio's against 12 file systems with the
following configuration file:[global]
direct=1
ioengine=libaio
iodepth=1
bs=4k
ba=4k
size=128m[create]
filename=${TESTDIR}
rw=write-- tytso ]
Google-Bug-Id: 5354697
Signed-off-by: Tejun Heo
Signed-off-by: "Theodore Ts'o"
Reported-by: Kent Overstreet
Tested-by: Kent Overstreet
Cc: stable@kernel.org -
Signed-off-by: Tony Breeds
Acked-by: Josh Boyer
Signed-off-by: Benjamin Herrenschmidt -
arch/powerpc/mm/hugetlbpage.c: In function 'reserve_hugetlb_gpages':
arch/powerpc/mm/hugetlbpage.c:312:2: error: implicit declaration of function 'parse_args'Signed-off-by: Kumar Gala
Signed-off-by: Benjamin Herrenschmidt -
2d3cbf8b (cgroup_freezer: update_freezer_state() does incorrect state
transitions) removed is_task_frozen_enough and replaced it with a simple
frozen call. This, however, breaks freezing for a group with stopped tasks
because those cannot be frozen and so the group remains in CGROUP_FREEZING
state (update_if_frozen doesn't count stopped tasks) and never reaches
CGROUP_FROZEN.Let's add is_task_frozen_enough back and use it at the original locations
(update_if_frozen and try_to_freeze_cgroup). Semantically we consider
stopped tasks as frozen enough so we should consider both cases when
testing frozen tasks.Testcase:
mkdir /dev/freezer
mount -t cgroup -o freezer none /dev/freezer
mkdir /dev/freezer/foo
sleep 1h &
pid=$!
kill -STOP $pid
echo $pid > /dev/freezer/foo/tasks
echo FROZEN > /dev/freezer/foo/freezer.state
while true
do
cat /dev/freezer/foo/freezer.state
[ "`cat /dev/freezer/foo/freezer.state`" = "FROZEN" ] && break
sleep 1
done
echo OKSigned-off-by: Michal Hocko
Acked-by: Li Zefan
Cc: Tomasz Buchert
Cc: Paul Menage
Cc: Andrew Morton
Cc: stable@kernel.org
Signed-off-by: Tejun Heo
24 Nov, 2011
5 commits
-
At this point, ehv_pic has been allocated but not stored anywhere, so it
should be freed before leaving the function.A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@exists@
local idexpression x;
statement S,S1;
expression E;
identifier fl;
expression *ptr != NULL;
@@x = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
}
when any
when != true x == NULL
x->fl
...>
(
if (x == NULL) S1
|
if (...) { ... when != x
when forall
(
return \(0\|\|ptr\);
|
* return ...;
)
}
)
//Signed-off-by: Julia Lawall
Acked-by: Timur Tabi
Signed-off-by: Kumar Gala -
If Freescale LBC driver fails to initialise itself from device tree, then
internal structure is freed only but not NULL-fied. As result functions
fsl_lbc_find() after checking the structure is not NULL are trying to
access device registers.Signed-off-by: Alexandre Rusev
Signed-off-by: Kumar Gala -
compatible in dts has been changed, so the driver needs to be updated
accordingly.Signed-off-by: Shaohui Xie
Cc: Grant Likely
Cc: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Kumar Gala -
QE_General4 should only round up the divisor iff divisor is > 3.
Rounding up lower divisors makes the error too big, causing USB
on MPC832x to fail.Signed-off-by: Joakim Tjernlund
Acked-by: Timur Tabi
Signed-off-by: Kumar Gala -
arch/powerpc/platforms/85xx/p3060_qds.c: In function '__machine_initcall_p3060_qds_declare_of_platform_devices':
arch/powerpc/platforms/85xx/p3060_qds.c:73:1: error: implicit declaration of function 'declare_of_platform_devices'declare_of_platform_devices should have been corenet_ds_publish_devices.
Signed-off-by: Kumar Gala