PERFORCE change 170179 for review
Alexander Motin
mav at FreeBSD.org
Wed Nov 4 16:29:23 UTC 2009
http://p4web.freebsd.org/chv.cgi?CH=170179
Change 170179 by mav at mav_mavbook on 2009/11/04 16:28:41
IFC
Affected files ...
.. //depot/projects/scottl-camlock/src/UPDATING#20 integrate
.. //depot/projects/scottl-camlock/src/sbin/camcontrol/camcontrol.c#28 integrate
.. //depot/projects/scottl-camlock/src/sbin/sysctl/sysctl.c#5 integrate
.. //depot/projects/scottl-camlock/src/secure/usr.bin/bdes/bdes.c#3 integrate
.. //depot/projects/scottl-camlock/src/share/man/man3/tree.3#3 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/identcpu.c#17 integrate
.. //depot/projects/scottl-camlock/src/sys/arm/arm/machdep.c#14 integrate
.. //depot/projects/scottl-camlock/src/sys/arm/at91/at91_machdep.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/arm/mv/mv_machdep.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/arm/sa11x0/assabet_machdep.c#15 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.c#20 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.h#19 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#40 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#51 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/cam_periph.h#21 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#121 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_da.c#52 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/fb/vesa.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/fb/vgareg.h#5 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/fdc/fdc.c#17 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#15 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/syscons.c#21 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/wlan/if_urtw.c#9 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/i386/identcpu.c#21 integrate
.. //depot/projects/scottl-camlock/src/sys/isa/vga_isa.c#7 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_idle.c#12 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_intr.c#21 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/sched_4bsd.c#19 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/sched_ule.c#24 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/subr_log.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/subr_prf.c#14 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/uipc_syscalls.c#32 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/vfs_acl.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/vfs_default.c#19 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/vfs_vnops.c#23 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/ata.h#15 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/fbio.h#5 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/msgbuf.h#5 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/proc.h#27 integrate
.. //depot/projects/scottl-camlock/src/sys/vm/vm_fault.c#26 integrate
.. //depot/projects/scottl-camlock/src/sys/vm/vm_zeroidle.c#14 integrate
Differences ...
==== //depot/projects/scottl-camlock/src/UPDATING#20 (text+ko) ====
@@ -537,6 +537,11 @@
# Map old usb library to new one for usb2 stack
libusb-0.1.so.8 libusb20.so.1
+20090209:
+ All USB ethernet devices now attach as interfaces under the name ueN
+ (eg. ue0). This is to provide a predictable name as vendors often
+ change usb chipsets in a product without notice.
+
20090203:
The ichsmb(4) driver has been changed to require SMBus slave
addresses be left-justified (xxxxxxx0b) rather than right-justified.
@@ -1047,4 +1052,4 @@
Contact Warner Losh if you have any questions about your use of
this document.
-$FreeBSD: src/UPDATING,v 1.643 2009/10/26 09:16:08 mav Exp $
+$FreeBSD: src/UPDATING,v 1.644 2009/11/03 21:06:19 thompsa Exp $
==== //depot/projects/scottl-camlock/src/sbin/camcontrol/camcontrol.c#28 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.66 2009/10/31 10:47:47 mav Exp $");
+__FBSDID("$FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.67 2009/11/04 15:24:32 mav Exp $");
#include <sys/ioctl.h>
#include <sys/stdint.h>
==== //depot/projects/scottl-camlock/src/sbin/sysctl/sysctl.c#5 (text+ko) ====
@@ -38,7 +38,7 @@
static char sccsid[] = "@(#)from: sysctl.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$FreeBSD: src/sbin/sysctl/sysctl.c,v 1.91 2009/10/21 18:31:54 ed Exp $";
+ "$FreeBSD: src/sbin/sysctl/sysctl.c,v 1.92 2009/11/03 11:41:21 ed Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -419,14 +419,7 @@
warnx("T_dev_T %d != %d", l2, sizeof(*d));
return (1);
}
- if ((int)(*d) != -1) {
- if (minor(*d) > 255 || minor(*d) < 0)
- printf("{ major = %d, minor = 0x%x }",
- major(*d), minor(*d));
- else
- printf("{ major = %d, minor = %d }",
- major(*d), minor(*d));
- }
+ printf("%s", devname(*d, S_IFCHR));
return (0);
}
==== //depot/projects/scottl-camlock/src/secure/usr.bin/bdes/bdes.c#3 (text+ko) ====
@@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/secure/usr.bin/bdes/bdes.c,v 1.10 2008/02/19 07:09:18 ru Exp $");
+__FBSDID("$FreeBSD: src/secure/usr.bin/bdes/bdes.c,v 1.11 2009/11/03 18:40:42 jhb Exp $");
#include <sys/types.h>
@@ -170,11 +170,11 @@
int i; /* counter in a for loop */
char *p; /* used to obtain the key */
DES_cblock msgbuf; /* I/O buffer */
- int kflag; /* command-line encryptiooon key */
+ int kflag; /* command-line encryption key */
setproctitle("-"); /* Hide command-line arguments */
- /* initialize the initialization vctor */
+ /* initialize the initialization vector */
MEMZERO(ivec, 8);
/* process the argument list */
==== //depot/projects/scottl-camlock/src/share/man/man3/tree.3#3 (text+ko) ====
@@ -28,7 +28,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/share/man/man3/tree.3,v 1.7 2007/12/28 07:03:26 jasone Exp $
+.\" $FreeBSD: src/share/man/man3/tree.3,v 1.8 2009/11/04 04:12:56 benno Exp $
.\"
.Dd December 27, 2007
.Dt TREE 3
@@ -384,7 +384,7 @@
Finally,
the
.Fa CMP
-argument is the name of a function used to compare tree noded
+argument is the name of a function used to compare tree nodes
with each other.
The function takes two arguments of type
.Vt "struct TYPE *" .
==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/identcpu.c#17 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.175 2009/09/10 17:27:36 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.176 2009/11/04 01:32:59 attilio Exp $");
#include "opt_cpu.h"
@@ -607,6 +607,24 @@
printf(", %d lines/tag", (regs[2] >> 8) & 0x0f);
print_AMD_l2_assoc((regs[2] >> 12) & 0x0f);
}
+
+ /*
+ * Opteron Rev E shows a bug as in very rare occasions a read memory
+ * barrier is not performed as expected if it is followed by a
+ * non-atomic read-modify-write instruction.
+ * As long as that bug pops up very rarely (intensive machine usage
+ * on other operating systems generally generates one unexplainable
+ * crash any 2 months) and as long as a model specific fix would be
+ * impratical at this stage, print out a warning string if the broken
+ * model and family are identified.
+ */
+ if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 &&
+ CPUID_TO_MODEL(cpu_id) <= 0x3f) {
+ printf("WARNING: This architecture revision has known SMP "
+ "hardware bugs which may cause random instability\n");
+ printf("WARNING: For details see: "
+ "http://bugzilla.kernel.org/show_bug.cgi?id=11305\n");
+ }
}
static void
==== //depot/projects/scottl-camlock/src/sys/arm/arm/machdep.c#14 (text+ko) ====
@@ -46,7 +46,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/machdep.c,v 1.34 2009/10/27 10:47:58 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/machdep.c,v 1.35 2009/11/04 04:41:03 alc Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -77,7 +77,6 @@
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
-#include <vm/vnode_pager.h>
#include <machine/armreg.h>
#include <machine/cpu.h>
==== //depot/projects/scottl-camlock/src/sys/arm/at91/at91_machdep.c#5 (text+ko) ====
@@ -46,7 +46,7 @@
#include "opt_msgbuf.h"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/at91/at91_machdep.c,v 1.6 2009/07/01 20:07:44 raj Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/at91/at91_machdep.c,v 1.7 2009/11/04 04:41:03 alc Exp $");
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
@@ -79,7 +79,6 @@
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
#include <vm/vm_map.h>
-#include <vm/vnode_pager.h>
#include <machine/pmap.h>
#include <machine/vmparam.h>
#include <machine/pcb.h>
==== //depot/projects/scottl-camlock/src/sys/arm/mv/mv_machdep.c#6 (text+ko) ====
@@ -39,7 +39,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/mv/mv_machdep.c,v 1.9 2009/10/21 18:44:00 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/mv/mv_machdep.c,v 1.10 2009/11/04 04:41:03 alc Exp $");
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
@@ -72,7 +72,6 @@
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
#include <vm/vm_map.h>
-#include <vm/vnode_pager.h>
#include <machine/pte.h>
#include <machine/pmap.h>
#include <machine/vmparam.h>
==== //depot/projects/scottl-camlock/src/sys/arm/sa11x0/assabet_machdep.c#15 (text+ko) ====
@@ -47,7 +47,7 @@
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.30 2009/07/01 20:07:44 raj Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.31 2009/11/04 04:41:03 alc Exp $");
#include "opt_md.h"
@@ -82,7 +82,6 @@
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
#include <vm/vm_map.h>
-#include <vm/vnode_pager.h>
#include <machine/pmap.h>
#include <machine/vmparam.h>
#include <machine/pcb.h>
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.c#20 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/ata/ata_all.c,v 1.4 2009/11/03 11:19:05 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/ata/ata_all.c,v 1.6 2009/11/04 16:16:50 mav Exp $");
#include <sys/param.h>
@@ -378,30 +378,24 @@
ata_pm_read_cmd(struct ccb_ataio *ataio, int reg, int port)
{
bzero(&ataio->cmd, sizeof(ataio->cmd));
- ataio->cmd.flags = CAM_ATAIO_48BIT | CAM_ATAIO_NEEDRESULT;
+ ataio->cmd.flags = CAM_ATAIO_NEEDRESULT;
ataio->cmd.command = ATA_READ_PM;
ataio->cmd.features = reg;
- ataio->cmd.features_exp = reg >> 8;
ataio->cmd.device = port & 0x0f;
}
void
-ata_pm_write_cmd(struct ccb_ataio *ataio, int reg, int port, uint64_t val)
+ata_pm_write_cmd(struct ccb_ataio *ataio, int reg, int port, uint32_t val)
{
bzero(&ataio->cmd, sizeof(ataio->cmd));
- ataio->cmd.flags = CAM_ATAIO_48BIT | CAM_ATAIO_NEEDRESULT;
+ ataio->cmd.flags = 0;
ataio->cmd.command = ATA_WRITE_PM;
ataio->cmd.features = reg;
+ ataio->cmd.sector_count = val;
ataio->cmd.lba_low = val >> 8;
ataio->cmd.lba_mid = val >> 16;
ataio->cmd.lba_high = val >> 24;
ataio->cmd.device = port & 0x0f;
- ataio->cmd.lba_low_exp = val >> 40;
- ataio->cmd.lba_mid_exp = val >> 48;
- ataio->cmd.lba_high_exp = val >> 56;
- ataio->cmd.features_exp = reg >> 8;
- ataio->cmd.sector_count = val;
- ataio->cmd.sector_count_exp = val >> 32;
}
void
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.h#19 (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/cam/ata/ata_all.h,v 1.3 2009/11/03 11:19:05 mav Exp $
+ * $FreeBSD: src/sys/cam/ata/ata_all.h,v 1.4 2009/11/04 15:24:32 mav Exp $
*/
#ifndef CAM_ATA_ALL_H
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#40 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.8 2009/10/31 10:43:38 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.10 2009/11/04 15:40:19 mav Exp $");
#include <sys/param.h>
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#51 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.11 2009/11/01 11:31:06 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.12 2009/11/04 15:24:32 mav Exp $");
#include <sys/param.h>
#include <sys/bus.h>
==== //depot/projects/scottl-camlock/src/sys/cam/cam_periph.h#21 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/cam/cam_periph.h,v 1.21 2009/10/31 10:43:38 mav Exp $
+ * $FreeBSD: src/sys/cam/cam_periph.h,v 1.22 2009/11/04 15:40:19 mav Exp $
*/
#ifndef _CAM_CAM_PERIPH_H
==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#121 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.232 2009/11/02 08:31:00 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.233 2009/11/04 15:40:19 mav Exp $");
#include <sys/param.h>
#include <sys/bus.h>
==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_da.c#52 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.242 2009/11/02 23:30:15 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.243 2009/11/04 15:40:19 mav Exp $");
#include <sys/param.h>
==== //depot/projects/scottl-camlock/src/sys/dev/fb/vesa.c#6 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fb/vesa.c,v 1.14 2009/10/23 19:02:53 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fb/vesa.c,v 1.16 2009/11/04 01:00:28 jkim Exp $");
#include "opt_vga.h"
#include "opt_vesa.h"
@@ -174,10 +174,8 @@
u_char *b, int bits);
static int vesa_bios_load_palette(int start, int colors, u_char *palette,
int bits);
-#ifdef notyet
static int vesa_bios_load_palette2(int start, int colors, u_char *r, u_char *g,
u_char *b, int bits);
-#endif
#define STATE_SIZE 0
#define STATE_SAVE 1
#define STATE_LOAD 2
@@ -415,9 +413,9 @@
bits = 8 - bits;
for (i = 0; i < colors; ++i) {
- palette[i*3] = p[i*4 + 2] << bits;
- palette[i*3 + 1] = p[i*4 + 1] << bits;
- palette[i*3 + 2] = p[i*4] << bits;
+ palette[i * 3] = p[i * 4 + 2] << bits;
+ palette[i * 3 + 1] = p[i * 4 + 1] << bits;
+ palette[i * 3 + 2] = p[i * 4] << bits;
}
x86bios_free(p, colors * 4);
@@ -455,9 +453,9 @@
bits = 8 - bits;
for (i = 0; i < colors; ++i) {
- r[i] = p[i*4 + 2] << bits;
- g[i] = p[i*4 + 1] << bits;
- b[i] = p[i*4] << bits;
+ r[i] = p[i * 4 + 2] << bits;
+ g[i] = p[i * 4 + 1] << bits;
+ b[i] = p[i * 4] << bits;
}
x86bios_free(p, colors * 4);
@@ -487,10 +485,10 @@
bits = 8 - bits;
for (i = 0; i < colors; ++i) {
- p[i*4] = palette[i*3 + 2] >> bits;
- p[i*4 + 1] = palette[i*3 + 1] >> bits;
- p[i*4 + 2] = palette[i*3] >> bits;
- p[i*4 + 3] = 0;
+ p[i * 4] = palette[i * 3 + 2] >> bits;
+ p[i * 4 + 1] = palette[i * 3 + 1] >> bits;
+ p[i * 4 + 2] = palette[i * 3] >> bits;
+ p[i * 4 + 3] = 0;
}
x86bios_intr(®s, 0x10);
x86bios_free(p, colors * 4);
@@ -498,7 +496,6 @@
return (regs.R_AX != 0x004f);
}
-#ifdef notyet
static int
vesa_bios_load_palette2(int start, int colors, u_char *r, u_char *g, u_char *b,
int bits)
@@ -523,17 +520,16 @@
bits = 8 - bits;
for (i = 0; i < colors; ++i) {
- p[i*4] = b[i] >> bits;
- p[i*4 + 1] = g[i] >> bits;
- p[i*4 + 2] = r[i] >> bits;
- p[i*4 + 3] = 0;
+ p[i * 4] = b[i] >> bits;
+ p[i * 4 + 1] = g[i] >> bits;
+ p[i * 4 + 2] = r[i] >> bits;
+ p[i * 4 + 3] = 0;
}
x86bios_intr(®s, 0x10);
x86bios_free(p, colors * 4);
return (regs.R_AX != 0x004f);
}
-#endif
static ssize_t
vesa_bios_state_buf_size(void)
@@ -702,6 +698,7 @@
{ V_MODECOLOR, V_INFO_COLOR, 0 },
{ V_MODEGRAPHICS, V_INFO_GRAPHICS, 0 },
{ V_MODELFB, V_INFO_LINEAR, 0 },
+ { V_MODENONVGA, V_INFO_NONVGA, 0 },
};
int flags;
int i;
@@ -1275,7 +1272,8 @@
* the new mode correctly.
*/
if (VESA_MODE(adp->va_mode)) {
- if ((*prevvidsw->get_info)(adp, mode, &info) == 0) {
+ if (!VESA_MODE(mode) &&
+ (*prevvidsw->get_info)(adp, mode, &info) == 0) {
int10_set_mode(adp->va_initial_bios_mode);
if (adp->va_info.vi_flags & V_INFO_LINEAR)
vesa_unmap_buffer(adp->va_buffer,
@@ -1288,7 +1286,7 @@
}
/* we may not need to handle this mode after all... */
- if ((*prevvidsw->set_mode)(adp, mode) == 0)
+ if (!VESA_MODE(mode) && (*prevvidsw->set_mode)(adp, mode) == 0)
return (0);
/* is the new mode supported? */
@@ -1306,6 +1304,9 @@
if (vesa_bios_set_mode(mode | ((info.vi_flags & V_INFO_LINEAR) ? 0x4000 : 0)))
return (1);
+ if ((vesa_adp_info->v_flags & V_DAC8) != 0)
+ vesa_bios_set_dac(8);
+
if (adp->va_info.vi_flags & V_INFO_LINEAR)
vesa_unmap_buffer(adp->va_buffer,
vesa_adp_info->v_memsize*64*1024);
@@ -1382,17 +1383,11 @@
vesa_save_palette(video_adapter_t *adp, u_char *palette)
{
int bits;
- int error;
- if ((adp == vesa_adp) && (vesa_adp_info->v_flags & V_DAC8)
- && VESA_MODE(adp->va_mode)) {
- bits = vesa_bios_get_dac();
- error = vesa_bios_save_palette(0, 256, palette, bits);
- if (error == 0)
- return (0);
- if (bits != 6)
- return (error);
- }
+ if ((adp == vesa_adp) &&
+ (adp->va_info.vi_flags & V_INFO_NONVGA) != 0 &&
+ (bits = vesa_bios_get_dac()) >= 6)
+ return (vesa_bios_save_palette(0, 256, palette, bits));
return ((*prevvidsw->save_palette)(adp, palette));
}
@@ -1400,19 +1395,12 @@
static int
vesa_load_palette(video_adapter_t *adp, u_char *palette)
{
-#ifdef notyet
int bits;
- int error;
- if ((adp == vesa_adp) && (vesa_adp_info->v_flags & V_DAC8)
- && VESA_MODE(adp->va_mode) && ((bits = vesa_bios_set_dac(8)) > 6)) {
- error = vesa_bios_load_palette(0, 256, palette, bits);
- if (error == 0)
- return (0);
- if (vesa_bios_set_dac(6) != 6)
- return (1);
- }
-#endif /* notyet */
+ if ((adp == vesa_adp) &&
+ (adp->va_info.vi_flags & V_INFO_NONVGA) != 0 &&
+ (bits = vesa_bios_get_dac()) >= 6)
+ return (vesa_bios_load_palette(0, 256, palette, bits));
return ((*prevvidsw->load_palette)(adp, palette));
}
@@ -1482,6 +1470,8 @@
(flags & V_INFO_LINEAR) != 0)
mode |= 0x4000;
(void)vesa_bios_set_mode(mode);
+ if ((vesa_adp_info->v_flags & V_DAC8) != 0)
+ (void)vesa_bios_set_dac(8);
(void)(*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1);
}
@@ -1637,14 +1627,11 @@
return (1);
if ((base + count) > 256)
return (1);
- if (!(vesa_adp_info->v_flags & V_DAC8) || !VESA_MODE(adp->va_mode))
+ if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0 ||
+ (bits = vesa_bios_get_dac()) < 6)
return (1);
- bits = vesa_bios_get_dac();
- if (bits <= 6)
- return (1);
-
- r = malloc(count*3, M_DEVBUF, M_WAITOK);
+ r = malloc(count * 3, M_DEVBUF, M_WAITOK);
g = r + count;
b = g + count;
error = vesa_bios_save_palette2(base, count, r, g, b, bits);
@@ -1659,7 +1646,6 @@
}
free(r, M_DEVBUF);
- /* if error && bits != 6 at this point, we are in trouble... XXX */
return (error);
}
@@ -1667,8 +1653,6 @@
set_palette(video_adapter_t *adp, int base, int count,
u_char *red, u_char *green, u_char *blue, u_char *trans)
{
- return (1);
-#ifdef notyet
u_char *r;
u_char *g;
u_char *b;
@@ -1677,11 +1661,11 @@
if ((base < 0) || (base >= 256) || (base + count > 256))
return (1);
- if (!(vesa_adp_info->v_flags & V_DAC8) || !VESA_MODE(adp->va_mode)
- || ((bits = vesa_bios_set_dac(8)) <= 6))
+ if ((adp->va_info.vi_flags & V_INFO_NONVGA) == 0 ||
+ (bits = vesa_bios_get_dac()) < 6)
return (1);
- r = malloc(count*3, M_DEVBUF, M_WAITOK);
+ r = malloc(count * 3, M_DEVBUF, M_WAITOK);
g = r + count;
b = g + count;
copyin(red, r, count);
@@ -1690,13 +1674,8 @@
error = vesa_bios_load_palette2(base, count, r, g, b, bits);
free(r, M_DEVBUF);
- if (error == 0)
- return (0);
- /* if the following call fails, we are in trouble... XXX */
- vesa_bios_set_dac(6);
- return (1);
-#endif /* notyet */
+ return (error);
}
static int
==== //depot/projects/scottl-camlock/src/sys/dev/fb/vgareg.h#5 (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/vgareg.h,v 1.9 2008/09/27 08:51:18 ed Exp $
+ * $FreeBSD: src/sys/dev/fb/vgareg.h,v 1.10 2009/11/04 00:58:20 jkim Exp $
*/
#ifndef _DEV_FB_VGAREG_H_
@@ -70,6 +70,7 @@
typedef struct vga_softc {
struct video_adapter *adp;
void *state_buf;
+ void *pal_buf;
#ifdef FB_INSTALL_CDEV
genfb_softc_t gensc;
#endif
==== //depot/projects/scottl-camlock/src/sys/dev/fdc/fdc.c#17 (text+ko) ====
@@ -51,7 +51,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.324 2009/10/27 17:14:22 jh Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.325 2009/11/03 19:05:05 jh Exp $");
#include "opt_fdc.h"
@@ -1734,6 +1734,10 @@
if ((error = bus_generic_detach(dev)))
return (error);
+ if (fdc->fdc_intr)
+ bus_teardown_intr(dev, fdc->res_irq, fdc->fdc_intr);
+ fdc->fdc_intr = NULL;
+
/* kill worker thread */
mtx_lock(&fdc->fdc_mtx);
fdc->flags |= FDC_KTHREAD_EXIT;
@@ -2031,15 +2035,22 @@
return (0);
}
+static void
+fd_detach_geom(void *arg, int flag)
+{
+ struct fd_data *fd = arg;
+
+ g_topology_assert();
+ g_wither_geom(fd->fd_geom, ENXIO);
+}
+
static int
fd_detach(device_t dev)
{
struct fd_data *fd;
fd = device_get_softc(dev);
- g_topology_lock();
- g_wither_geom(fd->fd_geom, ENXIO);
- g_topology_unlock();
+ g_waitfor_event(fd_detach_geom, fd, M_WAITOK, NULL);
while (device_get_state(dev) == DS_BUSY)
tsleep(fd, PZERO, "fdd", hz/10);
callout_drain(&fd->toffhandle);
==== //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#15 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/siis/siis.c,v 1.7 2009/11/03 12:03:13 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/siis/siis.c,v 1.8 2009/11/04 15:10:46 mav Exp $");
#include <sys/param.h>
#include <sys/module.h>
==== //depot/projects/scottl-camlock/src/sys/dev/syscons/syscons.c#21 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/syscons/syscons.c,v 1.476 2009/10/23 18:53:21 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/syscons/syscons.c,v 1.477 2009/11/03 20:22:09 jkim Exp $");
#include "opt_compat.h"
#include "opt_syscons.h"
@@ -414,6 +414,9 @@
#endif
sc_set_graphics_mode(scp, NULL, vmode);
sc_set_pixel_mode(scp, NULL, 0, 0, 16, 8);
+#ifndef SC_NO_PALETTE_LOADING
+ vidd_save_palette(sc->adp, sc->palette);
+#endif
sc->initial_mode = vmode;
#ifdef DEV_SPLASH
/* put up the splash again! */
==== //depot/projects/scottl-camlock/src/sys/dev/usb/wlan/if_urtw.c#9 (text+ko) ====
@@ -15,7 +15,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/wlan/if_urtw.c,v 1.13 2009/10/18 00:11:49 weongyo Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/wlan/if_urtw.c,v 1.14 2009/11/03 21:47:07 weongyo Exp $");
#include <sys/param.h>
#include <sys/sockio.h>
#include <sys/sysctl.h>
@@ -1688,7 +1688,7 @@
ieee80211_radiotap_tx(vap, m0);
}
- if ((wh->i_fc[10] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_MGT ||
+ if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_MGT ||
(wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL) {
tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)];
rate = tp->mgmtrate;
==== //depot/projects/scottl-camlock/src/sys/i386/i386/identcpu.c#21 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/identcpu.c,v 1.203 2009/09/10 17:27:36 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/identcpu.c,v 1.204 2009/11/04 01:32:59 attilio Exp $");
#include "opt_cpu.h"
@@ -1303,6 +1303,24 @@
(amd_whcr & 0x0100) ? "Enable" : "Disable");
}
}
+
+ /*
+ * Opteron Rev E shows a bug as in very rare occasions a read memory
+ * barrier is not performed as expected if it is followed by a
+ * non-atomic read-modify-write instruction.
+ * As long as that bug pops up very rarely (intensive machine usage
+ * on other operating systems generally generates one unexplainable
+ * crash any 2 months) and as long as a model specific fix would be
+ * impratical at this stage, print out a warning string if the broken
+ * model and family are identified.
+ */
+ if (CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x20 &&
+ CPUID_TO_MODEL(cpu_id) <= 0x3f) {
+ printf("WARNING: This architecture revision has known SMP "
+ "hardware bugs which may cause random instability\n");
+ printf("WARNING: For details see: "
+ "http://bugzilla.kernel.org/show_bug.cgi?id=11305\n");
+ }
}
static void
==== //depot/projects/scottl-camlock/src/sys/isa/vga_isa.c#7 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/isa/vga_isa.c,v 1.35 2007/12/29 23:26:59 wkoszek Exp $");
+__FBSDID("$FreeBSD: src/sys/isa/vga_isa.c,v 1.36 2009/11/04 00:58:20 jkim Exp $");
#include "opt_vga.h"
#include "opt_fb.h"
@@ -179,17 +179,33 @@
nbytes = vidd_save_state(sc->adp, NULL, 0);
if (nbytes <= 0)
return (0);
- sc->state_buf = malloc(nbytes, M_TEMP, M_NOWAIT | M_ZERO);
- if (sc->state_buf == NULL)
- return (0);
- if (bootverbose)
- device_printf(dev, "saving %d bytes of video state\n", nbytes);
- if (vidd_save_state(sc->adp, sc->state_buf, nbytes) != 0) {
- device_printf(dev, "failed to save state (nbytes=%d)\n",
- nbytes);
- free(sc->state_buf, M_TEMP);
- sc->state_buf = NULL;
+ sc->state_buf = malloc(nbytes, M_TEMP, M_NOWAIT);
+ if (sc->state_buf != NULL) {
+ if (bootverbose)
+ device_printf(dev, "saving %d bytes of video state\n",
+ nbytes);
+ if (vidd_save_state(sc->adp, sc->state_buf, nbytes) != 0) {
+ device_printf(dev, "failed to save state (nbytes=%d)\n",
+ nbytes);
+ free(sc->state_buf, M_TEMP);
+ sc->state_buf = NULL;
+ }
+ }
+
+ /* Save the color palette across the suspend. */
+ if (sc->pal_buf != NULL)
+ free(sc->pal_buf, M_TEMP);
+ sc->pal_buf = malloc(256 * 3, M_TEMP, M_NOWAIT);
+ if (sc->pal_buf != NULL) {
+ if (bootverbose)
+ device_printf(dev, "saving color palette\n");
+ if (vidd_save_palette(sc->adp, sc->pal_buf) != 0) {
+ device_printf(dev, "failed to save palette\n");
+ free(sc->pal_buf, M_TEMP);
+ sc->pal_buf = NULL;
+ }
}
+
return (0);
}
@@ -205,6 +221,12 @@
free(sc->state_buf, M_TEMP);
sc->state_buf = NULL;
}
+ if (sc->pal_buf != NULL) {
+ if (vidd_load_palette(sc->adp, sc->pal_buf) != 0)
+ device_printf(dev, "failed to reload palette\n");
+ free(sc->pal_buf, M_TEMP);
+ sc->pal_buf = NULL;
+ }
bus_generic_resume(dev);
return 0;
==== //depot/projects/scottl-camlock/src/sys/kern/kern_idle.c#12 (text+ko) ====
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_idle.c,v 1.54 2008/03/16 10:58:05 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_idle.c,v 1.55 2009/11/03 16:46:52 attilio Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -74,10 +74,9 @@
if (error)
panic("idle_setup: kproc_create error %d\n", error);
- p->p_flag |= P_NOLOAD;
thread_lock(td);
TD_SET_CAN_RUN(td);
- td->td_flags |= TDF_IDLETD;
+ td->td_flags |= TDF_IDLETD | TDF_NOLOAD;
sched_class(td, PRI_IDLE);
sched_prio(td, PRI_MAX_IDLE);
thread_unlock(td);
==== //depot/projects/scottl-camlock/src/sys/kern/kern_intr.c#21 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_intr.c,v 1.174 2009/10/15 18:51:19 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_intr.c,v 1.175 2009/11/03 16:46:52 attilio Exp $");
#include "opt_ddb.h"
@@ -1061,6 +1061,7 @@
swi_add(struct intr_event **eventp, const char *name, driver_intr_t handler,
void *arg, int pri, enum intr_type flags, void **cookiep)
{
+ struct thread *td;
struct intr_event *ie;
int error;
@@ -1085,11 +1086,10 @@
if (error)
return (error);
if (pri == SWI_CLOCK) {
- struct proc *p;
- p = ie->ie_thread->it_thread->td_proc;
- PROC_LOCK(p);
- p->p_flag |= P_NOLOAD;
- PROC_UNLOCK(p);
+ td = ie->ie_thread->it_thread;
+ thread_lock(td);
+ td->td_flags |= TDF_NOLOAD;
+ thread_unlock(td);
}
return (0);
}
==== //depot/projects/scottl-camlock/src/sys/kern/sched_4bsd.c#19 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.131 2009/01/25 07:35:10 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.132 2009/11/03 16:46:52 attilio Exp $");
#include "opt_hwpmc_hooks.h"
#include "opt_sched.h"
@@ -728,10 +728,10 @@
thread_lock(td);
td->td_estcpu = ESTCPULIM(td->td_estcpu + child->td_estcpu);
thread_unlock(td);
- mtx_lock_spin(&sched_lock);
- if ((child->td_proc->p_flag & P_NOLOAD) == 0)
+ thread_lock(child);
+ if ((child->td_flags & TDF_NOLOAD) == 0)
sched_load_rem();
- mtx_unlock_spin(&sched_lock);
+ thread_unlock(child);
}
void
@@ -937,7 +937,7 @@
thread_unlock(td);
}
- if ((p->p_flag & P_NOLOAD) == 0)
+ if ((td->td_flags & TDF_NOLOAD) == 0)
sched_load_rem();
if (newtd)
@@ -980,7 +980,7 @@
("trying to run inhibited thread"));
newtd->td_flags |= TDF_DIDRUN;
TD_SET_RUNNING(newtd);
- if ((newtd->td_proc->p_flag & P_NOLOAD) == 0)
+ if ((newtd->td_flags & TDF_NOLOAD) == 0)
sched_load_add();
} else {
newtd = choosethread();
@@ -1289,7 +1289,7 @@
}
}
- if ((td->td_proc->p_flag & P_NOLOAD) == 0)
+ if ((td->td_flags & TDF_NOLOAD) == 0)
sched_load_add();
runq_add(ts->ts_runq, td, flags);
if (cpu != NOCPU)
@@ -1338,7 +1338,7 @@
if (maybe_preempt(td))
return;
}
- if ((td->td_proc->p_flag & P_NOLOAD) == 0)
+ if ((td->td_flags & TDF_NOLOAD) == 0)
sched_load_add();
runq_add(ts->ts_runq, td, flags);
maybe_resched(td);
@@ -1360,7 +1360,7 @@
"prio:%d", td->td_priority, KTR_ATTR_LINKED,
sched_tdname(curthread));
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list