Skip to content

Commit

Permalink
[MIPS] Drop 0 definition for kern_addr_valid
Browse files Browse the repository at this point in the history
kern_addr_valid is currently only being used in kmem_ptr_validate which
is making some vague attempt at verfying the validity of an address.
Only IA-64, PARISC and x86-64 actually make some actual effort to verify
the validity of the pointer.  Most architecture definitions of
kern_addr_valid() just define it as 1; the Alpha and CONFIG_DISCONTIGMEM
on i386 and MIPS even as 0; the 0-definition will result in
kmem_ptr_validate always failing which in turn will cause d_validate to
always fail.  d_validate's only two users are smbfs and ncpfs, so the
0 definition ended breaking those ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Jun 19, 2006
1 parent e53639d commit d9b8d0d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions include/asm-mips/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
#define kvaddr_to_nid(kvaddr) pa_to_nid(__pa(kvaddr))
#define pfn_to_nid(pfn) pa_to_nid((pfn) << PAGE_SHIFT)

/* XXX: FIXME -- wli */
#define kern_addr_valid(addr) (0)

#endif /* CONFIG_DISCONTIGMEM */

#endif /* _ASM_MMZONE_H_ */
2 changes: 0 additions & 2 deletions include/asm-mips/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
__update_cache(vma, address, pte);
}

#ifndef CONFIG_NEED_MULTIPLE_NODES
#define kern_addr_valid(addr) (1)
#endif

#ifdef CONFIG_64BIT_PHYS_ADDR
extern int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn, unsigned long size, pgprot_t prot);
Expand Down

0 comments on commit d9b8d0d

Please sign in to comment.