aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-18 19:59:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-18 19:59:52 -0400
commit60fbf2bda140f27b0e9ab5b6d17342c9a5f9eacf (patch)
tree5ab62db9c538de54d8176439b0adebfff2758d31
parent8cb652bb10e788270b6b8b6df20fba62b479feb2 (diff)
parent94f8cc0eea03648e5cc5de1a4e7dc464de92cc74 (diff)
Merge tag 'driver-core-3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core fixes from Greg KH: "Here are some driver core fixes for 3.15-rc2. Also in here are some documentation updates, as well as an API removal that had to wait for after -rc1 due to the cleanups coming into you from multiple developer trees (this one and the PPC tree.) All have been in linux next successfully" * tag 'driver-core-3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: drivers/base/dd.c incorrect pr_debug() parameters Documentation: Update stable address in Chinese and Japanese translations topology: Fix compilation warning when not in SMP Chinese: add translation of io_ordering.txt stable_kernel_rules: spelling/word usage sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner() kernfs: protect lazy kernfs_iattrs allocation with mutex fs: Don't return 0 from get_anon_bdev
-rw-r--r--Documentation/ja_JP/HOWTO2
-rw-r--r--Documentation/ja_JP/stable_kernel_rules.txt6
-rw-r--r--Documentation/stable_kernel_rules.txt2
-rw-r--r--Documentation/zh_CN/HOWTO2
-rw-r--r--Documentation/zh_CN/io_ordering.txt67
-rw-r--r--Documentation/zh_CN/stable_kernel_rules.txt2
-rw-r--r--drivers/base/core.c33
-rw-r--r--drivers/base/dd.c4
-rw-r--r--drivers/base/topology.c3
-rw-r--r--fs/kernfs/inode.c14
-rw-r--r--fs/super.c5
-rw-r--r--fs/sysfs/file.c92
-rw-r--r--include/linux/device.h11
-rw-r--r--include/linux/sysfs.h9
14 files changed, 92 insertions, 160 deletions
diff --git a/Documentation/ja_JP/HOWTO b/Documentation/ja_JP/HOWTO
index 0091a8215ac1..b61885c35ce1 100644
--- a/Documentation/ja_JP/HOWTO
+++ b/Documentation/ja_JP/HOWTO
@@ -315,7 +315,7 @@ Andrew Morton が Linux-kernel メーリングリストにカーネルリリー
315もし、3.x.y カーネルが存在しない場合には、番号が一番大きい 3.x が 315もし、3.x.y カーネルが存在しない場合には、番号が一番大きい 3.x が
316最新の安定版カーネルです。 316最新の安定版カーネルです。
317 317
3183.x.y は "stable" チーム <stable@kernel.org> でメンテされており、必 3183.x.y は "stable" チーム <stable@vger.kernel.org> でメンテされており、必
319要に応じてリリースされます。通常のリリース期間は 2週間毎ですが、差し迫っ 319要に応じてリリースされます。通常のリリース期間は 2週間毎ですが、差し迫っ
320た問題がなければもう少し長くなることもあります。セキュリティ関連の問題 320た問題がなければもう少し長くなることもあります。セキュリティ関連の問題
321の場合はこれに対してだいたいの場合、すぐにリリースがされます。 321の場合はこれに対してだいたいの場合、すぐにリリースがされます。
diff --git a/Documentation/ja_JP/stable_kernel_rules.txt b/Documentation/ja_JP/stable_kernel_rules.txt
index 14265837c4ce..9dbda9b5d21e 100644
--- a/Documentation/ja_JP/stable_kernel_rules.txt
+++ b/Documentation/ja_JP/stable_kernel_rules.txt
@@ -50,16 +50,16 @@ linux-2.6.29/Documentation/stable_kernel_rules.txt
50 50
51-stable ツリーにパッチを送付する手続き- 51-stable ツリーにパッチを送付する手続き-
52 52
53 - 上記の規則に従っているかを確認した後に、stable@kernel.org にパッチ 53 - 上記の規則に従っているかを確認した後に、stable@vger.kernel.org にパッチ
54 を送る。 54 を送る。
55 - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合 55 - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合
56 には NAK を受け取る。この反応は開発者たちのスケジュールによって、数 56 には NAK を受け取る。この反応は開発者たちのスケジュールによって、数
57 日かかる場合がある。 57 日かかる場合がある。
58 - もし受け取られたら、パッチは他の開発者たちと関連するサブシステムの 58 - もし受け取られたら、パッチは他の開発者たちと関連するサブシステムの
59 メンテナーによるレビューのために -stable キューに追加される。 59 メンテナーによるレビューのために -stable キューに追加される。
60 - パッチに stable@kernel.org のアドレスが付加されているときには、それ 60 - パッチに stable@vger.kernel.org のアドレスが付加されているときには、それ
61 が Linus のツリーに入る時に自動的に stable チームに email される。 61 が Linus のツリーに入る時に自動的に stable チームに email される。
62 - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ 62 - セキュリティパッチはこのエイリアス (stable@vger.kernel.org) に送られるべ
63 きではなく、代わりに security@kernel.org のアドレスに送られる。 63 きではなく、代わりに security@kernel.org のアドレスに送られる。
64 64
65レビューサイクル- 65レビューサイクル-
diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt
index b0714d8f678a..cbc2f03056bd 100644
--- a/Documentation/stable_kernel_rules.txt
+++ b/Documentation/stable_kernel_rules.txt
@@ -39,7 +39,7 @@ Procedure for submitting patches to the -stable tree:
39 the stable tree without anything else needing to be done by the author 39 the stable tree without anything else needing to be done by the author
40 or subsystem maintainer. 40 or subsystem maintainer.
41 - If the patch requires other patches as prerequisites which can be 41 - If the patch requires other patches as prerequisites which can be
42 cherry-picked than this can be specified in the following format in 42 cherry-picked, then this can be specified in the following format in
43 the sign-off area: 43 the sign-off area:
44 44
45 Cc: <stable@vger.kernel.org> # 3.3.x: a1f84a3: sched: Check for idle 45 Cc: <stable@vger.kernel.org> # 3.3.x: a1f84a3: sched: Check for idle
diff --git a/Documentation/zh_CN/HOWTO b/Documentation/zh_CN/HOWTO
index 6c914aa87e71..54ea24ff63c7 100644
--- a/Documentation/zh_CN/HOWTO
+++ b/Documentation/zh_CN/HOWTO
@@ -237,7 +237,7 @@ kernel.org网站的pub/linux/kernel/v2.6/目录下找到它。它的开发遵循
237如果没有2.6.x.y版本内核存在,那么最新的2.6.x版本内核就相当于是当前的稳定 237如果没有2.6.x.y版本内核存在,那么最新的2.6.x版本内核就相当于是当前的稳定
238版内核。 238版内核。
239 239
2402.6.x.y版本由“稳定版”小组(邮件地址<stable@kernel.org>)维护,一般隔周发 2402.6.x.y版本由“稳定版”小组(邮件地址<stable@vger.kernel.org>)维护,一般隔周发
241布新版本。 241布新版本。
242 242
243内核源码中的Documentation/stable_kernel_rules.txt文件具体描述了可被稳定 243内核源码中的Documentation/stable_kernel_rules.txt文件具体描述了可被稳定
diff --git a/Documentation/zh_CN/io_ordering.txt b/Documentation/zh_CN/io_ordering.txt
new file mode 100644
index 000000000000..e592daf4e014
--- /dev/null
+++ b/Documentation/zh_CN/io_ordering.txt
@@ -0,0 +1,67 @@
1Chinese translated version of Documentation/io_orderings.txt
2
3If you have any comment or update to the content, please contact the
4original document maintainer directly. However, if you have a problem
5communicating in English you can also ask the Chinese maintainer for
6help. Contact the Chinese maintainer if this translation is outdated
7or if there is a problem with the translation.
8
9Chinese maintainer: Lin Yongting <linyongting@gmail.com>
10---------------------------------------------------------------------
11Documentation/io_ordering.txt 的中文翻译
12
13如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
14交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
15译存在问题,请联系中文版维护者。
16
17中文版维护者: 林永听 Lin Yongting <linyongting@gmail.com>
18中文版翻译者: 林永听 Lin Yongting <linyongting@gmail.com>
19中文版校译者: 林永听 Lin Yongting <linyongting@gmail.com>
20
21
22以下为正文
23---------------------------------------------------------------------
24
25在某些平台上,所谓的内存映射I/O是弱顺序。在这些平台上,驱动开发者有责任
26保证I/O内存映射地址的写操作按程序图意的顺序达到设备。通常读取一个“安全”
27设备寄存器或桥寄存器,触发IO芯片清刷未处理的写操作到达设备后才处理读操作,
28而达到保证目的。驱动程序通常在spinlock保护的临界区退出之前使用这种技术。
29这也可以保证后面的写操作只在前面的写操作之后到达设备(这非常类似于内存
30屏障操作,mb(),不过仅适用于I/O)。
31
32假设一个设备驱动程的具体例子:
33
34 ...
35CPU A: spin_lock_irqsave(&dev_lock, flags)
36CPU A: val = readl(my_status);
37CPU A: ...
38CPU A: writel(newval, ring_ptr);
39CPU A: spin_unlock_irqrestore(&dev_lock, flags)
40 ...
41CPU B: spin_lock_irqsave(&dev_lock, flags)
42CPU B: val = readl(my_status);
43CPU B: ...
44CPU B: writel(newval2, ring_ptr);
45CPU B: spin_unlock_irqrestore(&dev_lock, flags)
46 ...
47
48上述例子中,设备可能会先接收到newval2的值,然后接收到newval的值,问题就
49发生了。不过很容易通过下面方法来修复:
50
51 ...
52CPU A: spin_lock_irqsave(&dev_lock, flags)
53CPU A: val = readl(my_status);
54CPU A: ...
55CPU A: writel(newval, ring_ptr);
56CPU A: (void)readl(safe_register); /* 配置寄存器?*/
57CPU A: spin_unlock_irqrestore(&dev_lock, flags)
58 ...
59CPU B: spin_lock_irqsave(&dev_lock, flags)
60CPU B: val = readl(my_status);
61CPU B: ...
62CPU B: writel(newval2, ring_ptr);
63CPU B: (void)readl(safe_register); /* 配置寄存器?*/
64CPU B: spin_unlock_irqrestore(&dev_lock, flags)
65
66在解决方案中,读取safe_register寄存器,触发IO芯片清刷未处理的写操作,
67再处理后面的读操作,防止引发数据不一致问题。
diff --git a/Documentation/zh_CN/stable_kernel_rules.txt b/Documentation/zh_CN/stable_kernel_rules.txt
index b5b9b0ab02fd..26ea5ed7cd9c 100644
--- a/Documentation/zh_CN/stable_kernel_rules.txt
+++ b/Documentation/zh_CN/stable_kernel_rules.txt
@@ -42,7 +42,7 @@ Documentation/stable_kernel_rules.txt 的中文翻译
42 42
43向稳定版代码树提交补丁的过程: 43向稳定版代码树提交补丁的过程:
44 44
45 - 在确认了补丁符合以上的规则后,将补丁发送到stable@kernel.org。 45 - 在确认了补丁符合以上的规则后,将补丁发送到stable@vger.kernel.org。
46 - 如果补丁被接受到队列里,发送者会收到一个ACK回复,如果没有被接受,收 46 - 如果补丁被接受到队列里,发送者会收到一个ACK回复,如果没有被接受,收
47 到的是NAK回复。回复需要几天的时间,这取决于开发者的时间安排。 47 到的是NAK回复。回复需要几天的时间,这取决于开发者的时间安排。
48 - 被接受的补丁会被加到稳定版本队列里,等待其他开发者的审查。 48 - 被接受的补丁会被加到稳定版本队列里,等待其他开发者的审查。
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 0dd65281cc65..20da3ad1696b 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -614,39 +614,6 @@ void device_remove_bin_file(struct device *dev,
614} 614}
615EXPORT_SYMBOL_GPL(device_remove_bin_file);