ACPI Address Space Descriptors can be up to 64 bits wide.
We should keep track of the whole thing when parsing resource
options, so this patch changes PNP port and mem option
fields from "unsigned short" and "unsigned int" to
"resource_size_t".
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
void pnp_remove_card_device(struct pnp_dev *dev);
struct pnp_port {
- unsigned short min; /* min base number */
- unsigned short max; /* max base number */
- unsigned char align; /* align boundary */
- unsigned char size; /* size of range */
+ resource_size_t min; /* min base number */
+ resource_size_t max; /* max base number */
+ resource_size_t align; /* align boundary */
+ resource_size_t size; /* size of range */
unsigned char flags; /* port flags */
unsigned char pad; /* pad */
struct pnp_port *next; /* next port */
};
struct pnp_mem {
- unsigned int min; /* min base number */
- unsigned int max; /* max base number */
- unsigned int align; /* align boundary */
- unsigned int size; /* size of range */
+ resource_size_t min; /* min base number */
+ resource_size_t max; /* max base number */
+ resource_size_t align; /* align boundary */
+ resource_size_t size; /* size of range */
unsigned char flags; /* memory flags */
unsigned char pad; /* pad */
struct pnp_mem *next; /* next memory resource */
static void pnp_print_port(pnp_info_buffer_t * buffer, char *space,
struct pnp_port *port)
{
- pnp_printf(buffer,
- "%sport 0x%x-0x%x, align 0x%x, size 0x%x, %i-bit address decoding\n",
- space, port->min, port->max,
- port->align ? (port->align - 1) : 0, port->size,
+ pnp_printf(buffer, "%sport %#llx-%#llx, align %#llx, size %#llx, "
+ "%i-bit address decoding\n", space,
+ (unsigned long long) port->min,
+ (unsigned long long) port->max,
+ port->align ? ((unsigned long long) port->align - 1) : 0,
+ (unsigned long long) port->size,
port->flags & IORESOURCE_IO_16BIT_ADDR ? 16 : 10);
}
{
char *s;
- pnp_printf(buffer, "%sMemory 0x%x-0x%x, align 0x%x, size 0x%x",
- space, mem->min, mem->max, mem->align, mem->size);
+ pnp_printf(buffer, "%sMemory %#llx-%#llx, align %#llx, size %#llx",
+ space, (unsigned long long) mem->min,
+ (unsigned long long) mem->max,
+ (unsigned long long) mem->align,
+ (unsigned long long) mem->size);
if (mem->flags & IORESOURCE_MEM_WRITEABLE)
pnp_printf(buffer, ", writeable");
if (mem->flags & IORESOURCE_MEM_CACHEABLE)
option->port = data;
dev_dbg(&dev->dev, " io "
- "min %#x max %#x align %d size %d flags %#x\n",
- data->min, data->max, data->align, data->size, data->flags);
+ "min %#llx max %#llx align %lld size %lld flags %#x\n",
+ (unsigned long long) data->min,
+ (unsigned long long) data->max,
+ (unsigned long long) data->align,
+ (unsigned long long) data->size, data->flags);
return 0;
}
option->mem = data;
dev_dbg(&dev->dev, " mem "
- "min %#x max %#x align %d size %d flags %#x\n",
- data->min, data->max, data->align, data->size, data->flags);
+ "min %#llx max %#llx align %lld size %lld flags %#x\n",
+ (unsigned long long) data->min,
+ (unsigned long long) data->max,
+ (unsigned long long) data->align,
+ (unsigned long long) data->size, data->flags);
return 0;
}