Skip to content

Commit 092f4c5

Browse files
committed
Merge branch 'akpm' (Andrew's incoming - part two)
Says Andrew: "60 patches. That's good enough for -rc1 I guess. I have quite a lot of detritus to be rechecked, work through maintainers, etc. - most of the remains of MM - rtc - various misc - cgroups - memcg - cpusets - procfs - ipc - rapidio - sysctl - pps - w1 - drivers/misc - aio" * akpm: (60 commits) memcg: replace ss->id_lock with a rwlock aio: allocate kiocbs in batches drivers/misc/vmw_balloon.c: fix typo in code comment drivers/misc/vmw_balloon.c: determine page allocation flag can_sleep outside loop w1: disable irqs in critical section drivers/w1/w1_int.c: multiple masters used same init_name drivers/power/ds2780_battery.c: fix deadlock upon insertion and removal drivers/power/ds2780_battery.c: add a nolock function to w1 interface drivers/power/ds2780_battery.c: create central point for calling w1 interface w1: ds2760 and ds2780, use ida for id and ida_simple_get() to get it pps gpio client: add missing dependency pps: new client driver using GPIO pps: default echo function include/linux/dma-mapping.h: add dma_zalloc_coherent() sysctl: make CONFIG_SYSCTL_SYSCALL default to n sysctl: add support for poll() RapidIO: documentation update drivers/net/rionet.c: fix ethernet address macros for LE platforms RapidIO: fix potential null deref in rio_setup_device() RapidIO: add mport driver for Tsi721 bridge ...
2 parents 80c2861 + c1e2ee2 commit 092f4c5

70 files changed

Lines changed: 4909 additions & 1035 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/DMA-API.txt‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ specify the GFP_ flags (see kmalloc) for the allocation (the
5050
implementation may choose to ignore flags that affect the location of
5151
the returned memory, like GFP_DMA).
5252

53+
void *
54+
dma_zalloc_coherent(struct device *dev, size_t size,
55+
dma_addr_t *dma_handle, gfp_t flag)
56+
57+
Wraps dma_alloc_coherent() and also zeroes the returned memory if the
58+
allocation attempt succeeded.
59+
5360
void
5461
dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
5562
dma_addr_t dma_handle)

‎Documentation/cgroups/memory.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ total_unevictable - sum of all children's "unevictable"
418418

419419
# The following additional stats are dependent on CONFIG_DEBUG_VM.
420420

421-
inactive_ratio - VM internal parameter. (see mm/page_alloc.c)
422421
recent_rotated_anon - VM internal parameter. (see mm/vmscan.c)
423422
recent_rotated_file - VM internal parameter. (see mm/vmscan.c)
424423
recent_scanned_anon - VM internal parameter. (see mm/vmscan.c)

‎Documentation/feature-removal-schedule.txt‎

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -133,41 +133,6 @@ Who: Pavel Machek <pavel@ucw.cz>
133133

134134
---------------------------
135135

136-
What: sys_sysctl
137-
When: September 2010
138-
Option: CONFIG_SYSCTL_SYSCALL
139-
Why: The same information is available in a more convenient from
140-
/proc/sys, and none of the sysctl variables appear to be
141-
important performance wise.
142-
143-
Binary sysctls are a long standing source of subtle kernel
144-
bugs and security issues.
145-
146-
When I looked several months ago all I could find after
147-
searching several distributions were 5 user space programs and
148-
glibc (which falls back to /proc/sys) using this syscall.
149-
150-
The man page for sysctl(2) documents it as unusable for user
151-
space programs.
152-
153-
sysctl(2) is not generally ABI compatible to a 32bit user
154-
space application on a 64bit and a 32bit kernel.
155-
156-
For the last several months the policy has been no new binary
157-
sysctls and no one has put forward an argument to use them.
158-
159-
Binary sysctls issues seem to keep happening appearing so
160-
properly deprecating them (with a warning to user space) and a
161-
2 year grace warning period will mean eventually we can kill
162-
them and end the pain.
163-
164-
In the mean time individual binary sysctls can be dealt with
165-
in a piecewise fashion.
166-
167-
Who: Eric Biederman <ebiederm@xmission.com>
168-
169-
---------------------------
170-
171136
What: /proc/<pid>/oom_adj
172137
When: August 2012
173138
Why: /proc/<pid>/oom_adj allows userspace to influence the oom killer's

‎Documentation/rapidio/rapidio.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ and the default device ID in order to access the device on the active port.
144144

145145
After the host has completed enumeration of the entire network it releases
146146
devices by clearing device ID locks (calls rio_clear_locks()). For each endpoint
147-
in the system, it sets the Master Enable bit in the Port General Control CSR
147+
in the system, it sets the Discovered bit in the Port General Control CSR
148148
to indicate that enumeration is completed and agents are allowed to execute
149149
passive discovery of the network.
150150

