lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080701174352.GB7043@cvg>
Date:	Tue, 1 Jul 2008 21:43:52 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"Maciej W. Rozycki" <macro@...ux-mips.org>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH -tip] x86: apic_32.c - add lapic resource

Add lapic resource into kernel resource map and mark it as busy

Signed-off-by: Cyrill Gorcunov <gorcunov@...il.com>
CC: Maciej W. Rozycki <macro@...ux-mips.org>
---

I've started to unify apic code but it will require a huge
amount of time and will not be done soon but this patch is usefull
even now I think.

Any comments are _quite__welcome_.

The patch is on top of
	commit ccbb46cbe2993e6b23244b53a5d2791c71d134f5
	Author: Ingo Molnar <mingo@...e.hu>
	Date:   Fri Jun 27 19:55:22 2008 +0200

	    stacktrace: export print_stack_trace and save_stack_trace

Index: linux-2.6.git/arch/x86/kernel/apic_32.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic_32.c	2008-07-01 20:30:10.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/apic_32.c	2008-07-01 21:27:35.000000000 +0400
@@ -81,6 +81,11 @@ int pic_mode;
 /* Have we found an MP table */
 int smp_found_config;
 
+static struct resource lapic_resource = {
+	.name = "Local APIC",
+	.flags = IORESOURCE_MEM | IORESOURCE_BUSY,
+};
+
 static unsigned int calibration_result;
 
 static int lapic_next_event(unsigned long delta,
@@ -1754,3 +1759,21 @@ static int __init apic_set_verbosity(cha
 }
 __setup("apic=", apic_set_verbosity);
 
+static int __init lapic_insert_resource(void)
+{
+	if (!apic_phys)
+		return -1;
+
+	/* Put local APIC into the resource map. */
+	lapic_resource.start = apic_phys;
+	lapic_resource.end = lapic_resource.start + PAGE_SIZE - 1;
+	insert_resource(&iomem_resource, &lapic_resource);
+
+	return 0;
+}
+
+/*
+ * need call insert after e820_reserve_resources()
+ * that is using request_resource
+ */
+late_initcall(lapic_insert_resource);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