]> git.pld-linux.org Git - packages/kernel.git/blob - kernel-atom-coretemp.patch
- update SECURITY_DEFAULT_MMAP_MIN_ADDR to match upstream settings
[packages/kernel.git] / kernel-atom-coretemp.patch
1 Index: linux-2.6.27-rc2/Documentation/hwmon/coretemp
2 ===================================================================
3 --- linux-2.6.27-rc2.orig/Documentation/hwmon/coretemp  2008-08-10 20:33:20.355228221 +0200
4 +++ linux-2.6.27-rc2/Documentation/hwmon/coretemp       2008-08-09 20:09:42.000000000 +0200
5 @@ -4,7 +4,7 @@
6  Supported chips:
7    * All Intel Core family
8      Prefix: 'coretemp'
9 -    CPUID: family 0x6, models 0xe, 0xf, 0x16, 0x17
10 +    CPUID: family 0x6, models 0xe, 0xf, 0x16, 0x17, 0x1c
11      Datasheet: Intel 64 and IA-32 Architectures Software Developer's Manual
12                 Volume 3A: System Programming Guide
13                 http://softwarecommunity.intel.com/Wiki/Mobility/720.htm
14 @@ -14,10 +14,11 @@
15  Description
16  -----------
17  
18 -This driver permits reading temperature sensor embedded inside Intel Core CPU.
19 -Temperature is measured in degrees Celsius and measurement resolution is
20 -1 degree C. Valid temperatures are from 0 to TjMax degrees C, because
21 -the actual value of temperature register is in fact a delta from TjMax.
22 +This driver permits reading temperature sensor embedded inside Intel
23 +Core  and Intel Atom CPUs. Temperature is measured in degrees Celsius
24 +and measurement resolution is 1 degree C. Valid temperatures are from 0
25 +to TjMax degrees C, because the actual value of temperature register is
26 +in fact a delta from TjMax.
27  
28  Temperature known as TjMax is the maximum junction temperature of processor.
29  Intel defines this temperature as 85C or 100C. At this temperature, protection
30 @@ -35,4 +36,5 @@
31  
32  The TjMax temperature is set to 85 degrees C if undocumented model specific
33  register (UMSR) 0xee has bit 30 set. If not the TjMax is 100 degrees C as
34 -(sometimes) documented in processor datasheet.
35 +(sometimes) documented in processor datasheet. The Intel Atom has TjMax 95C
36 +as per the specification.
37 Index: linux-2.6.27-rc2/drivers/hwmon/coretemp.c
38 ===================================================================
39 --- linux-2.6.27/drivers/hwmon/coretemp.c.orig  2008-10-10 00:13:53.000000000 +0200
40 +++ linux-2.6.27/drivers/hwmon/coretemp.c       2009-03-23 10:05:12.000000000 +0100
41 @@ -1,7 +1,7 @@
42  /*
43   * coretemp.c - Linux kernel module for hardware monitoring
44   *
45 - * Copyright (C) 2007 Rudolf Marek <r.marek@assembler.cz>
46 + * Copyright (C) 2007, 2008 Rudolf Marek <r.marek@assembler.cz>
47   *
48   * Inspired from many hwmon drivers
49   *
50 @@ -244,8 +244,14 @@
51                 }
52         }
53  
54 -       data->tjmax = adjust_tjmax(c, data->id, &pdev->dev);
55 -       platform_set_drvdata(pdev, data);
56 +       /* Intel Atom has only fixed TjMax at 95C */
57 +
58 +       if (c->x86_model == 0x1c) {
59 +               data->tjmax = 95000;
60 +       } else {
61 +               /* Adjust the TjMax for the rest of Core2 family */
62 +               data->tjmax = adjust_tjmax(c, data->id, &pdev->dev);
63 +       }
64  
65         /* read the still undocumented IA32_TEMPERATURE_TARGET it exists
66            on older CPUs but not in this register */
67 @@ -265,6 +271,8 @@
68                 }
69         }
70  
71 +       platform_set_drvdata(pdev, data);
72 +
73         if ((err = sysfs_create_group(&pdev->dev.kobj, &coretemp_group)))
74                 goto exit_dev;
75  
76 @@ -413,11 +421,11 @@
77         for_each_online_cpu(i) {
78                 struct cpuinfo_x86 *c = &cpu_data(i);
79  
80 -               /* check if family 6, models 0xe, 0xf, 0x16, 0x17, 0x1A */
81 +               /* check if family 6, models 0xe, 0xf, 0x16, 0x17, 0x1a, 0x1c */
82                 if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
83                     !((c->x86_model == 0xe) || (c->x86_model == 0xf) ||
84                         (c->x86_model == 0x16) || (c->x86_model == 0x17) ||
85 -                       (c->x86_model == 0x1A))) {
86 +                       (c->x86_model == 0x1a) || (c->x86_model == 0x1c))) {
87  
88                         /* supported CPU not found, but report the unknown
89                            family 6 CPU */
This page took 0.074173 seconds and 3 git commands to generate.