Guy Martin | 24 Jul 13:39 2014

Compiling a 32bit kernel fails

I've been trying to compile a 3.15.6 kernel but I did not managed to do 
so with either gcc 4.7.3 or 4.8.3.

This is the error I get :

In file included from 
                  from include/linux/atomic.h:4,
                  from include/linux/bitops.h:33,
                  from include/linux/kernel.h:10,
                  from include/linux/bug.h:4,
                  from include/linux/thread_info.h:11,
                  from include/asm-generic/preempt.h:4,
                  from arch/parisc/include/generated/asm/preempt.h:1,
                  from include/linux/preempt.h:18,
                  from include/linux/spinlock.h:50,
                  from include/linux/mmzone.h:7,
                  from include/linux/gfp.h:5,
                  from include/linux/slab.h:14,
                  from kernel/signal.c:13:
kernel/signal.c: In function ‘get_signal_to_deliver’:
error: can’t find a register in class ‘R1_REGS’ while reloading ‘asm’
(Continue reading)

John David Anglin | 24 Jul 01:44 2014

[PATCH] parisc: Remove SA_RESTORER define

The sa_restorer field in struct sigaction is obsolete and no longer in  
the parisc
implementation.  However, the core code assumes the field is present if
SA_RESTORER is defined.  So, the define needs to be removed.

Signed-off-by: John David Anglin <dave.anglin <at>>

diff --git a/arch/parisc/include/uapi/asm/signal.h b/arch/parisc/include/uapi/asm/signal.h
index a2fa2971..f5645d6 100644
--- a/arch/parisc/include/uapi/asm/signal.h
+++ b/arch/parisc/include/uapi/asm/signal.h
 <at>  <at>  -69,8 +69,6  <at>  <at> 

-#define SA_RESTORER	0x04000000 /* obsolete -- ignored */
John David Anglin | 21 Jul 01:32 2014

struct sigaction sa_restorer field

The sa_restorer field is obsolete and not in the hppa struct  
sigaction, but we still
define SA_RESTORER.  What should be done?

John David Anglin	dave.anglin <at>

To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo <at>
More majordomo info at

Nick Krause | 20 Jul 06:36 2014

processor.c: Fix me to rewrite init_percpu_pro

Hey James
I am wondering how you would like this function.init_percpu_pro
in processor.c.
Cheers Nick
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo <at>
More majordomo info at

Himangi Saraogi | 19 Jul 13:37 2014

[PATCH] parisc: Eliminate memset after alloc_bootmem_pages

alloc_bootmem and related function always return zeroed region of
memory. Thus a memset after calls to these functions is unnecessary.

The following Coccinelle semantic patch was used for making the change:

 <at>  <at> 
expression E,E1;
 <at>  <at> 

E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
... when != E
- memset(E,0,E1);

Signed-off-by: Himangi Saraogi <himangi774 <at>>
Acked-by: Julia Lawall <julia.lawall <at>>
 arch/parisc/mm/init.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index ae085ad..0bef864 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
 <at>  <at>  -728,7 +728,6  <at>  <at>  static void __init pagetable_init(void)

 	empty_zero_page = alloc_bootmem_pages(PAGE_SIZE);
-	memset(empty_zero_page, 0, PAGE_SIZE);

(Continue reading)

Nicholas Krause | 18 Jul 22:37 2014

[PATCH] parisc: Remove FIXME comment

The comment for size of frame not being needed is incorrect , the
function called needs this parameter.

Signed-off-by: Nicholas Krause <xerofoify <at>>
 arch/parisc/kernel/signal.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
index 1cba8f2..1d550b5 100644
--- a/arch/parisc/kernel/signal.c
+++ b/arch/parisc/kernel/signal.c
 <at>  <at>  -240,7 +240,6  <at>  <at>  setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
 	usp = (regs->gr[30] & ~(0x01UL));
-	/*FIXME: frame_size parameter is unused, remove it. */
 	frame = get_sigframe(ka, usp, sizeof(*frame));



To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo <at>
More majordomo info at

Jiri Slaby | 18 Jul 09:27 2014

[patch NOT added to the 3.12 stable tree] parisc,metag: Do not hardcode maximum userspace stack size

From: Helge Deller <deller <at>>

This patch does NOT apply to the 3.12 stable tree. If you still want
it applied, please provide a backport.


commit 042d27acb64924a0e8a43e972485913a32407beb upstream.

This patch affects only architectures where the stack grows upwards
(currently parisc and metag only). On those do not hardcode the maximum
initial stack size to 1GB for 32-bit processes, but make it configurable
via a config option.

