'cxl_dev_context_init()' returns an error pointer in case of error, not
NULL. So test it with IS_ERR.
Signed-off-by: Christophe JAILLET <redacted>
---
un-compiled because I don't have the required cross build environment.
---
drivers/misc/cxl/pci.c | 2 +-
drivers/misc/cxl/phb.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2016-10-31 05:37:52
Christophe JAILLET [off-list ref] writes:
'cxl_dev_context_init()' returns an error pointer in case of error, not
NULL. So test it with IS_ERR.
Signed-off-by: Christophe JAILLET <redacted>
---
un-compiled because I don't have the required cross build environment.
Do you run Ubuntu or Fedora? If so it's just a dnf/apt-get away:
$ sudo dnf install gcc-c++-powerpc64-linux-gnu binutils-powerpc64-linux-gnu gcc-powerpc64-linux-gnu
or
$ sudo apt-get install gcc-powerpc64le-linux-gnu gcc-powerpc-linux-gnu libc-dev-powerpc-cross libc-dev-ppc64el-cross
More here:
https://github.com/linuxppc/linux/wiki/Building-powerpc-kernels
cheers
From: Jim Davis <hidden> Date: 2016-11-01 23:36:38
On Sun, Oct 30, 2016 at 10:37 PM, Michael Ellerman [off-list ref] wrote:
Christophe JAILLET [off-list ref] writes:
quoted
'cxl_dev_context_init()' returns an error pointer in case of error, not
NULL. So test it with IS_ERR.
Signed-off-by: Christophe JAILLET <redacted>
---
un-compiled because I don't have the required cross build environment.
Do you run Ubuntu or Fedora? If so it's just a dnf/apt-get away:
$ sudo dnf install gcc-c++-powerpc64-linux-gnu binutils-powerpc64-linux-gnu gcc-powerpc64-linux-gnu
or
$ sudo apt-get install gcc-powerpc64le-linux-gnu gcc-powerpc-linux-gnu libc-dev-powerpc-cross libc-dev-ppc64el-cross
More here:
https://github.com/linuxppc/linux/wiki/Building-powerpc-kernels
Cool; the little-endian build worked fine, but
jim@krebstar:~/linux-rc$ make ARCH=powerpc
CROSS_COMPILE=powerpc64-linux-gnu- vmlinux
make: powerpc64-linux-gnu-gcc: Command not found
make: powerpc64-linux-gnu-gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
make: powerpc64-linux-gnu-gcc: Command not found
This is on Ubuntu 16.04; there's a /usr/bin/powerpc64le-linux-gnu-gcc
from installing gcc-powerpc64le-linux-gnu, and a
/usr/bin/powerpc-linux-gnu-gcc from installing gcc-powerpc-linux-gnu,
but no /usr/bin/powerpc64-linux-gnu-gcc.
--
Jim
jim@krebstar:~/linux-rc$ make ARCH=powerpc
CROSS_COMPILE=powerpc64-linux-gnu- vmlinux
make: powerpc64-linux-gnu-gcc: Command not found
make: powerpc64-linux-gnu-gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
make: powerpc64-linux-gnu-gcc: Command not found
Ah sorry.
This is on Ubuntu 16.04; there's a /usr/bin/powerpc64le-linux-gnu-gcc
from installing gcc-powerpc64le-linux-gnu, and a
/usr/bin/powerpc-linux-gnu-gcc from installing gcc-powerpc-linux-gnu,
but no /usr/bin/powerpc64-linux-gnu-gcc.
It's the powerpc-linux-gnu-gcc one.
That is a 32 and 64-bit compiler, it's 32-bit by default, but the kernel
Makefiles will pass -m64 appropriately.
You can actually build a single compiler that builds 32/64-bit BE, and
64-bit LE, but the distros don't do that for whatever reason.
cheers
jim@krebstar:~/linux-rc$ make ARCH=powerpc
CROSS_COMPILE=powerpc64-linux-gnu- vmlinux
make: powerpc64-linux-gnu-gcc: Command not found
make: powerpc64-linux-gnu-gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
make: powerpc64-linux-gnu-gcc: Command not found
But I cleverly tried to run the Fedora command on Ubuntu... when I run
the right command for Ubuntu, the build worked just fine. D'oh!
Nit: make distclean missed a few files
jim@krebstar:~/linux-rc$ make distclean; git clean -fdx
CLEAN .
CLEAN drivers/tty/vt
CLEAN drivers/video/logo
CLEAN firmware
CLEAN kernel
CLEAN lib
CLEAN usr
CLEAN .tmp_versions
CLEAN scripts/basic
CLEAN scripts/dtc
CLEAN scripts/genksyms
CLEAN scripts/kconfig
CLEAN scripts/mod
CLEAN scripts
CLEAN include/config include/generated arch/powerpc/include/generated
CLEAN .config .version Module.symvers
Removing arch/powerpc/kernel/systbl_chk.i
Removing arch/powerpc/kernel/vdso32/vdso32.lds
Removing arch/powerpc/kernel/vdso32/vdso32.so
Removing arch/powerpc/kernel/vdso32/vdso32.so.dbg
Removing arch/powerpc/kernel/vdso64/vdso64.lds
Removing arch/powerpc/kernel/vdso64/vdso64.so
Removing arch/powerpc/kernel/vdso64/vdso64.so.dbg
Removing arch/powerpc/kernel/vmlinux.lds
--
Jim
jim@krebstar:~/linux-rc$ make ARCH=powerpc
CROSS_COMPILE=powerpc64-linux-gnu- vmlinux
make: powerpc64-linux-gnu-gcc: Command not found
make: powerpc64-linux-gnu-gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
make: powerpc64-linux-gnu-gcc: Command not found
But I cleverly tried to run the Fedora command on Ubuntu... when I run
the right command for Ubuntu, the build worked just fine. D'oh!
Nit: make distclean missed a few files
Ah thanks. I literally never do that, but it is supposed work. Have
filed a bug for it.
cheers
From: Michael Ellerman <hidden> Date: 2016-11-22 00:34:23
On Sun, 2016-10-30 at 21:40:47 UTC, Christophe Jaillet wrote:
'cxl_dev_context_init()' returns an error pointer in case of error, not
NULL. So test it with IS_ERR.
Signed-off-by: Christophe JAILLET <redacted>
Reviewed-by: Andrew Donnellan <redacted>
Acked-by: Frederic Barrat <redacted>
Acked-by: Ian Munsie <redacted>