PERFORCE change 132087 for review
Roman Divacky
rdivacky at FreeBSD.org
Sun Dec 30 04:28:49 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=132087
Change 132087 by rdivacky at rdivacky_witten on 2007/12/30 12:28:44
IFC
Affected files ...
.. //depot/projects/soc2007/rdivacky/linux_at/sys/amd64/conf/NOTES#6 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/compat/linux/linux_file.c#20 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/compat/linux/linux_stats.c#12 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/compat/svr4/svr4_stream.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/conf/files#12 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/atkbdc/atkbd.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/atkbdc/atkbd_atkbdc.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/creator.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/fb.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/fbreg.h#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/machfb.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/splash_bmp.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/splash_pcx.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/vga.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/gem/if_gem.c#7 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/gem/if_gem_pci.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/gem/if_gemreg.h#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/gem/if_gemvar.h#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/kbd/kbd.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/kbd/kbdreg.h#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/kbdmux/kbdmux.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/le/am7990.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/le/am79900.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/streams/streams.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/blank/blank_saver.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/daemon/daemon_saver.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/dragon/dragon_saver.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/fade/fade_saver.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/fire/fire_saver.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/green/green_saver.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/logo/logo_saver.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/rain/rain_saver.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/scgfbrndr.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/scvgarndr.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/scvidctl.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/snake/snake_saver.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/star/star_saver.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/syscons.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/syscons.h#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/syscons/warp/warp_saver.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/usb/ukbd.c#8 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/dev/vkbd/vkbd.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/devfs/devfs_vnops.c#7 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/fs/fifofs/fifo_vnops.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/i386/conf/NOTES#6 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/i386/xbox/xboxfb.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/isa/vga_isa.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/kern_descrip.c#9 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/kern_event.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/kern_exec.c#18 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/sys_generic.c#6 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/sys_pipe.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/uipc_mqueue.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/uipc_syscalls.c#6 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/uipc_usrreq.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_bio.c#6 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_syscalls.c#57 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_vnops.c#5 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netgraph/ng_pppoe.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/netgraph/ng_socket.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/opencrypto/cryptodev.c#4 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/pc98/cbus/gdc.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/pc98/cbus/scgdcrndr.c#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/sys/file.h#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/sys/unpcb.h#2 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/ufs/ffs/ffs_balloc.c#3 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/vm/vm_fault.c#8 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/vm/vm_object.c#7 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/vm/vm_page.c#8 integrate
.. //depot/projects/soc2007/rdivacky/linux_at/sys/vm/vm_reserv.c#1 branch
.. //depot/projects/soc2007/rdivacky/linux_at/sys/vm/vm_reserv.h#1 branch
Differences ...
==== //depot/projects/soc2007/rdivacky/linux_at/sys/amd64/conf/NOTES#6 (text+ko) ====
@@ -4,7 +4,7 @@
# This file contains machine dependent kernel configuration notes. For
# machine independent notes, look in /sys/conf/NOTES.
#
-# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.73 2007/12/15 00:56:16 scottl Exp $
+# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.74 2007/12/28 22:50:04 rpaulo Exp $
#
#
@@ -411,6 +411,7 @@
# vpd: Vital Product Data kernel interface
# cy: Cyclades serial driver
# digi: Digiboard driver
+# asmc: Apple System Management Controller
# Notes on the Specialix SI/XIO driver:
# The host card is memory, not IO mapped.
@@ -436,7 +437,7 @@
hint.pbio.0.port="0x360"
device smbios
device vpd
-
+device asmc
#
# Laptop/Notebook options:
#
==== //depot/projects/soc2007/rdivacky/linux_at/sys/compat/linux/linux_file.c#20 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.106 2007/10/24 19:03:52 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.107 2007/12/29 14:28:01 kib Exp $");
#include "opt_compat.h"
#include "opt_mac.h"
==== //depot/projects/soc2007/rdivacky/linux_at/sys/compat/linux/linux_stats.c#12 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_stats.c,v 1.88 2007/09/18 19:50:33 dwmalone Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_stats.c,v 1.89 2007/12/29 14:25:29 kib Exp $");
#include "opt_compat.h"
#include "opt_mac.h"
@@ -284,12 +284,17 @@
linux_stat(struct thread *td, struct linux_stat_args *args)
{
struct stat buf;
+ char *path;
int error;
+
+ LCONVPATHEXIST(td, args->path, &path);
+
#ifdef DEBUG
if (ldebug(stat))
- printf(ARGS(stat, "%s, *"), args->path);
+ printf(ARGS(stat, "%s, *"), args->path);
#endif
- error = kern_stat(td, args->path, UIO_SYSSPACE, &buf);
+ error = kern_stat(td, path, UIO_SYSSPACE, &buf);
+ LFREEPATH(path);
if (error)
return (error);
translate_path_major_minor(td, args->path, &buf);
@@ -300,13 +305,17 @@
linux_lstat(struct thread *td, struct linux_lstat_args *args)
{
struct stat buf;
+ char *path;
int error;
+ LCONVPATHEXIST(td, args->path, &path);
+
#ifdef DEBUG
if (ldebug(lstat))
- printf(ARGS(lstat, "%s, *"), args->path);
+ printf(ARGS(lstat, "%s, *"), args->path);
#endif
error = kern_lstat(td, args->path, UIO_SYSSPACE, &buf);
+ LFREEPATH(path);
if (error)
return (error);
translate_path_major_minor(td, args->path, &buf);
==== //depot/projects/soc2007/rdivacky/linux_at/sys/compat/svr4/svr4_stream.c#2 (text+ko) ====
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.62 2006/08/05 22:04:21 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.63 2007/12/30 01:42:12 jeff Exp $");
#include "opt_compat.h"
#include "opt_ktrace.h"
@@ -1481,8 +1481,6 @@
uap->dat, uap->flags);
#endif /* DEBUG_SVR4 */
- FILE_LOCK_ASSERT(fp, MA_NOTOWNED);
-
if (uap->ctl != NULL) {
if ((error = copyin(uap->ctl, &ctl, sizeof(ctl))) != 0) {
#ifdef DEBUG_SVR4
@@ -1656,8 +1654,6 @@
error = 0;
afp = NULL;
- FILE_LOCK_ASSERT(fp, MA_NOTOWNED);
-
memset(&sc, 0, sizeof(sc));
#ifdef DEBUG_SVR4
==== //depot/projects/soc2007/rdivacky/linux_at/sys/conf/files#12 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1260 2007/12/26 11:32:32 rwatson Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1261 2007/12/29 19:53:03 alc Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -2108,6 +2108,7 @@
vm/vm_pageq.c standard
vm/vm_pager.c standard
vm/vm_phys.c standard
+vm/vm_reserv.c standard
vm/vm_unix.c standard
vm/vm_zeroidle.c standard
vm/vnode_pager.c standard
==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/atkbdc/atkbd.c#2 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbd.c,v 1.52 2006/10/25 13:35:42 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbd.c,v 1.53 2007/12/29 21:55:22 wkoszek Exp $");
#include "opt_compat.h"
#include "opt_kbd.h"
@@ -162,15 +162,15 @@
*/
s = spltty();
kbd = (keyboard_t *)arg;
- if ((*kbdsw[kbd->kb_index]->lock)(kbd, TRUE)) {
+ if (kbdd_lock(kbd, TRUE)) {
/*
* We have seen the lock flag is not set. Let's reset
* the flag early, otherwise the LED update routine fails
* which may want the lock during the interrupt routine.
*/
- (*kbdsw[kbd->kb_index]->lock)(kbd, FALSE);
- if ((*kbdsw[kbd->kb_index]->check_char)(kbd))
- (*kbdsw[kbd->kb_index]->intr)(kbd, NULL);
+ kbdd_lock(kbd, FALSE);
+ if (kbdd_check_char(kbd))
+ kbdd_intr(kbd, NULL);
}
splx(s);
timeout(atkbd_timeout, arg, hz/10);
==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/atkbdc/atkbd_atkbdc.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbd_atkbdc.c,v 1.20 2007/02/23 12:18:33 piso Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbd_atkbdc.c,v 1.21 2007/12/29 21:55:22 wkoszek Exp $");
#include "opt_kbd.h"
@@ -158,9 +158,9 @@
kbd->kb_flags &= ~KB_INITIALIZED;
args[0] = device_get_unit(device_get_parent(dev));
args[1] = rman_get_start(sc->intr);
- (*kbdsw[kbd->kb_index]->init)(device_get_unit(dev), &kbd,
- args, device_get_flags(dev));
- (*kbdsw[kbd->kb_index]->clear_state)(kbd);
+ kbdd_init(kbd, device_get_unit(dev), &kbd, args,
+ device_get_flags(dev));
+ kbdd_clear_state(kbd);
}
return 0;
}
@@ -171,7 +171,7 @@
keyboard_t *kbd;
kbd = (keyboard_t *)arg;
- (*kbdsw[kbd->kb_index]->intr)(kbd, NULL);
+ kbdd_intr(kbd, NULL);
}
DRIVER_MODULE(atkbd, atkbdc, atkbd_driver, atkbd_devclass, 0, 0);
==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/creator.c#3 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fb/creator.c,v 1.13 2007/06/16 21:48:49 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fb/creator.c,v 1.14 2007/12/29 23:26:55 wkoszek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -845,9 +845,9 @@
int i;
for (i = 0; i < len; i++) {
- (*vidsw[adp->va_index]->putc)(adp, off + i, s[i] & 0xff,
- (s[i] & 0xff00) >> 8);
+ vidd_putc(adp, off + i, s[i] & 0xff, (s[i] & 0xff00) >> 8);
}
+
return (0);
}
==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/fb.c#2 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fb/fb.c,v 1.33 2005/12/04 10:06:03 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fb/fb.c,v 1.34 2007/12/29 23:26:55 wkoszek Exp $");
#include "opt_fb.h"
@@ -484,7 +484,7 @@
len = imin(len, adp->va_window_size - offset);
if (len <= 0)
break;
- (*vidsw[adp->va_index]->set_win_org)(adp, uio->uio_offset);
+ vidd_set_win_org(adp, uio->uio_offset);
error = uiomove((caddr_t)(adp->va_window + offset), len, uio);
if (error)
break;
@@ -505,7 +505,7 @@
if (adp == NULL) /* XXX */
return ENXIO;
- error = (*vidsw[adp->va_index]->ioctl)(adp, cmd, arg);
+ error = vidd_ioctl(adp, cmd, arg);
if (error == ENOIOCTL)
error = ENODEV;
return error;
@@ -514,7 +514,7 @@
int genfbmmap(genfb_softc_t *sc, video_adapter_t *adp, vm_offset_t offset,
vm_offset_t *paddr, int prot)
{
- return (*vidsw[adp->va_index]->mmap)(adp, offset, paddr, prot);
+ return vidd_mmap(adp, offset, paddr, prot);
}
#endif /* FB_INSTALL_CDEV */
@@ -686,16 +686,15 @@
break;
case FBIO_MODEINFO: /* get mode information */
- error = (*vidsw[adp->va_index]->get_info)(adp,
- ((video_info_t *)arg)->vi_mode,
- (video_info_t *)arg);
+ error = vidd_get_info(adp,
+ ((video_info_t *)arg)->vi_mode,
+ (video_info_t *)arg);
if (error)
error = ENODEV;
break;
case FBIO_FINDMODE: /* find a matching video mode */
- error = (*vidsw[adp->va_index]->query_mode)(adp,
- (video_info_t *)arg);
+ error = vidd_query_mode(adp, (video_info_t *)arg);
break;
case FBIO_GETMODE: /* get video mode */
@@ -703,7 +702,7 @@
break;
case FBIO_SETMODE: /* set video mode */
- error = (*vidsw[adp->va_index]->set_mode)(adp, *(int *)arg);
+ error = vidd_set_mode(adp, *(int *)arg);
if (error)
error = ENODEV; /* EINVAL? */
break;
@@ -722,7 +721,7 @@
break;
case FBIO_BLANK: /* blank display */
- error = (*vidsw[adp->va_index]->blank_display)(adp, *(int *)arg);
+ error = vidd_blank_display(adp, *(int *)arg);
break;
case FBIO_GETPALETTE: /* get color palette */
==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/fbreg.h#2 (text+ko) ====
@@ -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/fb/fbreg.h,v 1.21 2007/01/18 13:08:08 marius Exp $
+ * $FreeBSD: src/sys/dev/fb/fbreg.h,v 1.22 2007/12/29 23:26:55 wkoszek Exp $
*/
#ifndef _DEV_FB_FBREG_H_
@@ -189,20 +189,74 @@
vi_putm_t *putm;
} video_switch_t;
-#define save_palette(adp, pal) \
- (*vidsw[(adp)->va_index]->save_palette)((adp), (pal))
-#define load_palette(adp, pal) \
- (*vidsw[(adp)->va_index]->load_palette)((adp), (pal))
-#define get_mode_info(adp, mode, buf) \
- (*vidsw[(adp)->va_index]->get_info)((adp), (mode), (buf))
-#define set_video_mode(adp, mode) \
+#define vidd_probe(unit, adpp, arg, flags) \
+ (*vidsw[(adp)->va_index]->probe)((unit), (adpp), (arg), (flags))
+#define vidd_init(unit, adp, flags) \
+ (*vidsw[(adp)->va_index]->init)((unit), (adp), (flags))
+#define vidd_get_info(adp, mode, info) \
+ (*vidsw[(adp)->va_index]->get_info)((adp), (mode), (info))
+#define vidd_query_mode(adp, mode) \
+ (*vidsw[(adp)->va_index]->query_mode)((adp), (mode))
+#define vidd_set_mode(adp, mode) \
(*vidsw[(adp)->va_index]->set_mode)((adp), (mode))
-#define set_border(adp, border) \
+#define vidd_save_font(adp, page, size, width, data, c, count) \
+ (*vidsw[(adp)->va_index]->save_font)((adp), (page), (size), \
+ (width), (data), (c), (count))
+#define vidd_load_font(adp, page, size, width, data, c, count) \
+ (*vidsw[(adp)->va_index]->load_font)((adp), (page), (size), \
+ (width), (data), (c), (count))
+#define vidd_show_font(adp, page) \
+ (*vidsw[(adp)->va_index]->show_font)((adp), (page))
+#define vidd_save_palette(adp, pallete) \
+ (*vidsw[(adp)->va_index]->save_palette)((adp), (pallete))
+#define vidd_load_palette(adp, pallete) \
+ (*vidsw[(adp)->va_index]->load_palette)((adp), (pallete))
+#define vidd_set_border(adp, border) \
(*vidsw[(adp)->va_index]->set_border)((adp), (border))
-#define set_origin(adp, o) \
- (*vidsw[(adp)->va_index]->set_win_org)(adp, o)
-
-/* XXX - add more macros */
+#define vidd_save_state(adp, p, size) \
+ (*vidsw[(adp)->va_index]->save_state)((adp), (p), (size))
+#define vidd_load_state(adp, p) \
+ (*vidsw[(adp)->va_index]->load_state)((adp), (p))
+#define vidd_set_win_org(adp, offset) \
+ (*vidsw[(adp)->va_index]->set_win_org)((adp), (offset))
+#define vidd_read_hw_cursor(adp, col, row) \
+ (*vidsw[(adp)->va_index]->read_hw_cursor)((adp), (col), (row))
+#define vidd_set_hw_cursor(adp, col, row) \
+ (*vidsw[(adp)->va_index]->set_hw_cursor)((adp), (col), (row))
+#define vidd_set_hw_cursor_shape(adp, base, height, celsize, blink) \
+ (*vidsw[(adp)->va_index]->set_hw_cursor_shape)((adp), (base), \
+ (height), (celsize), (blink))
+#define vidd_blank_display(adp, mode) \
+ (*vidsw[(adp)->va_index]->blank_display)((adp), (mode))
+#define vidd_mmap(adp, offset, paddr, prot) \
+ (*vidsw[(adp)->va_index]->mmap)((adp), (offset), (paddr), (prot))
+#define vidd_ioctl(adp, cmd, data) \
+ (*vidsw[(adp)->va_index]->ioctl)((adp), (cmd), (data))
+#define vidd_clear(adp) \
+ (*vidsw[(adp)->va_index]->clear)((adp))
+#define vidd_fill_rect(adp, val, x, y, cx, cy) \
+ (*vidsw[(adp)->va_index]->fill_rect)((adp), (val), (x), (y), \
+ (cx), (cy))
+#define vidd_bitblt(adp, ...) \
+ (*vidsw[(adp)->va_index]->bitblt)(adp, __VA_ARGS__)
+#define vidd_diag(adp, level) \
+ (*vidsw[(adp)->va_index]->diag)((adp), (level))
+#define vidd_save_cursor_palette(adp, palette) \
+ (*vidsw[(adp)->va_index]->save_cursor_palette)((adp), (palette))
+#define vidd_load_cursor_palette(adp, palette) \
+ (*vidsw[(adp)->va_index]->load_cursor_palette)((adp), (palette))
+#define vidd_copy(adp, src, dst, n) \
+ (*vidsw[(adp)->va_index]->copy)((adp), (src), (dst), (n))
+#define vidd_putp(adp, offset, p, a, size, bpp, bit_ltor1, byte_ltor2) \
+ (*vidsw[(adp)->va_index]->putp)((adp), (offset), (p), (a), \
+ (size), (bpp), (bit_ltor1), (bit_ltor2))
+#define vidd_putc(adp, offset, c, a) \
+ (*vidsw[(adp)->va_index]->putc)((adp), (offset), (c), (a))
+#define vidd_puts(adp, offset, s, len) \
+ (*vidsw[(adp)->va_index]->puts)((adp), (offset), (s), (len))
+#define vidd_putm(adp, x, y, pixel_image, pixel_mask, size, width) \
+ (*vidsw[(adp)->va_index]->putm)((adp), (x), (y), (pixel_image), \
+ (pixel_mask), (size), (width))
/* video driver */
typedef struct video_driver {
==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/machfb.c#3 (text+ko) ====
@@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fb/machfb.c,v 1.5 2007/06/16 21:48:50 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fb/machfb.c,v 1.6 2007/12/29 23:26:55 wkoszek Exp $");
/*
* Driver for ATI Mach64 graphics chips. Some code is derived from the
@@ -1113,7 +1113,7 @@
MACHFB_BLANK;
blanks = 0;
}
- (*vidsw[adp->va_index]->putc)(adp, off + i, c, a);
+ vidd_putc(adp, off + i, c, a);
}
}
if (blanks != 0)
==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/splash_bmp.c#3 (text+ko) ====
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/fb/splash_bmp.c,v 1.20 2007/07/11 22:34:34 mjacob Exp $
+ * $FreeBSD: src/sys/dev/fb/splash_bmp.c,v 1.21 2007/12/29 23:26:55 wkoszek Exp $
*/
#include <sys/param.h>
@@ -94,9 +94,9 @@
return ENODEV;
}
for (i = 0; modes[i] >= 0; ++i) {
- if (((*vidsw[adp->va_index]->get_info)(adp, modes[i], &info) == 0)
- && (bmp_Init((u_char *)bmp_decoder.data,
- info.vi_width, info.vi_height, info.vi_depth) == 0))
+ if ((vidd_get_info(adp, modes[i], &info) == 0) &&
+ (bmp_Init((u_char *)bmp_decoder.data, info.vi_width,
+ info.vi_height, info.vi_depth) == 0))
break;
}
splash_mode = modes[i];
@@ -127,11 +127,11 @@
if (on) {
if (!splash_on) {
/* set up the video mode and draw something */
- if ((*vidsw[adp->va_index]->set_mode)(adp, splash_mode))
+ if (vidd_set_mode(adp, splash_mode))
return 1;
if (bmp_Draw(adp))
return 1;
- (*vidsw[adp->va_index]->save_palette)(adp, pal);
+ vidd_save_palette(adp, pal);
time_stamp = 0;
splash_on = TRUE;
}
@@ -160,7 +160,7 @@
for (i = 0; i < sizeof(pal); ++i) {
tpal[i] = pal[i] * brightness / FADE_LEVELS;
}
- (*vidsw[adp->va_index]->load_palette)(adp, tpal);
+ vidd_load_palette(adp, tpal);
time_stamp = tv.tv_sec;
}
}
@@ -298,7 +298,7 @@
sofs += (x >> 3);
newbank = sofs/info->adp->va_window_size;
if (info->bank != newbank) {
- (*vidsw[info->adp->va_index]->set_win_org)(info->adp, newbank*info->adp->va_window_size);
+ vidd_set_win_org(info->adp, newbank*info->adp->va_window_size);
info->bank = newbank;
}
sofs %= info->adp->va_window_size;
@@ -313,7 +313,7 @@
sofs += x;
newbank = sofs/info->adp->va_window_size;
if (info->bank != newbank) {
- (*vidsw[info->adp->va_index]->set_win_org)(info->adp, newbank*info->adp->va_window_size);
+ vidd_set_win_org(info->adp, newbank*info->adp->va_window_size);
info->bank = newbank;
}
sofs %= info->adp->va_window_size;
@@ -601,8 +601,8 @@
/* clear the screen */
bmp_info.vidmem = (u_char *)adp->va_window;
bmp_info.adp = adp;
- (*vidsw[adp->va_index]->clear)(adp);
- (*vidsw[adp->va_index]->set_win_org)(adp, 0);
+ vidd_clear(adp);
+ vidd_set_win_org(adp, 0);
bmp_info.bank = 0;
/* initialise the info structure for drawing */
@@ -612,7 +612,7 @@
#endif
/* set the palette for our image */
- (*vidsw[adp->va_index]->load_palette)(adp, (u_char *)&bmp_info.palette);
+ vidd_load_palette(adp, (u_char *)&bmp_info.palette);
#if 0
#ifndef PC98
==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/splash_pcx.c#2 (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/dev/fb/splash_pcx.c,v 1.8 2004/08/06 21:35:51 des Exp $
+ * $FreeBSD: src/sys/dev/fb/splash_pcx.c,v 1.9 2007/12/29 23:26:55 wkoszek Exp $
*/
#include <sys/param.h>
@@ -98,7 +98,7 @@
pcx_info.bpp, pcx_info.planes);
for (i = 0; modes[i] >= 0; ++i) {
- if (get_mode_info(adp, modes[i], &info) != 0)
+ if (vidd_get_info(adp, modes[i], &info) != 0)
continue;
if (bootverbose)
printf("splash_pcx: considering mode %d:\n"
@@ -136,7 +136,7 @@
{
if (on) {
if (!splash_on) {
- if (set_video_mode(adp, splash_mode) || pcx_draw(adp))
+ if (vidd_set_mode(adp, splash_mode) || pcx_draw(adp))
return 1;
splash_on = TRUE;
}
@@ -208,7 +208,7 @@
if (pcx_info.zlen < 1)
return (1);
- load_palette(adp, pcx_info.palette);
+ vidd_load_palette(adp, pcx_info.palette);
vidmem = (uint8_t *)adp->va_window;
swidth = adp->va_info.vi_width;
@@ -219,7 +219,7 @@
banksize = adp->va_window_size;
for (origin = 0; origin < sheight*sbpsl; origin += banksize) {
- set_origin(adp, origin);
+ vidd_set_win_org(adp, origin);
bzero(vidmem, banksize);
}
@@ -231,7 +231,7 @@
pos -= banksize;
origin += banksize;
}
- set_origin(adp, origin);
+ vidd_set_win_org(adp, origin);
for (scan = i = 0; scan < pcx_info.height; ++scan, ++y, pos += sbpsl) {
for (j = 0; j < pcx_info.bpsl && i < pcx_info.zlen; ++i) {
@@ -251,7 +251,7 @@
if (pos > banksize) {
origin += banksize;
pos -= banksize;
- set_origin(adp, origin);
+ vidd_set_win_org(adp, origin);
}
if (pos + pcx_info.width > banksize) {
@@ -260,7 +260,7 @@
bcopy(line, vidmem + pos, j);
origin += banksize;
pos -= banksize;
- set_origin(adp, origin);
+ vidd_set_win_org(adp, origin);
bcopy(line + j, vidmem, pcx_info.width - j);
} else {
bcopy(line, vidmem + pos, pcx_info.width);
==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/fb/vga.c#2 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fb/vga.c,v 1.36 2005/12/04 02:12:41 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fb/vga.c,v 1.37 2007/12/29 23:26:55 wkoszek Exp $");
#include "opt_vga.h"
#include "opt_fb.h"
@@ -1656,7 +1656,7 @@
update_adapter_info(adp, &info);
/* move hardware cursor out of the way */
- (*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1);
+ vidd_set_hw_cursor(adp, -1, -1);
return 0;
#else /* VGA_NO_MODE_CHANGE */
@@ -2502,7 +2502,7 @@
length = adp->va_line_width*adp->va_info.vi_height;
while (length > 0) {
l = imin(length, adp->va_window_size);
- (*vidsw[adp->va_index]->set_win_org)(adp, at);
+ vidd_set_win_org(adp, at);
bzero_io(adp->va_window, l);
length -= l;
at += l;
@@ -2522,7 +2522,7 @@
length = adp->va_line_width*adp->va_info.vi_height;
while (length > 0) {
l = imin(length, adp->va_window_size);
- (*vidsw[adp->va_index]->set_win_org)(adp, at);
+ vidd_set_win_org(adp, at);
fill_io(val, adp->va_window, l);
length -= l;
at += l;
@@ -2540,7 +2540,7 @@
length = adp->va_line_width*adp->va_info.vi_height;
while (length > 0) {
l = imin(length, adp->va_window_size);
- (*vidsw[adp->va_index]->set_win_org)(adp, at);
+ vidd_set_win_org(adp, at);
switch (adp->va_info.vi_pixel_size) {
case sizeof(u_int16_t):
fillw_io(val, adp->va_window, l/sizeof(u_int16_t));
@@ -2599,7 +2599,7 @@
while (cy > 0) {
pos = adp->va_line_width*y + x/8;
if (bank != pos/banksize) {
- (*vidsw[adp->va_index]->set_win_org)(adp, pos);
+ vidd_set_win_org(adp, pos);
bank = pos/banksize;
}
offset = pos%banksize;
@@ -2612,7 +2612,7 @@
if (offset >= banksize) {
offset = 0;
++bank; /* next bank */
- (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ vidd_set_win_org(adp, bank*banksize);
}
outw(GDCIDX, 0xff08); /* bit mask */
}
@@ -2624,7 +2624,7 @@
if (offset >= banksize) {
offset = 0;
++bank; /* next bank */
- (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ vidd_set_win_org(adp, bank*banksize);
}
}
if ((x + cx) % 8) {
@@ -2634,7 +2634,7 @@
if (offset >= banksize) {
offset = 0;
++bank; /* next bank */
- (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ vidd_set_win_org(adp, bank*banksize);
}
outw(GDCIDX, 0xff08); /* bit mask */
}
@@ -2662,7 +2662,7 @@
while (cy > 0) {
pos = adp->va_line_width*y + x*adp->va_info.vi_pixel_size;
if (bank != pos/banksize) {
- (*vidsw[adp->va_index]->set_win_org)(adp, pos);
+ vidd_set_win_org(adp, pos);
bank = pos/banksize;
}
offset = pos%banksize;
@@ -2672,7 +2672,7 @@
/* the line may cross the window boundary */
if (offset + cx > banksize) {
++bank; /* next bank */
- (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ vidd_set_win_org(adp, bank*banksize);
end = offset + cx - banksize;
fill_io(val, adp->va_window, end/adp->va_info.vi_pixel_size);
}
@@ -2700,7 +2700,7 @@
while (cy > 0) {
pos = adp->va_line_width*y + x*sizeof(u_int16_t);
if (bank != pos/banksize) {
- (*vidsw[adp->va_index]->set_win_org)(adp, pos);
+ vidd_set_win_org(adp, pos);
bank = pos/banksize;
}
offset = pos%banksize;
@@ -2710,7 +2710,7 @@
/* the line may cross the window boundary */
if (offset + cx > banksize) {
++bank; /* next bank */
- (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ vidd_set_win_org(adp, bank*banksize);
end = offset + cx - banksize;
fillw_io(val, adp->va_window, end/sizeof(u_int16_t));
}
@@ -2740,7 +2740,7 @@
while (cy > 0) {
pos = adp->va_line_width*y + x*3;
if (bank != pos/banksize) {
- (*vidsw[adp->va_index]->set_win_org)(adp, pos);
+ vidd_set_win_org(adp, pos);
bank = pos/banksize;
}
offset = pos%banksize;
@@ -2751,7 +2751,7 @@
/* the line may cross the window boundary */
if (offset + cx >= banksize) {
++bank; /* next bank */
- (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ vidd_set_win_org(adp, bank*banksize);
j = 0;
end = offset + cx - banksize;
for (; j < end; i = (++i)%3, ++j) {
@@ -2782,7 +2782,7 @@
while (cy > 0) {
pos = adp->va_line_width*y + x*sizeof(u_int32_t);
if (bank != pos/banksize) {
- (*vidsw[adp->va_index]->set_win_org)(adp, pos);
+ vidd_set_win_org(adp, pos);
bank = pos/banksize;
}
offset = pos%banksize;
@@ -2792,7 +2792,7 @@
/* the line may cross the window boundary */
if (offset + cx > banksize) {
++bank; /* next bank */
- (*vidsw[adp->va_index]->set_win_org)(adp, bank*banksize);
+ vidd_set_win_org(adp, bank*banksize);
end = offset + cx - banksize;
filll_io(val, adp->va_window, end/sizeof(u_int32_t));
}
==== //depot/projects/soc2007/rdivacky/linux_at/sys/dev/gem/if_gem.c#7 (text+ko) ====
@@ -1,6 +1,7 @@
/*-
* Copyright (C) 2001 Eduardo Horvath.
* Copyright (c) 2001-2003 Thomas Moestl
+ * Copyright (c) 2007 Marius Strobl <marius at FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -28,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem.c,v 1.45 2007/10/13 00:24:09 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/gem/if_gem.c,v 1.46 2007/12/30 01:32:03 marius Exp $");
/*
* Driver for Apple GMAC, Sun ERI and Sun GEM Ethernet controllers
@@ -83,53 +84,53 @@
CTASSERT(powerof2(GEM_NRXDESC) && GEM_NRXDESC >= 32 && GEM_NRXDESC <= 8192);
CTASSERT(powerof2(GEM_NTXDESC) && GEM_NTXDESC >= 32 && GEM_NTXDESC <= 8192);
-#define TRIES 10000
+#define TRIES 10000
/*
- * The GEM hardware support basic TCP/UDP checksum offloading. However,
+ * The GEM hardware support basic TCP/UDP checksum offloading. However,
* the hardware doesn't compensate the checksum for UDP datagram which
- * can yield to 0x0. As a safe guard, UDP checksum offload is disabled
- * by default. It can be reactivated by setting special link option
+ * can yield to 0x0. As a safe guard, UDP checksum offload is disabled
+ * by default. It can be reactivated by setting special link option
* link0 with ifconfig(8).
*/
#define GEM_CSUM_FEATURES (CSUM_TCP)
-static void gem_start(struct ifnet *);
-static void gem_start_locked(struct ifnet *);
-static void gem_stop(struct ifnet *, int);
-static int gem_ioctl(struct ifnet *, u_long, caddr_t);
-static void gem_cddma_callback(void *, bus_dma_segment_t *, int, int);
-static __inline void gem_txcksum(struct gem_softc *, struct mbuf *, uint64_t *);
-static __inline void gem_rxcksum(struct mbuf *, uint64_t);
-static void gem_tick(void *);
-static int gem_watchdog(struct gem_softc *);
-static void gem_init(void *);
-static void gem_init_locked(struct gem_softc *);
-static void gem_init_regs(struct gem_softc *);
-static u_int gem_ringsize(u_int);
-static int gem_meminit(struct gem_softc *);
-static struct mbuf *gem_defrag(struct mbuf *, int, int);
-static int gem_load_txmbuf(struct gem_softc *, struct mbuf **);
-static void gem_mifinit(struct gem_softc *);
-static int gem_bitwait(struct gem_softc *, bus_addr_t, u_int32_t,
- u_int32_t);
-static void gem_reset(struct gem_softc *);
-static int gem_reset_rx(struct gem_softc *);
+static int gem_add_rxbuf(struct gem_softc *sc, int idx);
+static int gem_bitwait(struct gem_softc *sc, bus_addr_t r, uint32_t clr,
+ uint32_t set);
+static void gem_cddma_callback(void *xsc, bus_dma_segment_t *segs,
+ int nsegs, int error);
+static struct mbuf *gem_defrag(struct mbuf *m0, int how, int maxfrags);
+static int gem_disable_rx(struct gem_softc *sc);
+static int gem_disable_tx(struct gem_softc *sc);
+static void gem_eint(struct gem_softc *sc, u_int status);
+static void gem_init(void *xsc);
+static void gem_init_locked(struct gem_softc *sc);
+static void gem_init_regs(struct gem_softc *sc);
+static int gem_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
+static int gem_load_txmbuf(struct gem_softc *sc, struct mbuf **m_head);
+static int gem_meminit(struct gem_softc *sc);
+static void gem_mifinit(struct gem_softc *sc);
+static void gem_reset(struct gem_softc *sc);
+static int gem_reset_rx(struct gem_softc *sc);
static void gem_reset_rxdma(struct gem_softc *sc);
-static int gem_reset_tx(struct gem_softc *);
-static int gem_disable_rx(struct gem_softc *);
-static int gem_disable_tx(struct gem_softc *);
-static void gem_rxdrain(struct gem_softc *);
-static int gem_add_rxbuf(struct gem_softc *, int);
-static void gem_setladrf(struct gem_softc *);
-
-struct mbuf *gem_get(struct gem_softc *, int, int);
-static void gem_eint(struct gem_softc *, u_int);
-static void gem_rint(struct gem_softc *);
+static int gem_reset_tx(struct gem_softc *sc);
+static u_int gem_ringsize(u_int sz);
+static void gem_rint(struct gem_softc *sc);
#ifdef GEM_RINT_TIMEOUT
-static void gem_rint_timeout(void *);
+static void gem_rint_timeout(void *arg);
#endif
-static void gem_tint(struct gem_softc *);
+static __inline void gem_rxcksum(struct mbuf *m, uint64_t flags);
+static void gem_rxdrain(struct gem_softc *sc);
+static void gem_setladrf(struct gem_softc *sc);
+static void gem_start(struct ifnet *ifp);
+static void gem_start_locked(struct ifnet *ifp);
+static void gem_stop(struct ifnet *ifp, int disable);
+static void gem_tick(void *arg);
+static void gem_tint(struct gem_softc *sc);
+static __inline void gem_txcksum(struct gem_softc *sc, struct mbuf *m,
+ uint64_t *cflags);
+static int gem_watchdog(struct gem_softc *sc);
devclass_t gem_devclass;
DRIVER_MODULE(miibus, gem, miibus_driver, miibus_devclass, 0, 0);
@@ -140,20 +141,13 @@
#define KTR_GEM KTR_CT2
#endif
-#define GEM_NSEGS GEM_NTXDESC
-
-/*
- * gem_attach:
- *
- * Attach a Gem interface to the system.
- */
int
-gem_attach(sc)
- struct gem_softc *sc;
+gem_attach(struct gem_softc *sc)
{
+ struct gem_txsoft *txs;
struct ifnet *ifp;
- int i, error;
- u_int32_t v;
+ int error, i;
+ uint32_t v;
ifp = sc->sc_ifp = if_alloc(IFT_ETHER);
if (ifp == NULL)
@@ -170,8 +164,8 @@
error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
- BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL,
- &sc->sc_pdmatag);
+ BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, 0, NULL,
+ NULL, &sc->sc_pdmatag);
if (error)
goto fail_ifnet;
@@ -197,15 +191,15 @@
goto fail_ttag;
/*
- * Allocate the control data structures, and create and load the
+ * Allocate the control data structures, create and load the
* DMA map for it.
*/
if ((error = bus_dmamem_alloc(sc->sc_cdmatag,
(void **)&sc->sc_control_data,
BUS_DMA_WAITOK | BUS_DMA_COHERENT | BUS_DMA_ZERO,
&sc->sc_cddmamap))) {
- device_printf(sc->sc_dev, "unable to allocate control data,"
- " error = %d\n", error);
+ device_printf(sc->sc_dev,
+ "unable to allocate control data, error = %d\n", error);
goto fail_ctag;
}
@@ -213,8 +207,9 @@
if ((error = bus_dmamap_load(sc->sc_cdmatag, sc->sc_cddmamap,
sc->sc_control_data, sizeof(struct gem_control_data),
gem_cddma_callback, sc, 0)) != 0 || sc->sc_cddma == 0) {
- device_printf(sc->sc_dev, "unable to load control data DMA "
- "map, error = %d\n", error);
+ device_printf(sc->sc_dev,
+ "unable to load control data DMA map, error = %d\n",
+ error);
goto fail_cmem;
}
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list