Commit f300eb42 authored by Paul Mackerras's avatar Paul Mackerras

Merge nanango.paulus.ozlabs.org:/home/paulus/kernel/linux-2.5

into nanango.paulus.ozlabs.org:/home/paulus/kernel/for-linus-ppc
parents 17bf6bcb 702d27c7
...@@ -137,6 +137,9 @@ prototypes: ...@@ -137,6 +137,9 @@ prototypes:
int (*writepage)(struct page *); int (*writepage)(struct page *);
int (*readpage)(struct file *, struct page *); int (*readpage)(struct file *, struct page *);
int (*sync_page)(struct page *); int (*sync_page)(struct page *);
int (*writeback_mapping)(struct address_space *, int *nr_to_write);
int (*vm_writeback)(struct page *, int *nr_to_write);
int (*set_page_dirty)(struct page *page);
int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
int (*commit_write)(struct file *, struct page *, unsigned, unsigned); int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
int (*bmap)(struct address_space *, long); int (*bmap)(struct address_space *, long);
...@@ -145,11 +148,15 @@ prototypes: ...@@ -145,11 +148,15 @@ prototypes:
int (*direct_IO)(int, struct inode *, struct kiobuf *, unsigned long, int); int (*direct_IO)(int, struct inode *, struct kiobuf *, unsigned long, int);
locking rules: locking rules:
All may block All except set_page_dirty may block
BKL PageLocked(page) BKL PageLocked(page)
writepage: no yes, unlocks writepage: no yes, unlocks
readpage: no yes, unlocks readpage: no yes, unlocks
sync_page: no maybe sync_page: no maybe
writeback_mapping: no
vm_writeback: no yes
set_page_dirty no no
prepare_write: no yes prepare_write: no yes
commit_write: no yes commit_write: no yes
bmap: yes bmap: yes
...@@ -158,19 +165,54 @@ releasepage: no yes ...@@ -158,19 +165,54 @@ releasepage: no yes
->prepare_write(), ->commit_write(), ->sync_page() and ->readpage() ->prepare_write(), ->commit_write(), ->sync_page() and ->readpage()
may be called from the request handler (/dev/loop). may be called from the request handler (/dev/loop).
->readpage() and ->writepage() unlock the page.
->readpage() unlocks the page, either synchronously or via I/O
completion.
->writepage() unlocks the page synchronously, before returning to
the caller. If the page has write I/O underway against it, writepage()
should run SetPageWriteback() against the page prior to unlocking it.
The write I/O completion handler should run ClearPageWriteback against
the page.
That is: after 2.5.12, pages which are under writeout are *not*
locked.
->sync_page() locking rules are not well-defined - usually it is called ->sync_page() locking rules are not well-defined - usually it is called
with lock on page, but that is not guaranteed. Considering the currently with lock on page, but that is not guaranteed. Considering the currently
existing instances of this method ->sync_page() itself doesn't look existing instances of this method ->sync_page() itself doesn't look
well-defined... well-defined...
->writeback_mapping() is used for periodic writeback and for
systemcall-initiated sync operations. The address_space should start
I/O against at least *nr_to_write pages. *nr_to_write must be decremented
for each page which is written. *nr_to_write must not go negative (this
will be relaxed later). If nr_to_write is NULL, all dirty pages must
be written.
->vm_writeback() is called from the VM. The address_space should
start I/O against at least *nr_to_write pages, including the passed page. As
each page is written its PG_launder flag must be set (inside the page lock).
The vm_writeback() function is provided so that filesytems can perform
clustered writeback around the page which the VM is trying to clean.
If a_ops.vm_writeback is NULL the VM will fall back to single-page writepage().
->set_page_dirty() is called from various places in the kernel
when the target page is marked as needing writeback. It may be called
under spinlock (it cannot block) and is sometimes called with the page
not locked.
->bmap() is currently used by legacy ioctl() (FIBMAP) provided by some ->bmap() is currently used by legacy ioctl() (FIBMAP) provided by some
filesystems and by the swapper. The latter will eventually go away. All filesystems and by the swapper. The latter will eventually go away. All
instances do not actually need the BKL. Please, keep it that way and don't instances do not actually need the BKL. Please, keep it that way and don't
breed new callers. breed new callers.
->flushpage() is called when the filesystem must attempt to drop ->flushpage() is called when the filesystem must attempt to drop
some or all of the buffers from the page when it is being truncated. It some or all of the buffers from the page when it is being truncated. It
returns zero on success. If ->flushpage is zero, the kernel uses returns zero on success. If ->flushpage is zero, the kernel uses
block_flushpage() instead. block_flushpage() instead.
->releasepage() is called when the kernel is about to try to drop the ->releasepage() is called when the kernel is about to try to drop the
buffers from the page in preparation for freeing it. It returns zero to buffers from the page in preparation for freeing it. It returns zero to
indicate that the buffers are (or may be) freeable. If ->releasepage is zero, indicate that the buffers are (or may be) freeable. If ->releasepage is zero,
......
...@@ -262,6 +262,13 @@ ChangeLog ...@@ -262,6 +262,13 @@ ChangeLog
Note that a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. Note that a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
2.0.6:
- Major bugfix to make compatible with other kernel changes. This fixes
the hangs/oopses on umount.
- Locking cleanup in directory operations (remove BKL usage).
2.0.5:
- Major buffer overflow bug fix.
- Minor cleanups and updates for kernel 2.5.12.
2.0.4: 2.0.4:
- Cleanups and updates for kernel 2.5.11. - Cleanups and updates for kernel 2.5.11.
2.0.3: 2.0.3:
......
...@@ -70,6 +70,9 @@ Driver details: ...@@ -70,6 +70,9 @@ Driver details:
Change history: Change history:
Version 0.9.8:
* Support other i8xx chipsets by adding 82801E detection
Version 0.9.7: Version 0.9.7:
* Support other i8xx chipsets too (by adding 82801BA(M) and * Support other i8xx chipsets too (by adding 82801BA(M) and
82801CA(M) detection) 82801CA(M) detection)
......
VERSION = 2 VERSION = 2
PATCHLEVEL = 5 PATCHLEVEL = 5
SUBLEVEL = 13 SUBLEVEL = 14
EXTRAVERSION = EXTRAVERSION =
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
......
...@@ -372,9 +372,7 @@ endmenu ...@@ -372,9 +372,7 @@ endmenu
source drivers/usb/Config.in source drivers/usb/Config.in
source drivers/input/Config.in source drivers/input/Config.in
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then source net/bluetooth/Config.in
source net/bluetooth/Config.in
fi
mainmenu_option next_comment mainmenu_option next_comment
comment 'Kernel hacking' comment 'Kernel hacking'
......
...@@ -421,6 +421,7 @@ irongate_remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, ...@@ -421,6 +421,7 @@ irongate_remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
unsigned long phys_addr, unsigned long flags) unsigned long phys_addr, unsigned long flags)
{ {
unsigned long end; unsigned long end;
unsigned long pfn;
address &= ~PMD_MASK; address &= ~PMD_MASK;
end = address + size; end = address + size;
...@@ -428,17 +429,17 @@ irongate_remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, ...@@ -428,17 +429,17 @@ irongate_remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
end = PMD_SIZE; end = PMD_SIZE;
if (address >= end) if (address >= end)
BUG(); BUG();
pfn = phys_addr >> PAGE_SHIFT;
do { do {
if (!pte_none(*pte)) { if (!pte_none(*pte)) {
printk("irongate_remap_area_pte: page already exists\n"); printk("irongate_remap_area_pte: page already exists\n");
BUG(); BUG();
} }
set_pte(pte, set_pte(pte, pfn_pte(pfn,
mk_pte_phys(phys_addr,
__pgprot(_PAGE_VALID | _PAGE_ASM | __pgprot(_PAGE_VALID | _PAGE_ASM |
_PAGE_KRE | _PAGE_KWE | flags))); _PAGE_KRE | _PAGE_KWE | flags)));
address += PAGE_SIZE; address += PAGE_SIZE;
phys_addr += PAGE_SIZE; pfn++;
pte++; pte++;
} while (address && (address < end)); } while (address && (address < end));
} }
......
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
mmu_gather_t mmu_gathers[NR_CPUS]; mmu_gather_t mmu_gathers[NR_CPUS];
unsigned long totalram_pages;
extern void die_if_kernel(char *,struct pt_regs *,long); extern void die_if_kernel(char *,struct pt_regs *,long);
static struct pcb_struct original_pcb; static struct pcb_struct original_pcb;
...@@ -250,12 +248,12 @@ callback_init(void * kernel_end) ...@@ -250,12 +248,12 @@ callback_init(void * kernel_end)
/* Set up the third level PTEs and update the virtual /* Set up the third level PTEs and update the virtual
addresses of the CRB entries. */ addresses of the CRB entries. */
for (i = 0; i < crb->map_entries; ++i) { for (i = 0; i < crb->map_entries; ++i) {
unsigned long paddr = crb->map[i].pa; unsigned long pfn = crb->map[i].pa >> PAGE_SHIFT;
crb->map[i].va = vaddr; crb->map[i].va = vaddr;
for (j = 0; j < crb->map[i].count; ++j) { for (j = 0; j < crb->map[i].count; ++j) {
set_pte(pte_offset_kernel(pmd, vaddr), set_pte(pte_offset_kernel(pmd, vaddr),
mk_pte_phys(paddr, PAGE_KERNEL)); pfn_pte(pfn, PAGE_KERNEL));
paddr += PAGE_SIZE; pfn++;
vaddr += PAGE_SIZE; vaddr += PAGE_SIZE;
} }
} }
...@@ -390,15 +388,3 @@ free_initrd_mem(unsigned long start, unsigned long end) ...@@ -390,15 +388,3 @@ free_initrd_mem(unsigned long start, unsigned long end)
printk ("Freeing initrd memory: %ldk freed\n", (end - __start) >> 10); printk ("Freeing initrd memory: %ldk freed\n", (end - __start) >> 10);
} }
#endif #endif
void
si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = 0;
val->freehigh = 0;
val->mem_unit = PAGE_SIZE;
}
...@@ -358,7 +358,6 @@ void __init mem_init(void) ...@@ -358,7 +358,6 @@ void __init mem_init(void)
extern int page_is_ram(unsigned long) __init; extern int page_is_ram(unsigned long) __init;
extern char _text, _etext, _data, _edata; extern char _text, _etext, _data, _edata;
extern char __init_begin, __init_end; extern char __init_begin, __init_end;
extern unsigned long totalram_pages;
unsigned long nid, i; unsigned long nid, i;
mem_map_t * lmem_map; mem_map_t * lmem_map;
......
...@@ -655,9 +655,7 @@ source drivers/misc/Config.in ...@@ -655,9 +655,7 @@ source drivers/misc/Config.in
source drivers/usb/Config.in source drivers/usb/Config.in
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then source net/bluetooth/Config.in
source net/bluetooth/Config.in
fi
mainmenu_option next_comment mainmenu_option next_comment
comment 'Kernel hacking' comment 'Kernel hacking'
......
...@@ -138,7 +138,7 @@ void __init memtable_init(struct meminfo *mi) ...@@ -138,7 +138,7 @@ void __init memtable_init(struct meminfo *mi)
page_nr = max_low_pfn; page_nr = max_low_pfn;
pte = alloc_bootmem_low_pages(PTRS_PER_PTE * sizeof(pte_t)); pte = alloc_bootmem_low_pages(PTRS_PER_PTE * sizeof(pte_t));
pte[0] = mk_pte_phys(PAGE_OFFSET + 491520, PAGE_READONLY); pte[0] = pfn_pte((PAGE_OFFSET + 491520) >> PAGE_SHIFT, PAGE_READONLY);
pmd_populate(&init_mm, pmd_offset(swapper_pg_dir, 0), pte); pmd_populate(&init_mm, pmd_offset(swapper_pg_dir, 0), pte);
for (i = 1; i < PTRS_PER_PGD; i++) for (i = 1; i < PTRS_PER_PGD; i++)
......
...@@ -150,8 +150,8 @@ static void __free_small_page(unsigned long spage, struct order *order) ...@@ -150,8 +150,8 @@ static void __free_small_page(unsigned long spage, struct order *order)
unsigned long flags; unsigned long flags;
struct page *page; struct page *page;
if (virt_addr_valid(spage)) {
page = virt_to_page(spage); page = virt_to_page(spage);
if (VALID_PAGE(page)) {
/* /*
* The container-page must be marked Reserved * The container-page must be marked Reserved
......
...@@ -240,9 +240,13 @@ make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page) ...@@ -240,9 +240,13 @@ make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page)
*/ */
void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte) void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte)
{ {
struct page *page = pte_page(pte); unsigned long pfn = pte_pfn(pte);
struct page *page;
if (VALID_PAGE(page) && page->mapping) { if (!pfn_valid(pfn))
return;
page = pfn_to_page(pfn);
if (page->mapping) {
if (test_and_clear_bit(PG_dcache_dirty, &page->flags)) if (test_and_clear_bit(PG_dcache_dirty, &page->flags))
__flush_dcache_page(page); __flush_dcache_page(page);
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
#define TABLE_SIZE ((TABLE_OFFSET + PTRS_PER_PTE) * sizeof(pte_t)) #define TABLE_SIZE ((TABLE_OFFSET + PTRS_PER_PTE) * sizeof(pte_t))
static unsigned long totalram_pages;
extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
extern char _stext, _text, _etext, _end, __init_begin, __init_end; extern char _stext, _text, _etext, _end, __init_begin, __init_end;
...@@ -631,14 +630,3 @@ static int __init keepinitrd_setup(char *__unused) ...@@ -631,14 +630,3 @@ static int __init keepinitrd_setup(char *__unused)
__setup("keepinitrd", keepinitrd_setup); __setup("keepinitrd", keepinitrd_setup);
#endif #endif
void si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = 0;
val->freehigh = 0;
val->mem_unit = PAGE_SIZE;
}
...@@ -51,7 +51,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -51,7 +51,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
printk("remap_area_pte: page already exists\n"); printk("remap_area_pte: page already exists\n");
BUG(); BUG();
} }
set_pte(pte, mk_pte_phys(phys_addr, pgprot)); set_pte(pte, pfn_pte(phys_addr >> PAGE_SHIFT, pgprot));
address += PAGE_SIZE; address += PAGE_SIZE;
phys_addr += PAGE_SIZE; phys_addr += PAGE_SIZE;
pte++; pte++;
......
...@@ -43,7 +43,7 @@ static pte_t *minicache_pte; ...@@ -43,7 +43,7 @@ static pte_t *minicache_pte;
*/ */
unsigned long map_page_minicache(unsigned long virt) unsigned long map_page_minicache(unsigned long virt)
{ {
set_pte(minicache_pte, mk_pte_phys(__pa(virt), minicache_pgprot)); set_pte(minicache_pte, pfn_pte(__pa(virt) >> PAGE_SHIFT, minicache_pgprot));
flush_tlb_kernel_page(minicache_address); flush_tlb_kernel_page(minicache_address);
return minicache_address; return minicache_address;
......
...@@ -198,7 +198,7 @@ alloc_init_page(unsigned long virt, unsigned long phys, int domain, int prot) ...@@ -198,7 +198,7 @@ alloc_init_page(unsigned long virt, unsigned long phys, int domain, int prot)
} }
ptep = pte_offset_kernel(pmdp, virt); ptep = pte_offset_kernel(pmdp, virt);
set_pte(ptep, mk_pte_phys(phys, __pgprot(prot))); set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, __pgprot(prot)));
} }
/* /*
......
...@@ -191,7 +191,7 @@ unsigned char IN_BYTE(ide_ioreg_t reg) { ...@@ -191,7 +191,7 @@ unsigned char IN_BYTE(ide_ioreg_t reg) {
#define ATA_PIO0_STROBE 19 #define ATA_PIO0_STROBE 19
#define ATA_PIO0_HOLD 4 #define ATA_PIO0_HOLD 4
static int e100_dmaproc (ide_dma_action_t func, ide_drive_t *drive); static int e100_dmaproc(ide_dma_action_t func, struct ata_device *drive, struct request *rq);
static void e100_ideproc (ide_ide_action_t func, ide_drive_t *drive, static void e100_ideproc (ide_ide_action_t func, ide_drive_t *drive,
void *buffer, unsigned int length); void *buffer, unsigned int length);
...@@ -278,7 +278,7 @@ init_e100_ide (void) ...@@ -278,7 +278,7 @@ init_e100_ide (void)
hwif->chipset = ide_etrax100; hwif->chipset = ide_etrax100;
hwif->tuneproc = &tune_e100_ide; hwif->tuneproc = &tune_e100_ide;
hwif->dmaproc = &e100_dmaproc; hwif->udma = &e100_dmaproc;
hwif->ata_read = e100_ide_input_data; hwif->ata_read = e100_ide_input_data;
hwif->ata_write = e100_ide_output_data; hwif->ata_write = e100_ide_output_data;
hwif->atapi_read = e100_atapi_read; hwif->atapi_read = e100_atapi_read;
...@@ -564,13 +564,14 @@ e100_ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount) ...@@ -564,13 +564,14 @@ e100_ide_output_data (ide_drive_t *drive, void *buffer, unsigned int wcount)
static etrax_dma_descr ata_descrs[MAX_DMA_DESCRS]; static etrax_dma_descr ata_descrs[MAX_DMA_DESCRS];
static unsigned int ata_tot_size; static unsigned int ata_tot_size;
/* /*
* e100_ide_build_dmatable() prepares a dma request. * This prepares a dma request. Returns 0 if all went okay, returns 1
* Returns 0 if all went okay, returns 1 otherwise. * otherwise.
*/ */
static int e100_ide_build_dmatable (ide_drive_t *drive)
static int e100_udma_new_table(struct ata_channel *ch, struct request *rq)
{ {
struct request *rq = HWGROUP(drive)->rq;
struct buffer_head *bh = rq->bh; struct buffer_head *bh = rq->bh;
unsigned long size, addr; unsigned long size, addr;
unsigned int count = 0; unsigned int count = 0;
...@@ -602,7 +603,7 @@ static int e100_ide_build_dmatable (ide_drive_t *drive) ...@@ -602,7 +603,7 @@ static int e100_ide_build_dmatable (ide_drive_t *drive)
/* did we run out of descriptors? */ /* did we run out of descriptors? */
if(count >= MAX_DMA_DESCRS) { if(count >= MAX_DMA_DESCRS) {
printk("%s: too few DMA descriptors\n", drive->name); printk("%s: too few DMA descriptors\n", ch->name);
return 1; return 1;
} }
...@@ -656,7 +657,7 @@ static int e100_ide_build_dmatable (ide_drive_t *drive) ...@@ -656,7 +657,7 @@ static int e100_ide_build_dmatable (ide_drive_t *drive)
return 0; return 0;
} }
printk("%s: empty DMA table?\n", drive->name); printk("%s: empty DMA table?\n", ch->name);
return 1; /* let the PIO routines handle this weirdness */ return 1; /* let the PIO routines handle this weirdness */
} }
...@@ -695,7 +696,7 @@ static ide_startstop_t etrax_dma_intr (struct ata_device *drive, struct request ...@@ -695,7 +696,7 @@ static ide_startstop_t etrax_dma_intr (struct ata_device *drive, struct request
LED_DISK_READ(0); LED_DISK_READ(0);
LED_DISK_WRITE(0); LED_DISK_WRITE(0);
dma_stat = drive->channel->dmaproc(ide_dma_end, drive); dma_stat = drive->channel->udma(ide_dma_end, drive, rq);
stat = GET_STAT(); /* get drive status */ stat = GET_STAT(); /* get drive status */
if (OK_STAT(stat,DRIVE_READY,drive->bad_wstat|DRQ_STAT)) { if (OK_STAT(stat,DRIVE_READY,drive->bad_wstat|DRQ_STAT)) {
if (!dma_stat) { if (!dma_stat) {
...@@ -726,7 +727,7 @@ static ide_startstop_t etrax_dma_intr (struct ata_device *drive, struct request ...@@ -726,7 +727,7 @@ static ide_startstop_t etrax_dma_intr (struct ata_device *drive, struct request
* the caller should revert to PIO for the current request. * the caller should revert to PIO for the current request.
*/ */
static int e100_dmaproc (ide_dma_action_t func, ide_drive_t *drive) static int e100_dmaproc(ide_dma_action_t func, struct ata_device *drive, struct request *rq)
{ {
static unsigned int reading; /* static to support ide_dma_begin semantics */ static unsigned int reading; /* static to support ide_dma_begin semantics */
int atapi = 0; int atapi = 0;
...@@ -786,21 +787,18 @@ static int e100_dmaproc (ide_dma_action_t func, ide_drive_t *drive) ...@@ -786,21 +787,18 @@ static int e100_dmaproc (ide_dma_action_t func, ide_drive_t *drive)
/* set up the Etrax DMA descriptors */ /* set up the Etrax DMA descriptors */
if(e100_ide_build_dmatable (drive)) if(e100_udma_new_table(drive->channel, rq))
return 1; return 1;
if(!atapi) { if(!atapi) {
/* set the irq handler which will finish the request when DMA is done */ /* set the irq handler which will finish the request when DMA is done */
ide_set_handler(drive, &etrax_dma_intr, WAIT_CMD, NULL); ide_set_handler(drive, &etrax_dma_intr, WAIT_CMD, NULL);
/* issue cmd to drive */ /* issue cmd to drive */
OUT_BYTE(WIN_READDMA, IDE_COMMAND_REG); OUT_BYTE(WIN_READDMA, IDE_COMMAND_REG);
} }
/* begin DMA */ /* begin DMA */
*R_DMA_CH3_FIRST = virt_to_phys(ata_descrs); *R_DMA_CH3_FIRST = virt_to_phys(ata_descrs);
*R_DMA_CH3_CMD = IO_STATE(R_DMA_CH3_CMD, cmd, start); *R_DMA_CH3_CMD = IO_STATE(R_DMA_CH3_CMD, cmd, start);
...@@ -829,26 +827,22 @@ static int e100_dmaproc (ide_dma_action_t func, ide_drive_t *drive) ...@@ -829,26 +827,22 @@ static int e100_dmaproc (ide_dma_action_t func, ide_drive_t *drive)
/* set up the Etrax DMA descriptors */ /* set up the Etrax DMA descriptors */
if(e100_ide_build_dmatable (drive)) if(e100_udma_new_table(drive->channel, rq))
return 1; return 1;
if(!atapi) { if(!atapi) {
/* set the irq handler which will finish the request when DMA is done */ /* set the irq handler which will finish the request when DMA is done */
ide_set_handler(drive, &etrax_dma_intr, WAIT_CMD, NULL); ide_set_handler(drive, &etrax_dma_intr, WAIT_CMD, NULL);
/* issue cmd to drive */ /* issue cmd to drive */
OUT_BYTE(WIN_WRITEDMA, IDE_COMMAND_REG); OUT_BYTE(WIN_WRITEDMA, IDE_COMMAND_REG);
} }
/* begin DMA */ /* begin DMA */
*R_DMA_CH2_FIRST = virt_to_phys(ata_descrs); *R_DMA_CH2_FIRST = virt_to_phys(ata_descrs);
*R_DMA_CH2_CMD = IO_STATE(R_DMA_CH2_CMD, cmd, start); *R_DMA_CH2_CMD = IO_STATE(R_DMA_CH2_CMD, cmd, start);
/* initiate a multi word dma write using DMA handshaking */ /* initiate a multi word dma write using DMA handshaking */
*R_ATA_TRANSFER_CNT = *R_ATA_TRANSFER_CNT =
IO_FIELD(R_ATA_TRANSFER_CNT, count, ata_tot_size >> 1); IO_FIELD(R_ATA_TRANSFER_CNT, count, ata_tot_size >> 1);
...@@ -878,7 +872,7 @@ static int e100_dmaproc (ide_dma_action_t func, ide_drive_t *drive) ...@@ -878,7 +872,7 @@ static int e100_dmaproc (ide_dma_action_t func, ide_drive_t *drive)
* --- Marcin Dalecki * --- Marcin Dalecki
*/ */
void ide_release_dma(struct ata_channel *hwif) void ide_release_dma(struct ata_channel *ch)
{ {
/* empty */ /* empty */
} }
...@@ -114,8 +114,6 @@ ...@@ -114,8 +114,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
static unsigned long totalram_pages;
struct pgtable_cache_struct quicklists; /* see asm/pgalloc.h */ struct pgtable_cache_struct quicklists; /* see asm/pgalloc.h */
const char bad_pmd_string[] = "Bad pmd in pte_alloc: %08lx\n"; const char bad_pmd_string[] = "Bad pmd in pte_alloc: %08lx\n";
...@@ -471,15 +469,3 @@ free_initmem(void) ...@@ -471,15 +469,3 @@ free_initmem(void)
printk ("Freeing unused kernel memory: %luk freed\n", printk ("Freeing unused kernel memory: %luk freed\n",
(&__init_end - &__init_begin) >> 10); (&__init_end - &__init_begin) >> 10);
} }
void
si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = 0;
val->freehigh = 0;
val->mem_unit = PAGE_SIZE;
}
...@@ -17,6 +17,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -17,6 +17,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
unsigned long phys_addr, unsigned long flags) unsigned long phys_addr, unsigned long flags)
{ {
unsigned long end; unsigned long end;
unsigned long pfn;
address &= ~PMD_MASK; address &= ~PMD_MASK;
end = address + size; end = address + size;
...@@ -24,16 +25,17 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -24,16 +25,17 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
end = PMD_SIZE; end = PMD_SIZE;
if (address >= end) if (address >= end)
BUG(); BUG();
pfn = phys_addr >> PAGE_SHIFT;
do { do {
if (!pte_none(*pte)) { if (!pte_none(*pte)) {
printk("remap_area_pte: page already exists\n"); printk("remap_area_pte: page already exists\n");
BUG(); BUG();
} }
set_pte(pte, mk_pte_phys(phys_addr, __pgprot(_PAGE_PRESENT | __READABLE | set_pte(pte, pfn_pte(pfn, __pgprot(_PAGE_PRESENT | __READABLE |
__WRITEABLE | _PAGE_GLOBAL | __WRITEABLE | _PAGE_GLOBAL |
_PAGE_KERNEL | flags))); _PAGE_KERNEL | flags)));
address += PAGE_SIZE; address += PAGE_SIZE;
phys_addr += PAGE_SIZE; pfn++;
pte++; pte++;
} while (address && (address < end)); } while (address && (address < end));
} }
......
...@@ -392,9 +392,7 @@ endmenu ...@@ -392,9 +392,7 @@ endmenu
source drivers/usb/Config.in source drivers/usb/Config.in
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then source net/bluetooth/Config.in
source net/bluetooth/Config.in
fi
mainmenu_option next_comment mainmenu_option next_comment
comment 'Kernel hacking' comment 'Kernel hacking'
......
...@@ -550,7 +550,7 @@ static void acpi_create_identity_pmd (void) ...@@ -550,7 +550,7 @@ static void acpi_create_identity_pmd (void)
/* fill page with low mapping */ /* fill page with low mapping */
for (i = 0; i < PTRS_PER_PTE; i++) for (i = 0; i < PTRS_PER_PTE; i++)
set_pte(ptep + i, mk_pte_phys(i << PAGE_SHIFT, PAGE_SHARED)); set_pte(ptep + i, pfn_pte(i, PAGE_SHARED));
pgd = pgd_offset(current->active_mm, 0); pgd = pgd_offset(current->active_mm, 0);
pmd = pmd_alloc(current->mm,pgd, 0); pmd = pmd_alloc(current->mm,pgd, 0);
......
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
mmu_gather_t mmu_gathers[NR_CPUS]; mmu_gather_t mmu_gathers[NR_CPUS];
unsigned long highstart_pfn, highend_pfn; unsigned long highstart_pfn, highend_pfn;
static unsigned long totalram_pages;
static unsigned long totalhigh_pages;
/* /*
* NOTE: pagetable_init alloc all the fixmap pagetables contiguous on the * NOTE: pagetable_init alloc all the fixmap pagetables contiguous on the
...@@ -122,7 +120,7 @@ static inline void set_pte_phys (unsigned long vaddr, ...@@ -122,7 +120,7 @@ static inline void set_pte_phys (unsigned long vaddr,
} }
pte = pte_offset_kernel(pmd, vaddr); pte = pte_offset_kernel(pmd, vaddr);
/* <phys,flags> stored as-is, to permit clearing entries */ /* <phys,flags> stored as-is, to permit clearing entries */
set_pte(pte, mk_pte_phys(phys, flags)); set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, flags));
/* /*
* It's enough to flush this one mapping. * It's enough to flush this one mapping.
...@@ -239,7 +237,7 @@ static void __init pagetable_init (void) ...@@ -239,7 +237,7 @@ static void __init pagetable_init (void)
vaddr = i*PGDIR_SIZE + j*PMD_SIZE + k*PAGE_SIZE; vaddr = i*PGDIR_SIZE + j*PMD_SIZE + k*PAGE_SIZE;
if (end && (vaddr >= end)) if (end && (vaddr >= end))
break; break;
*pte = mk_pte_phys(__pa(vaddr), PAGE_KERNEL); *pte = pfn_pte(__pa(vaddr) >> PAGE_SHIFT, PAGE_KERNEL);
} }
set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte_base))); set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte_base)));
if (pte_base != pte_offset_kernel(pmd, 0)) if (pte_base != pte_offset_kernel(pmd, 0))
...@@ -375,7 +373,7 @@ void __init test_wp_bit(void) ...@@ -375,7 +373,7 @@ void __init test_wp_bit(void)
pmd = pmd_offset(pgd, vaddr); pmd = pmd_offset(pgd, vaddr);
pte = pte_offset_kernel(pmd, vaddr); pte = pte_offset_kernel(pmd, vaddr);
old_pte = *pte; old_pte = *pte;
*pte = mk_pte_phys(0, PAGE_READONLY); *pte = pfn_pte(0, PAGE_READONLY);
local_flush_tlb(); local_flush_tlb();
boot_cpu_data.wp_works_ok = do_test_wp_bit(vaddr); boot_cpu_data.wp_works_ok = do_test_wp_bit(vaddr);
...@@ -561,18 +559,6 @@ void free_initrd_mem(unsigned long start, unsigned long end) ...@@ -561,18 +559,6 @@ void free_initrd_mem(unsigned long start, unsigned long end)
} }
#endif #endif
void si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = totalhigh_pages;
val->freehigh = nr_free_highpages();
val->mem_unit = PAGE_SIZE;
return;
}
#if defined(CONFIG_X86_PAE) #if defined(CONFIG_X86_PAE)
static struct kmem_cache_s *pae_pgd_cachep; static struct kmem_cache_s *pae_pgd_cachep;
......
...@@ -20,6 +20,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -20,6 +20,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
unsigned long phys_addr, unsigned long flags) unsigned long phys_addr, unsigned long flags)
{ {
unsigned long end; unsigned long end;
unsigned long pfn;
address &= ~PMD_MASK; address &= ~PMD_MASK;
end = address + size; end = address + size;
...@@ -27,15 +28,16 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -27,15 +28,16 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
end = PMD_SIZE; end = PMD_SIZE;
if (address >= end) if (address >= end)
BUG(); BUG();
pfn = phys_addr >> PAGE_SHIFT;
do { do {
if (!pte_none(*pte)) { if (!pte_none(*pte)) {
printk("remap_area_pte: page already exists\n"); printk("remap_area_pte: page already exists\n");
BUG(); BUG();
} }
set_pte(pte, mk_pte_phys(phys_addr, __pgprot(_PAGE_PRESENT | _PAGE_RW | set_pte(pte, pfn_pte(pfn, __pgprot(_PAGE_PRESENT | _PAGE_RW |
_PAGE_DIRTY | _PAGE_ACCESSED | flags))); _PAGE_DIRTY | _PAGE_ACCESSED | flags)));
address += PAGE_SIZE; address += PAGE_SIZE;
phys_addr += PAGE_SIZE; pfn++;
pte++; pte++;
} while (address && (address < end)); } while (address && (address < end));
} }
......
...@@ -226,9 +226,7 @@ source drivers/usb/Config.in ...@@ -226,9 +226,7 @@ source drivers/usb/Config.in
source lib/Config.in source lib/Config.in
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then source net/bluetooth/Config.in
source net/bluetooth/Config.in
fi
fi # !HP_SIM fi # !HP_SIM
......
...@@ -268,7 +268,7 @@ efi_map_pal_code (void) ...@@ -268,7 +268,7 @@ efi_map_pal_code (void)
*/ */
ia64_clear_ic(flags); ia64_clear_ic(flags);
ia64_itr(0x1, IA64_TR_PALCODE, vaddr & mask, ia64_itr(0x1, IA64_TR_PALCODE, vaddr & mask,
pte_val(mk_pte_phys(md->phys_addr, PAGE_KERNEL)), IA64_GRANULE_SHIFT); pte_val(pfn_pte(md->phys_addr >> PAGE_SHIFT, PAGE_KERNEL)), IA64_GRANULE_SHIFT);
local_irq_restore(flags); local_irq_restore(flags);
ia64_srlz_i(); ia64_srlz_i();
} }
......
...@@ -36,8 +36,6 @@ extern void ia64_tlb_init (void); ...@@ -36,8 +36,6 @@ extern void ia64_tlb_init (void);
unsigned long MAX_DMA_ADDRESS = PAGE_OFFSET + 0x100000000UL; unsigned long MAX_DMA_ADDRESS = PAGE_OFFSET + 0x100000000UL;
static unsigned long totalram_pages;
static int pgt_cache_water[2] = { 25, 50 }; static int pgt_cache_water[2] = { 25, 50 };
void void
...@@ -109,6 +107,7 @@ free_initmem (void) ...@@ -109,6 +107,7 @@ free_initmem (void)
void void
free_initrd_mem (unsigned long start, unsigned long end) free_initrd_mem (unsigned long start, unsigned long end)
{ {
struct page *page;
/* /*
* EFI uses 4KB pages while the kernel can use 4KB or bigger. * EFI uses 4KB pages while the kernel can use 4KB or bigger.
* Thus EFI and the kernel may have different page sizes. It is * Thus EFI and the kernel may have different page sizes. It is
...@@ -147,28 +146,16 @@ free_initrd_mem (unsigned long start, unsigned long end) ...@@ -147,28 +146,16 @@ free_initrd_mem (unsigned long start, unsigned long end)
printk(KERN_INFO "Freeing initrd memory: %ldkB freed\n", (end - start) >> 10); printk(KERN_INFO "Freeing initrd memory: %ldkB freed\n", (end - start) >> 10);
for (; start < end; start += PAGE_SIZE) { for (; start < end; start += PAGE_SIZE) {
if (!VALID_PAGE(virt_to_page(start))) if (!virt_addr_valid(start))
continue; continue;
clear_bit(PG_reserved, &virt_to_page(start)->flags); page = virt_to_page(start);
set_page_count(virt_to_page(start), 1); clear_bit(PG_reserved, &page->flags);
free_page(start); set_page_count(page, 1);
__free_page(page);
++totalram_pages; ++totalram_pages;
} }
} }
void
si_meminfo (struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = 0;
val->freehigh = 0;
val->mem_unit = PAGE_SIZE;
return;
}
void void
show_mem(void) show_mem(void)
{ {
...@@ -289,7 +276,7 @@ ia64_mmu_init (void *my_cpu_data) ...@@ -289,7 +276,7 @@ ia64_mmu_init (void *my_cpu_data)
ia64_srlz_d(); ia64_srlz_d();
ia64_itr(0x2, IA64_TR_PERCPU_DATA, PERCPU_ADDR, ia64_itr(0x2, IA64_TR_PERCPU_DATA, PERCPU_ADDR,
pte_val(mk_pte_phys(__pa(my_cpu_data), PAGE_KERNEL)), PAGE_SHIFT); pte_val(pfn_pte(__pa(my_cpu_data) >> PAGE_SHIFT, PAGE_KERNEL)), PAGE_SHIFT);
__restore_flags(flags); __restore_flags(flags);
ia64_srlz_i(); ia64_srlz_i();
......
...@@ -89,7 +89,7 @@ sgi_mcatest(void) ...@@ -89,7 +89,7 @@ sgi_mcatest(void)
printk("zzzspec: probe %ld, 0x%lx\n", res, val); printk("zzzspec: probe %ld, 0x%lx\n", res, val);
ia64_clear_ic(flags); ia64_clear_ic(flags);
ia64_itc(0x2, 0xe00000ff00000000UL, ia64_itc(0x2, 0xe00000ff00000000UL,
pte_val(mk_pte_phys(0xff00000000UL, pte_val(pfn_pte(0xff00000000UL >> PAGE_SHIFT,
__pgprot(__DIRTY_BITS|_PAGE_PL_0|_PAGE_AR_RW))), _PAGE_SIZE_256M); __pgprot(__DIRTY_BITS|_PAGE_PL_0|_PAGE_AR_RW))), _PAGE_SIZE_256M);
local_irq_restore(flags); local_irq_restore(flags);
ia64_srlz_i (); ia64_srlz_i ();
......
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
mmu_gather_t mmu_gathers[NR_CPUS]; mmu_gather_t mmu_gathers[NR_CPUS];
unsigned long totalram_pages = 0;
int do_check_pgt_cache(int low, int high) int do_check_pgt_cache(int low, int high)
{ {
int freed = 0; int freed = 0;
...@@ -202,18 +200,3 @@ void free_initrd_mem(unsigned long start, unsigned long end) ...@@ -202,18 +200,3 @@ void free_initrd_mem(unsigned long start, unsigned long end)
printk ("Freeing initrd memory: %dk freed\n", pages); printk ("Freeing initrd memory: %dk freed\n", pages);
} }
#endif #endif
void si_meminfo(struct sysinfo *val)
{
unsigned long i;
i = max_mapnr;
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = 0;
val->freehigh = 0;
val->mem_unit = PAGE_SIZE;
return;
}
...@@ -286,7 +286,6 @@ void __init paging_init(void) ...@@ -286,7 +286,6 @@ void __init paging_init(void)
} }
extern char __init_begin, __init_end; extern char __init_begin, __init_end;
extern unsigned long totalram_pages;
void free_initmem(void) void free_initmem(void)
{ {
......
...@@ -78,7 +78,7 @@ extern void momenco_ocelot_irq_setup(void); ...@@ -78,7 +78,7 @@ extern void momenco_ocelot_irq_setup(void);
static char reset_reason; static char reset_reason;
#define ENTRYLO(x) ((pte_val(mk_pte_phys((x), PAGE_KERNEL_UNCACHED)) >> 6)|1) #define ENTRYLO(x) ((pte_val(pfn_pte((x) >> PAGE_SHIFT, PAGE_KERNEL_UNCACHED)) >> 6)|1)
static void __init setup_l3cache(unsigned long size); static void __init setup_l3cache(unsigned long size);
......
...@@ -45,8 +45,6 @@ ...@@ -45,8 +45,6 @@
mmu_gather_t mmu_gathers[NR_CPUS]; mmu_gather_t mmu_gathers[NR_CPUS];
static unsigned long totalram_pages;
extern void prom_free_prom_memory(void); extern void prom_free_prom_memory(void);
...@@ -265,16 +263,3 @@ void free_initmem(void) ...@@ -265,16 +263,3 @@ void free_initmem(void)
printk("Freeing unused kernel memory: %dk freed\n", printk("Freeing unused kernel memory: %dk freed\n",
(&__init_end - &__init_begin) >> 10); (&__init_end - &__init_begin) >> 10);
} }
void si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = atomic_read(&shmem_nrpages);
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = 0;
val->freehigh = nr_free_highpages();
val->mem_unit = PAGE_SIZE;
return;
}
...@@ -18,6 +18,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -18,6 +18,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
unsigned long phys_addr, unsigned long flags) unsigned long phys_addr, unsigned long flags)
{ {
unsigned long end; unsigned long end;
unsigned long pfn;
pgprot_t pgprot = __pgprot(_PAGE_GLOBAL | _PAGE_PRESENT | __READABLE pgprot_t pgprot = __pgprot(_PAGE_GLOBAL | _PAGE_PRESENT | __READABLE
| __WRITEABLE | flags); | __WRITEABLE | flags);
...@@ -27,14 +28,15 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -27,14 +28,15 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
end = PMD_SIZE; end = PMD_SIZE;
if (address >= end) if (address >= end)
BUG(); BUG();
pfn = phys_addr >> PAGE_SHIFT;
do { do {
if (!pte_none(*pte)) { if (!pte_none(*pte)) {
printk("remap_area_pte: page already exists\n"); printk("remap_area_pte: page already exists\n");
BUG(); BUG();
} }
set_pte(pte, mk_pte_phys(phys_addr, pgprot)); set_pte(pte, pfn_pte(pfn, pgprot));
address += PAGE_SIZE; address += PAGE_SIZE;
phys_addr += PAGE_SIZE; pfn++;
pte++; pte++;
} while (address && (address < end)); } while (address && (address < end));
} }
......
...@@ -116,8 +116,12 @@ void *vmalloc_uncached (unsigned long size) ...@@ -116,8 +116,12 @@ void *vmalloc_uncached (unsigned long size)
static inline void free_pte(pte_t page) static inline void free_pte(pte_t page)
{ {
if (pte_present(page)) { if (pte_present(page)) {
struct page *ptpage = pte_page(page); unsigned long pfn = pte_pfn(page);
if ((!VALID_PAGE(ptpage)) || PageReserved(ptpage)) struct page *ptpage;
if (!pfn_valid(pfn))
return;
ptpage = pfn_to_page(pfn);
if (PageReserved(ptpage))
return; return;
__free_page(ptpage); __free_page(ptpage);
if (current->mm->rss <= 0) if (current->mm->rss <= 0)
......
...@@ -40,8 +40,6 @@ ...@@ -40,8 +40,6 @@
mmu_gather_t mmu_gathers[NR_CPUS]; mmu_gather_t mmu_gathers[NR_CPUS];
unsigned long totalram_pages;
void pgd_init(unsigned long page) void pgd_init(unsigned long page)
{ {
unsigned long *p, *end; unsigned long *p, *end;
...@@ -458,17 +456,3 @@ free_initmem(void) ...@@ -458,17 +456,3 @@ free_initmem(void)
printk("Freeing unused kernel memory: %ldk freed\n", printk("Freeing unused kernel memory: %ldk freed\n",
(&__init_end - &__init_begin) >> 10); (&__init_end - &__init_begin) >> 10);
} }
void
si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = atomic_read(&shmem_nrpages);
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = 0;
val->freehigh = nr_free_highpages();
val->mem_unit = PAGE_SIZE;
return;
}
...@@ -115,8 +115,12 @@ void *vmalloc_uncached (unsigned long size) ...@@ -115,8 +115,12 @@ void *vmalloc_uncached (unsigned long size)
static inline void free_pte(pte_t page) static inline void free_pte(pte_t page)
{ {
if (pte_present(page)) { if (pte_present(page)) {
struct page *ptpage = pte_page(page); unsigned long pfn = pte_pfn(page);
if ((!VALID_PAGE(ptpage)) || PageReserved(ptpage)) struct page *ptpage;
if (!pfn_valid(pfn))
return;
ptpage = pfn_to_page(pfn);
if (PageReserved(ptpage))
return; return;
__free_page(ptpage); __free_page(ptpage);
if (current->mm->rss <= 0) if (current->mm->rss <= 0)
......
...@@ -265,7 +265,6 @@ void __init mem_init(void) ...@@ -265,7 +265,6 @@ void __init mem_init(void)
{ {
extern char _stext, _etext, _fdata, _edata; extern char _stext, _etext, _fdata, _edata;
extern char __init_begin, __init_end; extern char __init_begin, __init_end;
extern unsigned long totalram_pages;
extern unsigned long setup_zero_pages(void); extern unsigned long setup_zero_pages(void);
cnodeid_t nid; cnodeid_t nid;
unsigned long tmp; unsigned long tmp;
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
static unsigned long totalram_pages;
extern unsigned long max_pfn, mem_max; extern unsigned long max_pfn, mem_max;
void free_initmem(void) { void free_initmem(void) {
...@@ -451,29 +450,3 @@ void free_initrd_mem(unsigned long start, unsigned long end) ...@@ -451,29 +450,3 @@ void free_initrd_mem(unsigned long start, unsigned long end)
#endif #endif
} }
#endif #endif
void si_meminfo(struct sysinfo *val)
{
int i;
i = max_mapnr;
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
#if 0
while (i-- > 0) {
if (PageReserved(mem_map+i))
continue;
val->totalram++;
if (!atomic_read(&mem_map[i].count))
continue;
val->sharedram += atomic_read(&mem_map[i].count) - 1;
}
val->totalram <<= PAGE_SHIFT;
val->sharedram <<= PAGE_SHIFT;
#endif
val->totalhigh = 0;
val->freehigh = 0;
return;
}
...@@ -588,9 +588,7 @@ fi ...@@ -588,9 +588,7 @@ fi
source drivers/usb/Config.in source drivers/usb/Config.in
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then source net/bluetooth/Config.in
source net/bluetooth/Config.in
fi
source lib/Config.in source lib/Config.in
......
...@@ -70,8 +70,6 @@ unsigned long ppc_memoffset = PAGE_OFFSET; ...@@ -70,8 +70,6 @@ unsigned long ppc_memoffset = PAGE_OFFSET;
int mem_init_done; int mem_init_done;
int init_bootmem_done; int init_bootmem_done;
int boot_mapsize; int boot_mapsize;
unsigned long totalram_pages;
unsigned long totalhigh_pages;
#ifdef CONFIG_ALL_PPC #ifdef CONFIG_ALL_PPC
unsigned long agp_special_page; unsigned long agp_special_page;
#endif #endif
...@@ -145,17 +143,6 @@ void show_mem(void) ...@@ -145,17 +143,6 @@ void show_mem(void)
printk("%ld buffermem pages\n", nr_buffermem_pages()); printk("%ld buffermem pages\n", nr_buffermem_pages());
} }
void si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = totalhigh_pages;
val->freehigh = nr_free_highpages();
val->mem_unit = PAGE_SIZE;
}
/* Free up now-unused memory */ /* Free up now-unused memory */
static void free_sec(unsigned long start, unsigned long end, const char *name) static void free_sec(unsigned long start, unsigned long end, const char *name)
{ {
......
...@@ -237,7 +237,7 @@ map_page(unsigned long va, unsigned long pa, int flags) ...@@ -237,7 +237,7 @@ map_page(unsigned long va, unsigned long pa, int flags)
pg = pte_alloc_kernel(&init_mm, pd, va); pg = pte_alloc_kernel(&init_mm, pd, va);
if (pg != 0) { if (pg != 0) {
err = 0; err = 0;
set_pte(pg, mk_pte_phys(pa & PAGE_MASK, __pgprot(flags))); set_pte(pg, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags)));
if (mem_init_done) if (mem_init_done)
flush_HPTE(0, va, pmd_val(*pd)); flush_HPTE(0, va, pmd_val(*pd));
} }
......
...@@ -73,7 +73,6 @@ int mem_init_done; ...@@ -73,7 +73,6 @@ int mem_init_done;
unsigned long ioremap_bot = IMALLOC_BASE; unsigned long ioremap_bot = IMALLOC_BASE;
static int boot_mapsize; static int boot_mapsize;
static unsigned long totalram_pages;
extern pgd_t swapper_pg_dir[]; extern pgd_t swapper_pg_dir[];
extern char __init_begin, __init_end; extern char __init_begin, __init_end;
...@@ -138,17 +137,6 @@ void show_mem(void) ...@@ -138,17 +137,6 @@ void show_mem(void)
printk("%ld buffermem pages\n", nr_buffermem_pages()); printk("%ld buffermem pages\n", nr_buffermem_pages());
} }
void si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = 0;
val->freehigh = 0;
val->mem_unit = PAGE_SIZE;
}
void * void *
ioremap(unsigned long addr, unsigned long size) ioremap(unsigned long addr, unsigned long size)
{ {
...@@ -240,7 +228,7 @@ static void map_io_page(unsigned long ea, unsigned long pa, int flags) ...@@ -240,7 +228,7 @@ static void map_io_page(unsigned long ea, unsigned long pa, int flags)
ptep = pte_alloc_kernel(&ioremap_mm, pmdp, ea); ptep = pte_alloc_kernel(&ioremap_mm, pmdp, ea);
pa = absolute_to_phys(pa); pa = absolute_to_phys(pa);
set_pte(ptep, mk_pte_phys(pa & PAGE_MASK, __pgprot(flags))); set_pte(ptep, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags)));
spin_unlock(&ioremap_mm.page_table_lock); spin_unlock(&ioremap_mm.page_table_lock);
} else { } else {
/* If the mm subsystem is not fully up, we cannot create a /* If the mm subsystem is not fully up, we cannot create a
......
...@@ -39,8 +39,6 @@ ...@@ -39,8 +39,6 @@
mmu_gather_t mmu_gathers[NR_CPUS]; mmu_gather_t mmu_gathers[NR_CPUS];
static unsigned long totalram_pages;
pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE))); pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE)));
char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE)));
...@@ -118,9 +116,8 @@ void __init paging_init(void) ...@@ -118,9 +116,8 @@ void __init paging_init(void)
pte_t pte; pte_t pte;
int i; int i;
unsigned long tmp; unsigned long tmp;
unsigned long address=0; unsigned long pfn = 0;
unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE;
unsigned long end_mem = (unsigned long) __va(max_low_pfn*PAGE_SIZE);
static const int ssm_mask = 0x04000000L; static const int ssm_mask = 0x04000000L;
/* unmap whole virtual address space */ /* unmap whole virtual address space */
...@@ -136,7 +133,7 @@ void __init paging_init(void) ...@@ -136,7 +133,7 @@ void __init paging_init(void)
pg_dir = swapper_pg_dir; pg_dir = swapper_pg_dir;
while (address < end_mem) { while (pfn < max_low_pfn) {
/* /*
* pg_table is physical at this point * pg_table is physical at this point
*/ */
...@@ -149,11 +146,11 @@ void __init paging_init(void) ...@@ -149,11 +146,11 @@ void __init paging_init(void)
pg_dir++; pg_dir++;
for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) { for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) {
pte = mk_pte_phys(address, PAGE_KERNEL); pte = pfn_pte(pfn, PAGE_KERNEL);
if (address >= end_mem) if (pfn >= max_low_pfn)
pte_clear(&pte); pte_clear(&pte);
set_pte(pg_table, pte); set_pte(pg_table, pte);
address += PAGE_SIZE; pfn++;
} }
} }
...@@ -231,14 +228,3 @@ void free_initrd_mem(unsigned long start, unsigned long end) ...@@ -231,14 +228,3 @@ void free_initrd_mem(unsigned long start, unsigned long end)
} }
} }
#endif #endif
void si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = 0;
val->freehigh = 0;
val->mem_unit = PAGE_SIZE;
}
...@@ -21,6 +21,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -21,6 +21,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
unsigned long phys_addr, unsigned long flags) unsigned long phys_addr, unsigned long flags)
{ {
unsigned long end; unsigned long end;
unsigned long pfn;
address &= ~PMD_MASK; address &= ~PMD_MASK;
end = address + size; end = address + size;
...@@ -28,15 +29,15 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -28,15 +29,15 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
end = PMD_SIZE; end = PMD_SIZE;
if (address >= end) if (address >= end)
BUG(); BUG();
pfn = phys_addr >> PAGE_SHIFT;
do { do {
if (!pte_none(*pte)) { if (!pte_none(*pte)) {
printk("remap_area_pte: page already exists\n"); printk("remap_area_pte: page already exists\n");
BUG(); BUG();
} }
set_pte(pte, mk_pte_phys(phys_addr, set_pte(pte, pfn_pte(pfn, __pgprot(_PAGE_PRESENT | flags)));
__pgprot(_PAGE_PRESENT | flags)));
address += PAGE_SIZE; address += PAGE_SIZE;
phys_addr += PAGE_SIZE; pfn++;
pte++; pte++;
} while (address && (address < end)); } while (address && (address < end));
} }
......
...@@ -39,8 +39,6 @@ ...@@ -39,8 +39,6 @@
mmu_gather_t mmu_gathers[NR_CPUS]; mmu_gather_t mmu_gathers[NR_CPUS];
static unsigned long totalram_pages;
pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE))); pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE)));
char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE)));
...@@ -116,10 +114,9 @@ void __init paging_init(void) ...@@ -116,10 +114,9 @@ void __init paging_init(void)
pte_t * pt_dir; pte_t * pt_dir;
pte_t pte; pte_t pte;
int i,j,k; int i,j,k;
unsigned long address=0; unsigned long pfn = 0;
unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) |
_KERN_REGION_TABLE; _KERN_REGION_TABLE;
unsigned long end_mem = (unsigned long) __va(max_low_pfn*PAGE_SIZE);
static const int ssm_mask = 0x04000000L; static const int ssm_mask = 0x04000000L;
unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0}; unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
...@@ -147,7 +144,7 @@ void __init paging_init(void) ...@@ -147,7 +144,7 @@ void __init paging_init(void)
for (i = 0 ; i < PTRS_PER_PGD ; i++,pg_dir++) { for (i = 0 ; i < PTRS_PER_PGD ; i++,pg_dir++) {
if (address >= end_mem) { if (pfn >= max_low_pfn) {
pgd_clear(pg_dir); pgd_clear(pg_dir);
continue; continue;
} }
...@@ -156,7 +153,7 @@ void __init paging_init(void) ...@@ -156,7 +153,7 @@ void __init paging_init(void)
pgd_populate(&init_mm, pg_dir, pm_dir); pgd_populate(&init_mm, pg_dir, pm_dir);
for (j = 0 ; j < PTRS_PER_PMD ; j++,pm_dir++) { for (j = 0 ; j < PTRS_PER_PMD ; j++,pm_dir++) {
if (address >= end_mem) { if (pfn >= max_low_pfn) {
pmd_clear(pm_dir); pmd_clear(pm_dir);
continue; continue;
} }
...@@ -165,13 +162,13 @@ void __init paging_init(void) ...@@ -165,13 +162,13 @@ void __init paging_init(void)
pmd_populate(&init_mm, pm_dir, pt_dir); pmd_populate(&init_mm, pm_dir, pt_dir);
for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) { for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) {
pte = mk_pte_phys(address, PAGE_KERNEL); pte = mk_pte_phys(pfn, PAGE_KERNEL);
if (address >= end_mem) { if (pfn >= max_low_pfn) {
pte_clear(&pte); pte_clear(&pte);
continue; continue;
} }
set_pte(pt_dir, pte); set_pte(pt_dir, pte);
address += PAGE_SIZE; pfn++;
} }
} }
} }
...@@ -244,17 +241,6 @@ void free_initrd_mem(unsigned long start, unsigned long end) ...@@ -244,17 +241,6 @@ void free_initrd_mem(unsigned long start, unsigned long end)
} }
#endif #endif
void si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = 0;
val->freehigh = 0;
val->mem_unit = PAGE_SIZE;
}
/* /*
* Overrides for Emacs so that we follow Linus's tabbing style. * Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically * Emacs will notice this stuff at the end of the file and automatically
......
...@@ -21,6 +21,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -21,6 +21,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
unsigned long phys_addr, unsigned long flags) unsigned long phys_addr, unsigned long flags)
{ {
unsigned long end; unsigned long end;
unsigned long pfn;
address &= ~PMD_MASK; address &= ~PMD_MASK;
end = address + size; end = address + size;
...@@ -28,15 +29,15 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -28,15 +29,15 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
end = PMD_SIZE; end = PMD_SIZE;
if (address >= end) if (address >= end)
BUG(); BUG();
pfn = phys_addr >> PAGE_SHIFT;
do { do {
if (!pte_none(*pte)) { if (!pte_none(*pte)) {
printk("remap_area_pte: page already exists\n"); printk("remap_area_pte: page already exists\n");
BUG(); BUG();
} }
set_pte(pte, mk_pte_phys(phys_addr, set_pte(pte, pfn_pte(pfn, __pgprot(_PAGE_PRESENT | flags)));
__pgprot(_PAGE_PRESENT | flags)));
address += PAGE_SIZE; address += PAGE_SIZE;
phys_addr += PAGE_SIZE; pfn++;
pte++; pte++;
} while (address && (address < end)); } while (address && (address < end));
} }
......
...@@ -398,7 +398,7 @@ void clear_user_page(void *to, unsigned long address) ...@@ -398,7 +398,7 @@ void clear_user_page(void *to, unsigned long address)
pte_t entry; pte_t entry;
unsigned long flags; unsigned long flags;
entry = mk_pte_phys(phys_addr, pgprot); entry = pfn_pte(phys_addr >> PAGE_SHIFT, pgprot);
down(&p3map_sem[(address & CACHE_ALIAS)>>12]); down(&p3map_sem[(address & CACHE_ALIAS)>>12]);
set_pte(pte, entry); set_pte(pte, entry);
save_and_cli(flags); save_and_cli(flags);
...@@ -437,7 +437,7 @@ void copy_user_page(void *to, void *from, unsigned long address) ...@@ -437,7 +437,7 @@ void copy_user_page(void *to, void *from, unsigned long address)
pte_t entry; pte_t entry;
unsigned long flags; unsigned long flags;
entry = mk_pte_phys(phys_addr, pgprot); entry = pfn_pte(phys_addr >> PAGE_SHIFT, pgprot);
down(&p3map_sem[(address & CACHE_ALIAS)>>12]); down(&p3map_sem[(address & CACHE_ALIAS)>>12]);
set_pte(pte, entry); set_pte(pte, entry);
save_and_cli(flags); save_and_cli(flags);
......
...@@ -290,6 +290,7 @@ void update_mmu_cache(struct vm_area_struct * vma, ...@@ -290,6 +290,7 @@ void update_mmu_cache(struct vm_area_struct * vma,
unsigned long vpn; unsigned long vpn;
#if defined(__SH4__) #if defined(__SH4__)
struct page *page; struct page *page;
unsigned long pfn;
unsigned long ptea; unsigned long ptea;
#endif #endif
...@@ -298,12 +299,15 @@ void update_mmu_cache(struct vm_area_struct * vma, ...@@ -298,12 +299,15 @@ void update_mmu_cache(struct vm_area_struct * vma,
return; return;
#if defined(__SH4__) #if defined(__SH4__)
page = pte_page(pte); pfn = pte_pfn(pte);
if (VALID_PAGE(page) && !test_bit(PG_mapped, &page->flags)) { if (pfn_valid(pfn)) {
page = pfn_to_page(pfn);
if (!test_bit(PG_mapped, &page->flags)) {
unsigned long phys = pte_val(pte) & PTE_PHYS_MASK; unsigned long phys = pte_val(pte) & PTE_PHYS_MASK;
__flush_wback_region((void *)P1SEGADDR(phys), PAGE_SIZE); __flush_wback_region((void *)P1SEGADDR(phys), PAGE_SIZE);
__set_bit(PG_mapped, &page->flags); __set_bit(PG_mapped, &page->flags);
} }
}
#endif #endif
save_and_cli(flags); save_and_cli(flags);
......
...@@ -48,9 +48,6 @@ pg_data_t discontig_page_data[NR_NODES]; ...@@ -48,9 +48,6 @@ pg_data_t discontig_page_data[NR_NODES];
bootmem_data_t discontig_node_bdata[NR_NODES]; bootmem_data_t discontig_node_bdata[NR_NODES];
#endif #endif
static unsigned long totalram_pages;
static unsigned long totalhigh_pages;
void show_mem(void) void show_mem(void)
{ {
int i, total = 0, reserved = 0; int i, total = 0, reserved = 0;
...@@ -203,15 +200,3 @@ void free_initrd_mem(unsigned long start, unsigned long end) ...@@ -203,15 +200,3 @@ void free_initrd_mem(unsigned long start, unsigned long end)
printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
} }
#endif #endif
void si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = totalhigh_pages;
val->freehigh = nr_free_highpages();
val->mem_unit = PAGE_SIZE;
return;
}
...@@ -17,6 +17,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, ...@@ -17,6 +17,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address,
unsigned long size, unsigned long phys_addr, unsigned long flags) unsigned long size, unsigned long phys_addr, unsigned long flags)
{ {
unsigned long end; unsigned long end;
unsigned long pfn;
pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW | pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW |
_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_ACCESSED |
_PAGE_HW_SHARED | _PAGE_FLAGS_HARD | flags); _PAGE_HW_SHARED | _PAGE_FLAGS_HARD | flags);
...@@ -27,14 +28,15 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, ...@@ -27,14 +28,15 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address,
end = PMD_SIZE; end = PMD_SIZE;
if (address >= end) if (address >= end)
BUG(); BUG();
pfn = phys_addr >> PAGE_SHIFT;
do { do {
if (!pte_none(*pte)) { if (!pte_none(*pte)) {
printk("remap_area_pte: page already exists\n"); printk("remap_area_pte: page already exists\n");
BUG(); BUG();
} }
set_pte(pte, mk_pte_phys(phys_addr, pgprot)); set_pte(pte, pfn_pte(pfn, pgprot));
address += PAGE_SIZE; address += PAGE_SIZE;
phys_addr += PAGE_SIZE; pfn++;
pte++; pte++;
} while (address && (address < end)); } while (address && (address < end));
} }
......
...@@ -63,8 +63,6 @@ extern volatile int smp_process_available; ...@@ -63,8 +63,6 @@ extern volatile int smp_process_available;
extern volatile int smp_commenced; extern volatile int smp_commenced;
extern int __smp4d_processor_id(void); extern int __smp4d_processor_id(void);
extern unsigned long totalram_pages;
/* #define SMP_DEBUG */ /* #define SMP_DEBUG */
#ifdef SMP_DEBUG #ifdef SMP_DEBUG
......
...@@ -59,8 +59,6 @@ extern volatile int smp_process_available; ...@@ -59,8 +59,6 @@ extern volatile int smp_process_available;
extern volatile int smp_commenced; extern volatile int smp_commenced;
extern int __smp4m_processor_id(void); extern int __smp4m_processor_id(void);
extern unsigned long totalram_pages;
/*#define SMP_DEBUG*/ /*#define SMP_DEBUG*/
#ifdef SMP_DEBUG #ifdef SMP_DEBUG
......
...@@ -19,8 +19,12 @@ static inline void forget_pte(pte_t page) ...@@ -19,8 +19,12 @@ static inline void forget_pte(pte_t page)
if (pte_none(page)) if (pte_none(page))
return; return;
if (pte_present(page)) { if (pte_present(page)) {
struct page *ptpage = pte_page(page); unsigned long pfn = pte_pfn(page);
if ((!VALID_PAGE(ptpage)) || PageReserved(ptpage)) struct page *ptpage;
if (!pfn_valid(pfn))
return;
ptpage = pfn_to_page(pfn);
if (PageReserved(ptpage))
return; return;
page_cache_release(ptpage); page_cache_release(ptpage);
return; return;
......
...@@ -55,8 +55,6 @@ extern unsigned int sparc_ramdisk_image; ...@@ -55,8 +55,6 @@ extern unsigned int sparc_ramdisk_image;
extern unsigned int sparc_ramdisk_size; extern unsigned int sparc_ramdisk_size;
unsigned long highstart_pfn, highend_pfn; unsigned long highstart_pfn, highend_pfn;
unsigned long totalram_pages;
unsigned long totalhigh_pages;
pte_t *kmap_pte; pte_t *kmap_pte;
pgprot_t kmap_prot; pgprot_t kmap_prot;
...@@ -505,18 +503,6 @@ void free_initrd_mem(unsigned long start, unsigned long end) ...@@ -505,18 +503,6 @@ void free_initrd_mem(unsigned long start, unsigned long end)
} }
#endif #endif
void si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = totalhigh_pages;
val->freehigh = nr_free_highpages();
val->mem_unit = PAGE_SIZE;
}
void flush_page_to_ram(struct page *page) void flush_page_to_ram(struct page *page)
{ {
unsigned long vaddr = (unsigned long)page_address(page); unsigned long vaddr = (unsigned long)page_address(page);
......
...@@ -1105,7 +1105,6 @@ static inline void map_kernel(void) ...@@ -1105,7 +1105,6 @@ static inline void map_kernel(void)
extern void sparc_context_init(int); extern void sparc_context_init(int);
extern int linux_num_cpus; extern int linux_num_cpus;
extern unsigned long totalhigh_pages;
void (*poke_srmmu)(void) __initdata = NULL; void (*poke_srmmu)(void) __initdata = NULL;
...@@ -2043,7 +2042,7 @@ void __init ld_mmu_srmmu(void) ...@@ -2043,7 +2042,7 @@ void __init ld_mmu_srmmu(void)
BTFIXUPSET_CALL(pgd_clear, srmmu_pgd_clear, BTFIXUPCALL_SWAPO0G0); BTFIXUPSET_CALL(pgd_clear, srmmu_pgd_clear, BTFIXUPCALL_SWAPO0G0);
BTFIXUPSET_CALL(mk_pte, srmmu_mk_pte, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(mk_pte, srmmu_mk_pte, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(mk_pte_phys, srmmu_mk_pte_phys, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(pfn_pte, srmmu_pfn_pte, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(mk_pte_io, srmmu_mk_pte_io, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(mk_pte_io, srmmu_mk_pte_io, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(pgd_set, srmmu_pgd_set, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(pgd_set, srmmu_pgd_set, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(pmd_set, srmmu_pmd_set, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(pmd_set, srmmu_pmd_set, BTFIXUPCALL_NORM);
......
...@@ -1327,7 +1327,7 @@ static __u32 sun4c_get_scsi_one(char *bufptr, unsigned long len, struct sbus_bus ...@@ -1327,7 +1327,7 @@ static __u32 sun4c_get_scsi_one(char *bufptr, unsigned long len, struct sbus_bus
unsigned long page; unsigned long page;
page = ((unsigned long)bufptr) & PAGE_MASK; page = ((unsigned long)bufptr) & PAGE_MASK;
if (!VALID_PAGE(virt_to_page(page))) { if (!virt_addr_valid(page)) {
sun4c_flush_page(page); sun4c_flush_page(page);
return (__u32)bufptr; /* already locked */ return (__u32)bufptr; /* already locked */
} }
...@@ -2106,7 +2106,7 @@ static void sun4c_pte_clear(pte_t *ptep) { *ptep = __pte(0); } ...@@ -2106,7 +2106,7 @@ static void sun4c_pte_clear(pte_t *ptep) { *ptep = __pte(0); }
static int sun4c_pmd_bad(pmd_t pmd) static int sun4c_pmd_bad(pmd_t pmd)
{ {
return (((pmd_val(pmd) & ~PAGE_MASK) != PGD_TABLE) || return (((pmd_val(pmd) & ~PAGE_MASK) != PGD_TABLE) ||
(!VALID_PAGE(virt_to_page(pmd_val(pmd))))); (!virt_addr_valid(pmd_val(pmd))));
} }
static int sun4c_pmd_present(pmd_t pmd) static int sun4c_pmd_present(pmd_t pmd)
...@@ -2526,7 +2526,7 @@ void __init ld_mmu_sun4c(void) ...@@ -2526,7 +2526,7 @@ void __init ld_mmu_sun4c(void)
BTFIXUPSET_CALL(pgd_clear, sun4c_pgd_clear, BTFIXUPCALL_NOP); BTFIXUPSET_CALL(pgd_clear, sun4c_pgd_clear, BTFIXUPCALL_NOP);
BTFIXUPSET_CALL(mk_pte, sun4c_mk_pte, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(mk_pte, sun4c_mk_pte, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(mk_pte_phys, sun4c_mk_pte_phys, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(pfn_pte, sun4c_pfn_pte, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(mk_pte_io, sun4c_mk_pte_io, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(mk_pte_io, sun4c_mk_pte_io, BTFIXUPCALL_NORM);
BTFIXUPSET_INT(pte_modify_mask, _SUN4C_PAGE_CHG_MASK); BTFIXUPSET_INT(pte_modify_mask, _SUN4C_PAGE_CHG_MASK);
......
...@@ -267,9 +267,7 @@ endmenu ...@@ -267,9 +267,7 @@ endmenu
source drivers/usb/Config.in source drivers/usb/Config.in
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then source net/bluetooth/Config.in
source net/bluetooth/Config.in
fi
mainmenu_option next_comment mainmenu_option next_comment
comment 'Watchdog' comment 'Watchdog'
......
...@@ -1312,10 +1312,8 @@ void cheetah_deferred_handler(struct pt_regs *regs, unsigned long afsr, unsigned ...@@ -1312,10 +1312,8 @@ void cheetah_deferred_handler(struct pt_regs *regs, unsigned long afsr, unsigned
} }
if (recoverable) { if (recoverable) {
struct page *page = virt_to_page(__va(afar)); if (pfn_valid(afar >> PAGE_SHIFT))
get_page(pfn_to_page(afar >> PAGE_SHIFT));
if (VALID_PAGE(page))
get_page(page);
else else
recoverable = 0; recoverable = 0;
......
...@@ -20,8 +20,12 @@ static inline void forget_pte(pte_t page) ...@@ -20,8 +20,12 @@ static inline void forget_pte(pte_t page)
if (pte_none(page)) if (pte_none(page))
return; return;
if (pte_present(page)) { if (pte_present(page)) {
struct page *ptpage = pte_page(page); unsigned long pfn = pte_pfn(page);
if ((!VALID_PAGE(ptpage)) || PageReserved(ptpage)) struct page *ptpage;
if (!pfn_valid(pfn))
return;
ptpage = pfn_to_page(page);
if (PageReserved(ptpage))
return; return;
page_cache_release(ptpage); page_cache_release(ptpage);
return; return;
......
...@@ -187,11 +187,13 @@ extern void __update_mmu_cache(unsigned long mmu_context_hw, unsigned long addre ...@@ -187,11 +187,13 @@ extern void __update_mmu_cache(unsigned long mmu_context_hw, unsigned long addre
void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte) void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte)
{ {
struct page *page = pte_page(pte); struct page *page;
unsigned long pfn;
unsigned long pg_flags; unsigned long pg_flags;
if (VALID_PAGE(page) && pfn = pte_pfn(pte);
page->mapping && if (pfn_valid(pfn) &&
(page = pfn_to_page(pfn), page->mapping) &&
((pg_flags = page->flags) & (1UL << PG_dcache_dirty))) { ((pg_flags = page->flags) & (1UL << PG_dcache_dirty))) {
int cpu = ((pg_flags >> 24) & (NR_CPUS - 1UL)); int cpu = ((pg_flags >> 24) & (NR_CPUS - 1UL));
...@@ -260,10 +262,14 @@ static inline void flush_cache_pte_range(struct mm_struct *mm, pmd_t *pmd, unsig ...@@ -260,10 +262,14 @@ static inline void flush_cache_pte_range(struct mm_struct *mm, pmd_t *pmd, unsig
continue; continue;
if (pte_present(pte) && pte_dirty(pte)) { if (pte_present(pte) && pte_dirty(pte)) {
struct page *page = pte_page(pte); struct page *page;
unsigned long pgaddr, uaddr; unsigned long pgaddr, uaddr;
unsigned long pfn = pte_pfn(pte);
if (!VALID_PAGE(page) || PageReserved(page) || !page->mapping) if (!pfn_valid(pfn))
continue;
page = pfn_to_page(pfn);
if (PageReserved(page) || !page->mapping)
continue; continue;
pgaddr = (unsigned long) page_address(page); pgaddr = (unsigned long) page_address(page);
uaddr = address + offset; uaddr = address + offset;
...@@ -1784,17 +1790,3 @@ void free_initrd_mem(unsigned long start, unsigned long end) ...@@ -1784,17 +1790,3 @@ void free_initrd_mem(unsigned long start, unsigned long end)
} }
} }
#endif #endif
void si_meminfo(struct sysinfo *val)
{
val->totalram = num_physpages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
/* These are always zero on Sparc64. */
val->totalhigh = 0;
val->freehigh = 0;
val->mem_unit = PAGE_SIZE;
}
...@@ -199,9 +199,7 @@ endmenu ...@@ -199,9 +199,7 @@ endmenu
source drivers/usb/Config.in source drivers/usb/Config.in
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then source net/bluetooth/Config.in
source net/bluetooth/Config.in
fi
mainmenu_option next_comment mainmenu_option next_comment
comment 'Kernel hacking' comment 'Kernel hacking'
......
...@@ -39,8 +39,6 @@ ...@@ -39,8 +39,6 @@
mmu_gather_t mmu_gathers[NR_CPUS]; mmu_gather_t mmu_gathers[NR_CPUS];
static unsigned long totalram_pages;
/* /*
* NOTE: pagetable_init alloc all the fixmap pagetables contiguous on the * NOTE: pagetable_init alloc all the fixmap pagetables contiguous on the
* physical space so we can cache the place of the first one and move * physical space so we can cache the place of the first one and move
...@@ -125,7 +123,7 @@ static void set_pte_phys(unsigned long vaddr, ...@@ -125,7 +123,7 @@ static void set_pte_phys(unsigned long vaddr,
pte = pte_offset_kernel(pmd, vaddr); pte = pte_offset_kernel(pmd, vaddr);
if (pte_val(*pte)) if (pte_val(*pte))
pte_ERROR(*pte); pte_ERROR(*pte);
set_pte(pte, mk_pte_phys(phys, prot)); set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, prot));
/* /*
* It's enough to flush this one mapping. * It's enough to flush this one mapping.
...@@ -385,15 +383,3 @@ void free_initrd_mem(unsigned long start, unsigned long end) ...@@ -385,15 +383,3 @@ void free_initrd_mem(unsigned long start, unsigned long end)
} }
} }
#endif #endif
void si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = 0;
val->freehigh = nr_free_highpages();
val->mem_unit = PAGE_SIZE;
return;
}
...@@ -20,6 +20,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -20,6 +20,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
unsigned long phys_addr, unsigned long flags) unsigned long phys_addr, unsigned long flags)
{ {
unsigned long end; unsigned long end;
unsigned long pfn;
address &= ~PMD_MASK; address &= ~PMD_MASK;
end = address + size; end = address + size;
...@@ -27,15 +28,16 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l ...@@ -27,15 +28,16 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned l
end = PMD_SIZE; end = PMD_SIZE;
if (address >= end) if (address >= end)
BUG(); BUG();
pfn = phys_addr >> PAGE_SHIFT;
do { do {
if (!pte_none(*pte)) { if (!pte_none(*pte)) {
printk("remap_area_pte: page already exists\n"); printk("remap_area_pte: page already exists\n");
BUG(); BUG();
} }
set_pte(pte, mk_pte_phys(phys_addr, __pgprot(_PAGE_PRESENT | _PAGE_RW | set_pte(pte, pfn_pte(pfn, __pgprot(_PAGE_PRESENT | _PAGE_RW |
_PAGE_GLOBAL | _PAGE_DIRTY | _PAGE_ACCESSED | flags))); _PAGE_GLOBAL | _PAGE_DIRTY | _PAGE_ACCESSED | flags)));
address += PAGE_SIZE; address += PAGE_SIZE;
phys_addr += PAGE_SIZE; pfn++;
pte++; pte++;
} while (address && (address < end)); } while (address && (address < end));
} }
......
...@@ -1598,9 +1598,11 @@ int submit_bh(int rw, struct buffer_head * bh) ...@@ -1598,9 +1598,11 @@ int submit_bh(int rw, struct buffer_head * bh)
BUG_ON(!bh->b_end_io); BUG_ON(!bh->b_end_io);
if ((rw == READ || rw == READA) && buffer_uptodate(bh)) if ((rw == READ || rw == READA) && buffer_uptodate(bh))
printk("%s: read of uptodate buffer\n", __FUNCTION__); buffer_error();
if (rw == WRITE && !buffer_uptodate(bh)) if (rw == WRITE && !buffer_uptodate(bh))
printk("%s: write of non-uptodate buffer\n", __FUNCTION__); buffer_error();
if (rw == READ && buffer_dirty(bh))
buffer_error();
set_buffer_req(bh); set_buffer_req(bh);
......
HCI UART driver
CONFIG_BLUEZ_HCIUART CONFIG_BLUEZ_HCIUART
Bluetooth HCI UART driver. Bluetooth HCI UART driver.
This driver is required if you want to use Bluetooth devices with This driver is required if you want to use Bluetooth devices with
serial port interface. serial port interface. You will also need this driver if you have
UART based Bluetooth PCMCIA and CF devices like Xircom Credit Card
adapter and BrainBoxes Bluetooth PC Card.
Say Y here to compile support for Bluetooth UART devices into the Say Y here to compile support for Bluetooth UART devices into the
kernel or say M to compile it as module (hci_uart.o). kernel or say M to compile it as module (hci_uart.o).
HCI UART (H4) protocol support
CONFIG_BLUEZ_HCIUART_H4
UART (H4) is serial protocol for communication between Bluetooth
device and host. This protocol is required for most UART based
Bluetooth device (including PCMCIA and CF).
Say Y here to compile support for HCI UART (H4) protocol.
HCI USB driver
CONFIG_BLUEZ_HCIUSB CONFIG_BLUEZ_HCIUSB
Bluetooth HCI USB driver. Bluetooth HCI USB driver.
This driver is required if you want to use Bluetooth devices with This driver is required if you want to use Bluetooth devices with
...@@ -14,6 +26,24 @@ CONFIG_BLUEZ_HCIUSB ...@@ -14,6 +26,24 @@ CONFIG_BLUEZ_HCIUSB
Say Y here to compile support for Bluetooth USB devices into the Say Y here to compile support for Bluetooth USB devices into the
kernel or say M to compile it as module (hci_usb.o). kernel or say M to compile it as module (hci_usb.o).
HCI USB firmware download support
CONFIG_BLUEZ_USB_FW_LOAD
Firmware download support for Bluetooth USB devices.
This support is required for devices like Broadcom BCM2033.
HCI USB driver uses external firmware downloader program provided
in BlueFW package.
For more information, see <http://bluez.sf.net/>.
HCI USB zero packet support
CONFIG_BLUEZ_USB_ZERO_PACKET
Support for USB zero packets.
This option is provided only as a work around for buggy Bluetooth USB
devices. Do _not_ enable it unless you know for sure that your device
requires zero packets.
Most people should say N here.
HCI VHCI Virtual HCI device driver
CONFIG_BLUEZ_HCIVHCI CONFIG_BLUEZ_HCIVHCI
Bluetooth Virtual HCI device driver. Bluetooth Virtual HCI device driver.
This driver is required if you want to use HCI Emulation software. This driver is required if you want to use HCI Emulation software.
...@@ -21,3 +51,24 @@ CONFIG_BLUEZ_HCIVHCI ...@@ -21,3 +51,24 @@ CONFIG_BLUEZ_HCIVHCI
Say Y here to compile support for virtual HCI devices into the Say Y here to compile support for virtual HCI devices into the
kernel or say M to compile it as module (hci_vhci.o). kernel or say M to compile it as module (hci_vhci.o).
HCI DTL1 (PC Card) device driver
CONFIG_BLUEZ_HCIDTL1
Bluetooth HCI DTL1 (PC Card) driver.
This driver provides support for Bluetooth PCMCIA devices with
Nokia DTL1 interface:
Nokia Bluetooth Card
Socket Bluetooth CF Card
Say Y here to compile support for HCI DTL1 devices into the
kernel or say M to compile it as module (dtl1_cs.o).
HCI BlueCard (PC Card) device driver
CONFIG_BLUEZ_HCIBLUECARD
Bluetooth HCI BlueCard (PC Card) driver.
This driver provides support for Bluetooth PCMCIA devices with
Anycom BlueCard interface:
Anycom Bluetooth PC Card
Anycom Bluetooth CF Card
Say Y here to compile support for HCI BlueCard devices into the
kernel or say M to compile it as module (bluecard_cs.o).
...@@ -2,7 +2,20 @@ mainmenu_option next_comment ...@@ -2,7 +2,20 @@ mainmenu_option next_comment
comment 'Bluetooth device drivers' comment 'Bluetooth device drivers'
dep_tristate 'HCI USB driver' CONFIG_BLUEZ_HCIUSB $CONFIG_BLUEZ $CONFIG_USB dep_tristate 'HCI USB driver' CONFIG_BLUEZ_HCIUSB $CONFIG_BLUEZ $CONFIG_USB
if [ "$CONFIG_BLUEZ_HCIUSB" != "n" ]; then
bool ' Firmware download support' CONFIG_BLUEZ_USB_FW_LOAD
bool ' USB zero packet support' CONFIG_BLUEZ_USB_ZERO_PACKET
fi
dep_tristate 'HCI UART driver' CONFIG_BLUEZ_HCIUART $CONFIG_BLUEZ dep_tristate 'HCI UART driver' CONFIG_BLUEZ_HCIUART $CONFIG_BLUEZ
dep_tristate 'HCI VHCI virtual HCI device driver' CONFIG_BLUEZ_HCIVHCI $CONFIG_BLUEZ if [ "$CONFIG_BLUEZ_HCIUART" != "n" ]; then
bool ' UART (H4) protocol support' CONFIG_BLUEZ_HCIUART_H4
fi
dep_tristate 'HCI DTL1 (PC Card) driver' CONFIG_BLUEZ_HCIDTL1 $CONFIG_PCMCIA $CONFIG_BLUEZ
dep_tristate 'HCI BlueCard (PC Card) driver' CONFIG_BLUEZ_HCIBLUECARD $CONFIG_PCMCIA $CONFIG_BLUEZ
dep_tristate 'HCI VHCI (Virtual HCI device) driver' CONFIG_BLUEZ_HCIVHCI $CONFIG_BLUEZ
endmenu endmenu
...@@ -4,8 +4,19 @@ ...@@ -4,8 +4,19 @@
O_TARGET := bluetooth.o O_TARGET := bluetooth.o
list-multi := hci_uart.o
obj-$(CONFIG_BLUEZ_HCIUSB) += hci_usb.o obj-$(CONFIG_BLUEZ_HCIUSB) += hci_usb.o
obj-$(CONFIG_BLUEZ_HCIUART) += hci_uart.o
obj-$(CONFIG_BLUEZ_HCIVHCI) += hci_vhci.o obj-$(CONFIG_BLUEZ_HCIVHCI) += hci_vhci.o
obj-$(CONFIG_BLUEZ_HCIUART) += hci_uart.o
uart-y := hci_ldisc.o
uart-$(CONFIG_BLUEZ_HCIUART_H4) += hci_h4.o
obj-$(CONFIG_BLUEZ_HCIDTL1) += dtl1_cs.o
obj-$(CONFIG_BLUEZ_HCIBLUECARD) += bluecard_cs.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
hci_uart.o: $(uart-y)
$(LD) -r -o $@ $(uart-y)
This diff is collapsed.
This diff is collapsed.
/*
BlueZ - Bluetooth protocol stack for Linux
Copyright (C) 2000-2001 Qualcomm Incorporated
Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation;
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
SOFTWARE IS DISCLAIMED.
*/
/*
* BlueZ HCI UART(H4) protocol.
*
* $Id: hci_h4.c,v 1.2 2002/04/17 17:37:20 maxk Exp $
*/
#define VERSION "1.1"
#include <linux/config.h>
#include <linux/module.h>
#include <linux/version.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <linux/ptrace.h>
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/signal.h>
#include <linux/ioctl.h>
#include <linux/skbuff.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include "hci_uart.h"
#include "hci_h4.h"
#ifndef HCI_UART_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#undef BT_DMP
#define BT_DMP( A... )
#endif
/* Initialize protocol */
static int h4_open(struct n_hci *n_hci)
{
struct h4_struct *h4;
BT_DBG("n_hci %p", n_hci);
h4 = kmalloc(sizeof(*h4), GFP_ATOMIC);
if (!h4)
return -ENOMEM;
memset(h4, 0, sizeof(*h4));
n_hci->priv = h4;
return 0;
}
/* Flush protocol data */
static int h4_flush(struct n_hci *n_hci)
{
BT_DBG("n_hci %p", n_hci);
return 0;
}
/* Close protocol */
static int h4_close(struct n_hci *n_hci)
{
struct h4_struct *h4 = n_hci->priv;
n_hci->priv = NULL;
BT_DBG("n_hci %p", n_hci);
if (h4->rx_skb)
kfree_skb(h4->rx_skb);
kfree(h4);
return 0;
}
/* Send data */
static int h4_send(struct n_hci *n_hci, void *data, int len)
{
struct tty_struct *tty = n_hci->tty;
BT_DBG("n_hci %p len %d", n_hci, len);
/* Send frame to TTY driver */
tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
return tty->driver.write(tty, 0, data, len);
}
/* Init frame before queueing (padding, crc, etc) */
static struct sk_buff* h4_preq(struct n_hci *n_hci, struct sk_buff *skb)
{
BT_DBG("n_hci %p skb %p", n_hci, skb);
/* Prepend skb with frame type */
memcpy(skb_push(skb, 1), &skb->pkt_type, 1);
return skb;
}
static inline int h4_check_data_len(struct h4_struct *h4, int len)
{
register int room = skb_tailroom(h4->rx_skb);
BT_DBG("len %d room %d", len, room);
if (!len) {
BT_DMP(h4->rx_skb->data, h4->rx_skb->len);
hci_recv_frame(h4->rx_skb);
} else if (len > room) {
BT_ERR("Data length is to large");
kfree_skb(h4->rx_skb);
} else {
h4->rx_state = H4_W4_DATA;
h4->rx_count = len;
return len;
}
h4->rx_state = H4_W4_PACKET_TYPE;
h4->rx_skb = NULL;
h4->rx_count = 0;
return 0;
}
/* Recv data */
static int h4_recv(struct n_hci *n_hci, void *data, int count)
{
struct h4_struct *h4 = n_hci->priv;
register char *ptr;
hci_event_hdr *eh;
hci_acl_hdr *ah;
hci_sco_hdr *sh;
register int len, type, dlen;
BT_DBG("n_hci %p count %d rx_state %ld rx_count %ld", n_hci, count, h4->rx_state, h4->rx_count);
ptr = data;
while (count) {
if (h4->rx_count) {
len = MIN(h4->rx_count, count);
memcpy(skb_put(h4->rx_skb, len), ptr, len);
h4->rx_count -= len; count -= len; ptr += len;
if (h4->rx_count)
continue;
switch (h4->rx_state) {
case H4_W4_DATA:
BT_DBG("Complete data");
BT_DMP(h4->rx_skb->data, h4->rx_skb->len);
hci_recv_frame(h4->rx_skb);
h4->rx_state = H4_W4_PACKET_TYPE;
h4->rx_skb = NULL;
continue;
case H4_W4_EVENT_HDR:
eh = (hci_event_hdr *) h4->rx_skb->data;
BT_DBG("Event header: evt 0x%2.2x plen %d", eh->evt, eh->plen);
h4_check_data_len(h4, eh->plen);
continue;
case H4_W4_ACL_HDR:
ah = (hci_acl_hdr *) h4->rx_skb->data;
dlen = __le16_to_cpu(ah->dlen);
BT_DBG("ACL header: dlen %d", dlen);
h4_check_data_len(h4, dlen);
continue;
case H4_W4_SCO_HDR:
sh = (hci_sco_hdr *) h4->rx_skb->data;
BT_DBG("SCO header: dlen %d", sh->dlen);
h4_check_data_len(h4, sh->dlen);
continue;
};
}
/* H4_W4_PACKET_TYPE */
switch (*ptr) {
case HCI_EVENT_PKT:
BT_DBG("Event packet");
h4->rx_state = H4_W4_EVENT_HDR;
h4->rx_count = HCI_EVENT_HDR_SIZE;
type = HCI_EVENT_PKT;
break;
case HCI_ACLDATA_PKT:
BT_DBG("ACL packet");
h4->rx_state = H4_W4_ACL_HDR;
h4->rx_count = HCI_ACL_HDR_SIZE;
type = HCI_ACLDATA_PKT;
break;
case HCI_SCODATA_PKT:
BT_DBG("SCO packet");
h4->rx_state = H4_W4_SCO_HDR;
h4->rx_count = HCI_SCO_HDR_SIZE;
type = HCI_SCODATA_PKT;
break;
default:
BT_ERR("Unknown HCI packet type %2.2x", (__u8)*ptr);
n_hci->hdev.stat.err_rx++;
ptr++; count--;
continue;
};
ptr++; count--;
/* Allocate packet */
h4->rx_skb = bluez_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC);
if (!h4->rx_skb) {
BT_ERR("Can't allocate mem for new packet");
h4->rx_state = H4_W4_PACKET_TYPE;
h4->rx_count = 0;
return 0;
}
h4->rx_skb->dev = (void *) &n_hci->hdev;
h4->rx_skb->pkt_type = type;
}
return count;
}
static struct hci_uart_proto h4p = {
id: HCI_UART_H4,
open: h4_open,
close: h4_close,
send: h4_send,
recv: h4_recv,
preq: h4_preq,
flush: h4_flush,
};
int h4_init(void)
{
return hci_uart_register_proto(&h4p);
}
int h4_deinit(void)
{
return hci_uart_unregister_proto(&h4p);
}
...@@ -23,40 +23,21 @@ ...@@ -23,40 +23,21 @@
*/ */
/* /*
* $Id: hci_uart.h,v 1.2 2001/06/02 01:40:08 maxk Exp $ * $Id: hci_h4.h,v 1.1.1.1 2002/03/08 21:03:15 maxk Exp $
*/ */
#ifndef N_HCI
#define N_HCI 15
#endif
#ifdef __KERNEL__ #ifdef __KERNEL__
struct h4_struct {
#define tty2n_hci(tty) ((struct n_hci *)((tty)->disc_data))
#define n_hci2tty(n_hci) ((n_hci)->tty)
struct n_hci {
struct tty_struct *tty;
struct hci_dev hdev;
struct sk_buff_head txq;
unsigned long tx_state;
spinlock_t rx_lock;
unsigned long rx_state; unsigned long rx_state;
unsigned long rx_count; unsigned long rx_count;
struct sk_buff *rx_skb; struct sk_buff *rx_skb;
}; };
/* Transmit states */ /* H4 receiver States */
#define TRANS_SENDING 1 #define H4_W4_PACKET_TYPE 0
#define TRANS_WAKEUP 2 #define H4_W4_EVENT_HDR 1
#define H4_W4_ACL_HDR 2
/* Receiver States */ #define H4_W4_SCO_HDR 3
#define WAIT_PACKET_TYPE 0 #define H4_W4_DATA 4
#define WAIT_EVENT_HDR 1
#define WAIT_ACL_HDR 2
#define WAIT_SCO_HDR 3
#define WAIT_DATA 4
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
/*
BlueZ - Bluetooth protocol stack for Linux
Copyright (C) 2000-2001 Qualcomm Incorporated
Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation;
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
SOFTWARE IS DISCLAIMED.
*/
/*
* $Id: hci_uart.h,v 1.1.1.1 2002/03/08 21:03:15 maxk Exp $
*/
#ifndef N_HCI
#define N_HCI 15
#endif
/* Ioctls */
#define HCIUARTSETPROTO _IOW('U', 200, int)
#define HCIUARTGETPROTO _IOR('U', 201, int)
/* UART protocols */
#define HCI_UART_MAX_PROTO 3
#define HCI_UART_H4 0
#define HCI_UART_BCSP 1
#define HCI_UART_NCSP 2
#ifdef __KERNEL__
struct n_hci;
struct hci_uart_proto {
unsigned int id;
int (*open)(struct n_hci *n_hci);
int (*recv)(struct n_hci *n_hci, void *data, int len);
int (*send)(struct n_hci *n_hci, void *data, int len);
int (*close)(struct n_hci *n_hci);
int (*flush)(struct n_hci *n_hci);
struct sk_buff* (*preq)(struct n_hci *n_hci, struct sk_buff *skb);
};
struct n_hci {
struct tty_struct *tty;
struct hci_dev hdev;
unsigned long flags;
struct hci_uart_proto *proto;
void *priv;
struct sk_buff_head txq;
unsigned long tx_state;
spinlock_t rx_lock;
};
/* N_HCI flag bits */
#define N_HCI_PROTO_SET 0x00
/* TX states */
#define N_HCI_SENDING 1
#define N_HCI_TX_WAKEUP 2
int hci_uart_register_proto(struct hci_uart_proto *p);
int hci_uart_unregister_proto(struct hci_uart_proto *p);
#endif /* __KERNEL__ */
This diff is collapsed.
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
*/ */
/* /*
* $Id: hci_usb.h,v 1.3 2001/06/02 01:40:08 maxk Exp $ * $Id: hci_usb.h,v 1.2 2002/03/18 19:10:04 maxk Exp $
*/ */
#ifdef __KERNEL__ #ifdef __KERNEL__
...@@ -35,34 +35,45 @@ ...@@ -35,34 +35,45 @@
#define HCI_CTRL_REQ 0x20 #define HCI_CTRL_REQ 0x20
#define HCI_MAX_IFACE_NUM 3
#define HCI_MAX_BULK_TX 4
#define HCI_MAX_BULK_RX 1
struct hci_usb { struct hci_usb {
struct hci_dev hdev;
unsigned long state;
struct usb_device *udev; struct usb_device *udev;
struct usb_interface *isoc_iface;
struct usb_ctrlrequest dev_req; __u8 bulk_out_ep;
struct urb *ctrl_urb; __u8 bulk_in_ep;
struct urb *intr_urb; __u8 isoc_out_ep;
struct urb *read_urb; __u8 isoc_in_ep;
struct urb *write_urb;
__u8 *read_buf; __u8 intr_ep;
__u8 *intr_buf; __u8 intr_interval;
struct sk_buff *intr_skb; struct urb * intr_urb;
int intr_count; struct sk_buff * intr_skb;
__u8 bulk_out_ep_addr; rwlock_t completion_lock;
__u8 bulk_in_ep_addr;
__u8 intr_in_ep_addr;
__u8 intr_in_interval;
struct hci_dev hdev; struct sk_buff_head cmd_q; // TX Commands
struct sk_buff_head acl_q; // TX ACLs
struct sk_buff_head pending_q; // Pending requests
struct sk_buff_head completed_q; // Completed requests
};
unsigned long tx_state; struct hci_usb_scb {
struct sk_buff_head tx_ctrl_q; struct urb *urb;
struct sk_buff_head tx_write_q; int intr_len;
}; };
/* Transmit states */ /* States */
#define HCI_TX_CTRL 1 #define HCI_USB_TX_PROCESS 1
#define HCI_TX_WRITE 2 #define HCI_USB_TX_WAKEUP 2
#define HCI_USB_CTRL_TX 3
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
/* /*
* BlueZ HCI virtual device driver. * BlueZ HCI virtual device driver.
* *
* $Id: hci_vhci.c,v 1.3 2001/08/03 04:19:50 maxk Exp $ * $Id: hci_vhci.c,v 1.3 2002/04/17 17:37:20 maxk Exp $
*/ */
#define VERSION "1.0" #define VERSION "1.1"
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -49,43 +49,56 @@ ...@@ -49,43 +49,56 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluez.h>
#include <net/bluetooth/hci_core.h> #include <net/bluetooth/hci_core.h>
#include <net/bluetooth/hci_vhci.h> #include "hci_vhci.h"
/* HCI device part */ /* HCI device part */
int hci_vhci_open(struct hci_dev *hdev) static int hci_vhci_open(struct hci_dev *hdev)
{ {
hdev->flags |= HCI_RUNNING; set_bit(HCI_RUNNING, &hdev->flags);
return 0; return 0;
} }
int hci_vhci_flush(struct hci_dev *hdev) static int hci_vhci_flush(struct hci_dev *hdev)
{ {
struct hci_vhci_struct *hci_vhci = (struct hci_vhci_struct *) hdev->driver_data; struct hci_vhci_struct *hci_vhci = (struct hci_vhci_struct *) hdev->driver_data;
skb_queue_purge(&hci_vhci->readq); skb_queue_purge(&hci_vhci->readq);
return 0; return 0;
} }
int hci_vhci_close(struct hci_dev *hdev) static int hci_vhci_close(struct hci_dev *hdev)
{ {
hdev->flags &= ~HCI_RUNNING; if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
return 0;
hci_vhci_flush(hdev); hci_vhci_flush(hdev);
return 0; return 0;
} }
int hci_vhci_send_frame(struct sk_buff *skb) static void hci_vhci_destruct(struct hci_dev *hdev)
{
struct hci_vhci_struct *vhci;
if (!hdev) return;
vhci = (struct hci_vhci_struct *) hdev->driver_data;
kfree(vhci);
MOD_DEC_USE_COUNT;
}
static int hci_vhci_send_frame(struct sk_buff *skb)
{ {
struct hci_dev* hdev = (struct hci_dev *) skb->dev; struct hci_dev* hdev = (struct hci_dev *) skb->dev;
struct hci_vhci_struct *hci_vhci; struct hci_vhci_struct *hci_vhci;
if (!hdev) { if (!hdev) {
ERR("Frame for uknown device (hdev=NULL)"); BT_ERR("Frame for uknown device (hdev=NULL)");
return -ENODEV; return -ENODEV;
} }
if (!(hdev->flags & HCI_RUNNING)) if (!test_bit(HCI_RUNNING, &hdev->flags))
return -EBUSY; return -EBUSY;
hci_vhci = (struct hci_vhci_struct *) hdev->driver_data; hci_vhci = (struct hci_vhci_struct *) hdev->driver_data;
...@@ -188,7 +201,7 @@ static ssize_t hci_vhci_chr_read(struct file * file, char * buf, size_t count, l ...@@ -188,7 +201,7 @@ static ssize_t hci_vhci_chr_read(struct file * file, char * buf, size_t count, l
add_wait_queue(&hci_vhci->read_wait, &wait); add_wait_queue(&hci_vhci->read_wait, &wait);
while (count) { while (count) {
current->state = TASK_INTERRUPTIBLE; set_current_state(TASK_INTERRUPTIBLE);
/* Read frames from device queue */ /* Read frames from device queue */
if (!(skb = skb_dequeue(&hci_vhci->readq))) { if (!(skb = skb_dequeue(&hci_vhci->readq))) {
...@@ -214,13 +227,17 @@ static ssize_t hci_vhci_chr_read(struct file * file, char * buf, size_t count, l ...@@ -214,13 +227,17 @@ static ssize_t hci_vhci_chr_read(struct file * file, char * buf, size_t count, l
kfree_skb(skb); kfree_skb(skb);
break; break;
} }
set_current_state(TASK_RUNNING);
current->state = TASK_RUNNING;
remove_wait_queue(&hci_vhci->read_wait, &wait); remove_wait_queue(&hci_vhci->read_wait, &wait);
return ret; return ret;
} }
static loff_t hci_vhci_chr_lseek(struct file * file, loff_t offset, int origin)
{
return -ESPIPE;
}
static int hci_vhci_chr_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) static int hci_vhci_chr_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
{ {
return -EINVAL; return -EINVAL;
...@@ -265,11 +282,13 @@ static int hci_vhci_chr_open(struct inode *inode, struct file * file) ...@@ -265,11 +282,13 @@ static int hci_vhci_chr_open(struct inode *inode, struct file * file)
hdev->close = hci_vhci_close; hdev->close = hci_vhci_close;
hdev->flush = hci_vhci_flush; hdev->flush = hci_vhci_flush;
hdev->send = hci_vhci_send_frame; hdev->send = hci_vhci_send_frame;
hdev->destruct = hci_vhci_destruct;
if (hci_register_dev(hdev) < 0) { if (hci_register_dev(hdev) < 0) {
kfree(hci_vhci); kfree(hci_vhci);
return -EBUSY; return -EBUSY;
} }
MOD_INC_USE_COUNT;
file->private_data = hci_vhci; file->private_data = hci_vhci;
return 0; return 0;
...@@ -280,18 +299,16 @@ static int hci_vhci_chr_close(struct inode *inode, struct file *file) ...@@ -280,18 +299,16 @@ static int hci_vhci_chr_close(struct inode *inode, struct file *file)
struct hci_vhci_struct *hci_vhci = (struct hci_vhci_struct *) file->private_data; struct hci_vhci_struct *hci_vhci = (struct hci_vhci_struct *) file->private_data;
if (hci_unregister_dev(&hci_vhci->hdev) < 0) { if (hci_unregister_dev(&hci_vhci->hdev) < 0) {
ERR("Can't unregister HCI device %s", hci_vhci->hdev.name); BT_ERR("Can't unregister HCI device %s", hci_vhci->hdev.name);
} }
kfree(hci_vhci);
file->private_data = NULL; file->private_data = NULL;
return 0; return 0;
} }
static struct file_operations hci_vhci_fops = { static struct file_operations hci_vhci_fops = {
owner: THIS_MODULE, owner: THIS_MODULE,
llseek: no_llseek, llseek: hci_vhci_chr_lseek,
read: hci_vhci_chr_read, read: hci_vhci_chr_read,
write: hci_vhci_chr_write, write: hci_vhci_chr_write,
poll: hci_vhci_chr_poll, poll: hci_vhci_chr_poll,
...@@ -310,12 +327,12 @@ static struct miscdevice hci_vhci_miscdev= ...@@ -310,12 +327,12 @@ static struct miscdevice hci_vhci_miscdev=
int __init hci_vhci_init(void) int __init hci_vhci_init(void)
{ {
INF("BlueZ VHCI driver ver %s Copyright (C) 2000,2001 Qualcomm Inc", BT_INFO("BlueZ VHCI driver ver %s Copyright (C) 2000,2001 Qualcomm Inc",
VERSION); VERSION);
INF("Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>"); BT_INFO("Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>");
if (misc_register(&hci_vhci_miscdev)) { if (misc_register(&hci_vhci_miscdev)) {
ERR("Can't register misc device %d\n", VHCI_MINOR); BT_ERR("Can't register misc device %d\n", VHCI_MINOR);
return -EIO; return -EIO;
} }
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
*/ */
/* /*
* $Id: hci_vhci.h,v 1.2 2001/08/01 01:02:20 maxk Exp $ * $Id: hci_vhci.h,v 1.1.1.1 2002/03/08 21:03:15 maxk Exp $
*/ */
#ifndef __HCI_VHCI_H #ifndef __HCI_VHCI_H
......
This diff is collapsed.
/* /*
* i810-tco 0.02: TCO timer driver for i810 chipsets * i810-tco 0.04: TCO timer driver for i8xx chipsets
* *
* (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>, All Rights Reserved. * (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>, All Rights Reserved.
* http://www.kernelconcepts.de * http://www.kernelconcepts.de
...@@ -17,12 +17,14 @@ ...@@ -17,12 +17,14 @@
* developed for * developed for
* Jentro AG, Haar/Munich (Germany) * Jentro AG, Haar/Munich (Germany)
* *
* TCO timer driver for i810 chipsets * TCO timer driver for i8xx chipsets
* based on softdog.c by Alan Cox <alan@redhat.com> * based on softdog.c by Alan Cox <alan@redhat.com>
* *
* The TCO timer is implemented in the 82801AA (82801AB) chip, * The TCO timer is implemented in the following I/O controller hubs:
* see intel documentation from http://developer.intel.com, * (See the intel documentation on http://developer.intel.com.)
* order number 290655-003 * 82801AA & 82801AB chip : document number 290655-003, 290677-004,
* 82801BA & 82801BAM chip : document number 290687-002, 298242-005,
* 82801CA & 82801CAM chip : document number 290716-001, 290718-001
* *
* For history see i810-tco.c * For history see i810-tco.c
*/ */
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
/* /*
* core module and version information * core module and version information
*/ */
#define RNG_VERSION "0.9.7" #define RNG_VERSION "0.9.8"
#define RNG_MODULE_NAME "i810_rng" #define RNG_MODULE_NAME "i810_rng"
#define RNG_DRIVER_NAME RNG_MODULE_NAME " hardware driver " RNG_VERSION #define RNG_DRIVER_NAME RNG_MODULE_NAME " hardware driver " RNG_VERSION
#define PFX RNG_MODULE_NAME ": " #define PFX RNG_MODULE_NAME ": "
...@@ -336,6 +336,7 @@ static struct pci_device_id rng_pci_tbl[] __initdata = { ...@@ -336,6 +336,7 @@ static struct pci_device_id rng_pci_tbl[] __initdata = {
{ 0x8086, 0x2428, PCI_ANY_ID, PCI_ANY_ID, }, { 0x8086, 0x2428, PCI_ANY_ID, PCI_ANY_ID, },
{ 0x8086, 0x2448, PCI_ANY_ID, PCI_ANY_ID, }, { 0x8086, 0x2448, PCI_ANY_ID, PCI_ANY_ID, },
{ 0x8086, 0x244e, PCI_ANY_ID, PCI_ANY_ID, }, { 0x8086, 0x244e, PCI_ANY_ID, PCI_ANY_ID, },
{ 0x8086, 0x245e, PCI_ANY_ID, PCI_ANY_ID, },
{ 0, }, { 0, },
}; };
MODULE_DEVICE_TABLE (pci, rng_pci_tbl); MODULE_DEVICE_TABLE (pci, rng_pci_tbl);
......
...@@ -751,6 +751,37 @@ CONFIG_IDEDMA_ONLYDISK ...@@ -751,6 +751,37 @@ CONFIG_IDEDMA_ONLYDISK
Generally say N here. Generally say N here.
CONFIG_BLK_DEV_IDE_TCQ
Support for tagged command queueing on ATA disk drives. This enables
the IDE layer to have multiple in-flight requests on hardware that
supports it. For now this includes the IBM Deskstar series drives,
such as the 22GXP, 75GXP, 40GV, 60GXP, and 120GXP (ie any Deskstar made
in the last couple of years), and at least some of the Western
Digital drives in the Expert series (by nature of really being IBM
drives).
If you have such a drive, say Y here.
CONFIG_BLK_DEV_IDE_TCQ_DEPTH
Maximum size of commands to enable per-drive. Any value between 1
and 32 is valid, with 32 being the maxium that the hardware supports.
You probably just want the default of 32 here. If you enter an invalid
number, the default value will be used.
CONFIG_BLK_DEV_IDE_TCQ_DEFAULT
Enabled tagged command queueing unconditionally on drives that report
support for it. Regardless of the chosen value here, tagging can be
controlled at run time:
echo "using_tcq:32" > /proc/ide/hdX/settings
where any value between 1-32 selects chosen queue depth and enables
TCQ, and 0 disables it. hdparm version 4.7 an above also support
TCQ manipulations.
Generally say Y here.
CONFIG_BLK_DEV_IT8172 CONFIG_BLK_DEV_IT8172
Say Y here to support the on-board IDE controller on the Integrated Say Y here to support the on-board IDE controller on the Integrated
Technology Express, Inc. ITE8172 SBC. Vendor page at Technology Express, Inc. ITE8172 SBC. Vendor page at
......
...@@ -33,20 +33,25 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then ...@@ -33,20 +33,25 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
dep_tristate ' Include IDE/ATAPI FLOPPY support' CONFIG_BLK_DEV_IDEFLOPPY $CONFIG_BLK_DEV_IDE dep_tristate ' Include IDE/ATAPI FLOPPY support' CONFIG_BLK_DEV_IDEFLOPPY $CONFIG_BLK_DEV_IDE
dep_tristate ' SCSI emulation support' CONFIG_BLK_DEV_IDESCSI $CONFIG_BLK_DEV_IDE $CONFIG_SCSI dep_tristate ' SCSI emulation support' CONFIG_BLK_DEV_IDESCSI $CONFIG_BLK_DEV_IDE $CONFIG_SCSI
comment 'IDE chipset support' comment 'ATA host chipset support'
dep_bool ' CMD640 chipset bugfix/support' CONFIG_BLK_DEV_CMD640 $CONFIG_X86 dep_bool ' CMD640 chipset bugfix/support' CONFIG_BLK_DEV_CMD640 $CONFIG_X86
dep_bool ' CMD640 enhanced support' CONFIG_BLK_DEV_CMD640_ENHANCED $CONFIG_BLK_DEV_CMD640 dep_bool ' CMD640 enhanced support' CONFIG_BLK_DEV_CMD640_ENHANCED $CONFIG_BLK_DEV_CMD640
dep_bool ' ISA-PNP EIDE support' CONFIG_BLK_DEV_ISAPNP $CONFIG_ISAPNP dep_bool ' ISA-PNP support' CONFIG_BLK_DEV_ISAPNP $CONFIG_ISAPNP
if [ "$CONFIG_PCI" = "y" ]; then if [ "$CONFIG_PCI" = "y" ]; then
dep_bool ' RZ1000 chipset bugfix/support' CONFIG_BLK_DEV_RZ1000 $CONFIG_X86 dep_bool ' RZ1000 chipset bugfix/support' CONFIG_BLK_DEV_RZ1000 $CONFIG_X86
bool ' Generic PCI IDE chipset support' CONFIG_BLK_DEV_IDEPCI bool ' PCI host chipset support' CONFIG_BLK_DEV_IDEPCI
if [ "$CONFIG_BLK_DEV_IDEPCI" = "y" ]; then if [ "$CONFIG_BLK_DEV_IDEPCI" = "y" ]; then
bool ' Boot off-board chipsets first support' CONFIG_BLK_DEV_OFFBOARD bool ' Boot off-board chipsets first support' CONFIG_BLK_DEV_OFFBOARD
bool ' Sharing PCI IDE interrupts support' CONFIG_IDEPCI_SHARE_IRQ bool ' Sharing PCI ATA interrupts support' CONFIG_IDEPCI_SHARE_IRQ
bool ' Generic PCI bus-master DMA support' CONFIG_BLK_DEV_IDEDMA_PCI bool ' Generic PCI bus-master DMA support' CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Use PCI DMA by default when available' CONFIG_IDEDMA_PCI_AUTO $CONFIG_BLK_DEV_IDEDMA_PCI dep_bool ' Use PCI DMA by default when available' CONFIG_IDEDMA_PCI_AUTO $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Enable DMA only for disks ' CONFIG_IDEDMA_ONLYDISK $CONFIG_IDEDMA_PCI_AUTO dep_bool ' Enable DMA only for disks ' CONFIG_IDEDMA_ONLYDISK $CONFIG_IDEDMA_PCI_AUTO
define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_PCI define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' ATA tagged command queueing (EXPERIMENTAL)' CONFIG_BLK_DEV_IDE_TCQ $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_EXPERIMENTAL
dep_bool ' TCQ on by default' CONFIG_BLK_DEV_IDE_TCQ_DEFAULT $CONFIG_BLK_DEV_IDE_TCQ
if [ "$CONFIG_BLK_DEV_IDE_TCQ" != "n" ]; then
int ' Default queue depth' CONFIG_BLK_DEV_IDE_TCQ_DEPTH 32
fi
dep_bool ' Good-Bad DMA Model-Firmware (EXPERIMENTAL)' CONFIG_IDEDMA_NEW_DRIVE_LISTINGS $CONFIG_EXPERIMENTAL dep_bool ' Good-Bad DMA Model-Firmware (EXPERIMENTAL)' CONFIG_IDEDMA_NEW_DRIVE_LISTINGS $CONFIG_EXPERIMENTAL
dep_bool ' AEC62XX chipset support' CONFIG_BLK_DEV_AEC62XX $CONFIG_BLK_DEV_IDEDMA_PCI dep_bool ' AEC62XX chipset support' CONFIG_BLK_DEV_AEC62XX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' AEC62XX Tuning support' CONFIG_AEC62XX_TUNING $CONFIG_BLK_DEV_AEC62XX dep_mbool ' AEC62XX Tuning support' CONFIG_AEC62XX_TUNING $CONFIG_BLK_DEV_AEC62XX
...@@ -77,11 +82,9 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then ...@@ -77,11 +82,9 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
dep_bool ' SiS5513 chipset support' CONFIG_BLK_DEV_SIS5513 $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86 dep_bool ' SiS5513 chipset support' CONFIG_BLK_DEV_SIS5513 $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86
dep_bool ' Tekram TRM290 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_TRM290 $CONFIG_BLK_DEV_IDEDMA_PCI dep_bool ' Tekram TRM290 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_TRM290 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' VIA chipset support' CONFIG_BLK_DEV_VIA82CXXX $CONFIG_BLK_DEV_IDEDMA_PCI dep_bool ' VIA chipset support' CONFIG_BLK_DEV_VIA82CXXX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Winbond SL82c105 support' CONFIG_BLK_DEV_SL82C105 $CONFIG_BLK_DEV_IDEDMA_PCI
fi fi
if [ "$CONFIG_PPC" = "y" -o "$CONFIG_ARM" = "y" ]; then
bool ' Winbond SL82c105 support' CONFIG_BLK_DEV_SL82C105
fi
fi fi
if [ "$CONFIG_ALL_PPC" = "y" ]; then if [ "$CONFIG_ALL_PPC" = "y" ]; then
bool ' Builtin PowerMac IDE support' CONFIG_BLK_DEV_IDE_PMAC bool ' Builtin PowerMac IDE support' CONFIG_BLK_DEV_IDE_PMAC
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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