Skip to content

Commit 2d3c7ef

Browse files
committed
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode_amd: Add support for CPU family specific container files x86/amd: Add missing feature flag for fam15h models 10h-1fh processors x86/boot-image: Don't leak phdrs in arch/x86/boot/compressed/misc.c::Parse_elf() x86/numachip: Drop unnecessary conflict with EDAC x86/uv: Fix uninitialized spinlocks x86/uv: Fix uv_gpa_to_soc_phys_ram() shift
2 parents b57cea5 + 5b68edc commit 2d3c7ef

File tree

7 files changed

+30
-6
lines changed

7 files changed

+30
-6
lines changed

arch/x86/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ config X86_NUMACHIP
360360
depends on NUMA
361361
depends on SMP
362362
depends on X86_X2APIC
363-
depends on !EDAC_AMD64
364363
---help---
365364
Adds support for Numascale NumaChip large-SMP systems. Needed to
366365
enable more than ~168 cores.

arch/x86/boot/compressed/misc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ static void parse_elf(void *output)
321321
default: /* Ignore other PT_* */ break;
322322
}
323323
}
324+
325+
free(phdrs);
324326
}
325327

326328
asmlinkage void decompress_kernel(void *rmode, memptr heap,

arch/x86/include/asm/cpufeature.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@
159159
#define X86_FEATURE_WDT (6*32+13) /* Watchdog timer */
160160
#define X86_FEATURE_LWP (6*32+15) /* Light Weight Profiling */
161161
#define X86_FEATURE_FMA4 (6*32+16) /* 4 operands MAC instructions */
162+
#define X86_FEATURE_TCE (6*32+17) /* translation cache extension */
162163
#define X86_FEATURE_NODEID_MSR (6*32+19) /* NodeId MSR */
163164
#define X86_FEATURE_TBM (6*32+21) /* trailing bit manipulations */
164165
#define X86_FEATURE_TOPOEXT (6*32+22) /* topology extensions CPUID leafs */

arch/x86/include/asm/uv/uv_hub.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,13 @@ uv_gpa_in_mmr_space(unsigned long gpa)
318318
/* UV global physical address --> socket phys RAM */
319319
static inline unsigned long uv_gpa_to_soc_phys_ram(unsigned long gpa)
320320
{
321-
unsigned long paddr = gpa & uv_hub_info->gpa_mask;
321+
unsigned long paddr;
322322
unsigned long remap_base = uv_hub_info->lowmem_remap_base;
323323
unsigned long remap_top = uv_hub_info->lowmem_remap_top;
324324

325325
gpa = ((gpa << uv_hub_info->m_shift) >> uv_hub_info->m_shift) |
326326
((gpa >> uv_hub_info->n_lshift) << uv_hub_info->m_val);
327-
gpa = gpa & uv_hub_info->gpa_mask;
327+
paddr = gpa & uv_hub_info->gpa_mask;
328328
if (paddr >= remap_base && paddr < remap_base + remap_top)
329329
paddr -= remap_base;
330330
return paddr;

arch/x86/kernel/microcode_amd.c

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,33 @@ generic_load_microcode(int cpu, const u8 *data, size_t size)
311311
return state;
312312
}
313313

314+
/*
315+
* AMD microcode firmware naming convention, up to family 15h they are in
316+
* the legacy file:
317+
*
318+
* amd-ucode/microcode_amd.bin
319+
*
320+
* This legacy file is always smaller than 2K in size.
321+
*
322+
* Starting at family 15h they are in family specific firmware files:
323+
*
324+
* amd-ucode/microcode_amd_fam15h.bin
325+
* amd-ucode/microcode_amd_fam16h.bin
326+
* ...
327+
*
328+
* These might be larger than 2K.
329+
*/
314330
static enum ucode_state request_microcode_amd(int cpu, struct device *device)
315331
{
316-
const char *fw_name = "amd-ucode/microcode_amd.bin";
332+
char fw_name[36] = "amd-ucode/microcode_amd.bin";
317333
const struct firmware *fw;
318334
enum ucode_state ret = UCODE_NFOUND;
335+
struct cpuinfo_x86 *c = &cpu_data(cpu);
336+
337+
if (c->x86 >= 0x15)
338+
snprintf(fw_name, sizeof(fw_name), "amd-ucode/microcode_amd_fam%.2xh.bin", c->x86);
319339

320-
if (request_firmware(&fw, fw_name, device)) {
340+
if (request_firmware(&fw, (const char *)fw_name, device)) {
321341
pr_err("failed to load file %s\n", fw_name);
322342
goto out;
323343
}

arch/x86/platform/uv/tlb_uv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,6 +1851,8 @@ static void __init init_per_cpu_tunables(void)
18511851
bcp->cong_reps = congested_reps;
18521852
bcp->cong_period = congested_period;
18531853
bcp->clocks_per_100_usec = usec_2_cycles(100);
1854+
spin_lock_init(&bcp->queue_lock);
1855+
spin_lock_init(&bcp->uvhub_lock);
18541856
}
18551857
}
18561858

arch/x86/platform/uv/uv_irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct uv_irq_2_mmr_pnode{
2525
int irq;
2626
};
2727

28-
static spinlock_t uv_irq_lock;
28+
static DEFINE_SPINLOCK(uv_irq_lock);
2929
static struct rb_root uv_irq_root;
3030

3131
static int uv_set_irq_affinity(struct irq_data *, const struct cpumask *, bool);

0 commit comments

Comments
 (0)