17 Apr, 2015
35 commits
-
sync_buffer() needs the mmap_sem for two distinct operations, both only
occurring upon user context switch handling:1) Dealing with the exe_file.
2) Adding the dcookie data as we need to lookup the vma that
backs it. This is done via add_sample() and add_data().This patch isolates 1), for it will no longer need the mmap_sem for
serialization. However, for now, make of the more standard
get_mm_exe_file(), requiring only holding the mmap_sem to read the value,
and relying on reference counting to make sure that the exe file won't
dissappear underneath us while doing the get dcookie.As a consequence, for 2) we move the mmap_sem locking into where we really
need it, in lookup_dcookie(). The benefits are twofold: reduce mmap_sem
hold times, and cleaner code.[akpm@linux-foundation.org: export get_mm_exe_file for arch/x86/oprofile/oprofile.ko]
Signed-off-by: Davidlohr Bueso
Cc: Robert Richter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Using the indenting we can see the curly braces were obviously intended.
This is a static checker fix, but my guess is that we don't read enough
bytes, because we don't calculate "t_len" correctly.Fixes: f1d82698029b ('memstick: use fully asynchronous request processing')
Signed-off-by: Dan Carpenter
Cc: Alex Dubov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This kthread is not loop at all due to break at the end of the loop. Make
that function linear, with no while loop.And remove an unnecessary cast.
Signed-off-by: Jiri Slaby
Cc: Anil Gurumurthy
Cc: James Bottomley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Neaten the logging a bit by adding #define pr_fmt
Miscellanea:
o Remove __FILE__/__func__ uses
o Coalesce formats adding missing spaces
o Align arguments
o (rtc-cmos) Integrated 2 consecutive messagesSigned-off-by: Joe Perches
Acked-by: Alexandre Belloni
Cc: Alessandro Zummo
Cc: Joshua Kinard
Cc: Chanwoo Choi
Reviewed-by: Krzysztof Kozlowski
Tested-by: Krzysztof Kozlowski
Cc: Aaro Koskinen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The hym8563 datasheet describes the clock output control-bit as "when set
to logic 0, the square wave output is enable, when set to logic 1, the
CLKOUT output is inhibited". But in reality the setting is exactly
opposite.Before now, the clock output was not really used, but on the rk3288 soc
this generated clock is used to supply the temperature sensor block and
the swapped bit value prevented it from working. With the corrected
value, the tsadc now reports correct values.Signed-off-by: Heiko Stuebner
Acked-by: Alexandre Belloni
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
s3c_rtc_gettime() already returns the result of rtc_valid_tm() on the
obtained time so get rid of another call to rtc_valid_tm().Signed-off-by: Krzysztof Kozlowski
Reviewed-by: Chanwoo Choi
Cc: Alexandre Belloni
Cc: Alessandro Zummo
Cc: Marek Szyprowski
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
module_platform_driver_probe() prevents driver from requesting probe
deferral. So using module_platform_drive() to support probe deferral.Signed-off-by: Lokesh Vutla
Acked-by: Alexandre Belloni
Cc: Alessandro Zummo
Cc: Paul Walmsley
Cc: Tero Kristo
Cc: Sekhar Nori
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
RTC is present in AM43xx and DRA7xx also. Updating the Kconfig to depend
on ARCH_OMAP or ARCH_DAVINCISigned-off-by: Lokesh Vutla
Acked-by: Alexandre Belloni
Cc: Alessandro Zummo
Cc: Paul Walmsley
Cc: Tero Kristo
Cc: Sekhar Nori
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
RTC module contains a kicker mechanism to prevent any spurious writes from
changing the register values. This mechanism requires two MMR writes to
the KICK0 and KICK1 registers with exact data values before the kicker
lock mechanism is released.Currently the driver release the lock in the probe and leaves it enabled
until the rtc driver removal. This eliminates the idea of preventing
spurious writes when RTC driver is loaded. So implement rtc lock and
unlock functions before and after register writes.This is as advised by Paul to implement lock and unlock functions in the
driver and not to unlock and leave it in probe. The same discussion can
be seen here:
http://www.mail-archive.com/linux-omap%40vger.kernel.org/msg111588.htmlSigned-off-by: Lokesh Vutla
Acked-by: Alexandre Belloni
Cc: Alessandro Zummo
Cc: Paul Walmsley
Cc: Tero Kristo
Cc: Sekhar Nori
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Initialize the device time (if it is wrong) before registering RTC device
to fix following error message during rtc-s3c probe:[ 2.215414] rtc (null): read_time: fail to read
[ 2.216322] s3c-rtc 10070000.rtc: rtc core: registered s3c as rtc1Signed-off-by: Krzysztof Kozlowski
Cc: Alessandro Zummo
Cc: Alexandre Belloni
Cc: Marek Szyprowski
Reviewed-by: Chanwoo Choi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use function name in the error log instead of __FILE__.
Signed-off-by: Aaro Koskinen
Cc: Alexandre Belloni
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
__rtc_read_time logs should be debug logs instead of error logs.
For example, when the RTC clock is not set, it's not really useful
to print a kernel error log every time someone tries to read the clock:~ # hwclock -r
[ 604.508263] rtc rtc0: read_time: fail to read
hwclock: RTC_RD_TIME: Invalid argumentIf there's a real error, it's likely that lower level or higher level
code will tell it anyway. Make these logs debug logs, and also print
the error code for the read failure.Signed-off-by: Aaro Koskinen
Acked-by: Alexandre Belloni
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In some error cases RTC name is used before it is initialized:
rtc-rs5c372 0-0032: clock needs to be set
rtc-rs5c372 0-0032: rs5c372b found, 24hr, driver version 0.6
rtc (null): read_time: fail to read
rtc-rs5c372 0-0032: rtc core: registered rtc-rs5c372 as rtc0Fix by initializing the name early.
Signed-off-by: Aaro Koskinen
Acked-by: Alexandre Belloni
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The S2MPS13 RTC is almost the same as S2MPS14. The differences when
updating alarm are:
1. Set WUDR+AUDR field instead of WUDR+RUDR.
2. Clear the AUDR field later (it is not auto-cleared).Signed-off-by: Krzysztof Kozlowski
Cc: Alexandre Belloni
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add driver for the RTC hardware block on the Conexant CX92755 SoC, from
the Digicolor series of SoCs. Tested on the Equinox evaluation board for
the CX92755 chip.[akpm@linux-foundation.org: build command arrays at compile-time]
Signed-off-by: Baruch Siach
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When the clock is disabled, do not return a rate of 0 but instead return
the rate the clock will be running at after it gets enabled. This
prevents problems when the core clock code is trying to determine a
suitable rate, while the clock is still off.Signed-off-by: Heiko Stuebner
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Adam Ward
Tested-by: Adam Ward
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Adam Ward
Tested-by: Adam Ward
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The RTC is in a different clock domain so a quick read after write
can retrieve a mangled value of the old/new valuesSigned-off-by: Adam Ward
Tested-by: Adam Ward
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix two minor sparse warnings:
CHECK drivers/rtc/rtc-ds1685.c
drivers/rtc/rtc-ds1685.c:2178:1: warning: function 'ds1685_rtc_poweroff' with external linkage has definition
drivers/rtc/rtc-ds1685.c:802:23: warning: Using plain integer as NULL pointerFixes: aaaf5fbf56f1 ("rtc: add driver for DS1685 family of real time clocks")
Signed-off-by: Joshua Kinard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The rtc driver core now sets the platform_driver 'owner' property, so
remove the assignment from the DS1685 driver.Fixes: aaaf5fbf56f1: "rtc: add driver for DS1685 family of real time clocks"
Signed-off-by: Joshua Kinard
Reported-by: kbuild test robot
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The regmap_config struct may be const because it is not modified by the
driver and regmap_init() accepts pointer to const.Signed-off-by: Krzysztof Kozlowski
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The current functions in s3c-rtc driver execute clk_enable/disable() to
control clocks and some functions execute s3c_rtc_alarm_clk_enable()
unnecessarily. So this patch deletes the duplicate clock control and
spilts s3c_rtc_alarm_clk_enable() out as
s3c_rtc_enable_clk()/s3c_rtc_disable_clk() to improve readability.Signed-off-by: Chanwoo Choi
Cc: Alessandro Zummo
Cc: Kukjin Kim
Cc: Inki Dae
Cc: Kyungmin Park
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When using device trees on the ARM platform, it is not certain at compile
time whether or not the system will have a RTC.If one enables CONFIG_HCTOSYS just in case the system booted has a RTC,
and it turns out not to be, this will result in a big fat "unable to open
rtc device" error being printed to console, even when "quiet" is set in
the kernel cmdline.Fix this by outputting the message with loglevel info instead.
Signed-off-by: Floris Bos
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Despite its name, sign_extend32() is safe to use for 8 bit types too.
(See https://lkml.org/lkml/2015/1/18/289).Signed-off-by: Martin Kepplinger
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Set the of_match_table for this driver so that devices can be described in
the device tree. This device is used in the Trimslice and is already
defined in the Trimslice device tree.Signed-off-by: Peter Robinson
Cc: Mike Rapoport
Cc: Alessandro Zummo
Cc: Grant Likely
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The rtc's status register allows to determine if a 32k crystal is
connected to keep the rtc running in low power states provided the
corresponding fuse bits were blown correctly during production. (In case
they were not, the right frequency can be stated in the device tree.) If
there is no such crystal available force the 24 MHz XTAL clock to keep
running to retain the right date and time. Otherwise use the crystal to
save some power.It would be nice to only switch to the crystal when the XTAL clock is
about to be disabled and keep the crystal off when unneeded because XTAL
is always on while the chip is powered on. But as sudden power loss isn't
detectable this is not save.Signed-off-by: Uwe Kleine-König
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This commit does not change any logic here. It just makes the code easier
to read.This is how it looked like:
If err != 0 return err;
else return 0;Signed-off-by: Robert Kmiec
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Now that the kernel provides DIV_ROUND_CLOSEST_ULL(), drop the internal
implementation and use the kernel one.Signed-off-by: Javi Merino
Cc: Mauro Carvalho Chehab
Acked-by: Antti Palosaari
Reviewed-by: Antti Palosaari
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Now that the kernel provides DIV_ROUND_CLOSEST_ULL(), drop the internal
implementation and use the kernel one.Signed-off-by: Javi Merino
Acked-by: Rafael J. Wysocki
Cc: Mel Gorman
Cc: Stephen Hemminger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Now that the kernel provides DIV_ROUND_CLOSEST_ULL(), drop the internal
implementation and use the kernel one.Signed-off-by: Javi Merino
Cc: Mike Turquette
Cc: Stephen Boyd
Acked-by: Alex Elder
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We have grown a number of different implementations of
DIV_ROUND_CLOSEST_ULL throughout the kernel. Move the i915 one to
kernel.h so that it can be reused.Signed-off-by: Javi Merino
Reviewed-by: Jeff Epler
Cc: Jani Nikula
Cc: David Airlie
Cc: Guenter Roeck
Acked-by: Daniel Vetter
Cc: "Rafael J. Wysocki"
Cc: Alex Elder
Cc: Antti Palosaari
Cc: Javi Merino
Cc: Mauro Carvalho Chehab
Cc: Mel Gorman
Cc: Mike Turquette
Cc: Stephen Boyd
Cc: Stephen Hemminger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Replace the loop iterating over pwm_freq_cksel0 with a call to
find_closest_descending().Signed-off-by: Bartosz Golaszewski
Cc: Guenter Roeck
Cc: Steven Rostedt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Replace RANGE_TO_REG() and FREQ_TO_REG() implementations with
calls to find_closest().Signed-off-by: Bartosz Golaszewski
Cc: Guenter Roeck
Cc: Steven Rostedt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use find_closest() to locate the closest average in ina226_avg_tab.
Signed-off-by: Bartosz Golaszewski
Cc: Guenter Roeck
Cc: Steven Rostedt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
16 Apr, 2015
5 commits
-
Merge second patchbomb from Andrew Morton:
- the rest of MM
- various misc bits
- add ability to run /sbin/reboot at reboot time
- printk/vsprintf changes
- fiddle with seq_printf() return value
* akpm: (114 commits)
parisc: remove use of seq_printf return value
lru_cache: remove use of seq_printf return value
tracing: remove use of seq_printf return value
cgroup: remove use of seq_printf return value
proc: remove use of seq_printf return value
s390: remove use of seq_printf return value
cris fasttimer: remove use of seq_printf return value
cris: remove use of seq_printf return value
openrisc: remove use of seq_printf return value
ARM: plat-pxa: remove use of seq_printf return value
nios2: cpuinfo: remove use of seq_printf return value
microblaze: mb: remove use of seq_printf return value
ipc: remove use of seq_printf return value
rtc: remove use of seq_printf return value
power: wakeup: remove use of seq_printf return value
x86: mtrr: if: remove use of seq_printf return value
linux/bitmap.h: improve BITMAP_{LAST,FIRST}_WORD_MASK
MAINTAINERS: CREDITS: remove Stefano Brivio from B43
.mailmap: add Ricardo Ribalda
CREDITS: add Ricardo Ribalda Delgado
... -
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to
seq_has_overflowed() and make public")Signed-off-by: Joe Perches
Cc: "James E.J. Bottomley"
Cc: Helge Deller
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to
seq_has_overflowed() and make public")Signed-off-by: Joe Perches
Acked-by: Sebastian Ott
Cc: Gerald Schaefer
Cc: Peter Oberparleiter
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Signed-off-by: Linus Torvalds -
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to
seq_has_overflowed() and make public")Signed-off-by: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to
seq_has_overflowed() and make public")Signed-off-by: Joe Perches
Cc: "Rafael J. Wysocki"
Cc: Pavel Machek
Cc: Len Brown
Cc: Greg Kroah-Hartman
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds