aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@kernel.bkbits.net>2004-08-09 15:09:24 -0700
committerDavid S. Miller <davem@kernel.bkbits.net>2004-08-09 15:09:24 -0700
commit60efec8e05c9fb71841c7587c55345c4b79d1856 (patch)
treedcc23d4f2dcf6da6445f3fc688e2a1ad29bc0351 /arch
parent79bd9937a72837bcc12db89d2d4fc62795227892 (diff)
parent3dc527ecfb95dcb5760bd2b339323518496d53eb (diff)
downloadhistory-60efec8e05c9fb71841c7587c55345c4b79d1856.tar.gz
Merge davem@nuts.davemloft.net:/disk1/BK/sparc-2.6
into kernel.bkbits.net:/home/davem/sparc-2.6
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/bootp/Makefile4
-rw-r--r--arch/arm/boot/compressed/Makefile2
-rw-r--r--arch/mips/lasat/sysctl.c24
-rw-r--r--arch/ppc64/mm/slb_low.S33
4 files changed, 37 insertions, 26 deletions
diff --git a/arch/arm/boot/bootp/Makefile b/arch/arm/boot/bootp/Makefile
index 6318bc963d9636..8e8879b6b3d786 100644
--- a/arch/arm/boot/bootp/Makefile
+++ b/arch/arm/boot/bootp/Makefile
@@ -7,10 +7,10 @@ LDFLAGS_bootp :=-p --no-undefined -X \
--defsym params_phys=$(PARAMS_PHYS) -T
AFLAGS_initrd.o :=-DINITRD=\"$(INITRD)\"
-targets := bootp bootp.lds init.o kernel.o initrd.o
+targets := bootp init.o kernel.o initrd.o
# Note that bootp.lds picks up kernel.o and initrd.o
-$(obj)/bootp: $(addprefix $(obj)/,bootp.lds init.o kernel.o initrd.o) FORCE
+$(obj)/bootp: $(src)/bootp.lds $(addprefix $(obj)/,init.o kernel.o initrd.o) FORCE
$(call if_changed,ld)
@:
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 4b5a13f93b6b9a..951fbf6e81f8cf 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -101,7 +101,7 @@ $(obj)/piggy.o: $(obj)/piggy.gz FORCE
CFLAGS_font.o := -Dstatic=
$(obj)/font.o: $(FONTC)
-$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in Makefile arch/arm/boot/Makefile .config
+$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config
@sed "$(SEDFLAGS)" < $< > $@
$(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index dcae0c4899332b..1c0cc620a43f86 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -60,11 +60,11 @@ int sysctl_lasatstring(ctl_table *table, int *name, int nlen,
/* And the same for proc */
int proc_dolasatstring(ctl_table *table, int write, struct file *filp,
- void *buffer, size_t *lenp)
+ void *buffer, size_t *lenp, loff_t *ppos)
{
int r;
down(&lasat_info_sem);
- r = proc_dostring(table, write, filp, buffer, lenp);
+ r = proc_dostring(table, write, filp, buffer, lenp, ppos);
if ( (!write) || r) {
up(&lasat_info_sem);
return r;
@@ -76,11 +76,11 @@ int proc_dolasatstring(ctl_table *table, int write, struct file *filp,
/* proc function to write EEPROM after changing int entry */
int proc_dolasatint(ctl_table *table, int write, struct file *filp,
- void *buffer, size_t *lenp)
+ void *buffer, size_t *lenp, loff_t *ppos)
{
int r;
down(&lasat_info_sem);
- r = proc_dointvec(table, write, filp, buffer, lenp);
+ r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
if ( (!write) || r) {
up(&lasat_info_sem);
return r;
@@ -95,7 +95,7 @@ static int rtctmp;
#ifdef CONFIG_DS1603
/* proc function to read/write RealTime Clock */
int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
- void *buffer, size_t *lenp)
+ void *buffer, size_t *lenp, loff_t *ppos)
{
int r;
down(&lasat_info_sem);
@@ -105,7 +105,7 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
if (rtctmp < 0)
rtctmp = 0;
}
- r = proc_dointvec(table, write, filp, buffer, lenp);
+ r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
if ( (!write) || r) {
up(&lasat_info_sem);
return r;
@@ -180,14 +180,14 @@ void update_bcastaddr(void)
static char proc_lasat_ipbuf[32];
/* Parsing of IP address */
int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
- void *buffer, size_t *lenp)
+ void *buffer, size_t *lenp, loff_t *ppos)
{
int len;
unsigned int ip;
char *p, c;
if (!table->data || !table->maxlen || !*lenp ||
- (filp->f_pos && !write)) {
+ (*ppos && !write)) {
*lenp = 0;
return 0;
}
@@ -213,7 +213,7 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
return -EFAULT;
}
proc_lasat_ipbuf[len] = 0;
- filp->f_pos += *lenp;
+ *ppos += *lenp;
/* Now see if we can convert it to a valid IP */
ip = in_aton(proc_lasat_ipbuf);
*(unsigned int *)(table->data) = ip;
@@ -241,7 +241,7 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
len++;
}
*lenp = len;
- filp->f_pos += len;
+ *ppos += len;
}
update_bcastaddr();
up(&lasat_info_sem);
@@ -277,11 +277,11 @@ static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen,
}
int proc_lasat_eeprom_value(ctl_table *table, int write, struct file *filp,
- void *buffer, size_t *lenp)
+ void *buffer, size_t *lenp, loff_t *ppos)
{
int r;
down(&lasat_info_sem);
- r = proc_dointvec(table, write, filp, buffer, lenp);
+ r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
if ( (!write) || r) {
up(&lasat_info_sem);
return r;
diff --git a/arch/ppc64/mm/slb_low.S b/arch/ppc64/mm/slb_low.S
index 367cb7dec8580b..4b3dfe091c1ff3 100644
--- a/arch/ppc64/mm/slb_low.S
+++ b/arch/ppc64/mm/slb_low.S
@@ -37,9 +37,6 @@ _GLOBAL(slb_allocate)
* a free slot first but that took too long. Unfortunately we
* dont have any LRU information to help us choose a slot.
*/
- srdi r9,r1,27
- ori r9,r9,1 /* mangle SP for later compare */
-
ld r10,PACASTABRR(r13)
3:
addi r10,r10,1
@@ -48,18 +45,32 @@ _GLOBAL(slb_allocate)
blt+ 4f
li r10,SLB_NUM_BOLTED
-4:
- slbmfee r11,r10
- /* Don't throw out the segment for our kernel stack. Since we
+
+ /*
+ * Never cast out the segment for our kernel stack. Since we
* dont invalidate the ERAT we could have a valid translation
- * for the kernel stack during the first part of exception
- * exit which gets invalidated due to a tlbie from another cpu
- * at a non recoverable point (after setting srr0/1) - Anton
- *
+ * for the kernel stack during the first part of exception exit
+ * which gets invalidated due to a tlbie from another cpu at a
+ * non recoverable point (after setting srr0/1) - Anton
+ */
+4: slbmfee r11,r10
+ srdi r11,r11,27
+ /*
+ * Use paca->ksave as the value of the kernel stack pointer,
+ * because this is valid at all times.
* The >> 27 (rather than >> 28) is so that the LSB is the
* valid bit - this way we check valid and ESID in one compare.
+ * In order to completely close the tiny race in the context
+ * switch (between updating r1 and updating paca->ksave),
+ * we check against both r1 and paca->ksave.
*/
- srdi r11,r11,27
+ srdi r9,r1,27
+ ori r9,r9,1 /* mangle SP for later compare */
+ cmpd r11,r9
+ beq- 3b
+ ld r9,PACAKSAVE(r13)
+ srdi r9,r9,27
+ ori r9,r9,1
cmpd r11,r9
beq- 3b