‎Documentation/rapidio/tsi721.txt‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
RapidIO subsystem mport driver for IDT Tsi721 PCI Express-to-SRIO bridge.
2+
=========================================================================
3+
4+
I. Overview
5+
6+
This driver implements all currently defined RapidIO mport callback functions.
7+
It supports maintenance read and write operations, inbound and outbound RapidIO
8+
doorbells, inbound maintenance port-writes and RapidIO messaging.
9+
10+
To generate SRIO maintenance transactions this driver uses one of Tsi721 DMA
11+
channels. This mechanism provides access to larger range of hop counts and
12+
destination IDs without need for changes in outbound window translation.
13+
14+
RapidIO messaging support uses dedicated messaging channels for each mailbox.
15+
For inbound messages this driver uses destination ID matching to forward messages
16+
into the corresponding message queue. Messaging callbacks are implemented to be
17+
fully compatible with RIONET driver (Ethernet over RapidIO messaging services).
18+
19+
II. Known problems
20+
21+
None.
22+
23+
III. To do
24+
25+
Add DMA data transfers (non-messaging).
26+
Add inbound region (SRIO-to-PCIe) mapping.
27+
28+
IV. Version History
29+
30+
1.0.0 - Initial driver release.
31+
32+
V. License
33+
-----------------------------------------------
34+
35+
Copyright(c) 2011 Integrated Device Technology, Inc. All rights reserved.
36+
37+
This program is free software; you can redistribute it and/or modify it
38+
under the terms of the GNU General Public License as published by the Free
39+
Software Foundation; either version 2 of the License, or (at your option)
40+
any later version.
41+
42+
This program is distributed in the hope that it will be useful, but WITHOUT
43+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
44+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
45+
more details.
46+
47+
You should have received a copy of the GNU General Public License along with
48+
this program; if not, write to the Free Software Foundation, Inc.,
49+
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

‎arch/powerpc/mm/gup.c‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@
1616

1717
#ifdef __HAVE_ARCH_PTE_SPECIAL
1818

19-
static inline void get_huge_page_tail(struct page *page)
20-
{
21-
/*
22-
* __split_huge_page_refcount() cannot run
23-
* from under us.
24-
*/
25-
VM_BUG_ON(atomic_read(&page->_count) < 0);
26-
atomic_inc(&page->_count);
27-
}
28-
2919
/*
3020
* The performance critical leaf functions are made noinline otherwise gcc
3121
* inlines everything into a single function which results in too much
@@ -57,8 +47,6 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr,
5747
put_page(page);
5848
return 0;
5949
}
60-
if (PageTail(page))
61-
get_huge_page_tail(page);
6250
pages[*nr] = page;
6351
(*nr)++;
6452

‎arch/powerpc/mm/hugetlbpage.c‎

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ static noinline int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long add
390390
{
391391
unsigned long mask;
392392
unsigned long pte_end;
393-
struct page *head, *page;
393+
struct page *head, *page, *tail;
394394
pte_t pte;
395395
int refs;
396396

@@ -413,6 +413,7 @@ static noinline int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long add
413413
head = pte_page(pte);
414414

415415
page = head + ((addr & (sz-1)) >> PAGE_SHIFT);
416+
tail = page;
416417
do {
417418
VM_BUG_ON(compound_head(page) != head);
418419
pages[*nr] = page;
@@ -428,10 +429,20 @@ static noinline int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long add
428429

429430
if (unlikely(pte_val(pte) != pte_val(*ptep))) {
430431
/* Could be optimized better */
431-
while (*nr) {
432-
put_page(page);
433-
(*nr)--;
434-
}
432+
*nr -= refs;
433+
while (refs--)
434+
put_page(head);
435+
return 0;
436+
}
437+
438+
/*
439+
* Any tail page need their mapcount reference taken before we
440+
* return.
441+
*/
442+
while (refs--) {
443+
if (PageTail(tail))
444+
get_huge_page_tail(tail);
445+
tail++;
435446
}
436447

437448
return 1;

‎arch/powerpc/sysdev/fsl_rio.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,7 @@ int fsl_rio_setup(struct platform_device *dev)
16081608
return 0;
16091609
err:
16101610
iounmap(priv->regs_win);
1611+
release_resource(&port->iores);
16111612
err_res:
16121613
kfree(priv);
16131614
err_priv:

‎arch/s390/mm/gup.c‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static inline int gup_huge_pmd(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
5252
unsigned long end, int write, struct page **pages, int *nr)
5353
{
5454
unsigned long mask, result;
55-
struct page *head, *page;
55+
struct page *head, *page, *tail;
5656
int refs;
5757

5858
result = write ? 0 : _SEGMENT_ENTRY_RO;
@@ -64,6 +64,7 @@ static inline int gup_huge_pmd(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
6464
refs = 0;
6565
head = pmd_page(pmd);
6666
page = head + ((addr & ~PMD_MASK) >> PAGE_SHIFT);
67+
tail = page;
6768
do {
6869
VM_BUG_ON(compound_head(page) != head);
6970
pages[*nr] = page;
@@ -81,6 +82,17 @@ static inline int gup_huge_pmd(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
8182
*nr -= refs;
8283
while (refs--)
8384
put_page(head);
85+
return 0;
86+
}
87+
88+
/*
89+
* Any tail page need their mapcount reference taken before we
90+
* return.
91+
*/
92+
while (refs--) {
93+
if (PageTail(tail))
94+
get_huge_page_tail(tail);
95+
tail++;
8496
}
8597

8698
return 1;

‎arch/sparc/mm/gup.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr,
5656
put_page(head);
5757
return 0;
5858
}
59+
if (head != page)
60+
get_huge_page_tail(page);
5961

6062
pages[*nr] = page;
6163
(*nr)++;

0 commit comments

Comments
 (0)