drivers/s390/char/fs3270.c:337:10: error: implicit declaration of function 'compat_ptr'; did you mean 'complete'?
Subsystems (12)
A message that is not in the archive (sent off-list or not yet received): 201803210054.aktDFRUf%[email protected]
A message that is not in the archive (sent off-list or not yet received): CABeXuvqQfCYmz+md1tfEC3kiYWctSz7kBSjEu6+n1oOCAGGJzg@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): CAK8P3a37SqjhPPbOkhXBuaHhakS3T8tvejB9aA+ZO2m8ZRMsLg@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): CABeXuvqm2XHKKffHdo1CMUzQhCWkRzz9=+xbk_VXN9-t9i4duQ@mail.gmail.com
Arnd Bergmann
maintainerQuoted 33 lines · Deepa Dinamani
Quoted 16 lines · Arnd Bergmann
Quoted 15 lines · Deepa Dinamani
This does not have the recent s390 patch I sent out to be applied on linux-next. This is not yet in linux-next.
------
s390: Use
asm/compat.hinstead oflinux/compat.hInclude
asm/compat.hdirectly for uses ofcompat_ptr. This includes the compat defines whenCONFIG_COMPATis not on.Also make compat data structure definitions conditional on
CONFIG_COMPAT, to remove circular include dependencies inelf.hQuoted 7 lines
Quoted 3 lines
Cc David Hildenbrand <[email protected]>Signed-off-by Deepa Dinamani <[email protected]>I have an increasingly bad feeling about this workaround, I think we need to try harder to make
linux/compat.hcontain whatever is expected and provide everything thatasm/compat.hdoes.This is my plan, But, I was planning to get rid of this by posting individual patches to specific architectures after this series was merged to keep this series less complicated.
Problem comes from including compat code even whenCONFIG_COMPATis not on.Quoted 2 lines
Generally it is expected that including
linux/foo.his a strict superset ofasm/foo.h, and you should use the former in device drivers.
Quoted 8 lines
Right. I was also hesitant about this change. But, in this particular case, these are only s390 drivers that are not built on any other architectures.
So I thought this should be okay. Also, I plan to clean this up in the architecture specific patches.If you still prefer fixing these now rather than later, then I can give it another try and post an update.
I've applied a different fix for now, see below.
I'll give it some more testing, but this solves both the arm64 and s390 issues I saw earlier, and lets us always include linux/compat.h instead of having to include asm/compat.h.
Let me know if you see a problem with that one.
Arnd
commit d1a353a4a8cce86c7651a8011cc860a921b850bc
Author: Arnd Bergmann <[email protected]> Date: Mon Mar 26 16:59:15 2018 +0200
compat: add an asm-generic/compat.h file
We have a couple of files that try to include asm/compat.h on architectures where this is available. Those should generally use the higher-level linux/compat.h file, but that in turn fails to include asm/compat.h when CONFIG_COMPAT is disabled, unless we can provide that header on all architectures.
This adds the asm/compat.h for all remaining architectures to simplify the dependencies.
Architectures that are getting removed in linux-4.17 are not changed here, to avoid needless conflicts with the removal patches. Those architectures are broken by this patch, but we have already shown that they have no users.
arch/alpha/include/asm/Kbuild +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 +generic-y += compat.h generic-y += exec.h generic-y += export.h generic-y += fb.h
arch/arc/include/asm/Kbuild +1 -0
@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 generic-y += bugs.h +generic-y += compat.h generic-y += device.h generic-y += div64.h generic-y += emergency-restart.h
arch/arm/include/asm/Kbuild +1 -0
@@ -1,3 +1,4 @@ +generic-y += compat.h generic-y += current.h generic-y += early_ioremap.h generic-y += emergency-restart.h
arch/c6x/include/asm/Kbuild +1 -0
@@ -1,6 +1,7 @@ generic-y += atomic.h generic-y += barrier.h generic-y += bugs.h +generic-y += compat.h generic-y += current.h generic-y += device.h generic-y += div64.h
arch/h8300/include/asm/Kbuild +1 -0
@@ -3,6 +3,7 @@ generic-y += barrier.h generic-y += bugs.h generic-y += cacheflush.h generic-y += checksum.h +generic-y += compat.h generic-y += current.h generic-y += delay.h generic-y += device.h
arch/hexagon/include/asm/Kbuild +1 -0
@@ -2,6 +2,7 @@ generic-y += barrier.h generic-y += bug.h generic-y += bugs.h +generic-y += compat.h generic-y += current.h generic-y += device.h generic-y += div64.h
arch/ia64/include/asm/Kbuild +1 -0
@@ -1,3 +1,4 @@ +generic-y += compat.h generic-y += exec.h generic-y += irq_work.h generic-y += mcs_spinlock.h
arch/m68k/include/asm/Kbuild +1 -0
@@ -1,4 +1,5 @@ generic-y += barrier.h +generic-y += compat.h generic-y += device.h generic-y += emergency-restart.h generic-y += exec.h
(quoted diff) +0 -0
b/arch/microblaze/include/asm/Kbuild
index 3c80a5a308ed..fe6a6c6e5003 100644
arch/microblaze/include/asm/Kbuild +1 -0
@@ -2,6 +2,7 @@ generic-y += barrier.h generic-y += bitops.h generic-y += bug.h generic-y += bugs.h +generic-y += compat.h generic-y += device.h generic-y += div64.h generic-y += emergency-restart.h
arch/nios2/include/asm/Kbuild +1 -0
@@ -4,6 +4,7 @@ generic-y += bitops.h generic-y += bug.h generic-y += bugs.h generic-y += cmpxchg.h +generic-y += compat.h generic-y += current.h generic-y += device.h generic-y += div64.h
arch/openrisc/include/asm/Kbuild +1 -0
@@ -2,6 +2,7 @@ generic-y += barrier.h generic-y += bug.h generic-y += bugs.h generic-y += checksum.h +generic-y += compat.h generic-y += current.h generic-y += device.h generic-y += div64.h
arch/sh/include/asm/Kbuild +1 -0
@@ -1,3 +1,4 @@ +generic-y += compat.h generic-y += current.h generic-y += delay.h generic-y += div64.h
arch/um/include/asm/Kbuild +1 -0
@@ -1,6 +1,7 @@ generic-y += barrier.h generic-y += bpf_perf_event.h generic-y += bug.h +generic-y += compat.h generic-y += current.h generic-y += delay.h generic-y += device.h
(quoted diff) +0 -0
b/arch/unicore32/include/asm/Kbuild
index 6f70c76c81fc..bfc7abe77905 100644
arch/unicore32/include/asm/Kbuild +1 -0
@@ -1,5 +1,6 @@ generic-y += atomic.h generic-y += bugs.h +generic-y += compat.h generic-y += current.h generic-y += device.h generic-y += div64.h
arch/xtensa/include/asm/Kbuild +1 -0
@@ -1,4 +1,5 @@ generic-y += bug.h +generic-y += compat.h generic-y += device.h generic-y += div64.h generic-y += dma-contiguous.h
include/asm-generic/compat.h new file +3 -0
@@ -0,0 +1,3 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +/* This is an empty stub for 32-bit-only architectures */
include/linux/compat.h +2 -1
@@ -17,8 +17,9 @@#include <linux/aio_abi.h> /* for aio_context_t */ #include <linux/unistd.h> -#ifdef CONFIG_COMPAT #include <asm/compat.h> + +#ifdef CONFIG_COMPAT #include <asm/siginfo.h> #include <asm/signal.h> #endif
I thought of doing something like this earlier.
I think there is an easier fix by moving the defines in linux/compat.h under CONFIG_32BIT_TIME.
Let me try to get that working also for comparison.
I will post it here.
Thanks,
Deepa
Quoted 266 lines · Arnd Bergmann
Quoted 33 lines · Deepa Dinamani
Quoted 16 lines · Arnd Bergmann
Quoted 15 lines · Deepa Dinamani
This does not have the recent s390 patch I sent out to be applied on linux-next. This is not yet in linux-next.
------
s390: Use
asm/compat.hinstead oflinux/compat.hInclude
asm/compat.hdirectly for uses ofcompat_ptr. This includes the compat defines whenCONFIG_COMPATis not on.Also make compat data structure definitions conditional on
CONFIG_COMPAT, to remove circular include dependencies inelf.hQuoted 7 lines
Quoted 3 lines
Cc David Hildenbrand <[email protected]>Signed-off-by Deepa Dinamani <[email protected]>I have an increasingly bad feeling about this workaround, I think we need to try harder to make
linux/compat.hcontain whatever is expected and provide everything thatasm/compat.hdoes.This is my plan, But, I was planning to get rid of this by posting individual patches to specific architectures after this series was merged to keep this series less complicated.
Problem comes from including compat code even whenCONFIG_COMPATis not on.Quoted 2 lines
Generally it is expected that including
linux/foo.his a strict superset ofasm/foo.h, and you should use the former in device drivers.Quoted 8 lines
Right. I was also hesitant about this change. But, in this particular case, these are only s390 drivers that are not built on any other architectures.
So I thought this should be okay. Also, I plan to clean this up in the architecture specific patches.If you still prefer fixing these now rather than later, then I can give it another try and post an update.
I've applied a different fix for now, see below.
I'll give it some more testing, but this solves both the arm64 and s390 issues I saw earlier, and lets us always include
linux/compat.hinstead of having to includeasm/compat.h.Let me know if you see a problem with that one.
Arnd
commit
d1a353a4a8cce86c7651a8011cc860a921b850bcAuthor: Arnd Bergmann <[email protected]> Date: Mon Mar 26 16:59:15 2018 +0200compat: add an
asm-generic/compat.hfileWe have a couple of files that try to include
asm/compat.hon architectures where this is available. Those should generally use the higher-levellinux/compat.hfile, but that in turn fails to includeasm/compat.hwhenCONFIG_COMPATis disabled, unless we can provide that header on all architectures.This adds the
asm/compat.hfor all remaining architectures to simplify the dependencies.Architectures that are getting removed in linux-4.17 are not changed here, to avoid needless conflicts with the removal patches. Those architectures are broken by this patch, but we have already shown that they have no users.
Signed-off-by Arnd Bergmann <[email protected]>arch/alpha/include/asm/Kbuild +1
-0@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 +generic-y += compat.h generic-y += exec.h generic-y += export.h generic-y += fb.harch/arc/include/asm/Kbuild +1
-0@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 generic-y += bugs.h +generic-y += compat.h generic-y += device.h generic-y += div64.h generic-y += emergency-restart.harch/arm/include/asm/Kbuild +1
-0@@ -1,3 +1,4 @@ +generic-y += compat.h generic-y += current.h generic-y += early_ioremap.h generic-y += emergency-restart.harch/c6x/include/asm/Kbuild +1
-0@@ -1,6 +1,7 @@ generic-y += atomic.h generic-y += barrier.h generic-y += bugs.h +generic-y += compat.h generic-y += current.h generic-y += device.h generic-y += div64.harch/h8300/include/asm/Kbuild +1
-0@@ -3,6 +3,7 @@ generic-y += barrier.h generic-y += bugs.h generic-y += cacheflush.h generic-y += checksum.h +generic-y += compat.h generic-y += current.h generic-y += delay.h generic-y += device.harch/hexagon/include/asm/Kbuild +1
-0@@ -2,6 +2,7 @@ generic-y += barrier.h generic-y += bug.h generic-y += bugs.h +generic-y += compat.h generic-y += current.h generic-y += device.h generic-y += div64.harch/ia64/include/asm/Kbuild +1
-0@@ -1,3 +1,4 @@ +generic-y += compat.h generic-y += exec.h generic-y += irq_work.h generic-y += mcs_spinlock.harch/m68k/include/asm/Kbuild +1
-0@@ -1,4 +1,5 @@ generic-y += barrier.h +generic-y += compat.h generic-y += device.h generic-y += emergency-restart.h generic-y += exec.harch/microblaze/include/asm/Kbuild +1
-0@@ -2,6 +2,7 @@ generic-y += barrier.h generic-y += bitops.h generic-y += bug.h generic-y += bugs.h +generic-y += compat.h generic-y += device.h generic-y += div64.h generic-y += emergency-restart.harch/nios2/include/asm/Kbuild +1
-0@@ -4,6 +4,7 @@ generic-y += bitops.h generic-y += bug.h generic-y += bugs.h generic-y += cmpxchg.h +generic-y += compat.h generic-y += current.h generic-y += device.h generic-y += div64.harch/openrisc/include/asm/Kbuild +1
-0@@ -2,6 +2,7 @@ generic-y += barrier.h generic-y += bug.h generic-y += bugs.h generic-y += checksum.h +generic-y += compat.h generic-y += current.h generic-y += device.h generic-y += div64.harch/sh/include/asm/Kbuild +1
-0@@ -1,3 +1,4 @@ +generic-y += compat.h generic-y += current.h generic-y += delay.h generic-y += div64.harch/um/include/asm/Kbuild +1
-0@@ -1,6 +1,7 @@ generic-y += barrier.h generic-y += bpf_perf_event.h generic-y += bug.h +generic-y += compat.h generic-y += current.h generic-y += delay.h generic-y += device.harch/unicore32/include/asm/Kbuild +1
-0@@ -1,5 +1,6 @@ generic-y += atomic.h generic-y += bugs.h +generic-y += compat.h generic-y += current.h generic-y += device.h generic-y += div64.harch/xtensa/include/asm/Kbuild +1
-0@@ -1,4 +1,5 @@ generic-y += bug.h +generic-y += compat.h generic-y += device.h generic-y += div64.h generic-y += dma-contiguous.hinclude/asm-generic/compat.h new file +3
-0@@ -0,0 +1,3 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +/* This is an empty stub for 32-bit-only architectures */ include/linux/compat.h +2
-1@@ -17,8 +17,9 @@#include <linux/aio_abi.h> /* for aio_context_t */ #include <linux/unistd.h> -#ifdef CONFIG_COMPAT #include <asm/compat.h> + +#ifdef CONFIG_COMPAT #include <asm/siginfo.h> #include <asm/signal.h> #endif