PERFORCE change 116873 for review
Roman Divacky
rdivacky at FreeBSD.org
Thu Mar 29 20:32:59 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=116873
Change 116873 by rdivacky at rdivacky_witten on 2007/03/29 20:32:06
IFC
Affected files ...
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux.h#26 integrate
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_dummy.c#11 integrate
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_proto.h#22 integrate
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_syscall.h#22 integrate
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_sysent.c#21 integrate
.. //depot/projects/linuxolator/src/sys/amd64/linux32/syscalls.master#22 integrate
.. //depot/projects/linuxolator/src/sys/arm/at91/at91_st.c#5 integrate
.. //depot/projects/linuxolator/src/sys/arm/xscale/i80321/i80321_wdog.c#3 integrate
.. //depot/projects/linuxolator/src/sys/arm/xscale/ixp425/ixp425_wdog.c#2 integrate
.. //depot/projects/linuxolator/src/sys/boot/arm/at91/boot2/boot2.c#4 integrate
.. //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#4 integrate
.. //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#4 integrate
.. //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/emac.c#5 integrate
.. //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/getc.c#2 integrate
.. //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/memcmp.c#3 integrate
.. //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/sd-card.c#4 integrate
.. //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/spi_flash.c#4 integrate
.. //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/strlen.c#3 integrate
.. //depot/projects/linuxolator/src/sys/compat/linux/linux_file.c#17 integrate
.. //depot/projects/linuxolator/src/sys/compat/linux/linux_util.h#4 integrate
.. //depot/projects/linuxolator/src/sys/conf/options#20 integrate
.. //depot/projects/linuxolator/src/sys/dev/acpica/acpi_hpet.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/fxp/if_fxp.c#8 integrate
.. //depot/projects/linuxolator/src/sys/dev/ichwd/ichwd.c#4 integrate
.. //depot/projects/linuxolator/src/sys/dev/ipmi/ipmi.c#8 integrate
.. //depot/projects/linuxolator/src/sys/dev/isp/isp_sbus.c#9 integrate
.. //depot/projects/linuxolator/src/sys/dev/mk48txx/mk48txx.c#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/re/if_re.c#11 integrate
.. //depot/projects/linuxolator/src/sys/dev/scc/scc_bfe.h#4 integrate
.. //depot/projects/linuxolator/src/sys/dev/scc/scc_core.c#4 integrate
.. //depot/projects/linuxolator/src/sys/dev/scc/scc_if.m#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/sio/sio_pci.c#2 integrate
.. //depot/projects/linuxolator/src/sys/dev/uart/uart_core.c#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/uart/uart_dev_ns8250.c#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/usb/uhci.c#3 integrate
.. //depot/projects/linuxolator/src/sys/dev/watchdog/watchdog.c#3 integrate
.. //depot/projects/linuxolator/src/sys/i386/i386/elan-mmcr.c#3 integrate
.. //depot/projects/linuxolator/src/sys/i386/i386/geode.c#2 integrate
.. //depot/projects/linuxolator/src/sys/i386/linux/linux.h#22 integrate
.. //depot/projects/linuxolator/src/sys/i386/linux/linux_dummy.c#11 integrate
.. //depot/projects/linuxolator/src/sys/i386/linux/linux_proto.h#22 integrate
.. //depot/projects/linuxolator/src/sys/i386/linux/linux_syscall.h#21 integrate
.. //depot/projects/linuxolator/src/sys/i386/linux/linux_sysent.c#21 integrate
.. //depot/projects/linuxolator/src/sys/i386/linux/syscalls.master#21 integrate
.. //depot/projects/linuxolator/src/sys/kern/init_main.c#9 integrate
.. //depot/projects/linuxolator/src/sys/kern/kern_thread.c#7 integrate
.. //depot/projects/linuxolator/src/sys/kern/vfs_bio.c#11 integrate
.. //depot/projects/linuxolator/src/sys/net/rtsock.c#4 integrate
.. //depot/projects/linuxolator/src/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c#2 integrate
.. //depot/projects/linuxolator/src/sys/netgraph/netflow/ng_netflow.c#3 integrate
.. //depot/projects/linuxolator/src/sys/netgraph/netflow/ng_netflow.h#2 integrate
.. //depot/projects/linuxolator/src/sys/netinet/in_pcb.h#3 integrate
.. //depot/projects/linuxolator/src/sys/netinet/tcp_input.c#13 integrate
.. //depot/projects/linuxolator/src/sys/sys/mount.h#8 integrate
.. //depot/projects/linuxolator/src/sys/ufs/ffs/ffs_softdep.c#8 integrate
Differences ...
==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux.h#26 (text+ko) ====
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/linux32/linux.h,v 1.14 2007/03/02 00:08:47 jkim Exp $
+ * $FreeBSD: src/sys/amd64/linux32/linux.h,v 1.15 2007/03/29 02:11:46 julian Exp $
*/
#ifndef _AMD64_LINUX_H_
==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_dummy.c#11 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_dummy.c,v 1.7 2006/12/31 13:16:00 netchild Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_dummy.c,v 1.8 2007/03/29 02:11:46 julian Exp $");
#include <sys/param.h>
#include <sys/systm.h>
==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_proto.h#22 (text+ko) ====
@@ -2,7 +2,7 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD$
+ * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.30 2007/03/29 02:11:46 julian Exp $
* created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.26 2007/02/15 01:13:36 jkim Exp
*/
==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_syscall.h#22 (text+ko) ====
@@ -2,7 +2,7 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD$
+ * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.30 2007/03/29 02:11:46 julian Exp $
* created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.26 2007/02/15 01:13:36 jkim Exp
*/
==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_sysent.c#21 (text+ko) ====
@@ -2,7 +2,7 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD$
+ * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.30 2007/03/29 02:11:46 julian Exp $
* created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.26 2007/02/15 01:13:36 jkim Exp
*/
==== //depot/projects/linuxolator/src/sys/amd64/linux32/syscalls.master#22 (text+ko) ====
@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.26 2007/02/15 01:13:36 jkim Exp $
+ $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.27 2007/03/29 02:11:46 julian Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
; System call name/number master file (or rather, slave, from LINUX).
==== //depot/projects/linuxolator/src/sys/arm/at91/at91_st.c#5 (text) ====
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/at91/at91_st.c,v 1.8 2007/02/23 12:18:27 piso Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/at91/at91_st.c,v 1.9 2007/03/27 21:03:35 n_hibma Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -171,13 +171,11 @@
int t;
t = cmd & WD_INTERVAL;
- if (cmd > 0 && t >= 22 && t <= 37) {
+ if (t >= 22 && t <= 37) {
wdog = (1 << (t - 22)) | ST_WDMR_RSTEN;
*error = 0;
} else {
wdog = 0;
- if (cmd > 0)
- *error = EINVAL;
}
WR4(ST_WDMR, wdog);
WR4(ST_CR, ST_CR_WDRST);
==== //depot/projects/linuxolator/src/sys/arm/xscale/i80321/i80321_wdog.c#3 (text+ko) ====
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_wdog.c,v 1.3 2006/12/15 21:44:48 n_hibma Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/i80321_wdog.c,v 1.4 2007/03/27 21:03:35 n_hibma Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -111,18 +111,15 @@
cmd &= WD_INTERVAL;
if (cmd > 0 && cmd <= 63
- && (uint64_t)1 << (cmd & WD_INTERVAL) <=
- (uint64_t)sc->wdog_period * 1000000000) {
+ && (uint64_t)1<<cmd <= (uint64_t)sc->wdog_period * 1000000000) {
/* Valid value -> Enable watchdog */
iopwdog_tickle(sc);
sc->armed = 1;
*error = 0;
} else {
- /* XXX Can't disable this watchdog? */
+ /* Can't disable this watchdog! */
if (sc->armed)
*error = EOPNOTSUPP;
- else if (cmd > 0)
- *error = EINVAL;
}
}
==== //depot/projects/linuxolator/src/sys/arm/xscale/ixp425/ixp425_wdog.c#2 (text+ko) ====
@@ -22,7 +22,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_wdog.c,v 1.1 2006/11/19 23:55:23 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_wdog.c,v 1.2 2007/03/27 21:03:36 n_hibma Exp $");
/*
* IXP425 Watchdog Timer Support.
@@ -70,7 +70,7 @@
u_int u = cmd & WD_INTERVAL;
WR4(sc, IXP425_OST_WDOG_KEY, OST_WDOG_KEY_MAJICK);
- if (cmd && 4 <= u && u <= 35) {
+ if (4 <= u && u <= 35) {
WR4(sc, IXP425_OST_WDOG_ENAB, 0);
/* approximate 66.66MHz cycles */
WR4(sc, IXP425_OST_WDOG, 2<<(u - 4));
==== //depot/projects/linuxolator/src/sys/boot/arm/at91/boot2/boot2.c#4 (text+ko) ====
@@ -14,7 +14,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.3 2006/11/16 00:47:31 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.4 2007/03/28 21:18:45 imp Exp $");
#include <sys/param.h>
#include <sys/disklabel.h>
@@ -114,12 +114,10 @@
char *s;
s = cmd;
- if (c)
- *s++ = c;
+ if (c == 0)
+ c = getc(10000);
for (;;) {
- c = getc(10000);
-
- switch (c = getc(10000)) {
+ switch (c) {
case 0:
break;
case '\177':
@@ -138,6 +136,7 @@
*s++ = c;
xputchar(c);
}
+ c = getc(10000);
}
}
@@ -170,7 +169,8 @@
/* Present the user with the boot2 prompt. */
- strcpy(kname, PATH_KERNEL);
+ if (*kname == '\0')
+ strcpy(kname, PATH_KERNEL);
for (;;) {
printf("\nDefault: %s\nboot: ", kname);
if (!autoboot || (c = getc(2)) != -1)
@@ -252,6 +252,7 @@
opts ^= OPT_SET(flags[i]);
}
} else {
+ arg--;
if ((i = ep - arg)) {
if ((size_t)i >= sizeof(kname))
return -1;
==== //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#4 (text) ====
@@ -24,7 +24,7 @@
* This software is derived from software provide by Kwikbyte who specifically
* disclaimed copyright on the code.
*
- * $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c,v 1.4 2006/11/09 20:32:36 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c,v 1.5 2007/03/28 22:40:37 imp Exp $
*/
#include "at91rm9200.h"
@@ -53,6 +53,7 @@
register unsigned value;
volatile sdram_size_t *p = (sdram_size_t *)SDRAM_BASE;
+ AT91C_BASE_ST->ST_RTMR = 1;
#ifdef BOOT_TSC
// For the TSC board, we turn ON the one LED we have while
// early in boot.
==== //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#4 (text) ====
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h,v 1.4 2006/12/20 18:18:24 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h,v 1.5 2007/03/28 22:40:37 imp Exp $
*/
#ifndef _AT91RM9200_LOWLEVEL_H_
@@ -58,7 +58,8 @@
/* Master clock frequency at power-up */
#define AT91C_MASTER_CLOCK 60000000
-#define GetSeconds() (AT91C_BASE_RTC->RTC_TIMR & AT91C_RTC_SEC)
+/* #define GetSeconds() (AT91C_BASE_RTC->RTC_TIMR & AT91C_RTC_SEC) */
+#define GetSeconds() (AT91C_BASE_ST->ST_CRTR >> 15)
extern void _init(void);
==== //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/emac.c#5 (text) ====
@@ -19,7 +19,7 @@
* only.
* END_BLOCK
*
- * $FreeBSD: src/sys/boot/arm/at91/libat91/emac.c,v 1.6 2006/12/20 18:26:37 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/libat91/emac.c,v 1.7 2007/03/28 22:40:37 imp Exp $
******************************************************************************/
#include "at91rm9200.h"
@@ -412,7 +412,8 @@
break;
printf(".");
sec = GetSeconds();
- while (GetSeconds() <= sec) continue;
+ while (GetSeconds() == sec)
+ continue;
}
if (stat2 & MII_STS_LINK_STAT)
break;
@@ -541,7 +542,7 @@
dlAddress = (char*)address;
lastSize = 0;
timeout = 10;
- thisSeconds = GetSeconds() + 1;
+ thisSeconds = (GetSeconds() + 2) % 32;
serverPort = SWAP16(69);
++localPort;
ackBlock = -1;
@@ -551,10 +552,10 @@
if (ackBlock == -2)
break;
timeout = 10;
- thisSeconds = GetSeconds() + 1;
- } else if (GetSeconds() > thisSeconds) {
+ thisSeconds = (GetSeconds() + 2) % 32;
+ } else if (GetSeconds() == thisSeconds) {
--timeout;
- thisSeconds = GetSeconds() + 1;
+ thisSeconds = (GetSeconds() + 2) % 32;
if (!serverMACSet)
GetServerAddress();
else if (ackBlock == -1)
==== //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/getc.c#2 (text) ====
@@ -31,7 +31,7 @@
* owners. This software is not copyrighted and is intended for reference
* only.
*
- * $FreeBSD: src/sys/boot/arm/at91/libat91/getc.c,v 1.2 2006/04/21 13:58:51 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/libat91/getc.c,v 1.3 2007/03/28 22:40:37 imp Exp $
*/
#include "at91rm9200.h"
@@ -50,13 +50,15 @@
AT91PS_USART pUSART = (AT91PS_USART)AT91C_BASE_DBGU;
unsigned thisSecond;
+ // Clamp to 20s
+ if (seconds > 20)
+ seconds = 20;
thisSecond = GetSeconds();
seconds = thisSecond + seconds;
-
do {
if ((pUSART->US_CSR & AT91C_US_RXRDY))
return (pUSART->US_RHR & 0xFF);
thisSecond = GetSeconds();
- } while (thisSecond < seconds);
+ } while (thisSecond != seconds);
return (-1);
}
==== //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/memcmp.c#3 (text+ko) ====
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/memcmp.c,v 1.2 2006/11/09 20:32:36 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/memcmp.c,v 1.3 2007/03/28 21:15:50 imp Exp $");
#include "lib.h"
@@ -34,5 +34,5 @@
while ((--size) && (*to++ == *from++))
continue;
- return (*to != *from);
+ return (size || (*to != *from));
}
==== //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/sd-card.c#4 (text+ko) ====
@@ -24,7 +24,7 @@
* This software is derived from software provide by Kwikbyte who specifically
* disclaimed copyright on the code.
*
- * $FreeBSD: src/sys/boot/arm/at91/libat91/sd-card.c,v 1.3 2006/11/09 20:32:36 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/libat91/sd-card.c,v 1.4 2007/03/28 22:31:32 imp Exp $
*/
//*----------------------------------------------------------------------------
@@ -157,8 +157,9 @@
static int
MCI_ReadBlock(int src, unsigned int *dataBuffer, int sizeToRead)
{
- unsigned log2sl = MCI_Device.READ_BL_LEN;
- unsigned sectorLength = 1 << log2sl;
+// unsigned log2sl = MCI_Device.READ_BL_LEN;
+// unsigned sectorLength = 1 << log2sl;
+ unsigned sectorLength = 512;
///////////////////////////////////////////////////////////////////////
if (MCI_Device.state != AT91C_MCI_IDLE)
@@ -195,8 +196,9 @@
int
MCI_read(char* dest, unsigned source, unsigned length)
{
- unsigned log2sl = MCI_Device.READ_BL_LEN;
- unsigned sectorLength = 1 << log2sl;
+// unsigned log2sl = MCI_Device.READ_BL_LEN;
+// unsigned sectorLength = 1 << log2sl;
+ unsigned sectorLength = 512;
int sizeToRead;
unsigned int *walker;
==== //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/spi_flash.c#4 (text+ko) ====
@@ -19,7 +19,7 @@
* only.
* END_BLOCK
*
- * $FreeBSD: src/sys/boot/arm/at91/libat91/spi_flash.c,v 1.3 2006/12/20 18:25:16 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/libat91/spi_flash.c,v 1.4 2007/03/28 22:38:01 imp Exp $
*****************************************************************************/
#include "at91rm9200.h"
@@ -256,9 +256,6 @@
value = pSPI->SPI_RDR;
value = pSPI->SPI_SR;
- // Increment real time counter every SLCK
- AT91C_BASE_ST->ST_RTMR = 1;
-
#ifdef BOOT_BWCT
if (((value = GetFlashStatus()) & 0xFC) != 0xB4)
printf(" Bad SPI status: 0x%x\n", value);
==== //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/strlen.c#3 (text+ko) ====
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/strlen.c,v 1.2 2006/11/09 20:32:36 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/strlen.c,v 1.3 2007/03/28 21:12:43 imp Exp $");
/******************************************************************************
*
@@ -64,5 +64,5 @@
const char *ptr = buffer;
while (*ptr++)
continue;
- return (ptr - buffer);
+ return (ptr - buffer - 1);
}
==== //depot/projects/linuxolator/src/sys/compat/linux/linux_file.c#17 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.101 2007/01/18 10:42:10 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.102 2007/03/29 02:11:45 julian Exp $");
#include "opt_compat.h"
#include "opt_mac.h"
@@ -234,6 +234,116 @@
return error;
}
+/*
+ * common code for linux *at set of syscalls
+ *
+ * works like this:
+ * if filename is absolute
+ * ignore dirfd
+ * else
+ * if dirfd == AT_FDCWD
+ * return CWD/filename
+ * else
+ * return DIRFD/filename
+ */
+static int
+linux_at(struct thread *td, int dirfd, char *filename, char **newpath, char **freebuf)
+{
+ struct file *fp;
+ int error = 0;
+ struct vnode *dvp;
+ struct filedesc *fdp = td->td_proc->p_fd;
+ char *fullpath = "unknown";
+ char *freepath = NULL;
+
+ /* don't do anything if the pathname is absolute */
+ if (*filename == '/') {
+ *newpath= filename;
+ return (0);
+ }
+
+ /* check for AT_FDWCD */
+ if (dirfd == LINUX_AT_FDCWD) {
+ FILEDESC_LOCK(fdp);
+ dvp = fdp->fd_cdir;
+ FILEDESC_UNLOCK(fdp);
+ } else {
+ error = fget(td, dirfd, &fp);
+ if (error)
+ return (error);
+ dvp = fp->f_vnode;
+ /* only a dir can be dfd */
+ if (dvp->v_type != VDIR) {
+ fdrop(fp, td);
+ return (ENOTDIR);
+ }
+ fdrop(fp, td);
+ }
+
+ error = vn_fullpath(td, dvp, &fullpath, &freepath);
+ if (!error) {
+ *newpath = malloc(strlen(fullpath) + strlen(filename) + 2, M_TEMP, M_WAITOK | M_ZERO);
+ *freebuf = freepath;
+ sprintf(*newpath, "%s/%s", fullpath, filename);
+ }
+
+ return (error);
+}
+
+int
+linux_openat(struct thread *td, struct linux_openat_args *args)
+{
+ char *newpath, *oldpath, *freebuf = NULL, *path;
+ int error;
+
+ oldpath = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ error = copyinstr(args->filename, oldpath, MAXPATHLEN, NULL);
+
+#ifdef DEBUG
+ if (ldebug(openat))
+ printf(ARGS(openat, "%i, %s, 0x%x, 0x%x"), args->dfd,
+ oldpath, args->flags, args->mode);
+#endif
+
+ error = linux_at(td, args->dfd, oldpath, &newpath, &freebuf);
+ if (error)
+ return (error);
+#ifdef DEBUG
+ printf(LMSG("newpath: %s"), newpath);
+#endif
+ if (args->flags & LINUX_O_CREAT)
+ LCONVPATH_SEG(td, newpath, &path, 1, UIO_SYSSPACE);
+ else
+ LCONVPATH_SEG(td, newpath, &path, 0, UIO_SYSSPACE);
+ if (freebuf)
+ free(freebuf, M_TEMP);
+ if (*oldpath != '/')
+ free(newpath, M_TEMP);
+
+ error = linux_common_open(td, path, args->flags, args->mode, 1);
+ free(oldpath, M_TEMP);
+ return (error);
+}
+
+int
+linux_open(struct thread *td, struct linux_open_args *args)
+{
+ char *path;
+
+ if (args->flags & LINUX_O_CREAT)
+ LCONVPATHCREAT(td, args->path, &path);
+ else
+ LCONVPATHEXIST(td, args->path, &path);
+
+#ifdef DEBUG
+ if (ldebug(open))
+ printf(ARGS(open, "%s, 0x%x, 0x%x"),
+ path, args->flags, args->mode);
+#endif
+
+ return linux_common_open(td, path, args->flags, args->mode, 0);
+}
+
int
linux_openat(struct thread *td, struct linux_openat_args *args)
{
==== //depot/projects/linuxolator/src/sys/compat/linux/linux_util.h#4 (text+ko) ====
@@ -28,7 +28,7 @@
*
* from: svr4_util.h,v 1.5 1994/11/18 02:54:31 christos Exp
* from: linux_util.h,v 1.2 1995/03/05 23:23:50 fvdl Exp
- * $FreeBSD: src/sys/compat/linux/linux_util.h,v 1.28 2006/06/27 18:30:49 jhb Exp $
+ * $FreeBSD: src/sys/compat/linux/linux_util.h,v 1.29 2007/03/29 02:11:45 julian Exp $
*/
/*
==== //depot/projects/linuxolator/src/sys/conf/options#20 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.582 2007/03/22 18:16:39 jkim Exp $
+# $FreeBSD: src/sys/conf/options,v 1.583 2007/03/27 19:32:40 jhb Exp $
#
# On the handling of kernel options
#
@@ -59,7 +59,6 @@
# Miscellaneous options.
ADAPTIVE_GIANT opt_adaptive_mutexes.h
-NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h
ALQ
AUDIT opt_global.h
CODA_COMPAT_5 opt_coda.h
@@ -124,6 +123,7 @@
MPROF_BUFFERS opt_mprof.h
MPROF_HASH_SIZE opt_mprof.h
MUTEX_WAKE_ALL
+NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h
NO_ADAPTIVE_RWLOCKS
NSWBUF_MIN opt_swap.h
PANIC_REBOOT_WAIT_TIME opt_panic.h
==== //depot/projects/linuxolator/src/sys/dev/acpica/acpi_hpet.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_hpet.c,v 1.5 2006/08/11 17:12:16 des Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_hpet.c,v 1.6 2007/03/28 22:28:48 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -154,6 +154,18 @@
return (EBUSY);
}
+static int
+acpi_hpet_resume(device_t dev)
+{
+ struct acpi_hpet_softc *sc;
+
+ /* Re-enable the timer after a resume to keep the clock advancing. */
+ sc = device_get_softc(dev);
+ bus_write_4(sc->mem_res, HPET_OFFSET_ENABLE, 1);
+
+ return (0);
+}
+
/* Print some basic latency/rate information to assist in debugging. */
static void
acpi_hpet_test(struct acpi_hpet_softc *sc)
@@ -188,6 +200,7 @@
DEVMETHOD(device_probe, acpi_hpet_probe),
DEVMETHOD(device_attach, acpi_hpet_attach),
DEVMETHOD(device_detach, acpi_hpet_detach),
+ DEVMETHOD(device_resume, acpi_hpet_resume),
{0, 0}
};
==== //depot/projects/linuxolator/src/sys/dev/fxp/if_fxp.c#8 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.264 2007/02/23 12:18:41 piso Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.265 2007/03/28 18:10:50 remko Exp $");
/*
* Intel EtherExpress Pro/100B PCI Fast Ethernet driver
@@ -178,6 +178,7 @@
{ 0x1065, -1, "Intel 82562ET/EZ/GT/GZ PRO/100 VE Ethernet" },
{ 0x1068, -1, "Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" },
{ 0x1069, -1, "Intel 82562EM/EX/GX Pro/100 Ethernet" },
+ { 0x1091, -1, "Intel 82562GX Pro/100 Ethernet" },
{ 0x1092, -1, "Intel Pro/100 VE Network Connection" },
{ 0x1093, -1, "Intel Pro/100 VM Network Connection" },
{ 0x1094, -1, "Intel Pro/100 946GZ (ICH7) Network Connection" },
==== //depot/projects/linuxolator/src/sys/dev/ichwd/ichwd.c#4 (text+ko) ====
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ichwd/ichwd.c,v 1.8 2007/03/13 15:54:26 n_hibma Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ichwd/ichwd.c,v 1.9 2007/03/27 21:03:36 n_hibma Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -194,8 +194,6 @@
} else {
if (sc->active)
ichwd_tmr_disable(sc);
- if (cmd > 0)
- *error = EINVAL;
}
}
==== //depot/projects/linuxolator/src/sys/dev/ipmi/ipmi.c#8 (text) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ipmi/ipmi.c,v 1.9 2007/02/23 12:18:44 piso Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ipmi/ipmi.c,v 1.10 2007/03/27 21:03:36 n_hibma Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -656,8 +656,6 @@
*error = 0;
} else {
ipmi_set_watchdog(sc, 0);
- if (cmd > 0)
- *error = 0;
}
}
==== //depot/projects/linuxolator/src/sys/dev/isp/isp_sbus.c#9 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/isp/isp_sbus.c,v 1.30 2007/03/13 06:46:08 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/isp/isp_sbus.c,v 1.31 2007/03/28 16:34:11 mjacob Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -193,8 +193,6 @@
sbs->sbus_dev = dev;
sbs->sbus_reg = regs;
sbs->sbus_mdvec = mdvec;
- isp->isp_bus_tag = rman_get_bustag(regs);
- isp->isp_bus_handle = rman_get_bushandle(regs);
sbs->sbus_poff[BIU_BLOCK >> _BLK_REG_SHFT] = BIU_REGS_OFF;
sbs->sbus_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = SBUS_MBOX_REGS_OFF;
@@ -202,6 +200,8 @@
sbs->sbus_poff[RISC_BLOCK >> _BLK_REG_SHFT] = SBUS_RISC_REGS_OFF;
sbs->sbus_poff[DMA_BLOCK >> _BLK_REG_SHFT] = DMA_REGS_OFF;
isp = &sbs->sbus_isp;
+ isp->isp_bus_tag = rman_get_bustag(regs);
+ isp->isp_bus_handle = rman_get_bushandle(regs);
isp->isp_mdvec = &sbs->sbus_mdvec;
isp->isp_bustype = ISP_BT_SBUS;
isp->isp_type = ISP_HA_SCSI_UNKNOWN;
==== //depot/projects/linuxolator/src/sys/dev/mk48txx/mk48txx.c#3 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/mk48txx/mk48txx.c,v 1.8 2006/12/15 21:44:49 n_hibma Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/mk48txx/mk48txx.c,v 1.9 2007/03/27 21:03:36 n_hibma Exp $");
/*
* Mostek MK48T02, MK48T08, MK48T18, MK48T59 time-of-day chip subroutines.
@@ -295,9 +295,9 @@
dev = arg;
sc = device_get_softc(dev);
- wdog = 0;
t = cmd & WD_INTERVAL;
- if (cmd > 0 && t >= 26 && t <= 37) {
+ if (t >= 26 && t <= 37) {
+ wdog = 0;
if (t <= WD_TO_2SEC) {
wdog |= MK48TXX_WDOG_RB_1_16;
t -= 26;
@@ -317,8 +317,8 @@
if (sc->sc_flag & MK48TXX_WDOG_ENABLE_WDS)
wdog |= MK48TXX_WDOG_WDS;
*error = 0;
- } else if (cmd > 0) {
- *error = EINVAL;
+ } else {
+ wdog = 0;
}
mtx_lock(&sc->sc_mtx);
(*sc->sc_nvwr)(dev, sc->sc_clkoffset + MK48TXX_WDOG, wdog);
==== //depot/projects/linuxolator/src/sys/dev/re/if_re.c#11 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.87 2007/03/04 03:38:07 csjp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.88 2007/03/28 18:07:12 remko Exp $");
/*
* RealTek 8139C+/8169/8169S/8110S/8168/8111/8101E PCI NIC driver
@@ -182,6 +182,8 @@
"RealTek 8169S Single-chip Gigabit Ethernet" },
{ RT_VENDORID, RT_DEVICEID_8169, RL_HWREV_8169_8110SB,
"RealTek 8169SB/8110SB Single-chip Gigabit Ethernet" },
+ { RT_VENDORID, RT_DEVICEID_8169, RL_HWREV_8169_8110SC,
+ "RealTek 8169SC/8110SC Single-chip Gigabit Ethernet" },
{ RT_VENDORID, RT_DEVICEID_8169SC, RL_HWREV_8169_8110SC,
"RealTek 8169SC/8110SC Single-chip Gigabit Ethernet" },
{ RT_VENDORID, RT_DEVICEID_8169, RL_HWREV_8110S,
==== //depot/projects/linuxolator/src/sys/dev/scc/scc_bfe.h#4 (text) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/scc/scc_bfe.h,v 1.5 2007/03/22 23:45:25 marcel Exp $
+ * $FreeBSD: src/sys/dev/scc/scc_bfe.h,v 1.6 2007/03/28 18:05:17 marcel Exp $
*/
#ifndef _DEV_SCC_BFE_H_
@@ -92,6 +92,7 @@
struct scc_mode ch_mode[SCC_NMODES];
u_int ch_nr;
+ int ch_enabled:1;
int ch_sysdev:1;
uint32_t ch_ipend;
==== //depot/projects/linuxolator/src/sys/dev/scc/scc_core.c#4 (text) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/scc/scc_core.c,v 1.8 2007/03/22 23:45:25 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/scc/scc_core.c,v 1.10 2007/03/28 18:05:17 marcel Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -103,7 +103,7 @@
struct scc_softc *sc, *sc0;
const char *sep;
bus_space_handle_t bh;
- u_long base, size, start;
+ u_long base, size, start, sz;
int c, error, mode, sysdev;
/*
@@ -155,18 +155,23 @@
*/
sysdev = 0;
base = rman_get_start(sc->sc_rres);
+ sz = (size != 0) ? size : rman_get_size(sc->sc_rres);
start = base + ((cl->cl_range < 0) ? size * (cl->cl_channels - 1) : 0);
for (c = 0; c < cl->cl_channels; c++) {
ch = &sc->sc_chan[c];
resource_list_init(&ch->ch_rlist);
ch->ch_nr = c + 1;
+ if (!SCC_ENABLED(sc, ch))
+ goto next;
+
+ ch->ch_enabled = 1;
resource_list_add(&ch->ch_rlist, sc->sc_rtype, 0, start,
- start + size - 1, size);
+ start + sz - 1, sz);
rle = resource_list_find(&ch->ch_rlist, sc->sc_rtype, 0);
rle->res = &ch->ch_rres;
bus_space_subregion(rman_get_bustag(sc->sc_rres),
- rman_get_bushandle(sc->sc_rres), start - base, size, &bh);
+ rman_get_bushandle(sc->sc_rres), start - base, sz, &bh);
rman_set_bushandle(rle->res, bh);
rman_set_bustag(rle->res, rman_get_bustag(sc->sc_rres));
@@ -191,6 +196,7 @@
}
}
+ next:
start += (cl->cl_range < 0) ? -size : size;
sysdev |= ch->ch_sysdev;
}
@@ -336,7 +342,7 @@
{
struct scc_softc *sc;
struct scc_class *cl;
- u_long size;
+ u_long size, sz;
int error;
/*
@@ -378,9 +384,10 @@
* Fill in the bus access structure and call the hardware specific
* probe method.
*/
+ sz = (size != 0) ? size : rman_get_size(sc->sc_rres);
sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres);
sc->sc_bas.bst = rman_get_bustag(sc->sc_rres);
- sc->sc_bas.range = size;
+ sc->sc_bas.range = sz;
sc->sc_bas.rclk = rclk;
sc->sc_bas.regshft = regshft;
==== //depot/projects/linuxolator/src/sys/dev/scc/scc_if.m#2 (text) ====
@@ -23,7 +23,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# $FreeBSD: src/sys/dev/scc/scc_if.m,v 1.1 2006/03/30 18:33:22 marcel Exp $
+# $FreeBSD: src/sys/dev/scc/scc_if.m,v 1.2 2007/03/28 18:05:17 marcel Exp $
#include <sys/param.h>
#include <sys/bus.h>
@@ -38,6 +38,15 @@
INTERFACE scc;
+# Default implementations of some methods.
+CODE {
+ static int
+ default_enabled(struct scc_softc *this, struct scc_chan *ch)
+ {
+ return (1);
+ }
+}
+
# attach() - attach hardware.
# This method is called when the device is being attached. All resources
# have been allocated. The intend of this method is to setup the hardware
@@ -50,6 +59,13 @@
int reset;
};
+# enabled()
+METHOD int enabled {
+ struct scc_softc *this;
+ struct scc_chan *chan;
+} DEFAULT default_enabled;
+
+# iclear()
METHOD void iclear {
struct scc_softc *this;
struct scc_chan *chan;
==== //depot/projects/linuxolator/src/sys/dev/sio/sio_pci.c#2 (text+ko) ====
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/sio/sio_pci.c,v 1.21 2005/05/29 04:42:25 nyan Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/sio/sio_pci.c,v 1.23 2007/03/29 04:26:52 maxim Exp $");
#include <sys/param.h>
#include <sys/systm.h>
==== //depot/projects/linuxolator/src/sys/dev/uart/uart_core.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/uart/uart_core.c,v 1.20 2007/02/23 12:18:57 piso Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/uart/uart_core.c,v 1.21 2007/03/28 18:26:12 marcel Exp $");
#ifndef KLD_MODULE
#include "opt_comconsole.h"
@@ -344,7 +344,7 @@
uart_cpu_eqres(&sc->sc_bas, &sysdev->bas)) {
/* XXX check if ops matches class. */
sc->sc_sysdev = sysdev;
- break;
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list