Commit 96da251c authored by Paul Mackerras's avatar Paul Mackerras

PPC update - add preempt_count to the ppc thread_info, add

SI_DETHREAD, plus a couple of minor fixes.
parent 0b2e8f29
......@@ -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 }
......
......@@ -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 @@ check_display(unsigned long mem)
}
}
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();
......
......@@ -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)
......
......@@ -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 */
};
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment