[PATCH] mcs_spin_lock() is inline, but comment says it isn't

2014-03-16 Thread Palmer Dabbelt
I was reading the mcs_spinlock code today and I noticed a comment that didn't appear to match the code. This appears to have just been an oversight during some restructuring of the mcs_spinlock code where this function was made inline but the comment wasn't updated. Signed-off-by: Palmer Dabbelt

[PATCH 3/3] Change all uses of JOBCTL_* from int to long

2015-04-30 Thread Palmer Dabbelt
with more bits. One instance of signr is an int, but I left this alone because the mask ensures that it will never overflow. Reviewed-by: Chris Metcalf cmetc...@ezchip.com Signed-off-by: Palmer Dabbelt pal...@dabbelt.com --- include/linux/sched.h | 18 +- kernel/signal.c | 6

[PATCH 1/3] Fix a misaligned load inside ptrace_attach()

2015-04-30 Thread Palmer Dabbelt
Metcalf cmetc...@ezchip.com Signed-off-by: Palmer Dabbelt pal...@dabbelt.com --- include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 26a2e6122734..391827db0a2d 100644 --- a/include/linux/sched.h +++ b/include

[PATCH 2/3] Change wait_on_bit*() to take an unsigned long*, not a void*

2015-04-30 Thread Palmer Dabbelt
-off-by: Palmer Dabbelt pal...@dabbelt.com --- include/linux/wait.h | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/include/linux/wait.h b/include/linux/wait.h index 2db83349865b..d69ac4ecc88b 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h

[PATCH 0/3] Fix a misaligned load inside ptrace_attach()

2015-04-30 Thread Palmer Dabbelt
I ran across what I believe is a bug in some asm-generic code while working on the RISC-V Linux port. Essentially the problem is that wait_on_bit() takes a void *, but then perfroms long-aligned operation. As far as I can tell, this bug could manifest on any other architecture that doesn't

[PATCH v5] Remove #ifdef CONFIG_* from all userspace headers

2015-11-09 Thread Palmer Dabbelt
I think this should _actually_ be ready to go this time, the buildbot found some errors in arches that I didn't test for. Changes since v4 (<1446579994-9937-1-git-send-email-pal...@dabbelt.com>) * #9 was changed to work on arm by moving the enum to an in-kernel header file. * #13 was

[PATCH 04/14] Always expose MAP_UNINITIALIZED to userspace

2015-11-09 Thread Palmer Dabbelt
-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- include/uapi/asm-generic/mman-common.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/uap

[PATCH 13/14] Hide CONFIG_PHY_RAM_BASE_ADDRESS from userspace

2015-11-09 Thread Palmer Dabbelt
This feels a bit odd, but I couldn't really come up with a better way to do it. There already appears to be a workaround for this macro not being defined in userspace, so I figured I'd better leave that in place, since someone is probably using it. The result is that unless you include before

[PATCH 12/14] Remove AT_VECTOR_SIZE_ARCH on x86

2015-11-09 Thread Palmer Dabbelt
of to do is to just remove the definition. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- arch/x86/include/uapi/asm/auxvec.h | 7 --- 1 file changed, 7 deletions(-)

[PATCH 06/14] Move ep_take_care_of_epollwakeup() to fs/eventpoll.c

2015-11-09 Thread Palmer Dabbelt
This doesn't make any sense to expose to userspace, so it's been moved to the one user. This was introduced by commit 95f19f658ce1 ("epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled"). Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water..

[PATCH 11/14] Always define MAX_RAW_MINORS as 2**20 in userspace

2015-11-09 Thread Palmer Dabbelt
warning about a split config string here, but I've left that alone. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- drivers/char/raw.c | 7 --- include/uapi/lin

[PATCH 09/14] Move bp_type_idx to include/linux/hw_breakpoint.h

2015-11-09 Thread Palmer Dabbelt
Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- include/linux/hw_breakpoint.h | 10 ++ include/uapi/linux/hw_breakpoint.h | 10 -- 2 files changed, 10

[PATCH 02/14] Use sys_ni.c instead of #ifdef to disable fork on CONFIG_NOMMU

2015-11-09 Thread Palmer Dabbelt
CONFIG_* in a user-visible header. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- include/uapi/asm-generic/unistd.h | 4 kernel/sys_ni.c | 1 +

[PATCH 14/14] Re-enable and clean up "check_config()" in headers_check.pl

2015-11-09 Thread Palmer Dabbelt
-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- scripts/headers_check.pl | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/headers_

[PATCH 08/14] Move MAX_SHARED_LIBS to fs/binfmt_flat.c

2015-11-09 Thread Palmer Dabbelt
I'm not sure what this is, but it doesn't feel like something that should be exposed to userspace here. I'm assuming this file was exposed for the structure in it, which doesn't depend on MAX_SHARED_LIBS. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman

[PATCH 07/14] Make FB_BACKLIGHT_{LEVELS,MAX} always visible

2015-11-09 Thread Palmer Dabbelt
Nothing else in the kernel defines this, and this header is visible to userspace. Rather than hiding it in an #ifdef, I think it's sane to just make this visible to userspace. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu&

[PATCH 10/14] Move USE_WCACHING to drivers/block/pktcdvd.c

2015-11-09 Thread Palmer Dabbelt
I don't think this was ever intended to be exposed to userspace, but it did require an "#ifdef CONFIG_*". Since the name is kind of generic and was only used in one place, I've moved the definition to the one user. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by:

[PATCH 01/14] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h

2015-11-09 Thread Palmer Dabbelt
in with F_SETLK64 was being defined (there's some more in glibc, but that's a whole different story... :)) is the result of CONFIG_64BIT showing up in this user-visible header. confirms this isn't sane, so I replaced it with a __BITS_PER_LONG check. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Re

[PATCH 05/14] Split FDPIC "struct elf_prstatus" to "struct elf_fdpic_prstatus"

2015-11-09 Thread Palmer Dabbelt
he existing struct definitions in this file have the brace a line afterwards, so I'm going to leave this alone. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- fs/binf

[PATCH 03/14] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c

2015-11-09 Thread Palmer Dabbelt
This used to be behind an #ifdef COMPAT_COMPAT, so most of userspace wouldn't have seen the definition before. Unfortunately this header file became visible to userspace, so the definition has instead been moved to net/atm/svc.c (the only user). Signed-off-by: Palmer Dabbelt <pal...@dabbelt.

Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c

2015-11-06 Thread Palmer Dabbelt
On Wed, 04 Nov 2015 04:21:51 PST (-0800), pet...@infradead.org wrote: > On Wed, Nov 04, 2015 at 12:41:06PM +0100, Peter Zijlstra wrote: >> On Tue, Nov 03, 2015 at 11:46:30AM -0800, Palmer Dabbelt wrote: >> > This has a "#ifdef CONFIG_*" that used to be exposed to us

[PATCH v4] Remove #ifdef CONFIG_* from all userspace headers

2015-11-03 Thread Palmer Dabbelt
I think this is good to go. There are two acks, but I wasn't sure if I was supposed to collect them in the patches or not. Arnd Bergman acked #1 and #7. Changes since v3 (<1442271047-4908-1-git-send-email-pal...@dabbelt.com>) * #4 is very different: rather than defining a canonical value for

[PATCH 13/13] Re-enable and clean up "check_config()" in headers_check.pl

2015-11-03 Thread Palmer Dabbelt
-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- scripts/headers_check.pl | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/headers_

[PATCH 07/13] Make FB_BACKLIGHT_{LEVELS,MAX} always visible

2015-11-03 Thread Palmer Dabbelt
Nothing else in the kernel defines this, and this header is visible to userspace. Rather than hiding it in an #ifdef, I think it's sane to just make this visible to userspace. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu&

[PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c

2015-11-03 Thread Palmer Dabbelt
This has a "#ifdef CONFIG_*" that used to be exposed to userspace. The names in here are so generic that I don't think it's a good idea to expose them to userspace (or even the rest of the kernel). Since there's only one kernel user, it's been moved to that file. Signed-off-by: Palm

[PATCH 01/13] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h

2015-11-03 Thread Palmer Dabbelt
in with F_SETLK64 was being defined (there's some more in glibc, but that's a whole different story... :)) is the result of CONFIG_64BIT showing up in this user-visible header. confirms this isn't sane, so I replaced it with a __BITS_PER_LONG check. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Re

[PATCH 05/13] Split FDPIC "struct elf_prstatus" to "struct elf_fdpic_prstatus"

2015-11-03 Thread Palmer Dabbelt
he existing struct definitions in this file have the brace a line afterwards, so I'm going to leave this alone. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- fs/binf

[PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace

2015-11-03 Thread Palmer Dabbelt
-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- include/uapi/asm-generic/mman-common.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/uap

[PATCH 10/13] Move USE_WCACHING to drivers/block/pktcdvd.c

2015-11-03 Thread Palmer Dabbelt
I don't think this was ever intended to be exposed to userspace, but it did require an "#ifdef CONFIG_*". Since the name is kind of generic and was only used in one place, I've moved the definition to the one user. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by:

[PATCH 02/13] Use sys_ni.c instead of #ifdef to disable fork on CONFIG_NOMMU

2015-11-03 Thread Palmer Dabbelt
CONFIG_* in a user-visible header. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- include/uapi/asm-generic/unistd.h | 4 kernel/sys_ni.c | 1 +

[PATCH 11/13] Always define MAX_RAW_MINORS as 2**20 in userspace

2015-11-03 Thread Palmer Dabbelt
warning about a split config string here, but I've left that alone. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- drivers/char/raw.c | 7 --- include/uapi/lin

[PATCH 08/13] Move MAX_SHARED_LIBS to fs/binfmt_flat.c

2015-11-03 Thread Palmer Dabbelt
I'm not sure what this is, but it doesn't feel like something that should be exposed to userspace here. I'm assuming this file was exposed for the structure in it, which doesn't depend on MAX_SHARED_LIBS. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman

[PATCH 06/13] Move ep_take_care_of_epollwakeup() to fs/eventpoll.c

2015-11-03 Thread Palmer Dabbelt
This doesn't make any sense to expose to userspace, so it's been moved to the one user. This was introduced by commit 95f19f658ce1 ("epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled"). Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water..

[PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c

2015-11-03 Thread Palmer Dabbelt
This used to be behind an #ifdef COMPAT_COMPAT, so most of userspace wouldn't have seen the definition before. Unfortunately this header file became visible to userspace, so the definition has instead been moved to net/atm/svc.c (the only user). Signed-off-by: Palmer Dabbelt <pal...@dabbelt.

[PATCH 12/13] Remove AT_VECTOR_SIZE_ARCH on x86

2015-11-03 Thread Palmer Dabbelt
of to do is to just remove the definition. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- arch/x86/include/uapi/asm/auxvec.h | 7 --- 1 file changed, 7 deletions(-)

[PATCH] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h

2015-09-02 Thread Palmer Dabbelt
From: Palmer Dabbelt <palmer.dabb...@eecs.berkeley.edu> When working on the RISC-V port I noticed that F_SETLK64 was being defined on our 64-bit platform, despite our port being so new that we've only ever had the 64-bit file ops. Since there's not compat layer for these, this causes

Re: [PATCH] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h

2015-09-07 Thread Palmer Dabbelt
On Mon, 07 Sep 2015 06:16:37 PDT (-0700), a...@arndb.de wrote: > On Tuesday 01 September 2015 17:10:10 Palmer Dabbelt wrote: >> From: Palmer Dabbelt <palmer.dabb...@eecs.berkeley.edu> >> >> When working on the RISC-V port I noticed that F_SETLK64 was being >&g

[PATCH v3] Remove #ifdef CONFIG_* from all userspace headers

2015-09-14 Thread Palmer Dabbelt
This patch set used to be called "[PATCH] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h". This is version 3 of the patch set. I think things are kind of cleaning up, but there's still some questions I have: * #4 might be dangerous, but I think this is the best way to do it because

[PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace

2015-09-14 Thread Palmer Dabbelt
also applies to the xtensa version of this definition, whic is the same as the generic one. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- arch/xtensa/include/uapi

[PATCH 02/13] Use sys_ni.c instead of #ifdef to disable fork on CONFIG_NOMMU

2015-09-14 Thread Palmer Dabbelt
CONFIG_* in a user-visible header. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- include/uapi/asm-generic/unistd.h | 4 kernel/sys_ni.c | 1 +

[PATCH 12/13] Remove AT_VECTOR_SIZE_ARCH on x86

2015-09-14 Thread Palmer Dabbelt
of to do is to just remove the definition. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- arch/x86/include/uapi/asm/auxvec.h | 7 --- 1 file changed, 7 deletions(-)

[PATCH 13/13] Re-enable and clean up "check_config()" in headers_check.pl

2015-09-14 Thread Palmer Dabbelt
-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- scripts/headers_check.pl | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/headers_

[PATCH 08/13] Move MAX_SHARED_LIBS to fs/binfmt_flat.c

2015-09-14 Thread Palmer Dabbelt
I'm not sure what this is, but it doesn't feel like something that should be exposed to userspace here. I'm assuming this file was exposed for the structure in it, which doesn't depend on MAX_SHARED_LIBS. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman

[PATCH 07/13] Make FB_BACKLIGHT_{LEVELS,MAX} always visible

2015-09-14 Thread Palmer Dabbelt
Nothing else in the kernel defines this, and this header is visible to userspace. Rather than hiding it in an #ifdef, I think it's sane to just make this visible to userspace. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu&

[PATCH 01/13] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h

2015-09-14 Thread Palmer Dabbelt
in with F_SETLK64 was being defined (there's some more in glibc, but that's a whole different story... :)) is the result of CONFIG_64BIT showing up in this user-visible header. confirms this isn't sane, so I replaced it with a __BITS_PER_LONG check. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Re

[PATCH 11/13] Always define MAX_RAW_MINORS as 65535 in userspace

2015-09-14 Thread Palmer Dabbelt
warning about a split config string here, but I've left that alone. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- drivers/char/raw.c | 7 --- include/uapi/lin

[PATCH 10/13] Move USE_WCACHING to drivers/block/pktcdvd.c

2015-09-14 Thread Palmer Dabbelt
I don't think this was ever intended to be exposed to userspace, but it did require an "#ifdef CONFIG_*". Since the name is kind of generic and was only used in one place, I've moved the definition to the one user. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by:

[PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c

2015-09-14 Thread Palmer Dabbelt
This has a "#ifdef CONFIG_*" that used to be exposed to userspace. The names in here are so generic that I don't think it's a good idea to expose them to userspace (or even the rest of the kernel). Since there's only one kernel user, it's been moved to that file. Signed-off-by: Palm

Re: [PATCH] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h

2015-09-14 Thread Palmer Dabbelt
On Thu, 10 Sep 2015 04:18:05 PDT (-0700), dhowe...@redhat.com wrote: > David Howells wrote: > >> Rather than iterating through all the rest of your patches and saying the >> same >> thing, if there's something in a UAPI header that needs wrapping in >> __KERNEL__ >> to

[PATCH 06/13] Move ep_take_care_of_epollwakeup() to fs/eventpoll.c

2015-09-14 Thread Palmer Dabbelt
This doesn't make any sense to expose to userspace, so it's been moved to the one user. This was introduced by commit 95f19f658ce1 ("epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled"). Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water..

[PATCH 05/13] Split FDPIC "struct elf_prstatus" to "struct elf_fdpic_prstatus"

2015-09-14 Thread Palmer Dabbelt
he existing struct definitions in this file have the brace a line afterwards, so I'm going to leave this alone. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- fs/binf

[PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c

2015-09-14 Thread Palmer Dabbelt
This used to be behind an #ifdef COMPAT_COMPAT, so most of userspace wouldn't have seen the definition before. Unfortunately this header file became visible to userspace, so the definition has instead been moved to net/atm/svc.c (the only user). Signed-off-by: Palmer Dabbelt <pal...@dabbelt.

Re: [PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace

2015-09-14 Thread Palmer Dabbelt
On Mon, 14 Sep 2015 17:23:58 PDT (-0700), kir...@shutemov.name wrote: > On Mon, Sep 14, 2015 at 03:50:38PM -0700, Palmer Dabbelt wrote: >> This used to be hidden behind CONFIG_MMAP_ALLOW_UNINITIALIZED, so >> userspace wouldn't actually ever see it be non-zero. While I could >

Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c

2015-09-15 Thread Palmer Dabbelt
On Tue, 15 Sep 2015 01:06:07 PDT (-0700), pet...@infradead.org wrote: > On Mon, Sep 14, 2015 at 03:50:43PM -0700, Palmer Dabbelt wrote: >> This has a "#ifdef CONFIG_*" that used to be exposed to userspace. >> >> The names in here are so generic that I don't think it'

Re: [PATCH 11/13] Always define MAX_RAW_MINORS as 65535 in userspace

2015-09-16 Thread Palmer Dabbelt
On Tue, 15 Sep 2015 13:42:47 PDT (-0700), h...@zytor.com wrote: > On 09/14/2015 03:50 PM, Palmer Dabbelt wrote: >> While I don't think this was ever meant to be exposed to userspace, if >> anyone is using it then this will at least provide a correct (if >>

Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c

2015-09-16 Thread Palmer Dabbelt
On Tue, 15 Sep 2015 12:39:10 PDT (-0700), pet...@infradead.org wrote: > On Tue, Sep 15, 2015 at 11:40:11AM -0700, Palmer Dabbelt wrote: >> On Tue, 15 Sep 2015 01:06:07 PDT (-0700), pet...@infradead.org wrote: >> > On Mon, Sep 14, 2015 at 03:50:43PM -0700, Palmer Dabbelt wro

Re: [PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c

2015-09-17 Thread Palmer Dabbelt
On Thu, 17 Sep 2015 02:57:12 PDT (-0700), dhowe...@redhat.com wrote: > Palmer Dabbelt <pal...@dabbelt.com> wrote: > >> +#ifdef CONFIG_COMPAT >> +/* It actually takes struct sockaddr_atmsvc, not struct atm_iobuf */ >> +#define COMPAT_ATM_ADDPARTY _IOW

[PATCH 01/13] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h

2015-09-09 Thread Palmer Dabbelt
in with F_SETLK64 was being defined (there's some more in glibc, but that's a whole different story... :)) is the result of CONFIG_64BIT showing up in this user-visible header. confirms this isn't sane, so I replaced it with a __BITS_PER_LONG check. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Re

[PATCH 07/13] Make FB_BACKLIGHT_{LEVELS,MAX} always visible

2015-09-09 Thread Palmer Dabbelt
Nothing else in the kernel defines this, and this header is visible to userspace. Rather than hiding it in an #ifdef, I think it's sane to just make this visible to userspace. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu&

Re: [PATCH] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h

2015-09-09 Thread Palmer Dabbelt
I cut the RISC-V stuff, but I intend to reply to it later. As you said, it's just a different topic. >>> However, I did see a lot of similar bugs now that you point me to it: >>> >>> $ grep -r \\\>> obj-tmp/usr/include/asm-generic/fcntl.h:#ifndef CONFIG_64BIT >>>

[PATCH 13/13] Re-enable and clean up "check_config()" in headers_check.pl

2015-09-09 Thread Palmer Dabbelt
-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- scripts/headers_check.pl | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/headers_

[PATCH 08/13] Hide MAX_SHARED_LIBS behind #ifdef __KERNEL__

2015-09-09 Thread Palmer Dabbelt
I'm not sure what this is, but it doesn't feel like something that should be exposed to userspace here. I'm assuming this file was exposed for the structure in it, which doesn't depend on MAX_SHARED_LIBS. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman

[PATCH 09/13] Hide bp_type_idx behind #ifdef __KERNEL__

2015-09-09 Thread Palmer Dabbelt
set, but that feels like it'd be more invasive. Here I took the simple and fail-fast route to hide all the definitions. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> ---

[PATCH 10/13] Hide USE_WCACHING behind #ifdef __KERNEL__

2015-09-09 Thread Palmer Dabbelt
I don't think this was ever intended to be exposed to userspace. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- include/uapi/linux/pktcdvd.h | 2 ++ 1 file cha

[PATCH 12/13] Hide AT_VECTOR_SIZE_ARCH behind #ifdef __KERNEL__

2015-09-09 Thread Palmer Dabbelt
I think this actually isn't a good idea, but I can't find anything outside of the kernel that's using this so I'm going to hide it. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@ee

[PATCH 11/13] Hide MAX_RAW_MINORS behind #ifdef __KERNEL__

2015-09-09 Thread Palmer Dabbelt
I don't think this was ever meant to be exposed to userspace. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- include/uapi/linux/raw.h | 2 ++ 1 file changed, 2 i

[PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace

2015-09-09 Thread Palmer Dabbelt
., devices where one has complete control of the contents of user memory). and since the only time it shows up in my /usr/include is in this header I believe this should have been visible to userspace (as non-zero, which wouldn't do anything when or'd into the flags) all along. Signed-off-by: Palmer

[PATCH 06/13] Hide ep_take_care_of_epollwakeup() behind #ifdef __KERNEL__

2015-09-09 Thread Palmer Dabbelt
This doesn't make any sense to expose to userspace. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman <water...@eecs.berkeley.edu> Reviewed-by: Albert Ou <a...@eecs.berkeley.edu> --- include/uapi/linux/eventpoll.h | 3 +++ 1 file changed, 3 inserti

[PATCH 05/13] Hide some of "struct elf_prstatus" behind #ifdef __KERNEL__

2015-09-09 Thread Palmer Dabbelt
note payload are exactly the same layout. " seems to indicate that it's possible to see this sometimes. Since this would only be visible to userspace in a somewhat convoluted manner, I'm going to try and keep it as it was. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by:

[PATCH 02/13] Always expose __SYSCALL(... fork ...)

2015-09-09 Thread Palmer Dabbelt
I think this change actually doesn't do anything: __NR_fork was still being defined either way, and on my machine fork() in comes from libc. That said, I don't think there's any way to determine this automatically, so this at least quiets the checker. Signed-off-by: Palmer Dabbelt <

[PATCH 03/13] Hide COMPAT_ATM_ADDPARTY behind #ifdef __KERNEL__

2015-09-09 Thread Palmer Dabbelt
This used to just be behind an #ifdef COMPAT_COMPAT, so most of userspace wouldn't have seen the definition before. This change just makes the __KERNEL__ part explicit to quiet the header checker. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Andrew Waterman

Re: [PATCH 02/17] pci: Add a generic, weakly-linked pcibios_align_resource

2017-07-13 Thread Palmer Dabbelt
On Wed, 12 Jul 2017 15:50:42 PDT (-0700), helg...@kernel.org wrote: > On Tue, Jul 11, 2017 at 06:31:15PM -0700, Palmer Dabbelt wrote: >> Multiple architectures define this as trivial function, and I'm adding >> another one as part of the RISC-V port. This adds a

Re: [PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-13 Thread Palmer Dabbelt
On Thu, 13 Jul 2017 05:32:26 PDT (-0700), james.ho...@imgtec.com wrote: > On Thu, Jul 13, 2017 at 09:59:53PM +1000, Michael Ellerman wrote: >> Palmer Dabbelt <pal...@dabbelt.com> writes: >> >> > On Wed, 12 Jul 2017 04:04:00 PDT (-0700), m...@ellerman.id.au wr

Re: [PATCH 16/17] RISC-V: User-facing API

2017-07-13 Thread Palmer Dabbelt
On Wed, 12 Jul 2017 10:09:55 PDT (-0700), james.ho...@imgtec.com wrote: > On Wed, Jul 12, 2017 at 09:24:24AM -0700, Palmer Dabbelt wrote: >> On Wed, 12 Jul 2017 04:07:51 PDT (-0700), james.ho...@imgtec.com wrote: >> > On Tue, Jul 11, 2017 at 06:31:29PM -0700, Palmer Dabbelt wrote

Re: [PATCH 8/9] RISC-V: User-facing API

2017-07-11 Thread Palmer Dabbelt
On Tue, 11 Jul 2017 06:55:28 PDT (-0700), h...@infradead.org wrote: > On Tue, Jul 11, 2017 at 02:22:15PM +0100, Will Deacon wrote: >> The problem is that by supporting these hypothetical designs that can't do >> atomics, you hurt sensible designs that *can* do the atomics because you >> force them

Re: [patches] Re: [PATCH 16/17] RISC-V: User-facing API

2017-07-11 Thread Palmer Dabbelt
On Tue, 11 Jul 2017 07:01:32 PDT (-0700), james.ho...@imgtec.com wrote: > Hi Christoph, > > On Tue, Jul 11, 2017 at 06:39:48AM -0700, Christoph Hellwig wrote: >> > +#ifdef CONFIG_64BIT >> > +SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, >> > + unsigned long, prot, unsigned long,

Re: [PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-11 Thread Palmer Dabbelt
On Mon, 10 Jul 2017 23:21:07 PDT (-0700), m...@ellerman.id.au wrote: > Palmer Dabbelt <pal...@dabbelt.com> writes: >> > ... >> +#ifdef CONFIG_EARLY_PRINTK >> +static void sbi_console_write(struct console *co, const char *buf, >> +

Re: [PATCH 17/17] RISC-V: Build Infastructure

2017-07-11 Thread Palmer Dabbelt
On Mon, 10 Jul 2017 23:31:18 PDT (-0700), m...@ellerman.id.au wrote: > Palmer Dabbelt <pal...@dabbelt.com> writes: > >> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig >> new file mode 100644 >> index ..366f5f2cf106 >> --- /dev/null >>

Re: RISC-V Linux Port v5

2017-07-11 Thread Palmer Dabbelt
On Tue, 11 Jul 2017 11:39:19 PDT (-0700), mcg...@kernel.org wrote: > On Mon, Jul 10, 2017 at 06:39:07PM -0700, Palmer Dabbelt wrote: >> Thanks to everyone who has participated in the review process so far. I've >> based this patch set on the current master. Things have really star

[PATCH 09/17] RISC-V: Init and Halt Code

2017-07-10 Thread Palmer Dabbelt
This contains the various __init C functions, the initial assembly kernel entry point, and the code to reset the system. When a file was init-related this patch contains the entire file. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- arch/riscv/include/asm/bug.h

RISC-V Linux Port v5

2017-07-10 Thread Palmer Dabbelt
Thanks to everyone who has participated in the review process so far. I've based this patch set on the current master. Things have really started to calmn down, so this is fairly similar to the v4 patch set. The most interesting changes include: * We've moved back to a single patch set. *

[PATCH 05/17] clocksource: New RISC-V SBI timer driver

2017-07-10 Thread Palmer Dabbelt
the hardware from the clocksource driver by taking a pair of function pointers to issue the actual RISC-V specific instructions. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- drivers/clocksource/Kconfig | 8 + drivers/clocksource/Makefile | 1 + drivers/clock

[PATCH 14/17] RISC-V: Device, timer, IRQs, and the SBI

2017-07-10 Thread Palmer Dabbelt
This patch contains code that interfaces with devices that are mandated by the RISC-V supervisor specification and that don't have explicit drivers anywhere else in the tree. This includes the staticly defined interrupts, the CSR-mapped timer, and virtualized SBI devices. Signed-off-by: Palmer

[PATCH 02/17] pci: Add a generic, weakly-linked pcibios_align_resource

2017-07-10 Thread Palmer Dabbelt
pcibios_fixup_bus. Only some architectures export this, so I just dropped it. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- arch/arc/kernel/pcibios.c| 13 - arch/arm64/kernel/pci.c | 17 - arch/ia64/pci/pci.c | 7 ---

[PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-10 Thread Palmer Dabbelt
The RISC-V ISA defines a simple console that is availiable via SBI calls on all systems. This patch adds a driver for this console interface that can act as both a target for early printk and as the system console. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- drivers/tty/hvc/K

[PATCH 04/17] MAINTAINERS: Add RISC-V

2017-07-10 Thread Palmer Dabbelt
From: Jonathan Neuschäfer <j.neuschae...@gmx.net> RISC-V needs a MAINTAINERS entry. Let's add one. Signed-off-by: Jonathan Neuschäfer <j.neuschae...@gmx.net> Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- MAINTAINERS | 8 1 file changed, 8 inserti

Re: [PATCH 01/17] lib: Add shared copies of some GCC library routines

2017-07-10 Thread Palmer Dabbelt
On Mon, 10 Jul 2017 19:02:19 PDT (-0700), s...@canb.auug.org.au wrote: > Hi Palmer, > > On Mon, 10 Jul 2017 18:39:08 -0700 Palmer Dabbelt <pal...@dabbelt.com> wrote: >> >> This patch adds a new copy of these library routine files, which are >> functionally iden

Re: [patches] Re: [PATCH 01/17] lib: Add shared copies of some GCC library routines

2017-07-10 Thread Palmer Dabbelt
On Mon, 10 Jul 2017 19:03:44 PDT (-0700), rdun...@infradead.org wrote: > On 07/10/2017 07:02 PM, Stephen Rothwell wrote: >> Hi Palmer, >> >> On Mon, 10 Jul 2017 18:39:08 -0700 Palmer Dabbelt <pal...@dabbelt.com> wrote: >>> >>> This patch adds a n

[PATCH 17/17] RISC-V: Build Infastructure

2017-07-10 Thread Palmer Dabbelt
building locally. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- Makefile | 3 +- arch/riscv/Kconfig| 294 ++ arch/riscv/Makefile | 64 +++ arch/riscv/configs/f

[PATCH 10/17] RISC-V: Atomic and Locking Code

2017-07-10 Thread Palmer Dabbelt
memory model by the end of the year, but my understanding is that the basic definitions we're relying on here won't change significantly. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- arch/riscv/include/asm/atomic.h | 328 arch/riscv/inclu

[PATCH 11/17] RISC-V: Generic library routines and assembly

2017-07-10 Thread Palmer Dabbelt
This patch contains code that is more specific to the RISC-V ISA than it is to Linux. It contains string and math operations, C wrappers for various assembly instructions, stack walking code, and uaccess. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- arch/riscv/include/asm

[PATCH 03/17] pci: Add a generic, weakly-linked pcibios_fixup_bus

2017-07-10 Thread Palmer Dabbelt
pcibios_fixup_bus. None of the other architectures export this, so I just dropped it. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- arch/cris/arch-v32/drivers/pci/bios.c | 4 arch/microblaze/pci/pci-common.c | 6 -- arch/s390/pci/pci.c | 4 arch/sh/drive

[PATCH 01/17] lib: Add shared copies of some GCC library routines

2017-07-10 Thread Palmer Dabbelt
are functionally identical to the various other copies. These are availiable via Kconfig as CONFIG_LIB_$ROUTINE, which currently isn't used anywhere. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> Reviewed-by: Geert Uytterhoeven <ge...@linux-m68k.org> --- include/lib/l

[PATCH 06/17] irqchip: RISC-V Local Interrupt Controller Driver

2017-07-10 Thread Palmer Dabbelt
controller). Per-hart local interrupt controllers are found on all RISC-V systems. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- drivers/irqchip/Kconfig | 14 +++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-riscv-intc.c | 213

[PATCH 07/17] irqchip: New RISC-V PLIC Driver

2017-07-10 Thread Palmer Dabbelt
This patch adds a driver for the Platform Level Interrupt Controller (PLIC) specified as part of the RISC-V supervisor level ISA manual. The PLIC connocts global interrupt sources to the local interrupt controller on each hart. A PLIC is present on all RISC-V systems. Signed-off-by: Palmer

[PATCH 13/17] RISC-V: Task implementation

2017-07-10 Thread Palmer Dabbelt
This patch contains the implementation of tasks on RISC-V, most of which is involved in task switching. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- arch/riscv/include/asm/asm-offsets.h | 1 + arch/riscv/include/asm/current.h | 45 arch/riscv/include/asm/kprobes.h

[PATCH 15/17] RISC-V: Paging and MMU

2017-07-10 Thread Palmer Dabbelt
This patch contains code to manage the RISC-V MMU, including definitions of the page tables and the page walking code. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- arch/riscv/include/asm/mmu_context.h | 69 ++ arch/riscv/include/asm/page.h | 134 +++ arch

[PATCH 16/17] RISC-V: User-facing API

2017-07-10 Thread Palmer Dabbelt
This patch contains code that is in some way visible to the user: including via system calls, the VDSO, module loading and signal handling. It also contains some generic code that is ABI visible. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- arch/riscv/include/asm

[PATCH 12/17] RISC-V: ELF and module implementation

2017-07-10 Thread Palmer Dabbelt
This patch contains the code that interfaces with ELF objects on RISC-V systems, the vast majority of which is present to load kernel modules. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- arch/riscv/include/asm/compat.h | 29 ++ arch/riscv/include/asm/elf.h

Re: [PATCH 8/9] RISC-V: User-facing API

2017-07-10 Thread Palmer Dabbelt
On Mon, 10 Jul 2017 13:00:29 PDT (-0700), Palmer Dabbelt wrote: > On Thu, 06 Jul 2017 08:45:13 PDT (-0700), will.dea...@arm.com wrote: >> On Thu, Jul 06, 2017 at 08:34:27AM -0700, Christoph Hellwig wrote: >>> On Thu, Jul 06, 2017 at 09:55:03AM +0100, Will Deacon w

  1   2   3   4   5   6   7   8   9   10   >