Commit 95238af9 authored by David Mosberger's avatar David Mosberger

ia64: Make kernel work better on machines with I/O MMU hardware.

	In particular, this fixes a panic() in the IDE code which
	triggered on machines with IDE disks and memory above
	4GB.
parent 4259186d
......@@ -1933,6 +1933,7 @@ static struct acpi_driver acpi_sba_ioc_driver = {
static int __init
sba_init(void)
{
pci_dma_bus_is_phys = 0; /* suppress bounce buffer in block/net layers */
MAX_DMA_ADDRESS = ~0UL;
acpi_bus_register_driver(&acpi_sba_ioc_driver);
......
......@@ -67,6 +67,10 @@ unsigned int num_io_spaces;
unsigned char aux_device_present = 0xaa; /* XXX remove this when legacy I/O is gone */
#ifdef CONFIG_PCI
int pci_dma_bus_is_phys = 1; /* default to direct mapping, unless we detect hw I/O MMU */
#endif
#define COMMAND_LINE_SIZE 512
char saved_command_line[COMMAND_LINE_SIZE]; /* used in proc filesystem */
......@@ -103,11 +107,11 @@ static unsigned long bootmap_start; /* physical address where the bootmem map is
static int
find_max_pfn (unsigned long start, unsigned long end, void *arg)
{
unsigned long *max_pfn = arg, pfn;
unsigned long *max_pfnp = arg, pfn;
pfn = (PAGE_ALIGN(end - 1) - PAGE_OFFSET) >> PAGE_SHIFT;
if (pfn > *max_pfn)
*max_pfn = pfn;
if (pfn > *max_pfnp)
*max_pfnp = pfn;
return 0;
}
......@@ -268,7 +272,6 @@ find_memory (void)
{
# define KERNEL_END (&_end)
unsigned long bootmap_size;
unsigned long max_pfn;
int n = 0;
/*
......
......@@ -413,4 +413,8 @@ extern void __ia64_memset_c_io (unsigned long, unsigned long, long);
# endif /* __KERNEL__ */
/* Argh, another magic macro... ;-( */
extern int pci_dma_bus_is_phys;
#define BIO_VMERGE_BOUNDARY (pci_dma_bus_is_phys ? 0 : PAGE_SIZE)
#endif /* _ASM_IA64_IO_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment