summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2002-03-19 20:37:54 +1100
committerPaul Mackerras <paulus@samba.org>2002-03-19 20:37:54 +1100
commit96da251c855e6fea1e1dd4361751ab6df4f74a57 (patch)
treefd22a79e6d737e287b19f0407434b207c8dd058d
parent0b2e8f296ddf468918463779974ef88f5f9d42d7 (diff)
PPC update - add preempt_count to the ppc thread_info, add
SI_DETHREAD, plus a couple of minor fixes.
-rw-r--r--arch/ppc/kernel/align.c2
-rw-r--r--arch/ppc/kernel/prom_init.c16
-rw-r--r--include/asm-ppc/siginfo.h2
-rw-r--r--include/asm-ppc/thread_info.h9
4 files changed, 15 insertions, 14 deletions
diff --git a/arch/ppc/kernel/align.c b/arch/ppc/kernel/align.c
index 0f8dbd1cb585..ed023aace203 100644
--- a/arch/ppc/kernel/align.c
+++ b/arch/ppc/kernel/align.c
@@ -28,7 +28,7 @@ struct aligninfo {
#define OPCD(inst) (((inst) & 0xFC000000) >> 26)
#define RS(inst) (((inst) & 0x03E00000) >> 21)
#define RA(inst) (((inst) & 0x001F0000) >> 16)
-#define IS_DFORM(code) ((code) >= 32 && (code) <= 47)
+#define IS_DFORM(code) ((code) >= 32 && (code) <= 55)
#endif
#define INVALID { 0, 0 }
diff --git a/arch/ppc/kernel/prom_init.c b/arch/ppc/kernel/prom_init.c
index fea41427aa29..96f43675dae8 100644
--- a/arch/ppc/kernel/prom_init.c
+++ b/arch/ppc/kernel/prom_init.c
@@ -50,7 +50,7 @@
#define FB_MAX 8
#endif
-#define ALIGN(x) (((x) + sizeof(unsigned long)-1) & -sizeof(unsigned long))
+#define ALIGNUL(x) (((x) + sizeof(unsigned long)-1) & -sizeof(unsigned long))
struct prom_args {
const char *service;
@@ -376,7 +376,7 @@ try_again:
}
}
- return ALIGN(mem);
+ return ALIGNUL(mem);
}
/* This function will enable the early boot text when doing OF booting. This
@@ -457,7 +457,7 @@ copy_device_tree(unsigned long mem_start, unsigned long mem_end)
prom_exit();
}
allnextp = &allnodes;
- mem_start = ALIGN(mem_start);
+ mem_start = ALIGNUL(mem_start);
new_start = inspect_node(root, 0, mem_start, mem_end, &allnextp);
*allnextp = 0;
return new_start;
@@ -501,7 +501,7 @@ inspect_node(phandle node, struct device_node *dad,
if ((int) call_prom("nextprop", 3, 1, node, prev_name,
namep) <= 0)
break;
- mem_start = ALIGN((unsigned long)namep + strlen(namep) + 1);
+ mem_start = ALIGNUL((unsigned long)namep + strlen(namep) + 1);
prev_name = namep;
valp = (unsigned char *) mem_start;
pp->value = PTRUNRELOC(valp);
@@ -514,7 +514,7 @@ inspect_node(phandle node, struct device_node *dad,
if (pp->length > MAX_PROPERTY_LENGTH)
continue; /* ignore this property */
#endif
- mem_start = ALIGN(mem_start + pp->length);
+ mem_start = ALIGNUL(mem_start + pp->length);
*prev_propp = PTRUNRELOC(pp);
prev_propp = &pp->next;
}
@@ -526,7 +526,7 @@ inspect_node(phandle node, struct device_node *dad,
namep = (char *) (pp + 1);
pp->name = PTRUNRELOC(namep);
strcpy(namep, "linux,phandle");
- mem_start = ALIGN((unsigned long)namep + strlen(namep) + 1);
+ mem_start = ALIGNUL((unsigned long)namep + strlen(namep) + 1);
pp->value = (unsigned char *) PTRUNRELOC(&np->node);
pp->length = sizeof(np->node);
}
@@ -538,7 +538,7 @@ inspect_node(phandle node, struct device_node *dad,
if (l >= 0) {
np->full_name = PTRUNRELOC((char *) mem_start);
*(char *)(mem_start + l) = 0;
- mem_start = ALIGN(mem_start + l + 1);
+ mem_start = ALIGNUL(mem_start + l + 1);
}
/* do all our children */
@@ -741,7 +741,7 @@ prom_init(int r3, int r4, prom_entry pp)
*d = 0;
call_prom("canon", 3, 1, p, d, 1<<20);
bootdevice = PTRUNRELOC(d);
- mem = ALIGN(mem + strlen(d) + 1);
+ mem = ALIGNUL(mem + strlen(d) + 1);
}
prom_instantiate_rtas();
diff --git a/include/asm-ppc/siginfo.h b/include/asm-ppc/siginfo.h
index 684ad91eb8d7..597b234d1b44 100644
--- a/include/asm-ppc/siginfo.h
+++ b/include/asm-ppc/siginfo.h
@@ -99,7 +99,6 @@ typedef struct siginfo {
/*
* si_code values
- * Digital reserves positive values for kernel-generated signals.
*/
#define SI_USER 0 /* sent by kill, sigsend, raise */
#define SI_KERNEL 0x80 /* sent by the kernel from somewhere */
@@ -109,6 +108,7 @@ typedef struct siginfo {
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
#define SI_TKILL -6 /* sent by tkill system call */
+#define SI_DETHREAD -7 /* sent by execve() killing subsidiary threads */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-ppc/thread_info.h b/include/asm-ppc/thread_info.h
index 0ea0afd7e48e..b98527161019 100644
--- a/include/asm-ppc/thread_info.h
+++ b/include/asm-ppc/thread_info.h
@@ -18,10 +18,11 @@
* If you change this, change the TI_* offsets below to match.
*/
struct thread_info {
- struct task_struct *task; /* main task structure */
- struct exec_domain *exec_domain; /* execution domain */
- unsigned long flags; /* low level flags */
- int cpu; /* cpu we're on */
+ struct task_struct *task; /* main task structure */
+ struct exec_domain *exec_domain; /* execution domain */
+ unsigned long flags; /* low level flags */
+ int cpu; /* cpu we're on */
+ int preempt_count; /* not used at present */
};
/*