[PATCHv2] docs: update references to the device io book

2017-04-28 Thread Helmut Grohne
While converting deviceiobook.tmpl from DocBook to RST, dangling
references were left behind. This commit updates all remaining
references to the new location and fixes a typo "Documenataion".
SeongJae Park improved the ko_KR translation.

Fixes: 8a8a602fdb83 ("docs: Convert the deviceio template to RST")
Signed-off-by: Helmut Grohne 
Signed-off-by: SeongJae Park 
---
 Documentation/memory-barriers.txt| 4 ++--
 Documentation/translations/ko_KR/memory-barriers.txt | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

I would like to thank Jonathan Corbet for spotting the fatal typo. This updated
patch addresses all review remarks at the time of this writing:
 * Typo "Documenataion".
 * Added a more descriptive changelog.
 * Updated the ko_KR translation according to SeongJae Park's reply.

I am left wondering whether Jonathan Corbet's review should incur a Reviewed-By
tag and whether the other line from the ko_KR translation needs a similar
update.

Thanks for your time

Helmut

diff --git a/Documentation/memory-barriers.txt 
b/Documentation/memory-barriers.txt
index d2b0a8d..d323adc 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -2373,7 +2373,7 @@ is performed:
spin_unlock(Q);
 
 
-See Documentation/DocBook/deviceiobook.tmpl for more information.
+See Documentation/driver-api/device-io.rst for more information.
 
 
 =
@@ -2614,7 +2614,7 @@ might be needed:
  relaxed memory access properties, then _mandatory_ memory barriers are
  required to enforce ordering.
 
-See Documentation/DocBook/deviceiobook.tmpl for more information.
+See Documentation/driver-api/device-io.rst for more information.
 
 
 INTERRUPTS
diff --git a/Documentation/translations/ko_KR/memory-barriers.txt 
b/Documentation/translations/ko_KR/memory-barriers.txt
index ce0b48d..e5885ff 100644
--- a/Documentation/translations/ko_KR/memory-barriers.txt
+++ b/Documentation/translations/ko_KR/memory-barriers.txt
@@ -2343,7 +2343,7 @@ ACQUIRE VS I/O 액세스
spin_unlock(Q);
 
 
-더 많은 정보를 위해선 Documenataion/DocBook/deviceiobook.tmpl 을 참고하세요.
+더 많은 정보를 위해선 Documentation/driver-api/device-io.rst 를 참고하세요.
 
 
 =
@@ -2578,7 +2578,7 @@ CPU 에서는 사용되는 어토믹 인스트럭션 자체에 메모리 배리
  (2) 만약 액세스 함수들이 완화된 메모리 액세스 속성을 갖는 I/O 메모리 윈도우를
  사용한다면, 순서를 강제하기 위해선 _mandatory_ 메모리 배리어가 필요합니다.
 
-더 많은 정보를 위해선 Documentation/DocBook/deviceiobook.tmpl 을 참고하십시오.
+더 많은 정보를 위해선 Documentation/driver-api/device-io.rst 을 참고하십시오.
 
 
 인터럽트
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv2] docs: update references to the device io book

2017-04-28 Thread SeongJae Park


On Fri, 28 Apr 2017, Helmut Grohne wrote:


While converting deviceiobook.tmpl from DocBook to RST, dangling
references were left behind. This commit updates all remaining
references to the new location and fixes a typo "Documenataion".
SeongJae Park improved the ko_KR translation.

Fixes: 8a8a602fdb83 ("docs: Convert the deviceio template to RST")
Signed-off-by: Helmut Grohne 
Signed-off-by: SeongJae Park 
---
Documentation/memory-barriers.txt| 4 ++--
Documentation/translations/ko_KR/memory-barriers.txt | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

I would like to thank Jonathan Corbet for spotting the fatal typo. This updated
patch addresses all review remarks at the time of this writing:
* Typo "Documenataion".
* Added a more descriptive changelog.
* Updated the ko_KR translation according to SeongJae Park's reply.

I am left wondering whether Jonathan Corbet's review should incur a Reviewed-By
tag and whether the other line from the ko_KR translation needs a similar
update.

Thanks for your time

Helmut

diff --git a/Documentation/memory-barriers.txt 
b/Documentation/memory-barriers.txt
index d2b0a8d..d323adc 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -2373,7 +2373,7 @@ is performed:
spin_unlock(Q);


-See Documentation/DocBook/deviceiobook.tmpl for more information.
+See Documentation/driver-api/device-io.rst for more information.


=
@@ -2614,7 +2614,7 @@ might be needed:
 relaxed memory access properties, then _mandatory_ memory barriers are
 required to enforce ordering.

-See Documentation/DocBook/deviceiobook.tmpl for more information.
+See Documentation/driver-api/device-io.rst for more information.


INTERRUPTS
diff --git a/Documentation/translations/ko_KR/memory-barriers.txt 
b/Documentation/translations/ko_KR/memory-barriers.txt
index ce0b48d..e5885ff 100644
--- a/Documentation/translations/ko_KR/memory-barriers.txt
+++ b/Documentation/translations/ko_KR/memory-barriers.txt
@@ -2343,7 +2343,7 @@ ACQUIRE VS I/O 액세스
spin_unlock(Q);


-더 많은 정보를 위해선 Documenataion/DocBook/deviceiobook.tmpl 을 참고하세요.
+더 많은 정보를 위해선 Documentation/driver-api/device-io.rst 를 참고하세요.


My opinion for postposition of the reference (s/을/를) has applied very 
well to above sentence.  However, it hasn't applied to the same sentence 
below.




=
@@ -2578,7 +2578,7 @@ CPU 에서는 사용되는 어토믹 인스트럭션 자체에 메모리 배리
 (2) 만약 액세스 함수들이 완화된 메모리 액세스 속성을 갖는 I/O 메모리 윈도우를
 사용한다면, 순서를 강제하기 위해선 _mandatory_ 메모리 배리어가 필요합니다.

-더 많은 정보를 위해선 Documentation/DocBook/deviceiobook.tmpl 을 참고하십시오.
+더 많은 정보를 위해선 Documentation/driver-api/device-io.rst 을 참고하십시오.


It would be better to modify the postposition of the reference as below:

 -더 많은 정보를 위해선 Documentation/DocBook/deviceiobook.tmpl 을 참고하십시오.
 +더 많은 정보를 위해선 Documentation/driver-api/device-io.rst 를 참고하십시오.


Thanks,
SeongJae Park




인터럽트
--
2.1.4



Re: [PATCH] KVM: Documentation: remove VM mmap documentation

2017-04-28 Thread Paolo Bonzini


On 27/04/2017 23:57, Jonathan Corbet wrote:
> On Thu, 27 Apr 2017 15:40:42 -0600
> Jonathan Corbet  wrote:
> 
>> On Mon, 24 Apr 2017 11:16:49 +0200
>> Jann Horn  wrote:
>>
>>> Since commit 80f5b5e700fa9c ("KVM: remove vm mmap method"), the VM mmap
>>> handler is gone. Remove the corresponding documentation.  
>>
>> Applied to the docs tree, thanks.
> 
> Actually, I've unapplied it since it leads to conflicts with the kvm
> tree, and poor Stephen has already had to fix up too many of those for me
> this time around.  Paolo, maybe you'd like to pick it up and reconcile
> things?

Yes, I'll apply it for 4.12.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH linux v9 2/5] hwmon: occ: Add sysfs interface

2017-04-28 Thread Eddie James



On 04/02/2017 06:19 AM, Guenter Roeck wrote:

On 03/14/2017 01:55 PM, Eddie James wrote:

From: "Edward A. James" 

Add a generic mechanism to expose the sensors provided by the OCC in
sysfs.

Signed-off-by: Edward A. James 
Signed-off-by: Andrew Jeffery 
---
 Documentation/hwmon/occ   |  62 +++
 drivers/hwmon/occ/Makefile|   2 +-
 drivers/hwmon/occ/occ_sysfs.c | 253 
++

 drivers/hwmon/occ/occ_sysfs.h |  25 +
 4 files changed, 341 insertions(+), 1 deletion(-)
 create mode 100644 drivers/hwmon/occ/occ_sysfs.c
 create mode 100644 drivers/hwmon/occ/occ_sysfs.h

diff --git a/Documentation/hwmon/occ b/Documentation/hwmon/occ
index d1c863b..580af26 100644
--- a/Documentation/hwmon/occ
+++ b/Documentation/hwmon/occ
@@ -27,6 +27,68 @@ Currently, all versions of the OCC support four 
types of sensor data: power,
 temperature, frequency, and "caps," which indicate limits and 
thresholds used

 internally on the OCC.

+sysfs Entries
+-
+
+The OCC driver uses the hwmon sysfs framework to provide data to 
userspace.

+
+The driver exports a number of sysfs files for each type of sensor. The
+sensor-specific files vary depending on the processor type, though 
many of the

+attributes are common for both the POWER8 and POWER9.
+
+The hwmon interface cannot define every type of sensor that may be 
used.
+Therefore, the frequency sensor on the OCC uses the "input" type 
sensor defined
+by the hwmon interface, rather than defining a new type of custom 
sensor.

+
+Below are detailed the names and meaning of each sensor file for 
both types of
+processors. All sensors are read-only unless otherwise specified. 
 indicates
+the hwmon index. sensor id indicates the unique internal OCC 
identifer. Please

+see the POWER OCC specification for details on all these sensor values.
+
+frequency:
+all processors:
+in_input - frequency value
+in_label - sensor id
+temperature:
+POWER8:
+temp_input - temperature value
+temp_label - sensor id
+POWER9 (in addition to above):
+temp_type - FRU type
+
+power:
+POWER8:
+power_input - power value
+power_label - sensor id
+power_average - accumulator
+power_average_interval - update tag (number of samples in
+accumulator)
+POWER9:
+power_input - power value
+power_label - sensor id
+power_average_min - accumulator[0]
+power_average_max - accumulator[1] (64 bits total)
+power_average_interval - update tag
+power_reset_history - (function_id | (apss_channel << 8)
+
+caps:
+POWER8:
+power_cap - current powercap
+power_cap_max - max powercap
+power_cap_min - min powercap
+power_max - normal powercap
+power_alarm - user powercap, r/w
+POWER9:
+power_cap_alarm - user powercap source
+
+The driver also provides two sysfs entries through hwmon to better
+control the driver and monitor the master OCC. Though there may be 
multiple
+OCCs present on the system, these two files are only present for the 
"master"

+OCC.
+name - read the name of the driver
+update_interval - read or write the minimum interval for polling 
the

+OCC.
+
 BMC - Host Communications
 -

diff --git a/drivers/hwmon/occ/Makefile b/drivers/hwmon/occ/Makefile
index 3ed79a5..67b5367 100644
--- a/drivers/hwmon/occ/Makefile
+++ b/drivers/hwmon/occ/Makefile
@@ -1 +1 @@
-obj-$(CONFIG_SENSORS_IBM_OCC) += occ.o
+obj-$(CONFIG_SENSORS_IBM_OCC) += occ.o occ_sysfs.o
diff --git a/drivers/hwmon/occ/occ_sysfs.c 
b/drivers/hwmon/occ/occ_sysfs.c

new file mode 100644
index 000..50b20e2
--- /dev/null
+++ b/drivers/hwmon/occ/occ_sysfs.c
@@ -0,0 +1,253 @@
+/*
+ * occ_sysfs.c - OCC sysfs interface
+ *
+ * This file contains the methods and data structures for 
implementing the OCC

+ * hwmon sysfs entries.
+ *
+ * Copyright 2017 IBM Corp.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "occ.h"
+#include "occ_sysfs.h"
+
+#define OCC_HWMON_NAME_LENGTH32
+
+struct occ_sysfs {
+struct device *dev;
+struct occ *occ;
+
+char label_buffer[OCC_HWMON_NAME_LENGTH + 1];
+char hwmon_name[OCC_HWMON_NAME_LENGTH + 1];
+const u32 *sensor_hwmon_configs;
+struct hwmon_channel_info **occ_sensors;
+struct hwmon_chip_info occ_info;
+u16 user_powercap;
+};
+
+static int occ_hwmon_read(struct device *dev, enum 
hwmon_sensor_types type,

+  u32 attr, int channel, long *val)
+{
+int rc;
+struct occ_sysfs *driver = dev_get_drvdata(dev);
+struct occ *occ = 

converting Documentation/security/* to .rst

2017-04-28 Thread Kees Cook
Hi,

I was curious if the conversion of security/ (and prctl/ which only
has two files that should probably both be moved to security/) was
already on someone's TODO list? I'd love to get these done (I refer
people regularly to seccomp_filter.txt and self-protection.txt), but I
didn't want to duplicate any efforts.

I read about various tools to help with auto-converting files to kind
of help speed up the process, but I couldn't find what seemed a
canonical answer to what to use as a helper. Is there one? (Perhaps
this was only for DocBook?)

Thanks!

-Kees

-- 
Kees Cook
Pixel Security
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html