mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-05 09:14:03 +00:00
strict kobj signatures: fixes in agp driver
offset parameter has vm_offset_t type in calling code and in kobj method Reviewed by: imp, rnoland, lulf, current@ Approved by: jhb (mentor)
This commit is contained in:
parent
e76f11f441
commit
446188d1e6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194017
@ -206,11 +206,11 @@ agp_ali_set_aperture(device_t dev, u_int32_t aperture)
|
||||
}
|
||||
|
||||
static int
|
||||
agp_ali_bind_page(device_t dev, int offset, vm_offset_t physical)
|
||||
agp_ali_bind_page(device_t dev, vm_offset_t offset, vm_offset_t physical)
|
||||
{
|
||||
struct agp_ali_softc *sc = device_get_softc(dev);
|
||||
|
||||
if (offset < 0 || offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
return EINVAL;
|
||||
|
||||
sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = physical;
|
||||
@ -218,11 +218,11 @@ agp_ali_bind_page(device_t dev, int offset, vm_offset_t physical)
|
||||
}
|
||||
|
||||
static int
|
||||
agp_ali_unbind_page(device_t dev, int offset)
|
||||
agp_ali_unbind_page(device_t dev, vm_offset_t offset)
|
||||
{
|
||||
struct agp_ali_softc *sc = device_get_softc(dev);
|
||||
|
||||
if (offset < 0 || offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
return EINVAL;
|
||||
|
||||
sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = 0;
|
||||
|
@ -342,11 +342,11 @@ agp_amd_set_aperture(device_t dev, u_int32_t aperture)
|
||||
}
|
||||
|
||||
static int
|
||||
agp_amd_bind_page(device_t dev, int offset, vm_offset_t physical)
|
||||
agp_amd_bind_page(device_t dev, vm_offset_t offset, vm_offset_t physical)
|
||||
{
|
||||
struct agp_amd_softc *sc = device_get_softc(dev);
|
||||
|
||||
if (offset < 0 || offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
return EINVAL;
|
||||
|
||||
sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = physical | 1;
|
||||
@ -357,11 +357,11 @@ agp_amd_bind_page(device_t dev, int offset, vm_offset_t physical)
|
||||
}
|
||||
|
||||
static int
|
||||
agp_amd_unbind_page(device_t dev, int offset)
|
||||
agp_amd_unbind_page(device_t dev, vm_offset_t offset)
|
||||
{
|
||||
struct agp_amd_softc *sc = device_get_softc(dev);
|
||||
|
||||
if (offset < 0 || offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
return EINVAL;
|
||||
|
||||
sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = 0;
|
||||
|
@ -315,11 +315,11 @@ agp_ati_set_aperture(device_t dev, u_int32_t aperture)
|
||||
}
|
||||
|
||||
static int
|
||||
agp_ati_bind_page(device_t dev, int offset, vm_offset_t physical)
|
||||
agp_ati_bind_page(device_t dev, vm_offset_t offset, vm_offset_t physical)
|
||||
{
|
||||
struct agp_ati_softc *sc = device_get_softc(dev);
|
||||
|
||||
if (offset < 0 || offset >= (sc->ag_entries << AGP_PAGE_SHIFT))
|
||||
if (offset >= (sc->ag_entries << AGP_PAGE_SHIFT))
|
||||
return EINVAL;
|
||||
|
||||
sc->ag_virtual[offset >> AGP_PAGE_SHIFT] = physical | 1;
|
||||
@ -328,11 +328,11 @@ agp_ati_bind_page(device_t dev, int offset, vm_offset_t physical)
|
||||
}
|
||||
|
||||
static int
|
||||
agp_ati_unbind_page(device_t dev, int offset)
|
||||
agp_ati_unbind_page(device_t dev, vm_offset_t offset)
|
||||
{
|
||||
struct agp_ati_softc *sc = device_get_softc(dev);
|
||||
|
||||
if (offset < 0 || offset >= (sc->ag_entries << AGP_PAGE_SHIFT))
|
||||
if (offset >= (sc->ag_entries << AGP_PAGE_SHIFT))
|
||||
return EINVAL;
|
||||
|
||||
sc->ag_virtual[offset >> AGP_PAGE_SHIFT] = 0;
|
||||
|
@ -90,8 +90,8 @@ static int agp_nvidia_attach(device_t);
|
||||
static int agp_nvidia_detach(device_t);
|
||||
static u_int32_t agp_nvidia_get_aperture(device_t);
|
||||
static int agp_nvidia_set_aperture(device_t, u_int32_t);
|
||||
static int agp_nvidia_bind_page(device_t, int, vm_offset_t);
|
||||
static int agp_nvidia_unbind_page(device_t, int);
|
||||
static int agp_nvidia_bind_page(device_t, vm_offset_t, vm_offset_t);
|
||||
static int agp_nvidia_unbind_page(device_t, vm_offset_t);
|
||||
|
||||
static int nvidia_init_iorr(u_int32_t, u_int32_t);
|
||||
|
||||
@ -312,12 +312,12 @@ agp_nvidia_set_aperture(device_t dev, u_int32_t aperture)
|
||||
}
|
||||
|
||||
static int
|
||||
agp_nvidia_bind_page(device_t dev, int offset, vm_offset_t physical)
|
||||
agp_nvidia_bind_page(device_t dev, vm_offset_t offset, vm_offset_t physical)
|
||||
{
|
||||
struct agp_nvidia_softc *sc = device_get_softc(dev);
|
||||
u_int32_t index;
|
||||
|
||||
if (offset < 0 || offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
return (EINVAL);
|
||||
|
||||
index = (sc->pg_offset + offset) >> AGP_PAGE_SHIFT;
|
||||
@ -327,12 +327,12 @@ agp_nvidia_bind_page(device_t dev, int offset, vm_offset_t physical)
|
||||
}
|
||||
|
||||
static int
|
||||
agp_nvidia_unbind_page(device_t dev, int offset)
|
||||
agp_nvidia_unbind_page(device_t dev, vm_offset_t offset)
|
||||
{
|
||||
struct agp_nvidia_softc *sc = device_get_softc(dev);
|
||||
u_int32_t index;
|
||||
|
||||
if (offset < 0 || offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
return (EINVAL);
|
||||
|
||||
index = (sc->pg_offset + offset) >> AGP_PAGE_SHIFT;
|
||||
@ -341,8 +341,8 @@ agp_nvidia_unbind_page(device_t dev, int offset)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
agp_nvidia_flush_tlb (device_t dev, int offset)
|
||||
static void
|
||||
agp_nvidia_flush_tlb (device_t dev)
|
||||
{
|
||||
struct agp_nvidia_softc *sc;
|
||||
u_int32_t wbc_reg, temp;
|
||||
@ -378,8 +378,6 @@ agp_nvidia_flush_tlb (device_t dev, int offset)
|
||||
temp = ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)];
|
||||
for(i = 0; i < pages; i++)
|
||||
temp = ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)];
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
#define SYSCFG 0xC0010010
|
||||
|
@ -227,11 +227,11 @@ agp_sis_set_aperture(device_t dev, u_int32_t aperture)
|
||||
}
|
||||
|
||||
static int
|
||||
agp_sis_bind_page(device_t dev, int offset, vm_offset_t physical)
|
||||
agp_sis_bind_page(device_t dev, vm_offset_t offset, vm_offset_t physical)
|
||||
{
|
||||
struct agp_sis_softc *sc = device_get_softc(dev);
|
||||
|
||||
if (offset < 0 || offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
return EINVAL;
|
||||
|
||||
sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = physical;
|
||||
@ -239,11 +239,11 @@ agp_sis_bind_page(device_t dev, int offset, vm_offset_t physical)
|
||||
}
|
||||
|
||||
static int
|
||||
agp_sis_unbind_page(device_t dev, int offset)
|
||||
agp_sis_unbind_page(device_t dev, vm_offset_t offset)
|
||||
{
|
||||
struct agp_sis_softc *sc = device_get_softc(dev);
|
||||
|
||||
if (offset < 0 || offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
|
||||
return EINVAL;
|
||||
|
||||
sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user