Skip to content

Commit 2a171aa

Browse files
committed
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "16 patches This includes a new rtc driver for the Abracon AB x80x and isn't very appropriate for -rc2. It was still being fiddled with a bit during the merge window and I fell asleep during -rc1" [ So I took the new driver, it seems small and won't regress anything. I'm a softy. - Linus ] * emailed patches from Andrew Morton <akpm@linux-foundation.org>: rtc: armada38x: fix concurrency access in armada38x_rtc_set_time ocfs2: dlm: fix race between purge and get lock resource nilfs2: fix sanity check of btree level in nilfs_btree_root_broken() util_macros.h: have array pointer point to array of constants configfs: init configfs module earlier at boot time mm/hwpoison-inject: check PageLRU of hpage mm/hwpoison-inject: fix refcounting in no-injection case mm: soft-offline: fix num_poisoned_pages counting on concurrent events rtc: add rtc-abx80x, a driver for the Abracon AB x80x i2c rtc Documentation: bindings: add abracon,abx80x kasan: show gcc version requirements in Kconfig and Documentation mm/memory-failure: call shake_page() when error hits thp tail page lib: delete lib/find_last_bit.c MAINTAINERS: add co-maintainer for LED subsystem zram: add Designated Reviewer for zram in MAINTAINERS revert "zram: move compact_store() to sysfs functions area"
2 parents 3ce05a4 + 489405f commit 2a171aa

File tree

17 files changed

+429
-75
lines changed

17 files changed

+429
-75
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Abracon ABX80X I2C ultra low power RTC/Alarm chip
2+
3+
The Abracon ABX80X family consist of the ab0801, ab0803, ab0804, ab0805, ab1801,
4+
ab1803, ab1804 and ab1805. The ab0805 is the superset of ab080x and the ab1805
5+
is the superset of ab180x.
6+
7+
Required properties:
8+
9+
- "compatible": should one of:
10+
"abracon,abx80x"
11+
"abracon,ab0801"
12+
"abracon,ab0803"
13+
"abracon,ab0804"
14+
"abracon,ab0805"
15+
"abracon,ab1801"
16+
"abracon,ab1803"
17+
"abracon,ab1804"
18+
"abracon,ab1805"
19+
Using "abracon,abx80x" will enable chip autodetection.
20+
- "reg": I2C bus address of the device
21+
22+
Optional properties:
23+
24+
The abx804 and abx805 have a trickle charger that is able to charge the
25+
connected battery or supercap. Both the following properties have to be defined
26+
and valid to enable charging:
27+
28+
- "abracon,tc-diode": should be "standard" (0.6V) or "schottky" (0.3V)
29+
- "abracon,tc-resistor": should be <0>, <3>, <6> or <11>. 0 disables the output
30+
resistor, the other values are in ohm.

Documentation/kasan.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ a fast and comprehensive solution for finding use-after-free and out-of-bounds
99
bugs.
1010

1111
KASan uses compile-time instrumentation for checking every memory access,
12-
therefore you will need a certain version of GCC > 4.9.2
12+
therefore you will need a gcc version of 4.9.2 or later. KASan could detect out
13+
of bounds accesses to stack or global variables, but only if gcc 5.0 or later was
14+
used to built the kernel.
1315

1416
Currently KASan is supported only for x86_64 architecture and requires that the
1517
kernel be built with the SLUB allocator.
@@ -23,8 +25,8 @@ To enable KASAN configure kernel with:
2325

2426
and choose between CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE. Outline/inline
2527
is compiler instrumentation types. The former produces smaller binary the
26-
latter is 1.1 - 2 times faster. Inline instrumentation requires GCC 5.0 or
27-
latter.
28+
latter is 1.1 - 2 times faster. Inline instrumentation requires a gcc version
29+
of 5.0 or later.
2830

2931
Currently KASAN works only with the SLUB memory allocator.
3032
For better bug detection and nicer report, enable CONFIG_STACKTRACE and put

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5805,6 +5805,7 @@ F: drivers/scsi/53c700*
58055805
LED SUBSYSTEM
58065806
M: Bryan Wu <cooloney@gmail.com>
58075807
M: Richard Purdie <rpurdie@rpsys.net>
5808+
M: Jacek Anaszewski <j.anaszewski@samsung.com>
58085809
L: linux-leds@vger.kernel.org
58095810
T: git git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds.git
58105811
S: Maintained
@@ -11037,6 +11038,7 @@ F: drivers/media/pci/zoran/
1103711038
ZRAM COMPRESSED RAM BLOCK DEVICE DRVIER
1103811039
M: Minchan Kim <minchan@kernel.org>
1103911040
M: Nitin Gupta <ngupta@vflare.org>
11041+
R: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
1104011042
L: linux-kernel@vger.kernel.org
1104111043
S: Maintained
1104211044
F: drivers/block/zram/

drivers/block/zram/zram_drv.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,27 @@ static inline struct zram *dev_to_zram(struct device *dev)
7474
return (struct zram *)dev_to_disk(dev)->private_data;
7575
}
7676

77+
static ssize_t compact_store(struct device *dev,
78+
struct device_attribute *attr, const char *buf, size_t len)
79+
{
80+
unsigned long nr_migrated;
81+
struct zram *zram = dev_to_zram(dev);
82+
struct zram_meta *meta;
83+
84+
down_read(&zram->init_lock);
85+
if (!init_done(zram)) {
86+
up_read(&zram->init_lock);
87+
return -EINVAL;
88+
}
89+
90+
meta = zram->meta;
91+
nr_migrated = zs_compact(meta->mem_pool);
92+
atomic64_add(nr_migrated, &zram->stats.num_migrated);
93+
up_read(&zram->init_lock);
94+
95+
return len;
96+
}
97+
7798
static ssize_t disksize_show(struct device *dev,
7899
struct device_attribute *attr, char *buf)
79100
{
@@ -1038,6 +1059,7 @@ static const struct block_device_operations zram_devops = {
10381059
.owner = THIS_MODULE
10391060
};
10401061

1062+
static DEVICE_ATTR_WO(compact);
10411063
static DEVICE_ATTR_RW(disksize);
10421064
static DEVICE_ATTR_RO(initstate);
10431065
static DEVICE_ATTR_WO(reset);
@@ -1114,6 +1136,7 @@ static struct attribute *zram_disk_attrs[] = {
11141136
&dev_attr_num_writes.attr,
11151137
&dev_attr_failed_reads.attr,
11161138
&dev_attr_failed_writes.attr,
1139+
&dev_attr_compact.attr,
11171140
&dev_attr_invalid_io.attr,
11181141
&dev_attr_notify_free.attr,
11191142
&dev_attr_zero_pages.attr,

drivers/rtc/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,16 @@ config RTC_DRV_ABB5ZES3
164164
This driver can also be built as a module. If so, the module
165165
will be called rtc-ab-b5ze-s3.
166166

167+
config RTC_DRV_ABX80X
168+
tristate "Abracon ABx80x"
169+
help
170+
If you say yes here you get support for Abracon AB080X and AB180X
171+
families of ultra-low-power battery- and capacitor-backed real-time
172+
clock chips.
173+
174+
This driver can also be built as a module. If so, the module
175+
will be called rtc-abx80x.
176+
167177
config RTC_DRV_AS3722
168178
tristate "ams AS3722 RTC driver"
169179
depends on MFD_AS3722

drivers/rtc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ obj-$(CONFIG_RTC_DRV_88PM80X) += rtc-88pm80x.o
2525
obj-$(CONFIG_RTC_DRV_AB3100) += rtc-ab3100.o
2626
obj-$(CONFIG_RTC_DRV_AB8500) += rtc-ab8500.o
2727
obj-$(CONFIG_RTC_DRV_ABB5ZES3) += rtc-ab-b5ze-s3.o
28+
obj-$(CONFIG_RTC_DRV_ABX80X) += rtc-abx80x.o
2829
obj-$(CONFIG_RTC_DRV_ARMADA38X) += rtc-armada38x.o
2930
obj-$(CONFIG_RTC_DRV_AS3722) += rtc-as3722.o
3031
obj-$(CONFIG_RTC_DRV_AT32AP700X)+= rtc-at32ap700x.o

0 commit comments

Comments
 (0)