Skip to content

Commit

Permalink
MIPS: Change type of asid_cache to unsigned long
Browse files Browse the repository at this point in the history
asid_cache must be unsigned long otherwise on 64 bit systems it will
become 0 if the value in get_new_mmu_context() reaches 0xffffffff and
in the end the assumption of ASID_FIRST_VERSION is not true anymore
thus leads to more dangerous things.

Initial patch by Yong Zhang <yong.zhang@windriver.com>

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: libin <huawei.libin@huawei.com>
  • Loading branch information
Ralf Baechle committed May 21, 2014
1 parent 60b5f90 commit e5eb925
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/mips/include/asm/cpu-info.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ struct cache_desc {
#define MIPS_CACHE_PINDEX 0x00000020 /* Physically indexed cache */

struct cpuinfo_mips {
unsigned int udelay_val;
unsigned int asid_cache;
unsigned long asid_cache;

/*
* Capability and feature descriptor structure for MIPS CPU
*/
unsigned long options;
unsigned long ases;
unsigned int udelay_val;
unsigned int processor_id;
unsigned int fpu_id;
unsigned int msa_id;
Expand Down

0 comments on commit e5eb925

Please sign in to comment.