Re: [PATCH v3] Virtual memory size detection for 64 bit MIPS CPUs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guenter Roeck wrote:
Linux kernel 2.6.32 and later allocates memory from the top of virtual memory
space.

This patch implements virtual memory size detection for 64 bit MIPS CPUs
to avoid resulting crashes.

Signed-off-by: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx>
[...]
+static inline void cpu_set_vmbits(struct cpuinfo_mips *c)
+{
+	if (cpu_has_64bits) {
+		write_c0_entryhi(0xfffffffffffff000ULL);

macro indicated that we need to avoid hazards here on R4000.

Perhaps adding:

 	back_to_back_c0_hazard();

+		c->vmbits = fls64(read_c0_entryhi() & 0x3ffffffffffff000ULL);
+	} else
+		c->vmbits = 32;
+}
+




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux