Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367241
b: refs/heads/master
c: 3e98fda
h: refs/heads/master
i:
  367239: 7130d46
v: v3
  • Loading branch information
Javi Merino authored and Catalin Marinas committed Mar 20, 2013
1 parent 07a7c0e commit 73032a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: de79a64d61ed3f7ccec9f9661fab2f3e97256243
refs/heads/master: 3e98fdacc59bbbdbb659be1a144ccc48ed4860fa
2 changes: 2 additions & 0 deletions trunk/arch/arm64/include/asm/cputype.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#define ID_AA64ISAR0_EL1 "id_aa64isar0_el1"
#define ID_AA64MMFR0_EL1 "id_aa64mmfr0_el1"

#define INVALID_HWID ULONG_MAX

#define read_cpuid(reg) ({ \
u64 __val; \
asm("mrs %0, " reg : "=r" (__val)); \
Expand Down
10 changes: 5 additions & 5 deletions trunk/arch/arm64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* where to place its SVC stack
*/
struct secondary_data secondary_data;
volatile unsigned long secondary_holding_pen_release = -1;
volatile unsigned long secondary_holding_pen_release = INVALID_HWID;

enum ipi_msg_type {
IPI_RESCHEDULE,
Expand All @@ -70,7 +70,7 @@ static DEFINE_RAW_SPINLOCK(boot_lock);
* in coherency or not. This is necessary for the hotplug code to work
* reliably.
*/
static void __cpuinit write_pen_release(int val)
static void __cpuinit write_pen_release(u64 val)
{
void *start = (void *)&secondary_holding_pen_release;
unsigned long size = sizeof(secondary_holding_pen_release);
Expand Down Expand Up @@ -105,7 +105,7 @@ static int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)

timeout = jiffies + (1 * HZ);
while (time_before(jiffies, timeout)) {
if (secondary_holding_pen_release == -1UL)
if (secondary_holding_pen_release == INVALID_HWID)
break;
udelay(10);
}
Expand All @@ -116,7 +116,7 @@ static int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
*/
raw_spin_unlock(&boot_lock);

return secondary_holding_pen_release != -1 ? -ENOSYS : 0;
return secondary_holding_pen_release != INVALID_HWID ? -ENOSYS : 0;
}

static DECLARE_COMPLETION(cpu_running);
Expand Down Expand Up @@ -190,7 +190,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
* Let the primary processor know we're out of the
* pen, then head off into the C entry point
*/
write_pen_release(-1);
write_pen_release(INVALID_HWID);

/*
* Synchronise with the boot thread.
Expand Down

0 comments on commit 73032a2

Please sign in to comment.