The main problem with the hardcoded stack size is, that we have two
memory regions which grow upwards: stack and heap. To keep most of the
memory available for heap in a flexmap memory layout, it makes no sense
to hard allocate up to 1GB of the memory for stack which can't be used
as heap then.

This patch makes the stack size for 32-bit processes configurable and
uses 80MB as default value which has been in use during the last few
years on parisc and which hasn't showed any problems yet.

Signed-off-by: Helge Deller <deller <at>>
Signed-off-by: James Hogan <james.hogan <at>>
Cc: "James E.J. Bottomley" <jejb <at>>
Cc: linux-parisc <at>
Cc: linux-metag <at>
Cc: John David Anglin <dave.anglin <at>>
(Continue reading)

Guy Martin | 17 Jul 22:00 2014



I've attached the gcc and kernel patch for 64bit CAS. So far I've
implemented the easiest use case which is for 64bit kernel.

I'll investigate using the FPU register for 64 bit operations with
32bit kernels.

I feel like there is a lot of code duplication in my patches, this can
probably be optimized altho it might reduce readability.

Any comments ?

Guy Martin | 16 Jul 14:40 2014

Implementing 64bit atomic gcc built-ins

Hi all,

It seems that gcc on hppa currently doesn't support 64 bit atomic 
built-ins such as __sync_compare_and_swap().

Looking at the current implementation, glibc calls the LWS CAS in the 
kernel to do the compare and swap operation in an atomic way.
The current implementation of lws_compare_and_swap64 works only with 64 
bit kernel.

In the case of a 32 bit kernel, I'm not sure if it's possible to 
implement an atomic CAS that would work on two registers at once. If 
it's possible, most probably a lws_compare_and_swap_dword or so LWS 
should be created as I can't see the current ABI working in this 
scenario. As far as I understand the code in syscall.S, it would just be 
a matter of adding a ldw/stw instruction pair in cas_action to have 
64bit operations (on top of changing the ABI).

If we are running a 64bit kernel, I guess it might be possible to call 
lws_compare_and_swap64 from userspace, but it means that we would have 
to switch to wide mode in userspace prior to perform the call.
Again, I'm not sure that this is doable as it seems that to do so, the 
RSM instruction needs to be used while it's a privileged level 
Another option is to create lws_compare_and_swap_dword with a different 
ABI that would take 64bit integers stored in two '32bit' registers, 
merge the registers into a single one and call lws_compare_ans_swap64.

For me, the best course of action here is to create 
lws_compare_and_swap_dword. Provided we can perform the CAS operation on 
(Continue reading)

Helge Deller | 13 Jul 16:22 2014

[GIT PULL] parisc updates for v3.16

Hi Linus,

please pull the latest parisc architecture fixes for kernel 3.16 from 
  git:// parisc-3.16-5

The major patch in here is one which fixes the fanotify_mark() syscall in the
compat layer of the 64bit parisc kernel. It went unnoticed so long, because the
calling syntax when using a 64bit parameter in a 32bit syscall is quite complex
and even worse, it may be even different if you call syscall() or the glibc
wrapper. This patch makes the kernel accept the calling convention when called
by the glibc wrapper.

The other two patches are trivial and remove unused headers, #includes and adds
the serial ports of the fastest C8000 workstation to the parisc-kernel internal
hardware database.


Helge Deller (3):
      parisc: add serial ports of C8000/1GHz machine to hardware database
      parisc: fix fanotify_mark() syscall on 32bit compat kernel
      parisc: drop unused defines and header includes

 arch/parisc/kernel/hardware.c      |  3 ++-
 arch/parisc/kernel/sys_parisc32.c  | 46 +++++++++-----------------------------
 arch/parisc/kernel/syscall_table.S |  2 +-
 3 files changed, 13 insertions(+), 38 deletions(-)
(Continue reading)

Helge Deller | 10 Jul 18:08 2014

[PATCH] parisc: drop unused defines and header includes

Signed-off-by: Helge Deller <deller <at>>

diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index bb9f3b6..93c1963 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
 <at>  <at>  -11,44 +12,8  <at>  <at> 

 #include <linux/compat.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/fs.h> 
-#include <linux/mm.h> 
-#include <linux/file.h> 
-#include <linux/signal.h>
-#include <linux/resource.h>
-#include <linux/times.h>
-#include <linux/time.h>
-#include <linux/smp.h>
-#include <linux/sem.h>
-#include <linux/shm.h>
-#include <linux/slab.h>
-#include <linux/uio.h>
-#include <linux/ncp_fs.h>
-#include <linux/poll.h>
-#include <linux/personality.h>
-#include <linux/stat.h>
-#include <linux/highmem.h>
-#include <linux/highuid.h>
-#include <linux/mman.h>
(Continue reading)