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 { ...@@ -28,7 +28,7 @@ struct aligninfo {
#define OPCD(inst) (((inst) & 0xFC000000) >> 26) #define OPCD(inst) (((inst) & 0xFC000000) >> 26)
#define RS(inst) (((inst) & 0x03E00000) >> 21) #define RS(inst) (((inst) & 0x03E00000) >> 21)
#define RA(inst) (((inst) & 0x001F0000) >> 16) #define RA(inst) (((inst) & 0x001F0000) >> 16)
#define IS_DFORM(code) ((code) >= 32 && (code) <= 47) #define IS_DFORM(code) ((code) >= 32 && (code) <= 55)
#endif #endif
#define INVALID { 0, 0 } #define INVALID { 0, 0 }
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#define FB_MAX 8 #define FB_MAX 8
#endif #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 { struct prom_args {
const char *service; const char *service;
...@@ -376,7 +376,7 @@ check_display(unsigned long mem) ...@@ -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 /* 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) ...@@ -457,7 +457,7 @@ copy_device_tree(unsigned long mem_start, unsigned long mem_end)
prom_exit(); prom_exit();
} }
allnextp = &allnodes; allnextp = &allnodes;
mem_start = ALIGN(mem_start); mem_start = ALIGNUL(mem_start);
new_start = inspect_node(root, 0, mem_start, mem_end, &allnextp); new_start = inspect_node(root, 0, mem_start, mem_end, &allnextp);
*allnextp = 0; *allnextp = 0;
return new_start; return new_start;
...@@ -501,7 +501,7 @@ inspect_node(phandle node, struct device_node *dad, ...@@ -501,7 +501,7 @@ inspect_node(phandle node, struct device_node *dad,
if ((int) call_prom("nextprop", 3, 1, node, prev_name, if ((int) call_prom("nextprop", 3, 1, node, prev_name,
namep) <= 0) namep) <= 0)
break; break;
mem_start = ALIGN((unsigned long)namep + strlen(namep) + 1); mem_start = ALIGNUL((unsigned long)namep + strlen(namep) + 1);
prev_name = namep; prev_name = namep;
valp = (unsigned char *) mem_start; valp = (unsigned char *) mem_start;
pp->value = PTRUNRELOC(valp); pp->value = PTRUNRELOC(valp);
...@@ -514,7 +514,7 @@ inspect_node(phandle node, struct device_node *dad, ...@@ -514,7 +514,7 @@ inspect_node(phandle node, struct device_node *dad,
if (pp->length > MAX_PROPERTY_LENGTH) if (pp->length > MAX_PROPERTY_LENGTH)
continue; /* ignore this property */ continue; /* ignore this property */
#endif #endif
mem_start = ALIGN(mem_start + pp->length); mem_start = ALIGNUL(mem_start + pp->length);
*prev_propp = PTRUNRELOC(pp); *prev_propp = PTRUNRELOC(pp);
prev_propp = &pp->next; prev_propp = &pp->next;
} }
...@@ -526,7 +526,7 @@ inspect_node(phandle node, struct device_node *dad, ...@@ -526,7 +526,7 @@ inspect_node(phandle node, struct device_node *dad,
namep = (char *) (pp + 1); namep = (char *) (pp + 1);
pp->name = PTRUNRELOC(namep); pp->name = PTRUNRELOC(namep);
strcpy(namep, "linux,phandle"); 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->value = (unsigned char *) PTRUNRELOC(&np->node);
pp->length = sizeof(np->node); pp->length = sizeof(np->node);
} }
...@@ -538,7 +538,7 @@ inspect_node(phandle node, struct device_node *dad, ...@@ -538,7 +538,7 @@ inspect_node(phandle node, struct device_node *dad,
if (l >= 0) { if (l >= 0) {
np->full_name = PTRUNRELOC((char *) mem_start); np->full_name = PTRUNRELOC((char *) mem_start);
*(char *)(mem_start + l) = 0; *(char *)(mem_start + l) = 0;
mem_start = ALIGN(mem_start + l + 1); mem_start = ALIGNUL(mem_start + l + 1);
} }
/* do all our children */ /* do all our children */
...@@ -741,7 +741,7 @@ prom_init(int r3, int r4, prom_entry pp) ...@@ -741,7 +741,7 @@ prom_init(int r3, int r4, prom_entry pp)
*d = 0; *d = 0;
call_prom("canon", 3, 1, p, d, 1<<20); call_prom("canon", 3, 1, p, d, 1<<20);
bootdevice = PTRUNRELOC(d); bootdevice = PTRUNRELOC(d);
mem = ALIGN(mem + strlen(d) + 1); mem = ALIGNUL(mem + strlen(d) + 1);
} }
prom_instantiate_rtas(); prom_instantiate_rtas();
......
...@@ -99,7 +99,6 @@ typedef struct siginfo { ...@@ -99,7 +99,6 @@ typedef struct siginfo {
/* /*
* si_code values * si_code values
* Digital reserves positive values for kernel-generated signals.
*/ */
#define SI_USER 0 /* sent by kill, sigsend, raise */ #define SI_USER 0 /* sent by kill, sigsend, raise */
#define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ #define SI_KERNEL 0x80 /* sent by the kernel from somewhere */
...@@ -109,6 +108,7 @@ typedef struct siginfo { ...@@ -109,6 +108,7 @@ typedef struct siginfo {
#define SI_ASYNCIO -4 /* sent by AIO completion */ #define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_SIGIO -5 /* sent by queued SIGIO */
#define SI_TKILL -6 /* sent by tkill system call */ #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_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
......
...@@ -22,6 +22,7 @@ struct thread_info { ...@@ -22,6 +22,7 @@ struct thread_info {
struct exec_domain *exec_domain; /* execution domain */ struct exec_domain *exec_domain; /* execution domain */
unsigned long flags; /* low level flags */ unsigned long flags; /* low level flags */
int cpu; /* cpu we're on */ 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