[PATCH v3 1/2] cxl: Add explicit precision specifiers

2015-06-11 Thread Rasmus Villemoes
ed. Even if the kernel followed C99 to the letter, I don't think that would be particularly useful in these cases. For consistency with most other format strings in the file, use an explicit precision of 16 and add a 0x prefix. Signed-off-by: Rasmus Villemoes --- v3: same as v2, just re

[PATCH v3 2/2] cxl: use more common format specifier

2015-06-11 Thread Rasmus Villemoes
A precision of 16 (%.16llx) has the same effect as a field width of 16 along with passing the 0 flag (%016llx), but the latter is much more common in the kernel tree. Update cxl to use that. Signed-off-by: Rasmus Villemoes --- So, maybe this on top? drivers/misc/cxl/irq.c| 32

[PATCH] trivial: drivers/macintosh/smu.c: Fix closing brace followed by if

2014-06-20 Thread Rasmus Villemoes
A closing brace followed by "if" is almost certainly a mistake. Maybe "else if" was meant, but in this case it doesn't really matter. Signed-off-by: Rasmus Villemoes --- drivers/macintosh/smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/

[PATCH] cxl: Remove useless precision specifiers

2015-02-20 Thread Rasmus Villemoes
ed. Even if the kernel followed C99 to the letter, I don't think that would be particularly useful in these cases, so just remove the precision specifiers. Signed-off-by: Rasmus Villemoes --- drivers/misc/cxl/irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH v2] cxl: Add explicit precision specifiers

2015-02-23 Thread Rasmus Villemoes
ed. Even if the kernel followed C99 to the letter, I don't think that would be particularly useful in these cases. For consistency with most other format strings in the file, use an explicit precision of 16 and add a 0x prefix. Signed-off-by: Rasmus Villemoes --- What Joe said is of course t

new decimal conversion - seeking testers

2015-03-12 Thread Rasmus Villemoes
Hi, I've proposed a new implementation of decimal conversion for lib/vsprintf.c; see . Benchmarking so far shows 25-50% (depending on distribution of input numbers) improvement on x86_64 and 10-30% on various 32 bit platforms. Sinc

Re: new decimal conversion - seeking testers

2015-03-19 Thread Rasmus Villemoes
On Fri, Mar 13 2015, Nishanth Aravamudan wrote: > On 13.03.2015 [00:09:19 +0100], Rasmus Villemoes wrote: >> Since the new code plays a little endianness game I would really >> appreciate it if someone here would run the test and verification code >> on ppc. > > On a

[PATCH] powerpc/pseries: fix error return value in cmm_mem_going_offline

2016-03-08 Thread Rasmus Villemoes
off-by: Rasmus Villemoes --- arch/powerpc/platforms/pseries/cmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c index fc44ad0475f8..66e7227469b8 100644 --- a/arch/powerpc/platforms/pseries/cmm.c ++

clock_gettime.2: _COARSE clocks are not always faster...

2016-04-09 Thread Rasmus Villemoes
Hi Michael The other day, I was curious how the vdso was implemented on ppc, and I noted that neither ppc32 or ppc64 handle the _COARSE versions of CLOCK_{REALTIME,MONOTONIC} in the vdso, so they fall back to an actual syscall. And sure enough, measuring CLOCK_MONOTONIC vs. CLOCK_MONOTONIC_COARSE

Re: [PATCH 4/5] kernel/cpu.c: eliminate cpu_*_mask

2015-10-05 Thread Rasmus Villemoes
Hi PPC maintainers Can I get you to ack or nak this? It's a prerequisite for a minor patch series for kernel/cpu.c and include/linux/cpumask.h of mine. Thanks, Rasmus On Mon, Sep 28 2015, Rasmus Villemoes wrote: > Gah, I didn't check for struct members called cpu_online_mask :( &

[PATCH v2 0/6] kernel/cpu.c: eliminate some indirection

2015-10-06 Thread Rasmus Villemoes
riate immediate address into %rdi before each call. [1] See Rusty's kind explanation http://thread.gmane.org/gmane.linux.kernel/2047078/focus=2047722 for some historic context. Rasmus Villemoes (6): powerpc/fadump: rename cpu_online_mask member of struct fadump_crash_info_header kernel/c

[PATCH v2 1/6] powerpc/fadump: rename cpu_online_mask member of struct fadump_crash_info_header

2015-10-06 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- arch/powerpc/include/asm/fadump.h | 2 +- arch/powerpc/kernel/fadump.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/fadump.h b/arch/powerpc/include/asm/fadump.h index 493e72f64b35..b4407d0add27 100644

Re: [PATCH v2 0/6] kernel/cpu.c: eliminate some indirection

2015-10-17 Thread Rasmus Villemoes
On Tue, Oct 06 2015, Rasmus Villemoes wrote: > v2: fix build failure on ppc, add acks. Does anyone want to take these through their tree? Rasmus ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linux

[PATCH v2, resend 0/6] kernel/cpu.c: eliminate some indirection

2015-11-23 Thread Rasmus Villemoes
y's kind explanation http://thread.gmane.org/gmane.linux.kernel/2047078/focus=2047722 for some historic context. Rasmus Villemoes (6): powerpc/fadump: rename cpu_online_mask member of struct fadump_crash_info_header kernel/cpu.c: change type of cpu_possible_bits and friends kernel/cpu.c: export __c

[PATCH v2, resend 1/6] powerpc/fadump: rename cpu_online_mask member of struct fadump_crash_info_header

2015-11-23 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- arch/powerpc/include/asm/fadump.h | 2 +- arch/powerpc/kernel/fadump.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/fadump.h b/arch/powerpc/include/asm/fadump.h index 493e72f64b35..b4407d0add27 100644

Re: [PATCH v2 1/4] lib: move strtobool to kstrtobool

2016-02-04 Thread Rasmus Villemoes
On Thu, Feb 04 2016, Kees Cook wrote: > Create the kstrtobool_from_user helper and moves strtobool logic into > the new kstrtobool (matching all the other kstrto* functions). Provides > an inline wrapper for existing strtobool callers. > > Signed-off-by: Kees Cook > --- > include/linux/kernel.h

[PATCH 00/10] implement DYNAMIC_DEBUG_RELATIVE_POINTERS

2019-04-09 Thread Rasmus Villemoes
e fun stuff is in patch 7, and the remaining three patches are just the minimal boilerplate to hook up the config option and asm-generic header on the three architectures. Rasmus Villemoes (10): linux/device.h: use unique identifier for each struct _ddebug linux/net.h: use unique identifier for

[PATCH 07/10] dynamic_debug: add asm-generic implementation for DYNAMIC_DEBUG_RELATIVE_POINTERS

2019-04-09 Thread Rasmus Villemoes
ne expects. I've succesfully built x86-64, arm64 and ppc64 defconfig + CONFIG_DYNAMIC_DEBUG + patches to hook up this header, and boot-tested the x86-64 one. Signed-off-by: Rasmus Villemoes --- include/asm-generic/dynamic_debug.h | 116 include/linux/jump_label.h

[PATCH 10/10] powerpc: select DYNAMIC_DEBUG_RELATIVE_POINTERS for PPC64

2019-04-09 Thread Rasmus Villemoes
is only compile-tested. Signed-off-by: Rasmus Villemoes --- arch/powerpc/Kconfig| 1 + arch/powerpc/include/asm/Kbuild | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2d0be82c3061..6821c8ae1d62 100644 --- a/arch/powerpc/Kconfig

eh_frame confusion

2020-03-02 Thread Rasmus Villemoes
I'm building a ppc32 kernel, and noticed that after upgrading from gcc-7 to gcc-8 all object files now end up having .eh_frame section. For vmlinux, that's not a problem, because they all get discarded in arch/powerpc/kernel/vmlinux.lds.S . However, they stick around in modules, which doesn't seem

Re: eh_frame confusion

2020-03-03 Thread Rasmus Villemoes
On 02/03/2020 18.32, Naveen N. Rao wrote: > Naveen N. Rao wrote: >> Michael opened a task to look into this recently and I had spent some >> time last week on this. The original commit/discussion adding >> -fno-dwarf2-cfi-asm refers to R_PPC64_REL32 relocations not being >> handled by our module lo

Re: [PATCH 6/6] soc: fsl: qe: fix sparse warnings for ucc_slow.c

2020-03-16 Thread Rasmus Villemoes
On 12/03/2020 23.28, Li Yang wrote: > Fixes the following sparse warnings: > [snip] > > Also removed the unneccessary clearing for kzalloc'ed structure. Please don't mix that in the same patch, do it in a preparatory patch. That makes reviewing much easier. > > /* Get PRAM base */ >

Re: [PATCH 0/6] Fix sparse warnings for common qe library code

2020-03-16 Thread Rasmus Villemoes
e warnings for qe_ic.c > soc: fsl: qe: fix sparse warnings for ucc_fast.c > soc: fsl: qe: fix sparse warnings for ucc_slow.c Patches 2-5 should not change the generated code, whether LE or BE host, as they merely add sparse annotations (please double-check with objdump that that is indeed

Re: [PATCH 0/7] towards QE support on ARM

2019-10-21 Thread Rasmus Villemoes
On 18/10/2019 23.52, Li Yang wrote: > On Fri, Oct 18, 2019 at 3:54 PM Rasmus Villemoes > wrote: >> >> On 18/10/2019 22.16, Leo Li wrote: >>> >>>> >>>> There have been several attempts in the past few years to allow building >>>> the

Re: [PATCH 0/7] towards QE support on ARM

2019-10-22 Thread Rasmus Villemoes
On 22/10/2019 00.11, Li Yang wrote: > On Mon, Oct 21, 2019 at 3:46 AM Rasmus Villemoes > wrote: >> >>> Can you try the 4.14 branch from a newer LSDK release? LS1021a should >>> be supported platform on LSDK. If it is broken, something is wrong. >> >> W

Re: [PATCH 0/7] towards QE support on ARM

2019-10-22 Thread Rasmus Villemoes
On 22/10/2019 04.24, Qiang Zhao wrote: > On Mon, Oct 22, 2019 at 6:11 AM Leo Li wrote >> Right. I'm really interested in getting this applied to my tree and make it >> upstream. Zhao Qiang, can you help to review Rasmus's patches and >> comment? > > As you know, I maintained a similar patchset

Re: [PATCH 3/7] soc: fsl: qe: avoid ppc-specific io accessors

2019-10-23 Thread Rasmus Villemoes
On 22/10/2019 17.01, Christophe Leroy wrote: > > > On 10/18/2019 12:52 PM, Rasmus Villemoes wrote: >> In preparation for allowing to build QE support for architectures >> other than PPC, replace the ppc-specific io accessors. Done via >> > > This patch is not tr

[PATCH] powerpc/85xx: remove mostly pointless mpc85xx_qe_init()

2019-10-23 Thread Rasmus Villemoes
-off-by: Rasmus Villemoes --- arch/powerpc/platforms/85xx/common.c | 23 --- arch/powerpc/platforms/85xx/corenet_generic.c | 2 -- arch/powerpc/platforms/85xx/mpc85xx.h | 2 -- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 1 - arch/powerpc/platforms/85xx

Re: [PATCH 4/7] soc: fsl: qe: replace spin_event_timeout by readx_poll_timeout_atomic

2019-10-24 Thread Rasmus Villemoes
On 18/10/2019 18.08, Christoph Hellwig wrote: > On Fri, Oct 18, 2019 at 02:52:31PM +0200, Rasmus Villemoes wrote: >> /* wait for the QE_CR_FLG to clear */ >> -ret = spin_event_timeout((ioread32be(&qe_immr->cp.cecr) & QE_CR_FLG) == >> 0, >>

[PATCH v2 00/23] QUICC Engine support on ARM

2019-10-25 Thread Rasmus Villemoes
added qe_clrsetbits ones) and make their definition dependent on PPC32 or not, but that seems to be a bit ugly. Rasmus Villemoes (23): soc: fsl: qe: remove space-before-tab soc: fsl: qe: drop volatile qualifier of struct qe_ic::regs soc: fsl: qe: avoid ppc-specific io accessors s

[PATCH v2 01/23] soc: fsl: qe: remove space-before-tab

2019-10-25 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index 417df7e19281..2a0e6e642776 100644 --- a/drivers/soc/fsl/qe/qe.c +++ b/drivers/soc/fsl/qe/qe.c @@ -378,8

[PATCH v2 02/23] soc: fsl: qe: drop volatile qualifier of struct qe_ic::regs

2019-10-25 Thread Rasmus Villemoes
The actual io accessors (e.g. in_be32) implicitly add a volatile qualifier to their address argument. Remove volatile from the struct definition and the qe_ic_(read/write) helpers, in preparation for switching from the ppc-specific io accessors to generic ones. Signed-off-by: Rasmus Villemoes

[PATCH v2 04/23] soc: fsl: qe: replace spin_event_timeout by readx_poll_timeout_atomic

2019-10-25 Thread Rasmus Villemoes
In preparation for allowing QE to be built for architectures other than ppc, use the generic readx_poll_timeout_atomic() helper from iopoll.h rather than the ppc-only spin_event_timeout(). Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 13 +++-- 1 file changed, 7

[PATCH v2 03/23] soc: fsl: qe: avoid ppc-specific io accessors

2019-10-25 Thread Rasmus Villemoes
) + qe_clrbits32(addr, clr) @@ expression addr, clr; @@ - clrbits16(addr, clr) + qe_clrbits16(addr, clr) @@ expression addr, clr; @@ - clrbits8(addr, clr) + qe_clrbits8(addr, clr) Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/gpio.c | 30 +++ drivers/soc/fsl/qe/qe.c | 35

[PATCH v2 05/23] soc: fsl: qe: qe.c: guard use of pvr_version_is() with CONFIG_PPC32

2019-10-25 Thread Rasmus Villemoes
dency from CONFIG_QUICC_ENGINE, so introduce qe_general4_errata() to keep the necessary #ifdeffery localized to a trivial helper. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/soc/fsl/qe/qe.c b/dr

[PATCH v2 06/23] soc: fsl: qe: avoid tail comments in qe_ic.h

2019-10-25 Thread Rasmus Villemoes
This is consistent with normal kernel coding style and the style used in the struct definition above this one. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.h | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_ic.h b

[PATCH v2 07/23] soc: fsl: qe: merge qe_ic.h into qe_ic.c

2019-10-25 Thread Rasmus Villemoes
others). Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.c | 91 ++- drivers/soc/fsl/qe/qe_ic.h | 108 - 2 files changed, 90 insertions(+), 109 deletions(-) delete mode 100644 drivers/soc/fsl/qe/qe_ic.h diff --git a

[PATCH v2 08/23] soc: fsl: qe: drop unneeded #includes

2019-10-25 Thread Rasmus Villemoes
These includes are not actually needed, and asm/rheap.h and sysdev/fsl_soc.h are PPC-specific, hence prevent compiling QE for other architectures. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c| 5 - drivers/soc/fsl/qe/qe_io.c | 2 -- 2 files changed, 7 deletions(-) diff

[PATCH v2 09/23] soc: fsl: qe: move qe_ic_cascade_* functions to qe_ic.c

2019-10-25 Thread Rasmus Villemoes
move them into qe_ic.c and leave ordinary extern declarations in the header file. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.c | 58 +++ include/soc/fsl/qe/qe_ic.h | 62 +++--- 2 files changed, 63 insertions(+), 57

[PATCH v2 10/23] soc: fsl: qe: use qe_ic_cascade_{low, high}_mpic also on 83xx

2019-10-25 Thread Rasmus Villemoes
one in mpc8xxx_gpio_irq_cascade(). This leaves the functions slightly misnamed, but that will be fixed in a subsequent patch. Signed-off-by: Rasmus Villemoes --- arch/powerpc/platforms/83xx/misc.c | 2 +- drivers/soc/fsl/qe/qe_ic.c | 24 include/soc/fsl/qe/q

[PATCH v2 12/23] soc: fsl: qe: drop assign-only high_active in qe_ic_init

2019-10-25 Thread Rasmus Villemoes
high_active is only assigned to but never used. Remove it. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c index f3659c312e13..61a40e40f3ae 100644

[PATCH v2 13/23] soc: fsl: qe: remove pointless sysfs registration in qe_ic.c

2019-10-25 Thread Rasmus Villemoes
There's no point in registering with sysfs when that doesn't actually allow any interaction with the device or driver (no uevents, no sysfs files that provide information or allow configuration, no nothing). Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe

[PATCH v2 14/23] soc: fsl: qe: move calls of qe_ic_init out of arch/powerpc/

2019-10-25 Thread Rasmus Villemoes
or an IRQCHIP_DECLARE, eliminating the need to manually look up the fsl,qe-ic node. Signed-off-by: Rasmus Villemoes --- arch/powerpc/platforms/83xx/km83xx.c | 1 - arch/powerpc/platforms/83xx/misc.c| 16 -- arch/powerpc/platforms/83xx/mpc832x_mds.c | 1 - arch/powerpc/plat

[PATCH v2 11/23] soc: fsl: qe: rename qe_ic_cascade_low_mpic -> qe_ic_cascade_low

2019-10-25 Thread Rasmus Villemoes
The qe_ic_cascade_{low,high}_mpic functions are now used as handlers both when the interrupt parent is mpic as well as ipic, so remove the _mpic suffix. Signed-off-by: Rasmus Villemoes --- arch/powerpc/platforms/83xx/misc.c| 2 +- arch/powerpc/platforms/85xx/corenet_generic.c | 4

[PATCH v2 15/23] powerpc/83xx: remove mpc83xx_ipic_and_qe_init_IRQ

2019-10-25 Thread Rasmus Villemoes
This is now exactly the same as mpc83xx_ipic_init_IRQ, so just use that directly. Signed-off-by: Rasmus Villemoes --- arch/powerpc/platforms/83xx/km83xx.c | 2 +- arch/powerpc/platforms/83xx/misc.c| 7 --- arch/powerpc/platforms/83xx/mpc832x_mds.c | 2 +- arch/powerpc/platforms

[PATCH v2 16/23] powerpc/85xx: remove mostly pointless mpc85xx_qe_init()

2019-10-25 Thread Rasmus Villemoes
-off-by: Rasmus Villemoes --- arch/powerpc/platforms/85xx/common.c | 23 --- arch/powerpc/platforms/85xx/corenet_generic.c | 2 -- arch/powerpc/platforms/85xx/mpc85xx.h | 2 -- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 1 - arch/powerpc/platforms/85xx

[PATCH v2 18/23] soc: fsl: qe: remove unused qe_ic_set_* functions

2019-10-25 Thread Rasmus Villemoes
future reference please note that I believe qe_ic_set_priority is buggy: The "priority < 4" should be "priority <= 4", and in the else branch 24 should be replaced by 28, at least if I'm reading the data sheet right. Signed-off-by: Rasmus Villemoes ---

[PATCH v2 17/23] soc: fsl: qe: make qe_ic_cascade_* static

2019-10-25 Thread Rasmus Villemoes
Now that the references from arch/powerpc/ are gone, these are only referenced from inside qe_ic.c, so make them static. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.c | 6 +++--- include/soc/fsl/qe/qe_ic.h | 4 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a

[PATCH v2 19/23] net: ethernet: freescale: make UCC_GETH explicitly depend on PPC32

2019-10-25 Thread Rasmus Villemoes
Currently, QUICC_ENGINE depends on PPC32, so this in itself does not change anything. In order to allow removing the PPC32 dependency from QUICC_ENGINE and avoid allmodconfig build failures, add this explicit dependency. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/Kconfig

[PATCH v2 20/23] serial: make SERIAL_QE depend on PPC32

2019-10-25 Thread Rasmus Villemoes
rt in drivers/soc/fsl/qe, while preventing allmodconfig/randconfig failures due to SERIAL_QE not being supported yet. Signed-off-by: Rasmus Villemoes --- drivers/tty/serial/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig

[PATCH v2 21/23] serial: ucc_uart.c: explicitly include asm/cpm.h

2019-10-25 Thread Rasmus Villemoes
This driver uses #defines from asm/cpm.h, so instead of relying on some other header pulling that in, do that explicitly. Signed-off-by: Rasmus Villemoes --- drivers/tty/serial/ucc_uart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial

[PATCH v2 23/23] soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE

2019-10-25 Thread Rasmus Villemoes
The core QE code now also builds for ARM, so replace the FSL_SOC && PPC32 dependencies by the more lax requirements OF && HAS_IOMEM. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/

[PATCH v2 22/23] soc/fsl/qe/qe.h: remove include of asm/cpm.h

2019-10-25 Thread Rasmus Villemoes
asm/cpm.h only exists on PPC, so this prevents use of this header on other platforms. Drivers that need asm/cpm.h (and are thus inherently PPC-specific) must include that explicitly. Signed-off-by: Rasmus Villemoes --- include/soc/fsl/qe/qe.h | 1 - 1 file changed, 1 deletion(-) diff --git a

ppc: inlining iowrite32be and friends (was: Re: [PATCH v2 03/23] soc: fsl: qe: avoid ppc-specific io accessors)

2019-10-29 Thread Rasmus Villemoes
On 29/10/2019 08.43, Christophe Leroy wrote: > > > Le 25/10/2019 à 14:40, Rasmus Villemoes a écrit : >> In preparation for allowing to build QE support for architectures >> other than PPC, replace the ppc-specific io accessors. Done via >> >> $ spatch --sp-fil

Re: [PATCH v2 20/23] serial: make SERIAL_QE depend on PPC32

2019-10-29 Thread Rasmus Villemoes
On 29/10/2019 23.44, Leo Li wrote: > > >> -Original Message----- >> From: Rasmus Villemoes >> Sent: Friday, October 25, 2019 7:41 AM >> To: Qiang Zhao ; Leo Li ; >> Christophe Leroy >> Cc: linuxppc-dev@lists.ozlabs.org; linux-arm-ker...@lists.infr

Re: [PATCH v2 17/23] soc: fsl: qe: make qe_ic_cascade_* static

2019-10-30 Thread Rasmus Villemoes
On 30/10/2019 11.50, Christophe Leroy wrote: > > > Le 25/10/2019 à 14:40, Rasmus Villemoes a écrit : >> Now that the references from arch/powerpc/ are gone, these are only >> referenced from inside qe_ic.c, so make them static. > > Why do that in two steps ? > I th

[RFC PATCH 3/5] powerpc: move pci_iounmap() from iomap.c to pci-common.c

2019-10-30 Thread Rasmus Villemoes
gic and which is in the .c file. Signed-off-by: Rasmus Villemoes --- arch/powerpc/kernel/iomap.c | 13 - arch/powerpc/kernel/pci-common.c | 13 + 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/

[RFC PATCH 1/5] asm-generic: move pcu_iounmap from iomap.h to pci_iomap.h

2019-10-30 Thread Rasmus Villemoes
version under the same conditions as it were in iomap.h. Signed-off-by: Rasmus Villemoes --- include/asm-generic/iomap.h | 10 -- include/asm-generic/pci_iomap.h | 7 +++ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/asm-generic/iomap.h b/include/asm

[RFC PATCH 2/5] asm-generic: employ "ifndef foo; define foo foo" idiom in iomap.h

2019-10-30 Thread Rasmus Villemoes
-generic/iomap.h for the ARCH_HAS_IOREMAP_WT/WC logic. This will be used on powerpc. Signed-off-by: Rasmus Villemoes --- include/asm-generic/iomap.h | 94 ++--- 1 file changed, 88 insertions(+), 6 deletions(-) diff --git a/include/asm-generic/iomap.h b/include

[RFC PATCH 0/5] powerpc: make iowrite32be etc. inline

2019-10-30 Thread Rasmus Villemoes
ome a little better if kernel/iomap.c can indeed be removed (due to !CONFIG_PPC_INDIRECT_PIO && CONFIG_PPC_INDIRECT_MMIO never happening). [1] https://lore.kernel.org/lkml/6ee121cf-0e3d-4aa0-2593-fcb00995e...@c-s.fr/ [2] https://lore.kernel.org/lkml/886d5218-6d6b-824c-3ab9-63aafe41f...@c-

[RFC PATCH 4/5] powerpc: make pcibios_vaddr_is_ioport() static

2019-10-30 Thread Rasmus Villemoes
The only caller of pcibios_vaddr_is_ioport() is in pci-common.c, so we can make it static and move it into the same #ifndef block as its caller. Signed-off-by: Rasmus Villemoes --- arch/powerpc/include/asm/pci-bridge.h | 9 - arch/powerpc/kernel/pci-common.c | 4 ++-- 2 files

[RFC PATCH 5/5] powerpc: make iowrite32 and friends static inline when no indirection

2019-10-30 Thread Rasmus Villemoes
;t think currently exists. So it's possible that file could simply be deleted. Signed-off-by: Rasmus Villemoes --- arch/powerpc/include/asm/io.h | 172 ++ arch/powerpc/kernel/Makefile | 2 +- 2 files changed, 173 insertions(+), 1 deletion(-) diff --git a/a

Re: [RFC PATCH 0/5] powerpc: make iowrite32be etc. inline

2019-10-31 Thread Rasmus Villemoes
On 31/10/2019 01.31, Rasmus Villemoes wrote: > At first I tried something that wouldn't need to touch anything > outside arch/powerpc/, but I ended up with conditional inclusion of > asm-generic headers and/or duplicating a lot of their contents. Urrgh, this is much worse than I f

[PATCH v3 01/36] soc: fsl: qe: remove space-before-tab

2019-11-01 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index 417df7e19281..2a0e6e642776 100644 --- a/drivers/soc/fsl/qe/qe.c +++ b/drivers/soc/fsl/qe/qe.c @@ -378,8

[PATCH v3 02/36] soc: fsl: qe: drop volatile qualifier of struct qe_ic::regs

2019-11-01 Thread Rasmus Villemoes
The actual io accessors (e.g. in_be32) implicitly add a volatile qualifier to their address argument. Remove volatile from the struct definition and the qe_ic_(read/write) helpers, in preparation for switching from the ppc-specific io accessors to generic ones. Signed-off-by: Rasmus Villemoes

[PATCH v3 00/36] QUICC Engine support on ARM

2019-11-01 Thread Rasmus Villemoes
series has been built and booted on both an mpc8309-based platform (ppc) as well as an ls1021a-based platform (arm). The core QE code is exercised on both, while I could only test the ucc_uart on arm, since the uarts are not wired up on our mpc8309 board. Rasmus Villemoes (36): soc: fsl: qe

[PATCH v3 03/36] soc: fsl: qe: rename qe_(clr/set/clrset)bit* helpers

2019-11-01 Thread Rasmus Villemoes
Make it clear that these operate on big-endian registers (i.e. use the iowrite*be primitives) before we introduce more uses of them and allow the QE drivers to be built for platforms other than ppc32. Signed-off-by: Rasmus Villemoes --- drivers/net/wan/fsl_ucc_hdlc.c | 4 ++-- drivers/soc/fsl

[PATCH v3 04/36] soc: fsl: qe: introduce qe_io{read,write}* wrappers

2019-11-01 Thread Rasmus Villemoes
a performance regression on powerpc when making the drivers work on other architectures, introduce qe_io* helpers. Also define the qe_{clr,set,clrset}bits* helpers in terms of these new macros. Signed-off-by: Rasmus Villemoes --- include/soc/fsl/qe/qe.h | 34 +- 1

[PATCH v3 05/36] soc: fsl: qe: avoid ppc-specific io accessors

2019-11-01 Thread Rasmus Villemoes
) @@ expression addr, clr; @@ - clrbits32(addr, clr) + qe_clrbits_be32(addr, clr) @@ expression addr, clr; @@ - clrbits16(addr, clr) + qe_clrbits_be16(addr, clr) @@ expression addr, clr; @@ - clrbits8(addr, clr) + qe_clrbits_8(addr, clr) Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/gpio.c

[PATCH v3 07/36] soc: fsl: qe: qe.c: guard use of pvr_version_is() with CONFIG_PPC32

2019-11-01 Thread Rasmus Villemoes
dency from CONFIG_QUICC_ENGINE, so introduce qe_general4_errata() to keep the necessary #ifdeffery localized to a trivial helper. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/soc/fsl/qe/qe.c b/dr

[PATCH v3 06/36] soc: fsl: qe: replace spin_event_timeout by readx_poll_timeout_atomic

2019-11-01 Thread Rasmus Villemoes
In preparation for allowing QE to be built for architectures other than ppc, use the generic readx_poll_timeout_atomic() helper from iopoll.h rather than the ppc-only spin_event_timeout(). Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 13 +++-- 1 file changed, 7

[PATCH v3 08/36] soc: fsl: qe: drop unneeded #includes

2019-11-01 Thread Rasmus Villemoes
These includes are not actually needed, and asm/rheap.h and sysdev/fsl_soc.h are PPC-specific, hence prevent compiling QE for other architectures. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c| 5 - drivers/soc/fsl/qe/qe_io.c | 2 -- 2 files changed, 7 deletions(-) diff

[PATCH v3 09/36] soc: fsl: qe: drop assign-only high_active in qe_ic_init

2019-11-01 Thread Rasmus Villemoes
high_active is only assigned to but never used. Remove it. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c index 8c874372416b..4b03060d8079 100644

[PATCH v3 10/36] soc: fsl: qe: remove pointless sysfs registration in qe_ic.c

2019-11-01 Thread Rasmus Villemoes
There's no point in registering with sysfs when that doesn't actually allow any interaction with the device or driver (no uevents, no sysfs files that provide information or allow configuration, no nothing). Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe

[PATCH v3 11/36] soc: fsl: qe: use qe_ic_cascade_{low, high}_mpic also on 83xx

2019-11-01 Thread Rasmus Villemoes
one in mpc8xxx_gpio_irq_cascade(). This leaves the functions slightly misnamed, but that will be fixed in a subsequent patch. Signed-off-by: Rasmus Villemoes --- arch/powerpc/platforms/83xx/misc.c | 2 +- include/soc/fsl/qe/qe_ic.h | 24 2 files changed, 5 insertions(

[PATCH v3 12/36] soc: fsl: qe: move calls of qe_ic_init out of arch/powerpc/

2019-11-01 Thread Rasmus Villemoes
or an IRQCHIP_DECLARE, eliminating the need to manually look up the fsl,qe-ic node. Signed-off-by: Rasmus Villemoes --- arch/powerpc/platforms/83xx/km83xx.c | 1 - arch/powerpc/platforms/83xx/misc.c| 16 -- arch/powerpc/platforms/83xx/mpc832x_mds.c | 1 - arch/powerpc/plat

[PATCH v3 13/36] powerpc/83xx: remove mpc83xx_ipic_and_qe_init_IRQ

2019-11-01 Thread Rasmus Villemoes
This is now exactly the same as mpc83xx_ipic_init_IRQ, so just use that directly. Signed-off-by: Rasmus Villemoes --- arch/powerpc/platforms/83xx/km83xx.c | 2 +- arch/powerpc/platforms/83xx/misc.c| 7 --- arch/powerpc/platforms/83xx/mpc832x_mds.c | 2 +- arch/powerpc/platforms

[PATCH v3 14/36] powerpc/85xx: remove mostly pointless mpc85xx_qe_init()

2019-11-01 Thread Rasmus Villemoes
-off-by: Rasmus Villemoes --- arch/powerpc/platforms/85xx/common.c | 23 --- arch/powerpc/platforms/85xx/corenet_generic.c | 2 -- arch/powerpc/platforms/85xx/mpc85xx.h | 2 -- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 1 - arch/powerpc/platforms/85xx

[PATCH v3 16/36] soc: fsl: qe: rename qe_ic_cascade_low_mpic -> qe_ic_cascade_low

2019-11-01 Thread Rasmus Villemoes
The qe_ic_cascade_{low,high}_mpic functions are now used as handlers both when the interrupt parent is mpic as well as ipic, so remove the _mpic suffix. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a

[PATCH v3 15/36] soc: fsl: qe: move qe_ic_cascade_* functions to qe_ic.c

2019-11-01 Thread Rasmus Villemoes
make them local to that file. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.c | 42 ++ include/soc/fsl/qe/qe_ic.h | 42 -- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/soc/fsl/qe

[PATCH v3 17/36] soc: fsl: qe: remove unused qe_ic_set_* functions

2019-11-01 Thread Rasmus Villemoes
future reference please note that I believe qe_ic_set_priority is buggy: The "priority < 4" should be "priority <= 4", and in the else branch 24 should be replaced by 28, at least if I'm reading the data sheet right. Signed-off-by: Rasmus Villemoes ---

[PATCH v3 18/36] soc: fsl: qe: don't use NO_IRQ in qe_ic.c

2019-11-01 Thread Rasmus Villemoes
epare for allowing this driver to build on other architectures, drop all references to NO_IRQ. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe

[PATCH v3 19/36] soc: fsl: qe: make qe_ic_get_{low,high}_irq static

2019-11-01 Thread Rasmus Villemoes
These are only called from within qe_ic.c, so make them static. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.c | 4 ++-- include/soc/fsl/qe/qe_ic.h | 10 -- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe

[PATCH v3 20/36] soc: fsl: qe: simplify qe_ic_init()

2019-11-01 Thread Rasmus Villemoes
bootloader has played funny games. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.c | 27 --- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c index 23b457e884d8..4832884da5bb 100644 --- a

[PATCH v3 21/36] soc: fsl: qe: merge qe_ic.h headers into qe_ic.c

2019-11-01 Thread Rasmus Villemoes
The public qe_ic.h header is no longer included by anything but qe_ic.c. Merge both headers into qe_ic.c, and drop the unused constants. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.c | 52 +++- drivers/soc/fsl/qe/qe_ic.h | 99

[PATCH v3 22/36] soc: fsl: qe: qe.c: use of_property_read_* helpers

2019-11-01 Thread Rasmus Villemoes
. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 33 - 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index a4763282ea68..ec511840db3c 100644 --- a/drivers/soc/fsl/qe/qe.c +++ b/drivers/soc

[PATCH v3 24/36] soc: fsl: qe: qe_io.c: access device tree property using be32_to_cpu

2019-11-01 Thread Rasmus Villemoes
We need to apply be32_to_cpu to make this work correctly on little-endian hosts. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_io.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_io.c b/drivers/soc/fsl/qe/qe_io.c index

[PATCH v3 23/36] soc: fsl: qe: qe_io.c: don't open-code of_parse_phandle()

2019-11-01 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_io.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_io.c b/drivers/soc/fsl/qe/qe_io.c index f6b10f38b2f4..99aeb01586bd 100644 --- a/drivers/soc/fsl/qe/qe_io.c +++ b/drivers/soc/fsl/qe

[PATCH v3 25/36] soc: fsl: qe: qe_io.c: use of_property_read_u32() in par_io_init()

2019-11-01 Thread Rasmus Villemoes
This is necessary for this to work on little-endian hosts. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_io.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_io.c b/drivers/soc/fsl/qe/qe_io.c index 61dd8eb8c0fe..11ea08e97db7 100644

[PATCH v3 26/36] soc: fsl: move cpm.h from powerpc/include/asm to include/soc/fsl

2019-11-01 Thread Rasmus Villemoes
Some drivers, e.g. ucc_uart, need definitions from cpm.h. In order to allow building those drivers for non-ppc based SOCs, move the header to include/soc/fsl. For now, leave a trivial wrapper at the old location so drivers can be updated one by one. Signed-off-by: Rasmus Villemoes --- arch

[PATCH v3 28/36] serial: ucc_uart: explicitly include soc/fsl/cpm.h

2019-11-01 Thread Rasmus Villemoes
This driver uses #defines from soc/fsl/cpm.h, so instead of relying on some other header pulling that in, do that explicitly. This is preparation for allowing this driver to build on ARM. Signed-off-by: Rasmus Villemoes --- drivers/tty/serial/ucc_uart.c | 1 + 1 file changed, 1 insertion

[PATCH v3 27/36] soc/fsl/qe/qe.h: update include path for cpm.h

2019-11-01 Thread Rasmus Villemoes
asm/cpm.h under arch/powerpc is now just a wrapper for including soc/fsl/cpm.h. In order to make the qe.h header usable on other architectures, use the latter path directly. Signed-off-by: Rasmus Villemoes --- include/soc/fsl/qe/qe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v3 32/36] serial: ucc_uart: use of_property_read_u32() in ucc_uart_probe()

2019-11-01 Thread Rasmus Villemoes
For this to work correctly on little-endian hosts, don't access the device-tree properties directly in native endianness, but use the of_property_read_u32() helper. Signed-off-by: Rasmus Villemoes --- drivers/tty/serial/ucc_uart.c | 41 +++ 1 file change

[PATCH v3 31/36] serial: ucc_uart: stub out soft_uart_init for !CONFIG_PPC32

2019-11-01 Thread Rasmus Villemoes
The Soft UART hack is only needed for some PPC-based SOCs. To allow building this driver for non-PPC, guard soft_uart_init() and its helpers by CONFIG_PPC32, and use a no-op soft_uart_init() otherwise. Signed-off-by: Rasmus Villemoes --- drivers/tty/serial/ucc_uart.c | 17 - 1

[PATCH v3 30/36] serial: ucc_uart: factor out soft_uart initialization

2019-11-01 Thread Rasmus Villemoes
the do-we-need-soft-uart-and-if-so-handle-the-firmware to a separate function, which we can then easily stub out for non-PPC. Signed-off-by: Rasmus Villemoes --- drivers/tty/serial/ucc_uart.c | 110 ++ 1 file changed, 58 insertions(+), 52 deletions(-) diff --git

[PATCH v3 29/36] serial: ucc_uart: replace ppc-specific IO accessors

2019-11-01 Thread Rasmus Villemoes
Some ARM-based SOCs (e.g. LS1021A) also have a QUICC engine. As preparation for allowing this driver to build on ARM, replace the ppc-specific in_be16() etc. by the qe_io* helpers. Done via coccinelle. Signed-off-by: Rasmus Villemoes --- drivers/tty/serial/ucc_uart.c | 210

[PATCH v3 33/36] serial: ucc_uart: access __be32 field using be32_to_cpu

2019-11-01 Thread Rasmus Villemoes
The buf member of struct qe_bd is a __be32, so to make this work on little-endian hosts, use be32_to_cpu when reading it. Signed-off-by: Rasmus Villemoes --- drivers/tty/serial/ucc_uart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/ucc_uart.c b

[PATCH v3 34/36] net: ethernet: freescale: make UCC_GETH explicitly depend on PPC32

2019-11-01 Thread Rasmus Villemoes
Currently, QUICC_ENGINE depends on PPC32, so this in itself does not change anything. In order to allow removing the PPC32 dependency from QUICC_ENGINE and avoid allmodconfig build failures, add this explicit dependency. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/Kconfig

[PATCH v3 35/36] net/wan: make FSL_UCC_HDLC explicitly depend on PPC32

2019-11-01 Thread Rasmus Villemoes
Currently, FSL_UCC_HDLC depends on QUICC_ENGINE, which in turn depends on PPC32. As preparation for removing the latter and thus allowing the core QE code to be built for other architectures, make FSL_UCC_HDLC explicitly depend on PPC32. Signed-off-by: Rasmus Villemoes --- drivers/net/wan

[PATCH v3 36/36] soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE

2019-11-01 Thread Rasmus Villemoes
The core QE code now also builds for ARM, so replace the FSL_SOC && PPC32 dependencies by the more lax requirements OF && HAS_IOMEM. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/

  1   2   3   4   >