Re: [PATCH] doc: Explain light-handed markup preference a bit better

2016-12-05 Thread Peter Zijlstra
On Tue, Nov 29, 2016 at 02:17:52PM +0100, Daniel Vetter wrote:
> Hi Peter,
> 
> On Tue, Nov 29, 2016 at 10:23:14AM +0100, Daniel Vetter wrote:
> > We already had a super-short blurb, but worth extending it I think:
> > We're still pretty far away from anything like a consensus, but
> > there's clearly a lot of people who prefer an as-light as possible
> > approach to converting existing .txt files to .rst. Make sure this is
> > properly taken into account and clear.
> > 
> > Motivated by discussions with Peter and Christoph and others.
> > 
> > v2:
> > - Mention that existing headings should be kept when converting
> >   existing .txt files (Mauro).
> > - Explain that we prefer :: for quoting code, it's easier on the
> >   eyes (Mauro).
> > - Explain that blindly converting outdated docs is harmful. Motived
> >   by comments Peter did in our discussion.
> > 
> > Cc: Jonathan Corbet 
> > Cc: linux-doc@vger.kernel.org
> > Cc: Christoph Hellwig 
> > Cc: Peter Zijlstra 
> > Cc: Jani Nikula 
> > Cc: Mauro Carvalho Chehab 
> > Signed-off-by: Daniel Vetter 
> 
> Since this was motivated by a discussion you've (re)started, does this
> sufficiently address your concerns for conversion from plain text .txt to
> plain text .rst of existing documents? Anything you'd want to see changed?

Seems OK to me, but there's already a bunch of bike-shedding in this
thread.

--
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 11/18] arm64: ilp32: share aarch32 syscall handlers

2016-12-05 Thread Yury Norov
On Mon, Dec 05, 2016 at 05:12:43PM +, Catalin Marinas wrote:
> On Fri, Oct 21, 2016 at 11:33:10PM +0300, Yury Norov wrote:
> > off_t is  passed in register pair just like in aarch32.
> > In this patch corresponding aarch32 handlers are shared to
> > ilp32 code.
> [...]
> > +/*
> > + * Note: off_4k (w5) is always in units of 4K. If we can't do the
> > + * requested offset because it is not page-aligned, we return -EINVAL.
> > + */
> > +ENTRY(compat_sys_mmap2_wrapper)
> > +#if PAGE_SHIFT > 12
> > +   tst w5, #~PAGE_MASK >> 12
> > +   b.ne1f
> > +   lsr w5, w5, #PAGE_SHIFT - 12
> > +#endif
> > +   b   sys_mmap_pgoff
> > +1: mov x0, #-EINVAL
> > +   ret
> > +ENDPROC(compat_sys_mmap2_wrapper)
> 
> For compat sys_mmap2, the pgoff argument is in multiples of 4K. This was
> traditionally used for architectures where off_t is 32-bit to allow
> mapping files to 2^44.
> 
> Since off_t is 64-bit with AArch64/ILP32, should we just pass the off_t
> as a 64-bit value in two different registers (w5 and w6)?

Current glibc implementation becomes broken for 64-bit off_t if
if I'll do what you want.
sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c
28 __ptr_t
29 __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
30 {
31   if (offset & (MMAP_PAGE_UNIT - 1))
32 {
33   __set_errno (EINVAL);
34   return MAP_FAILED;
35 }
36   return (__ptr_t) INLINE_SYSCALL (mmap2, 6, addr, len, prot, flags, fd,
37offset / MMAP_PAGE_UNIT);
38 }
39 
40 weak_alias (__mmap, mmap)

So it requires changes both in glibc and in kernel. I can do it. But
I'd like to collect opinions of kernel and glibc developers before
starting it. 

Yury
--
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 16/18] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32

2016-12-05 Thread Yury Norov
On Tue, Dec 06, 2016 at 11:55:08AM +0530, Yury Norov wrote:
> On Mon, Dec 05, 2016 at 04:34:23PM +, Catalin Marinas wrote:
> > On Fri, Oct 21, 2016 at 11:33:15PM +0300, Yury Norov wrote:
> > > New aarch32 ptrace syscall handler is introduced to avoid run-time
> > > detection of the task type.
> > 
> > What's wrong with the run-time detection? If it's just to avoid a
> > negligible overhead, I would rather keep the code simpler by avoiding
> > duplicating the generic compat_sys_ptrace().
> 
> Nothing wrong. This is how Arnd asked me to do. You already asked this
> question: http://lkml.iu.edu/hypermail/linux/kernel/1604.3/00930.html
> 
> If it's still looking weird to you, I can switch back to runtime
> ptrace. But I'd like to see Arnd's opinion.
 
 This is the Arnd's email:
 https://patchwork.kernel.org/patch/7980521/

 Yury.
--
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 16/18] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32

2016-12-05 Thread Yury Norov
On Mon, Dec 05, 2016 at 04:34:23PM +, Catalin Marinas wrote:
> On Fri, Oct 21, 2016 at 11:33:15PM +0300, Yury Norov wrote:
> > New aarch32 ptrace syscall handler is introduced to avoid run-time
> > detection of the task type.
> 
> What's wrong with the run-time detection? If it's just to avoid a
> negligible overhead, I would rather keep the code simpler by avoiding
> duplicating the generic compat_sys_ptrace().

Nothing wrong. This is how Arnd asked me to do. You already asked this
question: http://lkml.iu.edu/hypermail/linux/kernel/1604.3/00930.html

If it's still looking weird to you, I can switch back to runtime
ptrace. But I'd like to see Arnd's opinion.

Yury.
--
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: [PATCHv13 0/3] rdmacg: IB/core: rdma controller support

2016-12-05 Thread Parav Pandit
ok. Thanks Tejun.

Parav

On Tue, Dec 6, 2016 at 1:05 AM, Tejun Heo  wrote:
> Parav, it's a bit too late for this cycle.  Let's target v4.11.  I'll
> review the patches after the merge window.  Please ping me if I don't.
>
> Thanks.
>
> --
> tejun
--
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 v3 -next 1/2] ARM: sunxi: add support for H2+ SoC

2016-12-05 Thread Alexey Kardashevskiy
On 05/12/16 20:19, Maxime Ripard wrote:
> On Fri, Dec 02, 2016 at 11:05:12PM +0800, Icenowy Zheng wrote:
>> Allwinner H2+ is a quad-core Cortex-A7 SoC.
>>
>> It is very like H3, that they share the same SoC ID (0x1680), and H3
>> memory maps as well as drivers works well on the SoC.
>>
>> Signed-off-by: Icenowy Zheng 
> 
> Fixed the alphabetical order in the bindings doc, and applied.

Where is that resulting tree, with these ones and EMAC? Thanks.



-- 
Alexey



signature.asc
Description: OpenPGP digital signature


Re: [PATCH v3 -next 2/2] ARM: dts: sunxi: add support for Orange Pi Zero board

2016-12-05 Thread Alexey Kardashevskiy
On 03/12/16 02:05, Icenowy Zheng wrote:
> Orange Pi Zero is a board that came with the new Allwinner H2+ SoC and a
> SDIO Wi-Fi chip by Allwinner (XR819).
> 
> Add a device tree file for it.
> 
> Signed-off-by: Icenowy Zheng 
> ---
> Changes since v2:
> - Merged SDIO Wi-Fi patch into it.
> - SDIO Wi-Fi: add a ethernet1 alias to it, as it has no internal NVRAM.
> - SDIO Wi-Fi: changed pinctrl binding to generic pinconf
> - removed all gpio pinctrl nodes
> - changed h2plus to h2-plus
> Changes since v1:
> - Convert to generic pinconf bindings.
> - SDIO Wi-Fi: add patch.
> 
> Some notes:
> - The uart1 and uart2 is available on the unsoldered gpio header.
> - The onboard USB connector has its Vbus directly connected to DCIN-5V (the
>   power jack)
> 
>  arch/arm/boot/dts/Makefile|   1 +
>  arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 159 
> ++
>  2 files changed, 160 insertions(+)
>  create mode 100644 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 6447abc..59f6e86 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -844,6 +844,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
>   sun8i-a33-sinlinx-sina33.dtb \
>   sun8i-a83t-allwinner-h8homlet-v2.dtb \
>   sun8i-a83t-cubietruck-plus.dtb \
> + sun8i-h2-plus-orangepi-zero.dtb \
>   sun8i-h3-bananapi-m2-plus.dtb \
>   sun8i-h3-nanopi-neo.dtb \
>   sun8i-h3-orangepi-2.dtb \
> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts 
> b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> new file mode 100644
> index 000..d18807f
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -0,0 +1,159 @@
> +/*
> + * Copyright (C) 2016 Icenowy Zheng 
> + *
> + * Based on sun8i-h3-orangepi-one.dts, which is:
> + *   Copyright (C) 2016 Hans de Goede 
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This file 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.
> + *
> + * This file is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + * obtaining a copy of this software and associated documentation
> + * files (the "Software"), to deal in the Software without
> + * restriction, including without limitation the rights to use,
> + * copy, modify, merge, publish, distribute, sublicense, and/or
> + * sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following
> + * conditions:
> + *
> + * The above copyright notice and this permission notice shall be
> + * included in all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/dts-v1/;
> +#include "sun8i-h3.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +
> +#include 
> +#include 
> +#include 
> +
> +/ {
> + model = "Xunlong Orange Pi Zero";
> + compatible = "xunlong,orangepi-zero", "allwinner,sun8i-h2-plus";
> +
> + aliases {
> + serial0 = &uart0;
> + /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */


It is not defined there as for:

cef87e9 (tag: next-20161205) 20 hours ago Stephen Rothwell Add linux-next
specific files for 20161205





> + ethernet1 = &xr819;
> + };
> +
> + chosen {
> +   

Re: [PATCH v6 4/9] dt-bindings: iio: iio-mux: document iio-mux bindings

2016-12-05 Thread Rob Herring
On Wed, Nov 30, 2016 at 09:16:58AM +0100, Peter Rosin wrote:
> Signed-off-by: Peter Rosin 
> ---
>  .../bindings/iio/multiplexer/iio-mux.txt   | 40 
> ++
>  MAINTAINERS|  6 
>  2 files changed, 46 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt

I'm still not convinced about this binding, but don't really have more 
comments ATM. Sending 6 versions in 2 weeks or so doesn't really help 
either.

> diff --git a/Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt 
> b/Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
> new file mode 100644
> index ..8080cf790d82
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
> @@ -0,0 +1,40 @@
> +IIO multiplexer bindings
> +
> +If a multiplexer is used to select which hardware signal is fed to
> +e.g. an ADC channel, these bindings describe that situation.
> +
> +Required properties:
> +- compatible : "iio-mux"

This is a Linuxism. perhaps "adc-mux".

> +- io-channels : Channel node of the parent channel that has multiplexed
> + input.
> +- io-channel-names : Should be "parent".
> +- #address-cells = <1>;
> +- #size-cells = <0>;
> +- mux-controls : Mux controller node to use for operating the mux
> +- channels : List of strings, labeling the mux controller states.
> +
> +The multiplexer state as described in ../misc/mux-controller.txt
> +
> +For each non-empty string in the channels property, an iio channel will
> +be created. The number of this iio channel is the same as the index into
> +the list of strings in the channels property, and also matches the mux
> +controller state.
> +
> +Example:
> + mux: mux-controller {
> + compatible = "mux-gpio";
> + #mux-control-cells = <0>;
> +
> + mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
> + <&pioA 1 GPIO_ACTIVE_HIGH>;
> + };
> +
> + adc-mux {
> + compatible = "iio-mux";
> + io-channels = <&adc 0>;
> + io-channel-names = "parent";
> +
> + mux-controls = <&mux>;
> +
> + channels = "sync", "in", system-regulator";
> + };
--
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] docs: IIO documentation

2016-12-05 Thread Jonathan Corbet
On Sun,  4 Dec 2016 20:49:06 +
Jonathan Cameron  wrote:

> This is a manual conversion of the existing DocBook documentation
> for IIO.  The intent is not to substantially change any of the
> content in this patch, but to give a base to build upon.

Looks mostly good, a couple of brief notes below.

> Signed-off-by: Jonathan Cameron 
> ---
>  Documentation/driver-api/iio/buffers.rst   | 127 +++
>  Documentation/driver-api/iio/core.rst  | 180 
> +
>  Documentation/driver-api/iio/index.rst |  15 ++
>  Documentation/driver-api/iio/intro.rst |  23 +++
>  Documentation/driver-api/iio/triggered-buffers.rst |  70 
>  Documentation/driver-api/iio/triggers.rst  |  78 +
>  Documentation/driver-api/index.rst |   1 +
>  7 files changed, 494 insertions(+)

Please go ahead and remove iio.tmpl when you do this conversion, there's no
reason to keep it around afterward.

> diff --git a/Documentation/driver-api/iio/buffers.rst 
> b/Documentation/driver-api/iio/buffers.rst
> new file mode 100644
> index ..559256b8e607
> --- /dev/null
> +++ b/Documentation/driver-api/iio/buffers.rst
> @@ -0,0 +1,127 @@
> +==
> +Industrial I/O Buffers
> +==
> +
> +* struct :c:type:`iio_buffer` — general buffer structure
> +* :c:func:`iio_validate_scan_mask_onehot` — Validates that exactly one 
> channel
> +  is selected
> +* :c:func:`iio_buffer_get` — Grab a reference to the buffer
> +* :c:func:`iio_buffer_put` — Release the reference to the buffer
> +
> +The Industrial I/O core offers a way for continuous data capture based on a
> +trigger source. Multiple data channels can be read at once from
> +*/dev/iio:deviceX* character device node, thus reducing the CPU load.
> +
> +IIO buffer sysfs interface
> +==
> +An IIO buffer has an associated attributes directory under
> +*/sys/bus/iio/iio:deviceX/buffer/*. Here are the existing attributes:
> +
> +* *length*, the total number of data samples (capacity) that can be stored by
> +  the buffer.
> +* *enable*, activate buffer capture.
> +
> +IIO buffer setup
> +
> +
> +The meta information associated with a channel reading placed in a buffer is
> +called a scan element . The important bits configuring scan elements are
> +exposed to userspace applications via the
> +*/sys/bus/iio/iio:deviceX/scan_elements/* directory. This file contains
> +attributes of the following form:
> +
> +* *enable*, used for enabling a channel. If and only if its attribute is non
> +  *zero*, then a triggered capture will contain data samples for this 
> channel.
> +* *type*, description of the scan element data storage within the buffer and
> +  hence the form in which it is read from user space.
> +  Format is [be|le]:[s|u]bits/storagebitsXrepeat[>>shift] .
> +  * *be* or *le*, specifies big or little endian.
> +  * *s* or *u*, specifies if signed (2's complement) or unsigned.
> +  * *bits*, is the number of valid data bits.
> +  * *storagebits*, is the number of bits (after padding) that it occupies in 
> the
> +  buffer.
> +  * *shift*, if specified, is the shift that needs to be applied prior to
> +  masking out unused bits.
> +  * *repeat*, specifies the number of bits/storagebits repetitions. When the
> +  repeat element is 0 or 1, then the repeat value is omitted.
> +
> +For example, a driver for a 3-axis accelerometer with 12 bit resolution 
> where data is stored in two 8-bits registers as follows:
> +
> +::

It would be nice to break the really long lines for future editing comfort.

Also worth noting: you can put the double colon at the end of the leading
line, i.e.:

  data is stored in two 8-bit registers as follows::



Doing it that way makes the RST file a bit more readable, IMO.

Thanks for doing this,

jon
--
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 5/5] docs: 00-INDEX: document directories/files with no docs

2016-12-05 Thread Jonathan Corbet
On Mon,  5 Dec 2016 09:41:45 -0200
Mauro Carvalho Chehab  wrote:

> There are a number of files/directories that don't contain
> any documentation. They're related to ReST file conversion.
> 
> As a matter of completeness, since Makefile is also documented
> there, add an entry for those files too.

As promised, a couple of quibbles...

> Signed-off-by: Mauro Carvalho Chehab 
> ---
>  Documentation/00-INDEX | 19 +++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
> index 272f5c4481f1..6d488509285d 100644
> --- a/Documentation/00-INDEX
> +++ b/Documentation/00-INDEX
> @@ -14,6 +14,8 @@ Following translations are available on the WWW:
>   - this file.
>  ABI/
>   - info on kernel <-> userspace ABI and relative interface stability.
> +CodingStyle
> + - nothing here, just a pointer to process/coding-style.rst.
>  DMA-API.txt
>   - DMA API, pci_ API & extensions for non-consistent memory machines.
>  DMA-API-HOWTO.txt
> @@ -39,6 +41,9 @@ Intel-IOMMU.txt
>  Makefile
>   - This file does nothing. Removing it breaks make htmldocs and
> make distclean.
> +Makefile.sphinx
> + - This file does nothing. Removing it breaks make htmldocs and
> +   make distclean.

To say that this file "does nothing" is clearly incorrect - it controls how
the sphinx build is done.

>  PCI/
>   - info related to PCI drivers.
>  RCU/
> @@ -47,6 +52,8 @@ SAK.txt
>   - info on Secure Attention Keys.
>  SM501.txt
>   - Silicon Motion SM501 multimedia companion chip
> +SubmittingPatches
> + - nothing here, just a pointer to process/coding-style.rst.
>  accounting/
>   - documentation on accounting and taskstats.
>  acpi/
> @@ -93,6 +100,8 @@ clk.txt
>   - info on the common clock framework
>  cma/
>   - Continuous Memory Area (CMA) debugfs interface.
> +conf.py
> + - nothing here. Just a configuration file for Sphinx.

Again, it's not "nothing"; we could say it's not of interest to people who
aren't doing things with the build system.

>  connector/
>   - docs on the netlink based userspace<->kernel space communication mod.
>  console/
> @@ -135,6 +144,8 @@ digsig.txt
>   -info on the Digital Signature Verification API
>  dma-buf-sharing.txt
>   - the DMA Buffer Sharing API Guide
> +docutils.conf
> + - nothing here. Just a configuration file for docutils.
>  dontdiff
>   - file containing a list of files that should never be diff'ed.
>  driver-api/
> @@ -201,6 +212,8 @@ ide/
>   - Information regarding the Enhanced IDE drive.
>  iio/
>   - info on industrial IIO configfs support.
> +index.rst
> + - main index for the documentation at ReST format.
>  infiniband/
>   - directory with documents concerning Linux InfiniBand support.
>  input/
> @@ -307,6 +320,8 @@ nvdimm/
>   - info on non-volatile devices.
>  nvmem/
>   - info on non volatile memory framework.
> +output/
> + - default directory where html/LaTeX/pdf files will be written.
>  padata.txt
>   - An introduction to the "padata" parallel execution API
>  parisc/
> @@ -387,6 +402,10 @@ sound/
>   - directory with info on sound card support.
>  spi/
>   - overview of Linux kernel Serial Peripheral Interface (SPI) support.
> +sphinx/
> + - no doumentation here, just files required by Sphinx toolchain.

Indeed there's no "doumentation" there :)  No documentation either.

> +sphinx-static/
> + - no doumentation here, just files required by Sphinx toolchain.
>  static-keys.txt
>   - info on how static keys allow debug code in hotpaths via patching
>  svga.txt

Thanks,

jon
--
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 0/5] Update Documentation/00-INDEX

2016-12-05 Thread Jonathan Corbet
On Mon,  5 Dec 2016 09:41:40 -0200
Mauro Carvalho Chehab  wrote:

> So, in order to check it, I wrote a small script that compares the files
> and directories at Documentation/ with the ones at 00-INDEX.
> 
> Then, I synchronized the entries, making the script happy.
> 
> We might think on integrating the script with checkpatch.pl, but, as
> we should get rid of 00-INDEX, it probably not worth the efforts.

I would agree with that; I don't see the point of keeping those files
around in the longer term.

I've applied the set.  I do have a few quibbles with the final patch that
I'll send separately, but they're not something to hold this set up for.

Thanks,

jon
--
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: [TRIVIAL PATCH] Docs: change sh -> awk in REPORTING-BUGS

2016-12-05 Thread Jonathan Corbet
On Sun, 4 Dec 2016 02:58:02 -0800
Kevin Peng  wrote:

> scripts/ver_linux has been rewritten as an awk script; update
> documentation to reflect this fact.
> 
> Signed-off-by: Kevin Peng 

Applied to docs-next, thanks.

jon
--
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: [PATCHv13 0/3] rdmacg: IB/core: rdma controller support

2016-12-05 Thread Tejun Heo
Parav, it's a bit too late for this cycle.  Let's target v4.11.  I'll
review the patches after the merge window.  Please ping me if I don't.

Thanks.

-- 
tejun
--
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: ILP32 for ARM64: testing with glibc testsuite

2016-12-05 Thread Steve Ellcey
On Mon, 2016-12-05 at 11:07 +0100, Andreas Schwab wrote:
> On Dez 05 2016, "Zhangjian (Bamvor)" 
> wrote:
> 
> > 
> > Is there some progresses on it? We could collabrate to fix those
> > issues.
> All the elf/nptl/rt fails should be fixed by the recent binutils
> fixes.
> 
> Andreas.

I am using binutils ToT and Yury's latest patch (https://sourceware.org
/ml/binutils/2016-12/msg00039.html) and I am still seeing some nptl and
rt failures in the glibc testsuite, specifically:

FAIL: nptl/tst-cancel26
FAIL: nptl/tst-cancel27
FAIL: nptl/tst-stack4
FAIL: rt/tst-mqueue1
FAIL: rt/tst-mqueue2
FAIL: rt/tst-mqueue4
FAIL: rt/tst-mqueue7

Steve Ellcey
sell...@caviumnetworks.com
--
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 11/18] arm64: ilp32: share aarch32 syscall handlers

2016-12-05 Thread Catalin Marinas
On Fri, Oct 21, 2016 at 11:33:10PM +0300, Yury Norov wrote:
> off_t is  passed in register pair just like in aarch32.
> In this patch corresponding aarch32 handlers are shared to
> ilp32 code.
[...]
> +/*
> + * Note: off_4k (w5) is always in units of 4K. If we can't do the
> + * requested offset because it is not page-aligned, we return -EINVAL.
> + */
> +ENTRY(compat_sys_mmap2_wrapper)
> +#if PAGE_SHIFT > 12
> + tst w5, #~PAGE_MASK >> 12
> + b.ne1f
> + lsr w5, w5, #PAGE_SHIFT - 12
> +#endif
> + b   sys_mmap_pgoff
> +1:   mov x0, #-EINVAL
> + ret
> +ENDPROC(compat_sys_mmap2_wrapper)

For compat sys_mmap2, the pgoff argument is in multiples of 4K. This was
traditionally used for architectures where off_t is 32-bit to allow
mapping files to 2^44.

Since off_t is 64-bit with AArch64/ILP32, should we just pass the off_t
as a 64-bit value in two different registers (w5 and w6)?

-- 
Catalin
--
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 16/18] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32

2016-12-05 Thread Catalin Marinas
On Fri, Oct 21, 2016 at 11:33:15PM +0300, Yury Norov wrote:
> New aarch32 ptrace syscall handler is introduced to avoid run-time
> detection of the task type.

What's wrong with the run-time detection? If it's just to avoid a
negligible overhead, I would rather keep the code simpler by avoiding
duplicating the generic compat_sys_ptrace().

-- 
Catalin
--
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 14/18] arm64: signal32: move ilp32 and aarch32 common code to separated file

2016-12-05 Thread Catalin Marinas
On Fri, Oct 21, 2016 at 11:33:13PM +0300, Yury Norov wrote:
> Signed-off-by: Yury Norov 

Please add some description, even if it means copying the subject.

> ---
>  arch/arm64/include/asm/signal32.h|   3 +
>  arch/arm64/include/asm/signal32_common.h |  27 +++
>  arch/arm64/kernel/Makefile   |   2 +-
>  arch/arm64/kernel/signal32.c | 107 
>  arch/arm64/kernel/signal32_common.c  | 135 
> +++
>  5 files changed, 166 insertions(+), 108 deletions(-)
>  create mode 100644 arch/arm64/include/asm/signal32_common.h
>  create mode 100644 arch/arm64/kernel/signal32_common.c

I wonder whether you can make such patches more readable by setting
"diff.renames" to "copy" in your gitconfig (unless it's set already and
Git cannot detect partial file code moving/copying).

-- 
Catalin
--
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 10/18] arm64: ilp32: introduce binfmt_ilp32.c

2016-12-05 Thread Catalin Marinas
On Fri, Oct 21, 2016 at 11:33:09PM +0300, Yury Norov wrote:
> binfmt_ilp32.c is needed to handle ILP32 binaries
> 
> Signed-off-by: Yury Norov 
> Signed-off-by: Bamvor Zhang Jian 
> ---
>  arch/arm64/include/asm/elf.h |  6 +++
>  arch/arm64/kernel/Makefile   |  1 +
>  arch/arm64/kernel/binfmt_ilp32.c | 97 
> 
>  3 files changed, 104 insertions(+)
>  create mode 100644 arch/arm64/kernel/binfmt_ilp32.c
> 
> diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
> index f259fe8..be29dde 100644
> --- a/arch/arm64/include/asm/elf.h
> +++ b/arch/arm64/include/asm/elf.h
> @@ -175,10 +175,16 @@ extern int arch_setup_additional_pages(struct 
> linux_binprm *bprm,
>  
>  #define COMPAT_ELF_ET_DYN_BASE   (2 * TASK_SIZE_32 / 3)
>  
> +#ifndef USE_AARCH64_GREG
>  /* AArch32 registers. */
>  #define COMPAT_ELF_NGREG 18
>  typedef unsigned int compat_elf_greg_t;
>  typedef compat_elf_greg_tcompat_elf_gregset_t[COMPAT_ELF_NGREG];
> +#else /* AArch64 registers for AARCH64/ILP32 */
> +#define COMPAT_ELF_NGREG ELF_NGREG
> +#define compat_elf_greg_telf_greg_t
> +#define compat_elf_gregset_t elf_gregset_t
> +#endif

I think you only need compat_elf_gregset_t definition here and leave the
other two undefined.

-- 
Catalin
--
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 09/18] arm64: introduce binfmt_elf32.c

2016-12-05 Thread Catalin Marinas
On Fri, Oct 21, 2016 at 11:33:08PM +0300, Yury Norov wrote:
> As we support more than one compat formats, it looks more reasonable
> to not use fs/compat_binfmt.c. Custom binfmt_elf32.c allows to move aarch32
> specific definitions there and make code more maintainable and readable.

Can you remind me why we need this patch (rather than using the default
fs/compat_binfmt_elf.c which you include here anyway)?

> --- /dev/null
> +++ b/arch/arm64/kernel/binfmt_elf32.c
> @@ -0,0 +1,31 @@
> +/*
> + * Support for AArch32 Linux ELF binaries.
> + */
> +
> +/* AArch32 EABI. */
> +#define EF_ARM_EABI_MASK 0xff00
> +
> +#define compat_start_thread  compat_start_thread
> +#define COMPAT_SET_PERSONALITY(ex)   \
> +do { \
> + clear_thread_flag(TIF_32BIT_AARCH64);   \
> + set_thread_flag(TIF_32BIT); \
> +} while (0)

You introduce this here but it seems to still be present in asm/elf.h.

-- 
Catalin
--
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: ILP32 for ARM64 - testing with lmbench

2016-12-05 Thread Catalin Marinas
On Mon, Dec 05, 2016 at 06:16:09PM +0800, Zhangjian (Bamvor) wrote:
> Do you have suggestion of next move of upstreaming ILP32?

I mentioned the steps a few time before. I'm pasting them again here:

1. Complete the review of the Linux patches and ABI (no merge yet)
2. Review the corresponding glibc patches (no merge yet)
3. Ask (Linaro, Cavium) for toolchain + filesystem (pre-built and more
   than just busybox) to be able to reproduce the testing in ARM
4. More testing (LTP, trinity, performance regressions etc.)
5. Move the ILP32 PCS out of beta (based on the results from 4)
6. Check the market again to see if anyone still needs ILP32
7. Based on 6, decide whether to merge the kernel and glibc patches

What's not explicitly mentioned in step 4 is glibc testing. Point 5 is
ARM's responsibility (toolchain folk).

> There are already the test results of lmbench and specint. Do you they
> are ok or need more data to prove no regression?

I would need to reproduce the tests myself, see step 3.

> I have also noticed that there are ILP32 failures in glibc testsuite.
> Is it the only blocker for merge ILP32(in technology part)?

It's probably not the only blocker but I have to review the kernel
patches again to make sure. I'd also like to see whether the libc-alpha
community is ok with the glibc counterpart (but don't merge the patches
until the ABI is agreed on both sides).

On performance, I want to make sure there are no regressions on
AArch32/compat and AArch64/LP64.

-- 
Catalin
--
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


[PATCH 2/5] docs: 00-INDEX: consolidate process/ and admin-guide/ description

2016-12-05 Thread Mauro Carvalho Chehab
Instead of having descriptions for individual files inside
the process/ and admin-guide/ documentation, consolidate them
into one entry per directory, just like other descriptions
inside 00-INDEX.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/00-INDEX | 61 --
 1 file changed, 4 insertions(+), 57 deletions(-)

diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index c08de5574d48..02583a1f409c 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -14,13 +14,6 @@ Following translations are available on the WWW:
- this file.
 ABI/
- info on kernel <-> userspace ABI and relative interface stability.
-
-admin-guide/bug-hunting.rst
-   - brute force method of doing binary search of patches to find bug.
-process/changes.rst
-   - list of changes that break older software packages.
-process/coding-style.rst
-   - how the maintainers expect the C code in the kernel to look.
 DMA-API.txt
- DMA API, pci_ API & extensions for non-consistent memory machines.
 DMA-API-HOWTO.txt
@@ -33,8 +26,6 @@ DocBook/
- directory with DocBook templates etc. for kernel documentation.
 EDID/
- directory with info on customizing EDID for broken gfx/displays.
-process/howto.rst
-   - the process and procedures of how to do Linux kernel development.
 IPMI.txt
- info on Linux Intelligent Platform Management Interface (IPMI) Driver.
 IRQ-affinity.txt
@@ -48,32 +39,22 @@ Intel-IOMMU.txt
 Makefile
- This file does nothing. Removing it breaks make htmldocs and
  make distclean.
-process/management-style.rst
-   - how to (attempt to) manage kernel hackers.
 RCU/
- directory with info on RCU (read-copy update).
 SAK.txt
- info on Secure Attention Keys.
 SM501.txt
- Silicon Motion SM501 multimedia companion chip
-admin-guide/security-bugs.rst
-   - procedure for reporting security bugs found in the kernel.
-process/submit-checklist.rst
-   - Linux kernel patch submission checklist.
-process/submitting-drivers.rst
-   - procedure to get a new driver source included into the kernel tree.
-process/submitting-patches.rst
-   - procedure to get a source patch included into the kernel tree.
 VGA-softcursor.txt
- how to change your VGA cursor from a blinking underscore.
 accounting/
- documentation on accounting and taskstats.
 acpi/
- info on ACPI-specific hooks in the kernel.
+admin-guide/
+   - info related to Linux users and system admins.
 aoe/
- description of AoE (ATA over Ethernet) along with config examples.
-process/applying-patches.rst
-   - description of various trees and how to apply their patches.
 arm/
- directory with info about Linux on the ARM architecture.
 arm64/
@@ -86,8 +67,6 @@ auxdisplay/
- misc. LCD driver documentation (cfag12864b, ks0108).
 backlight/
- directory with info on controlling backlights in flat panel displays
-admin-guide/bad-memory.rst
-   - how to use kernel parameters to exclude bad RAM regions.
 basic_profiling.txt
- basic instructions for those who wants to profile Linux kernel.
 bcache.txt
@@ -152,12 +131,8 @@ debugging-via-ohci1394.txt
- how to use firewire like a hardware debugger memory reader.
 dell_rbu.txt
- document demonstrating the use of the Dell Remote BIOS Update driver.
-process/
-   - how to work with the mainline kernel development process.
 device-mapper/
- directory with info on Device Mapper.
-admin-guide/devices.rst
-   - plain ASCII listing of all the nodes in /dev/ with major minor #'s.
 devicetree/
- directory with info on device tree files used by OF/PowerPC/ARM
 digsig.txt
@@ -178,8 +153,6 @@ efi-stub.txt
- How to use the EFI boot stub to bypass GRUB or elilo on EFI systems.
 eisa.txt
- info on EISA bus support.
-process/email-clients.rst
-   - info on how to use e-mail to send un-mangled (git) patches.
 extcon/
- directory with porting guide for Android kernel switch driver.
 fault-injection/
@@ -226,10 +199,6 @@ ia64/
- directory with info about Linux on Intel 64 bit architecture.
 infiniband/
- directory with documents concerning Linux InfiniBand support.
-admin-guide/init.rst
-   - what to do when the kernel can't find the 1st process to run.
-admin-guide/initrd.rst
-   - how to use the RAM disk as an initial/temporary root filesystem.
 input/
- info on Linux input device support.
 intel_txt.txt
@@ -248,20 +217,14 @@ isapnp.txt
- info on Linux ISA Plug & Play support.
 isdn/
- directory with info on the Linux ISDN support, and supported cards.
-admin-guide/java.rst
-   - info on the in-kernel binary support for Java(tm).
 ja_JP/
- directory with Japanese translations of various documents
 kbuild/
- directory with info about the kernel build process.
 kdump/
- dir

[PATCH 3/5] docs: 00-INDEX: add missing entries for documentation files/dirs

2016-12-05 Thread Mauro Carvalho Chehab
Several directories and individual files don't have entries at
00-INDEX. Add them, using, as reference, the initial text inside
the documentation file(s).

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/00-INDEX | 64 ++
 1 file changed, 60 insertions(+), 4 deletions(-)

diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 02583a1f409c..bd532a7e03e6 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -39,6 +39,8 @@ Intel-IOMMU.txt
 Makefile
- This file does nothing. Removing it breaks make htmldocs and
  make distclean.
+PCI/
+   - info related to PCI drivers.
 RCU/
- directory with info on RCU (read-copy update).
 SAK.txt
@@ -93,12 +95,16 @@ cachetlb.txt
- describes the cache/TLB flushing interfaces Linux uses.
 cdrom/
- directory with information on the CD-ROM drivers that Linux has.
-cgroups/
-   - cgroups features, including cpusets and memory controller.
+cgroup-v1/
+   - cgroups v1 features, including cpusets and memory controller.
+cgroup-v2.txt
+   - cgroups v2 features, including cpusets and memory controller.
 circular-buffers.txt
- how to make use of the existing circular buffer infrastructure
 clk.txt
- info on the common clock framework
+cma/
+   - Continuous Memory Area (CMA) debugfs interface.
 coccinelle.txt
- info on how to get and use the Coccinelle code checking tool.
 connector/
@@ -131,8 +137,12 @@ debugging-via-ohci1394.txt
- how to use firewire like a hardware debugger memory reader.
 dell_rbu.txt
- document demonstrating the use of the Dell Remote BIOS Update driver.
+dev-tools/
+   - directory with info on development tools for the kernel.
 device-mapper/
- directory with info on Device Mapper.
+dmaengine/
+   - the DMA engine and controller API guides.
 devicetree/
- directory with info on device tree files used by OF/PowerPC/ARM
 digsig.txt
@@ -141,6 +151,8 @@ dma-buf-sharing.txt
- the DMA Buffer Sharing API Guide
 dontdiff
- file containing a list of files that should never be diff'ed.
+driver-api/
+   - the Linux driver implementer's API guide.
 driver-model/
- directory with info about Linux driver model.
 dynamic-debug-howto.txt
@@ -155,10 +167,14 @@ eisa.txt
- info on EISA bus support.
 extcon/
- directory with porting guide for Android kernel switch driver.
+isa.txt
+   - info on EISA bus support.
 fault-injection/
- dir with docs about the fault injection capabilities infrastructure.
 fb/
- directory with info on the frame buffer graphics abstraction layer.
+features/
+   - status of feature implementation on different architectures.
 filesystems/
- info on the vfs and the various filesystems that Linux supports.
 firmware_class/
@@ -167,14 +183,20 @@ flexible-arrays.txt
- how to make use of flexible sized arrays in linux
 fmc/
- information about the FMC bus abstraction
+fpga/
+   - FPGA Manager Core.
 frv/
- Fujitsu FR-V Linux documentation.
 futex-requeue-pi.txt
- info on requeueing of tasks from a non-PI futex to a PI futex
+gcc-plugins.txt
+   - GCC plugin infrastructure.
 gcov.txt
- use of GCC's coverage testing tool "gcov" with the Linux kernel
 gpio/
- gpio related documentation
+gpu/
+   - directory with information on GPU driver developer's guide.
 hid/
- directory with information on human interface devices
 highuid.txt
@@ -197,6 +219,10 @@ x86/i386/
- directory with info about Linux on Intel 32 bit architecture.
 ia64/
- directory with info about Linux on Intel 64 bit architecture.
+ide/
+   - Information regarding the Enhanced IDE drive.
+iio/
+   - info on industrial IIO configfs support.
 infiniband/
- directory with documents concerning Linux InfiniBand support.
 input/
@@ -221,6 +247,8 @@ ja_JP/
- directory with Japanese translations of various documents
 kbuild/
- directory with info about the kernel build process.
+kernel-doc-nano-HOWTO.txt
+   - outdated info about kernel-doc documentation.
 kdump/
- directory with mini HowTo on getting the crash dump code to work.
 doc-guide/
@@ -247,6 +275,8 @@ ldm.txt
- a brief description of LDM (Windows Dynamic Disks).
 leds/
- directory with info about LED handling under Linux.
+livepatch/
+   - info on kernel live patching.
 local_ops.txt
- semantics and behavior of local atomic operations.
 locking/
@@ -265,16 +295,22 @@ magic-number.txt
- list of magic numbers used to mark/protect kernel data structures.
 mailbox.txt
- How to write drivers for the common mailbox framework (IPC).
-media-framework.txt
-   - info on media framework, its data structures, functions and usage.
+md-cluster.txt
+   - info on shared-device RAID MD cluster.
+media/
+   - info

[PATCH 4/5] docs: 00-INDEX: remove non-existing entries

2016-12-05 Thread Mauro Carvalho Chehab
Several entries were moved to a directory; others got simply
removed. Get rid of those entries.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/00-INDEX | 52 --
 1 file changed, 52 deletions(-)

diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index bd532a7e03e6..272f5c4481f1 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -47,8 +47,6 @@ SAK.txt
- info on Secure Attention Keys.
 SM501.txt
- Silicon Motion SM501 multimedia companion chip
-VGA-softcursor.txt
-   - how to change your VGA cursor from a blinking underscore.
 accounting/
- documentation on accounting and taskstats.
 acpi/
@@ -61,28 +59,18 @@ arm/
- directory with info about Linux on the ARM architecture.
 arm64/
- directory with info about Linux on the 64 bit ARM architecture.
-assoc_array.txt
-   - generic associative array intro.
-atomic_ops.txt
-   - semantics and behavior of atomic and bitmask operations.
 auxdisplay/
- misc. LCD driver documentation (cfag12864b, ks0108).
 backlight/
- directory with info on controlling backlights in flat panel displays
-basic_profiling.txt
-   - basic instructions for those who wants to profile Linux kernel.
 bcache.txt
- Block-layer cache on fast SSDs to improve slow (raid) I/O performance.
-binfmt_misc.txt
-   - info on the kernel support for extra binary formats.
 blackfin/
- directory with documentation for the Blackfin arch.
 block/
- info on the Block I/O (BIO) layer.
 blockdev/
- info on block devices & drivers
-braille-console.txt
-   - info on how to use serial devices for Braille support.
 bt8xxgpio.txt
- info on how to modify a bt8xx video card for GPIO usage.
 btmrvl.txt
@@ -105,8 +93,6 @@ clk.txt
- info on the common clock framework
 cma/
- Continuous Memory Area (CMA) debugfs interface.
-coccinelle.txt
-   - info on how to get and use the Coccinelle code checking tool.
 connector/
- docs on the netlink based userspace<->kernel space communication mod.
 console/
@@ -155,8 +141,6 @@ driver-api/
- the Linux driver implementer's API guide.
 driver-model/
- directory with info about Linux driver model.
-dynamic-debug-howto.txt
-   - how to use the dynamic debug (dyndbg) feature.
 early-userspace/
- info about initramfs, klibc, and userspace early during boot.
 edac.txt
@@ -191,8 +175,6 @@ futex-requeue-pi.txt
- info on requeueing of tasks from a non-PI futex to a PI futex
 gcc-plugins.txt
- GCC plugin infrastructure.
-gcov.txt
-   - use of GCC's coverage testing tool "gcov" with the Linux kernel
 gpio/
- gpio related documentation
 gpu/
@@ -201,8 +183,6 @@ hid/
- directory with information on human interface devices
 highuid.txt
- notes on the change from 16 bit to 32 bit user/group IDs.
-hsi.txt
-   - HSI subsystem overview.
 hwspinlock.txt
- hardware spinlock provides hardware assistance for synchronization
 timers/
@@ -213,8 +193,6 @@ hwmon/
- directory with docs on various hardware monitoring drivers.
 i2c/
- directory with info about the I2C bus/protocol (2 wire, kHz speed).
-i2o/
-   - directory with info about the Linux I2O subsystem.
 x86/i386/
- directory with info about Linux on Intel 32 bit architecture.
 ia64/
@@ -243,8 +221,6 @@ isapnp.txt
- info on Linux ISA Plug & Play support.
 isdn/
- directory with info on the Linux ISDN support, and supported cards.
-ja_JP/
-   - directory with Japanese translations of various documents
 kbuild/
- directory with info about the kernel build process.
 kernel-doc-nano-HOWTO.txt
@@ -255,12 +231,6 @@ doc-guide/
- how to write and format reStructuredText kernel documentation
 kernel-per-CPU-kthreads.txt
- List of all per-CPU kthreads and how they introduce jitter.
-kmemcheck.txt
-   - info on dynamic checker that detects uses of uninitialized memory.
-kmemleak.txt
-   - info on how to make use of the kernel memory leak detection system
-ko_KR/
-   - directory with Korean translations of various documents
 kobject.txt
- info of the kobject infrastructure of the Linux kernel.
 kprobes.txt
@@ -277,8 +247,6 @@ leds/
- directory with info about LED handling under Linux.
 livepatch/
- info on kernel live patching.
-local_ops.txt
-   - semantics and behavior of local atomic operations.
 locking/
- directory with info about kernel locking primitives
 lockup-watchdogs.txt
@@ -291,8 +259,6 @@ lzo.txt
- kernel LZO decompressor input formats
 m68k/
- directory with info about Linux on Motorola 68k architecture.
-magic-number.txt
-   - list of magic numbers used to mark/protect kernel data structures.
 mailbox.txt
- How to write drivers for the common mailbox framework (IPC).
 md-cluster.txt
@@ -319,8 +2

[PATCH 5/5] docs: 00-INDEX: document directories/files with no docs

2016-12-05 Thread Mauro Carvalho Chehab
There are a number of files/directories that don't contain
any documentation. They're related to ReST file conversion.

As a matter of completeness, since Makefile is also documented
there, add an entry for those files too.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/00-INDEX | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 272f5c4481f1..6d488509285d 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -14,6 +14,8 @@ Following translations are available on the WWW:
- this file.
 ABI/
- info on kernel <-> userspace ABI and relative interface stability.
+CodingStyle
+   - nothing here, just a pointer to process/coding-style.rst.
 DMA-API.txt
- DMA API, pci_ API & extensions for non-consistent memory machines.
 DMA-API-HOWTO.txt
@@ -39,6 +41,9 @@ Intel-IOMMU.txt
 Makefile
- This file does nothing. Removing it breaks make htmldocs and
  make distclean.
+Makefile.sphinx
+   - This file does nothing. Removing it breaks make htmldocs and
+ make distclean.
 PCI/
- info related to PCI drivers.
 RCU/
@@ -47,6 +52,8 @@ SAK.txt
- info on Secure Attention Keys.
 SM501.txt
- Silicon Motion SM501 multimedia companion chip
+SubmittingPatches
+   - nothing here, just a pointer to process/coding-style.rst.
 accounting/
- documentation on accounting and taskstats.
 acpi/
@@ -93,6 +100,8 @@ clk.txt
- info on the common clock framework
 cma/
- Continuous Memory Area (CMA) debugfs interface.
+conf.py
+   - nothing here. Just a configuration file for Sphinx.
 connector/
- docs on the netlink based userspace<->kernel space communication mod.
 console/
@@ -135,6 +144,8 @@ digsig.txt
-info on the Digital Signature Verification API
 dma-buf-sharing.txt
- the DMA Buffer Sharing API Guide
+docutils.conf
+   - nothing here. Just a configuration file for docutils.
 dontdiff
- file containing a list of files that should never be diff'ed.
 driver-api/
@@ -201,6 +212,8 @@ ide/
- Information regarding the Enhanced IDE drive.
 iio/
- info on industrial IIO configfs support.
+index.rst
+   - main index for the documentation at ReST format.
 infiniband/
- directory with documents concerning Linux InfiniBand support.
 input/
@@ -307,6 +320,8 @@ nvdimm/
- info on non-volatile devices.
 nvmem/
- info on non volatile memory framework.
+output/
+   - default directory where html/LaTeX/pdf files will be written.
 padata.txt
- An introduction to the "padata" parallel execution API
 parisc/
@@ -387,6 +402,10 @@ sound/
- directory with info on sound card support.
 spi/
- overview of Linux kernel Serial Peripheral Interface (SPI) support.
+sphinx/
+   - no doumentation here, just files required by Sphinx toolchain.
+sphinx-static/
+   - no doumentation here, just files required by Sphinx toolchain.
 static-keys.txt
- info on how static keys allow debug code in hotpaths via patching
 svga.txt
-- 
2.9.3


--
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


[PATCH 0/5] Update Documentation/00-INDEX

2016-12-05 Thread Mauro Carvalho Chehab
Keeping a manually filled index over time is not perfect, as people often
forget to keep the index file updated.

As Brian noticed, the recent conversion to ReST caused some new
issues. It turns, however, that the problem with this file predates the
ReST conversion, as several entries were missing, including really old
ones like PCI/ and isa.txt.

Well, after converting everything to ReST file, the 00-INDEX one will
become obsoleted by index.rst, but, as there are still a lot stuff
to do, it will take some time.

So, in order to check it, I wrote a small script that compares the files
and directories at Documentation/ with the ones at 00-INDEX.

Then, I synchronized the entries, making the script happy.

We might think on integrating the script with checkpatch.pl, but, as
we should get rid of 00-INDEX, it probably not worth the efforts.

Mauro Carvalho Chehab (5):
  scripts: add a script to check if Documentation/00-INDEX is sane
  docs: 00-INDEX: consolidate process/ and admin-guide/ description
  docs: 00-INDEX: add missing entries for documentation files/dirs
  docs: 00-INDEX: remove non-existing entries
  docs: 00-INDEX: document directories/files with no docs

 Documentation/00-INDEX   | 196 ---
 scripts/check_00index.sh |  66 
 2 files changed, 149 insertions(+), 113 deletions(-)
 create mode 100755 scripts/check_00index.sh

-- 
2.9.3


--
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


[PATCH 1/5] scripts: add a script to check if Documentation/00-INDEX is sane

2016-12-05 Thread Mauro Carvalho Chehab
It is easy to forget adding/removing entries at the
Documentation/00-INDEX file. In a matter of fact, even before
ReST conversion, people use to forget adding things here, as
there are lots of missing stuff out there.

Now that we're doing a hard work converting entries to ReST,
and while this hole file is not outdated, it is good to have
some tool that would help to verify that this file is kept
updated.

Signed-off-by: Mauro Carvalho Chehab 
---
 scripts/check_00index.sh | 66 
 1 file changed, 66 insertions(+)
 create mode 100755 scripts/check_00index.sh

diff --git a/scripts/check_00index.sh b/scripts/check_00index.sh
new file mode 100755
index ..6ac9527aeddb
--- /dev/null
+++ b/scripts/check_00index.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+cd Documentation/
+
+# Check entries that should be removed
+
+obsolete=""
+for i in $(tail -n +12 00-INDEX |grep -E '^[a-zA-Z0-9]+'); do
+   if [ ! -e $i ]; then
+   obsolete="$obsolete $i"
+   fi
+done
+
+# Check directory entries that should be added
+search=""
+dir=""
+for i in $(find . -maxdepth 1 -type d); do
+   if [ "$i" != "." ]; then
+   new=$(echo $i|perl -ne 's,./(.*),$1/,; print $_')
+   search="$search $new"
+   fi
+done
+
+for i in $search; do
+   if [ "$(grep -P "^$i" 00-INDEX)" == "" ]; then
+   dir="$dir $i"
+   fi
+done
+
+# Check file entries that should be added
+search=""
+file=""
+for i in $(find . -maxdepth 1 -type f); do
+   if [ "$i" != "./.gitignore" ]; then
+   new=$(echo $i|perl -ne 's,./(.*),$1,; print $_')
+   search="$search $new"
+   fi
+done
+
+for i in $search; do
+   if [ "$(grep -P "^$i\$" 00-INDEX)" == "" ]; then
+   file="$file $i"
+   fi
+done
+
+# Output its findings
+
+echo -e "Documentation/00-INDEX check results:\n"
+
+if [ "$obsolete" != "" ]; then
+   echo -e "- Should remove those entries:\n\t$obsolete\n"
+else
+   echo -e "- No obsolete entries\n"
+fi
+
+if [ "$dir" != "" ]; then
+   echo -e "- Should document those directories:\n\t$dir\n"
+else
+   echo -e "- No new directories to add\n"
+fi
+
+if [ "$file" != "" ]; then
+   echo -e "- Should document those files:\n\t$file"
+else
+   echo "- No new files to add"
+fi
-- 
2.9.3


--
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: doc movements -> 00-INDEX is out of date

2016-12-05 Thread Mauro Carvalho Chehab
Hi Brian,

Em Fri, 2 Dec 2016 11:27:02 -0800
Brian Norris  escreveu:

> Hi Mauro,
> 
> I was browsing Documentation/ on linux-next and noticed that
> Documentation/00-INDEX now points to .txt files that are no longer
> there. e.g., this commit:
> 
> 9d85025b0418 docs-rst: create an user's manual book
> 
> rename from Documentation/sysrq.txt
> rename to Documentation/admin-guide/sysrq.rst
> 
> But I still see this index entry:
> 
> sysrq.txt
> - info on the magic SysRq key.
> 
> It looks like there's plenty more where that came from.
> 
> Just an FYI; I understand with the RST rewrites, a lot of stuff might
> need changed.

Thanks for noticing! Yeah, 00-INDEX require some care, as it is not
in sync with the changes. There are actually a lot more missing
there than just the ReST file conversions.

I'm submitting a series of patches to sync it, together with a
simple script that checks if it looks ok.

Regards,
Mauro
--
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: ILP32 for ARM64: testing with glibc testsuite

2016-12-05 Thread Zhangjian (Bamvor)



On 2016/12/5 18:07, Andreas Schwab wrote:

On Dez 05 2016, "Zhangjian (Bamvor)"  wrote:


Is there some progresses on it? We could collabrate to fix those issues.


All the elf/nptl/rt fails should be fixed by the recent binutils fixes.

Cool. How about the conform and other failures?

Regards

Bamvor


Andreas.



--
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: ILP32 for ARM64 - testing with lmbench

2016-12-05 Thread Zhangjian (Bamvor)

Hi, Catalin, Guys

Do you have suggestion of next move of upstreaming ILP32?
There are already the test results of lmbench and specint. Do you they are ok 
or need more data to prove no regression?
I have also noticed that there are ILP32 failures in glibc testsuite. Is it the 
only blocker for merge ILP32(in technology part)?

We appreciate any feedback/suggestion and hope could collaborate to improve the 
upstream progress.

(cc libc-alpha to get more input).

Thanks

Bamvor

On 2016/11/17 15:48, Zhangjian (Bamvor) wrote:

Hi, Maxim

On 2016/11/17 13:02, Maxim Kuvyrkov wrote:

Hi Bamvor,

I'm surprised that you see this much difference from ILP32 patches on SPEC 
CPU2006int at all.  The SPEC CPU2006 benchmarks spend almost no time in the 
kernel syscalls.  I can imagine memory, TLB,
and cache handling in the kernel could affect CPU2006 benchmarks.  Do ILP32 
patches touch code in those areas?

Other than that, it would be interesting to check what the variance is between 
the 3 iterations of benchmark runs.  Could you check what relative standard 
deviation is between the 3 iterations --
(STDEV(RUN1, RUN2, RUN3) / RUNselected)?

For reference, in my [non-ILP32] benchmarking I see 1.1% for 401.bzip2,  0.8% 
for 429.mcf, 0.2% for 456.hmmer, and 0.1% for 462.libquantum.

Here is my result:
ILP32_mergedILP32_unmerged
  401.bzip20.31%0.26%
  429.mcf  1.61%1.36%
  456.hmmer1.37%1.57%
  462.libquantum   0.29%0.28%

Regards

Bamvor



--
Maxim Kuvyrkov
www.linaro.org




On Nov 17, 2016, at 7:28 AM, Zhangjian (Bamvor)  
wrote:

Hi, all

I test specint of aarch64 LP64 when aarch32 el0 disable/enabled respectively
and compare with ILP32 unmerged kernel(4.8-rc6) in our arm64 board. I found
that difference(ILP32 disabled/ILP32 unmerged) is bigger when aarch32 el0 is
enabled, compare with aarch32 el0 disabled kernel. And bzip2, mcg, hmmer,
libquantum are the top four differences[1]. Note that bigger is better in
specint test.

In order to make sure the above results, I retest these four testcases in
reportable way(reference the command in the end). The result[2] show that
libquantum decrease -2.09% after ILP32 enabled and aarch32 on. I think it is in
significant.

The result of lmbench is not stable in my board. I plan to dig it later.

[1] The following test result is tested through --size=ref --iterations=3.
1.1 Test when aarch32_el0 is enabled.
   ILP32 disabledbase line
 400.perlbench100.00% 100%
 401.bzip2 99.35% 100%
 403.gcc  100.26% 100%
 429.mcf  102.75% 100%
 445.gobmk100.00% 100%
 456.hmmer 95.66% 100%
 458.sjeng100.00% 100%
 462.libquantum   100.00% 100%
 471.omnetpp  100.59% 100%
 473.astar 99.66% 100%
 483.xalancbmk 99.10% 100%

1.2 Test when aarch32_el0 is disabled
   ILP32 disabled base line
 400.perlbench100.22%  100%
 401.bzip2100.95%  100%
 403.gcc  100.20%  100%
 429.mcf  100.76%  100%
 445.gobmk100.36%  100%
 456.hmmer 97.94%  100%
 458.sjeng 99.73%  100%
 462.libquantum98.72%  100%
 471.omnetpp  100.86%  100%
 473.astar 99.15%  100%
 483.xalancbmk100.08%  100%

[2] The following test result is tested through: runspec --config=my.cfg 
--size=test,train,ref --noreportable --tune=base,peak --iterations=3 bzip2 mcf 
hmmer libquantum
2.1 Test when aarch32_el0 is enabled.
ILP32_enabled base line
 401.bzip2100.82%  100%
 429.mcf  100.18%  100%
 456.hmmer 99.64%  100%
 462.libquantum97.91%  100%

Regards

Bamvor

On 2016/10/28 20:46, Yury Norov wrote:

[Add Steve Ellcey, thanks for testing on ThunderX]

Lmbench-3.0-a9 testing is performed on ThunderX machine to check that
ILP32 series does not add performance regressions for LP64. Test
summary is in the table below. Our measurements doesn't show
significant performance regression of LP64 if ILP32 code is merged,
both enabled or disabled.

  ILP32 enabled   ILP32  disabled   Standard Kernel
null syscall   0.1066  0.11210.1121
  95.09%  100.00%

stat   1.3947  1.38141.3864
  

Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board

2016-12-05 Thread Maxime Ripard
On Fri, Dec 02, 2016 at 10:22:30PM +0800, Icenowy Zheng wrote:
> 
> 
> 01.12.2016, 17:36, "Maxime Ripard" :
> > On Mon, Nov 28, 2016 at 12:29:07AM +, André Przywara wrote:
> >>  > Something more interesting happened.
> >>  >
> >>  > Xunlong made a add-on board for Orange Pi Zero, which exposes the
> >>  > two USB Controllers exported at expansion bus as USB Type-A
> >>  > connectors.
> >>  >
> >>  > Also it exposes a analog A/V jack and a microphone.
> >>  >
> >>  > Should I enable {e,o}hci{2.3} in the device tree?
> >>
> >>  Actually we should do this regardless of this extension board. The USB
> >>  pins are not multiplexed and are exposed on user accessible pins (just
> >>  not soldered, but that's a detail), so I think they qualify for DT
> >>  enablement. And even if a user can't use them, it doesn't hurt to have
> >>  them (since they are not multiplexed).
> >
> > My main concern about this is that we'll leave regulators enabled by
> > default, for a minority of users. And that minority will prevent to do
> > a proper power management when the times come since we'll have to keep
> > that behaviour forever.
> 
> I think these users can add a 'fdt set /xxx/xxx status "disabled" ' .

You can't ask that from the majority of users. These users will take
debian or fedora, install it, and expect everything to work
properly. I would make the opposite argument actually. If someone is
knowledgeable enough to solder the USB pins a connector, then (s)he'll
be able to make that u-boot call.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


signature.asc
Description: PGP signature


Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board

2016-12-05 Thread Maxime Ripard
On Fri, Dec 02, 2016 at 04:10:46PM +, Andre Przywara wrote:
> Hi,
> 
> On 02/12/16 14:32, Icenowy Zheng wrote:
> > 
> > 
> > 02.12.2016, 22:30, "Hans de Goede" :
> >> Hi,
> >>
> >> On 02-12-16 15:22, Icenowy Zheng wrote:
> >>>  01.12.2016, 17:36, "Maxime Ripard" :
>   On Mon, Nov 28, 2016 at 12:29:07AM +, André Przywara wrote:
> >   > Something more interesting happened.
> >   >
> >   > Xunlong made a add-on board for Orange Pi Zero, which exposes the
> >   > two USB Controllers exported at expansion bus as USB Type-A
> >   > connectors.
> >   >
> >   > Also it exposes a analog A/V jack and a microphone.
> >   >
> >   > Should I enable {e,o}hci{2.3} in the device tree?
> >
> >   Actually we should do this regardless of this extension board. The USB
> >   pins are not multiplexed and are exposed on user accessible pins (just
> >   not soldered, but that's a detail), so I think they qualify for DT
> >   enablement. And even if a user can't use them, it doesn't hurt to have
> >   them (since they are not multiplexed).
> 
>   My main concern about this is that we'll leave regulators enabled by
>   default, for a minority of users. And that minority will prevent to do
>   a proper power management when the times come since we'll have to keep
>   that behaviour forever.
> >>>
> >>>  I think these users can add a 'fdt set /xxx/xxx status "disabled" ' .
> >>
> >> I don't think that will be necessary I'm pretty sure these extra usb
> >> ports do not have a regulator for the Vbus, they just hook directly
> >> to the 5V rail, can someone with a schematic check ?
> > 
> > We seems to have still no schematics for the add-on board.
> 
> From looking at the picture of that expansion board on the Aliexpress
> page and chasing the tracks, there is clearly no voltage regulator on
> there, it's just passive components. The 5V pin from the headers is
> routed forth and back between the two layers via some vias directly to
> the 5V pins of the USB sockets.
> 
> > But something is sure is that there's no any regulator-related pins
> > on the add-on pinout. There's only USB DM and DP pins.
> > 
> > So the Vbus must be directly connected to +5V.
> 
> So yes, it is.
> 
> But I think the question is moot anyways, since we don't provide DT
> support for that add-on board at that point anyways.
> One could imagine another board, though, which has regulators switched
> by GPIOs, but that would be their problem and they would have regulators
> specified in their specific DT snippet, then.
> 
> So to summarize:
> - For that specific Orange Pi Zero board which we discuss the DT for
> there is no regulator support for the additional USB ports. Thus nothing
> we could turn off to save power.
> - A user could just take these USB brackets with pin headers that are so
> common in PCs to connect additional USB ports to the back of the box.
> One just needs to re-sort the pins, which is a matter of a minute.
> - As long as we don't provide any easy way of handling DT changes, we
> should enable the USB ports for the sake of the users of either those
> brackets or the expansion board. Any more sophisticated USB expansion
> board with regulators would need to amend the DT anyway.

I disagree with this. We already have different ways of changing the
DT at runtime, and even if we didn't I'd still disagree. Once you add
that, there's simply no going back. Saying "let's enable it and we'll
figure it out later" doesn't work, and is essentially a "enable it".

So what you're suggesting is to have those regulators enabled forever,
which might be the case on that board anyway, but definitely shouldn't
be policy.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


signature.asc
Description: PGP signature


Re: ILP32 for ARM64: testing with glibc testsuite

2016-12-05 Thread Zhangjian (Bamvor)

Hi, Steve

On 2016/11/18 5:45, Steve Ellcey wrote:

On Wed, 2016-11-16 at 15:22 +0400, Maxim Kuvyrkov wrote:


On Nov 9, 2016, at 1:56 PM, Yury Norov 
wrote:



Below is the results of glibc testsuite run for aarch64/lp64


I have been running the glibc testsuite as well.  I have only run it on
an ILP32 enabled kernel.  Using that kernel, top-of-tree glibc, and the
ILP32 glibc patches I have no LP64 regressions.  There are 5 failures
in LP64 mode but I get them with vanilla top-of-tree glibc sources too.
They are:
nptl/eintr1 (I actually don't run this because it kills the 'make 
check')
debug/tst-backtrace5
debug/tst-backtrace6
nptl/tst-stack4
nptl/tst-thread_local1

In ILP32 mode I get 33 failures, they include the above failures (minus
nptl/tst-thread_local1) plus:

c++-types-check
conform/ISO11/inttypes.h/conform
conform/ISO11/stdint.h/conform
conform/ISO99/inttypes.h/conform
conform/ISO99/stdint.h/conform
conform/POSIX2008/inttypes.h/conform
conform/POSIX2008/stdint.h/conform
conform/XOPEN2K/inttypes.h/conform
conform/XOPEN2K/stdint.h/conform
conform/XOPEN2K8/inttypes.h/conform
conform/XOPEN2K8/stdint.h/conform
elf/tst-tls1
elf/tst-tls1-static
elf/tst-tls2
elf/tst-tls2-static
elf/tst-tls3
math/check-abi-libm
math/test-double
math/test-double-finite
math/test-float
math/test-float-finite
misc/tst-sync_file_range
nptl/tst-cancel26
nptl/tst-cancel27
nptl/tst-sem3
rt/tst-mqueue1
rt/tst-mqueue2
rt/tst-mqueue4
rt/tst-mqueue7
stdlib/tst-makecontext3

I am currently looking at these ILP32 regressions (starting with the
tls failures) to see if I can figure out what is happening with them.

Is there some progresses on it? We could collabrate to fix those issues.

Regards

Bamvor


Steve Ellcey
sell...@caviumnetworks.com



--
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: ILP32 for ARM64: testing with glibc testsuite

2016-12-05 Thread Andreas Schwab
On Dez 05 2016, "Zhangjian (Bamvor)"  wrote:

> Is there some progresses on it? We could collabrate to fix those issues.

All the elf/nptl/rt fails should be fixed by the recent binutils fixes.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
--
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


[PATCH v2 0/6] net: stmmac: make DMA programmable burst length more configurable

2016-12-05 Thread Niklas Cassel
From: Niklas Cassel 

Make DMA programmable burst length more configurable in the stmmac driver.

This is done by adding support for independent pbl for tx/rx through DT.
More fine grained tuning of pbl is possible thanks to a DT property saying
that we should NOT multiply pbl values by x8/x4 in hardware.

All new DT properties are optional, and created in a way that it will not
affect any existing DT configurations.

Changes since V1:
Created cover-letter.
Rebased patch set against next-20161205, since conflicting patches to
stmmac_platform.c has been merged since V1.


Niklas Cassel (6):
  net: stmmac: return error if no DMA configuration is found
  net: stmmac: simplify the common DMA init API
  net: stmmac: stmmac_platform: fix parsing of DT binding
  net: stmmac: dwmac1000: fix define DMA_BUS_MODE_RPBL_MASK
  net: stmmac: add support for independent DMA pbl for tx/rx
  net: smmac: allow configuring lower pbl values

 Documentation/devicetree/bindings/net/stmmac.txt   |  8 +-
 Documentation/networking/stmmac.txt| 24 -
 drivers/net/ethernet/stmicro/stmmac/common.h   |  4 +--
 drivers/net/ethernet/stmicro/stmmac/dwmac1000.h|  2 +-
 .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c| 26 ++-
 drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c |  7 ++---
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c   | 25 ++
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  | 17 ++--
 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c   |  2 ++
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c  | 30 --
 include/linux/stmmac.h |  3 +++
 11 files changed, 89 insertions(+), 59 deletions(-)

-- 
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: [linux-sunxi] [PATCH v3 -next 2/2] ARM: dts: sunxi: add support for Orange Pi Zero board

2016-12-05 Thread Maxime Ripard
Hi Icenowy,

On Sat, Dec 03, 2016 at 09:24:19PM +0800, Icenowy Zheng wrote:
> 
> 2016年12月3日 下午5:43于 Jernej Skrabec 
> 写道:
> >
> > Hi,
> >
> > Dne petek, 02. december 2016 17.42.04 UTC+1 je oseba Chen-Yu Tsai 
> napisala:
> >>
> >> Hi, 
> >>
> >> On Fri, Dec 2, 2016 at 11:05 PM, Icenowy Zheng 
>  wrote: 
> >> > Orange Pi Zero is a board that came with the new Allwinner H2+ 
> SoC and a 
> >> > SDIO Wi-Fi chip by Allwinner (XR819). 
> >> > 
> >> > Add a device tree file for it. 
> >> > 
> >> > Signed-off-by: Icenowy Zheng  

Please make sure to disable the HTML replies, this is what your mail
looks like on a !HTML MUA :)

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


signature.asc
Description: PGP signature


Re: [PATCH v2 2/3] ARM: dts: sunxi: add support for Orange Pi Zero board

2016-12-05 Thread Maxime Ripard
On Mon, Dec 05, 2016 at 04:59:44PM +0800, Icenowy Zheng wrote:
> 
> 2016年12月5日 16:52于 Maxime Ripard 写道:
> >
> > On Fri, Dec 02, 2016 at 10:22:30PM +0800, Icenowy Zheng wrote: 
> > > 
> > > 
> > > 01.12.2016, 17:36, "Maxime Ripard" : 
> > > > On Mon, Nov 28, 2016 at 12:29:07AM +, André Przywara wrote: 
> > > >>  > Something more interesting happened. 
> > > >>  > 
> > > >>  > Xunlong made a add-on board for Orange Pi Zero, which exposes the 
> > > >>  > two USB Controllers exported at expansion bus as USB Type-A 
> > > >>  > connectors. 
> > > >>  > 
> > > >>  > Also it exposes a analog A/V jack and a microphone. 
> > > >>  > 
> > > >>  > Should I enable {e,o}hci{2.3} in the device tree? 
> > > >> 
> > > >>  Actually we should do this regardless of this extension board. The 
> > > >> USB 
> > > >>  pins are not multiplexed and are exposed on user accessible pins 
> > > >> (just 
> > > >>  not soldered, but that's a detail), so I think they qualify for DT 
> > > >>  enablement. And even if a user can't use them, it doesn't hurt to 
> > > >> have 
> > > >>  them (since they are not multiplexed). 
> > > > 
> > > > My main concern about this is that we'll leave regulators enabled by 
> > > > default, for a minority of users. And that minority will prevent to do 
> > > > a proper power management when the times come since we'll have to keep 
> > > > that behaviour forever. 
> > > 
> > > I think these users can add a 'fdt set /xxx/xxx status "disabled" ' . 
> >
> > You can't ask that from the majority of users. These users will take 
> > debian or fedora, install it, and expect everything to work 
> > properly. I would make the opposite argument actually. If someone is 
> > knowledgeable enough to solder the USB pins a connector, then (s)he'll 
> > be able to make that u-boot call. 
> 
> Now (s)he do not need soldering.
> 
> (S)he needs only paying $1.99 more to Xunlong to get the expansion
> board, and insert it on the OPi Zero.

Which is going to require an overlay anyway, so we could have the USB
bits in there too.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


signature.asc
Description: PGP signature


Re: [PATCH v3 -next 1/2] ARM: sunxi: add support for H2+ SoC

2016-12-05 Thread Maxime Ripard
On Fri, Dec 02, 2016 at 11:05:12PM +0800, Icenowy Zheng wrote:
> Allwinner H2+ is a quad-core Cortex-A7 SoC.
> 
> It is very like H3, that they share the same SoC ID (0x1680), and H3
> memory maps as well as drivers works well on the SoC.
> 
> Signed-off-by: Icenowy Zheng 

Fixed the alphabetical order in the bindings doc, and applied.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


signature.asc
Description: PGP signature


[PATCH v2 6/6] net: smmac: allow configuring lower pbl values

2016-12-05 Thread Niklas Cassel
From: Niklas Cassel 

The driver currently always sets the PBLx8/PBLx4 bit, which means that
the pbl values configured via the pbl/txpbl/rxpbl DT properties are
always multiplied by 8/4 in the hardware.

In order to allow the DT to configure lower pbl values, while at the
same time not changing behavior of any existing device trees using the
pbl/txpbl/rxpbl settings, add a property to disable the multiplication
of the pbl by 8/4 in the hardware.

Suggested-by: Rabin Vincent 
Signed-off-by: Niklas Cassel 
---
 Documentation/devicetree/bindings/net/stmmac.txt  | 2 ++
 Documentation/networking/stmmac.txt   | 5 -
 drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c   | 3 ++-
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c  | 3 ++-
 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c  | 2 ++
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1 +
 include/linux/stmmac.h| 1 +
 7 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/stmmac.txt 
b/Documentation/devicetree/bindings/net/stmmac.txt
index a3dc1453dffb..1fb3c309c558 100644
--- a/Documentation/devicetree/bindings/net/stmmac.txt
+++ b/Documentation/devicetree/bindings/net/stmmac.txt
@@ -39,6 +39,8 @@ Optional properties:
If set, DMA tx will use this value rather than snps,pbl.
 - snps,rxpbl   Rx Programmable Burst Length. Only for GMAC and newer.
If set, DMA rx will use this value rather than snps,pbl.
+- snps,no-pbl-x8   Don't multiply the pbl/txpbl/rxpbl values by 8.
+   For core rev < 3.50, don't multiply the values by 4.
 - snps,aal Address-Aligned Beats
 - snps,fixed-burst Program the DMA to use the fixed burst mode
 - snps,mixed-burst Program the DMA to use the mixed burst mode
diff --git a/Documentation/networking/stmmac.txt 
b/Documentation/networking/stmmac.txt
index 6add57374f70..2bb07078f535 100644
--- a/Documentation/networking/stmmac.txt
+++ b/Documentation/networking/stmmac.txt
@@ -152,8 +152,9 @@ Where:
  o dma_cfg: internal DMA parameters
o pbl: the Programmable Burst Length is maximum number of beats to
be transferred in one DMA transaction.
-   GMAC also enables the 4xPBL by default.
+   GMAC also enables the 4xPBL by default. (8xPBL for GMAC 3.50 and newer)
o txpbl/rxpbl: GMAC and newer supports independent DMA pbl for tx/rx.
+   o pblx8: Enable 8xPBL (4xPBL for core rev < 3.50). Enabled by default.
o fixed_burst/mixed_burst/aal
  o clk_csr: fixed CSR Clock range selection.
  o has_gmac: uses the GMAC core.
@@ -208,6 +209,7 @@ struct stmmac_dma_cfg {
int pbl;
int txpbl;
int rxpbl;
+   bool pblx8;
int fixed_burst;
int mixed_burst;
bool aal;
@@ -219,6 +221,7 @@ Where:
 If set, DMA tx will use this value rather than pbl.
  o rxpbl: Receive Programmable Burst Length. Only for GMAC and newer.
 If set, DMA rx will use this value rather than pbl.
+ o pblx8: Enable 8xPBL (4xPBL for core rev < 3.50). Enabled by default.
  o fixed_burst: program the DMA to use the fixed burst mode
  o mixed_burst: program the DMA to use the mixed burst mode
  o aal: Address-Aligned Beats
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c 
b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
index 1dd34fb4c1a9..1d313af647b4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
@@ -96,7 +96,8 @@ static void dwmac1000_dma_init(void __iomem *ioaddr,
 * Note: before stmmac core 3.50 this mode bit was 4xPBL, and
 * post 3.5 mode bit acts as 8*PBL.
 */
-   value |= DMA_BUS_MODE_MAXPBL;
+   if (dma_cfg->pblx8)
+   value |= DMA_BUS_MODE_MAXPBL;
value |= DMA_BUS_MODE_USP;
value &= ~(DMA_BUS_MODE_PBL_MASK | DMA_BUS_MODE_RPBL_MASK);
value |= (txpbl << DMA_BUS_MODE_PBL_SHIFT);
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 
b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
index 0bf47825bfeb..0f7110d19a4a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
@@ -82,7 +82,8 @@ static void dwmac4_dma_init_channel(void __iomem *ioaddr,
 * on each channel
 */
value = readl(ioaddr + DMA_CHAN_CONTROL(channel));
-   value = value | DMA_BUS_MODE_PBL;
+   if (dma_cfg->pblx8)
+   value = value | DMA_BUS_MODE_PBL;
writel(value, ioaddr + DMA_CHAN_CONTROL(channel));
 
value = readl(ioaddr + DMA_CHAN_TX_CONTROL(channel));
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c 
b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index 56c8a2342c14..a2831773431a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -81,6 +81,7 @@ 

[PATCH v2 5/6] net: stmmac: add support for independent DMA pbl for tx/rx

2016-12-05 Thread Niklas Cassel
From: Niklas Cassel 

GMAC and newer supports independent programmable burst lengths for
DMA tx/rx. Add new optional devicetree properties representing this.

To be backwards compatible, snps,pbl will still be valid, but
snps,txpbl/snps,rxpbl will override the value in snps,pbl if set.

If the IP is synthesized to use the AXI interface, there is a register
and a matching DT property inside the optional stmmac-axi-config DT node
for controlling burst lengths, named snps,blen.
However, using this register, it is not possible to control tx and rx
independently. Also, this register is not available if the IP was
synthesized with, e.g., the AHB interface.

Signed-off-by: Niklas Cassel 
---
 Documentation/devicetree/bindings/net/stmmac.txt  |  6 +-
 Documentation/networking/stmmac.txt   | 19 +--
 drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c   | 12 ++--
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c  | 12 +++-
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c |  2 ++
 include/linux/stmmac.h|  2 ++
 6 files changed, 35 insertions(+), 18 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/stmmac.txt 
b/Documentation/devicetree/bindings/net/stmmac.txt
index 41b49e6075f5..a3dc1453dffb 100644
--- a/Documentation/devicetree/bindings/net/stmmac.txt
+++ b/Documentation/devicetree/bindings/net/stmmac.txt
@@ -34,7 +34,11 @@ Optional properties:
   platforms.
 - tx-fifo-depth: See ethernet.txt file in the same directory
 - rx-fifo-depth: See ethernet.txt file in the same directory
-- snps,pbl Programmable Burst Length
+- snps,pbl Programmable Burst Length (tx and rx)
+- snps,txpbl   Tx Programmable Burst Length. Only for GMAC and newer.
+   If set, DMA tx will use this value rather than snps,pbl.
+- snps,rxpbl   Rx Programmable Burst Length. Only for GMAC and newer.
+   If set, DMA rx will use this value rather than snps,pbl.
 - snps,aal Address-Aligned Beats
 - snps,fixed-burst Program the DMA to use the fixed burst mode
 - snps,mixed-burst Program the DMA to use the mixed burst mode
diff --git a/Documentation/networking/stmmac.txt 
b/Documentation/networking/stmmac.txt
index 014f4f756cb7..6add57374f70 100644
--- a/Documentation/networking/stmmac.txt
+++ b/Documentation/networking/stmmac.txt
@@ -153,7 +153,8 @@ Where:
o pbl: the Programmable Burst Length is maximum number of beats to
be transferred in one DMA transaction.
GMAC also enables the 4xPBL by default.
-   o fixed_burst/mixed_burst/burst_len
+   o txpbl/rxpbl: GMAC and newer supports independent DMA pbl for tx/rx.
+   o fixed_burst/mixed_burst/aal
  o clk_csr: fixed CSR Clock range selection.
  o has_gmac: uses the GMAC core.
  o enh_desc: if sets the MAC will use the enhanced descriptor structure.
@@ -205,16 +206,22 @@ tuned according to the HW capabilities.
 
 struct stmmac_dma_cfg {
int pbl;
+   int txpbl;
+   int rxpbl;
int fixed_burst;
-   int burst_len_supported;
+   int mixed_burst;
+   bool aal;
 };
 
 Where:
- o pbl: Programmable Burst Length
+ o pbl: Programmable Burst Length (tx and rx)
+ o txpbl: Transmit Programmable Burst Length. Only for GMAC and newer.
+If set, DMA tx will use this value rather than pbl.
+ o rxpbl: Receive Programmable Burst Length. Only for GMAC and newer.
+If set, DMA rx will use this value rather than pbl.
  o fixed_burst: program the DMA to use the fixed burst mode
- o burst_len: this is the value we put in the register
- supported values are provided as macros in
- linux/stmmac.h header file.
+ o mixed_burst: program the DMA to use the mixed burst mode
+ o aal: Address-Aligned Beats
 
 ---
 
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c 
b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
index 01d0d0f315e5..1dd34fb4c1a9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
@@ -87,20 +87,20 @@ static void dwmac1000_dma_init(void __iomem *ioaddr,
   u32 dma_tx, u32 dma_rx, int atds)
 {
u32 value = readl(ioaddr + DMA_BUS_MODE);
+   int txpbl = dma_cfg->txpbl ?: dma_cfg->pbl;
+   int rxpbl = dma_cfg->rxpbl ?: dma_cfg->pbl;
 
/*
 * Set the DMA PBL (Programmable Burst Length) mode.
 *
 * Note: before stmmac core 3.50 this mode bit was 4xPBL, and
 * post 3.5 mode bit acts as 8*PBL.
-*
-* This configuration doesn't take care about the Separate PBL
-* so only the bits: 13-8 are programmed with the PBL passed from the
-* platform.
 */
value |= DMA_BUS_MODE_MAXPBL;
-   value &= ~DMA_BUS_MODE_PBL_MASK;
-   value |= (dma_cfg->pbl << DMA_BUS_MODE_PBL_SHIFT);
+   value |= DMA_BUS_MODE_USP;
+   val